@everymatrix/cashier-notifications 1.56.0 → 1.56.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.
- package/components/{CashierNotifications-CmHlulIS.js → CashierNotifications-8aSVSsOy.js} +4 -2
- package/components/{CashierNotifications-CNLg0egE.js → CashierNotifications-BZhPgxne.js} +5 -3
- package/components/CashierNotifications-D7Kpkby5.cjs +1 -0
- package/es2015/cashier-notifications.cjs +1 -1
- package/es2015/cashier-notifications.js +1 -1
- package/esnext/cashier-notifications.js +1 -1
- package/package.json +1 -1
- package/components/CashierNotifications-C1Vt08LK.cjs +0 -1
|
@@ -29,7 +29,8 @@ function D(e, t, n) {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
function J(e) {
|
|
32
|
-
if (!e)
|
|
32
|
+
if (!e)
|
|
33
|
+
return document;
|
|
33
34
|
const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
|
|
34
35
|
return t && /** @type {ShadowRoot} */
|
|
35
36
|
t.host ? (
|
|
@@ -110,7 +111,8 @@ function g() {
|
|
|
110
111
|
} catch (t) {
|
|
111
112
|
throw _.length = 0, d = 0, t;
|
|
112
113
|
}
|
|
113
|
-
for (w(null), _.length = 0, d = 0; v.length; )
|
|
114
|
+
for (w(null), _.length = 0, d = 0; v.length; )
|
|
115
|
+
v.pop()();
|
|
114
116
|
for (let t = 0; t < b.length; t += 1) {
|
|
115
117
|
const n = b[t];
|
|
116
118
|
k.has(n) || (k.add(n), n());
|
|
@@ -10,7 +10,7 @@ var N = (e, t, n) => t in e ? q(e, t, { enumerable: !0, configurable: !0, writab
|
|
|
10
10
|
W.call(t, n) && N(e, n, t[n]);
|
|
11
11
|
return e;
|
|
12
12
|
}, R = (e, t) => G(e, K(t));
|
|
13
|
-
var a = (e, t, n) => N(e, typeof t != "symbol" ? t + "" : t, n);
|
|
13
|
+
var a = (e, t, n) => (N(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
14
14
|
var T = (e, t, n) => new Promise((s, r) => {
|
|
15
15
|
var i = (u) => {
|
|
16
16
|
try {
|
|
@@ -58,7 +58,8 @@ function Z(e, t, n) {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
function tt(e) {
|
|
61
|
-
if (!e)
|
|
61
|
+
if (!e)
|
|
62
|
+
return document;
|
|
62
63
|
const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
|
|
63
64
|
return t && /** @type {ShadowRoot} */
|
|
64
65
|
t.host ? (
|
|
@@ -139,7 +140,8 @@ function b() {
|
|
|
139
140
|
} catch (t) {
|
|
140
141
|
throw g.length = 0, m = 0, t;
|
|
141
142
|
}
|
|
142
|
-
for (x(null), g.length = 0, m = 0; O.length; )
|
|
143
|
+
for (x(null), g.length = 0, m = 0; O.length; )
|
|
144
|
+
O.pop()();
|
|
143
145
|
for (let t = 0; t < y.length; t += 1) {
|
|
144
146
|
const n = y[t];
|
|
145
147
|
v.has(n) || (v.add(n), n());
|
|
@@ -0,0 +1 @@
|
|
|
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),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?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?s(o.ctx):!1,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 +1 @@
|
|
|
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-
|
|
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-D7Kpkby5.cjs")).then(({default:t})=>{!customElements.get("cashier-notifications")&&customElements.define("cashier-notifications",t.element)})}
|
|
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
|
|
|
10
10
|
}
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
customElements.define = n(customElements.define), import("../components/CashierNotifications-
|
|
13
|
+
customElements.define = n(customElements.define), import("../components/CashierNotifications-BZhPgxne.js").then(({ default: t }) => {
|
|
14
14
|
!customElements.get("cashier-notifications") && customElements.define("cashier-notifications", t.element);
|
|
15
15
|
});
|
|
16
16
|
}
|
package/package.json
CHANGED
|
@@ -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?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?s(o.ctx):!1,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;
|