@everymatrix/casino-jackpot-banner 1.17.2 → 1.17.3

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.
@@ -648,9 +648,9 @@ function Ln(t){let e,r=Array(4),n=[];for(let e=0;e<r.length;e+=1)n[e]=Cn(An(t,r,
648
648
  function Cn(t){let e,r,n,i,o,s,a,b,g,v,E,_,T=/*formattedLabels*/t[8][/*i*/t[50]]+"",w=/*formattedJackpotValues*/(t[7][/*i*/t[50]]??"")+"";return{c(){e=p("div"),r=p("div"),n=p("img"),o=p("span"),s=f(T),a=p("span"),b=p("span"),g=f(w),v=d(),E=p("span"),_=f(/*currency*/t[1]),m(n,"class","displayCardIcon"),c(n.src,i=/*caticons*/t[9][/*i*/t[50]])||m(n,"src",i),m(n,"alt",""),m(o,"class","cardLabel"),m(r,"class","iconWrapper"),m(b,"class","jackpotValue"),m(E,"class","jackpot-currency"),m(a,"class","cardTextWrapper"),m(e,"class","displayCard")},m(t,i){u(t,e,i),l(e,r),l(r,n),l(r,o),l(o,s),l(e,a),l(a,b),l(b,g),l(a,v),l(a,E),l(E,_)},p(t,e){/*caticons*/512&e[0]&&!c(n.src,i=/*caticons*/t[9][/*i*/t[50]])&&m(n,"src",i),/*formattedLabels*/256&e[0]&&T!==(T=/*formattedLabels*/t[8][/*i*/t[50]]+"")&&y(s,T),/*formattedJackpotValues*/128&e[0]&&w!==(w=/*formattedJackpotValues*/(t[7][/*i*/t[50]]??"")+"")&&y(g,w),/*currency*/2&e[0]&&y(_,/*currency*/t[1])},d(t){t&&h(e)}}}function On(e){let r;function n(t,e){/*hasErrors*/
649
649
  return t[13]?Sn:/*isLoading*/t[3]?Hn:Bn}let i=n(e),o=i(e);return{c(){r=p("div"),o.c(),this.c=t},m(t,n){u(t,r,n),o.m(r,null),
650
650
  /*div_binding*/e[32](r)},p(t,e){i===(i=n(t))&&o?o.p(t,e):(o.d(1),o=i(t),o&&(o.c(),o.m(r,null)))},i:t,o:t,d(t){t&&h(r),o.d(),
651
- /*div_binding*/e[32](null)}}}function xn(t,e,r){let n,i,{visualstructure:o=""}=e,{title:s=""}=e,{caticon0:a=""}=e,{caticon1:c=""}=e,{caticon2:l=""}=e,{caticon3:u=""}=e,{iconlabels:h=""}=e,{backgroundsrc:p=""}=e,{currency:f=""}=e,{backgroundsrcmobile:d=""}=e,{titlelogopath:m=""}=e,{lang:y="en"}=e,{clientstyling:b=""}=e,{clientstylingurl:g=""}=e,{translationurl:v=""}=e,{endpoint:E=""}=e,{gameid:T=""}=e,w=window.navigator.userAgent,A=!1,B=!1,H="",S=[],P=[],L=[],C=[],O=[],x="",I="",N=!1,R=!0,M=!1;Object.keys(wn).forEach((t=>{Tn(t,wn[t])}));const U=["typeSpread","typeLeft"],$=()=>{if(E&&y&&f){let t=new URL(`${E}/casino/jackpots`);t.searchParams.append("filter",`id=${T}`),t.searchParams.append("language",y),t.searchParams.append("additionalDataCurrency",f),fetch(t.href).then((t=>t.json().then((t=>{r(3,R=!1),i=t,P.includes(T)&&((t=>{var e;const r=null===(e=null==t?void 0:t.items[0])||void 0===e?void 0:e.additionalData;r&&Object.values(r).forEach((t=>S.push(+t)))})(i),(t=>{var e;r(6,H=(null===(e=null==t?void 0:t.items[0])||void 0===e?void 0:e.vendorLogo)||"")})(i))})).catch((t=>{r(13,M=!0),r(3,R=!1),console.error(t)}))))}},D=t=>t.map((t=>Intl.NumberFormat("en-US",{maximumFractionDigits:2}).format(t))),k=()=>{const t=window.innerHeight/window.innerWidth;return.75<t&&t<1.6},G=()=>{window.postMessage({type:"JackpotBannerClicked",gameid:T},window.location.href),
651
+ /*div_binding*/e[32](null)}}}function xn(t,e,r){let n,i,{visualstructure:o=""}=e,{title:s=""}=e,{caticon0:a=""}=e,{caticon1:c=""}=e,{caticon2:l=""}=e,{caticon3:u=""}=e,{iconlabels:h=""}=e,{backgroundsrc:p=""}=e,{currency:f=""}=e,{backgroundsrcmobile:d=""}=e,{titlelogopath:m=""}=e,{lang:y="en"}=e,{clientstyling:b=""}=e,{clientstylingurl:g=""}=e,{translationurl:v=""}=e,{endpoint:E=""}=e,{gameid:T=""}=e,w=window.navigator.userAgent,A=!1,B=!1,H="",S=[],P=[],L=[],C=[],O=[],x="",I="",N=!1,R=!0,M=!1;Object.keys(wn).forEach((t=>{Tn(t,wn[t])}));const U=["typeSpread","typeLeft"],$=()=>{if(E&&y&&f){let t=new URL(`${E}/v1/casino/jackpots`);t.searchParams.append("filter",`id=${T}`),t.searchParams.append("language",y),t.searchParams.append("additionalDataCurrency",f),fetch(t.href).then((t=>t.json().then((t=>{r(3,R=!1),i=t,P.includes(T)&&((t=>{var e;const r=null===(e=null==t?void 0:t.items[0])||void 0===e?void 0:e.additionalData;r&&Object.values(r).forEach((t=>S.push(+t)))})(i),(t=>{var e;r(6,H=(null===(e=null==t?void 0:t.items[0])||void 0===e?void 0:e.vendorLogo)||"")})(i))})).catch((t=>{r(13,M=!0),r(3,R=!1),console.error(t)}))))}},D=t=>t.map((t=>Intl.NumberFormat("en-US",{maximumFractionDigits:2}).format(t))),k=()=>{const t=window.innerHeight/window.innerWidth;return.75<t&&t<1.6},G=()=>{window.postMessage({type:"JackpotBannerClicked",gameid:T},window.location.href),
652
652
  //Analytics event
653
- "function"==typeof gtag&&gtag("event","JackpotBannerClicked",{context:"JackpotBanner",gameId:`${T}`})},j=()=>{var t;t=y,en.set(t)};return t.$$set=t=>{"visualstructure"in t&&r(0,o=t.visualstructure),"title"in t&&r(15,s=t.title),"caticon0"in t&&r(16,a=t.caticon0),"caticon1"in t&&r(17,c=t.caticon1),"caticon2"in t&&r(18,l=t.caticon2),"caticon3"in t&&r(19,u=t.caticon3),"iconlabels"in t&&r(20,h=t.iconlabels),"backgroundsrc"in t&&r(21,p=t.backgroundsrc),"currency"in t&&r(1,f=t.currency),"backgroundsrcmobile"in t&&r(22,d=t.backgroundsrcmobile),"titlelogopath"in t&&r(23,m=t.titlelogopath),"lang"in t&&r(24,y=t.lang),"clientstyling"in t&&r(25,b=t.clientstyling),"clientstylingurl"in t&&r(26,g=t.clientstylingurl),"translationurl"in t&&r(27,v=t.translationurl),"endpoint"in t&&r(28,E=t.endpoint),"gameid"in t&&r(29,T=t.gameid)},t.$$.update=()=>{/*endpoint*/268435456&t.$$.dirty[0]&&E&&(()=>{let t=new URL(`${E}/casino/jackpots/config`);fetch(t.href).then((t=>t.json())).then((t=>{r(30,P=t.egtJackpotIds.map((t=>t)))}))})(),/*customStylingContainer, clientstyling*/33554436&t.$$.dirty[0]&&n&&b&&(()=>{let t=document.createElement("style");t.innerHTML=b,n.appendChild(t)})(),/*customStylingContainer, clientstylingurl*/67108868&t.$$.dirty[0]&&n&&g&&(()=>{r(12,N=!0);let t=new URL(g),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{n.appendChild(e)}),1),setTimeout((()=>{r(12,N=!1)}),500)}))})(),/*endpoint, lang, currency, validGameIds*/1358954498&t.$$.dirty[0]&&E&&y&&f&&P.length>0&&$(),/*currency, lang, isLoading*/16777226&t.$$.dirty[0]&&f&&y&&!R&&(
653
+ "function"==typeof gtag&&gtag("event","JackpotBannerClicked",{context:"JackpotBanner",gameId:`${T}`})},j=()=>{var t;t=y,en.set(t)};return t.$$set=t=>{"visualstructure"in t&&r(0,o=t.visualstructure),"title"in t&&r(15,s=t.title),"caticon0"in t&&r(16,a=t.caticon0),"caticon1"in t&&r(17,c=t.caticon1),"caticon2"in t&&r(18,l=t.caticon2),"caticon3"in t&&r(19,u=t.caticon3),"iconlabels"in t&&r(20,h=t.iconlabels),"backgroundsrc"in t&&r(21,p=t.backgroundsrc),"currency"in t&&r(1,f=t.currency),"backgroundsrcmobile"in t&&r(22,d=t.backgroundsrcmobile),"titlelogopath"in t&&r(23,m=t.titlelogopath),"lang"in t&&r(24,y=t.lang),"clientstyling"in t&&r(25,b=t.clientstyling),"clientstylingurl"in t&&r(26,g=t.clientstylingurl),"translationurl"in t&&r(27,v=t.translationurl),"endpoint"in t&&r(28,E=t.endpoint),"gameid"in t&&r(29,T=t.gameid)},t.$$.update=()=>{/*endpoint*/268435456&t.$$.dirty[0]&&E&&(()=>{let t=new URL(`${E}/v1/casino/jackpots/config`);fetch(t.href).then((t=>t.json())).then((t=>{r(30,P=t.egtJackpotIds.map((t=>t)))}))})(),/*customStylingContainer, clientstyling*/33554436&t.$$.dirty[0]&&n&&b&&(()=>{let t=document.createElement("style");t.innerHTML=b,n.appendChild(t)})(),/*customStylingContainer, clientstylingurl*/67108868&t.$$.dirty[0]&&n&&g&&(()=>{r(12,N=!0);let t=new URL(g),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{n.appendChild(e)}),1),setTimeout((()=>{r(12,N=!1)}),500)}))})(),/*endpoint, lang, currency, validGameIds*/1358954498&t.$$.dirty[0]&&E&&y&&f&&P.length>0&&$(),/*currency, lang, isLoading*/16777226&t.$$.dirty[0]&&f&&y&&!R&&(
654
654
  // Also checking that ratio is above 1 to work with edge cases where the ratio is landscape but the userAgent comes back as mobile
655
655
  r(4,A=(t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)))(w)&&window.innerHeight/window.innerWidth>1),r(5,B=k()),
656
656
  // Format jackpot values & labels