@everymatrix/cashier-methods-list 1.22.9 → 1.22.11

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.
@@ -584,11 +584,11 @@ this.formats=vt(e.formats,n),this.formatters=i&&i.formatters||(void 0===(o=this.
584
584
  // and Intl.DateTimeFormat instances.
585
585
  e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},e}();const _t={},Bt=(e,t,r)=>r?(t in _t||(_t[t]={}),e in _t[t]||(_t[t][e]=r),r):r,At=(e,t)=>{if(null==t)return;if(t in _t&&e in _t[t])return _t[t][e];const r=Wt(t);for(let n=0;n<r.length;n++){const i=wt(r[n],e);if(i)return Bt(e,t,i)}};let Lt;const St=x({});function Pt(e){return e in Lt}function wt(e,t){if(!Pt(e))return null;const r=function(e){return Lt[e]||null}(e);return function(e,t){if(null==t)return;if(t in e)return e[t];const r=t.split(".");let n=e;for(let e=0;e<r.length;e++)if("object"==typeof n){if(e>0){const t=r.slice(e,r.length).join(".");if(t in n){n=n[t];break}}n=n[r[e]]}else n=void 0;return n}(r,t)}function Nt(e,...t){delete _t[e],St.update((r=>(r[e]=W.all([r[e]||{},...t]),r)))}k([St],(([e])=>Object.keys(e))),St.subscribe((e=>Lt=e));const Mt={};function Ct(e){return Mt[e]}function Ot(e){return null!=e&&Wt(e).some((e=>{var t;return null==(t=Ct(e))?void 0:t.size}))}function It(e,t){const r=Promise.all(t.map((t=>(function(e,t){Mt[e].delete(t),0===Mt[e].size&&delete Mt[e]}(e,t),t().then((e=>e.default||e))))));return r.then((t=>Nt(e,...t)))}const Rt={};function Ut(e){if(!Ot(e))return e in Rt?Rt[e]:Promise.resolve();const t=function(e){return Wt(e).map((e=>{const t=Ct(e);return[e,t?[...t]:[]]})).filter((([,e])=>e.length>0))}(e);return Rt[e]=Promise.all(t.map((([e,t])=>It(e,t)))).then((()=>{if(Ot(e))return Ut(e);delete Rt[e]})),Rt[e]}const Gt={fallbackLocale:null,loadingDelay:200,formats:{number:{scientific:{notation:"scientific"},engineering:{notation:"engineering"},compactLong:{notation:"compact",compactDisplay:"long"},compactShort:{notation:"compact",compactDisplay:"short"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},warnOnMissingMessages:!0,handleMissingMessage:void 0,ignoreTag:!0};function Dt(){return Gt}const $t=x(!1);var xt=Object.defineProperty,kt=Object.defineProperties,Ft=Object.getOwnPropertyDescriptors,jt=Object.getOwnPropertySymbols,Vt=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,Kt=(e,t,r)=>t in e?xt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;let zt;const Yt=x(null);function Zt(e){return e.split("-").map(((e,t,r)=>r.slice(0,t+1).join("-"))).reverse()}function Wt(e,t=Dt().fallbackLocale){const r=Zt(e);return t?[...new Set([...r,...Zt(t)])]:r}function Jt(){return null!=zt?zt:void 0}Yt.subscribe((e=>{zt=null!=e?e:void 0,"undefined"!=typeof window&&null!=e&&document.documentElement.setAttribute("lang",e)}));const Qt=(qt=((e,t)=>{for(var r in t||(t={}))Vt.call(t,r)&&Kt(e,r,t[r]);if(jt)for(var r of jt(t))Xt.call(t,r)&&Kt(e,r,t[r]);return e})({},Yt),kt(qt,Ft({set:e=>{if(e&&function(e){if(null==e)return;const t=Wt(e);for(let e=0;e<t.length;e++){const r=t[e];if(Pt(r))return r}}(e)&&Ot(e)){const{loadingDelay:t}=Dt();let r;return"undefined"!=typeof window&&null!=Jt()&&t?r=window.setTimeout((()=>$t.set(!0)),t):$t.set(!0),Ut(e).then((()=>{Yt.set(e)})).finally((()=>{clearTimeout(r),$t.set(!1)}))}return Yt.set(e)}})));var qt;const er=e=>{const t=Object.create(null);return r=>{const n=JSON.stringify(r);return n in t?t[n]:t[n]=e(r)}};var tr=Object.defineProperty,rr=Object.getOwnPropertySymbols,nr=Object.prototype.hasOwnProperty,ir=Object.prototype.propertyIsEnumerable,or=(e,t,r)=>t in e?tr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,sr=(e,t)=>{for(var r in t||(t={}))nr.call(t,r)&&or(e,r,t[r]);if(rr)for(var r of rr(t))ir.call(t,r)&&or(e,r,t[r]);return e},ar=(e,t)=>{var r={};for(var n in e)nr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&rr)for(var n of rr(e))t.indexOf(n)<0&&ir.call(e,n)&&(r[n]=e[n]);return r};const hr=(e,t)=>{const{formats:r}=Dt();if(e in r&&t in r[e])return r[e][t];throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`)},lr=er((e=>{var t=e,{locale:r,format:n}=t,i=ar(t,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format numbers');return n&&(i=hr("number",n)),new Intl.NumberFormat(r,i)})),cr=er((e=>{var t=e,{locale:r,format:n}=t,i=ar(t,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format dates');return n?i=hr("date",n):0===Object.keys(i).length&&(i=hr("date","short")),new Intl.DateTimeFormat(r,i)})),ur=er((e=>{var t=e,{locale:r,format:n}=t,i=ar(t,["locale","format"]);if(null==r)throw new Error('[svelte-i18n] A "locale" must be set to format time values');return n?i=hr("time",n):0===Object.keys(i).length&&(i=hr("time","short")),new Intl.DateTimeFormat(r,i)})),fr=er((
586
586
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
587
- (e,t=Jt())=>new Ht(e,t,Dt().formats,{ignoreTag:Dt().ignoreTag}))),pr=(e,t={})=>{var r,n,i,o;let s=t;"object"==typeof e&&(s=e,e=s.id);const{values:a,locale:h=Jt(),default:l}=s;if(null==h)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=At(e,h);if(c){if("string"!=typeof c)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),c}else c=null!=(o=null!=(i=null==(n=(r=Dt()).handleMissingMessage)?void 0:n.call(r,{locale:h,id:e,defaultValue:l}))?i:l)?o:e;if(!a)return c;let u=c;try{u=fr(c,h).format(a)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return u},mr=(e,t)=>((e={})=>{var t=e,{locale:r=Jt()}=t,n=ar(t,["locale"]);return ur(sr({locale:r},n))})(t).format(e),gr=(e,t)=>((e={})=>{var t=e,{locale:r=Jt()}=t,n=ar(t,["locale"]);return cr(sr({locale:r},n))})(t).format(e),dr=(e,t)=>((e={})=>{var t=e,{locale:r=Jt()}=t,n=ar(t,["locale"]);return lr(sr({locale:r},n))})(t).format(e),br=(e,t=Jt())=>At(e,t),Er=k([Qt,St],(()=>pr));function yr(e,t){Nt(e,t)}k([Qt],(()=>mr)),k([Qt],(()=>gr)),k([Qt],(()=>dr)),k([Qt,St],(()=>br));const vr={en:{generalMin:"Min",generalMax:"Max",showAll:"Show All",showLess:"Show Less"},uk:{generalMin:"Мін",generalMax:"Макс"}};
588
- /* src/CashierMethodsList.svelte generated by Svelte v3.59.2 */function Tr(e,t,r){const n=e.slice();return n[31]=t[r],n[33]=r,n}
589
- // (120:4) {#each paymentMethodsToShow as payMeth, index}
590
- function Hr(e){let t,r,i,o,s,a,l,v,T,H,_,B,A,L,S,P,w,N,M,C,O,I,R,U,G,D,$,x=/*payMeth*/(e[31].Label||/*payMeth*/e[31].Name)+"",k=/*$_*/e[3]("generalMin")+"",F=/*payMeth*/e[31].DisplayCurrency.MinAmountLimit+"",j=/*payMeth*/e[31].DisplayCurrency.Name+"",V=/*$_*/e[3]("generalMax")+"",X=/*payMeth*/e[31].DisplayCurrency.MaxAmountLimit+"",K=/*payMeth*/e[31].DisplayCurrency.Name+"";function z(){/*click_handler*/
591
- return e[15](/*payMeth*/e[31])}return{c(){t=p("div"),r=p("div"),i=p("img"),a=g(),l=p("div"),v=p("span"),T=m(x),H=g(),_=p("div"),B=p("span"),A=m(k),L=g(),S=m(F),P=g(),w=m(j),N=g(),M=p("span"),C=m(V),O=g(),I=m(X),R=g(),U=m(K),G=g(),h(i.src,o=/*payMeth*/e[31].LogoUrl)||b(i,"src",o),b(i,"alt",s=/*payMeth*/e[31].Label),b(r,"class","MethodLogo"),b(l,"class","MethodTitle"),b(B,"class","Limits"),b(M,"class","Limits"),b(_,"class","MethodLimits"),b(t,"class","SelectorWrapper"),y(t,"checked",/*selectedPaymentMethod*/e[0]===/*payMeth*/e[31].Name)},m(e,n){u(e,t,n),c(t,r),c(r,i),c(t,a),c(t,l),c(l,v),c(v,T),c(t,H),c(t,_),c(_,B),c(B,A),c(B,L),c(B,S),c(B,P),c(B,w),c(_,N),c(_,M),c(M,C),c(M,O),c(M,I),c(M,R),c(M,U),c(t,G),D||($=[d(t,"click",z),d(t,"keyup",Ar)],D=!0)},p(r,n){e=r,/*paymentMethodsToShow*/4&n[0]&&!h(i.src,o=/*payMeth*/e[31].LogoUrl)&&b(i,"src",o),/*paymentMethodsToShow*/4&n[0]&&s!==(s=/*payMeth*/e[31].Label)&&b(i,"alt",s),/*paymentMethodsToShow*/4&n[0]&&x!==(x=/*payMeth*/(e[31].Label||/*payMeth*/e[31].Name)+"")&&E(T,x),/*$_*/8&n[0]&&k!==(k=/*$_*/e[3]("generalMin")+"")&&E(A,k),/*paymentMethodsToShow*/4&n[0]&&F!==(F=/*payMeth*/e[31].DisplayCurrency.MinAmountLimit+"")&&E(S,F),/*paymentMethodsToShow*/4&n[0]&&j!==(j=/*payMeth*/e[31].DisplayCurrency.Name+"")&&E(w,j),/*$_*/8&n[0]&&V!==(V=/*$_*/e[3]("generalMax")+"")&&E(C,V),/*paymentMethodsToShow*/4&n[0]&&X!==(X=/*payMeth*/e[31].DisplayCurrency.MaxAmountLimit+"")&&E(I,X),/*paymentMethodsToShow*/4&n[0]&&K!==(K=/*payMeth*/e[31].DisplayCurrency.Name+"")&&E(U,K),/*selectedPaymentMethod, paymentMethodsToShow*/5&n[0]&&y(t,"checked",/*selectedPaymentMethod*/e[0]===/*payMeth*/e[31].Name)},d(e){e&&f(t),D=!1,n($)}}}
592
- // (136:2) {#if methodsButtonToogleText}
593
- function _r(e){let t,r,n,i;return{c(){t=p("div"),r=m(/*methodsButtonToogleText*/e[1]),b(t,"class","ShowAllButton")},m(o,s){u(o,t,s),c(t,r),n||(i=d(t,"click",/*click_handler_1*/e[16]),n=!0)},p(e,t){/*methodsButtonToogleText*/2&t[0]&&E(r,/*methodsButtonToogleText*/e[1])},d(e){e&&f(t),n=!1,i()}}}function Br(t){let r,n,i,o=/*paymentMethodsToShow*/t[2],s=[];for(let e=0;e<o.length;e+=1)s[e]=Hr(Tr(t,o,e));let a=/*methodsButtonToogleText*/t[1]&&_r(t);return{c(){r=p("div"),n=p("div");for(let e=0;e<s.length;e+=1)s[e].c();i=g(),a&&a.c(),this.c=e,b(n,"class","CashierMethodList")},m(e,t){u(e,r,t),c(r,n);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(n,null);c(r,i),a&&a.m(r,null)},p(e,t){if(/*selectedPaymentMethod, paymentMethodsToShow, selectPayMeth, $_*/29&t[0]){let r;for(o=/*paymentMethodsToShow*/e[2],r=0;r<o.length;r+=1){const i=Tr(e,o,r);s[r]?s[r].p(i,t):(s[r]=Hr(i),s[r].c(),s[r].m(n,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=o.length}/*methodsButtonToogleText*/e[1]?a?a.p(e,t):(a=_r(e),a.c(),a.m(r,null)):a&&(a.d(1),a=null)},i:e,o:e,d(e){e&&f(r),function(e,t){for(let r=0;r<e.length;r+=1)e[r]&&e[r].d(t)}(s,e),a&&a.d()}}}const Ar=()=>{};function Lr(e,t,r){let n;var i,o;i=Er,o=e=>r(3,n=e),e.$$.on_destroy.push(l(i,o));let s,{lang:a="en"}=t,{endpoint:h}=t,{session:c}=t,{customerid:u}=t,{currency:f}=t,{numberofmethodsshown:p}=t,{translationurl:m=""}=t,{clientstyling:g=""}=t,{clientstylingurl:d=""}=t,b=[],E="",y=[];H();Object.keys(vr).forEach((e=>{yr(e,vr[e])}));const v=()=>{var e;e=a,Qt.set(e)},T=e=>{r(0,s=e.Name),dispatchEvent(new CustomEvent("selectPayMeth",{detail:e,bubbles:!0,cancelable:!0,composed:!0}))},_=()=>{y==b?A():B()},B=()=>{r(2,y=b),r(1,E=n("showLess"))},A=()=>{r(2,y=b.slice(0,+p)),s&&!y.find((e=>e.Name===s))&&y.splice(0,0,b.find((e=>e.Name===s))),r(1,E=n("showAll"))};return e.$$set=e=>{"lang"in e&&r(6,a=e.lang),"endpoint"in e&&r(7,h=e.endpoint),"session"in e&&r(8,c=e.session),"customerid"in e&&r(9,u=e.customerid),"currency"in e&&r(10,f=e.currency),"numberofmethodsshown"in e&&r(11,p=e.numberofmethodsshown),"translationurl"in e&&r(12,m=e.translationurl),"clientstyling"in e&&r(13,g=e.clientstyling),"clientstylingurl"in e&&r(14,d=e.clientstylingurl)},e.$$.update=()=>{/*endpoint, session, customerid*/896&e.$$.dirty[0]&&h&&c&&u&&(()=>{const e=new URL(`${h}/v1/player/${u}/payment/GetPaymentMetadata`),t=new Headers;t.append("accept","application/json"),t.append("Content-Type","application/json");const i={method:"POST",headers:t,body:JSON.stringify({XPaymentSessionToken:c,Currency:f})};fetch(e,i).then((e=>e.json())).then((e=>{b=e.PaymentMethods.PaymentMethods.map((e=>Object.assign(Object.assign({},e),{LogoUrl:e.Logos&&e.Logos[0].LogoUrl?`https:${e.Logos[0].LogoUrl}`:""}))),r(1,E=p&&+p>0&&b.length>+p?n("showAll"):""),r(2,y=E?b.slice(0,+p):b)}))})(),/*lang*/64&e.$$.dirty[0]&&a&&v(),/*translationurl*/4096&e.$$.dirty[0]&&m&&(()=>{if(m)fetch(m).then((e=>e.json())).then((e=>{Object.keys(e).forEach((t=>{yr(t,e[t])}))})).catch((e=>{console.log(e)}))})(),e.$$.dirty[0],e.$$.dirty[0]},[s,E,y,n,T,_,a,h,c,u,f,p,m,g,d,e=>T(e),()=>_()]}class Sr extends D{constructor(e){super();const t=document.createElement("style");t.textContent='*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CashierMethodList{display:flex;flex-direction:column;background:var(--emw--color-background, #FFF);box-shadow:0 0 4px rgba(0, 0, 0, 0.1);width:100%;border-radius:var(--emw--border-radius-large, 6px)}.CashierMethodList .SelectorWrapper{display:flex;flex-direction:row;align-items:center;justify-content:left;cursor:pointer;position:relative;height:52px;box-sizing:border-box;border-bottom:1px solid var(--emw--color-gray-100, #E8E9EB);padding:0 12px}.CashierMethodList .SelectorWrapper:first-child{border-radius:var(--emw--border-radius-large, 6px) var(--emw--border-radius-large, 6px) 0 0}.CashierMethodList .SelectorWrapper:last-child{border-radius:0 0 var(--emw--border-radius-large, 6px) var(--emw--border-radius-large, 6px)}.CashierMethodList .SelectorWrapper.checked{background:var(--emw--color-background-secondary, #F9F9F9)}.CashierMethodList .MethodLogo{margin-right:7px;width:56px;height:32px;background:var(--emw--color-background, #FFF);border:1px solid var(--emw--color-gray-100, #E8E9EB);border-radius:var(--emw--border-radius-large, 6px);overflow:hidden}.CashierMethodList .MethodLogo img{width:inherit;height:inherit}.CashierMethodList .MethodTitle{color:var(--emw--color-black, #111);font-size:var(--emw--font-size-small, 14px);word-break:break-all;font-feature-settings:"numr" on}.CashierMethodList .MethodLimits{display:flex;flex-direction:column;align-items:flex-end;margin-left:auto}.CashierMethodList .MethodLimits .Limits{max-width:100%;white-space:nowrap;font-size:var(--emw--font-size-2x-small, 11px);line-height:var(--emw--size-small, 14px);color:var(--emw--color-gray-300, #666);font-weight:var(--emw--font-weight-normal, 400);font-style:normal}.ShowAllButton{cursor:pointer;color:var(--emw--color-primary, #292929);text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:var(--emw--font-weight-semibold, 500);line-height:normal;text-transform:uppercase;border:1px solid var(--emw--color-gray-100, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);margin:12px auto;height:36px;display:flex;align-items:center;justify-content:center;width:80%}',this.shadowRoot.appendChild(t),G(this,{target:this.shadowRoot,props:v(this.attributes),customElement:!0},Lr,Br,o,{lang:6,endpoint:7,session:8,customerid:9,currency:10,numberofmethodsshown:11,translationurl:12,clientstyling:13,clientstylingurl:14},null,[-1,-1]),e&&(e.target&&u(e.target,this,e.anchor),e.props&&(this.$set(e.props),C()))}static get observedAttributes(){return["lang","endpoint","session","customerid","currency","numberofmethodsshown","translationurl","clientstyling","clientstylingurl"]}get lang(){return this.$$.ctx[6]}set lang(e){this.$$set({lang:e}),C()}get endpoint(){return this.$$.ctx[7]}set endpoint(e){this.$$set({endpoint:e}),C()}get session(){return this.$$.ctx[8]}set session(e){this.$$set({session:e}),C()}get customerid(){return this.$$.ctx[9]}set customerid(e){this.$$set({customerid:e}),C()}get currency(){return this.$$.ctx[10]}set currency(e){this.$$set({currency:e}),C()}get numberofmethodsshown(){return this.$$.ctx[11]}set numberofmethodsshown(e){this.$$set({numberofmethodsshown:e}),C()}get translationurl(){return this.$$.ctx[12]}set translationurl(e){this.$$set({translationurl:e}),C()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(e){this.$$set({clientstyling:e}),C()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),C()}}return!customElements.get("cashier-methods-list")&&customElements.define("cashier-methods-list",Sr),Sr}));
587
+ (e,t=Jt())=>new Ht(e,t,Dt().formats,{ignoreTag:Dt().ignoreTag}))),pr=(e,t={})=>{var r,n,i,o;let s=t;"object"==typeof e&&(s=e,e=s.id);const{values:a,locale:h=Jt(),default:l}=s;if(null==h)throw new Error("[svelte-i18n] Cannot format a message without first setting the initial locale.");let c=At(e,h);if(c){if("string"!=typeof c)return console.warn(`[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof c}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`),c}else c=null!=(o=null!=(i=null==(n=(r=Dt()).handleMissingMessage)?void 0:n.call(r,{locale:h,id:e,defaultValue:l}))?i:l)?o:e;if(!a)return c;let u=c;try{u=fr(c,h).format(a)}catch(t){t instanceof Error&&console.warn(`[svelte-i18n] Message "${e}" has syntax error:`,t.message)}return u},mr=(e,t)=>((e={})=>{var t=e,{locale:r=Jt()}=t,n=ar(t,["locale"]);return ur(sr({locale:r},n))})(t).format(e),gr=(e,t)=>((e={})=>{var t=e,{locale:r=Jt()}=t,n=ar(t,["locale"]);return cr(sr({locale:r},n))})(t).format(e),dr=(e,t)=>((e={})=>{var t=e,{locale:r=Jt()}=t,n=ar(t,["locale"]);return lr(sr({locale:r},n))})(t).format(e),br=(e,t=Jt())=>At(e,t),Er=k([Qt,St],(()=>pr));k([Qt],(()=>mr)),k([Qt],(()=>gr)),k([Qt],(()=>dr)),k([Qt,St],(()=>br));const yr={en:{generalMin:"Min",generalMax:"Max",showAll:"Show All",showLess:"Show Less"},uk:{generalMin:"Мін",generalMax:"Макс"}};
588
+ /* src/CashierMethodsList.svelte generated by Svelte v3.59.2 */function vr(e,t,r){const n=e.slice();return n[31]=t[r],n[33]=r,n}
589
+ // (119:4) {#each paymentMethodsToShow as payMeth, index}
590
+ function Tr(e){let t,r,i,o,s,a,l,v,T,H,_,B,A,L,S,P,w,N,M,C,O,I,R,U,G,D,$,x=/*payMeth*/(e[31].Label||/*payMeth*/e[31].Name)+"",k=/*$_*/e[3]("generalMin")+"",F=/*payMeth*/e[31].DisplayCurrency.MinAmountLimit+"",j=/*payMeth*/e[31].DisplayCurrency.Name+"",V=/*$_*/e[3]("generalMax")+"",X=/*payMeth*/e[31].DisplayCurrency.MaxAmountLimit+"",K=/*payMeth*/e[31].DisplayCurrency.Name+"";function z(){/*click_handler*/
591
+ return e[15](/*payMeth*/e[31])}return{c(){t=p("div"),r=p("div"),i=p("img"),a=g(),l=p("div"),v=p("span"),T=m(x),H=g(),_=p("div"),B=p("span"),A=m(k),L=g(),S=m(F),P=g(),w=m(j),N=g(),M=p("span"),C=m(V),O=g(),I=m(X),R=g(),U=m(K),G=g(),h(i.src,o=/*payMeth*/e[31].LogoUrl)||b(i,"src",o),b(i,"alt",s=/*payMeth*/e[31].Label),b(r,"class","MethodLogo"),b(l,"class","MethodTitle"),b(B,"class","Limits"),b(M,"class","Limits"),b(_,"class","MethodLimits"),b(t,"class","SelectorWrapper"),y(t,"checked",/*selectedPaymentMethod*/e[0]===/*payMeth*/e[31].Name)},m(e,n){u(e,t,n),c(t,r),c(r,i),c(t,a),c(t,l),c(l,v),c(v,T),c(t,H),c(t,_),c(_,B),c(B,A),c(B,L),c(B,S),c(B,P),c(B,w),c(_,N),c(_,M),c(M,C),c(M,O),c(M,I),c(M,R),c(M,U),c(t,G),D||($=[d(t,"click",z),d(t,"keyup",Br)],D=!0)},p(r,n){e=r,/*paymentMethodsToShow*/4&n[0]&&!h(i.src,o=/*payMeth*/e[31].LogoUrl)&&b(i,"src",o),/*paymentMethodsToShow*/4&n[0]&&s!==(s=/*payMeth*/e[31].Label)&&b(i,"alt",s),/*paymentMethodsToShow*/4&n[0]&&x!==(x=/*payMeth*/(e[31].Label||/*payMeth*/e[31].Name)+"")&&E(T,x),/*$_*/8&n[0]&&k!==(k=/*$_*/e[3]("generalMin")+"")&&E(A,k),/*paymentMethodsToShow*/4&n[0]&&F!==(F=/*payMeth*/e[31].DisplayCurrency.MinAmountLimit+"")&&E(S,F),/*paymentMethodsToShow*/4&n[0]&&j!==(j=/*payMeth*/e[31].DisplayCurrency.Name+"")&&E(w,j),/*$_*/8&n[0]&&V!==(V=/*$_*/e[3]("generalMax")+"")&&E(C,V),/*paymentMethodsToShow*/4&n[0]&&X!==(X=/*payMeth*/e[31].DisplayCurrency.MaxAmountLimit+"")&&E(I,X),/*paymentMethodsToShow*/4&n[0]&&K!==(K=/*payMeth*/e[31].DisplayCurrency.Name+"")&&E(U,K),/*selectedPaymentMethod, paymentMethodsToShow*/5&n[0]&&y(t,"checked",/*selectedPaymentMethod*/e[0]===/*payMeth*/e[31].Name)},d(e){e&&f(t),D=!1,n($)}}}
592
+ // (135:2) {#if methodsButtonToogleText}
593
+ function Hr(e){let t,r,n,i;return{c(){t=p("div"),r=m(/*methodsButtonToogleText*/e[1]),b(t,"class","ShowAllButton")},m(o,s){u(o,t,s),c(t,r),n||(i=d(t,"click",/*click_handler_1*/e[16]),n=!0)},p(e,t){/*methodsButtonToogleText*/2&t[0]&&E(r,/*methodsButtonToogleText*/e[1])},d(e){e&&f(t),n=!1,i()}}}function _r(t){let r,n,i,o=/*paymentMethodsToShow*/t[2],s=[];for(let e=0;e<o.length;e+=1)s[e]=Tr(vr(t,o,e));let a=/*methodsButtonToogleText*/t[1]&&Hr(t);return{c(){r=p("div"),n=p("div");for(let e=0;e<s.length;e+=1)s[e].c();i=g(),a&&a.c(),this.c=e,b(n,"class","CashierMethodList")},m(e,t){u(e,r,t),c(r,n);for(let e=0;e<s.length;e+=1)s[e]&&s[e].m(n,null);c(r,i),a&&a.m(r,null)},p(e,t){if(/*selectedPaymentMethod, paymentMethodsToShow, selectPayMeth, $_*/29&t[0]){let r;for(o=/*paymentMethodsToShow*/e[2],r=0;r<o.length;r+=1){const i=vr(e,o,r);s[r]?s[r].p(i,t):(s[r]=Tr(i),s[r].c(),s[r].m(n,null))}for(;r<s.length;r+=1)s[r].d(1);s.length=o.length}/*methodsButtonToogleText*/e[1]?a?a.p(e,t):(a=Hr(e),a.c(),a.m(r,null)):a&&(a.d(1),a=null)},i:e,o:e,d(e){e&&f(r),function(e,t){for(let r=0;r<e.length;r+=1)e[r]&&e[r].d(t)}(s,e),a&&a.d()}}}const Br=()=>{};function Ar(e,t,r){let n;var i,o;i=Er,o=e=>r(3,n=e),e.$$.on_destroy.push(l(i,o));let s,{lang:a="en"}=t,{endpoint:h}=t,{session:c}=t,{customerid:u}=t,{currency:f}=t,{numberofmethodsshown:p}=t,{translationurl:m=""}=t,{clientstyling:g=""}=t,{clientstylingurl:d=""}=t,b=[],E="",y=[];H(),Object.keys(yr).forEach((e=>{!function(e,t){Nt(e,t)}(e,yr[e])}));const v=()=>{var e;e=a,Qt.set(e)},T=e=>{r(0,s=e.Name),dispatchEvent(new CustomEvent("selectPayMeth",{detail:e,bubbles:!0,cancelable:!0,composed:!0}))},_=()=>{y==b?A():B()},B=()=>{r(2,y=b),r(1,E=n("showLess"))},A=()=>{r(2,y=b.slice(0,+p)),s&&!y.find((e=>e.Name===s))&&y.splice(0,0,b.find((e=>e.Name===s))),r(1,E=n("showAll"))};return e.$$set=e=>{"lang"in e&&r(6,a=e.lang),"endpoint"in e&&r(7,h=e.endpoint),"session"in e&&r(8,c=e.session),"customerid"in e&&r(9,u=e.customerid),"currency"in e&&r(10,f=e.currency),"numberofmethodsshown"in e&&r(11,p=e.numberofmethodsshown),"translationurl"in e&&r(12,m=e.translationurl),"clientstyling"in e&&r(13,g=e.clientstyling),"clientstylingurl"in e&&r(14,d=e.clientstylingurl)},e.$$.update=()=>{/*endpoint, session, customerid*/896&e.$$.dirty[0]&&h&&c&&u&&(()=>{const e=new URL(`${h}/v1/player/${u}/payment/GetPaymentMetadata`),t=new Headers;t.append("accept","application/json"),t.append("Content-Type","application/json");const i={method:"POST",headers:t,body:JSON.stringify({XPaymentSessionToken:c,Currency:f})};fetch(e,i).then((e=>e.json())).then((e=>{b=e.PaymentMethods.PaymentMethods.map((e=>Object.assign(Object.assign({},e),{LogoUrl:e.Logos&&e.Logos[0].LogoUrl?`https:${e.Logos[0].LogoUrl}`:""}))),r(1,E=p&&+p>0&&b.length>+p?n("showAll"):""),r(2,y=E?b.slice(0,+p):b)}))})(),/*lang*/64&e.$$.dirty[0]&&a&&v(),e.$$.dirty[0],e.$$.dirty[0]},[s,E,y,n,T,_,a,h,c,u,f,p,m,g,d,e=>T(e),()=>_()]}class Lr extends D{constructor(e){super();const t=document.createElement("style");t.textContent='*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CashierMethodList{display:flex;flex-direction:column;background:var(--emw--color-background, #FFF);box-shadow:0 0 4px rgba(0, 0, 0, 0.1);width:100%;border-radius:var(--emw--border-radius-large, 6px)}.CashierMethodList .SelectorWrapper{display:flex;flex-direction:row;align-items:center;justify-content:left;cursor:pointer;position:relative;height:52px;box-sizing:border-box;border-bottom:1px solid var(--emw--color-gray-100, #E8E9EB);padding:0 12px}.CashierMethodList .SelectorWrapper:first-child{border-radius:var(--emw--border-radius-large, 6px) var(--emw--border-radius-large, 6px) 0 0}.CashierMethodList .SelectorWrapper:last-child{border-radius:0 0 var(--emw--border-radius-large, 6px) var(--emw--border-radius-large, 6px)}.CashierMethodList .SelectorWrapper.checked{background:var(--emw--color-background-secondary, #F9F9F9)}.CashierMethodList .MethodLogo{margin-right:7px;width:56px;height:32px;background:var(--emw--color-background, #FFF);border:1px solid var(--emw--color-gray-100, #E8E9EB);border-radius:var(--emw--border-radius-large, 6px);overflow:hidden}.CashierMethodList .MethodLogo img{width:inherit;height:inherit}.CashierMethodList .MethodTitle{color:var(--emw--color-black, #111);font-size:var(--emw--font-size-small, 14px);word-break:break-all;font-feature-settings:"numr" on}.CashierMethodList .MethodLimits{display:flex;flex-direction:column;align-items:flex-end;margin-left:auto}.CashierMethodList .MethodLimits .Limits{max-width:100%;white-space:nowrap;font-size:var(--emw--font-size-2x-small, 11px);line-height:var(--emw--size-small, 14px);color:var(--emw--color-gray-300, #666);font-weight:var(--emw--font-weight-normal, 400);font-style:normal}.ShowAllButton{cursor:pointer;color:var(--emw--color-primary, #292929);text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:var(--emw--font-weight-semibold, 500);line-height:normal;text-transform:uppercase;border:1px solid var(--emw--color-gray-100, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);margin:12px auto;height:36px;display:flex;align-items:center;justify-content:center;width:80%}',this.shadowRoot.appendChild(t),G(this,{target:this.shadowRoot,props:v(this.attributes),customElement:!0},Ar,_r,o,{lang:6,endpoint:7,session:8,customerid:9,currency:10,numberofmethodsshown:11,translationurl:12,clientstyling:13,clientstylingurl:14},null,[-1,-1]),e&&(e.target&&u(e.target,this,e.anchor),e.props&&(this.$set(e.props),C()))}static get observedAttributes(){return["lang","endpoint","session","customerid","currency","numberofmethodsshown","translationurl","clientstyling","clientstylingurl"]}get lang(){return this.$$.ctx[6]}set lang(e){this.$$set({lang:e}),C()}get endpoint(){return this.$$.ctx[7]}set endpoint(e){this.$$set({endpoint:e}),C()}get session(){return this.$$.ctx[8]}set session(e){this.$$set({session:e}),C()}get customerid(){return this.$$.ctx[9]}set customerid(e){this.$$set({customerid:e}),C()}get currency(){return this.$$.ctx[10]}set currency(e){this.$$set({currency:e}),C()}get numberofmethodsshown(){return this.$$.ctx[11]}set numberofmethodsshown(e){this.$$set({numberofmethodsshown:e}),C()}get translationurl(){return this.$$.ctx[12]}set translationurl(e){this.$$set({translationurl:e}),C()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(e){this.$$set({clientstyling:e}),C()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),C()}}return!customElements.get("cashier-methods-list")&&customElements.define("cashier-methods-list",Lr),Lr}));
594
594
  //# sourceMappingURL=cashier-methods-list.js.map