@everymatrix/cashier-method-details 1.43.4 → 1.45.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/components/CashierConfirmModal-B-t1-wAt.js +1063 -0
  2. package/components/CashierConfirmModal-O8Y6vOPF.cjs +4 -0
  3. package/components/CashierError-CnDiY61e.cjs +5 -0
  4. package/components/CashierError-DaumM6Zr.js +3758 -0
  5. package/components/CashierHeader-4ARwc1sM.cjs +1 -0
  6. package/components/CashierHeader-CYcLko5g.js +361 -0
  7. package/components/CashierIframeRedirect-BOPLcueW.cjs +1 -0
  8. package/components/CashierIframeRedirect-Bilctj-5.js +384 -0
  9. package/components/CashierMethodDetails-7O4DrJHq.cjs +18 -0
  10. package/components/CashierMethodDetails-CJU3RjOA.js +8096 -0
  11. package/components/CashierModal-CdNYc0Aj.js +220 -0
  12. package/components/CashierModal-DjXj2L6b.cjs +1 -0
  13. package/components/CashierNotifications-BVX2JvTh.cjs +1 -0
  14. package/components/CashierNotifications-DOgyzpyH.js +136 -0
  15. package/components/CashierReceiptPage-D9_BjYHP.cjs +1 -0
  16. package/components/CashierReceiptPage-DT7FhfRz.js +1093 -0
  17. package/components/CashierSpinner-BUe-mWNE.js +71 -0
  18. package/components/CashierSpinner-C7awkOxo.cjs +1 -0
  19. package/es2015/cashier-method-details.cjs +1 -0
  20. package/es2015/cashier-method-details.js +16 -0
  21. package/package.json +22 -32
  22. package/CHANGELOG.md +0 -35
  23. package/README.md +0 -30
  24. package/dist/cashier-method-details.js +0 -875
  25. package/dist/cashier-method-details.js.map +0 -1
  26. package/index.html +0 -36
  27. package/index.js +0 -1
  28. package/public/favicon.png +0 -0
  29. package/public/reset.css +0 -48
  30. package/rollup.config.js +0 -65
  31. package/src/CashierMethodDetails.svelte +0 -1539
  32. package/src/CashierMethodDetails.types.ts +0 -68
  33. package/src/i18n.js +0 -32
  34. package/src/index.ts +0 -4
  35. package/src/translations.js +0 -46
  36. package/stories/CashierMethodDetails.stories.js +0 -13
  37. package/tsconfig.json +0 -6
@@ -0,0 +1,220 @@
1
+ import { R as j, S as q, b as B, f as m, c as F, a as G, d as N, x as A, k as H, t as w, p as b, q as I, v as L, H as J, e as K, g as y, j as f, G as C, l as M, T as O, u as P, m as Q, o as V, U as k, B as X, C as S } from "./CashierConfirmModal-B-t1-wAt.js";
2
+ function z(i, { delay: t = 0, duration: e = 400, easing: n = j } = {}) {
3
+ const r = +getComputedStyle(i).opacity;
4
+ return {
5
+ delay: t,
6
+ duration: e,
7
+ easing: n,
8
+ css: (s) => `opacity: ${s * r}`
9
+ };
10
+ }
11
+ function Y(i) {
12
+ N(i, "svelte-1mtwlr2", ".svelte-1mtwlr2.svelte-1mtwlr2,.svelte-1mtwlr2.svelte-1mtwlr2::before,.svelte-1mtwlr2.svelte-1mtwlr2::after{margin:0;padding:0;box-sizing:border-box}.ModalWindow.svelte-1mtwlr2.svelte-1mtwlr2{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.svelte-1mtwlr2.svelte-1mtwlr2{background:var(--emw--color-white, #fff);border-radius:var(--emw--border-radius-medium, 4px);padding:var(--emw--spacing-large, 20px);width:400px}@container modal-window (max-width:750px){.ModalWindow.svelte-1mtwlr2 .ModalContainer.svelte-1mtwlr2{width:90%;max-width:400px}}");
13
+ }
14
+ function E(i) {
15
+ let t, e, n, r, s, d;
16
+ const h = (
17
+ /*#slots*/
18
+ i[9].default
19
+ ), o = K(
20
+ h,
21
+ i,
22
+ /*$$scope*/
23
+ i[8],
24
+ null
25
+ );
26
+ return {
27
+ c() {
28
+ t = y("div"), e = y("div"), n = y("div"), o && o.c(), f(n, "class", "ModalContainer svelte-1mtwlr2"), f(n, "part", "ModalContainer"), f(e, "class", "ModalWindow svelte-1mtwlr2"), f(e, "part", "ModalWindow"), f(e, "id", "Modal"), C(() => (
29
+ /*div1_elementresize_handler*/
30
+ i[11].call(e)
31
+ )), f(t, "part", "CustomStylingContainer"), f(t, "class", "svelte-1mtwlr2");
32
+ },
33
+ m(a, u) {
34
+ H(a, t, u), M(t, e), M(e, n), o && o.m(n, null), i[10](e), r = O(
35
+ e,
36
+ /*div1_elementresize_handler*/
37
+ i[11].bind(e)
38
+ ), i[12](t), d = !0;
39
+ },
40
+ p(a, u) {
41
+ i = a, o && o.p && (!d || u & /*$$scope*/
42
+ 256) && P(
43
+ o,
44
+ h,
45
+ i,
46
+ /*$$scope*/
47
+ i[8],
48
+ d ? V(
49
+ h,
50
+ /*$$scope*/
51
+ i[8],
52
+ u,
53
+ null
54
+ ) : Q(
55
+ /*$$scope*/
56
+ i[8]
57
+ ),
58
+ null
59
+ );
60
+ },
61
+ i(a) {
62
+ d || (w(o, a), a && C(() => {
63
+ d && (s || (s = k(e, z, { transitionDuration: (
64
+ /*duration*/
65
+ i[2]
66
+ ) }, !0)), s.run(1));
67
+ }), d = !0);
68
+ },
69
+ o(a) {
70
+ b(o, a), a && (s || (s = k(e, z, { transitionDuration: (
71
+ /*duration*/
72
+ i[2]
73
+ ) }, !1)), s.run(0)), d = !1;
74
+ },
75
+ d(a) {
76
+ a && L(t), o && o.d(a), i[10](null), r(), a && s && s.end(), i[12](null);
77
+ }
78
+ };
79
+ }
80
+ function Z(i) {
81
+ let t, e, n = (
82
+ /*show*/
83
+ i[5] && E(i)
84
+ );
85
+ return {
86
+ c() {
87
+ n && n.c(), t = A();
88
+ },
89
+ m(r, s) {
90
+ n && n.m(r, s), H(r, t, s), e = !0;
91
+ },
92
+ p(r, [s]) {
93
+ /*show*/
94
+ r[5] ? n ? (n.p(r, s), s & /*show*/
95
+ 32 && w(n, 1)) : (n = E(r), n.c(), w(n, 1), n.m(t.parentNode, t)) : n && (X(), b(n, 1, 1, () => {
96
+ n = null;
97
+ }), I());
98
+ },
99
+ i(r) {
100
+ e || (w(n), e = !0);
101
+ },
102
+ o(r) {
103
+ b(n), e = !1;
104
+ },
105
+ d(r) {
106
+ r && L(t), n && n.d(r);
107
+ }
108
+ };
109
+ }
110
+ function $(i, t, e) {
111
+ let { $$slots: n = {}, $$scope: r } = t, { clientstyling: s = "" } = t, { clientstylingurl: d = "" } = t, { duration: h = "5ms" } = t, { width: o } = t, { height: a } = t, u, c, g = !1;
112
+ const W = () => {
113
+ e(5, g = !1), window.postMessage({ type: "ClosedCashierModal" }, window.location.href), window.postMessage({ type: "EnableScroll" }, window.location.href);
114
+ }, p = (l) => {
115
+ l.data.type == "ShowCashierModal" && (e(5, g = !0), window.postMessage({ type: "DisableScroll" }, window.location.href)), l.data.type == "HideCashierModal" && W();
116
+ }, T = () => {
117
+ let l = document.createElement("style");
118
+ l.innerHTML = s, c.appendChild(l);
119
+ }, x = () => {
120
+ let l = new URL(d), v = document.createElement("style");
121
+ fetch(l.href).then((_) => _.text()).then((_) => {
122
+ v.innerHTML = _, setTimeout(
123
+ () => {
124
+ c.appendChild(v);
125
+ },
126
+ 1
127
+ );
128
+ });
129
+ };
130
+ J(() => (window.addEventListener("message", p, !1), () => {
131
+ window.removeEventListener("message", p);
132
+ }));
133
+ function D(l) {
134
+ S[l ? "unshift" : "push"](() => {
135
+ u = l, e(4, u);
136
+ });
137
+ }
138
+ function R() {
139
+ o = this.clientWidth, a = this.clientHeight, e(0, o), e(1, a);
140
+ }
141
+ function U(l) {
142
+ S[l ? "unshift" : "push"](() => {
143
+ c = l, e(3, c);
144
+ });
145
+ }
146
+ return i.$$set = (l) => {
147
+ "clientstyling" in l && e(6, s = l.clientstyling), "clientstylingurl" in l && e(7, d = l.clientstylingurl), "duration" in l && e(2, h = l.duration), "width" in l && e(0, o = l.width), "height" in l && e(1, a = l.height), "$$scope" in l && e(8, r = l.$$scope);
148
+ }, i.$$.update = () => {
149
+ i.$$.dirty & /*clientstyling, customStylingContainer*/
150
+ 72 && s && c && T(), i.$$.dirty & /*clientstylingurl, customStylingContainer*/
151
+ 136 && d && c && x();
152
+ }, [
153
+ o,
154
+ a,
155
+ h,
156
+ c,
157
+ u,
158
+ g,
159
+ s,
160
+ d,
161
+ r,
162
+ n,
163
+ D,
164
+ R,
165
+ U
166
+ ];
167
+ }
168
+ class tt extends q {
169
+ constructor(t) {
170
+ super(), B(
171
+ this,
172
+ t,
173
+ $,
174
+ Z,
175
+ G,
176
+ {
177
+ clientstyling: 6,
178
+ clientstylingurl: 7,
179
+ duration: 2,
180
+ width: 0,
181
+ height: 1
182
+ },
183
+ Y
184
+ );
185
+ }
186
+ get clientstyling() {
187
+ return this.$$.ctx[6];
188
+ }
189
+ set clientstyling(t) {
190
+ this.$$set({ clientstyling: t }), m();
191
+ }
192
+ get clientstylingurl() {
193
+ return this.$$.ctx[7];
194
+ }
195
+ set clientstylingurl(t) {
196
+ this.$$set({ clientstylingurl: t }), m();
197
+ }
198
+ get duration() {
199
+ return this.$$.ctx[2];
200
+ }
201
+ set duration(t) {
202
+ this.$$set({ duration: t }), m();
203
+ }
204
+ get width() {
205
+ return this.$$.ctx[0];
206
+ }
207
+ set width(t) {
208
+ this.$$set({ width: t }), m();
209
+ }
210
+ get height() {
211
+ return this.$$.ctx[1];
212
+ }
213
+ set height(t) {
214
+ this.$$set({ height: t }), m();
215
+ }
216
+ }
217
+ F(tt, { clientstyling: {}, clientstylingurl: {}, duration: {}, width: {}, height: {} }, ["default"], [], !0);
218
+ export {
219
+ tt as default
220
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./CashierConfirmModal-O8Y6vOPF.cjs");function y(n,{delay:e=0,duration:i=400,easing:l=t.identity}={}){const o=+getComputedStyle(n).opacity;return{delay:e,duration:i,easing:l,css:s=>`opacity: ${s*o}`}}function E(n){t.append_styles(n,"svelte-1mtwlr2",".svelte-1mtwlr2.svelte-1mtwlr2,.svelte-1mtwlr2.svelte-1mtwlr2::before,.svelte-1mtwlr2.svelte-1mtwlr2::after{margin:0;padding:0;box-sizing:border-box}.ModalWindow.svelte-1mtwlr2.svelte-1mtwlr2{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.svelte-1mtwlr2.svelte-1mtwlr2{background:var(--emw--color-white, #fff);border-radius:var(--emw--border-radius-medium, 4px);padding:var(--emw--spacing-large, 20px);width:400px}@container modal-window (max-width:750px){.ModalWindow.svelte-1mtwlr2 .ModalContainer.svelte-1mtwlr2{width:90%;max-width:400px}}")}function b(n){let e,i,l,o,s,u;const h=n[9].default,d=t.create_slot(h,n,n[8],null);return{c(){e=t.element("div"),i=t.element("div"),l=t.element("div"),d&&d.c(),t.attr(l,"class","ModalContainer svelte-1mtwlr2"),t.attr(l,"part","ModalContainer"),t.attr(i,"class","ModalWindow svelte-1mtwlr2"),t.attr(i,"part","ModalWindow"),t.attr(i,"id","Modal"),t.add_render_callback(()=>n[11].call(i)),t.attr(e,"part","CustomStylingContainer"),t.attr(e,"class","svelte-1mtwlr2")},m(a,c){t.insert(a,e,c),t.append(e,i),t.append(i,l),d&&d.m(l,null),n[10](i),o=t.add_iframe_resize_listener(i,n[11].bind(i)),n[12](e),u=!0},p(a,c){n=a,d&&d.p&&(!u||c&256)&&t.update_slot_base(d,h,n,n[8],u?t.get_slot_changes(h,n[8],c,null):t.get_all_dirty_from_scope(n[8]),null)},i(a){u||(t.transition_in(d,a),a&&t.add_render_callback(()=>{u&&(s||(s=t.create_bidirectional_transition(i,y,{transitionDuration:n[2]},!0)),s.run(1))}),u=!0)},o(a){t.transition_out(d,a),a&&(s||(s=t.create_bidirectional_transition(i,y,{transitionDuration:n[2]},!1)),s.run(0)),u=!1},d(a){a&&t.detach(e),d&&d.d(a),n[10](null),o(),a&&s&&s.end(),n[12](null)}}}function L(n){let e,i,l=n[5]&&b(n);return{c(){l&&l.c(),e=t.empty()},m(o,s){l&&l.m(o,s),t.insert(o,e,s),i=!0},p(o,[s]){o[5]?l?(l.p(o,s),s&32&&t.transition_in(l,1)):(l=b(o),l.c(),t.transition_in(l,1),l.m(e.parentNode,e)):l&&(t.group_outros(),t.transition_out(l,1,1,()=>{l=null}),t.check_outros())},i(o){i||(t.transition_in(l),i=!0)},o(o){t.transition_out(l),i=!1},d(o){o&&t.detach(e),l&&l.d(o)}}}function H(n,e,i){let{$$slots:l={},$$scope:o}=e,{clientstyling:s=""}=e,{clientstylingurl:u=""}=e,{duration:h="5ms"}=e,{width:d}=e,{height:a}=e,c,f,m=!1;const v=()=>{i(5,m=!1),window.postMessage({type:"ClosedCashierModal"},window.location.href),window.postMessage({type:"EnableScroll"},window.location.href)},g=r=>{r.data.type=="ShowCashierModal"&&(i(5,m=!0),window.postMessage({type:"DisableScroll"},window.location.href)),r.data.type=="HideCashierModal"&&v()},M=()=>{let r=document.createElement("style");r.innerHTML=s,f.appendChild(r)},C=()=>{let r=new URL(u),_=document.createElement("style");fetch(r.href).then(w=>w.text()).then(w=>{_.innerHTML=w,setTimeout(()=>{f.appendChild(_)},1)})};t.onMount(()=>(window.addEventListener("message",g,!1),()=>{window.removeEventListener("message",g)}));function k(r){t.binding_callbacks[r?"unshift":"push"](()=>{c=r,i(4,c)})}function S(){d=this.clientWidth,a=this.clientHeight,i(0,d),i(1,a)}function z(r){t.binding_callbacks[r?"unshift":"push"](()=>{f=r,i(3,f)})}return n.$$set=r=>{"clientstyling"in r&&i(6,s=r.clientstyling),"clientstylingurl"in r&&i(7,u=r.clientstylingurl),"duration"in r&&i(2,h=r.duration),"width"in r&&i(0,d=r.width),"height"in r&&i(1,a=r.height),"$$scope"in r&&i(8,o=r.$$scope)},n.$$.update=()=>{n.$$.dirty&72&&s&&f&&M(),n.$$.dirty&136&&u&&f&&C()},[d,a,h,f,c,m,s,u,o,l,k,S,z]}class p extends t.SvelteComponent{constructor(e){super(),t.init(this,e,H,L,t.safe_not_equal,{clientstyling:6,clientstylingurl:7,duration:2,width:0,height:1},E)}get clientstyling(){return this.$$.ctx[6]}set clientstyling(e){this.$$set({clientstyling:e}),t.flush()}get clientstylingurl(){return this.$$.ctx[7]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),t.flush()}get duration(){return this.$$.ctx[2]}set duration(e){this.$$set({duration:e}),t.flush()}get width(){return this.$$.ctx[0]}set width(e){this.$$set({width:e}),t.flush()}get height(){return this.$$.ctx[1]}set height(e){this.$$set({height:e}),t.flush()}}t.create_custom_element(p,{clientstyling:{},clientstylingurl:{},duration:{},width:{},height:{}},["default"],[],!0);exports.default=p;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./CashierConfirmModal-O8Y6vOPF.cjs");function w(i){t.append_styles(i,"svelte-1d9ojqw",".CashierNotifications.svelte-1d9ojqw.svelte-1d9ojqw{position:fixed;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);padding:var(--emw--spacing-small, 12px) var(--emw--spacing-medium, 15px);min-height:50px;pointer-events:auto;bottom:0;width:calc(100% - 30px)}.CashierNotifications.svelte-1d9ojqw span.svelte-1d9ojqw,.CashierNotifications.svelte-1d9ojqw button.svelte-1d9ojqw{font-family:inherit;border:none;font-variant:normal}.CashierNotifications.svelte-1d9ojqw span.svelte-1d9ojqw{line-height:normal}.CashierNotifications.svelte-1d9ojqw button.svelte-1d9ojqw{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 b(i){let e,s,c,d,o,a,l,f;return{c(){e=t.element("div"),s=t.element("span"),c=t.text(i[0]),d=t.space(),o=t.element("button"),a=t.text(i[1]),t.attr(s,"class","svelte-1d9ojqw"),t.attr(o,"class","svelte-1d9ojqw"),t.attr(e,"class","CashierNotifications svelte-1d9ojqw")},m(r,u){t.insert(r,e,u),t.append(e,s),t.append(s,c),t.append(e,d),t.append(e,o),t.append(o,a),i[6](e),l||(f=t.listen(o,"click",i[3]),l=!0)},p(r,[u]){u&1&&t.set_data(c,r[0]),u&2&&t.set_data(a,r[1])},i:t.noop,o:t.noop,d(r){r&&t.detach(e),i[6](null),l=!1,f()}}}function y(i,e,s){let{text:c}=e,{button:d}=e,{clientstyling:o=""}=e,{clientstylingurl:a=""}=e,l;const f=()=>{dispatchEvent(new CustomEvent("notificationButtonClick",{bubbles:!0,cancelable:!0,composed:!0}))},r=()=>{let n=document.createElement("style");n.innerHTML=o,l.appendChild(n)},u=()=>{let n=new URL(a),h=document.createElement("style");fetch(n.href).then(m=>m.text()).then(m=>{h.innerHTML=m,setTimeout(()=>{l.appendChild(h)},1)})};function p(n){t.binding_callbacks[n?"unshift":"push"](()=>{l=n,s(2,l)})}return i.$$set=n=>{"text"in n&&s(0,c=n.text),"button"in n&&s(1,d=n.button),"clientstyling"in n&&s(4,o=n.clientstyling),"clientstylingurl"in n&&s(5,a=n.clientstylingurl)},i.$$.update=()=>{i.$$.dirty&20&&o&&l&&r(),i.$$.dirty&36&&a&&l&&u()},[c,d,l,f,o,a,p]}class g extends t.SvelteComponent{constructor(e){super(),t.init(this,e,y,b,t.safe_not_equal,{text:0,button:1,clientstyling:4,clientstylingurl:5},w)}get text(){return this.$$.ctx[0]}set text(e){this.$$set({text:e}),t.flush()}get button(){return this.$$.ctx[1]}set button(e){this.$$set({button:e}),t.flush()}get clientstyling(){return this.$$.ctx[4]}set clientstyling(e){this.$$set({clientstyling:e}),t.flush()}get clientstylingurl(){return this.$$.ctx[5]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),t.flush()}}t.create_custom_element(g,{text:{},button:{},clientstyling:{},clientstylingurl:{}},[],[],!0);exports.default=g;
@@ -0,0 +1,136 @@
1
+ import { S as C, b as j, f as m, c as q, a as _, d as k, g, y as v, h as N, j as w, k as E, l as d, A as S, z as y, n as p, v as z, C as L } from "./CashierConfirmModal-B-t1-wAt.js";
2
+ function T(n) {
3
+ k(n, "svelte-1d9ojqw", ".CashierNotifications.svelte-1d9ojqw.svelte-1d9ojqw{position:fixed;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);padding:var(--emw--spacing-small, 12px) var(--emw--spacing-medium, 15px);min-height:50px;pointer-events:auto;bottom:0;width:calc(100% - 30px)}.CashierNotifications.svelte-1d9ojqw span.svelte-1d9ojqw,.CashierNotifications.svelte-1d9ojqw button.svelte-1d9ojqw{font-family:inherit;border:none;font-variant:normal}.CashierNotifications.svelte-1d9ojqw span.svelte-1d9ojqw{line-height:normal}.CashierNotifications.svelte-1d9ojqw button.svelte-1d9ojqw{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}");
4
+ }
5
+ function H(n) {
6
+ let t, s, r, u, l, o, i, f;
7
+ return {
8
+ c() {
9
+ t = g("div"), s = g("span"), r = v(
10
+ /*text*/
11
+ n[0]
12
+ ), u = N(), l = g("button"), o = v(
13
+ /*button*/
14
+ n[1]
15
+ ), w(s, "class", "svelte-1d9ojqw"), w(l, "class", "svelte-1d9ojqw"), w(t, "class", "CashierNotifications svelte-1d9ojqw");
16
+ },
17
+ m(a, c) {
18
+ E(a, t, c), d(t, s), d(s, r), d(t, u), d(t, l), d(l, o), n[6](t), i || (f = S(
19
+ l,
20
+ "click",
21
+ /*notificationClick*/
22
+ n[3]
23
+ ), i = !0);
24
+ },
25
+ p(a, [c]) {
26
+ c & /*text*/
27
+ 1 && y(
28
+ r,
29
+ /*text*/
30
+ a[0]
31
+ ), c & /*button*/
32
+ 2 && y(
33
+ o,
34
+ /*button*/
35
+ a[1]
36
+ );
37
+ },
38
+ i: p,
39
+ o: p,
40
+ d(a) {
41
+ a && z(t), n[6](null), i = !1, f();
42
+ }
43
+ };
44
+ }
45
+ function M(n, t, s) {
46
+ let { text: r } = t, { button: u } = t, { clientstyling: l = "" } = t, { clientstylingurl: o = "" } = t, i;
47
+ const f = () => {
48
+ dispatchEvent(new CustomEvent(
49
+ "notificationButtonClick",
50
+ {
51
+ bubbles: !0,
52
+ cancelable: !0,
53
+ composed: !0
54
+ }
55
+ ));
56
+ }, a = () => {
57
+ let e = document.createElement("style");
58
+ e.innerHTML = l, i.appendChild(e);
59
+ }, c = () => {
60
+ let e = new URL(o), b = document.createElement("style");
61
+ fetch(e.href).then((h) => h.text()).then((h) => {
62
+ b.innerHTML = h, setTimeout(
63
+ () => {
64
+ i.appendChild(b);
65
+ },
66
+ 1
67
+ );
68
+ });
69
+ };
70
+ function x(e) {
71
+ L[e ? "unshift" : "push"](() => {
72
+ i = e, s(2, i);
73
+ });
74
+ }
75
+ return n.$$set = (e) => {
76
+ "text" in e && s(0, r = e.text), "button" in e && s(1, u = e.button), "clientstyling" in e && s(4, l = e.clientstyling), "clientstylingurl" in e && s(5, o = e.clientstylingurl);
77
+ }, n.$$.update = () => {
78
+ n.$$.dirty & /*clientstyling, customStylingContainer*/
79
+ 20 && l && i && a(), n.$$.dirty & /*clientstylingurl, customStylingContainer*/
80
+ 36 && o && i && c();
81
+ }, [
82
+ r,
83
+ u,
84
+ i,
85
+ f,
86
+ l,
87
+ o,
88
+ x
89
+ ];
90
+ }
91
+ class R extends C {
92
+ constructor(t) {
93
+ super(), j(
94
+ this,
95
+ t,
96
+ M,
97
+ H,
98
+ _,
99
+ {
100
+ text: 0,
101
+ button: 1,
102
+ clientstyling: 4,
103
+ clientstylingurl: 5
104
+ },
105
+ T
106
+ );
107
+ }
108
+ get text() {
109
+ return this.$$.ctx[0];
110
+ }
111
+ set text(t) {
112
+ this.$$set({ text: t }), m();
113
+ }
114
+ get button() {
115
+ return this.$$.ctx[1];
116
+ }
117
+ set button(t) {
118
+ this.$$set({ button: t }), m();
119
+ }
120
+ get clientstyling() {
121
+ return this.$$.ctx[4];
122
+ }
123
+ set clientstyling(t) {
124
+ this.$$set({ clientstyling: t }), m();
125
+ }
126
+ get clientstylingurl() {
127
+ return this.$$.ctx[5];
128
+ }
129
+ set clientstylingurl(t) {
130
+ this.$$set({ clientstylingurl: t }), m();
131
+ }
132
+ }
133
+ q(R, { text: {}, button: {}, clientstyling: {}, clientstylingurl: {} }, [], [], !0);
134
+ export {
135
+ R as default
136
+ };