@everymatrix/lottery-game-page 1.49.2 → 1.50.1
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/dist/cjs/helper-accordion_13.cjs.entry.js +4 -4
- package/dist/cjs/helper-pagination.cjs.entry.js +1 -1
- package/dist/cjs/{index-f3851683.js → index-3ecbfc1b.js} +30 -13
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/lottery-game-page.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/esm/helper-accordion_13.entry.js +4 -4
- package/dist/esm/helper-pagination.entry.js +1 -1
- package/dist/esm/{index-8248702b.js → index-7ea78a23.js} +30 -13
- package/dist/esm/loader.js +2 -2
- package/dist/esm/lottery-game-page.js +3 -3
- package/dist/lottery-game-page/lottery-game-page.esm.js +1 -1
- package/dist/lottery-game-page/{p-4254ae78.entry.js → p-41527e32.entry.js} +483 -4
- package/dist/lottery-game-page/p-dcd233c1.js +2 -0
- package/dist/lottery-game-page/{p-89956c67.entry.js → p-dd23f58f.entry.js} +1 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.dev.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +6 -0
- package/package.json +1 -1
- package/dist/lottery-game-page/p-8f2c63c7.js +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.dev.d.ts +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as s,a as o}from"./p-
|
|
1
|
+
import{r as t,c as e,h as i,g as s,a as o}from"./p-dcd233c1.js";const r={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"},hr:{deleteTicket:"Izbriši listić"}},a=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.showContent=void 0,this.limitStylingAppends=!1}connectedCallback(){this.showContent=!this.collapsed}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return i("div",{key:"ad26faefd6e3dd089171c7e2bff13faa5a26d972",class:"Wrapper",ref:t=>this.stylingContainer=t},i("div",{key:"bb7045653ec12a2526029589744f7ef014ec6a6a",class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header",onClick:()=>this.toggleContent()},i("p",{key:"ae30943582063e368e942124d8d5acadc1732629",class:"Title"},this.headerTitle),i("p",{key:"7c35076cb768de784177988900c61fe40a71594c",class:"Subtitle"},this.headerSubtitle),i("p",{key:"daff2b456a427f45b00efc32ba33a68cdc2228f0",class:"Subtitle Description"},this.description),i("span",{key:"0c4f942642da6e8b1ac3d2aeac46034963965d8f",class:"Expand"},this.showContent?"<":">")),this.showContent&&i("div",{key:"c688ab7cc629a3974b905a2fdc43063e996a3b90"},i("div",{key:"aaa3ad7d9f1503b8e1baaa2c756376a580ffe261",class:"Content"},i("slot",{key:"8c5c8ff70857da9414c7284b052a3fbc5f503f4a",name:"accordionContent"}),this.footer&&this.showContent&&i("div",{key:"917191f55a45647d708a5e3ff5e188c7e565a0c0"},this.deleteTab&&i("span",{key:"e7fdd5b4f18cacaceda206b36ce9576cc3fc1472",class:"ActionButton",onClick:()=>this.deleteAction()},r[void 0!==(t=this.language)&&t in r?t:"en"].deleteTicket)))));var t}};a.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:5px;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff;text-transform:capitalize}.Header .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:#F1F1F1;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none;margin-bottom:5px;cursor:pointer}.HeaderTicketHistory:hover{background:#00ABA4}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:#000}.HeaderTicketHistory .Expand{margin-left:auto;color:#FFF;width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:#fff;border:1px solid #009993;padding:10px 15px;user-select:none;color:#000;margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:4px;margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ActionButton:hover{background:#FF6536;border:1px solid #FF3D00}';const n=["ro","en","hr"],l={en:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterDateRangePlaceholder:"Date Range",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"},ro:{filterOpen:"Filtrare",filterClear:"Stergere",filterModalTicketTitle:"Rezultatele biletelor",filterModalDrawTitle:"Rezultatele draw-urilor",filterTicketPlaceholder:"Cauta ID bilet",filterDrawPlaceholder:"Cauta ID draw",filterDateRangePlaceholder:"Perioada",filterModalButton:"Cauta",filterOrDate:"sau cauta dupa data"},fr:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterDateRangePlaceholder:"Date Range",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"},ar:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterDateRangePlaceholder:"Date Range",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"},hr:{filterOpen:"Filter",filterClear:"Očisti",filterModalTicketTitle:"Rezultati listića",filterModalDrawTitle:"Povijest rezultata Izvlačenja",filterTicketPlaceholder:"Pretraga ID listića",filterDrawPlaceholder:"Pretraga ID izvlačenja",filterDateRangePlaceholder:"Raspon datuma",filterModalButton:"Traži",filterFromCalendar:"Od",filterToCalendar:"Do",filterOrDate:"ili tražite po datumu"}},h=(t,e)=>{const i=e;return l[void 0!==i&&n.includes(i)?i:"en"][t]};
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -676,7 +676,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
676
676
|
Code distributed by Google as part of the polymer project is also
|
|
677
677
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
678
678
|
*/
|
|
679
|
-
function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class o extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o})),Pi=window.ShadyCSS&&window.ShadyCSS.cssBuild,Ni=Kt((t=>{const e=Ii(Bi(t));function i(t,e,i,s){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,s)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,s[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.
|
|
679
|
+
function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class o extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o})),Pi=window.ShadyCSS&&window.ShadyCSS.cssBuild,Ni=Kt((t=>{const e=Ii(Bi(t));function i(t,e,i,s){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,s)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,s[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):Wt||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let s=0;s<t.length;s++)i._createMethodObserver(t[s],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!jt||Ht)&&(e=ie.import(t,"template"),jt&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=Pt(t.url);else{const t=ie.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super()}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=Ot,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let s=e[i];"value"in s&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=s)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return It(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const i=this.importPath;(function(t,e,i,s){if(!Pi){const o=e.content.querySelectorAll("style"),r=ce(e),a=function(t){let e=ae(t);return e?de(e):[]}(i),n=e.content.firstElementChild;for(let i=0;i<a.length;i++){let o=a[i];o.textContent=t._processStyleText(o.textContent,s),e.content.insertBefore(o,n)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],a=o[l];a!==i?(i=i.cloneNode(!0),a.parentNode.insertBefore(i,a)):l++,i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),Jt&&Pi&&Et){const i=e.content.querySelectorAll("style");if(i){let e="";Array.from(i).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,i?Mt(i):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=ue(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Lt&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=Mt(this.importPath)),Mt(t,e)}static _parseTemplateContent(t,i,s){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,s)}static _addTemplatePropertyEffect(t,i,s){return!Gt||i in this._properties||s.info.part.signature&&s.info.part.signature.static||s.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,i,s)}}})),Ei=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Oi{constructor(t,e){Hi(t,e);const i=e.reduce(((e,i,s)=>e+Ri(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Ri(t){if(t instanceof Oi)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const ji=function(t,...e){Hi(t,e);const i=document.createElement("template");let s=e.reduce(((e,i,s)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Oi)return Ri(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return Ei&&(s=Ei.createHTML(s)),i.innerHTML=s,i},Hi=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},Wi=Ni(HTMLElement),Gi=[];function Li(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function Ui(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=Ui();Gi.forEach((e=>{Li(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const $i=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),Li(this,Ui(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=Ui(),o=i===s&&-1===Gi.indexOf(this),r=!i&&e&&-1===Gi.indexOf(this),a=i!==s&&e===s;o||r?(this.__subscribe(),Li(this,s,i)):a&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=Gi.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,e,i){("dir"!==i||""!==e||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,e,i)}_attributeToProperty(t,e,i){"dir"!==t||e?super._attributeToProperty(t,e,i):this.dir=""}__subscribe(){Gi.includes(this)||Gi.push(this)}__unsubscribe(){Gi.includes(this)&&Gi.splice(Gi.indexOf(this),1)}}
|
|
680
680
|
/**
|
|
681
681
|
* @license
|
|
682
682
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -2001,7 +2001,486 @@ const es=g`
|
|
|
2001
2001
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2002
2002
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2003
2003
|
*/
|
|
2004
|
-
const is=Kt((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}})),ss=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,os=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function rs(t,e){if("function"!=typeof t)return;const i=ss.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};function as(){
|
|
2004
|
+
const is=Kt((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}})),ss=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,os=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function rs(t,e){if("function"!=typeof t)return;const i=ss.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};function as(){
|
|
2005
|
+
/*! vaadin-dev-mode:start
|
|
2006
|
+
(function () {
|
|
2007
|
+
'use strict';
|
|
2008
|
+
|
|
2009
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
2010
|
+
return typeof obj;
|
|
2011
|
+
} : function (obj) {
|
|
2012
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
2013
|
+
};
|
|
2014
|
+
|
|
2015
|
+
var classCallCheck = function (instance, Constructor) {
|
|
2016
|
+
if (!(instance instanceof Constructor)) {
|
|
2017
|
+
throw new TypeError("Cannot call a class as a function");
|
|
2018
|
+
}
|
|
2019
|
+
};
|
|
2020
|
+
|
|
2021
|
+
var createClass = function () {
|
|
2022
|
+
function defineProperties(target, props) {
|
|
2023
|
+
for (var i = 0; i < props.length; i++) {
|
|
2024
|
+
var descriptor = props[i];
|
|
2025
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
2026
|
+
descriptor.configurable = true;
|
|
2027
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
2028
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
2029
|
+
}
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
return function (Constructor, protoProps, staticProps) {
|
|
2033
|
+
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
2034
|
+
if (staticProps) defineProperties(Constructor, staticProps);
|
|
2035
|
+
return Constructor;
|
|
2036
|
+
};
|
|
2037
|
+
}();
|
|
2038
|
+
|
|
2039
|
+
var getPolymerVersion = function getPolymerVersion() {
|
|
2040
|
+
return window.Polymer && window.Polymer.version;
|
|
2041
|
+
};
|
|
2042
|
+
|
|
2043
|
+
var StatisticsGatherer = function () {
|
|
2044
|
+
function StatisticsGatherer(logger) {
|
|
2045
|
+
classCallCheck(this, StatisticsGatherer);
|
|
2046
|
+
|
|
2047
|
+
this.now = new Date().getTime();
|
|
2048
|
+
this.logger = logger;
|
|
2049
|
+
}
|
|
2050
|
+
|
|
2051
|
+
createClass(StatisticsGatherer, [{
|
|
2052
|
+
key: 'frameworkVersionDetectors',
|
|
2053
|
+
value: function frameworkVersionDetectors() {
|
|
2054
|
+
return {
|
|
2055
|
+
'Flow': function Flow() {
|
|
2056
|
+
if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients) {
|
|
2057
|
+
var flowVersions = Object.keys(window.Vaadin.Flow.clients).map(function (key) {
|
|
2058
|
+
return window.Vaadin.Flow.clients[key];
|
|
2059
|
+
}).filter(function (client) {
|
|
2060
|
+
return client.getVersionInfo;
|
|
2061
|
+
}).map(function (client) {
|
|
2062
|
+
return client.getVersionInfo().flow;
|
|
2063
|
+
});
|
|
2064
|
+
if (flowVersions.length > 0) {
|
|
2065
|
+
return flowVersions[0];
|
|
2066
|
+
}
|
|
2067
|
+
}
|
|
2068
|
+
},
|
|
2069
|
+
'Vaadin Framework': function VaadinFramework() {
|
|
2070
|
+
if (window.vaadin && window.vaadin.clients) {
|
|
2071
|
+
var frameworkVersions = Object.values(window.vaadin.clients).filter(function (client) {
|
|
2072
|
+
return client.getVersionInfo;
|
|
2073
|
+
}).map(function (client) {
|
|
2074
|
+
return client.getVersionInfo().vaadinVersion;
|
|
2075
|
+
});
|
|
2076
|
+
if (frameworkVersions.length > 0) {
|
|
2077
|
+
return frameworkVersions[0];
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
},
|
|
2081
|
+
'AngularJs': function AngularJs() {
|
|
2082
|
+
if (window.angular && window.angular.version && window.angular.version) {
|
|
2083
|
+
return window.angular.version.full;
|
|
2084
|
+
}
|
|
2085
|
+
},
|
|
2086
|
+
'Angular': function Angular() {
|
|
2087
|
+
if (window.ng) {
|
|
2088
|
+
var tags = document.querySelectorAll("[ng-version]");
|
|
2089
|
+
if (tags.length > 0) {
|
|
2090
|
+
return tags[0].getAttribute("ng-version");
|
|
2091
|
+
}
|
|
2092
|
+
return "Unknown";
|
|
2093
|
+
}
|
|
2094
|
+
},
|
|
2095
|
+
'Backbone.js': function BackboneJs() {
|
|
2096
|
+
if (window.Backbone) {
|
|
2097
|
+
return window.Backbone.VERSION;
|
|
2098
|
+
}
|
|
2099
|
+
},
|
|
2100
|
+
'React': function React() {
|
|
2101
|
+
var reactSelector = '[data-reactroot], [data-reactid]';
|
|
2102
|
+
if (!!document.querySelector(reactSelector)) {
|
|
2103
|
+
// React does not publish the version by default
|
|
2104
|
+
return "unknown";
|
|
2105
|
+
}
|
|
2106
|
+
},
|
|
2107
|
+
'Ember': function Ember() {
|
|
2108
|
+
if (window.Em && window.Em.VERSION) {
|
|
2109
|
+
return window.Em.VERSION;
|
|
2110
|
+
} else if (window.Ember && window.Ember.VERSION) {
|
|
2111
|
+
return window.Ember.VERSION;
|
|
2112
|
+
}
|
|
2113
|
+
},
|
|
2114
|
+
'jQuery': function (_jQuery) {
|
|
2115
|
+
function jQuery() {
|
|
2116
|
+
return _jQuery.apply(this, arguments);
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
jQuery.toString = function () {
|
|
2120
|
+
return _jQuery.toString();
|
|
2121
|
+
};
|
|
2122
|
+
|
|
2123
|
+
return jQuery;
|
|
2124
|
+
}(function () {
|
|
2125
|
+
if (typeof jQuery === 'function' && jQuery.prototype.jquery !== undefined) {
|
|
2126
|
+
return jQuery.prototype.jquery;
|
|
2127
|
+
}
|
|
2128
|
+
}),
|
|
2129
|
+
'Polymer': function Polymer() {
|
|
2130
|
+
var version = getPolymerVersion();
|
|
2131
|
+
if (version) {
|
|
2132
|
+
return version;
|
|
2133
|
+
}
|
|
2134
|
+
},
|
|
2135
|
+
'LitElement': function LitElement() {
|
|
2136
|
+
var version = window.litElementVersions && window.litElementVersions[0];
|
|
2137
|
+
if (version) {
|
|
2138
|
+
return version;
|
|
2139
|
+
}
|
|
2140
|
+
},
|
|
2141
|
+
'LitHtml': function LitHtml() {
|
|
2142
|
+
var version = window.litHtmlVersions && window.litHtmlVersions[0];
|
|
2143
|
+
if (version) {
|
|
2144
|
+
return version;
|
|
2145
|
+
}
|
|
2146
|
+
},
|
|
2147
|
+
'Vue.js': function VueJs() {
|
|
2148
|
+
if (window.Vue) {
|
|
2149
|
+
return window.Vue.version;
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2152
|
+
};
|
|
2153
|
+
}
|
|
2154
|
+
}, {
|
|
2155
|
+
key: 'getUsedVaadinElements',
|
|
2156
|
+
value: function getUsedVaadinElements(elements) {
|
|
2157
|
+
var version = getPolymerVersion();
|
|
2158
|
+
var elementClasses = void 0;
|
|
2159
|
+
// NOTE: In case you edit the code here, YOU MUST UPDATE any statistics reporting code in Flow.
|
|
2160
|
+
// Check all locations calling the method getEntries() in
|
|
2161
|
+
// https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/internal/UsageStatistics.java#L106
|
|
2162
|
+
// Currently it is only used by BootstrapHandler.
|
|
2163
|
+
if (version && version.indexOf('2') === 0) {
|
|
2164
|
+
// Polymer 2: components classes are stored in window.Vaadin
|
|
2165
|
+
elementClasses = Object.keys(window.Vaadin).map(function (c) {
|
|
2166
|
+
return window.Vaadin[c];
|
|
2167
|
+
}).filter(function (c) {
|
|
2168
|
+
return c.is;
|
|
2169
|
+
});
|
|
2170
|
+
} else {
|
|
2171
|
+
// Polymer 3: components classes are stored in window.Vaadin.registrations
|
|
2172
|
+
elementClasses = window.Vaadin.registrations || [];
|
|
2173
|
+
}
|
|
2174
|
+
elementClasses.forEach(function (klass) {
|
|
2175
|
+
var version = klass.version ? klass.version : "0.0.0";
|
|
2176
|
+
elements[klass.is] = { version: version };
|
|
2177
|
+
});
|
|
2178
|
+
}
|
|
2179
|
+
}, {
|
|
2180
|
+
key: 'getUsedVaadinThemes',
|
|
2181
|
+
value: function getUsedVaadinThemes(themes) {
|
|
2182
|
+
['Lumo', 'Material'].forEach(function (themeName) {
|
|
2183
|
+
var theme;
|
|
2184
|
+
var version = getPolymerVersion();
|
|
2185
|
+
if (version && version.indexOf('2') === 0) {
|
|
2186
|
+
// Polymer 2: themes are stored in window.Vaadin
|
|
2187
|
+
theme = window.Vaadin[themeName];
|
|
2188
|
+
} else {
|
|
2189
|
+
// Polymer 3: themes are stored in custom element registry
|
|
2190
|
+
theme = customElements.get('vaadin-' + themeName.toLowerCase() + '-styles');
|
|
2191
|
+
}
|
|
2192
|
+
if (theme && theme.version) {
|
|
2193
|
+
themes[themeName] = { version: theme.version };
|
|
2194
|
+
}
|
|
2195
|
+
});
|
|
2196
|
+
}
|
|
2197
|
+
}, {
|
|
2198
|
+
key: 'getFrameworks',
|
|
2199
|
+
value: function getFrameworks(frameworks) {
|
|
2200
|
+
var detectors = this.frameworkVersionDetectors();
|
|
2201
|
+
Object.keys(detectors).forEach(function (framework) {
|
|
2202
|
+
var detector = detectors[framework];
|
|
2203
|
+
try {
|
|
2204
|
+
var version = detector();
|
|
2205
|
+
if (version) {
|
|
2206
|
+
frameworks[framework] = { version: version };
|
|
2207
|
+
}
|
|
2208
|
+
} catch (e) {}
|
|
2209
|
+
});
|
|
2210
|
+
}
|
|
2211
|
+
}, {
|
|
2212
|
+
key: 'gather',
|
|
2213
|
+
value: function gather(storage) {
|
|
2214
|
+
var storedStats = storage.read();
|
|
2215
|
+
var gatheredStats = {};
|
|
2216
|
+
var types = ["elements", "frameworks", "themes"];
|
|
2217
|
+
|
|
2218
|
+
types.forEach(function (type) {
|
|
2219
|
+
gatheredStats[type] = {};
|
|
2220
|
+
if (!storedStats[type]) {
|
|
2221
|
+
storedStats[type] = {};
|
|
2222
|
+
}
|
|
2223
|
+
});
|
|
2224
|
+
|
|
2225
|
+
var previousStats = JSON.stringify(storedStats);
|
|
2226
|
+
|
|
2227
|
+
this.getUsedVaadinElements(gatheredStats.elements);
|
|
2228
|
+
this.getFrameworks(gatheredStats.frameworks);
|
|
2229
|
+
this.getUsedVaadinThemes(gatheredStats.themes);
|
|
2230
|
+
|
|
2231
|
+
var now = this.now;
|
|
2232
|
+
types.forEach(function (type) {
|
|
2233
|
+
var keys = Object.keys(gatheredStats[type]);
|
|
2234
|
+
keys.forEach(function (key) {
|
|
2235
|
+
if (!storedStats[type][key] || _typeof(storedStats[type][key]) != _typeof({})) {
|
|
2236
|
+
storedStats[type][key] = { firstUsed: now };
|
|
2237
|
+
}
|
|
2238
|
+
// Discards any previously logged version number
|
|
2239
|
+
storedStats[type][key].version = gatheredStats[type][key].version;
|
|
2240
|
+
storedStats[type][key].lastUsed = now;
|
|
2241
|
+
});
|
|
2242
|
+
});
|
|
2243
|
+
|
|
2244
|
+
var newStats = JSON.stringify(storedStats);
|
|
2245
|
+
storage.write(newStats);
|
|
2246
|
+
if (newStats != previousStats && Object.keys(storedStats).length > 0) {
|
|
2247
|
+
this.logger.debug("New stats: " + newStats);
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
}]);
|
|
2251
|
+
return StatisticsGatherer;
|
|
2252
|
+
}();
|
|
2253
|
+
|
|
2254
|
+
var StatisticsStorage = function () {
|
|
2255
|
+
function StatisticsStorage(key) {
|
|
2256
|
+
classCallCheck(this, StatisticsStorage);
|
|
2257
|
+
|
|
2258
|
+
this.key = key;
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
createClass(StatisticsStorage, [{
|
|
2262
|
+
key: 'read',
|
|
2263
|
+
value: function read() {
|
|
2264
|
+
var localStorageStatsString = localStorage.getItem(this.key);
|
|
2265
|
+
try {
|
|
2266
|
+
return JSON.parse(localStorageStatsString ? localStorageStatsString : '{}');
|
|
2267
|
+
} catch (e) {
|
|
2268
|
+
return {};
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2271
|
+
}, {
|
|
2272
|
+
key: 'write',
|
|
2273
|
+
value: function write(data) {
|
|
2274
|
+
localStorage.setItem(this.key, data);
|
|
2275
|
+
}
|
|
2276
|
+
}, {
|
|
2277
|
+
key: 'clear',
|
|
2278
|
+
value: function clear() {
|
|
2279
|
+
localStorage.removeItem(this.key);
|
|
2280
|
+
}
|
|
2281
|
+
}, {
|
|
2282
|
+
key: 'isEmpty',
|
|
2283
|
+
value: function isEmpty() {
|
|
2284
|
+
var storedStats = this.read();
|
|
2285
|
+
var empty = true;
|
|
2286
|
+
Object.keys(storedStats).forEach(function (key) {
|
|
2287
|
+
if (Object.keys(storedStats[key]).length > 0) {
|
|
2288
|
+
empty = false;
|
|
2289
|
+
}
|
|
2290
|
+
});
|
|
2291
|
+
|
|
2292
|
+
return empty;
|
|
2293
|
+
}
|
|
2294
|
+
}]);
|
|
2295
|
+
return StatisticsStorage;
|
|
2296
|
+
}();
|
|
2297
|
+
|
|
2298
|
+
var StatisticsSender = function () {
|
|
2299
|
+
function StatisticsSender(url, logger) {
|
|
2300
|
+
classCallCheck(this, StatisticsSender);
|
|
2301
|
+
|
|
2302
|
+
this.url = url;
|
|
2303
|
+
this.logger = logger;
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
createClass(StatisticsSender, [{
|
|
2307
|
+
key: 'send',
|
|
2308
|
+
value: function send(data, errorHandler) {
|
|
2309
|
+
var logger = this.logger;
|
|
2310
|
+
|
|
2311
|
+
if (navigator.onLine === false) {
|
|
2312
|
+
logger.debug("Offline, can't send");
|
|
2313
|
+
errorHandler();
|
|
2314
|
+
return;
|
|
2315
|
+
}
|
|
2316
|
+
logger.debug("Sending data to " + this.url);
|
|
2317
|
+
|
|
2318
|
+
var req = new XMLHttpRequest();
|
|
2319
|
+
req.withCredentials = true;
|
|
2320
|
+
req.addEventListener("load", function () {
|
|
2321
|
+
// Stats sent, nothing more to do
|
|
2322
|
+
logger.debug("Response: " + req.responseText);
|
|
2323
|
+
});
|
|
2324
|
+
req.addEventListener("error", function () {
|
|
2325
|
+
logger.debug("Send failed");
|
|
2326
|
+
errorHandler();
|
|
2327
|
+
});
|
|
2328
|
+
req.addEventListener("abort", function () {
|
|
2329
|
+
logger.debug("Send aborted");
|
|
2330
|
+
errorHandler();
|
|
2331
|
+
});
|
|
2332
|
+
req.open("POST", this.url);
|
|
2333
|
+
req.setRequestHeader("Content-Type", "application/json");
|
|
2334
|
+
req.send(data);
|
|
2335
|
+
}
|
|
2336
|
+
}]);
|
|
2337
|
+
return StatisticsSender;
|
|
2338
|
+
}();
|
|
2339
|
+
|
|
2340
|
+
var StatisticsLogger = function () {
|
|
2341
|
+
function StatisticsLogger(id) {
|
|
2342
|
+
classCallCheck(this, StatisticsLogger);
|
|
2343
|
+
|
|
2344
|
+
this.id = id;
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
createClass(StatisticsLogger, [{
|
|
2348
|
+
key: '_isDebug',
|
|
2349
|
+
value: function _isDebug() {
|
|
2350
|
+
return localStorage.getItem("vaadin." + this.id + ".debug");
|
|
2351
|
+
}
|
|
2352
|
+
}, {
|
|
2353
|
+
key: 'debug',
|
|
2354
|
+
value: function debug(msg) {
|
|
2355
|
+
if (this._isDebug()) {
|
|
2356
|
+
console.info(this.id + ": " + msg);
|
|
2357
|
+
}
|
|
2358
|
+
}
|
|
2359
|
+
}]);
|
|
2360
|
+
return StatisticsLogger;
|
|
2361
|
+
}();
|
|
2362
|
+
|
|
2363
|
+
var UsageStatistics = function () {
|
|
2364
|
+
function UsageStatistics() {
|
|
2365
|
+
classCallCheck(this, UsageStatistics);
|
|
2366
|
+
|
|
2367
|
+
this.now = new Date();
|
|
2368
|
+
this.timeNow = this.now.getTime();
|
|
2369
|
+
this.gatherDelay = 10; // Delay between loading this file and gathering stats
|
|
2370
|
+
this.initialDelay = 24 * 60 * 60;
|
|
2371
|
+
|
|
2372
|
+
this.logger = new StatisticsLogger("statistics");
|
|
2373
|
+
this.storage = new StatisticsStorage("vaadin.statistics.basket");
|
|
2374
|
+
this.gatherer = new StatisticsGatherer(this.logger);
|
|
2375
|
+
this.sender = new StatisticsSender("https://tools.vaadin.com/usage-stats/submit", this.logger);
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2378
|
+
createClass(UsageStatistics, [{
|
|
2379
|
+
key: 'maybeGatherAndSend',
|
|
2380
|
+
value: function maybeGatherAndSend() {
|
|
2381
|
+
var _this = this;
|
|
2382
|
+
|
|
2383
|
+
if (localStorage.getItem(UsageStatistics.optOutKey)) {
|
|
2384
|
+
return;
|
|
2385
|
+
}
|
|
2386
|
+
this.gatherer.gather(this.storage);
|
|
2387
|
+
setTimeout(function () {
|
|
2388
|
+
_this.maybeSend();
|
|
2389
|
+
}, this.gatherDelay * 1000);
|
|
2390
|
+
}
|
|
2391
|
+
}, {
|
|
2392
|
+
key: 'lottery',
|
|
2393
|
+
value: function lottery() {
|
|
2394
|
+
return true;
|
|
2395
|
+
}
|
|
2396
|
+
}, {
|
|
2397
|
+
key: 'currentMonth',
|
|
2398
|
+
value: function currentMonth() {
|
|
2399
|
+
return this.now.getYear() * 12 + this.now.getMonth();
|
|
2400
|
+
}
|
|
2401
|
+
}, {
|
|
2402
|
+
key: 'maybeSend',
|
|
2403
|
+
value: function maybeSend() {
|
|
2404
|
+
var firstUse = Number(localStorage.getItem(UsageStatistics.firstUseKey));
|
|
2405
|
+
var monthProcessed = Number(localStorage.getItem(UsageStatistics.monthProcessedKey));
|
|
2406
|
+
|
|
2407
|
+
if (!firstUse) {
|
|
2408
|
+
// Use a grace period to avoid interfering with tests, incognito mode etc
|
|
2409
|
+
firstUse = this.timeNow;
|
|
2410
|
+
localStorage.setItem(UsageStatistics.firstUseKey, firstUse);
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
if (this.timeNow < firstUse + this.initialDelay * 1000) {
|
|
2414
|
+
this.logger.debug("No statistics will be sent until the initial delay of " + this.initialDelay + "s has passed");
|
|
2415
|
+
return;
|
|
2416
|
+
}
|
|
2417
|
+
if (this.currentMonth() <= monthProcessed) {
|
|
2418
|
+
this.logger.debug("This month has already been processed");
|
|
2419
|
+
return;
|
|
2420
|
+
}
|
|
2421
|
+
localStorage.setItem(UsageStatistics.monthProcessedKey, this.currentMonth());
|
|
2422
|
+
// Use random sampling
|
|
2423
|
+
if (this.lottery()) {
|
|
2424
|
+
this.logger.debug("Congratulations, we have a winner!");
|
|
2425
|
+
} else {
|
|
2426
|
+
this.logger.debug("Sorry, no stats from you this time");
|
|
2427
|
+
return;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
this.send();
|
|
2431
|
+
}
|
|
2432
|
+
}, {
|
|
2433
|
+
key: 'send',
|
|
2434
|
+
value: function send() {
|
|
2435
|
+
// Ensure we have the latest data
|
|
2436
|
+
this.gatherer.gather(this.storage);
|
|
2437
|
+
|
|
2438
|
+
// Read, send and clean up
|
|
2439
|
+
var data = this.storage.read();
|
|
2440
|
+
data["firstUse"] = Number(localStorage.getItem(UsageStatistics.firstUseKey));
|
|
2441
|
+
data["usageStatisticsVersion"] = UsageStatistics.version;
|
|
2442
|
+
var info = 'This request contains usage statistics gathered from the application running in development mode. \n\nStatistics gathering is automatically disabled and excluded from production builds.\n\nFor details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.\n\n\n\n';
|
|
2443
|
+
var self = this;
|
|
2444
|
+
this.sender.send(info + JSON.stringify(data), function () {
|
|
2445
|
+
// Revert the 'month processed' flag
|
|
2446
|
+
localStorage.setItem(UsageStatistics.monthProcessedKey, self.currentMonth() - 1);
|
|
2447
|
+
});
|
|
2448
|
+
}
|
|
2449
|
+
}], [{
|
|
2450
|
+
key: 'version',
|
|
2451
|
+
get: function get$1() {
|
|
2452
|
+
return '2.1.2';
|
|
2453
|
+
}
|
|
2454
|
+
}, {
|
|
2455
|
+
key: 'firstUseKey',
|
|
2456
|
+
get: function get$1() {
|
|
2457
|
+
return 'vaadin.statistics.firstuse';
|
|
2458
|
+
}
|
|
2459
|
+
}, {
|
|
2460
|
+
key: 'monthProcessedKey',
|
|
2461
|
+
get: function get$1() {
|
|
2462
|
+
return 'vaadin.statistics.monthProcessed';
|
|
2463
|
+
}
|
|
2464
|
+
}, {
|
|
2465
|
+
key: 'optOutKey',
|
|
2466
|
+
get: function get$1() {
|
|
2467
|
+
return 'vaadin.statistics.optout';
|
|
2468
|
+
}
|
|
2469
|
+
}]);
|
|
2470
|
+
return UsageStatistics;
|
|
2471
|
+
}();
|
|
2472
|
+
|
|
2473
|
+
try {
|
|
2474
|
+
window.Vaadin = window.Vaadin || {};
|
|
2475
|
+
window.Vaadin.usageStatsChecker = window.Vaadin.usageStatsChecker || new UsageStatistics();
|
|
2476
|
+
window.Vaadin.usageStatsChecker.maybeGatherAndSend();
|
|
2477
|
+
} catch (e) {
|
|
2478
|
+
// Intentionally ignored as this is not a problem in the app being developed
|
|
2479
|
+
}
|
|
2480
|
+
|
|
2481
|
+
}());
|
|
2482
|
+
|
|
2483
|
+
vaadin-dev-mode:end **/}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(os?!(os&&Object.keys(os).map((t=>os[t])).filter((t=>t.productionMode)).length>0):!rs((function(){return!0})))}catch(t){return!1}}());
|
|
2005
2484
|
/**
|
|
2006
2485
|
* @license
|
|
2007
2486
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -3564,4 +4043,4 @@ yt("vaadin-date-picker",[la,g`
|
|
|
3564
4043
|
></vaadin-date-picker-overlay>
|
|
3565
4044
|
|
|
3566
4045
|
<slot name="tooltip"></slot>
|
|
3567
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new aa(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new na(this.inputElement,this._labelController)),this._tooltipController=new Cs(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}c(ua);const pa=class{constructor(i){t(this,i),this.filterDraw=e(this,"filterDraw",7),this.filterSelection=e(this,"filterSelection",7),this.filterSelectionReset=e(this,"filterSelectionReset",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.showFilterId=!0,this.activateTicketSearch=!1,this.gameId="",this.playerId="",this.session="",this.postMessage=!1,this.language="en",this.quickFiltersActive=!1,this.clientStyling="",this.clientStylingUrlContent="",this.showFilterModal=!1,this.showClearButton=!1,this.filterData={},this.filterDataReset={ticketDrawId:"",filterFromCalendar:"",filterToCalendar:""},this.limitStylingAppends=!1}componentDidRender(){document.getElementById("#FilterById")&&(document.getElementById("#FilterById").value=""),!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}filterSelectionHandler(t){this.postMessage&&window.postMessage({type:"filterSelection",event:t},window.location.href),(this.filterData.ticketDrawId||this.filterData.filterFromCalendar||this.filterData.filterToCalendar)&&this.filterSelection.emit(t)}filterSelectionResetHandler(t){this.postMessage&&window.postMessage({type:"filterSelectionReset",event:t},window.location.href),this.filterSelectionReset.emit(t)}modalCloseEvent(){this.showFilterModal=!1}toggleFilterModal(){this.showFilterModal=!0}filterSearch(){this.modalCloseEvent(),this.showClearButton=!0,this.filterSelectionHandler(this.filterData),console.log(this.showClearButton)}resetSearch(){this.showClearButton=!1,this.filterSelectionResetHandler(this.filterDataReset),this.filterData={}}handleTicketDrawId(t){this.filterData.ticketDrawId=t.target.value}handleFilterFrom(t){this.filterData.filterFromCalendar=new Date(t.target.value).toISOString()}handleFilterTo(t){this.filterData.filterToCalendar=new Date(t.target.value).toISOString()}render(){return i("div",{key:"d74774bd58fa3df6b0038fd979fb4aec4262d43d",class:"HelperFilters",ref:t=>this.stylingContainer=t},i("div",{key:"0827128924ba350888ae81e67e0306e536b15047",class:"FilterButtonsWrapper"},i("button",{key:"73ae5aff5896195cd895410caf44dccfa1ac5cfc",class:"FilterOpen",onClick:()=>this.toggleFilterModal()},h("filterOpen",this.language)),console.log("in filter Open",this.showClearButton,this.quickFiltersActive),this.showClearButton||this.quickFiltersActive?i("button",{class:"FilterClear",onClick:()=>this.resetSearch()},h("filterClear",this.language)):null),i("helper-modal",{key:"add83df2714fdb69e8dfa7a0f5d1eb0d526fc2b4","title-modal":"Filter Modal",visible:this.showFilterModal,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{key:"861b04161876b557184fe49c514867788147e4b9",class:"FilterModalHeader"},i("h3",{key:"7471430912f301ff995c401b08298d9006816216",class:"FilterModalTitle"},h(this.activateTicketSearch?"filterModalTicketTitle":"filterModalDrawTitle",this.language))),i("div",{key:"af6bd8e253f332c8724e1bb40100ba5e1e59838f",class:"FilterModalBody"},i("input",{key:"9edc7e14b801d40d4861625264f82b2fa213a770",id:"FilterById",type:"text",value:this.filterData.ticketDrawId,onInput:t=>this.handleTicketDrawId(t),class:"FilterModalSearch",placeholder:h(this.activateTicketSearch?"filterTicketPlaceholder":"filterDrawPlaceholder",this.language)}),i("p",{key:"9665b359f9d6da19f120eb9bb315c4b144c80ced"},h("filterOrDate",this.language)),i("div",{key:"d155c7d73a719aaedc581f51aa97cf21ec3125df",class:"FilterCalendarWrapper"},i("vaadin-date-picker",{key:"586fb38bc5c718a4afa06ebec96bec0fd46949eb",value:this.filterData.filterFromCalendar,onChange:t=>this.handleFilterFrom(t),placeholder:h("filterFromCalendar",this.language),class:"VaadinDatePicker"}),i("vaadin-date-picker",{key:"42e8965b2c740c19c53687c114faf6aa22f11de8",value:this.filterData.filterToCalendar,onChange:t=>this.handleFilterTo(t),placeholder:h("filterToCalendar",this.language),class:"VaadinDatePicker"}))),i("div",{key:"7529eef1b25d130d183a55e45862418444054d3c",class:"FilterModalFooter"},i("button",{key:"7dac7dc7b01c1c66dde7c6670a352f597b3f75fc",class:"FilterModalButton",onClick:()=>this.filterSearch()},h("filterModalButton",this.language)))))}};pa.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:#00958f;color:#FFF}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:#00958f;color:#FFF}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:#009993;text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:4px;background:#e8ebef;color:#263445;width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:#009993}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:#00958f;color:#FFF}.FilterModalHeader p,.FilterModalBody p,.FilterModalFooter p{margin:5px 0}';const ma=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)),fa=class{constructor(i){t(this,i),this.cancel=e(this,"modalCloseEvent",7),this.userAgent=window.navigator.userAgent,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.titleModal=void 0,this.visible=!0,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}handleHelperModalClose(){this.visible=!1,this.cancel.emit()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return this.visible&&i("div",{key:"ba2aed789565b37bfdbb34bdf3ccace827231653",class:this.visible?"HelperModalWrapper HelperModalVisible":"HelperModalWrapper",ref:t=>this.stylingContainer=t},i("div",{key:"151ca4cd80d259ac955b92b10bf6f0df2698a937",class:"HelperModalWrapper HelperModalVisible"},i("div",{key:"804cb1dea73321c4935e4a8ddb1136e98e89a070",class:"HelperModalContent"+(ma(this.userAgent)?" HelperModalMobileContent":"")},i("span",{key:"30cf7928c1e4baa53f3514fc1930823db76c874c",class:"HelperModalClose"+(ma(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),i("slot",{key:"5c1323a98cdcd09669020a00affe5673856e807e"}))))}};fa.style=":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px #848e97;box-shadow:2px 2px 2px rgba(0, 0, 0, 0.007);font-size:14px;padding:10px 10px 5px 10px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:#FFF;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:#000}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:#000}";const ba=class{constructor(e){t(this,e),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.selectedIndex=0,this.cmsEndpoint=void 0,this.clientStyling="",this.clientStylingUrlContent="",this.tabContent="",this.limitStylingAppends=!1}connectedCallback(){}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return this.tabContent=i("div",{key:"d69c61827b4fb6d934c72b0b2d37d72fca307575",class:"TabContent",ref:t=>this.stylingContainer=t},"Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account."),this.selectedIndex+1==2?this.tabContent=i("div",{key:"ab912cbb3bc3e88ecf8fe5f8f0e7eb16460100bd",class:"TabContent",ref:t=>this.stylingContainer=t},i("ol",{key:"17bed41dffe7d5578452ee13a47b442d10366ce2"},i("li",{key:"cf0da42f07cf92f5cea9c9f504c8836e528a5708"},"Register or Login"),i("li",{key:"4a0339df365c6b1a37b8a74c5022a56197e870db"},"Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose “I feel lucky”."),i("li",{key:"3f29a9b17c1059493648247868b83eb71241b8bd"},"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!"))):this.selectedIndex+1==3&&(this.tabContent=i("div",{key:"ceac54698e0e5c55a049600f02e8f413a76a1c33",class:"TabContent",ref:t=>this.stylingContainer=t},i("ul",{key:"426d89c86a1d44f6d515bc1a7902e43317127939"},i("li",{key:"457a225564399001dcab48097578174a27231ca7"},"What are my odds of winning?"),i("li",{key:"d35220f2aca215eff391cab54d719f18ef906c77"},"How can I find out if I’ve won a draw game?"),i("li",{key:"fcd560ee4b6740c319cf0f98a0b98da8fd9e14a4"},"How do I claim my prize?")))),this.tabContent}};ba.style=":host{display:block}.TabContent{font-size:14px;color:#000;font-weight:normal}";const ga=class{constructor(e){t(this,e),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.disabled=!1,this.label=void 0,this.selected=!1,this.cmsEndpoint=void 0,this.selectedIndex=0,this.tabs=[{label:"How to Play"},{label:"About"},{label:"FAQs"}],this.clientStyling="",this.clientStylingurl="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}connectedCallback(){}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{key:"841b2a4b84f2ecdaf692b9cab2eac4b3413186e7",ref:t=>this.stylingContainer=t},i("div",{key:"4c5d57e669f9f45d204bff8a85ca89a0574c4627",class:"Tabs"},this.tabs.map(((t,e)=>i("button",{class:"TabButton"+(this.selectedIndex==e?" Active":""),onClick:()=>this.selectedIndex=e},t.label)))),i("div",{key:"7ba983dec3b0355f390b19191d0d823914f09037"},i("helper-tab",{key:"e6c7739d50948582d8d14d530828508b4cb90d6e",selectedIndex:this.selectedIndex,"client-styling":this.clientStyling,"client-stylingurl":this.clientStylingurl,"client-styling-url-content":this.clientStylingUrlContent})))}get host(){return s(this)}};ga.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:4px;padding:8px 15px;margin:5px 0 10px;border:1px solid #009993;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:#F1F1F1}.TabButton.Active{background:#009993;color:#FFF}';const va=class{constructor(i){t(this,i),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.value="0",this.selectable=!0,this.isSelected=!1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{key:"af3601684ecf1f39d65fc9461430cba96b9e4b8c",class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}};va.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:#000000;display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px #ffffff;background:radial-gradient(circle at top, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, rgb(255, 255, 255) 0%, rgb(241, 241, 241) 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #00958f}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#D4D4D4;border:solid 2px #D4D4D4;cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #D4D4D4;cursor:default}';const ya=["ro","en","hr"],xa={en:{drawResultsHeader:"Last draw results",drawId:"Draw ID",drawName:"Game name",drawDate:"Draw Date",drawNumbersGridDraw:"Draw numbers Grid ",drawNumbersGridTicket:"Draw numbers Grid ",ticketResult:"Ticket result",amountWon:"Amount won",numberOfDraws:"Number of draws",multiplier:"Multiplier:",ticketPurchaseDate:"Ticket Purchase Date",ticketStatus:"Ticket Status",ticketId:"Ticket ID",ticketAmount:"Ticket Amount",winUpTo:"Win up to"},ro:{drawResultsHeader:"Ultimele rezultate extragere",drawId:"Id extragere",drawName:"Numele jocului",drawDate:"Data extragerii",drawNumbersGridDraw:"Numerele extrase Grid",drawNumbersGridTicket:"Numerele extrase Grid",ticketResult:"Rezultatul biletului",amountWon:"Suma castigata",numberOfDraws:"Numarul de extrageri",multiplier:"Multiplicator:",ticketPurchaseDate:"Data achizitionarii biletului",ticketStatus:"Statusul biletului",ticketId:"Id biletul",ticketAmount:"Valoarea biletului",winUpTo:"Poti castiga"},fr:{drawResultsHeader:"Résultats du dernier tirage",drawId:"ID de tirage",drawName:"Nom du jeu",drawDate:"Date du tirage",drawNumbersGridDraw:"Tirage des numéros Grille",drawNumbersGridTicket:"Tirage des numéros Grille",ticketResult:"Résultat du ticket",amountWon:"Montant gagné",numberOfDraws:"Nombre de tirages",multiplier:"Multiplicateur",ticketPurchaseDate:"Date d'achat du billet",ticketStatus:"Statut du ticket",ticketId:"ID de billets",ticketAmount:"Montant du billet",winUpTo:"Gagnez jusqu'à"},ar:{drawResultsHeader:"نتائج آخر سحب",drawId:"معرّف السحب",drawName:"اسم اللعبة",drawDate:"تاريخ السحب",drawNumbersGridDraw:"شبكة أرقام السحب",drawNumbersGridTicket:"شبكة أرقام السحب",ticketResult:"نتيجة التذكرة",amountWon:"المبلغ الذي تم ربحه",numberOfDraws:"عدد السحوبات",multiplier:"مضاعف",ticketPurchaseDate:"تاريخ شراء التذكرة",ticketStatus:"حالة التذكرة",ticketId:"معرّف التذكرة",ticketAmount:"مبلغ التذكرة",winUpTo:"ربح يصل إلى"},hr:{drawResultsHeader:"Rezultati posljednjeg izvlačenja",drawId:"ID izvlačenja",drawName:"Naziv igre",drawDate:"Datum izvlačenja",drawNumbersGridDraw:"Tablica izvučenih brojeva",drawNumbersGridTicket:"Tablica izvučenih brojeva",ticketResult:"Rezultat listića",amountWon:"Osvojeni iznos",numberOfDraws:"Broj izvlačenja",multiplier:"Multiplikator",ticketPurchaseDate:"Datum uplate listića",ticketStatus:"Status listića",ticketId:"ID listića",ticketAmount:"Iznos listića",winUpTo:"Osvoji do"}},wa=(t,e)=>{const i=e;return xa[void 0!==i&&ya.includes(i)?i:"en"][t]},ka=class{constructor(e){t(this,e),this.ticketDrawDetails=[],this.ticketDrawDetailsFlag=!0,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.endpoint=void 0,this.gameId=void 0,this.language="en",this.playerId=void 0,this.drawMode=!1,this.drawId="",this.gameName="",this.ticketDate="",this.ticketStatus="",this.ticketId="",this.ticketAmount="",this.ticketMultiplier=!1,this.ticketDrawCount=0,this.ticketNumbers="",this.sessionId="",this.clientStyling="",this.clientStylingUrlContent="",this.ticketDrawData="",this.multiplier=3,this.isLoading=!0,this.hasErrors=!1,this.errorText="",this.ticketData=[],this.ticketDataLoaded=!1,this.ticketDraws=[],this.toggleDrawer=[!1],this.limitStylingAppends=!1,this.drawData=void 0}connectedCallback(){let t=[];this.ticketNumbers&&(this.gridNumbers=JSON.parse(this.ticketNumbers)),this.drawId&&t.push(this.getDrawData()),Promise.all(t).then((()=>{this.isLoading=!1})).catch((t=>{console.log("error ",t),this.isLoading=!1}))}componentWillRender(){this.ticketDrawData&&this.ticketDrawDetailsFlag&&(this.ticketDrawDetails=JSON.parse(this.ticketDrawData),this.ticketDrawDetails.forEach((t=>{this.getDrawData(t.drawId).then((e=>t.drawData=e))})),this.ticketDrawDetailsFlag=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}getDrawData(t){return this.isLoading=!0,new Promise(((e,i)=>{let s=new URL(`${this.endpoint}/games/${this.gameId}/draws/${t||this.drawId}`);fetch(s.href).then((t=>t.json())).then((i=>{t?e(i):(this.drawData=i,e(!0)),this.isLoading=!1})).catch((t=>{i(t),this.isLoading=!1}))}))}drawerToggle(t){this.toggleDrawer=this.toggleDrawer.map(((e,i)=>i==t?!e:e)),t>=this.toggleDrawer.length&&this.toggleDrawer.push(!0)}render(){return this.isLoading?i("p",null,"Loading, please wait ..."):this.hasErrors?void i("p",null,this.errorText):i("section",{class:"DrawResultsSection",ref:t=>this.stylingContainer=t},this.drawMode?i("div",{class:"DrawResultsArea"},this.drawData&&i("div",null,i("div",{class:"DrawResultsHeader"},i("span",null,wa("drawId",this.language),": ",this.drawData.id),i("span",null,wa("drawDate",this.language),": ",this.drawData.date.slice(0,10))),i("div",{class:"DrawResultsBody"},i("div",{class:"DrawNumbersGrid"},i("p",null,wa("drawNumbersGridDraw",this.language),"0:"),i("div",{class:"BulletContainer"},i("lottery-grid",{"selected-numbers":this.drawData.winningNumbers.join(","),"display-selected":!0,selectable:!1,language:this.language,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),i("div",{class:"DrawMultipler"},i("label",{class:"Label"},wa("multiplier",this.language)," ",this.multiplier)))))):i("div",{class:"DrawResultsArea TicketDraws"},i("div",{class:"DrawResultsBody"},i("div",{class:"TicketIdContainer"},i("label",{class:"Label"},wa("ticketId",this.language),": ",i("span",null,this.ticketId))),i("div",{class:"TicketAmountContainer"},i("label",{class:"Label"},wa("ticketAmount",this.language)," ",i("span",null,this.ticketAmount))),i("div",{class:"DrawNumbersGrid"},this.gridNumbers.map(((t,e)=>i("div",null,i("label",{class:"Label"},wa("drawNumbersGridTicket",this.language)," ",String.fromCharCode(e+65),":"),i("div",{class:"BulletContainer"},i("lottery-grid",{"selected-numbers":t.join(","),selectable:!1,"display-selected":!0,language:this.language,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))))),i("div",{class:"DrawMultipler"},i("label",{class:"Label"},wa("multiplier",this.language)," ",JSON.stringify(this.ticketMultiplier))),i("div",{class:"NumberOfDrawsContainer"},i("label",{class:"Label"},wa("numberOfDraws",this.language),": ",this.ticketDrawCount),i("div",{class:"DrawTicketsContainer"},this.ticketDrawDetails&&this.ticketDrawDetails.length>0&&i("div",{class:"ExpandableBoxes"},this.ticketDrawDetails.map(((t,e)=>{var s,o,r,a,n;return i("div",{class:{ExpandableBox:!0,ShowBox:this.toggleDrawer[e]},onClick:()=>this.drawerToggle(e)},i("div",{class:"ExpandableBoxHeader"},i("div",{class:"TicketResultContainer"},i("p",null,wa("ticketResult",this.language),": ",t.state)),"won"==t.state&&i("div",{class:"AmountWonContainer"},i("p",null,wa("amountWon",this.language),": ",Number(t.amount).toLocaleString("en")," ",t.currency)),"lost"==t.state&&i("div",{class:"DrawIdContainer"},i("p",null,wa("drawId",this.language),": ",t.drawId))),i("div",{class:"ExpandableBoxBody"},i("div",{class:"DrawIdContainer"},i("p",null,wa("drawId",this.language),": ",t.drawId)),i("div",{class:"DrawDateContainer"},i("p",null,wa("drawDate",this.language),": ",null===(s=t.drawData)||void 0===s?void 0:s.date.slice(0,10)," | ",null===(o=t.drawData)||void 0===o?void 0:o.date.slice(11,19))),i("div",{class:"DrawNumbersGrid"},t.drawData&&i("div",{class:"BulletContainer"},i("label",{class:"Label"},wa("drawNumbersGridDraw",this.language)," ",String.fromCharCode(e+10),":"),i("lottery-grid",{"selected-numbers":null===(a=null===(r=t.drawData)||void 0===r?void 0:r.winningNumbers)||void 0===a?void 0:a.join(","),selectable:!1,"display-selected":!0,language:this.language,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))),i("div",{class:"DrawMultipler"},i("label",{class:"Label"},wa("multiplier",this.language)," ",null===(n=t.drawData)||void 0===n?void 0:n.multiplier))))}))))))))}};ka.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketInfo{display:flex;flex-direction:row;gap:15px;background-color:#009993;color:#fff;padding:12px;font-size:14px}.DrawResultsArea{margin-top:15px}.DrawResultsArea.TicketDraws .Content{padding:0;border:0}.DrawResultsArea.TicketDraws .DrawResultsBody{padding:0;margin-bottom:5px;border-radius:0;border:0}.DrawResultsSection{max-width:600px;margin:0px auto;border-radius:4px}.DrawResultsHeader{display:flex;justify-content:space-between;padding:10px 20px;background-color:#009993;color:#fff;font-size:14px;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-weight:400;margin:0;padding-top:15px}.DrawResultsBody{padding:20px;margin-bottom:5px;border-radius:0 0 4px 4px;border:1px solid #009993}.DrawResultsBody>div{margin:10px 0}.DrawResultsBody .NumberOfDrawsContainer{display:table;width:100%}.DrawNumbersGrid{display:flex;flex-direction:column;gap:5px}.DrawNumbersGrid label{display:block;margin-bottom:7px}.Toggle{cursor:pointer;display:inline-block}.ToggleSwitch{display:inline-block;background:#ccc;border-radius:16px;width:58px;height:24px;position:relative;vertical-align:middle;transition:background 0.25s}.ToggleSwitch:before,.ToggleSwitch:after{content:""}.ToggleSwitch:before{display:block;background:linear-gradient(to bottom, #fff 0%, #eee 100%);border-radius:50%;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.25);width:16px;height:16px;position:absolute;top:4px;left:4px;transition:left 0.25s}.Toggle:hover .ToggleSwitch:before{background:linear-gradient(to bottom, #fff 0%, #fff 100%);box-shadow:0 0 0 1px rgba(0, 0, 0, 0.5)}.ToggleCheckbox:checked+.ToggleSwitch{background:#56c080}.ToggleCheckbox:checked+.ToggleSwitch:before{left:38px}.ToggleCheckbox{position:absolute;visibility:hidden}.Label{position:relative}.DrawTicketsContainer{display:flex;flex-direction:column;margin:20px auto 0}.DrawMultipler{margin-top:15px}.ExpandableBoxes{position:relative;display:flex;flex-direction:column;border:1px solid #ccc;border-radius:5px;background-color:white}.ExpandableBox{border-bottom:1px solid #ccc;transition:height 300ms ease-in-out;overflow:hidden;height:80px}.ExpandableBox:last-child{border-bottom:0}.ExpandableBoxHeader{position:relative;list-style:none;outline:0;cursor:pointer;text-transform:uppercase;transition:color 300ms ease-in-out;margin-bottom:24px;margin-left:5px}.ShowBox>.ExpandableBoxHeader{color:#009993}.ExpandableBoxHeader::-webkit-details-marker{display:none}.ExpandableBoxHeader:before,.ExpandableBoxHeader:after{content:"";position:absolute}.ExpandableBoxHeader:before{right:21px;top:50%;height:2px;margin-top:-1px;width:16px;background:#009993}.ExpandableBoxHeader:after{right:28px;top:50%;height:16px;margin-top:-8px;width:2px;margin-left:-1px;background:#009993;transition:all 300ms ease-in-out}.ShowBox .ExpandableBoxHeader:after{opacity:0;transform:translateY(25%)}.ExpandableBoxBody{padding-top:0;font-weight:lighter;margin-left:5px}.ExpandableBox.ShowBox{height:300px}';const _a=["ro","en","fr","ar","hr"],Da={en:{drawResultsHeader:"Draw results history",drawId:"Draw ID",drawDate:"Draw Date",drawNumbersGridA:"Draw numbers Grid A",viewAllResults:"View All",lastFiveDraws:"Last 5 Draws",lastTenDraws:"Last 10 Draws",lastFifteenDraws:"Last 15 Draws",allDrawResultsHistory:"All Draw Results History",noResults:"No results",fetchingResults:"Fetching results"},ro:{drawResultsHeader:"Istoricul extragerilor",drawId:"ID-ul extragerii",drawDate:"Data extragerii",drawNumbersGridA:"Numerele extrase Grid A",viewAllResults:"Vezi toate rezultatele",lastFiveDraws:"Ultimile 5 extrageri",lastTenDraws:"Ultimile 10 extrageri",lastFifteenDraws:"Ultimile 15 extrageri",allDrawResultsHistory:"Istoricul tuturor extragerilor",noResults:"Niciun rezultat",fetchingResults:"Se obtin rezultatele"},fr:{drawResultsHeader:"Dessiner l'historique des résultats",drawId:"ID de tirage",drawDate:"Date du tirage",drawNumbersGridA:"Tirage des numéros Grille",viewAllResults:"Voir tout",lastFiveDraws:"5 derniers tirages",lastTenDraws:"10 derniers tirages",lastFifteenDraws:"15 derniers tirages",allDrawResultsHistory:"Historique des résultats de tous les tirages",noResults:"Aucun résultat",fetchingResults:"Récupération des résultats"},ar:{drawResultsHeader:"سجل نتائج السحب",drawId:"معرّف السحب",drawDate:"تاريخ السحب",drawNumbersGridA:"شبكة أرقام السحب",viewAllResults:"عرض الكل",lastFiveDraws:"آخر 5 سحوبات",lastTenDraws:"آخر 10 سحوبات",lastFifteenDraws:"آخر 15 سحبًا",allDrawResultsHistory:"سجل نتائج كل السحوبات",noResults:"لا توجد نتائج",fetchingResults:"جلب النتائج"},hr:{drawResultsHeader:"Povijest rezultata izvlačenja",drawId:"ID izvlačenja",drawDate:"Datum izvlačenja",drawNumbersGridA:"Izvučeni brojevi tablica A",viewAllResults:"Pogledaj sve",lastFiveDraws:"Zadnjih 5 izvlačenja",lastTenDraws:"Zadnjih 10 izvlačenja",lastFifteenDraws:"Zadnjih 15 izvlačenja",allDrawResultsHistory:"Povijest svih rezultata izvlačenja",noResults:"Nema rezultata",fetchingResults:"Dohvaćanje rezultata"}},Ta=(t,e)=>{const i=e;return Da[void 0!==i&&_a.includes(i)?i:"en"][t]},Ca=class{constructor(e){t(this,e),this.getDrawsData=()=>{let t=new URL(`${this.endpoint}/games/${this.gameId}/draws`);this.dateFiltersFrom&&t.searchParams.append("from",this.dateFiltersFrom),this.dateFiltersTo&&t.searchParams.append("to",this.dateFiltersTo),fetch(t.href).then((t=>{if(t.status>=300)throw new Error("There was an error while fetching the data");return t.json()})).then((t=>{this.winningDataSetsData=t.items.filter((t=>t.winningNumbers)),this.drawData=this.winningDataSetsData.map((t=>t))})).catch((t=>{console.log("err",t)})).finally((()=>{this.isLoading=!1,this.noResults=0==this.drawData.filter((t=>t.winningNumbers)).length}))},this.filterResults=t=>{this.numberOfResults=t,this.displayAllDrawsResults=!0},this.getDrawResults=t=>{let e=new URL(`${this.endpoint}/games/${this.gameId}/draws/${t}`);fetch(e.href,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((t=>(404==t.status&&(this.noResults=!0),t.json()))).then((t=>{this.drawData=[t].map((t=>t))})).catch((t=>{console.log("err",t)})).finally((()=>{this.isLoading=!1}))},this.viewAllResults=()=>{this.numberOfResults=this.drawData.length,this.displayAllDrawsResults=!1,window.scrollTo({top:0,behavior:"smooth"})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.endpoint=void 0,this.gameId=void 0,this.numberOfResults=3,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.drawData=[],this.winningDataSetsData=[""],this.displayAllDrawsResults=!0,this.showQuickFilters=!0,this.dateFiltersFrom="",this.dateFiltersTo="",this.isLoading=!1,this.noResults=!1,this.limitStylingAppends=!1}filtersHandler(t){this.showQuickFilters=!1,this.isLoading=!0,t.detail.ticketDrawId?this.getDrawResults(t.detail.ticketDrawId):(this.dateFiltersFrom=t.detail.filterFromCalendar,this.dateFiltersTo=t.detail.filterToCalendar,this.getDrawsData())}clearFiltersHandler(){this.showQuickFilters=!0,this.dateFiltersFrom="",this.dateFiltersTo="",this.drawData=this.winningDataSetsData,this.isLoading=!0,this.getDrawsData()}connectedCallback(){this.showQuickFilters&&this.getDrawsData()}disconnectedCallback(){clearInterval(this.interval)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){let t=i("div",{key:"1583b694983132e116397e73c9552c95897c0353",class:"DrawResultsHeader"},this.displayAllDrawsResults?i("h4",null,Ta("drawResultsHeader",this.language)):[i("div",{class:"DrawResultsHeaderContent"},i("h4",null,Ta("allDrawResultsHistory",this.language)),i("div",{class:"FilterSection"},this.showQuickFilters&&i("div",{class:"FilterResultsContainer"},i("button",{class:"QuickFilterButton",onClick:()=>this.filterResults(5)},Ta("lastFiveDraws",this.language)),i("button",{class:"QuickFilterButton",onClick:()=>this.filterResults(10)},Ta("lastTenDraws",this.language)),i("button",{class:"QuickFilterButton",onClick:()=>this.filterResults(15)},Ta("lastFifteenDraws",this.language))),i("helper-filters",{"show-filter-id":"true","activate-ticket-search":"false","game-id":this.gameId,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))]);return i("section",{key:"4dc417fefb4d2ce1be3eaf7853a2d564ef554c38",class:"GridWrapper",ref:t=>this.stylingContainer=t},i("div",{key:"18c68785d3fa790b8e7e923dd986afa2ffc60a54",class:"DrawResultsSection"},i("div",{key:"639d8f0c70aee9bb7d70b5bf6e7ee183aafb3c32",class:"DrawResultsAreaHistory"},t,i("div",{key:"4e43f9d5acdbfceff15a84a51bd4c26f013f6781",class:"HistoryGridWrapper"},i("div",{key:"344b9d8c9bbf87dde621eadec387c484b457671a",class:"HistoryGrid"},this.isLoading&&i("p",{key:"5c0950a3c07c0e868861fd53a8a919168acca345"},Ta("fetchingResults",this.language)),!this.isLoading&&!this.noResults&&this.drawData.map((t=>i("lottery-draw-results",{endpoint:this.endpoint,"game-id":this.gameId,"draw-id":t.id,"draw-mode":!0,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))).reverse().slice(0,this.numberOfResults),!this.isLoading&&this.noResults&&i("p",{key:"9b9fccfe879e3b6f3663f1778c4f04dd8779a5c1"},Ta("noResults",this.language)))),this.displayAllDrawsResults&&i("button",{key:"3af21758d6aad9c255d164c6ced7aebfc990fd0d",class:"ViewAllResults",onClick:this.viewAllResults},Ta("viewAllResults",this.language)))))}};Ca.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 30px}.GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GridBanner .BannerButtonsWrapper .BannerBackButton,.GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #009993;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GridBanner .HistoryGridBannerArea{padding-top:30px}.HistoryGridBannerArea{display:flex;flex-direction:column;align-items:center}.BannerText{font-size:14px;font-weight:300}.BannerCountdown{font-size:22px;display:flex;gap:20px}.DrawResultsSection{max-width:600px;margin:0px auto}.HistoryGrid{border-radius:5px}.DrawResultsHeader{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.DrawNumbersGrid{padding:10px 50px}.DrawNumbersGrid p{margin:0 0 10px 0;font-size:14px}.BulletContainer{margin-bottom:20px}.DrawResultTop{background-color:#009993;padding:10px;text-align:center;color:#fff;padding:0 50px;display:flex;justify-content:center;gap:40px}.ViewAllResults{display:block;padding:10px 40px;margin:40px auto;border:0;border-radius:5px;background-color:#009993;color:#fff;outline:none}.FilterSection{display:flex;justify-content:space-between;padding:25px 15px 10px;gap:10px;margin:0px 15px}.FilterSection .FilterResultsContainer{display:flex;gap:5px;overflow-x:auto}.FilterSection .QuickFilterButton{cursor:pointer;width:max-content;border-radius:4px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterSection .QuickFilterButton:hover{background:#F1F1F1}.FilterSection helper-filters{margin-left:auto}';const Aa=class{constructor(e){t(this,e),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{key:"a972ed1a25317b0cdeb82e3b007ec79e30bbb871",class:"GamePageDetailsContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{key:"2c6f8d634241c412103cdae78909972c884b0515","header-title":"Game Details",collapsed:!1,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{key:"f5f80e173d935cb0dabb6a7ef45e54a1312b5dc8",class:"AccordionContainer",slot:"accordionContent"},i("helper-tabs",{key:"a91396e0a4aa1235cc618dfe336ae8b603bc2a6c","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};Aa.style=":host{display:block}";const Sa=["ro","en","fr","ar","hr"],za={en:{error:"Error",title:"Chrono",backButton:"Back",lobbyButton:"Lobby",prize:"Prize",winUpTo:"Win up to",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",createTicket:"Create Ticket",modalSuccess:"Purchase successfully completed!",deleteTicketModalTitle:"Delete Ticket",deleteTicketModalText:"Are you sure you want to delete this ticket?",deleteTicketModalCancel:"Cancel",deleteTicketModalConfirm:"Delete",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",lastDrawResultsTitle:"Last Draw Results",modalLogin:"Please login to submit a ticket"},ro:{error:"Eroare",title:"Loto 6/49",backButton:"Inapoi",lobbyButton:"Lobby",prize:"MARELE JACKPOT OMG",winUpTo:"Castiga pana la",nextDraw:"Urmatoarea extragere:",buy:"Cumpara bilet",viewLatest:"Ultimile extrageri",createTicket:"Creeaza bilet",modalSuccess:"Achizitie efectuata cu succes",deleteTicketModalTitle:"Sterge biletul",deleteTicketModalText:"Esti sigur ca vrei sa stergi acest bilet?",deleteTicketModalCancel:"Anuleaza",deleteTicketModalConfirm:"Sterge",orderSummaryTitle:"Rezumat comanda",orderSummaryTickets:"Bilet",orderSummaryTotal:"Total",orderSummarySubmit:"Trimite",lastDrawResultsTitle:"Cele mai recente extrageri",modalLogin:"Please login to submit a ticket"},fr:{error:"Error",title:"Chrono",backButton:"Back",lobbyButton:"Lobby",prize:"Prize",winUpTo:"Win up to",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",createTicket:"Create Ticket",modalSuccess:"Purchase successfully completed!",deleteTicketModalTitle:"Delete Ticket",deleteTicketModalText:"Are you sure you want to delete this ticket?",deleteTicketModalCancel:"Cancel",deleteTicketModalConfirm:"Delete",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",lastDrawResultsTitle:"Résultats du dernier tirage",modalLogin:"Please login to submit a ticket"},ar:{error:"خطأ",title:"كرونو",backButton:"خلف",lobbyButton:"ردهة",prize:"جائزة",winUpTo:"الفوز بما يصل الى",nextDraw:"السحب التالي:",buy:"اشتري تذاكر",viewLatest:"عرض أحدث النتائج",createTicket:"إنشاء تذكرة",modalSuccess:"!سيتم الشراء بنجاح قريبًا",deleteTicketModalTitle:"حذف التذكرة",deleteTicketModalText:"هل أنت متأكد أنك تريد حذف هذه التذكرة؟",deleteTicketModalCancel:"يلغي",deleteTicketModalConfirm:"حذف",orderSummaryTitle:"ملخص الطلب",orderSummaryTickets:"تذكرة",orderSummaryTotal:"المجموع",orderSummarySubmit:"يُقدِّم",lastDrawResultsTitle:"نتائج آخر سحب",modalLogin:"الرجاء تسجيل الدخول لتقديم تذكرة"},hr:{error:"Greška",title:"Krono",backButton:"Nazad",lobbyButton:"Lobby",prize:"Nagrada",winUpTo:"Osvoji do",nextDraw:"Sljedeće izvlačenje za: ",buy:"Uplati listić",viewLatest:"Pogledajte najnovije rezultate",createTicket:"Uplati listić",modalSuccess:"Kupnja uspješno obavljena!",deleteTicketModalTitle:"Izbriši listić",deleteTicketModalText:"Are you sure you want to delete this ticket?",deleteTicketModalCancel:"Otkaži",deleteTicketModalConfirm:"Izbriši",orderSummaryTitle:"Sažetak narudžbe",orderSummaryTickets:"Listić",orderSummaryTotal:"Ukupno",orderSummarySubmit:"Podnijeti",lastDrawResultsTitle:"Rezultati posljednjeg izvlačenja",modalLogin:"Molimo prijavite se da uplatite listić"}},Fa=(t,e)=>{const i=e;return za[void 0!==i&&Sa.includes(i)?i:"en"][t]},Ba=class{constructor(i){var s;t(this,i),this.goBackEvent=e(this,"goBackEvent",7),this.goToLobbyEvent=e(this,"goToLobbyEvent",7),this.userAgent=window.navigator.userAgent,this.multiplier=!1,this.quickPick=!1,this.isMobile=!!((s=this.userAgent).toLowerCase().match(/android/i)||s.toLowerCase().match(/blackberry|bb/i)||s.toLowerCase().match(/iphone|ipad|ipod/i)||s.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingurl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{this.clientStylingUrlContent=t,e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)})).catch((t=>{console.log("error ",t)}))},this.endpoint=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.language="en",this.backgroundUrl=void 0,this.autoPick=!1,this.resetButton=!1,this.clientStyling="",this.clientStylingurl="",this.clientStylingUrlContent="",this.tickets=[],this.tabIndex=0,this.hasErrors=!1,this.totalAmount=0,this.successVisible=!1,this.deleteVisible=!1,this.deleteEventData=void 0,this.daysRemaining=void 0,this.hoursRemaining=void 0,this.minutesRemaining=void 0,this.secondsRemaining=void 0,this.latestDraw={},this.totalWinningsAmount=0,this.nextDate=void 0,this.isLoggedIn=!1,this.loginModalVisible=!1,this.limitStylingAppends=!1}connectedCallback(){this.getGameDetails(),this.getDraws(),this.sessionId&&(this.isLoggedIn=!0)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingurl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}countdownLogic(t){this.interval=setInterval((()=>{this.daysRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/864e5),this.hoursRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/36e5-24*this.daysRemaining),this.minutesRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/6e4-24*this.daysRemaining*60-60*this.hoursRemaining),this.secondsRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/1e3-24*this.daysRemaining*60*60-60*this.hoursRemaining*60-60*this.minutesRemaining)}),1e3)}disconnectedCallback(){clearInterval(this.interval)}getGameDetails(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.status>=300)throw this.hasErrors=!0,new Error("There was an error while fetching the data");return t.json()})).then((t=>{this.gameData=t,this.basicStake=this.gameData.type.stakes[0].amount;let e=this.gameData.draws.filter((t=>!t.winningNumbers));e.length>0&&(this.nextDraw=e[0].id),this.createNewTicket()})).catch((t=>{this.hasErrors=!0,console.log("Error",t)}))}calculateTotalAmount(){const{currency:t}=this.gameData.type.stakes[0];this.totalAmount=0,this.tickets.forEach((t=>{t.completed&&(this.totalAmount+=t.amount*t.stake)})),this.currency=t}gridFilledHandler(t){this.tickets=this.tickets.map((e=>{if(e.ticketId==t.detail.id){let i=e.selectedNumbers||[];return i[t.detail.index]=t.detail.selectedNumbers.map((t=>parseInt(t,10))),{gameId:e.gameId,ticketId:e.ticketId,completed:!0,amount:t.detail.draws,stake:e.stake,selectedNumbers:i}}return e})),this.calculateTotalAmount()}gridDirtyHandler(t){this.tickets=this.tickets.map((e=>e.gameId==t.detail.id?{gameId:e.gameId,ticketId:e.ticketId,completed:!1,amount:e.amount,stake:e.stake,grids:[]}:e))}deleteTicketHandler(t){this.deleteVisible=!0,this.deleteEventData=t}modalCloseEvent(){this.deleteVisible=!1,this.loginModalVisible=!1}stakeChangeHandler(t){const{ticketId:e,stake:i}=t.detail;this.tickets[e-1].stake=i,this.calculateTotalAmount()}multiplierChangeHandler(t){this.multiplier=t.detail}getDraws(){let t=new URL(`${this.endpoint}/games/${this.gameId}/draws`);fetch(t.href,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((t=>t.json())).then((t=>{var e;let i=t.items.filter((t=>{if(Date.parse(t.date)>(new Date).getTime())return!t.winningNumbers})),s=t.items.filter((t=>t.winningNumbers));i[0]&&(this.latestDraw=i[0],this.nextDate=this.latestDraw.date,this.countdownLogic(this.nextDate),this.lastDrawId=s[s.length-1].id,null===(e=this.latestDraw)||void 0===e||e.prizes.forEach((t=>{this.totalWinningsAmount+=JSON.parse(t.amount)})))})).catch((t=>{console.log("error ",t)}))}confirmDeleteTicketHandler(t){this.tickets=this.tickets.filter((e=>e.ticketId!=t.detail.ticketId)),this.calculateTotalAmount(),this.deleteVisible=!1}createNewTicket(){this.tickets=[...this.tickets,{gameId:this.gameId,ticketId:this.tickets.length+1,completed:!1,amount:1,stake:this.basicStake,grids:[]}]}showLoginModal(){this.loginModalVisible=!0}submitTickets(){let t=new URL(`${this.endpoint}/tickets`),e={gameId:this.gameId,tickets:[]};this.tickets.forEach((t=>{e.tickets.push({startingDrawId:this.nextDraw,amount:t.stake,gameId:this.gameId,currency:this.currency,selection:t.selectedNumbers,multiplier:this.multiplier,drawCount:t.amount,quickPick:this.quickPick})}));let i={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${this.sessionId}`},body:JSON.stringify(e)};fetch(t.href,i).then((t=>{if(t.status>300)throw new Error("err");return t.json()})).then((t=>{console.log("data",t)})).catch((t=>{console.log("error ",t)})),this.successVisible=!0}goBack(){this.goBackEvent.emit()}goToLobby(){this.goToLobbyEvent.emit()}render(){const t=o(this.isMobile?"/assets/chrono_lottery_mobile.png":"/assets/chrono_desktop.png");return this.hasErrors?i("div",{class:"GamePage"},i("div",{class:"Title"},Fa("error",this.language))):i("div",{class:"GamePage",dir:"ar"==this.language?"rtl":"ltr",ref:t=>this.stylingContainer=t},i("div",{class:"GridBanner",style:{background:`url(${this.backgroundUrl?this.backgroundUrl:t})`,"background-size":"contain","background-repeat":"no-repeat","background-position":"center"}},i("div",{class:"BannerButtonsWrapper"},i("button",{class:"BannerBackButton",onClick:this.goBack.bind(this)},i("span",{class:"BannerBackButtonArrow"},"ᐸ "),Fa("backButton",this.language)),i("button",{class:"BannerLobbyButton",onClick:this.goToLobby.bind(this)},Fa("lobbyButton",this.language))),i("div",{class:"Tabs"},i("div",{class:"TabButton"+(0==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=0},Fa("buy",this.language)),i("div",{class:"TabButton"+(1==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=1},Fa("viewLatest",this.language)))),i("div",{class:"NextDrawWrapper"},i("div",{class:"TotalWinnings"},Fa("winUpTo",this.language),": ",i("span",null,"$",this.totalWinningsAmount.toLocaleString("en-US",{maximumFractionDigits:2}))),i("div",{class:"NextDraw"},i("p",{class:"BannerText"},Fa("nextDraw",this.language)),i("div",{class:"BannerCountdown"},i("span",{class:"CountdownDays"},this.daysRemaining,"D"),i("span",{class:"CountdownHours"},this.hoursRemaining,"H"),i("span",{class:"CountdownMinutes"},this.minutesRemaining,"M"),i("span",{class:"CountdownSeconds"},this.secondsRemaining,"S")))),0==this.tabIndex&&i("div",{class:"GamePageContent"},i("div",{class:"GameDetails"},i("lottery-game-details",{"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),i("div",{class:"TicketsWrapper"},this.tickets.map((t=>i("lottery-ticket-controller",{endpoint:this.endpoint,"ticket-id":t.ticketId,"game-id":t.gameId,collapsed:!1,last:!0,language:this.language,"auto-pick":this.autoPick,"reset-button":this.resetButton,"total-controllers":this.tickets.length,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))),i("div",{class:"CreateNewTicket"},i("button",{onClick:()=>this.createNewTicket()},"+"),i("span",null,Fa("createTicket",this.language)))),i("div",{class:"OrderSummary"},i("h3",{class:"OrderSummaryTitle"},Fa("orderSummaryTitle",this.language)),i("div",{class:"Ticket"},Fa("orderSummaryTickets",this.language),": ",i("span",null,this.tickets.length)),i("hr",null),i("div",{class:"Total"},Fa("orderSummaryTotal",this.language),": ",i("span",null,this.totalAmount," ",this.currency)),i("div",{class:"ButtonWrapper"},this.isLoggedIn&&i("span",{class:"Button",onClick:()=>this.submitTickets()},Fa("orderSummarySubmit",this.language)),!this.isLoggedIn&&i("div",null,i("span",{class:"Button",onClick:()=>this.showLoginModal()},Fa("orderSummarySubmit",this.language)),i("helper-modal",{"title-modal":"Success",visible:this.loginModalVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("p",{class:"SubmitModalSuccess"},Fa("modalLogin",this.language))))))),1==this.tabIndex&&i("div",null,i("h4",{class:"LastDrawResultsTitle"},Fa("lastDrawResultsTitle",this.language)),i("lottery-draw-results",{endpoint:this.endpoint,"game-id":this.gameId,language:this.language,"draw-id":this.lastDrawId,"draw-mode":!0,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}),i("lottery-draw-results-history",{endpoint:this.endpoint,"game-id":this.gameId,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),i("helper-modal",{"title-modal":"Success",visible:this.successVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("p",{class:"SubmitModalSuccess"},Fa("modalSuccess",this.language))),i("helper-modal",{"title-modal":"Delete Ticket",visible:this.deleteVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{class:"DeleteTicketModalWrapper"},i("h3",{class:"DeleteTicketModalTitle"},Fa("deleteTicketModalTitle",this.language)),i("p",{class:"DeleteTicketModalText"},Fa("deleteTicketModalText",this.language)),i("div",{class:"DeleteTicketModalButtons"},i("button",{class:"DeleteTicketModalCancel",onClick:()=>this.modalCloseEvent()},Fa("deleteTicketModalCancel",this.language)),i("button",{class:"DeleteTicketModalConfirm",onClick:()=>this.confirmDeleteTicketHandler(this.deleteEventData)},Fa("deleteTicketModalConfirm",this.language))))))}static get assetsDirs(){return["static"]}get element(){return s(this)}};Ba.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GamePage .GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 10px;height:220px;display:flex;flex-direction:column;justify-content:space-between}.GamePage .GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GamePage .GridBanner .BannerButtonsWrapper .BannerBackButton,.GamePage .GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #D4D4D4;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GamePage .GridBanner .GridBannerArea{padding-top:30px;display:flex;flex-direction:column;align-items:center}.GamePage .TotalWinnings{color:#000;font-size:18px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;text-transform:uppercase}.GamePage .TotalWinnings span{font-size:18px;font-weight:700}.GamePage .NextDraw{color:#00958f;font-size:24px;font-weight:600;margin:0 auto;text-align:center;text-transform:uppercase;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:4px}.GamePage .NextDraw .BannerText{font-weight:400;font-size:18px;text-transform:uppercase;padding:0;margin:15px 0 0 0}.GamePage .NextDraw .BannerCountdown{font-size:22px;color:#00958f;display:flex;gap:20px}.GamePage .Tabs{display:flex;justify-content:center;gap:10px}.GamePage .Tabs .TabButton{border-radius:4px;cursor:pointer;padding:8px 0;width:50%;max-width:200px;border:1px solid #00958f;background:#00958f;color:#fff;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.GamePage .Tabs .TabButton.Active{color:#00958f;background:#F1F1F1;border:1px solid #F1F1F1}.LastDrawResultsTitle{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px;text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.NextDrawWrapper{padding:10px 15px;background:#F1F1F1;background:linear-gradient(0deg, rgb(241, 241, 241) 0%, rgba(253, 187, 45, 0) 100%)}.NextDrawWrapper .BannerText{font-size:16px;font-weight:700;text-align:center}.NextDrawWrapper .BannerCountdown{font-size:22px;display:flex;gap:8px;color:#009993;font-weight:bolder;justify-content:center}.GamePageContent{padding:15px;max-width:1200px;margin:0 auto}.GameDetails{padding-bottom:10px;margin-bottom:20px}.CreateNewTicket{background:#004D4A;height:100px;width:100%;display:flex;margin-top:10px;flex-direction:column;justify-content:center;align-items:center}.CreateNewTicket button{cursor:pointer;display:inline-block;border-radius:50%;width:40px;height:40px;margin:5px;border:1px solid #FFF;background:#FFF;color:#004D4A;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.CreateNewTicket button:hover{background:#F1F1F1}.CreateNewTicket span{display:inline-block;font-size:12px;text-align:center;margin:0 auto;color:#FFF}.OrderSummary{min-width:200px;border-radius:4px;display:flex;flex-direction:column;justify-content:center;margin-top:20px;background:#fff}.OrderSummary .OrderSummaryTitle{font-size:16px;color:#009993;text-transform:uppercase;text-align:center}.OrderSummary .Ticket{display:inline-block;color:#000;font-size:14px;height:50px;line-height:50px;margin-left:15px}.OrderSummary .Ticket span{text-align:right}.OrderSummary hr{border:none;border-top:1px double #D4D4D4;color:#D4D4D4;width:100%}.OrderSummary .Total{display:inline-block;color:#000;font-size:14px;height:50px;line-height:50px;margin-left:15px}.OrderSummary .Total span{text-align:right}.ButtonWrapper{display:flex;align-items:center;justify-content:center}.ButtonWrapper .Button{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#009993;border:1px solid #009993;color:#FFF}.ButtonWrapper .Button:hover{background:#00ABA4}.ButtonWrapper .Button.ButtonDisabled{pointer-events:none;background:#ccc;border:1px solid #ccc}.SubmitModalSuccess{text-align:center;font-size:18px;padding:20px}.DeleteTicketModalWrapper{padding:20px;text-align:center}.DeleteTicketModalWrapper .DeleteTicketModalTitle{font-size:16px;color:#00958f;font-weight:400;text-transform:uppercase;margin:20px 0 40px}.DeleteTicketModalWrapper .DeleteTicketModalText{font-size:14px;color:#000;line-height:22px;margin-bottom:40px}.DeleteTicketModalWrapper .DeleteTicketModalButtons{display:flex;gap:10px;justify-content:center}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm{cursor:pointer;border-radius:4px;padding:8px 25px;width:max-content;margin:5px;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm:hover{background:#FF6536;border:1px solid #FF3D00}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel{cursor:pointer;width:max-content;border-radius:4px;padding:10px 25px;margin:5px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel:hover{background:#F1F1F1}@media (min-width: 1200px){.GamePageContent .TicketsWrapper{float:left;width:49%}.GamePageContent .GameDetails{float:right;width:49%}.GamePageContent .OrderSummary{float:right;width:49%}}';const Ma=class{constructor(i){t(this,i),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.selectedCounter=0,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.ticketId=void 0,this.totalNumbers=0,this.gameId=void 0,this.maximumAllowed=0,this.minimumAllowed=1,this.selectable=!0,this.selectedNumbers="",this.displaySelected=!1,this.language="en",this.gridIndex=void 0,this.gridType="",this.clientStyling="",this.clientStylingUrlContent="",this.numbers=[],this.limitStylingAppends=!1}connectedCallback(){let t=[];this.selectedNumbers.length>0&&(t=this.selectedNumbers.split(","),this.selectedCounter=t.length),this.displaySelected?t.forEach((t=>{this.numbers.push({number:t,selected:!0,selectable:this.selectable})})):[...Array(this.totalNumbers).keys()].map((t=>(t+1).toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0,selectable:this.selectedCounter!=this.maximumAllowed&&this.selectable})}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}shuffleArray(t){const e=[];for(;t.length>0;){const i=Math.floor(Math.random()*t.length);e.push(t.splice(i,1)[0])}return e}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>e.number==t.detail.value?{number:e.number,selected:t.detail.selected,selectable:e.selectable}:{number:e.number,selected:e.selected,selectable:e.selectable})),t.detail.selected?(this.selectedCounter+=1,this.selectedCounter==this.maximumAllowed&&(this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!!t.selected}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))):(this.selectedCounter==this.maximumAllowed&&(this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!0}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))})),this.selectedCounter-=1)}async resetSelectionHandler(t){t.detail&&t.detail==this.ticketId&&(this.selectedCounter=0,this.numbers=this.numbers.map((t=>({number:t.number,selected:!1,selectable:this.selectable}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))}async autoSelectionHandler(t){if(t.detail&&t.detail==this.ticketId){this.resetSelectionHandler(t);let e=[...Array(this.totalNumbers).keys()].map((t=>t+1));e=this.shuffleArray(e),e=e.slice(0,this.minimumAllowed),this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0,selectable:e.indexOf(parseInt(t.number,10))>=0}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),this.selectedCounter=this.maximumAllowed}}render(){return i("div",{key:"54b9187146b5d2625fd5ce7f53f38abf091cd943",class:"GridContainer",ref:t=>this.stylingContainer=t},i("div",{key:"e7e8570557ebaa78edf881cdbc1ed720028cdf6e",class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>i("div",null,i("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))))}};Ma.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}';const Ia=["ro","en","hr"],Pa={en:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"I feel lucky"},ro:{loading:"Se incarca, va rugam asteptati ...",error:"A fost o eroare in timp ce asteptam datele",grid:"Grid",multiplier:"Multiplicator",numberOfDraws:"Numarul de extrageri",wagerPerDraw:"Pariul per extragere",resetButton:"Reseteaza",autoButton:"Ma simt norocos"},fr:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"I feel lucky"},ar:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"I feel lucky"},hr:{loading:"Učitavanje, molimo pričekajte ...",error:"Došlo je do pogreške prilikom pokušaja dohvaćanja podataka",grid:"Tablica",multiplier:"Multiplikator",numberOfDraws:"Broj izvlačenja",wagerPerDraw:"Ulog po izvlačenju",resetButton:"Resetiraj",autoButton:"Osjećam se sretno"}},Na=(t,e)=>{const i=e;return Pa[void 0!==i&&Ia.includes(i)?i:"en"][t]},Ea=class{constructor(i){t(this,i),this.ticketCompleted=e(this,"ticketCompleted",7),this.autoSelection=e(this,"autoSelection",7),this.resetSelection=e(this,"resetSelection",7),this.stakeChange=e(this,"stakeChange",7),this.multiplierChange=e(this,"multiplierChange",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.endpoint=void 0,this.gameId=void 0,this.numberOfGrids=1,this.multipleDraws=!0,this.ticketId=void 0,this.resetButton=!1,this.autoPick=!1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.multiplier=!1,this.numberOfDraws=1,this.isLoading=!0,this.hasErrors=!1,this.ticketDone=!1,this.isCustomSelect=!1,this.amountInfo={},this.limitStylingAppends=!1}checkForClickOutside(t){"SelectComponent"!==t.composedPath()[0].getAttribute("data-cluster")&&(this.isCustomSelect=!1)}connectedCallback(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.ok)return t.json();this.hasErrors=!0})).then((t=>{this.isLoading=!1,this.gameData=t,this.grids=[...Array(this.gameData.type.boards.length).keys()],this.amountInfo=this.gameData.type.stakes[0]})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}multiplierChangeHandler(t){this.multiplier=!!t.target&&t.target.checked,this.multiplierChange.emit(this.multiplier)}drawsChangeHandler(t){this.ticket=Object.assign(Object.assign({},this.ticket),{draws:t}),this.ticketCompleted.emit(this.ticket)}gridFilledHandler(t){this.ticket=Object.assign(Object.assign({},t.detail),{draws:this.numberOfDraws}),this.ticketDone=!0,this.ticketCompleted.emit(this.ticket)}toggleAutoSelection(){this.ticketDone=!0,this.autoSelection.emit(this.ticketId)}toggleResetSelection(){this.ticketDone=!1,this.resetSelection.emit(this.ticketId)}changeStake(t,e){this.stakeChange.emit({ticketId:t,stake:e})}toggleClass(){this.isCustomSelect=!this.isCustomSelect}setDropdownItem(t){this.amountInfo={value:t.value,currency:t.currency},this.isCustomSelect=!1,this.changeStake(this.ticketId,t.amount)}render(){if(this.isLoading)return i("div",null,i("p",null,Na("loading",this.language)));if(this.hasErrors)return i("div",null,i("p",null,Na("error",this.language)));{const{type:t}=this.gameData;return i("div",{class:"TicketContainer",ref:t=>this.stylingContainer=t},i("p",{class:"TicketTitle"},this.gameData.name),this.resetButton&&this.ticketDone&&i("div",{class:"ButtonContainer"},i("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection()},Na("resetButton",this.language))),this.autoPick&&!this.ticketDone&&i("div",{class:"ButtonContainer"},i("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection()},Na("autoButton",this.language))),this.grids.map(((e,s)=>i("div",{class:"TicketGridBullets"},i("p",{class:"TicketGridTitle"},Na("grid",this.language)," ",s+1),i("lottery-grid",{"grid-index":s,"maximum-allowed":t.boards[s].maximumAllowed,"minimum-allowed":t.boards[s].minimumAllowed,"total-numbers":t.boards[s].highNumber-t.boards[s].lowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))),t.multiplier&&i("div",null,i("label",{class:"Toggle"},i("label",{class:"Label"},Na("multiplier",this.language),": "),i("input",{class:"ToggleCheckbox",type:"checkbox",onInput:t=>this.multiplierChangeHandler(t)}),i("div",{class:"ToggleSwitch"}))),this.multipleDraws&&i("div",{class:"TicketDraws"},i("label",{class:"Label"},Na("numberOfDraws",this.language),": "),i("div",{class:"NumberInput"},i("button",{onClick:()=>this.numberOfDraws>1?this.numberOfDraws--:this.numberOfDraws=1,class:"Minus"},"-"),i("input",{class:"InputDefault",min:"1",value:this.numberOfDraws,type:"number"}),i("button",{onClick:()=>this.numberOfDraws++,class:"Plus"},"+"))),i("div",null,i("label",{class:"Label"},Na("wagerPerDraw",this.language),": "),i("div",{class:"WagerInput"},t.stakes.length>1?i("div",{"data-cluster":"SelectComponent",class:this.isCustomSelect?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{"data-cluster":"SelectComponent",class:"SelectButton",onClick:()=>this.toggleClass()},i("span",{"data-cluster":"SelectComponent"},this.amountInfo.value," ",this.amountInfo.currency),i("span",{"data-cluster":"SelectComponent",class:"SelectExpand"},"▼")),i("div",{"data-cluster":"SelectComponent",class:"SelectContent"},i("ul",{"data-cluster":"SelectComponent",class:"SelectOptions"},t.stakes.map((t=>i("li",{"data-cluster":"SelectComponent",class:this.amountInfo.value==t.value?"SelectedValue":"",value:t.value,onClick:()=>this.setDropdownItem(t)},t.value," ",t.currency)))))):i("div",null,i("input",{min:"1",value:t.stakes[0].amount,type:"number",disabled:!0}),i("p",{class:"WagerInputTitle"},t.stakes[0].currency)))))}}static get watchers(){return{numberOfDraws:["drawsChangeHandler"]}}};Ea.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketTitle{font-size:16px;font-weight:bold}.ButtonContainer{display:flex;justify-content:flex-end}.Toggle{cursor:pointer;margin-top:20px;display:inline-block}.ToggleSwitch{display:inline-block;background:#707070;border-radius:16px;width:58px;height:24px;position:relative;vertical-align:middle;transition:background 0.25s}.ToggleSwitch:before,.ToggleSwitch:after{content:""}.ToggleSwitch:before{display:block;background:linear-gradient(to bottom, #fff 0%, #F1F1F1 100%);border-radius:50%;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.25);width:16px;height:16px;position:absolute;top:4px;left:4px;transition:left 0.25s}.Toggle:hover .ToggleSwitch:before{background:linear-gradient(to bottom, #fff 0%, #fff 100%);box-shadow:0 0 0 1px rgba(0, 0, 0, 0.5)}.ToggleCheckbox:checked+.ToggleSwitch{background:#00ABA4}.ToggleCheckbox:checked+.ToggleSwitch:before{left:38px}.ToggleCheckbox{position:absolute;visibility:hidden}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:#000}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;border:none;align-items:center;justify-content:center;height:20px;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:#000;padding:10px}.InputDefault{background-color:#F1F1F1;border-radius:4px;padding:5px;border:solid 1px #D4D4D4;color:#707070}.AutoButton{cursor:pointer;display:inline-block;border-radius:4px;padding:8px 20px;width:max-content;margin:5px 0;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.AutoButton:active{background:#00958f;color:#FFF}.ResetButton{cursor:pointer;display:inline-block;border-radius:4px;padding:8px 20px;width:max-content;margin:5px 0;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ResetButton:hover{background:#FF6536;border:1px solid #FF3D00}.TicketGridBullets{background:#f1f1f1;border-radius:4px;padding:20px;margin-top:5px}.TicketGridBullets .TicketGridTitle{margin-top:0px}.Minus{border-radius:4px;width:30px;height:24px !important;margin-right:10px;color:#FFF;background:#009993}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:#FFF;background:#009993}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid #ccc;border-radius:5px;position:relative}.SelectButton,.SelectOptions li{display:flex;align-items:center;cursor:pointer}.SelectButton{display:flex;padding:0 5px;border-radius:7px;align-items:center;justify-content:space-between;font-size:14px}.SelectButton span:first-child{padding-right:10px}.SelectExpand{transition:transform 0.3s linear;font-size:12px}.SelectActive .SelectExpand{transform:rotate(180deg)}.SelectContent{display:none;padding:5px;border-radius:7px}.SelectWrapper.SelectActive .SelectContent{width:100%;display:block;position:absolute;left:0;top:32px;padding:0;border:1px solid #ccc;overflow:hidden;background:#fff}.SelectContent .SelectOptions{max-height:100px;margin:0;overflow-y:auto;padding:0}.SelectContent .SelectOptions .SelectedValue{background-color:#009993;color:#fff}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:#f1f1f1;border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:#ccc;border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:#f2f2f2}';const Oa=["ro","en","fr","ar","hr"],Ra={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"},hr:{ticket:"Listić"}},ja=(t,e)=>{const i=e;return Ra[void 0!==i&&Oa.includes(i)?i:"en"][t]},Ha=class{constructor(i){t(this,i),this.deleteTicketEvent=e(this,"deleteTicket",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.endpoint="",this.ticketId=1,this.ticketDescription=void 0,this.gameId=void 0,this.postMessage=!1,this.eventName="deleteTicketAction",this.collapsed=!0,this.numberOfGrids=1,this.last=!1,this.language="en",this.autoPick=!1,this.resetButton=!1,this.totalControllers=1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return console.log("ticket id:",this.ticketId),i("div",{key:"203c89c4b240cd7c99eb3d37fa3a4dbc17ed18e3",class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{key:"ad9801b15a1718ff7470ab3084c4b569ad23f6e3","header-title":`${ja("ticket",this.language)} ${this.ticketId}`,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":1!==this.totalControllers,collapsed:!this.last||this.collapsed,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{key:"b9c618987e848d4b44fee6941f8b5c9696bd44e8",slot:"accordionContent"},i("lottery-ticket",{key:"8acdc3d3cce5b654e7cddd71576c2e993881786f",endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"reset-button":this.resetButton,"auto-pick":this.autoPick,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};Ha.style=':host{font-family:"Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:0.8rem}*,*::before,*::after{margin:0;padding:0;list-style:none;outline:none;box-sizing:border-box}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.player-account-gaming-limits-popup-2{background:var(--emfe-w-color-black, #000000);color:var(--emfe-w-color-white, #000)}.Title{font-weight:800;font-size:18px}button{display:block;font-size:0.75rem;padding:12px 0;border:0;border-radius:2px;cursor:pointer}button.PrimaryButtonStyle{font-size:14px;color:#fff;background:rgb(122, 195, 23)}button.SecondaryButtonStyle{border:1px solid #999;color:#666;background:#fff}.LinkButton{display:inline;padding:0;color:#3366CC;text-decoration:underline;background-color:rgba(0, 0, 0, 0)}.ResultIconWrapper{display:flex;flex-direction:column;align-items:center;margin:12px 0}.ResultIconWrapper svg{height:auto;width:60px;margin:12px}.ResultIconWrapper p{color:#666}.Overlay{position:absolute;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center}.ModalContainer{position:fixed;top:30vh;width:320px;height:auto;padding:18px 14px;background:#fff;border-radius:4px}.InitialWrapper{display:flex;flex-direction:column;gap:12px}.AdditionalInformation{margin:10px 0;font-size:14px}.TermsConditions{font-size:12px}.ExpandButton{font-size:14px;background-color:#fff;border:0;padding:0;margin-top:-10px;color:#999;display:flex;justify-content:center;align-items:center;cursor:pointer}.ExpandButton svg{width:28px;height:auto;margin-left:-4px}.LeftAlign{text-align:left;font-size:16px}.CenterAlign{text-align:center}.SetLimitSection{display:flex;flex-direction:column;gap:6px}.DepositTextSection{display:flex;justify-content:space-between}.DepositInputSection{height:32px;display:flex;gap:4px}.DepositInput{flex-grow:1;padding:0 6px}.SubmitDepositButton{flex-grow:1;font-size:0.75rem;padding:0}.SubmitDepositButton[disabled]{align-items:center;color:#ccc;cursor:not-allowed;background:#fff;border:#ccc 1px solid}.Hidden{display:none}.Extended{transform:rotate(180deg)}';export{a as helper_accordion,pa as helper_filters,fa as helper_modal,ba as helper_tab,ga as helper_tabs,va as lottery_bullet,ka as lottery_draw_results,Ca as lottery_draw_results_history,Aa as lottery_game_details,Ba as lottery_game_page,Ma as lottery_grid,Ea as lottery_ticket,Ha as lottery_ticket_controller}
|
|
4046
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new aa(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new na(this.inputElement,this._labelController)),this._tooltipController=new Cs(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}c(ua);const pa=class{constructor(i){t(this,i),this.filterDraw=e(this,"filterDraw",7),this.filterSelection=e(this,"filterSelection",7),this.filterSelectionReset=e(this,"filterSelectionReset",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.showFilterId=!0,this.activateTicketSearch=!1,this.gameId="",this.playerId="",this.session="",this.postMessage=!1,this.language="en",this.quickFiltersActive=!1,this.clientStyling="",this.clientStylingUrlContent="",this.showFilterModal=!1,this.showClearButton=!1,this.filterData={},this.filterDataReset={ticketDrawId:"",filterFromCalendar:"",filterToCalendar:""},this.limitStylingAppends=!1}componentDidRender(){document.getElementById("#FilterById")&&(document.getElementById("#FilterById").value=""),!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}filterSelectionHandler(t){this.postMessage&&window.postMessage({type:"filterSelection",event:t},window.location.href),(this.filterData.ticketDrawId||this.filterData.filterFromCalendar||this.filterData.filterToCalendar)&&this.filterSelection.emit(t)}filterSelectionResetHandler(t){this.postMessage&&window.postMessage({type:"filterSelectionReset",event:t},window.location.href),this.filterSelectionReset.emit(t)}modalCloseEvent(){this.showFilterModal=!1}toggleFilterModal(){this.showFilterModal=!0}filterSearch(){this.modalCloseEvent(),this.showClearButton=!0,this.filterSelectionHandler(this.filterData),console.log(this.showClearButton)}resetSearch(){this.showClearButton=!1,this.filterSelectionResetHandler(this.filterDataReset),this.filterData={}}handleTicketDrawId(t){this.filterData.ticketDrawId=t.target.value}handleFilterFrom(t){this.filterData.filterFromCalendar=new Date(t.target.value).toISOString()}handleFilterTo(t){this.filterData.filterToCalendar=new Date(t.target.value).toISOString()}render(){return i("div",{key:"d74774bd58fa3df6b0038fd979fb4aec4262d43d",class:"HelperFilters",ref:t=>this.stylingContainer=t},i("div",{key:"0827128924ba350888ae81e67e0306e536b15047",class:"FilterButtonsWrapper"},i("button",{key:"73ae5aff5896195cd895410caf44dccfa1ac5cfc",class:"FilterOpen",onClick:()=>this.toggleFilterModal()},h("filterOpen",this.language)),console.log("in filter Open",this.showClearButton,this.quickFiltersActive),this.showClearButton||this.quickFiltersActive?i("button",{class:"FilterClear",onClick:()=>this.resetSearch()},h("filterClear",this.language)):null),i("helper-modal",{key:"add83df2714fdb69e8dfa7a0f5d1eb0d526fc2b4","title-modal":"Filter Modal",visible:this.showFilterModal,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{key:"861b04161876b557184fe49c514867788147e4b9",class:"FilterModalHeader"},i("h3",{key:"7471430912f301ff995c401b08298d9006816216",class:"FilterModalTitle"},h(this.activateTicketSearch?"filterModalTicketTitle":"filterModalDrawTitle",this.language))),i("div",{key:"af6bd8e253f332c8724e1bb40100ba5e1e59838f",class:"FilterModalBody"},i("input",{key:"9edc7e14b801d40d4861625264f82b2fa213a770",id:"FilterById",type:"text",value:this.filterData.ticketDrawId,onInput:t=>this.handleTicketDrawId(t),class:"FilterModalSearch",placeholder:h(this.activateTicketSearch?"filterTicketPlaceholder":"filterDrawPlaceholder",this.language)}),i("p",{key:"9665b359f9d6da19f120eb9bb315c4b144c80ced"},h("filterOrDate",this.language)),i("div",{key:"d155c7d73a719aaedc581f51aa97cf21ec3125df",class:"FilterCalendarWrapper"},i("vaadin-date-picker",{key:"586fb38bc5c718a4afa06ebec96bec0fd46949eb",value:this.filterData.filterFromCalendar,onChange:t=>this.handleFilterFrom(t),placeholder:h("filterFromCalendar",this.language),class:"VaadinDatePicker"}),i("vaadin-date-picker",{key:"42e8965b2c740c19c53687c114faf6aa22f11de8",value:this.filterData.filterToCalendar,onChange:t=>this.handleFilterTo(t),placeholder:h("filterToCalendar",this.language),class:"VaadinDatePicker"}))),i("div",{key:"7529eef1b25d130d183a55e45862418444054d3c",class:"FilterModalFooter"},i("button",{key:"7dac7dc7b01c1c66dde7c6670a352f597b3f75fc",class:"FilterModalButton",onClick:()=>this.filterSearch()},h("filterModalButton",this.language)))))}};pa.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:#00958f;color:#FFF}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:4px;padding:8px 15px;width:max-content;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:#00958f;color:#FFF}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:#009993;text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:4px;background:#e8ebef;color:#263445;width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:#009993}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;border:1px solid #00958f;background:#00958f;color:#FFF;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:#00958f;color:#FFF}.FilterModalHeader p,.FilterModalBody p,.FilterModalFooter p{margin:5px 0}';const ma=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)),fa=class{constructor(i){t(this,i),this.cancel=e(this,"modalCloseEvent",7),this.userAgent=window.navigator.userAgent,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.titleModal=void 0,this.visible=!0,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}handleHelperModalClose(){this.visible=!1,this.cancel.emit()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return this.visible&&i("div",{key:"ba2aed789565b37bfdbb34bdf3ccace827231653",class:this.visible?"HelperModalWrapper HelperModalVisible":"HelperModalWrapper",ref:t=>this.stylingContainer=t},i("div",{key:"151ca4cd80d259ac955b92b10bf6f0df2698a937",class:"HelperModalWrapper HelperModalVisible"},i("div",{key:"804cb1dea73321c4935e4a8ddb1136e98e89a070",class:"HelperModalContent"+(ma(this.userAgent)?" HelperModalMobileContent":"")},i("span",{key:"30cf7928c1e4baa53f3514fc1930823db76c874c",class:"HelperModalClose"+(ma(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),i("slot",{key:"5c1323a98cdcd09669020a00affe5673856e807e"}))))}};fa.style=":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px #848e97;box-shadow:2px 2px 2px rgba(0, 0, 0, 0.007);font-size:14px;padding:10px 10px 5px 10px;background-color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:#FFF;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:#000}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:#000}";const ba=class{constructor(e){t(this,e),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.selectedIndex=0,this.cmsEndpoint=void 0,this.clientStyling="",this.clientStylingUrlContent="",this.tabContent="",this.limitStylingAppends=!1}connectedCallback(){}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return this.tabContent=i("div",{key:"d69c61827b4fb6d934c72b0b2d37d72fca307575",class:"TabContent",ref:t=>this.stylingContainer=t},"Each play includes one set of numbers from 1 to 21 with a selectable number of 8 and a second, 4-digit set of numbers, with a minimum selection of 1. Draws are held every 5 minutes and the winnings are automatically credited to your account."),this.selectedIndex+1==2?this.tabContent=i("div",{key:"ab912cbb3bc3e88ecf8fe5f8f0e7eb16460100bd",class:"TabContent",ref:t=>this.stylingContainer=t},i("ol",{key:"17bed41dffe7d5578452ee13a47b442d10366ce2"},i("li",{key:"cf0da42f07cf92f5cea9c9f504c8836e528a5708"},"Register or Login"),i("li",{key:"4a0339df365c6b1a37b8a74c5022a56197e870db"},"Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose “I feel lucky”."),i("li",{key:"3f29a9b17c1059493648247868b83eb71241b8bd"},"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!"))):this.selectedIndex+1==3&&(this.tabContent=i("div",{key:"ceac54698e0e5c55a049600f02e8f413a76a1c33",class:"TabContent",ref:t=>this.stylingContainer=t},i("ul",{key:"426d89c86a1d44f6d515bc1a7902e43317127939"},i("li",{key:"457a225564399001dcab48097578174a27231ca7"},"What are my odds of winning?"),i("li",{key:"d35220f2aca215eff391cab54d719f18ef906c77"},"How can I find out if I’ve won a draw game?"),i("li",{key:"fcd560ee4b6740c319cf0f98a0b98da8fd9e14a4"},"How do I claim my prize?")))),this.tabContent}};ba.style=":host{display:block}.TabContent{font-size:14px;color:#000;font-weight:normal}";const ga=class{constructor(e){t(this,e),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.disabled=!1,this.label=void 0,this.selected=!1,this.cmsEndpoint=void 0,this.selectedIndex=0,this.tabs=[{label:"How to Play"},{label:"About"},{label:"FAQs"}],this.clientStyling="",this.clientStylingurl="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}connectedCallback(){}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{key:"841b2a4b84f2ecdaf692b9cab2eac4b3413186e7",ref:t=>this.stylingContainer=t},i("div",{key:"4c5d57e669f9f45d204bff8a85ca89a0574c4627",class:"Tabs"},this.tabs.map(((t,e)=>i("button",{class:"TabButton"+(this.selectedIndex==e?" Active":""),onClick:()=>this.selectedIndex=e},t.label)))),i("div",{key:"7ba983dec3b0355f390b19191d0d823914f09037"},i("helper-tab",{key:"e6c7739d50948582d8d14d530828508b4cb90d6e",selectedIndex:this.selectedIndex,"client-styling":this.clientStyling,"client-stylingurl":this.clientStylingurl,"client-styling-url-content":this.clientStylingUrlContent})))}get host(){return s(this)}};ga.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:4px;padding:8px 15px;margin:5px 0 10px;border:1px solid #009993;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:#F1F1F1}.TabButton.Active{background:#009993;color:#FFF}';const va=class{constructor(i){t(this,i),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.value="0",this.selectable=!0,this.isSelected=!1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{key:"af3601684ecf1f39d65fc9461430cba96b9e4b8c",class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}};va.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:#000000;display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px #ffffff;background:radial-gradient(circle at top, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, rgb(255, 255, 255) 0%, rgb(241, 241, 241) 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#ffffff;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #00958f}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#D4D4D4;border:solid 2px #D4D4D4;cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:#f1f1f1;background:#9EC258;background:-webkit-radial-gradient(top, #00958f, #004D4A);background:-moz-radial-gradient(top, #00958f, #004D4A);background:radial-gradient(to bottom, #00958f, #004D4A);border:solid 2px #D4D4D4;cursor:default}';const ya=["ro","en","hr"],xa={en:{drawResultsHeader:"Last draw results",drawId:"Draw ID",drawName:"Game name",drawDate:"Draw Date",drawNumbersGridDraw:"Draw numbers Grid ",drawNumbersGridTicket:"Draw numbers Grid ",ticketResult:"Ticket result",amountWon:"Amount won",numberOfDraws:"Number of draws",multiplier:"Multiplier:",ticketPurchaseDate:"Ticket Purchase Date",ticketStatus:"Ticket Status",ticketId:"Ticket ID",ticketAmount:"Ticket Amount",winUpTo:"Win up to"},ro:{drawResultsHeader:"Ultimele rezultate extragere",drawId:"Id extragere",drawName:"Numele jocului",drawDate:"Data extragerii",drawNumbersGridDraw:"Numerele extrase Grid",drawNumbersGridTicket:"Numerele extrase Grid",ticketResult:"Rezultatul biletului",amountWon:"Suma castigata",numberOfDraws:"Numarul de extrageri",multiplier:"Multiplicator:",ticketPurchaseDate:"Data achizitionarii biletului",ticketStatus:"Statusul biletului",ticketId:"Id biletul",ticketAmount:"Valoarea biletului",winUpTo:"Poti castiga"},fr:{drawResultsHeader:"Résultats du dernier tirage",drawId:"ID de tirage",drawName:"Nom du jeu",drawDate:"Date du tirage",drawNumbersGridDraw:"Tirage des numéros Grille",drawNumbersGridTicket:"Tirage des numéros Grille",ticketResult:"Résultat du ticket",amountWon:"Montant gagné",numberOfDraws:"Nombre de tirages",multiplier:"Multiplicateur",ticketPurchaseDate:"Date d'achat du billet",ticketStatus:"Statut du ticket",ticketId:"ID de billets",ticketAmount:"Montant du billet",winUpTo:"Gagnez jusqu'à"},ar:{drawResultsHeader:"نتائج آخر سحب",drawId:"معرّف السحب",drawName:"اسم اللعبة",drawDate:"تاريخ السحب",drawNumbersGridDraw:"شبكة أرقام السحب",drawNumbersGridTicket:"شبكة أرقام السحب",ticketResult:"نتيجة التذكرة",amountWon:"المبلغ الذي تم ربحه",numberOfDraws:"عدد السحوبات",multiplier:"مضاعف",ticketPurchaseDate:"تاريخ شراء التذكرة",ticketStatus:"حالة التذكرة",ticketId:"معرّف التذكرة",ticketAmount:"مبلغ التذكرة",winUpTo:"ربح يصل إلى"},hr:{drawResultsHeader:"Rezultati posljednjeg izvlačenja",drawId:"ID izvlačenja",drawName:"Naziv igre",drawDate:"Datum izvlačenja",drawNumbersGridDraw:"Tablica izvučenih brojeva",drawNumbersGridTicket:"Tablica izvučenih brojeva",ticketResult:"Rezultat listića",amountWon:"Osvojeni iznos",numberOfDraws:"Broj izvlačenja",multiplier:"Multiplikator",ticketPurchaseDate:"Datum uplate listića",ticketStatus:"Status listića",ticketId:"ID listića",ticketAmount:"Iznos listića",winUpTo:"Osvoji do"}},wa=(t,e)=>{const i=e;return xa[void 0!==i&&ya.includes(i)?i:"en"][t]},ka=class{constructor(e){t(this,e),this.ticketDrawDetails=[],this.ticketDrawDetailsFlag=!0,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.endpoint=void 0,this.gameId=void 0,this.language="en",this.playerId=void 0,this.drawMode=!1,this.drawId="",this.gameName="",this.ticketDate="",this.ticketStatus="",this.ticketId="",this.ticketAmount="",this.ticketMultiplier=!1,this.ticketDrawCount=0,this.ticketNumbers="",this.sessionId="",this.clientStyling="",this.clientStylingUrlContent="",this.ticketDrawData="",this.multiplier=3,this.isLoading=!0,this.hasErrors=!1,this.errorText="",this.ticketData=[],this.ticketDataLoaded=!1,this.ticketDraws=[],this.toggleDrawer=[!1],this.limitStylingAppends=!1,this.drawData=void 0}connectedCallback(){let t=[];this.ticketNumbers&&(this.gridNumbers=JSON.parse(this.ticketNumbers)),this.drawId&&t.push(this.getDrawData()),Promise.all(t).then((()=>{this.isLoading=!1})).catch((t=>{console.log("error ",t),this.isLoading=!1}))}componentWillRender(){this.ticketDrawData&&this.ticketDrawDetailsFlag&&(this.ticketDrawDetails=JSON.parse(this.ticketDrawData),this.ticketDrawDetails.forEach((t=>{this.getDrawData(t.drawId).then((e=>t.drawData=e))})),this.ticketDrawDetailsFlag=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}getDrawData(t){return this.isLoading=!0,new Promise(((e,i)=>{let s=new URL(`${this.endpoint}/games/${this.gameId}/draws/${t||this.drawId}`);fetch(s.href).then((t=>t.json())).then((i=>{t?e(i):(this.drawData=i,e(!0)),this.isLoading=!1})).catch((t=>{i(t),this.isLoading=!1}))}))}drawerToggle(t){this.toggleDrawer=this.toggleDrawer.map(((e,i)=>i==t?!e:e)),t>=this.toggleDrawer.length&&this.toggleDrawer.push(!0)}render(){return this.isLoading?i("p",null,"Loading, please wait ..."):this.hasErrors?void i("p",null,this.errorText):i("section",{class:"DrawResultsSection",ref:t=>this.stylingContainer=t},this.drawMode?i("div",{class:"DrawResultsArea"},this.drawData&&i("div",null,i("div",{class:"DrawResultsHeader"},i("span",null,wa("drawId",this.language),": ",this.drawData.id),i("span",null,wa("drawDate",this.language),": ",this.drawData.date.slice(0,10))),i("div",{class:"DrawResultsBody"},i("div",{class:"DrawNumbersGrid"},i("p",null,wa("drawNumbersGridDraw",this.language),"0:"),i("div",{class:"BulletContainer"},i("lottery-grid",{"selected-numbers":this.drawData.winningNumbers.join(","),"display-selected":!0,selectable:!1,language:this.language,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),i("div",{class:"DrawMultipler"},i("label",{class:"Label"},wa("multiplier",this.language)," ",this.multiplier)))))):i("div",{class:"DrawResultsArea TicketDraws"},i("div",{class:"DrawResultsBody"},i("div",{class:"TicketIdContainer"},i("label",{class:"Label"},wa("ticketId",this.language),": ",i("span",null,this.ticketId))),i("div",{class:"TicketAmountContainer"},i("label",{class:"Label"},wa("ticketAmount",this.language)," ",i("span",null,this.ticketAmount))),i("div",{class:"DrawNumbersGrid"},this.gridNumbers.map(((t,e)=>i("div",null,i("label",{class:"Label"},wa("drawNumbersGridTicket",this.language)," ",String.fromCharCode(e+65),":"),i("div",{class:"BulletContainer"},i("lottery-grid",{"selected-numbers":t.join(","),selectable:!1,"display-selected":!0,language:this.language,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))))),i("div",{class:"DrawMultipler"},i("label",{class:"Label"},wa("multiplier",this.language)," ",JSON.stringify(this.ticketMultiplier))),i("div",{class:"NumberOfDrawsContainer"},i("label",{class:"Label"},wa("numberOfDraws",this.language),": ",this.ticketDrawCount),i("div",{class:"DrawTicketsContainer"},this.ticketDrawDetails&&this.ticketDrawDetails.length>0&&i("div",{class:"ExpandableBoxes"},this.ticketDrawDetails.map(((t,e)=>{var s,o,r,a,n;return i("div",{class:{ExpandableBox:!0,ShowBox:this.toggleDrawer[e]},onClick:()=>this.drawerToggle(e)},i("div",{class:"ExpandableBoxHeader"},i("div",{class:"TicketResultContainer"},i("p",null,wa("ticketResult",this.language),": ",t.state)),"won"==t.state&&i("div",{class:"AmountWonContainer"},i("p",null,wa("amountWon",this.language),": ",Number(t.amount).toLocaleString("en")," ",t.currency)),"lost"==t.state&&i("div",{class:"DrawIdContainer"},i("p",null,wa("drawId",this.language),": ",t.drawId))),i("div",{class:"ExpandableBoxBody"},i("div",{class:"DrawIdContainer"},i("p",null,wa("drawId",this.language),": ",t.drawId)),i("div",{class:"DrawDateContainer"},i("p",null,wa("drawDate",this.language),": ",null===(s=t.drawData)||void 0===s?void 0:s.date.slice(0,10)," | ",null===(o=t.drawData)||void 0===o?void 0:o.date.slice(11,19))),i("div",{class:"DrawNumbersGrid"},t.drawData&&i("div",{class:"BulletContainer"},i("label",{class:"Label"},wa("drawNumbersGridDraw",this.language)," ",String.fromCharCode(e+10),":"),i("lottery-grid",{"selected-numbers":null===(a=null===(r=t.drawData)||void 0===r?void 0:r.winningNumbers)||void 0===a?void 0:a.join(","),selectable:!1,"display-selected":!0,language:this.language,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))),i("div",{class:"DrawMultipler"},i("label",{class:"Label"},wa("multiplier",this.language)," ",null===(n=t.drawData)||void 0===n?void 0:n.multiplier))))}))))))))}};ka.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketInfo{display:flex;flex-direction:row;gap:15px;background-color:#009993;color:#fff;padding:12px;font-size:14px}.DrawResultsArea{margin-top:15px}.DrawResultsArea.TicketDraws .Content{padding:0;border:0}.DrawResultsArea.TicketDraws .DrawResultsBody{padding:0;margin-bottom:5px;border-radius:0;border:0}.DrawResultsSection{max-width:600px;margin:0px auto;border-radius:4px}.DrawResultsHeader{display:flex;justify-content:space-between;padding:10px 20px;background-color:#009993;color:#fff;font-size:14px;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-weight:400;margin:0;padding-top:15px}.DrawResultsBody{padding:20px;margin-bottom:5px;border-radius:0 0 4px 4px;border:1px solid #009993}.DrawResultsBody>div{margin:10px 0}.DrawResultsBody .NumberOfDrawsContainer{display:table;width:100%}.DrawNumbersGrid{display:flex;flex-direction:column;gap:5px}.DrawNumbersGrid label{display:block;margin-bottom:7px}.Toggle{cursor:pointer;display:inline-block}.ToggleSwitch{display:inline-block;background:#ccc;border-radius:16px;width:58px;height:24px;position:relative;vertical-align:middle;transition:background 0.25s}.ToggleSwitch:before,.ToggleSwitch:after{content:""}.ToggleSwitch:before{display:block;background:linear-gradient(to bottom, #fff 0%, #eee 100%);border-radius:50%;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.25);width:16px;height:16px;position:absolute;top:4px;left:4px;transition:left 0.25s}.Toggle:hover .ToggleSwitch:before{background:linear-gradient(to bottom, #fff 0%, #fff 100%);box-shadow:0 0 0 1px rgba(0, 0, 0, 0.5)}.ToggleCheckbox:checked+.ToggleSwitch{background:#56c080}.ToggleCheckbox:checked+.ToggleSwitch:before{left:38px}.ToggleCheckbox{position:absolute;visibility:hidden}.Label{position:relative}.DrawTicketsContainer{display:flex;flex-direction:column;margin:20px auto 0}.DrawMultipler{margin-top:15px}.ExpandableBoxes{position:relative;display:flex;flex-direction:column;border:1px solid #ccc;border-radius:5px;background-color:white}.ExpandableBox{border-bottom:1px solid #ccc;transition:height 300ms ease-in-out;overflow:hidden;height:80px}.ExpandableBox:last-child{border-bottom:0}.ExpandableBoxHeader{position:relative;list-style:none;outline:0;cursor:pointer;text-transform:uppercase;transition:color 300ms ease-in-out;margin-bottom:24px;margin-left:5px}.ShowBox>.ExpandableBoxHeader{color:#009993}.ExpandableBoxHeader::-webkit-details-marker{display:none}.ExpandableBoxHeader:before,.ExpandableBoxHeader:after{content:"";position:absolute}.ExpandableBoxHeader:before{right:21px;top:50%;height:2px;margin-top:-1px;width:16px;background:#009993}.ExpandableBoxHeader:after{right:28px;top:50%;height:16px;margin-top:-8px;width:2px;margin-left:-1px;background:#009993;transition:all 300ms ease-in-out}.ShowBox .ExpandableBoxHeader:after{opacity:0;transform:translateY(25%)}.ExpandableBoxBody{padding-top:0;font-weight:lighter;margin-left:5px}.ExpandableBox.ShowBox{height:300px}';const _a=["ro","en","fr","ar","hr"],Da={en:{drawResultsHeader:"Draw results history",drawId:"Draw ID",drawDate:"Draw Date",drawNumbersGridA:"Draw numbers Grid A",viewAllResults:"View All",lastFiveDraws:"Last 5 Draws",lastTenDraws:"Last 10 Draws",lastFifteenDraws:"Last 15 Draws",allDrawResultsHistory:"All Draw Results History",noResults:"No results",fetchingResults:"Fetching results"},ro:{drawResultsHeader:"Istoricul extragerilor",drawId:"ID-ul extragerii",drawDate:"Data extragerii",drawNumbersGridA:"Numerele extrase Grid A",viewAllResults:"Vezi toate rezultatele",lastFiveDraws:"Ultimile 5 extrageri",lastTenDraws:"Ultimile 10 extrageri",lastFifteenDraws:"Ultimile 15 extrageri",allDrawResultsHistory:"Istoricul tuturor extragerilor",noResults:"Niciun rezultat",fetchingResults:"Se obtin rezultatele"},fr:{drawResultsHeader:"Dessiner l'historique des résultats",drawId:"ID de tirage",drawDate:"Date du tirage",drawNumbersGridA:"Tirage des numéros Grille",viewAllResults:"Voir tout",lastFiveDraws:"5 derniers tirages",lastTenDraws:"10 derniers tirages",lastFifteenDraws:"15 derniers tirages",allDrawResultsHistory:"Historique des résultats de tous les tirages",noResults:"Aucun résultat",fetchingResults:"Récupération des résultats"},ar:{drawResultsHeader:"سجل نتائج السحب",drawId:"معرّف السحب",drawDate:"تاريخ السحب",drawNumbersGridA:"شبكة أرقام السحب",viewAllResults:"عرض الكل",lastFiveDraws:"آخر 5 سحوبات",lastTenDraws:"آخر 10 سحوبات",lastFifteenDraws:"آخر 15 سحبًا",allDrawResultsHistory:"سجل نتائج كل السحوبات",noResults:"لا توجد نتائج",fetchingResults:"جلب النتائج"},hr:{drawResultsHeader:"Povijest rezultata izvlačenja",drawId:"ID izvlačenja",drawDate:"Datum izvlačenja",drawNumbersGridA:"Izvučeni brojevi tablica A",viewAllResults:"Pogledaj sve",lastFiveDraws:"Zadnjih 5 izvlačenja",lastTenDraws:"Zadnjih 10 izvlačenja",lastFifteenDraws:"Zadnjih 15 izvlačenja",allDrawResultsHistory:"Povijest svih rezultata izvlačenja",noResults:"Nema rezultata",fetchingResults:"Dohvaćanje rezultata"}},Ta=(t,e)=>{const i=e;return Da[void 0!==i&&_a.includes(i)?i:"en"][t]},Ca=class{constructor(e){t(this,e),this.getDrawsData=()=>{let t=new URL(`${this.endpoint}/games/${this.gameId}/draws`);this.dateFiltersFrom&&t.searchParams.append("from",this.dateFiltersFrom),this.dateFiltersTo&&t.searchParams.append("to",this.dateFiltersTo),fetch(t.href).then((t=>{if(t.status>=300)throw new Error("There was an error while fetching the data");return t.json()})).then((t=>{this.winningDataSetsData=t.items.filter((t=>t.winningNumbers)),this.drawData=this.winningDataSetsData.map((t=>t))})).catch((t=>{console.log("err",t)})).finally((()=>{this.isLoading=!1,this.noResults=0==this.drawData.filter((t=>t.winningNumbers)).length}))},this.filterResults=t=>{this.numberOfResults=t,this.displayAllDrawsResults=!0},this.getDrawResults=t=>{let e=new URL(`${this.endpoint}/games/${this.gameId}/draws/${t}`);fetch(e.href,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((t=>(404==t.status&&(this.noResults=!0),t.json()))).then((t=>{this.drawData=[t].map((t=>t))})).catch((t=>{console.log("err",t)})).finally((()=>{this.isLoading=!1}))},this.viewAllResults=()=>{this.numberOfResults=this.drawData.length,this.displayAllDrawsResults=!1,window.scrollTo({top:0,behavior:"smooth"})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.endpoint=void 0,this.gameId=void 0,this.numberOfResults=3,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.drawData=[],this.winningDataSetsData=[""],this.displayAllDrawsResults=!0,this.showQuickFilters=!0,this.dateFiltersFrom="",this.dateFiltersTo="",this.isLoading=!1,this.noResults=!1,this.limitStylingAppends=!1}filtersHandler(t){this.showQuickFilters=!1,this.isLoading=!0,t.detail.ticketDrawId?this.getDrawResults(t.detail.ticketDrawId):(this.dateFiltersFrom=t.detail.filterFromCalendar,this.dateFiltersTo=t.detail.filterToCalendar,this.getDrawsData())}clearFiltersHandler(){this.showQuickFilters=!0,this.dateFiltersFrom="",this.dateFiltersTo="",this.drawData=this.winningDataSetsData,this.isLoading=!0,this.getDrawsData()}connectedCallback(){this.showQuickFilters&&this.getDrawsData()}disconnectedCallback(){clearInterval(this.interval)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){let t=i("div",{key:"1583b694983132e116397e73c9552c95897c0353",class:"DrawResultsHeader"},this.displayAllDrawsResults?i("h4",null,Ta("drawResultsHeader",this.language)):[i("div",{class:"DrawResultsHeaderContent"},i("h4",null,Ta("allDrawResultsHistory",this.language)),i("div",{class:"FilterSection"},this.showQuickFilters&&i("div",{class:"FilterResultsContainer"},i("button",{class:"QuickFilterButton",onClick:()=>this.filterResults(5)},Ta("lastFiveDraws",this.language)),i("button",{class:"QuickFilterButton",onClick:()=>this.filterResults(10)},Ta("lastTenDraws",this.language)),i("button",{class:"QuickFilterButton",onClick:()=>this.filterResults(15)},Ta("lastFifteenDraws",this.language))),i("helper-filters",{"show-filter-id":"true","activate-ticket-search":"false","game-id":this.gameId,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))]);return i("section",{key:"4dc417fefb4d2ce1be3eaf7853a2d564ef554c38",class:"GridWrapper",ref:t=>this.stylingContainer=t},i("div",{key:"18c68785d3fa790b8e7e923dd986afa2ffc60a54",class:"DrawResultsSection"},i("div",{key:"639d8f0c70aee9bb7d70b5bf6e7ee183aafb3c32",class:"DrawResultsAreaHistory"},t,i("div",{key:"4e43f9d5acdbfceff15a84a51bd4c26f013f6781",class:"HistoryGridWrapper"},i("div",{key:"344b9d8c9bbf87dde621eadec387c484b457671a",class:"HistoryGrid"},this.isLoading&&i("p",{key:"5c0950a3c07c0e868861fd53a8a919168acca345"},Ta("fetchingResults",this.language)),!this.isLoading&&!this.noResults&&this.drawData.map((t=>i("lottery-draw-results",{endpoint:this.endpoint,"game-id":this.gameId,"draw-id":t.id,"draw-mode":!0,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))).reverse().slice(0,this.numberOfResults),!this.isLoading&&this.noResults&&i("p",{key:"9b9fccfe879e3b6f3663f1778c4f04dd8779a5c1"},Ta("noResults",this.language)))),this.displayAllDrawsResults&&i("button",{key:"3af21758d6aad9c255d164c6ced7aebfc990fd0d",class:"ViewAllResults",onClick:this.viewAllResults},Ta("viewAllResults",this.language)))))}};Ca.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 30px}.GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GridBanner .BannerButtonsWrapper .BannerBackButton,.GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #009993;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GridBanner .HistoryGridBannerArea{padding-top:30px}.HistoryGridBannerArea{display:flex;flex-direction:column;align-items:center}.BannerText{font-size:14px;font-weight:300}.BannerCountdown{font-size:22px;display:flex;gap:20px}.DrawResultsSection{max-width:600px;margin:0px auto}.HistoryGrid{border-radius:5px}.DrawResultsHeader{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.DrawNumbersGrid{padding:10px 50px}.DrawNumbersGrid p{margin:0 0 10px 0;font-size:14px}.BulletContainer{margin-bottom:20px}.DrawResultTop{background-color:#009993;padding:10px;text-align:center;color:#fff;padding:0 50px;display:flex;justify-content:center;gap:40px}.ViewAllResults{display:block;padding:10px 40px;margin:40px auto;border:0;border-radius:5px;background-color:#009993;color:#fff;outline:none}.FilterSection{display:flex;justify-content:space-between;padding:25px 15px 10px;gap:10px;margin:0px 15px}.FilterSection .FilterResultsContainer{display:flex;gap:5px;overflow-x:auto}.FilterSection .QuickFilterButton{cursor:pointer;width:max-content;border-radius:4px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterSection .QuickFilterButton:hover{background:#F1F1F1}.FilterSection helper-filters{margin-left:auto}';const Aa=class{constructor(e){t(this,e),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{key:"a972ed1a25317b0cdeb82e3b007ec79e30bbb871",class:"GamePageDetailsContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{key:"2c6f8d634241c412103cdae78909972c884b0515","header-title":"Game Details",collapsed:!1,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{key:"f5f80e173d935cb0dabb6a7ef45e54a1312b5dc8",class:"AccordionContainer",slot:"accordionContent"},i("helper-tabs",{key:"a91396e0a4aa1235cc618dfe336ae8b603bc2a6c","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};Aa.style=":host{display:block}";const Sa=["ro","en","fr","ar","hr"],za={en:{error:"Error",title:"Chrono",backButton:"Back",lobbyButton:"Lobby",prize:"Prize",winUpTo:"Win up to",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",createTicket:"Create Ticket",modalSuccess:"Purchase successfully completed!",deleteTicketModalTitle:"Delete Ticket",deleteTicketModalText:"Are you sure you want to delete this ticket?",deleteTicketModalCancel:"Cancel",deleteTicketModalConfirm:"Delete",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",lastDrawResultsTitle:"Last Draw Results",modalLogin:"Please login to submit a ticket"},ro:{error:"Eroare",title:"Loto 6/49",backButton:"Inapoi",lobbyButton:"Lobby",prize:"MARELE JACKPOT OMG",winUpTo:"Castiga pana la",nextDraw:"Urmatoarea extragere:",buy:"Cumpara bilet",viewLatest:"Ultimile extrageri",createTicket:"Creeaza bilet",modalSuccess:"Achizitie efectuata cu succes",deleteTicketModalTitle:"Sterge biletul",deleteTicketModalText:"Esti sigur ca vrei sa stergi acest bilet?",deleteTicketModalCancel:"Anuleaza",deleteTicketModalConfirm:"Sterge",orderSummaryTitle:"Rezumat comanda",orderSummaryTickets:"Bilet",orderSummaryTotal:"Total",orderSummarySubmit:"Trimite",lastDrawResultsTitle:"Cele mai recente extrageri",modalLogin:"Please login to submit a ticket"},fr:{error:"Error",title:"Chrono",backButton:"Back",lobbyButton:"Lobby",prize:"Prize",winUpTo:"Win up to",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",createTicket:"Create Ticket",modalSuccess:"Purchase successfully completed!",deleteTicketModalTitle:"Delete Ticket",deleteTicketModalText:"Are you sure you want to delete this ticket?",deleteTicketModalCancel:"Cancel",deleteTicketModalConfirm:"Delete",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",lastDrawResultsTitle:"Résultats du dernier tirage",modalLogin:"Please login to submit a ticket"},ar:{error:"خطأ",title:"كرونو",backButton:"خلف",lobbyButton:"ردهة",prize:"جائزة",winUpTo:"الفوز بما يصل الى",nextDraw:"السحب التالي:",buy:"اشتري تذاكر",viewLatest:"عرض أحدث النتائج",createTicket:"إنشاء تذكرة",modalSuccess:"!سيتم الشراء بنجاح قريبًا",deleteTicketModalTitle:"حذف التذكرة",deleteTicketModalText:"هل أنت متأكد أنك تريد حذف هذه التذكرة؟",deleteTicketModalCancel:"يلغي",deleteTicketModalConfirm:"حذف",orderSummaryTitle:"ملخص الطلب",orderSummaryTickets:"تذكرة",orderSummaryTotal:"المجموع",orderSummarySubmit:"يُقدِّم",lastDrawResultsTitle:"نتائج آخر سحب",modalLogin:"الرجاء تسجيل الدخول لتقديم تذكرة"},hr:{error:"Greška",title:"Krono",backButton:"Nazad",lobbyButton:"Lobby",prize:"Nagrada",winUpTo:"Osvoji do",nextDraw:"Sljedeće izvlačenje za: ",buy:"Uplati listić",viewLatest:"Pogledajte najnovije rezultate",createTicket:"Uplati listić",modalSuccess:"Kupnja uspješno obavljena!",deleteTicketModalTitle:"Izbriši listić",deleteTicketModalText:"Are you sure you want to delete this ticket?",deleteTicketModalCancel:"Otkaži",deleteTicketModalConfirm:"Izbriši",orderSummaryTitle:"Sažetak narudžbe",orderSummaryTickets:"Listić",orderSummaryTotal:"Ukupno",orderSummarySubmit:"Podnijeti",lastDrawResultsTitle:"Rezultati posljednjeg izvlačenja",modalLogin:"Molimo prijavite se da uplatite listić"}},Fa=(t,e)=>{const i=e;return za[void 0!==i&&Sa.includes(i)?i:"en"][t]},Ba=class{constructor(i){var s;t(this,i),this.goBackEvent=e(this,"goBackEvent",7),this.goToLobbyEvent=e(this,"goToLobbyEvent",7),this.userAgent=window.navigator.userAgent,this.multiplier=!1,this.quickPick=!1,this.isMobile=!!((s=this.userAgent).toLowerCase().match(/android/i)||s.toLowerCase().match(/blackberry|bb/i)||s.toLowerCase().match(/iphone|ipad|ipod/i)||s.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingurl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{this.clientStylingUrlContent=t,e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)})).catch((t=>{console.log("error ",t)}))},this.endpoint=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.language="en",this.backgroundUrl=void 0,this.autoPick=!1,this.resetButton=!1,this.clientStyling="",this.clientStylingurl="",this.clientStylingUrlContent="",this.tickets=[],this.tabIndex=0,this.hasErrors=!1,this.totalAmount=0,this.successVisible=!1,this.deleteVisible=!1,this.deleteEventData=void 0,this.daysRemaining=void 0,this.hoursRemaining=void 0,this.minutesRemaining=void 0,this.secondsRemaining=void 0,this.latestDraw={},this.totalWinningsAmount=0,this.nextDate=void 0,this.isLoggedIn=!1,this.loginModalVisible=!1,this.limitStylingAppends=!1}connectedCallback(){this.getGameDetails(),this.getDraws(),this.sessionId&&(this.isLoggedIn=!0)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingurl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}countdownLogic(t){this.interval=setInterval((()=>{this.daysRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/864e5),this.hoursRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/36e5-24*this.daysRemaining),this.minutesRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/6e4-24*this.daysRemaining*60-60*this.hoursRemaining),this.secondsRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/1e3-24*this.daysRemaining*60*60-60*this.hoursRemaining*60-60*this.minutesRemaining)}),1e3)}disconnectedCallback(){clearInterval(this.interval)}getGameDetails(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.status>=300)throw this.hasErrors=!0,new Error("There was an error while fetching the data");return t.json()})).then((t=>{this.gameData=t,this.basicStake=this.gameData.type.stakes[0].amount;let e=this.gameData.draws.filter((t=>!t.winningNumbers));e.length>0&&(this.nextDraw=e[0].id),this.createNewTicket()})).catch((t=>{this.hasErrors=!0,console.log("Error",t)}))}calculateTotalAmount(){const{currency:t}=this.gameData.type.stakes[0];this.totalAmount=0,this.tickets.forEach((t=>{t.completed&&(this.totalAmount+=t.amount*t.stake)})),this.currency=t}gridFilledHandler(t){this.tickets=this.tickets.map((e=>{if(e.ticketId==t.detail.id){let i=e.selectedNumbers||[];return i[t.detail.index]=t.detail.selectedNumbers.map((t=>parseInt(t,10))),{gameId:e.gameId,ticketId:e.ticketId,completed:!0,amount:t.detail.draws,stake:e.stake,selectedNumbers:i}}return e})),this.calculateTotalAmount()}gridDirtyHandler(t){this.tickets=this.tickets.map((e=>e.gameId==t.detail.id?{gameId:e.gameId,ticketId:e.ticketId,completed:!1,amount:e.amount,stake:e.stake,grids:[]}:e))}deleteTicketHandler(t){this.deleteVisible=!0,this.deleteEventData=t}modalCloseEvent(){this.deleteVisible=!1,this.loginModalVisible=!1}stakeChangeHandler(t){const{ticketId:e,stake:i}=t.detail;this.tickets[e-1].stake=i,this.calculateTotalAmount()}multiplierChangeHandler(t){this.multiplier=t.detail}getDraws(){let t=new URL(`${this.endpoint}/games/${this.gameId}/draws`);fetch(t.href,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((t=>t.json())).then((t=>{var e;let i=t.items.filter((t=>{if(Date.parse(t.date)>(new Date).getTime())return!t.winningNumbers})),s=t.items.filter((t=>t.winningNumbers));i[0]&&(this.latestDraw=i[0],this.nextDate=this.latestDraw.date,this.countdownLogic(this.nextDate),this.lastDrawId=s[s.length-1].id,null===(e=this.latestDraw)||void 0===e||e.prizes.forEach((t=>{this.totalWinningsAmount+=JSON.parse(t.amount)})))})).catch((t=>{console.log("error ",t)}))}confirmDeleteTicketHandler(t){this.tickets=this.tickets.filter((e=>e.ticketId!=t.detail.ticketId)),this.calculateTotalAmount(),this.deleteVisible=!1}createNewTicket(){this.tickets=[...this.tickets,{gameId:this.gameId,ticketId:this.tickets.length+1,completed:!1,amount:1,stake:this.basicStake,grids:[]}]}showLoginModal(){this.loginModalVisible=!0}submitTickets(){let t=new URL(`${this.endpoint}/tickets`),e={gameId:this.gameId,tickets:[]};this.tickets.forEach((t=>{e.tickets.push({startingDrawId:this.nextDraw,amount:t.stake,gameId:this.gameId,currency:this.currency,selection:t.selectedNumbers,multiplier:this.multiplier,drawCount:t.amount,quickPick:this.quickPick})}));let i={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${this.sessionId}`},body:JSON.stringify(e)};fetch(t.href,i).then((t=>{if(t.status>300)throw new Error("err");return t.json()})).then((t=>{console.log("data",t)})).catch((t=>{console.log("error ",t)})),this.successVisible=!0}goBack(){this.goBackEvent.emit()}goToLobby(){this.goToLobbyEvent.emit()}render(){const t=o(this.isMobile?"/assets/chrono_lottery_mobile.png":"/assets/chrono_desktop.png");return this.hasErrors?i("div",{class:"GamePage"},i("div",{class:"Title"},Fa("error",this.language))):i("div",{class:"GamePage",dir:"ar"==this.language?"rtl":"ltr",ref:t=>this.stylingContainer=t},i("div",{class:"GridBanner",style:{background:`url(${this.backgroundUrl?this.backgroundUrl:t})`,"background-size":"contain","background-repeat":"no-repeat","background-position":"center"}},i("div",{class:"BannerButtonsWrapper"},i("button",{class:"BannerBackButton",onClick:this.goBack.bind(this)},i("span",{class:"BannerBackButtonArrow"},"ᐸ "),Fa("backButton",this.language)),i("button",{class:"BannerLobbyButton",onClick:this.goToLobby.bind(this)},Fa("lobbyButton",this.language))),i("div",{class:"Tabs"},i("div",{class:"TabButton"+(0==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=0},Fa("buy",this.language)),i("div",{class:"TabButton"+(1==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=1},Fa("viewLatest",this.language)))),i("div",{class:"NextDrawWrapper"},i("div",{class:"TotalWinnings"},Fa("winUpTo",this.language),": ",i("span",null,"$",this.totalWinningsAmount.toLocaleString("en-US",{maximumFractionDigits:2}))),i("div",{class:"NextDraw"},i("p",{class:"BannerText"},Fa("nextDraw",this.language)),i("div",{class:"BannerCountdown"},i("span",{class:"CountdownDays"},this.daysRemaining,"D"),i("span",{class:"CountdownHours"},this.hoursRemaining,"H"),i("span",{class:"CountdownMinutes"},this.minutesRemaining,"M"),i("span",{class:"CountdownSeconds"},this.secondsRemaining,"S")))),0==this.tabIndex&&i("div",{class:"GamePageContent"},i("div",{class:"GameDetails"},i("lottery-game-details",{"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),i("div",{class:"TicketsWrapper"},this.tickets.map((t=>i("lottery-ticket-controller",{endpoint:this.endpoint,"ticket-id":t.ticketId,"game-id":t.gameId,collapsed:!1,last:!0,language:this.language,"auto-pick":this.autoPick,"reset-button":this.resetButton,"total-controllers":this.tickets.length,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))),i("div",{class:"CreateNewTicket"},i("button",{onClick:()=>this.createNewTicket()},"+"),i("span",null,Fa("createTicket",this.language)))),i("div",{class:"OrderSummary"},i("h3",{class:"OrderSummaryTitle"},Fa("orderSummaryTitle",this.language)),i("div",{class:"Ticket"},Fa("orderSummaryTickets",this.language),": ",i("span",null,this.tickets.length)),i("hr",null),i("div",{class:"Total"},Fa("orderSummaryTotal",this.language),": ",i("span",null,this.totalAmount," ",this.currency)),i("div",{class:"ButtonWrapper"},this.isLoggedIn&&i("span",{class:"Button",onClick:()=>this.submitTickets()},Fa("orderSummarySubmit",this.language)),!this.isLoggedIn&&i("div",null,i("span",{class:"Button",onClick:()=>this.showLoginModal()},Fa("orderSummarySubmit",this.language)),i("helper-modal",{"title-modal":"Success",visible:this.loginModalVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("p",{class:"SubmitModalSuccess"},Fa("modalLogin",this.language))))))),1==this.tabIndex&&i("div",null,i("h4",{class:"LastDrawResultsTitle"},Fa("lastDrawResultsTitle",this.language)),i("lottery-draw-results",{endpoint:this.endpoint,"game-id":this.gameId,language:this.language,"draw-id":this.lastDrawId,"draw-mode":!0,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}),i("lottery-draw-results-history",{endpoint:this.endpoint,"game-id":this.gameId,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),i("helper-modal",{"title-modal":"Success",visible:this.successVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("p",{class:"SubmitModalSuccess"},Fa("modalSuccess",this.language))),i("helper-modal",{"title-modal":"Delete Ticket",visible:this.deleteVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{class:"DeleteTicketModalWrapper"},i("h3",{class:"DeleteTicketModalTitle"},Fa("deleteTicketModalTitle",this.language)),i("p",{class:"DeleteTicketModalText"},Fa("deleteTicketModalText",this.language)),i("div",{class:"DeleteTicketModalButtons"},i("button",{class:"DeleteTicketModalCancel",onClick:()=>this.modalCloseEvent()},Fa("deleteTicketModalCancel",this.language)),i("button",{class:"DeleteTicketModalConfirm",onClick:()=>this.confirmDeleteTicketHandler(this.deleteEventData)},Fa("deleteTicketModalConfirm",this.language))))))}static get assetsDirs(){return["static"]}get element(){return s(this)}};Ba.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GamePage .GridBanner{background-color:#009993;background-repeat:no-repeat;background-position:center;color:#111;padding:0 20px 10px;height:220px;display:flex;flex-direction:column;justify-content:space-between}.GamePage .GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GamePage .GridBanner .BannerButtonsWrapper .BannerBackButton,.GamePage .GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:#fff;border:1px solid #D4D4D4;border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GamePage .GridBanner .GridBannerArea{padding-top:30px;display:flex;flex-direction:column;align-items:center}.GamePage .TotalWinnings{color:#000;font-size:18px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;text-transform:uppercase}.GamePage .TotalWinnings span{font-size:18px;font-weight:700}.GamePage .NextDraw{color:#00958f;font-size:24px;font-weight:600;margin:0 auto;text-align:center;text-transform:uppercase;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:4px}.GamePage .NextDraw .BannerText{font-weight:400;font-size:18px;text-transform:uppercase;padding:0;margin:15px 0 0 0}.GamePage .NextDraw .BannerCountdown{font-size:22px;color:#00958f;display:flex;gap:20px}.GamePage .Tabs{display:flex;justify-content:center;gap:10px}.GamePage .Tabs .TabButton{border-radius:4px;cursor:pointer;padding:8px 0;width:50%;max-width:200px;border:1px solid #00958f;background:#00958f;color:#fff;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.GamePage .Tabs .TabButton.Active{color:#00958f;background:#F1F1F1;border:1px solid #F1F1F1}.LastDrawResultsTitle{color:#009993;padding:25px 0 10px 0;text-align:center;border-radius:4px;text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.NextDrawWrapper{padding:10px 15px;background:#F1F1F1;background:linear-gradient(0deg, rgb(241, 241, 241) 0%, rgba(253, 187, 45, 0) 100%)}.NextDrawWrapper .BannerText{font-size:16px;font-weight:700;text-align:center}.NextDrawWrapper .BannerCountdown{font-size:22px;display:flex;gap:8px;color:#009993;font-weight:bolder;justify-content:center}.GamePageContent{padding:15px;max-width:1200px;margin:0 auto}.GameDetails{padding-bottom:10px;margin-bottom:20px}.CreateNewTicket{background:#004D4A;height:100px;width:100%;display:flex;margin-top:10px;flex-direction:column;justify-content:center;align-items:center}.CreateNewTicket button{cursor:pointer;display:inline-block;border-radius:50%;width:40px;height:40px;margin:5px;border:1px solid #FFF;background:#FFF;color:#004D4A;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.CreateNewTicket button:hover{background:#F1F1F1}.CreateNewTicket span{display:inline-block;font-size:12px;text-align:center;margin:0 auto;color:#FFF}.OrderSummary{min-width:200px;border-radius:4px;display:flex;flex-direction:column;justify-content:center;margin-top:20px;background:#fff}.OrderSummary .OrderSummaryTitle{font-size:16px;color:#009993;text-transform:uppercase;text-align:center}.OrderSummary .Ticket{display:inline-block;color:#000;font-size:14px;height:50px;line-height:50px;margin-left:15px}.OrderSummary .Ticket span{text-align:right}.OrderSummary hr{border:none;border-top:1px double #D4D4D4;color:#D4D4D4;width:100%}.OrderSummary .Total{display:inline-block;color:#000;font-size:14px;height:50px;line-height:50px;margin-left:15px}.OrderSummary .Total span{text-align:right}.ButtonWrapper{display:flex;align-items:center;justify-content:center}.ButtonWrapper .Button{cursor:pointer;border-radius:4px;padding:8px 60px;width:max-content;margin:5px;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#009993;border:1px solid #009993;color:#FFF}.ButtonWrapper .Button:hover{background:#00ABA4}.ButtonWrapper .Button.ButtonDisabled{pointer-events:none;background:#ccc;border:1px solid #ccc}.SubmitModalSuccess{text-align:center;font-size:18px;padding:20px}.DeleteTicketModalWrapper{padding:20px;text-align:center}.DeleteTicketModalWrapper .DeleteTicketModalTitle{font-size:16px;color:#00958f;font-weight:400;text-transform:uppercase;margin:20px 0 40px}.DeleteTicketModalWrapper .DeleteTicketModalText{font-size:14px;color:#000;line-height:22px;margin-bottom:40px}.DeleteTicketModalWrapper .DeleteTicketModalButtons{display:flex;gap:10px;justify-content:center}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm{cursor:pointer;border-radius:4px;padding:8px 25px;width:max-content;margin:5px;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm:hover{background:#FF6536;border:1px solid #FF3D00}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel{cursor:pointer;width:max-content;border-radius:4px;padding:10px 25px;margin:5px;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel:hover{background:#F1F1F1}@media (min-width: 1200px){.GamePageContent .TicketsWrapper{float:left;width:49%}.GamePageContent .GameDetails{float:right;width:49%}.GamePageContent .OrderSummary{float:right;width:49%}}';const Ma=class{constructor(i){t(this,i),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.selectedCounter=0,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.ticketId=void 0,this.totalNumbers=0,this.gameId=void 0,this.maximumAllowed=0,this.minimumAllowed=1,this.selectable=!0,this.selectedNumbers="",this.displaySelected=!1,this.language="en",this.gridIndex=void 0,this.gridType="",this.clientStyling="",this.clientStylingUrlContent="",this.numbers=[],this.limitStylingAppends=!1}connectedCallback(){let t=[];this.selectedNumbers.length>0&&(t=this.selectedNumbers.split(","),this.selectedCounter=t.length),this.displaySelected?t.forEach((t=>{this.numbers.push({number:t,selected:!0,selectable:this.selectable})})):[...Array(this.totalNumbers).keys()].map((t=>(t+1).toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0,selectable:this.selectedCounter!=this.maximumAllowed&&this.selectable})}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}shuffleArray(t){const e=[];for(;t.length>0;){const i=Math.floor(Math.random()*t.length);e.push(t.splice(i,1)[0])}return e}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>e.number==t.detail.value?{number:e.number,selected:t.detail.selected,selectable:e.selectable}:{number:e.number,selected:e.selected,selectable:e.selectable})),t.detail.selected?(this.selectedCounter+=1,this.selectedCounter==this.maximumAllowed&&(this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!!t.selected}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))):(this.selectedCounter==this.maximumAllowed&&(this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!0}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))})),this.selectedCounter-=1)}async resetSelectionHandler(t){t.detail&&t.detail==this.ticketId&&(this.selectedCounter=0,this.numbers=this.numbers.map((t=>({number:t.number,selected:!1,selectable:this.selectable}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))}async autoSelectionHandler(t){if(t.detail&&t.detail==this.ticketId){this.resetSelectionHandler(t);let e=[...Array(this.totalNumbers).keys()].map((t=>t+1));e=this.shuffleArray(e),e=e.slice(0,this.minimumAllowed),this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0,selectable:e.indexOf(parseInt(t.number,10))>=0}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),this.selectedCounter=this.maximumAllowed}}render(){return i("div",{key:"54b9187146b5d2625fd5ce7f53f38abf091cd943",class:"GridContainer",ref:t=>this.stylingContainer=t},i("div",{key:"e7e8570557ebaa78edf881cdbc1ed720028cdf6e",class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>i("div",null,i("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))))}};Ma.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}';const Ia=["ro","en","hr"],Pa={en:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"I feel lucky"},ro:{loading:"Se incarca, va rugam asteptati ...",error:"A fost o eroare in timp ce asteptam datele",grid:"Grid",multiplier:"Multiplicator",numberOfDraws:"Numarul de extrageri",wagerPerDraw:"Pariul per extragere",resetButton:"Reseteaza",autoButton:"Ma simt norocos"},fr:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"I feel lucky"},ar:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",grid:"Grid",multiplier:"Multiplier",numberOfDraws:"Number of draws",wagerPerDraw:"Wager per draw",resetButton:"Reset",autoButton:"I feel lucky"},hr:{loading:"Učitavanje, molimo pričekajte ...",error:"Došlo je do pogreške prilikom pokušaja dohvaćanja podataka",grid:"Tablica",multiplier:"Multiplikator",numberOfDraws:"Broj izvlačenja",wagerPerDraw:"Ulog po izvlačenju",resetButton:"Resetiraj",autoButton:"Osjećam se sretno"}},Na=(t,e)=>{const i=e;return Pa[void 0!==i&&Ia.includes(i)?i:"en"][t]},Ea=class{constructor(i){t(this,i),this.ticketCompleted=e(this,"ticketCompleted",7),this.autoSelection=e(this,"autoSelection",7),this.resetSelection=e(this,"resetSelection",7),this.stakeChange=e(this,"stakeChange",7),this.multiplierChange=e(this,"multiplierChange",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.endpoint=void 0,this.gameId=void 0,this.numberOfGrids=1,this.multipleDraws=!0,this.ticketId=void 0,this.resetButton=!1,this.autoPick=!1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.multiplier=!1,this.numberOfDraws=1,this.isLoading=!0,this.hasErrors=!1,this.ticketDone=!1,this.isCustomSelect=!1,this.amountInfo={},this.limitStylingAppends=!1}checkForClickOutside(t){"SelectComponent"!==t.composedPath()[0].getAttribute("data-cluster")&&(this.isCustomSelect=!1)}connectedCallback(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.ok)return t.json();this.hasErrors=!0})).then((t=>{this.isLoading=!1,this.gameData=t,this.grids=[...Array(this.gameData.type.boards.length).keys()],this.amountInfo=this.gameData.type.stakes[0]})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}multiplierChangeHandler(t){this.multiplier=!!t.target&&t.target.checked,this.multiplierChange.emit(this.multiplier)}drawsChangeHandler(t){this.ticket=Object.assign(Object.assign({},this.ticket),{draws:t}),this.ticketCompleted.emit(this.ticket)}gridFilledHandler(t){this.ticket=Object.assign(Object.assign({},t.detail),{draws:this.numberOfDraws}),this.ticketDone=!0,this.ticketCompleted.emit(this.ticket)}toggleAutoSelection(){this.ticketDone=!0,this.autoSelection.emit(this.ticketId)}toggleResetSelection(){this.ticketDone=!1,this.resetSelection.emit(this.ticketId)}changeStake(t,e){this.stakeChange.emit({ticketId:t,stake:e})}toggleClass(){this.isCustomSelect=!this.isCustomSelect}setDropdownItem(t){this.amountInfo={value:t.value,currency:t.currency},this.isCustomSelect=!1,this.changeStake(this.ticketId,t.amount)}render(){if(this.isLoading)return i("div",null,i("p",null,Na("loading",this.language)));if(this.hasErrors)return i("div",null,i("p",null,Na("error",this.language)));{const{type:t}=this.gameData;return i("div",{class:"TicketContainer",ref:t=>this.stylingContainer=t},i("p",{class:"TicketTitle"},this.gameData.name),this.resetButton&&this.ticketDone&&i("div",{class:"ButtonContainer"},i("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection()},Na("resetButton",this.language))),this.autoPick&&!this.ticketDone&&i("div",{class:"ButtonContainer"},i("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection()},Na("autoButton",this.language))),this.grids.map(((e,s)=>i("div",{class:"TicketGridBullets"},i("p",{class:"TicketGridTitle"},Na("grid",this.language)," ",s+1),i("lottery-grid",{"grid-index":s,"maximum-allowed":t.boards[s].maximumAllowed,"minimum-allowed":t.boards[s].minimumAllowed,"total-numbers":t.boards[s].highNumber-t.boards[s].lowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))),t.multiplier&&i("div",null,i("label",{class:"Toggle"},i("label",{class:"Label"},Na("multiplier",this.language),": "),i("input",{class:"ToggleCheckbox",type:"checkbox",onInput:t=>this.multiplierChangeHandler(t)}),i("div",{class:"ToggleSwitch"}))),this.multipleDraws&&i("div",{class:"TicketDraws"},i("label",{class:"Label"},Na("numberOfDraws",this.language),": "),i("div",{class:"NumberInput"},i("button",{onClick:()=>this.numberOfDraws>1?this.numberOfDraws--:this.numberOfDraws=1,class:"Minus"},"-"),i("input",{class:"InputDefault",min:"1",value:this.numberOfDraws,type:"number"}),i("button",{onClick:()=>this.numberOfDraws++,class:"Plus"},"+"))),i("div",null,i("label",{class:"Label"},Na("wagerPerDraw",this.language),": "),i("div",{class:"WagerInput"},t.stakes.length>1?i("div",{"data-cluster":"SelectComponent",class:this.isCustomSelect?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{"data-cluster":"SelectComponent",class:"SelectButton",onClick:()=>this.toggleClass()},i("span",{"data-cluster":"SelectComponent"},this.amountInfo.value," ",this.amountInfo.currency),i("span",{"data-cluster":"SelectComponent",class:"SelectExpand"},"▼")),i("div",{"data-cluster":"SelectComponent",class:"SelectContent"},i("ul",{"data-cluster":"SelectComponent",class:"SelectOptions"},t.stakes.map((t=>i("li",{"data-cluster":"SelectComponent",class:this.amountInfo.value==t.value?"SelectedValue":"",value:t.value,onClick:()=>this.setDropdownItem(t)},t.value," ",t.currency)))))):i("div",null,i("input",{min:"1",value:t.stakes[0].amount,type:"number",disabled:!0}),i("p",{class:"WagerInputTitle"},t.stakes[0].currency)))))}}static get watchers(){return{numberOfDraws:["drawsChangeHandler"]}}};Ea.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketTitle{font-size:16px;font-weight:bold}.ButtonContainer{display:flex;justify-content:flex-end}.Toggle{cursor:pointer;margin-top:20px;display:inline-block}.ToggleSwitch{display:inline-block;background:#707070;border-radius:16px;width:58px;height:24px;position:relative;vertical-align:middle;transition:background 0.25s}.ToggleSwitch:before,.ToggleSwitch:after{content:""}.ToggleSwitch:before{display:block;background:linear-gradient(to bottom, #fff 0%, #F1F1F1 100%);border-radius:50%;box-shadow:0 0 0 1px rgba(0, 0, 0, 0.25);width:16px;height:16px;position:absolute;top:4px;left:4px;transition:left 0.25s}.Toggle:hover .ToggleSwitch:before{background:linear-gradient(to bottom, #fff 0%, #fff 100%);box-shadow:0 0 0 1px rgba(0, 0, 0, 0.5)}.ToggleCheckbox:checked+.ToggleSwitch{background:#00ABA4}.ToggleCheckbox:checked+.ToggleSwitch:before{left:38px}.ToggleCheckbox{position:absolute;visibility:hidden}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:#000}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;border:none;align-items:center;justify-content:center;height:20px;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:#000;padding:10px}.InputDefault{background-color:#F1F1F1;border-radius:4px;padding:5px;border:solid 1px #D4D4D4;color:#707070}.AutoButton{cursor:pointer;display:inline-block;border-radius:4px;padding:8px 20px;width:max-content;margin:5px 0;border:1px solid #00958f;background:#FFF;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.AutoButton:active{background:#00958f;color:#FFF}.ResetButton{cursor:pointer;display:inline-block;border-radius:4px;padding:8px 20px;width:max-content;margin:5px 0;color:#000;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:#FF3D00;border:1px solid #FF3D00;color:#FFF}.ResetButton:hover{background:#FF6536;border:1px solid #FF3D00}.TicketGridBullets{background:#f1f1f1;border-radius:4px;padding:20px;margin-top:5px}.TicketGridBullets .TicketGridTitle{margin-top:0px}.Minus{border-radius:4px;width:30px;height:24px !important;margin-right:10px;color:#FFF;background:#009993}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:#FFF;background:#009993}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid #ccc;border-radius:5px;position:relative}.SelectButton,.SelectOptions li{display:flex;align-items:center;cursor:pointer}.SelectButton{display:flex;padding:0 5px;border-radius:7px;align-items:center;justify-content:space-between;font-size:14px}.SelectButton span:first-child{padding-right:10px}.SelectExpand{transition:transform 0.3s linear;font-size:12px}.SelectActive .SelectExpand{transform:rotate(180deg)}.SelectContent{display:none;padding:5px;border-radius:7px}.SelectWrapper.SelectActive .SelectContent{width:100%;display:block;position:absolute;left:0;top:32px;padding:0;border:1px solid #ccc;overflow:hidden;background:#fff}.SelectContent .SelectOptions{max-height:100px;margin:0;overflow-y:auto;padding:0}.SelectContent .SelectOptions .SelectedValue{background-color:#009993;color:#fff}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:#f1f1f1;border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:#ccc;border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:#f2f2f2}';const Oa=["ro","en","fr","ar","hr"],Ra={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"},hr:{ticket:"Listić"}},ja=(t,e)=>{const i=e;return Ra[void 0!==i&&Oa.includes(i)?i:"en"][t]},Ha=class{constructor(i){t(this,i),this.deleteTicketEvent=e(this,"deleteTicket",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.endpoint="",this.ticketId=1,this.ticketDescription=void 0,this.gameId=void 0,this.postMessage=!1,this.eventName="deleteTicketAction",this.collapsed=!0,this.numberOfGrids=1,this.last=!1,this.language="en",this.autoPick=!1,this.resetButton=!1,this.totalControllers=1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return console.log("ticket id:",this.ticketId),i("div",{key:"203c89c4b240cd7c99eb3d37fa3a4dbc17ed18e3",class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{key:"ad9801b15a1718ff7470ab3084c4b569ad23f6e3","header-title":`${ja("ticket",this.language)} ${this.ticketId}`,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":1!==this.totalControllers,collapsed:!this.last||this.collapsed,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{key:"b9c618987e848d4b44fee6941f8b5c9696bd44e8",slot:"accordionContent"},i("lottery-ticket",{key:"8acdc3d3cce5b654e7cddd71576c2e993881786f",endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"reset-button":this.resetButton,"auto-pick":this.autoPick,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};Ha.style=':host{font-family:"Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:0.8rem}*,*::before,*::after{margin:0;padding:0;list-style:none;outline:none;box-sizing:border-box}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}.player-account-gaming-limits-popup-2{background:var(--emw--color-black, #000000);color:var(--emw--color-white, #000)}.Title{font-weight:800;font-size:18px}button{display:block;font-size:0.75rem;padding:12px 0;border:0;border-radius:2px;cursor:pointer}button.PrimaryButtonStyle{font-size:14px;color:#fff;background:rgb(122, 195, 23)}button.SecondaryButtonStyle{border:1px solid #999;color:#666;background:#fff}.LinkButton{display:inline;padding:0;color:#3366CC;text-decoration:underline;background-color:rgba(0, 0, 0, 0)}.ResultIconWrapper{display:flex;flex-direction:column;align-items:center;margin:12px 0}.ResultIconWrapper svg{height:auto;width:60px;margin:12px}.ResultIconWrapper p{color:#666}.Overlay{position:absolute;top:0;left:0;width:100vw;height:100vh;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center}.ModalContainer{position:fixed;top:30vh;width:320px;height:auto;padding:18px 14px;background:#fff;border-radius:4px}.InitialWrapper{display:flex;flex-direction:column;gap:12px}.AdditionalInformation{margin:10px 0;font-size:14px}.TermsConditions{font-size:12px}.ExpandButton{font-size:14px;background-color:#fff;border:0;padding:0;margin-top:-10px;color:#999;display:flex;justify-content:center;align-items:center;cursor:pointer}.ExpandButton svg{width:28px;height:auto;margin-left:-4px}.LeftAlign{text-align:left;font-size:16px}.CenterAlign{text-align:center}.SetLimitSection{display:flex;flex-direction:column;gap:6px}.DepositTextSection{display:flex;justify-content:space-between}.DepositInputSection{height:32px;display:flex;gap:4px}.DepositInput{flex-grow:1;padding:0 6px}.SubmitDepositButton{flex-grow:1;font-size:0.75rem;padding:0}.SubmitDepositButton[disabled]{align-items:center;color:#ccc;cursor:not-allowed;background:#fff;border:#ccc 1px solid}.Hidden{display:none}.Extended{transform:rotate(180deg)}';export{a as helper_accordion,pa as helper_filters,fa as helper_modal,ba as helper_tab,ga as helper_tabs,va as lottery_bullet,ka as lottery_draw_results,Ca as lottery_draw_results_history,Aa as lottery_game_details,Ba as lottery_game_page,Ma as lottery_grid,Ea as lottery_ticket,Ha as lottery_ticket_controller}
|