@everymatrix/cashier-notifications 1.54.0 → 1.54.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,541 @@
1
+ function x() {
2
+ }
3
+ function M(e) {
4
+ return e();
5
+ }
6
+ function A() {
7
+ return /* @__PURE__ */ Object.create(null);
8
+ }
9
+ function E(e) {
10
+ e.forEach(M);
11
+ }
12
+ function R(e) {
13
+ return typeof e == "function";
14
+ }
15
+ function I(e, t) {
16
+ return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
17
+ }
18
+ function U(e) {
19
+ return Object.keys(e).length === 0;
20
+ }
21
+ function m(e, t) {
22
+ e.appendChild(t);
23
+ }
24
+ function D(e, t, n) {
25
+ const s = J(e);
26
+ if (!s.getElementById(t)) {
27
+ const i = p("style");
28
+ i.id = t, i.textContent = n, V(s, i);
29
+ }
30
+ }
31
+ function J(e) {
32
+ if (!e) return document;
33
+ const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
34
+ return t && /** @type {ShadowRoot} */
35
+ t.host ? (
36
+ /** @type {ShadowRoot} */
37
+ t
38
+ ) : e.ownerDocument;
39
+ }
40
+ function V(e, t) {
41
+ return m(
42
+ /** @type {Document} */
43
+ e.head || e,
44
+ t
45
+ ), t.sheet;
46
+ }
47
+ function T(e, t, n) {
48
+ e.insertBefore(t, n || null);
49
+ }
50
+ function j(e) {
51
+ e.parentNode && e.parentNode.removeChild(e);
52
+ }
53
+ function p(e) {
54
+ return document.createElement(e);
55
+ }
56
+ function N(e) {
57
+ return document.createTextNode(e);
58
+ }
59
+ function F() {
60
+ return N(" ");
61
+ }
62
+ function q(e, t, n, s) {
63
+ return e.addEventListener(t, n, s), () => e.removeEventListener(t, n, s);
64
+ }
65
+ function z(e, t, n) {
66
+ n == null ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n);
67
+ }
68
+ function G(e) {
69
+ return Array.from(e.childNodes);
70
+ }
71
+ function P(e, t) {
72
+ t = "" + t, e.data !== t && (e.data = /** @type {string} */
73
+ t);
74
+ }
75
+ function K(e) {
76
+ const t = {};
77
+ return e.childNodes.forEach(
78
+ /** @param {Element} node */
79
+ (n) => {
80
+ t[n.slot || "default"] = !0;
81
+ }
82
+ ), t;
83
+ }
84
+ let S;
85
+ function w(e) {
86
+ S = e;
87
+ }
88
+ const _ = [], v = [];
89
+ let b = [];
90
+ const B = [], Q = /* @__PURE__ */ Promise.resolve();
91
+ let L = !1;
92
+ function W() {
93
+ L || (L = !0, Q.then(g));
94
+ }
95
+ function O(e) {
96
+ b.push(e);
97
+ }
98
+ const k = /* @__PURE__ */ new Set();
99
+ let d = 0;
100
+ function g() {
101
+ if (d !== 0)
102
+ return;
103
+ const e = S;
104
+ do {
105
+ try {
106
+ for (; d < _.length; ) {
107
+ const t = _[d];
108
+ d++, w(t), X(t.$$);
109
+ }
110
+ } catch (t) {
111
+ throw _.length = 0, d = 0, t;
112
+ }
113
+ for (w(null), _.length = 0, d = 0; v.length; ) v.pop()();
114
+ for (let t = 0; t < b.length; t += 1) {
115
+ const n = b[t];
116
+ k.has(n) || (k.add(n), n());
117
+ }
118
+ b.length = 0;
119
+ } while (_.length);
120
+ for (; B.length; )
121
+ B.pop()();
122
+ L = !1, k.clear(), w(e);
123
+ }
124
+ function X(e) {
125
+ if (e.fragment !== null) {
126
+ e.update(), E(e.before_update);
127
+ const t = e.dirty;
128
+ e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(O);
129
+ }
130
+ }
131
+ function Y(e) {
132
+ const t = [], n = [];
133
+ b.forEach((s) => e.indexOf(s) === -1 ? t.push(s) : n.push(s)), n.forEach((s) => s()), b = t;
134
+ }
135
+ const Z = /* @__PURE__ */ new Set();
136
+ function tt(e, t) {
137
+ e && e.i && (Z.delete(e), e.i(t));
138
+ }
139
+ function et(e, t, n) {
140
+ const { fragment: s, after_update: i } = e.$$;
141
+ s && s.m(t, n), O(() => {
142
+ const r = e.$$.on_mount.map(M).filter(R);
143
+ e.$$.on_destroy ? e.$$.on_destroy.push(...r) : E(r), e.$$.on_mount = [];
144
+ }), i.forEach(O);
145
+ }
146
+ function nt(e, t) {
147
+ const n = e.$$;
148
+ n.fragment !== null && (Y(n.after_update), E(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
149
+ }
150
+ function it(e, t) {
151
+ e.$$.dirty[0] === -1 && (_.push(e), W(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
152
+ }
153
+ function st(e, t, n, s, i, r, l = null, o = [-1]) {
154
+ const f = S;
155
+ w(e);
156
+ const c = e.$$ = {
157
+ fragment: null,
158
+ ctx: [],
159
+ // state
160
+ props: r,
161
+ update: x,
162
+ not_equal: i,
163
+ bound: A(),
164
+ // lifecycle
165
+ on_mount: [],
166
+ on_destroy: [],
167
+ on_disconnect: [],
168
+ before_update: [],
169
+ after_update: [],
170
+ context: new Map(t.context || (f ? f.$$.context : [])),
171
+ // everything else
172
+ callbacks: A(),
173
+ dirty: o,
174
+ skip_bound: !1,
175
+ root: t.target || f.$$.root
176
+ };
177
+ l && l(c.root);
178
+ let $ = !1;
179
+ if (c.ctx = n(e, t.props || {}, (a, u, ...y) => {
180
+ const h = y.length ? y[0] : u;
181
+ return c.ctx && i(c.ctx[a], c.ctx[a] = h) && (!c.skip_bound && c.bound[a] && c.bound[a](h), $ && it(e, a)), u;
182
+ }), c.update(), $ = !0, E(c.before_update), c.fragment = s(c.ctx), t.target) {
183
+ if (t.hydrate) {
184
+ const a = G(t.target);
185
+ c.fragment && c.fragment.l(a), a.forEach(j);
186
+ } else
187
+ c.fragment && c.fragment.c();
188
+ t.intro && tt(e.$$.fragment), et(e, t.target, t.anchor), g();
189
+ }
190
+ w(f);
191
+ }
192
+ let H;
193
+ typeof HTMLElement == "function" && (H = class extends HTMLElement {
194
+ /** The Svelte component constructor */
195
+ $$ctor;
196
+ /** Slots */
197
+ $$s;
198
+ /** The Svelte component instance */
199
+ $$c;
200
+ /** Whether or not the custom element is connected */
201
+ $$cn = !1;
202
+ /** Component props data */
203
+ $$d = {};
204
+ /** `true` if currently in the process of reflecting component props back to attributes */
205
+ $$r = !1;
206
+ /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
207
+ $$p_d = {};
208
+ /** @type {Record<string, Function[]>} Event listeners */
209
+ $$l = {};
210
+ /** @type {Map<Function, Function>} Event listener unsubscribe functions */
211
+ $$l_u = /* @__PURE__ */ new Map();
212
+ constructor(e, t, n) {
213
+ super(), this.$$ctor = e, this.$$s = t, n && this.attachShadow({ mode: "open" });
214
+ }
215
+ addEventListener(e, t, n) {
216
+ if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
217
+ const s = this.$$c.$on(e, t);
218
+ this.$$l_u.set(t, s);
219
+ }
220
+ super.addEventListener(e, t, n);
221
+ }
222
+ removeEventListener(e, t, n) {
223
+ if (super.removeEventListener(e, t, n), this.$$c) {
224
+ const s = this.$$l_u.get(t);
225
+ s && (s(), this.$$l_u.delete(t));
226
+ }
227
+ }
228
+ async connectedCallback() {
229
+ if (this.$$cn = !0, !this.$$c) {
230
+ let e = function(i) {
231
+ return () => {
232
+ let r;
233
+ return {
234
+ c: function() {
235
+ r = p("slot"), i !== "default" && z(r, "name", i);
236
+ },
237
+ /**
238
+ * @param {HTMLElement} target
239
+ * @param {HTMLElement} [anchor]
240
+ */
241
+ m: function(f, c) {
242
+ T(f, r, c);
243
+ },
244
+ d: function(f) {
245
+ f && j(r);
246
+ }
247
+ };
248
+ };
249
+ };
250
+ if (await Promise.resolve(), !this.$$cn || this.$$c)
251
+ return;
252
+ const t = {}, n = K(this);
253
+ for (const i of this.$$s)
254
+ i in n && (t[i] = [e(i)]);
255
+ for (const i of this.attributes) {
256
+ const r = this.$$g_p(i.name);
257
+ r in this.$$d || (this.$$d[r] = C(r, i.value, this.$$p_d, "toProp"));
258
+ }
259
+ for (const i in this.$$p_d)
260
+ !(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
261
+ this.$$c = new this.$$ctor({
262
+ target: this.shadowRoot || this,
263
+ props: {
264
+ ...this.$$d,
265
+ $$slots: t,
266
+ $$scope: {
267
+ ctx: []
268
+ }
269
+ }
270
+ });
271
+ const s = () => {
272
+ this.$$r = !0;
273
+ for (const i in this.$$p_d)
274
+ if (this.$$d[i] = this.$$c.$$.ctx[this.$$c.$$.props[i]], this.$$p_d[i].reflect) {
275
+ const r = C(
276
+ i,
277
+ this.$$d[i],
278
+ this.$$p_d,
279
+ "toAttribute"
280
+ );
281
+ r == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, r);
282
+ }
283
+ this.$$r = !1;
284
+ };
285
+ this.$$c.$$.after_update.push(s), s();
286
+ for (const i in this.$$l)
287
+ for (const r of this.$$l[i]) {
288
+ const l = this.$$c.$on(i, r);
289
+ this.$$l_u.set(r, l);
290
+ }
291
+ this.$$l = {};
292
+ }
293
+ }
294
+ // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
295
+ // and setting attributes through setAttribute etc, this is helpful
296
+ attributeChangedCallback(e, t, n) {
297
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = C(e, n, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
298
+ }
299
+ disconnectedCallback() {
300
+ this.$$cn = !1, Promise.resolve().then(() => {
301
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
302
+ });
303
+ }
304
+ $$g_p(e) {
305
+ return Object.keys(this.$$p_d).find(
306
+ (t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e
307
+ ) || e;
308
+ }
309
+ });
310
+ function C(e, t, n, s) {
311
+ const i = n[e]?.type;
312
+ if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !s || !n[e])
313
+ return t;
314
+ if (s === "toAttribute")
315
+ switch (i) {
316
+ case "Object":
317
+ case "Array":
318
+ return t == null ? null : JSON.stringify(t);
319
+ case "Boolean":
320
+ return t ? "" : null;
321
+ case "Number":
322
+ return t ?? null;
323
+ default:
324
+ return t;
325
+ }
326
+ else
327
+ switch (i) {
328
+ case "Object":
329
+ case "Array":
330
+ return t && JSON.parse(t);
331
+ case "Boolean":
332
+ return t;
333
+ case "Number":
334
+ return t != null ? +t : t;
335
+ default:
336
+ return t;
337
+ }
338
+ }
339
+ function rt(e, t, n, s, i, r) {
340
+ let l = class extends H {
341
+ constructor() {
342
+ super(e, n, i), this.$$p_d = t;
343
+ }
344
+ static get observedAttributes() {
345
+ return Object.keys(t).map(
346
+ (o) => (t[o].attribute || o).toLowerCase()
347
+ );
348
+ }
349
+ };
350
+ return Object.keys(t).forEach((o) => {
351
+ Object.defineProperty(l.prototype, o, {
352
+ get() {
353
+ return this.$$c && o in this.$$c ? this.$$c[o] : this.$$d[o];
354
+ },
355
+ set(f) {
356
+ f = C(o, f, t), this.$$d[o] = f, this.$$c?.$set({ [o]: f });
357
+ }
358
+ });
359
+ }), s.forEach((o) => {
360
+ Object.defineProperty(l.prototype, o, {
361
+ get() {
362
+ return this.$$c?.[o];
363
+ }
364
+ });
365
+ }), e.element = /** @type {any} */
366
+ l, l;
367
+ }
368
+ class ot {
369
+ /**
370
+ * ### PRIVATE API
371
+ *
372
+ * Do not use, may change at any time
373
+ *
374
+ * @type {any}
375
+ */
376
+ $$ = void 0;
377
+ /**
378
+ * ### PRIVATE API
379
+ *
380
+ * Do not use, may change at any time
381
+ *
382
+ * @type {any}
383
+ */
384
+ $$set = void 0;
385
+ /** @returns {void} */
386
+ $destroy() {
387
+ nt(this, 1), this.$destroy = x;
388
+ }
389
+ /**
390
+ * @template {Extract<keyof Events, string>} K
391
+ * @param {K} type
392
+ * @param {((e: Events[K]) => void) | null | undefined} callback
393
+ * @returns {() => void}
394
+ */
395
+ $on(t, n) {
396
+ if (!R(n))
397
+ return x;
398
+ const s = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
399
+ return s.push(n), () => {
400
+ const i = s.indexOf(n);
401
+ i !== -1 && s.splice(i, 1);
402
+ };
403
+ }
404
+ /**
405
+ * @param {Partial<Props>} props
406
+ * @returns {void}
407
+ */
408
+ $set(t) {
409
+ this.$$set && !U(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
410
+ }
411
+ }
412
+ const ct = "4";
413
+ typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(ct);
414
+ function lt(e) {
415
+ D(e, "svelte-ags340", ".CashierNotifications{position:absolute;z-index:2;background-color:var(--emw--color-background, #111);color:var(--emw--color-white, #fff);display:flex;border-radius:var(--emw--border-radius-medium, 4px);align-items:center;gap:var(--emw--spacing-small, 12px);font-size:var(--emw--font-size-small, 14px);padding:var(--emw--spacing-small, 12px) var(--emw--spacing-medium, 15px);min-height:50px;pointer-events:auto;bottom:0;width:calc(100% - 30px)}.CashierNotifications span,.CashierNotifications button{font-family:inherit;border:none;font-variant:normal}.CashierNotifications span{line-height:normal}.CashierNotifications button{color:var(--emw--color-primary, #7EC51E);background-color:transparent;cursor:pointer;font-size:var(--emw--font-size-medium, 16px);font-style:normal;font-weight:var(--emw--font-weight-bold, 700);font-family:inherit}");
416
+ }
417
+ function ut(e) {
418
+ let t, n, s, i, r, l, o, f;
419
+ return {
420
+ c() {
421
+ t = p("div"), n = p("span"), s = N(
422
+ /*text*/
423
+ e[0]
424
+ ), i = F(), r = p("button"), l = N(
425
+ /*button*/
426
+ e[1]
427
+ ), z(t, "class", "CashierNotifications");
428
+ },
429
+ m(c, $) {
430
+ T(c, t, $), m(t, n), m(n, s), m(t, i), m(t, r), m(r, l), e[6](t), o || (f = q(
431
+ r,
432
+ "click",
433
+ /*notificationClick*/
434
+ e[3]
435
+ ), o = !0);
436
+ },
437
+ p(c, [$]) {
438
+ $ & /*text*/
439
+ 1 && P(
440
+ s,
441
+ /*text*/
442
+ c[0]
443
+ ), $ & /*button*/
444
+ 2 && P(
445
+ l,
446
+ /*button*/
447
+ c[1]
448
+ );
449
+ },
450
+ i: x,
451
+ o: x,
452
+ d(c) {
453
+ c && j(t), e[6](null), o = !1, f();
454
+ }
455
+ };
456
+ }
457
+ function ft(e, t, n) {
458
+ let { text: s } = t, { button: i } = t, { clientstyling: r = "" } = t, { clientstylingurl: l = "" } = t, o;
459
+ const f = () => {
460
+ window.postMessage({ type: "NotificationButtonClick" }, window.location.href);
461
+ }, c = () => {
462
+ let u = document.createElement("style");
463
+ u.innerHTML = r, o.appendChild(u);
464
+ }, $ = () => {
465
+ let u = new URL(l), y = document.createElement("style");
466
+ fetch(u.href).then((h) => h.text()).then((h) => {
467
+ y.innerHTML = h, setTimeout(
468
+ () => {
469
+ o.appendChild(y);
470
+ },
471
+ 1
472
+ );
473
+ });
474
+ };
475
+ function a(u) {
476
+ v[u ? "unshift" : "push"](() => {
477
+ o = u, n(2, o);
478
+ });
479
+ }
480
+ return e.$$set = (u) => {
481
+ "text" in u && n(0, s = u.text), "button" in u && n(1, i = u.button), "clientstyling" in u && n(4, r = u.clientstyling), "clientstylingurl" in u && n(5, l = u.clientstylingurl);
482
+ }, e.$$.update = () => {
483
+ e.$$.dirty & /*clientstyling, customStylingContainer*/
484
+ 20 && r && o && c(), e.$$.dirty & /*clientstylingurl, customStylingContainer*/
485
+ 36 && l && o && $();
486
+ }, [
487
+ s,
488
+ i,
489
+ o,
490
+ f,
491
+ r,
492
+ l,
493
+ a
494
+ ];
495
+ }
496
+ class at extends ot {
497
+ constructor(t) {
498
+ super(), st(
499
+ this,
500
+ t,
501
+ ft,
502
+ ut,
503
+ I,
504
+ {
505
+ text: 0,
506
+ button: 1,
507
+ clientstyling: 4,
508
+ clientstylingurl: 5
509
+ },
510
+ lt
511
+ );
512
+ }
513
+ get text() {
514
+ return this.$$.ctx[0];
515
+ }
516
+ set text(t) {
517
+ this.$$set({ text: t }), g();
518
+ }
519
+ get button() {
520
+ return this.$$.ctx[1];
521
+ }
522
+ set button(t) {
523
+ this.$$set({ button: t }), g();
524
+ }
525
+ get clientstyling() {
526
+ return this.$$.ctx[4];
527
+ }
528
+ set clientstyling(t) {
529
+ this.$$set({ clientstyling: t }), g();
530
+ }
531
+ get clientstylingurl() {
532
+ return this.$$.ctx[5];
533
+ }
534
+ set clientstylingurl(t) {
535
+ this.$$set({ clientstylingurl: t }), g();
536
+ }
537
+ }
538
+ rt(at, { text: {}, button: {}, clientstyling: {}, clientstylingurl: {} }, [], [], !0);
539
+ export {
540
+ at as C
541
+ };
@@ -0,0 +1,14 @@
1
+ import { C as n } from "../components/CashierNotifications-CpSvr9Km.js";
2
+ function i(t) {
3
+ return function(...s) {
4
+ try {
5
+ return t.apply(this, s);
6
+ } catch (e) {
7
+ if (e instanceof DOMException && e.message.includes("has already been used with this registry") || e.message.includes("Cannot define multiple custom elements with the same tag name"))
8
+ return !1;
9
+ throw e;
10
+ }
11
+ };
12
+ }
13
+ customElements.define = i(customElements.define);
14
+ !customElements.get("cashier-notifications") && customElements.define("cashier-notifications", n.element);
package/package.json CHANGED
@@ -1,20 +1,22 @@
1
1
  {
2
2
  "name": "@everymatrix/cashier-notifications",
3
- "version": "1.54.0",
3
+ "version": "1.54.2",
4
4
  "type": "module",
5
- "main": "es2015/cashier-notifications.cjs",
6
- "module": "es2015/cashier-notifications.js",
5
+ "main": "esnext/cashier-notifications.js",
6
+ "module": "esnext/cashier-notifications.js",
7
7
  "exports": {
8
8
  ".": {
9
- "import": "./es2015/cashier-notifications.js",
10
- "require": "./es2015/cashier-notifications.cjs"
9
+ "import": "./esnext/cashier-notifications.js"
11
10
  },
12
- "./es2015/cashier-notifications.cjs": "./es2015/cashier-notifications.cjs"
11
+ "./es2015/cashier-notifications.cjs": "./es2015/cashier-notifications.cjs",
12
+ "./es2015/cashier-notifications.js": "./es2015/cashier-notifications.js"
13
13
  },
14
14
  "files": [
15
+ "components/",
15
16
  "es2015/",
16
- "components",
17
- "stencil"
17
+ "stencil",
18
+ "angular",
19
+ "esnext/"
18
20
  ],
19
21
  "publishConfig": {
20
22
  "access": "public"
@@ -1 +0,0 @@
1
- "use strict";var G=Object.defineProperty,K=Object.defineProperties;var Q=Object.getOwnPropertyDescriptors;var M=Object.getOwnPropertySymbols;var W=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable;var N=(e,t,n)=>t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,B=(e,t)=>{for(var n in t||(t={}))W.call(t,n)&&N(e,n,t[n]);if(M)for(var n of M(t))X.call(t,n)&&N(e,n,t[n]);return e},T=(e,t)=>K(e,Q(t));var a=(e,t,n)=>N(e,typeof t!="symbol"?t+"":t,n);var R=(e,t,n)=>new Promise((s,r)=>{var i=u=>{try{c(n.next(u))}catch(o){r(o)}},l=u=>{try{c(n.throw(u))}catch(o){r(o)}},c=u=>u.done?s(u.value):Promise.resolve(u.value).then(i,l);c((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function C(){}function U(e){return e()}function z(){return Object.create(null)}function k(e){e.forEach(U)}function D(e){return typeof e=="function"}function Y(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Z(e){return Object.keys(e).length===0}function _(e,t){e.appendChild(t)}function tt(e,t,n){const s=et(e);if(!s.getElementById(t)){const r=w("style");r.id=t,r.textContent=n,nt(s,r)}}function et(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function nt(e,t){return _(e.head||e,t),t.sheet}function J(e,t,n){e.insertBefore(t,n||null)}function A(e){e.parentNode&&e.parentNode.removeChild(e)}function w(e){return document.createElement(e)}function L(e){return document.createTextNode(e)}function it(){return L(" ")}function st(e,t,n,s){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n,s)}function V(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function rt(e){return Array.from(e.childNodes)}function H(e,t){t=""+t,e.data!==t&&(e.data=t)}function ot(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let P;function x(e){P=e}const g=[],O=[];let y=[];const I=[],ct=Promise.resolve();let j=!1;function lt(){j||(j=!0,ct.then(b))}function S(e){y.push(e)}const v=new Set;let m=0;function b(){if(m!==0)return;const e=P;do{try{for(;m<g.length;){const t=g[m];m++,x(t),ut(t.$$)}}catch(t){throw g.length=0,m=0,t}for(x(null),g.length=0,m=0;O.length;)O.pop()();for(let t=0;t<y.length;t+=1){const n=y[t];v.has(n)||(v.add(n),n())}y.length=0}while(g.length);for(;I.length;)I.pop()();j=!1,v.clear(),x(e)}function ut(e){if(e.fragment!==null){e.update(),k(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(S)}}function ft(e){const t=[],n=[];y.forEach(s=>e.indexOf(s)===-1?t.push(s):n.push(s)),n.forEach(s=>s()),y=t}const at=new Set;function $t(e,t){e&&e.i&&(at.delete(e),e.i(t))}function ht(e,t,n){const{fragment:s,after_update:r}=e.$$;s&&s.m(t,n),S(()=>{const i=e.$$.on_mount.map(U).filter(D);e.$$.on_destroy?e.$$.on_destroy.push(...i):k(i),e.$$.on_mount=[]}),r.forEach(S)}function dt(e,t){const n=e.$$;n.fragment!==null&&(ft(n.after_update),k(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function mt(e,t){e.$$.dirty[0]===-1&&(g.push(e),lt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function _t(e,t,n,s,r,i,l=null,c=[-1]){const u=P;x(e);const o=e.$$={fragment:null,ctx:[],props:i,update:C,not_equal:r,bound:z(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:z(),dirty:c,skip_bound:!1,root:t.target||u.$$.root};l&&l(o.root);let $=!1;if(o.ctx=n(e,t.props||{},(h,f,...p)=>{const d=p.length?p[0]:f;return o.ctx&&r(o.ctx[h],o.ctx[h]=d)&&(!o.skip_bound&&o.bound[h]&&o.bound[h](d),$&&mt(e,h)),f}),o.update(),$=!0,k(o.before_update),o.fragment=s(o.ctx),t.target){if(t.hydrate){const h=rt(t.target);o.fragment&&o.fragment.l(h),h.forEach(A)}else o.fragment&&o.fragment.c();t.intro&&$t(e.$$.fragment),ht(e,t.target,t.anchor),b()}x(u)}let F;typeof HTMLElement=="function"&&(F=class extends HTMLElement{constructor(t,n,s){super();a(this,"$$ctor");a(this,"$$s");a(this,"$$c");a(this,"$$cn",!1);a(this,"$$d",{});a(this,"$$r",!1);a(this,"$$p_d",{});a(this,"$$l",{});a(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,s&&this.attachShadow({mode:"open"})}addEventListener(t,n,s){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const r=this.$$c.$on(t,n);this.$$l_u.set(n,r)}super.addEventListener(t,n,s)}removeEventListener(t,n,s){if(super.removeEventListener(t,n,s),this.$$c){const r=this.$$l_u.get(n);r&&(r(),this.$$l_u.delete(n))}}connectedCallback(){return R(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(i){return()=>{let l;return{c:function(){l=w("slot"),i!=="default"&&V(l,"name",i)},m:function(o,$){J(o,l,$)},d:function(o){o&&A(l)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},s=ot(this);for(const i of this.$$s)i in s&&(n[i]=[t(i)]);for(const i of this.attributes){const l=this.$$g_p(i.name);l in this.$$d||(this.$$d[l]=E(l,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:T(B({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const r=()=>{this.$$r=!0;for(const i in this.$$p_d)if(this.$$d[i]=this.$$c.$$.ctx[this.$$c.$$.props[i]],this.$$p_d[i].reflect){const l=E(i,this.$$d[i],this.$$p_d,"toAttribute");l==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,l)}this.$$r=!1};this.$$c.$$.after_update.push(r),r();for(const i in this.$$l)for(const l of this.$$l[i]){const c=this.$$c.$on(i,l);this.$$l_u.set(l,c)}this.$$l={}}})}attributeChangedCallback(t,n,s){var r;this.$$r||(t=this.$$g_p(t),this.$$d[t]=E(t,s,this.$$p_d,"toProp"),(r=this.$$c)==null||r.$set({[t]:this.$$d[t]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(t){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===t||!this.$$p_d[n].attribute&&n.toLowerCase()===t)||t}});function E(e,t,n,s){var i;const r=(i=n[e])==null?void 0:i.type;if(t=r==="Boolean"&&typeof t!="boolean"?t!=null:t,!s||!n[e])return t;if(s==="toAttribute")switch(r){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t==null?null:t;default:return t}else switch(r){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function gt(e,t,n,s,r,i){let l=class extends F{constructor(){super(e,n,r),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(c=>(t[c].attribute||c).toLowerCase())}};return Object.keys(t).forEach(c=>{Object.defineProperty(l.prototype,c,{get(){return this.$$c&&c in this.$$c?this.$$c[c]:this.$$d[c]},set(u){var o;u=E(c,u,t),this.$$d[c]=u,(o=this.$$c)==null||o.$set({[c]:u})}})}),s.forEach(c=>{Object.defineProperty(l.prototype,c,{get(){var u;return(u=this.$$c)==null?void 0:u[c]}})}),e.element=l,l}class bt{constructor(){a(this,"$$");a(this,"$$set")}$destroy(){dt(this,1),this.$destroy=C}$on(t,n){if(!D(n))return C;const s=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return s.push(n),()=>{const r=s.indexOf(n);r!==-1&&s.splice(r,1)}}$set(t){this.$$set&&!Z(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const yt="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(yt);function pt(e){tt(e,"svelte-ags340",".CashierNotifications{position:absolute;z-index:2;background-color:var(--emw--color-background, #111);color:var(--emw--color-white, #fff);display:flex;border-radius:var(--emw--border-radius-medium, 4px);align-items:center;gap:var(--emw--spacing-small, 12px);font-size:var(--emw--font-size-small, 14px);padding:var(--emw--spacing-small, 12px) var(--emw--spacing-medium, 15px);min-height:50px;pointer-events:auto;bottom:0;width:calc(100% - 30px)}.CashierNotifications span,.CashierNotifications button{font-family:inherit;border:none;font-variant:normal}.CashierNotifications span{line-height:normal}.CashierNotifications button{color:var(--emw--color-primary, #7EC51E);background-color:transparent;cursor:pointer;font-size:var(--emw--font-size-medium, 16px);font-style:normal;font-weight:var(--emw--font-weight-bold, 700);font-family:inherit}")}function wt(e){let t,n,s,r,i,l,c,u;return{c(){t=w("div"),n=w("span"),s=L(e[0]),r=it(),i=w("button"),l=L(e[1]),V(t,"class","CashierNotifications")},m(o,$){J(o,t,$),_(t,n),_(n,s),_(t,r),_(t,i),_(i,l),e[6](t),c||(u=st(i,"click",e[3]),c=!0)},p(o,[$]){$&1&&H(s,o[0]),$&2&&H(l,o[1])},i:C,o:C,d(o){o&&A(t),e[6](null),c=!1,u()}}}function xt(e,t,n){let{text:s}=t,{button:r}=t,{clientstyling:i=""}=t,{clientstylingurl:l=""}=t,c;const u=()=>{window.postMessage({type:"NotificationButtonClick"},window.location.href)},o=()=>{let f=document.createElement("style");f.innerHTML=i,c.appendChild(f)},$=()=>{let f=new URL(l),p=document.createElement("style");fetch(f.href).then(d=>d.text()).then(d=>{p.innerHTML=d,setTimeout(()=>{c.appendChild(p)},1)})};function h(f){O[f?"unshift":"push"](()=>{c=f,n(2,c)})}return e.$$set=f=>{"text"in f&&n(0,s=f.text),"button"in f&&n(1,r=f.button),"clientstyling"in f&&n(4,i=f.clientstyling),"clientstylingurl"in f&&n(5,l=f.clientstylingurl)},e.$$.update=()=>{e.$$.dirty&20&&i&&c&&o(),e.$$.dirty&36&&l&&c&&$()},[s,r,c,u,i,l,h]}class q extends bt{constructor(t){super(),_t(this,t,xt,wt,Y,{text:0,button:1,clientstyling:4,clientstylingurl:5},pt)}get text(){return this.$$.ctx[0]}set text(t){this.$$set({text:t}),b()}get button(){return this.$$.ctx[1]}set button(t){this.$$set({button:t}),b()}get clientstyling(){return this.$$.ctx[4]}set clientstyling(t){this.$$set({clientstyling:t}),b()}get clientstylingurl(){return this.$$.ctx[5]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),b()}}gt(q,{text:{},button:{},clientstyling:{},clientstylingurl:{}},[],[],!0);exports.default=q;
@@ -1,578 +0,0 @@
1
- var q = Object.defineProperty, G = Object.defineProperties;
2
- var K = Object.getOwnPropertyDescriptors;
3
- var B = Object.getOwnPropertySymbols;
4
- var Q = Object.prototype.hasOwnProperty, W = Object.prototype.propertyIsEnumerable;
5
- var N = (e, t, n) => t in e ? q(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, M = (e, t) => {
6
- for (var n in t || (t = {}))
7
- Q.call(t, n) && N(e, n, t[n]);
8
- if (B)
9
- for (var n of B(t))
10
- W.call(t, n) && N(e, n, t[n]);
11
- return e;
12
- }, R = (e, t) => G(e, K(t));
13
- var a = (e, t, n) => N(e, typeof t != "symbol" ? t + "" : t, n);
14
- var T = (e, t, n) => new Promise((s, r) => {
15
- var i = (u) => {
16
- try {
17
- c(n.next(u));
18
- } catch (o) {
19
- r(o);
20
- }
21
- }, l = (u) => {
22
- try {
23
- c(n.throw(u));
24
- } catch (o) {
25
- r(o);
26
- }
27
- }, c = (u) => u.done ? s(u.value) : Promise.resolve(u.value).then(i, l);
28
- c((n = n.apply(e, t)).next());
29
- });
30
- function C() {
31
- }
32
- function U(e) {
33
- return e();
34
- }
35
- function z() {
36
- return /* @__PURE__ */ Object.create(null);
37
- }
38
- function k(e) {
39
- e.forEach(U);
40
- }
41
- function D(e) {
42
- return typeof e == "function";
43
- }
44
- function X(e, t) {
45
- return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
46
- }
47
- function Y(e) {
48
- return Object.keys(e).length === 0;
49
- }
50
- function _(e, t) {
51
- e.appendChild(t);
52
- }
53
- function Z(e, t, n) {
54
- const s = tt(e);
55
- if (!s.getElementById(t)) {
56
- const r = w("style");
57
- r.id = t, r.textContent = n, et(s, r);
58
- }
59
- }
60
- function tt(e) {
61
- if (!e) return document;
62
- const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
63
- return t && /** @type {ShadowRoot} */
64
- t.host ? (
65
- /** @type {ShadowRoot} */
66
- t
67
- ) : e.ownerDocument;
68
- }
69
- function et(e, t) {
70
- return _(
71
- /** @type {Document} */
72
- e.head || e,
73
- t
74
- ), t.sheet;
75
- }
76
- function J(e, t, n) {
77
- e.insertBefore(t, n || null);
78
- }
79
- function A(e) {
80
- e.parentNode && e.parentNode.removeChild(e);
81
- }
82
- function w(e) {
83
- return document.createElement(e);
84
- }
85
- function L(e) {
86
- return document.createTextNode(e);
87
- }
88
- function nt() {
89
- return L(" ");
90
- }
91
- function it(e, t, n, s) {
92
- return e.addEventListener(t, n, s), () => e.removeEventListener(t, n, s);
93
- }
94
- function V(e, t, n) {
95
- n == null ? e.removeAttribute(t) : e.getAttribute(t) !== n && e.setAttribute(t, n);
96
- }
97
- function st(e) {
98
- return Array.from(e.childNodes);
99
- }
100
- function H(e, t) {
101
- t = "" + t, e.data !== t && (e.data = /** @type {string} */
102
- t);
103
- }
104
- function rt(e) {
105
- const t = {};
106
- return e.childNodes.forEach(
107
- /** @param {Element} node */
108
- (n) => {
109
- t[n.slot || "default"] = !0;
110
- }
111
- ), t;
112
- }
113
- let P;
114
- function x(e) {
115
- P = e;
116
- }
117
- const g = [], O = [];
118
- let y = [];
119
- const I = [], ot = /* @__PURE__ */ Promise.resolve();
120
- let j = !1;
121
- function ct() {
122
- j || (j = !0, ot.then(b));
123
- }
124
- function S(e) {
125
- y.push(e);
126
- }
127
- const v = /* @__PURE__ */ new Set();
128
- let m = 0;
129
- function b() {
130
- if (m !== 0)
131
- return;
132
- const e = P;
133
- do {
134
- try {
135
- for (; m < g.length; ) {
136
- const t = g[m];
137
- m++, x(t), lt(t.$$);
138
- }
139
- } catch (t) {
140
- throw g.length = 0, m = 0, t;
141
- }
142
- for (x(null), g.length = 0, m = 0; O.length; ) O.pop()();
143
- for (let t = 0; t < y.length; t += 1) {
144
- const n = y[t];
145
- v.has(n) || (v.add(n), n());
146
- }
147
- y.length = 0;
148
- } while (g.length);
149
- for (; I.length; )
150
- I.pop()();
151
- j = !1, v.clear(), x(e);
152
- }
153
- function lt(e) {
154
- if (e.fragment !== null) {
155
- e.update(), k(e.before_update);
156
- const t = e.dirty;
157
- e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(S);
158
- }
159
- }
160
- function ut(e) {
161
- const t = [], n = [];
162
- y.forEach((s) => e.indexOf(s) === -1 ? t.push(s) : n.push(s)), n.forEach((s) => s()), y = t;
163
- }
164
- const ft = /* @__PURE__ */ new Set();
165
- function at(e, t) {
166
- e && e.i && (ft.delete(e), e.i(t));
167
- }
168
- function $t(e, t, n) {
169
- const { fragment: s, after_update: r } = e.$$;
170
- s && s.m(t, n), S(() => {
171
- const i = e.$$.on_mount.map(U).filter(D);
172
- e.$$.on_destroy ? e.$$.on_destroy.push(...i) : k(i), e.$$.on_mount = [];
173
- }), r.forEach(S);
174
- }
175
- function ht(e, t) {
176
- const n = e.$$;
177
- n.fragment !== null && (ut(n.after_update), k(n.on_destroy), n.fragment && n.fragment.d(t), n.on_destroy = n.fragment = null, n.ctx = []);
178
- }
179
- function dt(e, t) {
180
- e.$$.dirty[0] === -1 && (g.push(e), ct(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
181
- }
182
- function mt(e, t, n, s, r, i, l = null, c = [-1]) {
183
- const u = P;
184
- x(e);
185
- const o = e.$$ = {
186
- fragment: null,
187
- ctx: [],
188
- // state
189
- props: i,
190
- update: C,
191
- not_equal: r,
192
- bound: z(),
193
- // lifecycle
194
- on_mount: [],
195
- on_destroy: [],
196
- on_disconnect: [],
197
- before_update: [],
198
- after_update: [],
199
- context: new Map(t.context || (u ? u.$$.context : [])),
200
- // everything else
201
- callbacks: z(),
202
- dirty: c,
203
- skip_bound: !1,
204
- root: t.target || u.$$.root
205
- };
206
- l && l(o.root);
207
- let $ = !1;
208
- if (o.ctx = n(e, t.props || {}, (h, f, ...p) => {
209
- const d = p.length ? p[0] : f;
210
- return o.ctx && r(o.ctx[h], o.ctx[h] = d) && (!o.skip_bound && o.bound[h] && o.bound[h](d), $ && dt(e, h)), f;
211
- }), o.update(), $ = !0, k(o.before_update), o.fragment = s(o.ctx), t.target) {
212
- if (t.hydrate) {
213
- const h = st(t.target);
214
- o.fragment && o.fragment.l(h), h.forEach(A);
215
- } else
216
- o.fragment && o.fragment.c();
217
- t.intro && at(e.$$.fragment), $t(e, t.target, t.anchor), b();
218
- }
219
- x(u);
220
- }
221
- let F;
222
- typeof HTMLElement == "function" && (F = class extends HTMLElement {
223
- constructor(t, n, s) {
224
- super();
225
- /** The Svelte component constructor */
226
- a(this, "$$ctor");
227
- /** Slots */
228
- a(this, "$$s");
229
- /** The Svelte component instance */
230
- a(this, "$$c");
231
- /** Whether or not the custom element is connected */
232
- a(this, "$$cn", !1);
233
- /** Component props data */
234
- a(this, "$$d", {});
235
- /** `true` if currently in the process of reflecting component props back to attributes */
236
- a(this, "$$r", !1);
237
- /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
238
- a(this, "$$p_d", {});
239
- /** @type {Record<string, Function[]>} Event listeners */
240
- a(this, "$$l", {});
241
- /** @type {Map<Function, Function>} Event listener unsubscribe functions */
242
- a(this, "$$l_u", /* @__PURE__ */ new Map());
243
- this.$$ctor = t, this.$$s = n, s && this.attachShadow({ mode: "open" });
244
- }
245
- addEventListener(t, n, s) {
246
- if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(n), this.$$c) {
247
- const r = this.$$c.$on(t, n);
248
- this.$$l_u.set(n, r);
249
- }
250
- super.addEventListener(t, n, s);
251
- }
252
- removeEventListener(t, n, s) {
253
- if (super.removeEventListener(t, n, s), this.$$c) {
254
- const r = this.$$l_u.get(n);
255
- r && (r(), this.$$l_u.delete(n));
256
- }
257
- }
258
- connectedCallback() {
259
- return T(this, null, function* () {
260
- if (this.$$cn = !0, !this.$$c) {
261
- let t = function(i) {
262
- return () => {
263
- let l;
264
- return {
265
- c: function() {
266
- l = w("slot"), i !== "default" && V(l, "name", i);
267
- },
268
- /**
269
- * @param {HTMLElement} target
270
- * @param {HTMLElement} [anchor]
271
- */
272
- m: function(o, $) {
273
- J(o, l, $);
274
- },
275
- d: function(o) {
276
- o && A(l);
277
- }
278
- };
279
- };
280
- };
281
- if (yield Promise.resolve(), !this.$$cn || this.$$c)
282
- return;
283
- const n = {}, s = rt(this);
284
- for (const i of this.$$s)
285
- i in s && (n[i] = [t(i)]);
286
- for (const i of this.attributes) {
287
- const l = this.$$g_p(i.name);
288
- l in this.$$d || (this.$$d[l] = E(l, i.value, this.$$p_d, "toProp"));
289
- }
290
- for (const i in this.$$p_d)
291
- !(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
292
- this.$$c = new this.$$ctor({
293
- target: this.shadowRoot || this,
294
- props: R(M({}, this.$$d), {
295
- $$slots: n,
296
- $$scope: {
297
- ctx: []
298
- }
299
- })
300
- });
301
- const r = () => {
302
- this.$$r = !0;
303
- for (const i in this.$$p_d)
304
- if (this.$$d[i] = this.$$c.$$.ctx[this.$$c.$$.props[i]], this.$$p_d[i].reflect) {
305
- const l = E(
306
- i,
307
- this.$$d[i],
308
- this.$$p_d,
309
- "toAttribute"
310
- );
311
- l == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, l);
312
- }
313
- this.$$r = !1;
314
- };
315
- this.$$c.$$.after_update.push(r), r();
316
- for (const i in this.$$l)
317
- for (const l of this.$$l[i]) {
318
- const c = this.$$c.$on(i, l);
319
- this.$$l_u.set(l, c);
320
- }
321
- this.$$l = {};
322
- }
323
- });
324
- }
325
- // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
326
- // and setting attributes through setAttribute etc, this is helpful
327
- attributeChangedCallback(t, n, s) {
328
- var r;
329
- this.$$r || (t = this.$$g_p(t), this.$$d[t] = E(t, s, this.$$p_d, "toProp"), (r = this.$$c) == null || r.$set({ [t]: this.$$d[t] }));
330
- }
331
- disconnectedCallback() {
332
- this.$$cn = !1, Promise.resolve().then(() => {
333
- !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
334
- });
335
- }
336
- $$g_p(t) {
337
- return Object.keys(this.$$p_d).find(
338
- (n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
339
- ) || t;
340
- }
341
- });
342
- function E(e, t, n, s) {
343
- var i;
344
- const r = (i = n[e]) == null ? void 0 : i.type;
345
- if (t = r === "Boolean" && typeof t != "boolean" ? t != null : t, !s || !n[e])
346
- return t;
347
- if (s === "toAttribute")
348
- switch (r) {
349
- case "Object":
350
- case "Array":
351
- return t == null ? null : JSON.stringify(t);
352
- case "Boolean":
353
- return t ? "" : null;
354
- case "Number":
355
- return t == null ? null : t;
356
- default:
357
- return t;
358
- }
359
- else
360
- switch (r) {
361
- case "Object":
362
- case "Array":
363
- return t && JSON.parse(t);
364
- case "Boolean":
365
- return t;
366
- case "Number":
367
- return t != null ? +t : t;
368
- default:
369
- return t;
370
- }
371
- }
372
- function _t(e, t, n, s, r, i) {
373
- let l = class extends F {
374
- constructor() {
375
- super(e, n, r), this.$$p_d = t;
376
- }
377
- static get observedAttributes() {
378
- return Object.keys(t).map(
379
- (c) => (t[c].attribute || c).toLowerCase()
380
- );
381
- }
382
- };
383
- return Object.keys(t).forEach((c) => {
384
- Object.defineProperty(l.prototype, c, {
385
- get() {
386
- return this.$$c && c in this.$$c ? this.$$c[c] : this.$$d[c];
387
- },
388
- set(u) {
389
- var o;
390
- u = E(c, u, t), this.$$d[c] = u, (o = this.$$c) == null || o.$set({ [c]: u });
391
- }
392
- });
393
- }), s.forEach((c) => {
394
- Object.defineProperty(l.prototype, c, {
395
- get() {
396
- var u;
397
- return (u = this.$$c) == null ? void 0 : u[c];
398
- }
399
- });
400
- }), e.element = /** @type {any} */
401
- l, l;
402
- }
403
- class gt {
404
- constructor() {
405
- /**
406
- * ### PRIVATE API
407
- *
408
- * Do not use, may change at any time
409
- *
410
- * @type {any}
411
- */
412
- a(this, "$$");
413
- /**
414
- * ### PRIVATE API
415
- *
416
- * Do not use, may change at any time
417
- *
418
- * @type {any}
419
- */
420
- a(this, "$$set");
421
- }
422
- /** @returns {void} */
423
- $destroy() {
424
- ht(this, 1), this.$destroy = C;
425
- }
426
- /**
427
- * @template {Extract<keyof Events, string>} K
428
- * @param {K} type
429
- * @param {((e: Events[K]) => void) | null | undefined} callback
430
- * @returns {() => void}
431
- */
432
- $on(t, n) {
433
- if (!D(n))
434
- return C;
435
- const s = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
436
- return s.push(n), () => {
437
- const r = s.indexOf(n);
438
- r !== -1 && s.splice(r, 1);
439
- };
440
- }
441
- /**
442
- * @param {Partial<Props>} props
443
- * @returns {void}
444
- */
445
- $set(t) {
446
- this.$$set && !Y(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
447
- }
448
- }
449
- const bt = "4";
450
- typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(bt);
451
- function yt(e) {
452
- Z(e, "svelte-ags340", ".CashierNotifications{position:absolute;z-index:2;background-color:var(--emw--color-background, #111);color:var(--emw--color-white, #fff);display:flex;border-radius:var(--emw--border-radius-medium, 4px);align-items:center;gap:var(--emw--spacing-small, 12px);font-size:var(--emw--font-size-small, 14px);padding:var(--emw--spacing-small, 12px) var(--emw--spacing-medium, 15px);min-height:50px;pointer-events:auto;bottom:0;width:calc(100% - 30px)}.CashierNotifications span,.CashierNotifications button{font-family:inherit;border:none;font-variant:normal}.CashierNotifications span{line-height:normal}.CashierNotifications button{color:var(--emw--color-primary, #7EC51E);background-color:transparent;cursor:pointer;font-size:var(--emw--font-size-medium, 16px);font-style:normal;font-weight:var(--emw--font-weight-bold, 700);font-family:inherit}");
453
- }
454
- function pt(e) {
455
- let t, n, s, r, i, l, c, u;
456
- return {
457
- c() {
458
- t = w("div"), n = w("span"), s = L(
459
- /*text*/
460
- e[0]
461
- ), r = nt(), i = w("button"), l = L(
462
- /*button*/
463
- e[1]
464
- ), V(t, "class", "CashierNotifications");
465
- },
466
- m(o, $) {
467
- J(o, t, $), _(t, n), _(n, s), _(t, r), _(t, i), _(i, l), e[6](t), c || (u = it(
468
- i,
469
- "click",
470
- /*notificationClick*/
471
- e[3]
472
- ), c = !0);
473
- },
474
- p(o, [$]) {
475
- $ & /*text*/
476
- 1 && H(
477
- s,
478
- /*text*/
479
- o[0]
480
- ), $ & /*button*/
481
- 2 && H(
482
- l,
483
- /*button*/
484
- o[1]
485
- );
486
- },
487
- i: C,
488
- o: C,
489
- d(o) {
490
- o && A(t), e[6](null), c = !1, u();
491
- }
492
- };
493
- }
494
- function wt(e, t, n) {
495
- let { text: s } = t, { button: r } = t, { clientstyling: i = "" } = t, { clientstylingurl: l = "" } = t, c;
496
- const u = () => {
497
- window.postMessage({ type: "NotificationButtonClick" }, window.location.href);
498
- }, o = () => {
499
- let f = document.createElement("style");
500
- f.innerHTML = i, c.appendChild(f);
501
- }, $ = () => {
502
- let f = new URL(l), p = document.createElement("style");
503
- fetch(f.href).then((d) => d.text()).then((d) => {
504
- p.innerHTML = d, setTimeout(
505
- () => {
506
- c.appendChild(p);
507
- },
508
- 1
509
- );
510
- });
511
- };
512
- function h(f) {
513
- O[f ? "unshift" : "push"](() => {
514
- c = f, n(2, c);
515
- });
516
- }
517
- return e.$$set = (f) => {
518
- "text" in f && n(0, s = f.text), "button" in f && n(1, r = f.button), "clientstyling" in f && n(4, i = f.clientstyling), "clientstylingurl" in f && n(5, l = f.clientstylingurl);
519
- }, e.$$.update = () => {
520
- e.$$.dirty & /*clientstyling, customStylingContainer*/
521
- 20 && i && c && o(), e.$$.dirty & /*clientstylingurl, customStylingContainer*/
522
- 36 && l && c && $();
523
- }, [
524
- s,
525
- r,
526
- c,
527
- u,
528
- i,
529
- l,
530
- h
531
- ];
532
- }
533
- class xt extends gt {
534
- constructor(t) {
535
- super(), mt(
536
- this,
537
- t,
538
- wt,
539
- pt,
540
- X,
541
- {
542
- text: 0,
543
- button: 1,
544
- clientstyling: 4,
545
- clientstylingurl: 5
546
- },
547
- yt
548
- );
549
- }
550
- get text() {
551
- return this.$$.ctx[0];
552
- }
553
- set text(t) {
554
- this.$$set({ text: t }), b();
555
- }
556
- get button() {
557
- return this.$$.ctx[1];
558
- }
559
- set button(t) {
560
- this.$$set({ button: t }), b();
561
- }
562
- get clientstyling() {
563
- return this.$$.ctx[4];
564
- }
565
- set clientstyling(t) {
566
- this.$$set({ clientstyling: t }), b();
567
- }
568
- get clientstylingurl() {
569
- return this.$$.ctx[5];
570
- }
571
- set clientstylingurl(t) {
572
- this.$$set({ clientstylingurl: t }), b();
573
- }
574
- }
575
- _t(xt, { text: {}, button: {}, clientstyling: {}, clientstylingurl: {} }, [], [], !0);
576
- export {
577
- xt as default
578
- };
@@ -1 +0,0 @@
1
- "use strict";if(typeof window!="undefined"){let n=function(t){return function(...s){try{return t.apply(this,s)}catch(e){if(e instanceof DOMException&&e.message.includes("has already been used with this registry")||e.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw e}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CashierNotifications-CEdaYmWT.cjs")).then(({default:t})=>{!customElements.get("cashier-notifications")&&customElements.define("cashier-notifications",t.element)})}
@@ -1,16 +0,0 @@
1
- if (typeof window != "undefined") {
2
- let n = function(t) {
3
- return function(...i) {
4
- try {
5
- return t.apply(this, i);
6
- } catch (e) {
7
- if (e instanceof DOMException && e.message.includes("has already been used with this registry") || e.message.includes("Cannot define multiple custom elements with the same tag name"))
8
- return !1;
9
- throw e;
10
- }
11
- };
12
- };
13
- customElements.define = n(customElements.define), import("../components/CashierNotifications-DmhVrOLQ.js").then(({ default: t }) => {
14
- !customElements.get("cashier-notifications") && customElements.define("cashier-notifications", t.element);
15
- });
16
- }