@everymatrix/cashier-modal 1.99.57 → 1.99.59

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.
@@ -1,8 +1,7 @@
1
1
  function U() {
2
2
  }
3
3
  function Mt(t, e) {
4
- for (const n in e)
5
- t[n] = e[n];
4
+ for (const n in e) t[n] = e[n];
6
5
  return (
7
6
  /** @type {T & S} */
8
7
  t
@@ -76,8 +75,7 @@ function Lt(t, e, n) {
76
75
  }
77
76
  }
78
77
  function Et(t) {
79
- if (!t)
80
- return document;
78
+ if (!t) return document;
81
79
  const e = t.getRootNode ? t.getRootNode() : t.ownerDocument;
82
80
  return e && /** @type {ShadowRoot} */
83
81
  e.host ? (
@@ -170,8 +168,7 @@ function B(t) {
170
168
  N = t;
171
169
  }
172
170
  function It() {
173
- if (!N)
174
- throw new Error("Function called outside component initialization");
171
+ if (!N) throw new Error("Function called outside component initialization");
175
172
  return N;
176
173
  }
177
174
  function Bt(t) {
@@ -205,8 +202,7 @@ function M() {
205
202
  } catch (e) {
206
203
  throw O.length = 0, T = 0, e;
207
204
  }
208
- for (B(null), O.length = 0, T = 0; z.length; )
209
- z.pop()();
205
+ for (B(null), O.length = 0, T = 0; z.length; ) z.pop()();
210
206
  for (let e = 0; e < H.length; e += 1) {
211
207
  const n = H[e];
212
208
  K.has(n) || (K.add(n), n());
@@ -246,13 +242,11 @@ function A(t, e) {
246
242
  }
247
243
  function G(t, e, n, i) {
248
244
  if (t && t.o) {
249
- if (D.has(t))
250
- return;
245
+ if (D.has(t)) return;
251
246
  D.add(t), L.c.push(() => {
252
247
  D.delete(t), i && (n && t.d(1), i());
253
248
  }), t.o(e);
254
- } else
255
- i && i();
249
+ } else i && i();
256
250
  }
257
251
  function Dt(t, e, n) {
258
252
  const { fragment: i, after_update: o } = t.$$;
@@ -537,8 +531,7 @@ function Kt(t, e) {
537
531
  }
538
532
  }
539
533
  function Zt(t, e) {
540
- if (!t || !e)
541
- return;
534
+ if (!t || !e) return;
542
535
  const n = new URL(e);
543
536
  fetch(n.href).then((i) => i.text()).then((i) => {
544
537
  const o = document.createElement("style");
@@ -548,8 +541,7 @@ function Zt(t, e) {
548
541
  });
549
542
  }
550
543
  function qt(t, e, n, i = !1) {
551
- if (!window.emMessageBus)
552
- return;
544
+ if (!window.emMessageBus) return;
553
545
  if (!("adoptedStyleSheets" in Document.prototype) || !i)
554
546
  return n = Qt(t, e), n;
555
547
  window[j] || (window[j] = {}), n = Xt(t, e);
@@ -570,8 +562,7 @@ function Qt(t, e) {
570
562
  }
571
563
  function Xt(t, e) {
572
564
  return window.emMessageBus.subscribe(e, (n) => {
573
- if (!t)
574
- return;
565
+ if (!t) return;
575
566
  const i = t.getRootNode(), o = window[j];
576
567
  let s = o[e] && o[e].sheet;
577
568
  s ? o[e].refCount = o[e].refCount + 1 : (s = new CSSStyleSheet(), s.replaceSync(n), o[e] = {
@@ -808,8 +799,7 @@ function oe(t, e, n) {
808
799
  200
809
800
  ));
810
801
  }, J = async () => {
811
- if (!a || !f || S)
812
- return;
802
+ if (!a || !f || S) return;
813
803
  d && clearTimeout(p), S = !0;
814
804
  const c = a.offsetWidth, xt = a.offsetHeight;
815
805
  n(8, a.style.width = `${c}px`, a), n(8, a.style.height = `${xt}px`, a), a.offsetHeight, await V();
@@ -10,7 +10,7 @@ var K = (e, t, n) => t in e ? Ot(e, t, { enumerable: !0, configurable: !0, writa
10
10
  At.call(t, n) && K(e, n, t[n]);
11
11
  return e;
12
12
  }, it = (e, t) => jt(e, zt(t));
13
- var M = (e, t, n) => (K(e, typeof t != "symbol" ? t + "" : t, n), n);
13
+ var M = (e, t, n) => K(e, typeof t != "symbol" ? t + "" : t, n);
14
14
  var Z = (e, t, n) => new Promise((i, o) => {
15
15
  var s = (f) => {
16
16
  try {
@@ -30,8 +30,7 @@ var Z = (e, t, n) => new Promise((i, o) => {
30
30
  function Y() {
31
31
  }
32
32
  function It(e, t) {
33
- for (const n in t)
34
- e[n] = t[n];
33
+ for (const n in t) e[n] = t[n];
35
34
  return (
36
35
  /** @type {T & S} */
37
36
  e
@@ -105,8 +104,7 @@ function Wt(e, t, n) {
105
104
  }
106
105
  }
107
106
  function Rt(e) {
108
- if (!e)
109
- return document;
107
+ if (!e) return document;
110
108
  const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
111
109
  return t && /** @type {ShadowRoot} */
112
110
  t.host ? (
@@ -199,8 +197,7 @@ function N(e) {
199
197
  W = e;
200
198
  }
201
199
  function Jt() {
202
- if (!W)
203
- throw new Error("Function called outside component initialization");
200
+ if (!W) throw new Error("Function called outside component initialization");
204
201
  return W;
205
202
  }
206
203
  function Vt(e) {
@@ -234,8 +231,7 @@ function k() {
234
231
  } catch (t) {
235
232
  throw j.length = 0, O = 0, t;
236
233
  }
237
- for (N(null), j.length = 0, O = 0; H.length; )
238
- H.pop()();
234
+ for (N(null), j.length = 0, O = 0; H.length; ) H.pop()();
239
235
  for (let t = 0; t < A.length; t += 1) {
240
236
  const n = A[t];
241
237
  Q.has(n) || (Q.add(n), n());
@@ -275,13 +271,11 @@ function I(e, t) {
275
271
  }
276
272
  function J(e, t, n, i) {
277
273
  if (e && e.o) {
278
- if (F.has(e))
279
- return;
274
+ if (F.has(e)) return;
280
275
  F.add(e), E.c.push(() => {
281
276
  F.delete(e), i && (n && e.d(1), i());
282
277
  }), e.o(t);
283
- } else
284
- i && i();
278
+ } else i && i();
285
279
  }
286
280
  function Xt(e, t, n) {
287
281
  const { fragment: i, after_update: o } = e.$$;
@@ -574,8 +568,7 @@ function re(e, t) {
574
568
  }
575
569
  }
576
570
  function le(e, t) {
577
- if (!e || !t)
578
- return;
571
+ if (!e || !t) return;
579
572
  const n = new URL(t);
580
573
  fetch(n.href).then((i) => i.text()).then((i) => {
581
574
  const o = document.createElement("style");
@@ -585,8 +578,7 @@ function le(e, t) {
585
578
  });
586
579
  }
587
580
  function ce(e, t, n, i = !1) {
588
- if (!window.emMessageBus)
589
- return;
581
+ if (!window.emMessageBus) return;
590
582
  if (!("adoptedStyleSheets" in Document.prototype) || !i)
591
583
  return n = ae(e, t), n;
592
584
  window[z] || (window[z] = {}), n = de(e, t);
@@ -607,8 +599,7 @@ function ae(e, t) {
607
599
  }
608
600
  function de(e, t) {
609
601
  return window.emMessageBus.subscribe(t, (n) => {
610
- if (!e)
611
- return;
602
+ if (!e) return;
612
603
  const i = e.getRootNode(), o = window[z];
613
604
  let s = o[t] && o[t].sheet;
614
605
  s ? o[t].refCount = o[t].refCount + 1 : (s = new CSSStyleSheet(), s.replaceSync(n), o[t] = {
@@ -845,8 +836,7 @@ function ge(e, t, n) {
845
836
  200
846
837
  ));
847
838
  }, V = () => Z(this, null, function* () {
848
- if (!d || !h || L)
849
- return;
839
+ if (!d || !h || L) return;
850
840
  u && clearTimeout(p), L = !0;
851
841
  const c = d.offsetWidth, Lt = d.offsetHeight;
852
842
  n(8, d.style.width = `${c}px`, d), n(8, d.style.height = `${Lt}px`, d), d.offsetHeight, yield q();
@@ -0,0 +1 @@
1
+ "use strict";var jt=Object.defineProperty,zt=Object.defineProperties;var Ht=Object.getOwnPropertyDescriptors;var et=Object.getOwnPropertySymbols;var At=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable;var K=(e,t,n)=>t in e?jt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nt=(e,t)=>{for(var n in t||(t={}))At.call(t,n)&&K(e,n,t[n]);if(et)for(var n of et(t))It.call(t,n)&&K(e,n,t[n]);return e},it=(e,t)=>zt(e,Ht(t));var M=(e,t,n)=>K(e,typeof t!="symbol"?t+"":t,n);var Z=(e,t,n)=>new Promise((i,o)=>{var s=f=>{try{l(n.next(f))}catch(a){o(a)}},r=f=>{try{l(n.throw(f))}catch(a){o(a)}},l=f=>f.done?i(f.value):Promise.resolve(f.value).then(s,r);l((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function Y(){}function Bt(e,t){for(const n in t)e[n]=t[n];return e}function _t(e){return e()}function ot(){return Object.create(null)}function P(e){e.forEach(_t)}function wt(e){return typeof e=="function"}function Nt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Wt(e){return Object.keys(e).length===0}function st(e,t,n,i){if(e){const o=yt(e,t,n,i);return e[0](o)}}function yt(e,t,n,i){return e[1]&&i?Bt(n.ctx.slice(),e[1](i(t))):n.ctx}function rt(e,t,n,i){if(e[2]&&i){const o=e[2](i(n));if(t.dirty===void 0)return o;if(typeof o=="object"){const s=[],r=Math.max(t.dirty.length,o.length);for(let l=0;l<r;l+=1)s[l]=t.dirty[l]|o[l];return s}return t.dirty|o}return t.dirty}function lt(e,t,n,i,o,s){if(o){const r=yt(t,n,i,s);e.p(r,o)}}function ct(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let i=0;i<n;i++)t[i]=-1;return t}return-1}function x(e,t){e.appendChild(t)}function Pt(e,t,n){const i=Rt(e);if(!i.getElementById(t)){const o=C("style");o.id=t,o.textContent=n,Dt(i,o)}}function Rt(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Dt(e,t){return x(e.head||e,t),t.sheet}function B(e,t,n){e.insertBefore(t,n||null)}function k(e){e.parentNode&&e.parentNode.removeChild(e)}function C(e){return document.createElement(e)}function at(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Ft(e){return document.createTextNode(e)}function R(){return Ft(" ")}function X(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function $(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Ut(e){return Array.from(e.childNodes)}let D;function Yt(){if(D===void 0){D=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(e){D=!0}}return D}function Gt(e,t){getComputedStyle(e).position==="static"&&(e.style.position="relative");const i=C("iframe");i.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),i.setAttribute("aria-hidden","true"),i.tabIndex=-1;const o=Yt();let s;return o?(i.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=X(window,"message",r=>{r.source===i.contentWindow&&t()})):(i.src="about:blank",i.onload=()=>{s=X(i.contentWindow,"resize",t),t()}),x(e,i),()=>{(o||s&&i.contentWindow)&&s(),k(i)}}function T(e,t,n){e.classList.toggle(t,!!n)}function Jt(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let W;function N(e){W=e}function Vt(){if(!W)throw new Error("Function called outside component initialization");return W}function Kt(e){Vt().$$.on_mount.push(e)}const j=[],H=[];let A=[];const dt=[],$t=Promise.resolve();let tt=!1;function bt(){tt||(tt=!0,$t.then(S))}function q(){return bt(),$t}function G(e){A.push(e)}const Q=new Set;let O=0;function S(){if(O!==0)return;const e=W;do{try{for(;O<j.length;){const t=j[O];O++,N(t),Zt(t.$$)}}catch(t){throw j.length=0,O=0,t}for(N(null),j.length=0,O=0;H.length;)H.pop()();for(let t=0;t<A.length;t+=1){const n=A[t];Q.has(n)||(Q.add(n),n())}A.length=0}while(j.length);for(;dt.length;)dt.pop()();tt=!1,Q.clear(),N(e)}function Zt(e){if(e.fragment!==null){e.update(),P(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(G)}}function qt(e){const t=[],n=[];A.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),A=t}const F=new Set;let E;function Qt(){E={r:0,c:[],p:E}}function Xt(){E.r||P(E.c),E=E.p}function I(e,t){e&&e.i&&(F.delete(e),e.i(t))}function J(e,t,n,i){if(e&&e.o){if(F.has(e))return;F.add(e),E.c.push(()=>{F.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function te(e,t,n){const{fragment:i,after_update:o}=e.$$;i&&i.m(t,n),G(()=>{const s=e.$$.on_mount.map(_t).filter(wt);e.$$.on_destroy?e.$$.on_destroy.push(...s):P(s),e.$$.on_mount=[]}),o.forEach(G)}function ee(e,t){const n=e.$$;n.fragment!==null&&(qt(n.after_update),P(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ne(e,t){e.$$.dirty[0]===-1&&(j.push(e),bt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(e,t,n,i,o,s,r=null,l=[-1]){const f=W;N(e);const a=e.$$={fragment:null,ctx:[],props:s,update:Y,not_equal:o,bound:ot(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(f?f.$$.context:[])),callbacks:ot(),dirty:l,skip_bound:!1,root:t.target||f.$$.root};r&&r(a.root);let _=!1;if(a.ctx=n?n(e,t.props||{},(w,g,...m)=>{const y=m.length?m[0]:g;return a.ctx&&o(a.ctx[w],a.ctx[w]=y)&&(!a.skip_bound&&a.bound[w]&&a.bound[w](y),_&&ne(e,w)),g}):[],a.update(),_=!0,P(a.before_update),a.fragment=i?i(a.ctx):!1,t.target){if(t.hydrate){const w=Ut(t.target);a.fragment&&a.fragment.l(w),w.forEach(k)}else a.fragment&&a.fragment.c();t.intro&&I(e.$$.fragment),te(e,t.target,t.anchor),S()}N(f)}let xt;typeof HTMLElement=="function"&&(xt=class extends HTMLElement{constructor(t,n,i){super();M(this,"$$ctor");M(this,"$$s");M(this,"$$c");M(this,"$$cn",!1);M(this,"$$d",{});M(this,"$$r",!1);M(this,"$$p_d",{});M(this,"$$l",{});M(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,i&&this.attachShadow({mode:"open"})}addEventListener(t,n,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const o=this.$$c.$on(t,n);this.$$l_u.set(n,o)}super.addEventListener(t,n,i)}removeEventListener(t,n,i){if(super.removeEventListener(t,n,i),this.$$c){const o=this.$$l_u.get(n);o&&(o(),this.$$l_u.delete(n))}}connectedCallback(){return Z(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(s){return()=>{let r;return{c:function(){r=C("slot"),s!=="default"&&$(r,"name",s)},m:function(a,_){B(a,r,_)},d:function(a){a&&k(r)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},i=Jt(this);for(const s of this.$$s)s in i&&(n[s]=[t(s)]);for(const s of this.attributes){const r=this.$$g_p(s.name);r in this.$$d||(this.$$d[r]=U(r,s.value,this.$$p_d,"toProp"))}for(const s in this.$$p_d)!(s in this.$$d)&&this[s]!==void 0&&(this.$$d[s]=this[s],delete this[s]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:it(nt({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const o=()=>{this.$$r=!0;for(const s in this.$$p_d)if(this.$$d[s]=this.$$c.$$.ctx[this.$$c.$$.props[s]],this.$$p_d[s].reflect){const r=U(s,this.$$d[s],this.$$p_d,"toAttribute");r==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,r)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const s in this.$$l)for(const r of this.$$l[s]){const l=this.$$c.$on(s,r);this.$$l_u.set(r,l)}this.$$l={}}})}attributeChangedCallback(t,n,i){var o;this.$$r||(t=this.$$g_p(t),this.$$d[t]=U(t,i,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$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 U(e,t,n,i){var s;const o=(s=n[e])==null?void 0:s.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!n[e])return t;if(i==="toAttribute")switch(o){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(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function oe(e,t,n,i,o,s){let r=class extends xt{constructor(){super(e,n,o),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(l=>(t[l].attribute||l).toLowerCase())}};return Object.keys(t).forEach(l=>{Object.defineProperty(r.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(f){var a;f=U(l,f,t),this.$$d[l]=f,(a=this.$$c)==null||a.$set({[l]:f})}})}),i.forEach(l=>{Object.defineProperty(r.prototype,l,{get(){var f;return(f=this.$$c)==null?void 0:f[l]}})}),e.element=r,r}class se{constructor(){M(this,"$$");M(this,"$$set")}$destroy(){ee(this,1),this.$destroy=Y}$on(t,n){if(!wt(n))return Y;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(t){this.$$set&&!Wt(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const re="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(re);const z="__WIDGET_GLOBAL_STYLE_CACHE__";function le(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function ce(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then(i=>i.text()).then(i=>{const o=document.createElement("style");o.innerHTML=i,e&&e.appendChild(o)}).catch(i=>{console.error("There was an error while trying to load client styling from URL",i)})}function ae(e,t,n,i=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!i)return n=de(e,t),n;window[z]||(window[z]={}),n=ue(e,t);const s=n.unsubscribe.bind(n),r=()=>{if(window[z][t]){const l=window[z][t];l.refCount>1?l.refCount=l.refCount-1:delete window[z][t]}s()};return n.unsubscribe=r,n}function de(e,t){const n=document.createElement("style");return window.emMessageBus.subscribe(t,i=>{e&&(n.innerHTML=i,e.appendChild(n))})}function ue(e,t){return window.emMessageBus.subscribe(t,n=>{if(!e)return;const i=e.getRootNode(),o=window[z];let s=o[t]&&o[t].sheet;s?o[t].refCount=o[t].refCount+1:(s=new CSSStyleSheet,s.replaceSync(n),o[t]={sheet:s,refCount:1});const r=i.adoptedStyleSheets||[];r.includes(s)||(i.adoptedStyleSheets=[...r,s])})}function fe(e){Pt(e,"svelte-e2luo5",'*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}@keyframes modalFadeIn{from{opacity:0}to{opacity:1}}@keyframes modalFadeOut{from{opacity:1}to{opacity:0}}@keyframes modalSlideIn{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes modalSlideOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-10px)}}@keyframes spin{to{transform:rotate(360deg)}}#Modal{position:fixed;width:100%;height:100%;top:0;left:0;background:var(--emw--color-black-transparency-10, rgba(0, 0, 0, 0.7));display:flex;justify-content:center;align-items:center;z-index:100;backdrop-filter:blur(4px);animation:modalFadeIn 0.25s ease-out}#Modal.closing{animation:modalFadeOut 0.25s ease-in}@container (min-width: 500px){.ModalContainer{min-width:450px}}.ModalContainer{min-width:380px;width:auto;height:auto;max-height:70%;padding:var(--emw--spacing-medium, 25px);min-height:200px;border-radius:var(--mmw--border-radius-large-plus, 10px);background-color:#12191f;max-width:600px;z-index:1;box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.3);overflow:hidden;transition:width 0.3s ease-in-out, height 0.3s ease-in-out;animation:modalSlideIn 0.3s ease-out}#Modal.closing .ModalContainer{animation:modalSlideOut 0.25s ease-in}.ModalContainer.video-mode{height:70% !important;max-height:70%}.ModalContainer.twofa-mode{max-width:500px;min-height:auto}.ModalContainer::before{content:"";position:absolute;inset:0;opacity:0.2;z-index:-1;pointer-events:none;border-radius:10px;background:linear-gradient(140deg, var(--emw--color-primary, #f9c405) 5%, var(--emw--color-black, #12191f) 65%)}.ModalHeader{display:flex;flex-direction:row;justify-content:space-between;width:100%;align-items:center}.ModalHeader .ModalTitle{display:flex;flex-direction:row;height:26px;align-items:center;gap:8px}.ModalHeader .TitleText{color:var(--emw--color-typography, #fff);font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-medium, 600)}.ModalHeader .WarningIcon svg{width:24px;height:24px;fill:var(--emw--color-typography, #fff)}.Uppercase{text-transform:uppercase}.ModalCloseIcon{z-index:20;transition:all 0.2s ease}.ModalCloseIcon svg{width:11px;height:11px}.ModalCloseIcon:hover{transform:rotate(90deg)}.CloseButton{fill:var(--emw--color-white, #fff);stroke:var(--emw--color-white, #fff);cursor:pointer}.ModalLoadingOverlay{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;background:rgba(18, 25, 31, 0.8);border-radius:10px;z-index:10}.ModalLoader{width:48px;height:48px;border:5px solid rgba(255, 255, 255, 0.1);border-top-color:var(--emw--color-primary, #f9c405);border-radius:50%;animation:spin 0.8s linear infinite}.ModalContentWrapper{width:100%;height:100%;transition:opacity 0.2s ease}.ModalContentWrapper.hidden{opacity:0;pointer-events:none}@container (max-width: 475px){.ModalContainer{max-width:90%;max-height:80vh;margin:auto}}@container (max-width: 500px){.ModalContainer.twofa-mode{width:100%;height:100% !important;max-height:100%;border-radius:0;justify-content:flex-start;background:var(--emw--color-background)}.ModalContainer.twofa-mode::before{border-radius:0}}')}const he=e=>({}),ut=e=>({}),me=e=>({}),ft=e=>({});function ht(e){let t,n,i,o,s,r,l,f,a,_,w,g,m=(e[3]=="error"||e[3]=="bonusDescription")&&mt();const y=e[14].title,b=st(y,e,e[13],ft);let h=e[3]!="2fa-old"&&gt(e),d=e[4]==="true"&&pt();const L=e[14].content,p=st(L,e,e[13],ut);return{c(){t=C("div"),n=C("div"),i=C("div"),o=C("div"),m&&m.c(),s=R(),r=C("div"),b&&b.c(),l=R(),h&&h.c(),f=R(),d&&d.c(),a=R(),_=C("div"),p&&p.c(),$(r,"class","TitleText"),$(o,"class","ModalTitle"),$(i,"class","ModalHeader"),$(_,"class","ModalContentWrapper"),T(_,"hidden",e[4]==="true"),$(n,"class","ModalContainer"),T(n,"video-mode",e[3]==="video"),T(n,"twofa-mode",e[3]==="2fa"),$(t,"id","Modal"),G(()=>e[18].call(t))},m(u,v){B(u,t,v),x(t,n),x(n,i),x(i,o),m&&m.m(o,null),x(o,s),x(o,r),b&&b.m(r,null),x(i,l),h&&h.m(i,null),x(n,f),d&&d.m(n,null),x(n,a),x(n,_),p&&p.m(_,null),e[15](_),e[16](n),e[17](t),w=Gt(t,e[18].bind(t)),g=!0},p(u,v){u[3]=="error"||u[3]=="bonusDescription"?m||(m=mt(),m.c(),m.m(o,s)):m&&(m.d(1),m=null),b&&b.p&&(!g||v&8192)&&lt(b,y,u,u[13],g?rt(y,u[13],v,me):ct(u[13]),ft),u[3]!="2fa-old"?h?h.p(u,v):(h=gt(u),h.c(),h.m(i,null)):h&&(h.d(1),h=null),u[4]==="true"?d||(d=pt(),d.c(),d.m(n,a)):d&&(d.d(1),d=null),p&&p.p&&(!g||v&8192)&&lt(p,L,u,u[13],g?rt(L,u[13],v,he):ct(u[13]),ut),(!g||v&16)&&T(_,"hidden",u[4]==="true"),(!g||v&8)&&T(n,"video-mode",u[3]==="video"),(!g||v&8)&&T(n,"twofa-mode",u[3]==="2fa")},i(u){g||(I(b,u),I(p,u),g=!0)},o(u){J(b,u),J(p,u),g=!1},d(u){u&&k(t),m&&m.d(),b&&b.d(u),h&&h.d(),d&&d.d(),p&&p.d(u),e[15](null),e[16](null),e[17](null),w()}}}function mt(e){let t;return{c(){t=C("div"),t.innerHTML='<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><defs><mask id="exclamation-mask"><circle cx="100" cy="100" r="90"></circle><rect x="88" y="40" width="24" height="80" rx="12" fill="black"></rect><circle cx="100" cy="150" r="14" fill="black"></circle></mask></defs><circle cx="100" cy="100" r="90" mask="url(#exclamation-mask)"></circle></svg>',$(t,"class","WarningIcon")},m(n,i){B(n,t,i)},d(n){n&&k(t)}}}function gt(e){let t,n,i,o,s;return{c(){t=C("div"),n=at("svg"),i=at("path"),$(i,"d","M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z"),$(n,"xmlns","http://www.w3.org/2000/svg"),$(n,"viewBox","0 0 13 13"),$(n,"fill","none"),$(n,"class","CloseButton"),$(t,"class","ModalCloseIcon")},m(r,l){B(r,t,l),x(t,n),x(n,i),o||(s=X(n,"click",e[9]),o=!0)},p:Y,d(r){r&&k(t),o=!1,s()}}}function pt(e){let t;return{c(){t=C("div"),t.innerHTML='<div class="ModalLoader"></div>',$(t,"class","ModalLoadingOverlay")},m(n,i){B(n,t,i)},d(n){n&&k(t)}}}function ge(e){let t,n,i=e[2]==="true"&&ht(e);return{c(){t=C("div"),i&&i.c()},m(o,s){B(o,t,s),i&&i.m(t,null),e[19](t),n=!0},p(o,[s]){o[2]==="true"?i?(i.p(o,s),s&4&&I(i,1)):(i=ht(o),i.c(),I(i,1),i.m(t,null)):i&&(Qt(),J(i,1,1,()=>{i=null}),Xt())},i(o){n||(I(i),n=!0)},o(o){J(i),n=!1},d(o){o&&k(t),i&&i.d(),e[19](null)}}}function pe(e,t,n){let{$$slots:i={},$$scope:o}=t,{mbsource:s}=t,{clientstyling:r}=t,{clientstylingurl:l}=t,{show:f}=t,{modaltype:a=""}=t,{isloading:_="false"}=t,{width:w}=t,{height:g}=t,m,y,b,h,d,L=!1,p,u;const v=()=>{p&&clearTimeout(p),m&&(m.classList.add("closing"),window.dispatchEvent(new CustomEvent("manualClosePopup")),p=setTimeout(()=>{window.dispatchEvent(new CustomEvent("modal-update",{detail:{type:"closed",data:{}}}))},200))},V=()=>Z(this,null,function*(){if(!d||!h||L)return;u&&clearTimeout(p),L=!0;const c=d.offsetWidth,Et=d.offsetHeight;n(8,d.style.width=`${c}px`,d),n(8,d.style.height=`${Et}px`,d),d.offsetHeight,yield q();const Tt=h.scrollHeight,Ot=h.scrollWidth;n(8,d.style.width=`${Ot}px`,d),n(8,d.style.height=`${Tt}px`,d),u=setTimeout(()=>{d&&(n(8,d.style.width="auto",d),n(8,d.style.height="auto",d)),L=!1},300)});Kt(()=>{if(q().then(()=>{V()}),h){const c=new ResizeObserver(()=>{V()});return c.observe(h),()=>{c.disconnect()}}return()=>{p&&clearTimeout(p),u&&clearTimeout(p)}});function vt(c){H[c?"unshift":"push"](()=>{h=c,n(7,h)})}function Mt(c){H[c?"unshift":"push"](()=>{d=c,n(8,d)})}function St(c){H[c?"unshift":"push"](()=>{m=c,n(6,m)})}function kt(){w=this.clientWidth,g=this.clientHeight,n(0,w),n(1,g)}function Lt(c){H[c?"unshift":"push"](()=>{y=c,n(5,y)})}return e.$$set=c=>{"mbsource"in c&&n(10,s=c.mbsource),"clientstyling"in c&&n(11,r=c.clientstyling),"clientstylingurl"in c&&n(12,l=c.clientstylingurl),"show"in c&&n(2,f=c.show),"modaltype"in c&&n(3,a=c.modaltype),"isloading"in c&&n(4,_=c.isloading),"width"in c&&n(0,w=c.width),"height"in c&&n(1,g=c.height),"$$scope"in c&&n(13,o=c.$$scope)},e.$$.update=()=>{e.$$.dirty&16&&_&&q().then(()=>{V()}),e.$$.dirty&2080&&r&&y&&le(y,r),e.$$.dirty&4128&&l&&y&&ce(y,l),e.$$.dirty&1056&&s&&y&&ae(y,`${s}.Style`,b)},[w,g,f,a,_,y,m,h,d,v,s,r,l,o,i,vt,Mt,St,kt,Lt]}class Ct extends se{constructor(t){super(),ie(this,t,pe,ge,Nt,{mbsource:10,clientstyling:11,clientstylingurl:12,show:2,modaltype:3,isloading:4,width:0,height:1},fe)}get mbsource(){return this.$$.ctx[10]}set mbsource(t){this.$$set({mbsource:t}),S()}get clientstyling(){return this.$$.ctx[11]}set clientstyling(t){this.$$set({clientstyling:t}),S()}get clientstylingurl(){return this.$$.ctx[12]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),S()}get show(){return this.$$.ctx[2]}set show(t){this.$$set({show:t}),S()}get modaltype(){return this.$$.ctx[3]}set modaltype(t){this.$$set({modaltype:t}),S()}get isloading(){return this.$$.ctx[4]}set isloading(t){this.$$set({isloading:t}),S()}get width(){return this.$$.ctx[0]}set width(t){this.$$set({width:t}),S()}get height(){return this.$$.ctx[1]}set height(t){this.$$set({height:t}),S()}}oe(Ct,{mbsource:{},clientstyling:{},clientstylingurl:{},show:{},modaltype:{},isloading:{},width:{},height:{}},["title","content"],[],!0);exports.default=Ct;
@@ -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/CashierModal-DwRXM-vw.cjs")).then(({default:t})=>{!customElements.get("cashier-modal")&&customElements.define("cashier-modal",t.element)})}
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/CashierModal-Q9lwN3_e.cjs")).then(({default:t})=>{!customElements.get("cashier-modal")&&customElements.define("cashier-modal",t.element)})}
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
10
10
  }
11
11
  };
12
12
  };
13
- customElements.define = n(customElements.define), import("../components/CashierModal-hxCpGsMK.js").then(({ default: t }) => {
13
+ customElements.define = n(customElements.define), import("../components/CashierModal-D5JwjKl0.js").then(({ default: t }) => {
14
14
  !customElements.get("cashier-modal") && customElements.define("cashier-modal", t.element);
15
15
  });
16
16
  }
@@ -1,4 +1,4 @@
1
- import { C as n } from "../components/CashierModal-lqwuv6ZN.js";
1
+ import { C as n } from "../components/CashierModal-D-3FfaIk.js";
2
2
  function a(t) {
3
3
  return function(...s) {
4
4
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/cashier-modal",
3
- "version": "1.99.57",
3
+ "version": "1.99.59",
4
4
  "type": "module",
5
5
  "main": "es2015/cashier-modal.cjs",
6
6
  "module": "esnext/cashier-modal.js",
@@ -1 +0,0 @@
1
- "use strict";var jt=Object.defineProperty,zt=Object.defineProperties;var Ht=Object.getOwnPropertyDescriptors;var et=Object.getOwnPropertySymbols;var At=Object.prototype.hasOwnProperty,It=Object.prototype.propertyIsEnumerable;var K=(e,t,n)=>t in e?jt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nt=(e,t)=>{for(var n in t||(t={}))At.call(t,n)&&K(e,n,t[n]);if(et)for(var n of et(t))It.call(t,n)&&K(e,n,t[n]);return e},it=(e,t)=>zt(e,Ht(t));var M=(e,t,n)=>(K(e,typeof t!="symbol"?t+"":t,n),n);var Z=(e,t,n)=>new Promise((i,o)=>{var s=f=>{try{l(n.next(f))}catch(a){o(a)}},r=f=>{try{l(n.throw(f))}catch(a){o(a)}},l=f=>f.done?i(f.value):Promise.resolve(f.value).then(s,r);l((n=n.apply(e,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function Y(){}function Bt(e,t){for(const n in t)e[n]=t[n];return e}function _t(e){return e()}function ot(){return Object.create(null)}function P(e){e.forEach(_t)}function wt(e){return typeof e=="function"}function Nt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function Wt(e){return Object.keys(e).length===0}function st(e,t,n,i){if(e){const o=yt(e,t,n,i);return e[0](o)}}function yt(e,t,n,i){return e[1]&&i?Bt(n.ctx.slice(),e[1](i(t))):n.ctx}function rt(e,t,n,i){if(e[2]&&i){const o=e[2](i(n));if(t.dirty===void 0)return o;if(typeof o=="object"){const s=[],r=Math.max(t.dirty.length,o.length);for(let l=0;l<r;l+=1)s[l]=t.dirty[l]|o[l];return s}return t.dirty|o}return t.dirty}function lt(e,t,n,i,o,s){if(o){const r=yt(t,n,i,s);e.p(r,o)}}function ct(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let i=0;i<n;i++)t[i]=-1;return t}return-1}function x(e,t){e.appendChild(t)}function Pt(e,t,n){const i=Rt(e);if(!i.getElementById(t)){const o=C("style");o.id=t,o.textContent=n,Dt(i,o)}}function Rt(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function Dt(e,t){return x(e.head||e,t),t.sheet}function B(e,t,n){e.insertBefore(t,n||null)}function k(e){e.parentNode&&e.parentNode.removeChild(e)}function C(e){return document.createElement(e)}function at(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Ft(e){return document.createTextNode(e)}function R(){return Ft(" ")}function X(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function $(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Ut(e){return Array.from(e.childNodes)}let D;function Yt(){if(D===void 0){D=!1;try{typeof window!="undefined"&&window.parent&&window.parent.document}catch(e){D=!0}}return D}function Gt(e,t){getComputedStyle(e).position==="static"&&(e.style.position="relative");const i=C("iframe");i.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),i.setAttribute("aria-hidden","true"),i.tabIndex=-1;const o=Yt();let s;return o?(i.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",s=X(window,"message",r=>{r.source===i.contentWindow&&t()})):(i.src="about:blank",i.onload=()=>{s=X(i.contentWindow,"resize",t),t()}),x(e,i),()=>{(o||s&&i.contentWindow)&&s(),k(i)}}function T(e,t,n){e.classList.toggle(t,!!n)}function Jt(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let W;function N(e){W=e}function Vt(){if(!W)throw new Error("Function called outside component initialization");return W}function Kt(e){Vt().$$.on_mount.push(e)}const j=[],H=[];let A=[];const dt=[],$t=Promise.resolve();let tt=!1;function bt(){tt||(tt=!0,$t.then(S))}function q(){return bt(),$t}function G(e){A.push(e)}const Q=new Set;let O=0;function S(){if(O!==0)return;const e=W;do{try{for(;O<j.length;){const t=j[O];O++,N(t),Zt(t.$$)}}catch(t){throw j.length=0,O=0,t}for(N(null),j.length=0,O=0;H.length;)H.pop()();for(let t=0;t<A.length;t+=1){const n=A[t];Q.has(n)||(Q.add(n),n())}A.length=0}while(j.length);for(;dt.length;)dt.pop()();tt=!1,Q.clear(),N(e)}function Zt(e){if(e.fragment!==null){e.update(),P(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(G)}}function qt(e){const t=[],n=[];A.forEach(i=>e.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),A=t}const F=new Set;let E;function Qt(){E={r:0,c:[],p:E}}function Xt(){E.r||P(E.c),E=E.p}function I(e,t){e&&e.i&&(F.delete(e),e.i(t))}function J(e,t,n,i){if(e&&e.o){if(F.has(e))return;F.add(e),E.c.push(()=>{F.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function te(e,t,n){const{fragment:i,after_update:o}=e.$$;i&&i.m(t,n),G(()=>{const s=e.$$.on_mount.map(_t).filter(wt);e.$$.on_destroy?e.$$.on_destroy.push(...s):P(s),e.$$.on_mount=[]}),o.forEach(G)}function ee(e,t){const n=e.$$;n.fragment!==null&&(qt(n.after_update),P(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ne(e,t){e.$$.dirty[0]===-1&&(j.push(e),bt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ie(e,t,n,i,o,s,r=null,l=[-1]){const f=W;N(e);const a=e.$$={fragment:null,ctx:[],props:s,update:Y,not_equal:o,bound:ot(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(f?f.$$.context:[])),callbacks:ot(),dirty:l,skip_bound:!1,root:t.target||f.$$.root};r&&r(a.root);let _=!1;if(a.ctx=n?n(e,t.props||{},(w,g,...m)=>{const y=m.length?m[0]:g;return a.ctx&&o(a.ctx[w],a.ctx[w]=y)&&(!a.skip_bound&&a.bound[w]&&a.bound[w](y),_&&ne(e,w)),g}):[],a.update(),_=!0,P(a.before_update),a.fragment=i?i(a.ctx):!1,t.target){if(t.hydrate){const w=Ut(t.target);a.fragment&&a.fragment.l(w),w.forEach(k)}else a.fragment&&a.fragment.c();t.intro&&I(e.$$.fragment),te(e,t.target,t.anchor),S()}N(f)}let xt;typeof HTMLElement=="function"&&(xt=class extends HTMLElement{constructor(t,n,i){super();M(this,"$$ctor");M(this,"$$s");M(this,"$$c");M(this,"$$cn",!1);M(this,"$$d",{});M(this,"$$r",!1);M(this,"$$p_d",{});M(this,"$$l",{});M(this,"$$l_u",new Map);this.$$ctor=t,this.$$s=n,i&&this.attachShadow({mode:"open"})}addEventListener(t,n,i){if(this.$$l[t]=this.$$l[t]||[],this.$$l[t].push(n),this.$$c){const o=this.$$c.$on(t,n);this.$$l_u.set(n,o)}super.addEventListener(t,n,i)}removeEventListener(t,n,i){if(super.removeEventListener(t,n,i),this.$$c){const o=this.$$l_u.get(n);o&&(o(),this.$$l_u.delete(n))}}connectedCallback(){return Z(this,null,function*(){if(this.$$cn=!0,!this.$$c){let t=function(s){return()=>{let r;return{c:function(){r=C("slot"),s!=="default"&&$(r,"name",s)},m:function(a,_){B(a,r,_)},d:function(a){a&&k(r)}}}};if(yield Promise.resolve(),!this.$$cn||this.$$c)return;const n={},i=Jt(this);for(const s of this.$$s)s in i&&(n[s]=[t(s)]);for(const s of this.attributes){const r=this.$$g_p(s.name);r in this.$$d||(this.$$d[r]=U(r,s.value,this.$$p_d,"toProp"))}for(const s in this.$$p_d)!(s in this.$$d)&&this[s]!==void 0&&(this.$$d[s]=this[s],delete this[s]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:it(nt({},this.$$d),{$$slots:n,$$scope:{ctx:[]}})});const o=()=>{this.$$r=!0;for(const s in this.$$p_d)if(this.$$d[s]=this.$$c.$$.ctx[this.$$c.$$.props[s]],this.$$p_d[s].reflect){const r=U(s,this.$$d[s],this.$$p_d,"toAttribute");r==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,r)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const s in this.$$l)for(const r of this.$$l[s]){const l=this.$$c.$on(s,r);this.$$l_u.set(r,l)}this.$$l={}}})}attributeChangedCallback(t,n,i){var o;this.$$r||(t=this.$$g_p(t),this.$$d[t]=U(t,i,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$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 U(e,t,n,i){var s;const o=(s=n[e])==null?void 0:s.type;if(t=o==="Boolean"&&typeof t!="boolean"?t!=null:t,!i||!n[e])return t;if(i==="toAttribute")switch(o){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(o){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function oe(e,t,n,i,o,s){let r=class extends xt{constructor(){super(e,n,o),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(l=>(t[l].attribute||l).toLowerCase())}};return Object.keys(t).forEach(l=>{Object.defineProperty(r.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(f){var a;f=U(l,f,t),this.$$d[l]=f,(a=this.$$c)==null||a.$set({[l]:f})}})}),i.forEach(l=>{Object.defineProperty(r.prototype,l,{get(){var f;return(f=this.$$c)==null?void 0:f[l]}})}),e.element=r,r}class se{constructor(){M(this,"$$");M(this,"$$set")}$destroy(){ee(this,1),this.$destroy=Y}$on(t,n){if(!wt(n))return Y;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(t){this.$$set&&!Wt(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const re="4";typeof window!="undefined"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(re);const z="__WIDGET_GLOBAL_STYLE_CACHE__";function le(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function ce(e,t){if(!e||!t)return;const n=new URL(t);fetch(n.href).then(i=>i.text()).then(i=>{const o=document.createElement("style");o.innerHTML=i,e&&e.appendChild(o)}).catch(i=>{console.error("There was an error while trying to load client styling from URL",i)})}function ae(e,t,n,i=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!i)return n=de(e,t),n;window[z]||(window[z]={}),n=ue(e,t);const s=n.unsubscribe.bind(n),r=()=>{if(window[z][t]){const l=window[z][t];l.refCount>1?l.refCount=l.refCount-1:delete window[z][t]}s()};return n.unsubscribe=r,n}function de(e,t){const n=document.createElement("style");return window.emMessageBus.subscribe(t,i=>{e&&(n.innerHTML=i,e.appendChild(n))})}function ue(e,t){return window.emMessageBus.subscribe(t,n=>{if(!e)return;const i=e.getRootNode(),o=window[z];let s=o[t]&&o[t].sheet;s?o[t].refCount=o[t].refCount+1:(s=new CSSStyleSheet,s.replaceSync(n),o[t]={sheet:s,refCount:1});const r=i.adoptedStyleSheets||[];r.includes(s)||(i.adoptedStyleSheets=[...r,s])})}function fe(e){Pt(e,"svelte-e2luo5",'*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}@keyframes modalFadeIn{from{opacity:0}to{opacity:1}}@keyframes modalFadeOut{from{opacity:1}to{opacity:0}}@keyframes modalSlideIn{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}@keyframes modalSlideOut{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-10px)}}@keyframes spin{to{transform:rotate(360deg)}}#Modal{position:fixed;width:100%;height:100%;top:0;left:0;background:var(--emw--color-black-transparency-10, rgba(0, 0, 0, 0.7));display:flex;justify-content:center;align-items:center;z-index:100;backdrop-filter:blur(4px);animation:modalFadeIn 0.25s ease-out}#Modal.closing{animation:modalFadeOut 0.25s ease-in}@container (min-width: 500px){.ModalContainer{min-width:450px}}.ModalContainer{min-width:380px;width:auto;height:auto;max-height:70%;padding:var(--emw--spacing-medium, 25px);min-height:200px;border-radius:var(--mmw--border-radius-large-plus, 10px);background-color:#12191f;max-width:600px;z-index:1;box-shadow:inset 0px 0px 0px 1px rgba(255, 255, 255, 0.3);overflow:hidden;transition:width 0.3s ease-in-out, height 0.3s ease-in-out;animation:modalSlideIn 0.3s ease-out}#Modal.closing .ModalContainer{animation:modalSlideOut 0.25s ease-in}.ModalContainer.video-mode{height:70% !important;max-height:70%}.ModalContainer.twofa-mode{max-width:500px;min-height:auto}.ModalContainer::before{content:"";position:absolute;inset:0;opacity:0.2;z-index:-1;pointer-events:none;border-radius:10px;background:linear-gradient(140deg, var(--emw--color-primary, #f9c405) 5%, var(--emw--color-black, #12191f) 65%)}.ModalHeader{display:flex;flex-direction:row;justify-content:space-between;width:100%;align-items:center}.ModalHeader .ModalTitle{display:flex;flex-direction:row;height:26px;align-items:center;gap:8px}.ModalHeader .TitleText{color:var(--emw--color-typography, #fff);font-size:var(--emw--font-size-medium, 18px);font-weight:var(--emw--font-weight-medium, 600)}.ModalHeader .WarningIcon svg{width:24px;height:24px;fill:var(--emw--color-typography, #fff)}.Uppercase{text-transform:uppercase}.ModalCloseIcon{z-index:20;transition:all 0.2s ease}.ModalCloseIcon svg{width:11px;height:11px}.ModalCloseIcon:hover{transform:rotate(90deg)}.CloseButton{fill:var(--emw--color-white, #fff);stroke:var(--emw--color-white, #fff);cursor:pointer}.ModalLoadingOverlay{position:absolute;inset:0;display:flex;justify-content:center;align-items:center;background:rgba(18, 25, 31, 0.8);border-radius:10px;z-index:10}.ModalLoader{width:48px;height:48px;border:5px solid rgba(255, 255, 255, 0.1);border-top-color:var(--emw--color-primary, #f9c405);border-radius:50%;animation:spin 0.8s linear infinite}.ModalContentWrapper{width:100%;height:100%;transition:opacity 0.2s ease}.ModalContentWrapper.hidden{opacity:0;pointer-events:none}@container (max-width: 475px){.ModalContainer{max-width:90%;max-height:80vh;margin:auto}}@container (max-width: 500px){.ModalContainer.twofa-mode{width:100%;height:100% !important;max-height:100%;border-radius:0;justify-content:flex-start;background:var(--emw--color-background)}.ModalContainer.twofa-mode::before{border-radius:0}}')}const he=e=>({}),ut=e=>({}),me=e=>({}),ft=e=>({});function ht(e){let t,n,i,o,s,r,l,f,a,_,w,g,m=(e[3]=="error"||e[3]=="bonusDescription")&&mt();const y=e[14].title,b=st(y,e,e[13],ft);let h=e[3]!="2fa-old"&&gt(e),d=e[4]==="true"&&pt();const L=e[14].content,p=st(L,e,e[13],ut);return{c(){t=C("div"),n=C("div"),i=C("div"),o=C("div"),m&&m.c(),s=R(),r=C("div"),b&&b.c(),l=R(),h&&h.c(),f=R(),d&&d.c(),a=R(),_=C("div"),p&&p.c(),$(r,"class","TitleText"),$(o,"class","ModalTitle"),$(i,"class","ModalHeader"),$(_,"class","ModalContentWrapper"),T(_,"hidden",e[4]==="true"),$(n,"class","ModalContainer"),T(n,"video-mode",e[3]==="video"),T(n,"twofa-mode",e[3]==="2fa"),$(t,"id","Modal"),G(()=>e[18].call(t))},m(u,v){B(u,t,v),x(t,n),x(n,i),x(i,o),m&&m.m(o,null),x(o,s),x(o,r),b&&b.m(r,null),x(i,l),h&&h.m(i,null),x(n,f),d&&d.m(n,null),x(n,a),x(n,_),p&&p.m(_,null),e[15](_),e[16](n),e[17](t),w=Gt(t,e[18].bind(t)),g=!0},p(u,v){u[3]=="error"||u[3]=="bonusDescription"?m||(m=mt(),m.c(),m.m(o,s)):m&&(m.d(1),m=null),b&&b.p&&(!g||v&8192)&&lt(b,y,u,u[13],g?rt(y,u[13],v,me):ct(u[13]),ft),u[3]!="2fa-old"?h?h.p(u,v):(h=gt(u),h.c(),h.m(i,null)):h&&(h.d(1),h=null),u[4]==="true"?d||(d=pt(),d.c(),d.m(n,a)):d&&(d.d(1),d=null),p&&p.p&&(!g||v&8192)&&lt(p,L,u,u[13],g?rt(L,u[13],v,he):ct(u[13]),ut),(!g||v&16)&&T(_,"hidden",u[4]==="true"),(!g||v&8)&&T(n,"video-mode",u[3]==="video"),(!g||v&8)&&T(n,"twofa-mode",u[3]==="2fa")},i(u){g||(I(b,u),I(p,u),g=!0)},o(u){J(b,u),J(p,u),g=!1},d(u){u&&k(t),m&&m.d(),b&&b.d(u),h&&h.d(),d&&d.d(),p&&p.d(u),e[15](null),e[16](null),e[17](null),w()}}}function mt(e){let t;return{c(){t=C("div"),t.innerHTML='<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><defs><mask id="exclamation-mask"><circle cx="100" cy="100" r="90"></circle><rect x="88" y="40" width="24" height="80" rx="12" fill="black"></rect><circle cx="100" cy="150" r="14" fill="black"></circle></mask></defs><circle cx="100" cy="100" r="90" mask="url(#exclamation-mask)"></circle></svg>',$(t,"class","WarningIcon")},m(n,i){B(n,t,i)},d(n){n&&k(t)}}}function gt(e){let t,n,i,o,s;return{c(){t=C("div"),n=at("svg"),i=at("path"),$(i,"d","M12.7711 0.229435C13.0582 0.517619 13.0755 0.973729 12.8215 1.28141L12.7711 1.33721L7.60685 6.50068L12.7711 11.6641C12.9128 11.8066 12.9944 11.998 12.999 12.1988C13.0035 12.3997 12.9308 12.5946 12.7957 12.7433C12.6606 12.892 12.4735 12.9832 12.2731 12.9979C12.0728 13.0126 11.8744 12.9497 11.7191 12.8223L11.6633 12.7719L6.49958 7.60791L1.3359 12.7719C1.19349 12.9136 1.00207 12.9952 0.801203 12.9998C0.60034 13.0044 0.405398 12.9316 0.256676 12.7965C0.107955 12.6614 0.0168256 12.4744 0.00212786 12.274C-0.0125699 12.0736 0.0502877 11.8753 0.177706 11.7199L0.228086 11.6641L5.3923 6.50068L0.228086 1.33721C0.0863637 1.1948 0.00478102 1.00338 0.000203544 0.802529C-0.00437393 0.601674 0.0684038 0.40674 0.203491 0.258024C0.338579 0.109308 0.525647 0.0181829 0.726024 0.00348576C0.9264 -0.0112114 1.12476 0.0516437 1.28011 0.179057L1.3359 0.229435L6.49958 5.39345L11.6633 0.229435C11.736 0.156695 11.8223 0.0989949 11.9174 0.0596283C12.0124 0.0202617 12.1143 0 12.2172 0C12.32 0 12.4219 0.0202617 12.5169 0.0596283C12.612 0.0989949 12.6983 0.156695 12.7711 0.229435Z"),$(n,"xmlns","http://www.w3.org/2000/svg"),$(n,"viewBox","0 0 13 13"),$(n,"fill","none"),$(n,"class","CloseButton"),$(t,"class","ModalCloseIcon")},m(r,l){B(r,t,l),x(t,n),x(n,i),o||(s=X(n,"click",e[9]),o=!0)},p:Y,d(r){r&&k(t),o=!1,s()}}}function pt(e){let t;return{c(){t=C("div"),t.innerHTML='<div class="ModalLoader"></div>',$(t,"class","ModalLoadingOverlay")},m(n,i){B(n,t,i)},d(n){n&&k(t)}}}function ge(e){let t,n,i=e[2]==="true"&&ht(e);return{c(){t=C("div"),i&&i.c()},m(o,s){B(o,t,s),i&&i.m(t,null),e[19](t),n=!0},p(o,[s]){o[2]==="true"?i?(i.p(o,s),s&4&&I(i,1)):(i=ht(o),i.c(),I(i,1),i.m(t,null)):i&&(Qt(),J(i,1,1,()=>{i=null}),Xt())},i(o){n||(I(i),n=!0)},o(o){J(i),n=!1},d(o){o&&k(t),i&&i.d(),e[19](null)}}}function pe(e,t,n){let{$$slots:i={},$$scope:o}=t,{mbsource:s}=t,{clientstyling:r}=t,{clientstylingurl:l}=t,{show:f}=t,{modaltype:a=""}=t,{isloading:_="false"}=t,{width:w}=t,{height:g}=t,m,y,b,h,d,L=!1,p,u;const v=()=>{p&&clearTimeout(p),m&&(m.classList.add("closing"),window.dispatchEvent(new CustomEvent("manualClosePopup")),p=setTimeout(()=>{window.dispatchEvent(new CustomEvent("modal-update",{detail:{type:"closed",data:{}}}))},200))},V=()=>Z(this,null,function*(){if(!d||!h||L)return;u&&clearTimeout(p),L=!0;const c=d.offsetWidth,Et=d.offsetHeight;n(8,d.style.width=`${c}px`,d),n(8,d.style.height=`${Et}px`,d),d.offsetHeight,yield q();const Tt=h.scrollHeight,Ot=h.scrollWidth;n(8,d.style.width=`${Ot}px`,d),n(8,d.style.height=`${Tt}px`,d),u=setTimeout(()=>{d&&(n(8,d.style.width="auto",d),n(8,d.style.height="auto",d)),L=!1},300)});Kt(()=>{if(q().then(()=>{V()}),h){const c=new ResizeObserver(()=>{V()});return c.observe(h),()=>{c.disconnect()}}return()=>{p&&clearTimeout(p),u&&clearTimeout(p)}});function vt(c){H[c?"unshift":"push"](()=>{h=c,n(7,h)})}function Mt(c){H[c?"unshift":"push"](()=>{d=c,n(8,d)})}function St(c){H[c?"unshift":"push"](()=>{m=c,n(6,m)})}function kt(){w=this.clientWidth,g=this.clientHeight,n(0,w),n(1,g)}function Lt(c){H[c?"unshift":"push"](()=>{y=c,n(5,y)})}return e.$$set=c=>{"mbsource"in c&&n(10,s=c.mbsource),"clientstyling"in c&&n(11,r=c.clientstyling),"clientstylingurl"in c&&n(12,l=c.clientstylingurl),"show"in c&&n(2,f=c.show),"modaltype"in c&&n(3,a=c.modaltype),"isloading"in c&&n(4,_=c.isloading),"width"in c&&n(0,w=c.width),"height"in c&&n(1,g=c.height),"$$scope"in c&&n(13,o=c.$$scope)},e.$$.update=()=>{e.$$.dirty&16&&_&&q().then(()=>{V()}),e.$$.dirty&2080&&r&&y&&le(y,r),e.$$.dirty&4128&&l&&y&&ce(y,l),e.$$.dirty&1056&&s&&y&&ae(y,`${s}.Style`,b)},[w,g,f,a,_,y,m,h,d,v,s,r,l,o,i,vt,Mt,St,kt,Lt]}class Ct extends se{constructor(t){super(),ie(this,t,pe,ge,Nt,{mbsource:10,clientstyling:11,clientstylingurl:12,show:2,modaltype:3,isloading:4,width:0,height:1},fe)}get mbsource(){return this.$$.ctx[10]}set mbsource(t){this.$$set({mbsource:t}),S()}get clientstyling(){return this.$$.ctx[11]}set clientstyling(t){this.$$set({clientstyling:t}),S()}get clientstylingurl(){return this.$$.ctx[12]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),S()}get show(){return this.$$.ctx[2]}set show(t){this.$$set({show:t}),S()}get modaltype(){return this.$$.ctx[3]}set modaltype(t){this.$$set({modaltype:t}),S()}get isloading(){return this.$$.ctx[4]}set isloading(t){this.$$set({isloading:t}),S()}get width(){return this.$$.ctx[0]}set width(t){this.$$set({width:t}),S()}get height(){return this.$$.ctx[1]}set height(t){this.$$set({height:t}),S()}}oe(Ct,{mbsource:{},clientstyling:{},clientstylingurl:{},show:{},modaltype:{},isloading:{},width:{},height:{}},["title","content"],[],!0);exports.default=Ct;