@everymatrix/lottery-game-details 0.1.7 → 0.1.20

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-9d95408f.js');
5
+ const index = require('./index-0355373c.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const SUPPORTED_LANGUAGES = ['ro', 'en'];
@@ -19,7 +19,7 @@ const translate = (key, customLang) => {
19
19
  return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
20
20
  };
21
21
 
22
- const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:4px 4px 0 0;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff}.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}.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}";
22
+ const helperAccordionCss = "@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}.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}.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}";
23
23
 
24
24
  const Accordion = class {
25
25
  constructor(hostRef) {
@@ -65,11 +65,43 @@ const Accordion = class {
65
65
  * Language
66
66
  */
67
67
  this.language = 'en';
68
+ /**
69
+ * Client custom styling via string
70
+ */
71
+ this.clientStyling = '';
72
+ /**
73
+ * Client custom styling via url content
74
+ */
75
+ this.clientStylingUrlContent = '';
76
+ this.limitStylingAppends = false;
77
+ this.setClientStyling = () => {
78
+ let sheet = document.createElement('style');
79
+ sheet.innerHTML = this.clientStyling;
80
+ this.stylingContainer.prepend(sheet);
81
+ };
82
+ this.setClientStylingURL = () => {
83
+ let cssFile = document.createElement('style');
84
+ setTimeout(() => {
85
+ cssFile.innerHTML = this.clientStylingUrlContent;
86
+ this.stylingContainer.prepend(cssFile);
87
+ }, 1);
88
+ };
68
89
  }
69
90
  // @TODO fix the `any` type :)
70
91
  connectedCallback() {
71
92
  this.showContent = !this.collapsed;
72
93
  }
94
+ componentDidRender() {
95
+ // start custom styling area
96
+ if (!this.limitStylingAppends && this.stylingContainer) {
97
+ if (this.clientStyling)
98
+ this.setClientStyling();
99
+ if (this.clientStylingUrlContent)
100
+ this.setClientStylingURL();
101
+ this.limitStylingAppends = true;
102
+ }
103
+ // end custom styling area
104
+ }
73
105
  toggleContent() {
74
106
  this.showContent = !this.showContent;
75
107
  }
@@ -81,7 +113,7 @@ const Accordion = class {
81
113
  this.accordionEvent.emit();
82
114
  }
83
115
  render() {
84
- return (index.h("div", { class: "Wrapper" }, index.h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, index.h("p", { class: "Title" }, this.headerTitle), index.h("p", { class: "Subtitle" }, this.headerSubtitle), index.h("p", { class: "Subtitle" }, this.description), index.h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
116
+ return (index.h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, index.h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, index.h("p", { class: "Title" }, this.headerTitle), index.h("p", { class: "Subtitle" }, this.headerSubtitle), index.h("p", { class: "Subtitle Description" }, this.description), index.h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
85
117
  index.h("div", null, index.h("div", { class: "Content" }, index.h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
86
118
  index.h("div", null, this.deleteTab &&
87
119
  index.h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
@@ -98,20 +130,52 @@ const HelperTab = class {
98
130
  * Selected index
99
131
  */
100
132
  this.selectedIndex = 0;
133
+ /**
134
+ * Client custom styling via string
135
+ */
136
+ this.clientStyling = '';
137
+ /**
138
+ * Client custom styling via url content
139
+ */
140
+ this.clientStylingUrlContent = '';
101
141
  this.tabContent = '';
142
+ this.limitStylingAppends = false;
143
+ this.setClientStyling = () => {
144
+ let sheet = document.createElement('style');
145
+ sheet.innerHTML = this.clientStyling;
146
+ this.stylingContainer.prepend(sheet);
147
+ };
148
+ this.setClientStylingURL = () => {
149
+ let cssFile = document.createElement('style');
150
+ setTimeout(() => {
151
+ cssFile.innerHTML = this.clientStylingUrlContent;
152
+ this.stylingContainer.prepend(cssFile);
153
+ }, 1);
154
+ };
102
155
  }
103
156
  connectedCallback() {
104
157
  /**
105
158
  * fetch(cmsEndpoint + / + / + selectedIndex)
106
159
  */
107
160
  }
161
+ componentDidRender() {
162
+ // start custom styling area
163
+ if (!this.limitStylingAppends && this.stylingContainer) {
164
+ if (this.clientStyling)
165
+ this.setClientStyling();
166
+ if (this.clientStylingUrlContent)
167
+ this.setClientStylingURL();
168
+ this.limitStylingAppends = true;
169
+ }
170
+ // end custom styling area
171
+ }
108
172
  render() {
109
- this.tabContent = index.h("div", { class: "TabContent" }, "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.");
173
+ this.tabContent = index.h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, "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.");
110
174
  if (this.selectedIndex + 1 == 2) {
111
- this.tabContent = index.h("div", { class: "TabContent" }, index.h("ol", null, index.h("li", null, "Register or Login"), index.h("li", null, "Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \u201CI feel lucky\u201D."), index.h("li", null, "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!")));
175
+ this.tabContent = index.h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, index.h("ol", null, index.h("li", null, "Register or Login"), index.h("li", null, "Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \u201CI feel lucky\u201D."), index.h("li", null, "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!")));
112
176
  }
113
177
  else if (this.selectedIndex + 1 == 3) {
114
- this.tabContent = index.h("div", { class: "TabContent" }, index.h("ul", null, index.h("li", null, "What are my odds of winning?"), index.h("li", null, "How can I find out if I\u2019ve won a draw game?"), index.h("li", null, "How do I claim my prize?")));
178
+ this.tabContent = index.h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, index.h("ul", null, index.h("li", null, "What are my odds of winning?"), index.h("li", null, "How can I find out if I\u2019ve won a draw game?"), index.h("li", null, "How do I claim my prize?")));
115
179
  }
116
180
  return (this.tabContent);
117
181
  }
@@ -139,11 +203,47 @@ const HelperTabs = class {
139
203
  * Tabs details
140
204
  */
141
205
  this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
206
+ /**
207
+ * Client custom styling via string
208
+ */
209
+ this.clientStyling = '';
210
+ /**
211
+ * Client custom styling via url
212
+ */
213
+ this.clientStylingurl = '';
214
+ /**
215
+ * Client custom styling via url content
216
+ */
217
+ this.clientStylingUrlContent = '';
218
+ this.limitStylingAppends = false;
219
+ this.setClientStyling = () => {
220
+ let sheet = document.createElement('style');
221
+ sheet.innerHTML = this.clientStyling;
222
+ this.stylingContainer.prepend(sheet);
223
+ };
224
+ this.setClientStylingURL = () => {
225
+ let cssFile = document.createElement('style');
226
+ setTimeout(() => {
227
+ cssFile.innerHTML = this.clientStylingUrlContent;
228
+ this.stylingContainer.prepend(cssFile);
229
+ }, 1);
230
+ };
142
231
  }
143
232
  connectedCallback() {
144
233
  }
234
+ componentDidRender() {
235
+ // start custom styling area
236
+ if (!this.limitStylingAppends && this.stylingContainer) {
237
+ this.setClientStyling();
238
+ if (this.clientStylingUrlContent) {
239
+ this.setClientStylingURL();
240
+ }
241
+ this.limitStylingAppends = true;
242
+ }
243
+ // end custom styling area
244
+ }
145
245
  render() {
146
- return (index.h("div", null, index.h("div", { class: "Tabs" }, this.tabs.map((tab, index$1) => index.h("button", { class: 'TabButton' + (this.selectedIndex == index$1 ? ' Active' : ''), onClick: () => this.selectedIndex = index$1 }, tab.label))), index.h("div", null, index.h("helper-tab", { selectedIndex: this.selectedIndex }))));
246
+ return (index.h("div", { ref: el => this.stylingContainer = el }, index.h("div", { class: "Tabs" }, this.tabs.map((tab, index$1) => index.h("button", { class: 'TabButton' + (this.selectedIndex == index$1 ? ' Active' : ''), onClick: () => this.selectedIndex = index$1 }, tab.label))), index.h("div", null, index.h("helper-tab", { selectedIndex: this.selectedIndex, "client-styling": this.clientStyling, "client-stylingurl": this.clientStylingurl, "client-styling-url-content": this.clientStylingUrlContent }))));
147
247
  }
148
248
  get host() { return index.getElement(this); }
149
249
  };
@@ -154,9 +254,41 @@ const lotteryGameDetailsCss = ":host{display:block}";
154
254
  const LotteryGameDetails = class {
155
255
  constructor(hostRef) {
156
256
  index.registerInstance(this, hostRef);
257
+ /**
258
+ * Client custom styling via string
259
+ */
260
+ this.clientStyling = '';
261
+ /**
262
+ * Client custom styling via url content
263
+ */
264
+ this.clientStylingUrlContent = '';
265
+ this.limitStylingAppends = false;
266
+ this.setClientStyling = () => {
267
+ let sheet = document.createElement('style');
268
+ sheet.innerHTML = this.clientStyling;
269
+ this.stylingContainer.prepend(sheet);
270
+ };
271
+ this.setClientStylingURL = () => {
272
+ let cssFile = document.createElement('style');
273
+ setTimeout(() => {
274
+ cssFile.innerHTML = this.clientStylingUrlContent;
275
+ this.stylingContainer.prepend(cssFile);
276
+ }, 1);
277
+ };
278
+ }
279
+ componentDidRender() {
280
+ // start custom styling area
281
+ if (!this.limitStylingAppends && this.stylingContainer) {
282
+ if (this.clientStyling)
283
+ this.setClientStyling();
284
+ if (this.clientStylingUrlContent)
285
+ this.setClientStylingURL();
286
+ this.limitStylingAppends = true;
287
+ }
288
+ // end custom styling area
157
289
  }
158
290
  render() {
159
- return (index.h("div", null, index.h("helper-accordion", { "header-title": "Game Details", collapsed: false }, index.h("div", { slot: "accordionContent" }, index.h("helper-tabs", null)))));
291
+ return (index.h("div", { class: "GamePageDetailsContainer", ref: el => this.stylingContainer = el }, index.h("helper-accordion", { "header-title": "Game Details", collapsed: false, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, index.h("div", { class: "AccordionContainer", slot: "accordionContent" }, index.h("helper-tabs", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
160
292
  }
161
293
  };
162
294
  LotteryGameDetails.style = lotteryGameDetailsCss;
@@ -234,6 +234,12 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
234
234
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
235
235
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
236
236
  }
237
+ else if (memberName === 'ref') {
238
+ // minifier will clean this up
239
+ if (newValue) {
240
+ newValue(elm);
241
+ }
242
+ }
237
243
  else if ((!isProp ) &&
238
244
  memberName[0] === 'o' &&
239
245
  memberName[1] === 'n') {
@@ -390,6 +396,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
390
396
  for (; startIdx <= endIdx; ++startIdx) {
391
397
  if ((vnode = vnodes[startIdx])) {
392
398
  elm = vnode.$elm$;
399
+ callNodeRefs(vnode);
393
400
  // remove the vnode's element from the dom
394
401
  elm.remove();
395
402
  }
@@ -511,6 +518,12 @@ const patch = (oldVNode, newVNode) => {
511
518
  elm.data = text;
512
519
  }
513
520
  };
521
+ const callNodeRefs = (vNode) => {
522
+ {
523
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
524
+ vNode.$children$ && vNode.$children$.map(callNodeRefs);
525
+ }
526
+ };
514
527
  const renderVdom = (hostRef, renderFnResults) => {
515
528
  const hostElm = hostRef.$hostElement$;
516
529
  const cmpMeta = hostRef.$cmpMeta$;
@@ -648,7 +661,11 @@ const postUpdateComponent = (hostRef) => {
648
661
  const tagName = hostRef.$cmpMeta$.$tagName$;
649
662
  const elm = hostRef.$hostElement$;
650
663
  const endPostUpdate = createTime('postUpdate', tagName);
664
+ const instance = hostRef.$lazyInstance$ ;
651
665
  const ancestorComponent = hostRef.$ancestorComponent$;
666
+ {
667
+ safeCall(instance, 'componentDidRender');
668
+ }
652
669
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
653
670
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
654
671
  {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-9d95408f.js');
5
+ const index = require('./index-0355373c.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -14,7 +14,7 @@ const patchEsm = () => {
14
14
  const defineCustomElements = (win, options) => {
15
15
  if (typeof window === 'undefined') return Promise.resolve();
16
16
  return patchEsm().then(() => {
17
- return index.bootstrapLazy([["helper-accordion_4.cjs",[[1,"lottery-game-details"],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"showContent":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"tabContent":[32]}]]]], options);
17
+ return index.bootstrapLazy([["helper-accordion_4.cjs",[[1,"lottery-game-details",{"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"tabContent":[32],"limitStylingAppends":[32]}]]]], options);
18
18
  });
19
19
  };
20
20
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const index = require('./index-9d95408f.js');
3
+ const index = require('./index-0355373c.js');
4
4
 
5
5
  /*
6
6
  Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -15,5 +15,5 @@ const patchBrowser = () => {
15
15
  };
16
16
 
17
17
  patchBrowser().then(options => {
18
- return index.bootstrapLazy([["helper-accordion_4.cjs",[[1,"lottery-game-details"],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"showContent":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"tabContent":[32]}]]]], options);
18
+ return index.bootstrapLazy([["helper-accordion_4.cjs",[[1,"lottery-game-details",{"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"tabContent":[32],"limitStylingAppends":[32]}]]]], options);
19
19
  });
@@ -1,12 +1,46 @@
1
- import { Component, h, } from '@stencil/core';
1
+ import { Component, h, Prop, State, } from '@stencil/core';
2
2
  import '@everymatrix/helper-accordion';
3
3
  import '@everymatrix/helper-tabs';
4
4
  export class LotteryGameDetails {
5
+ constructor() {
6
+ /**
7
+ * Client custom styling via string
8
+ */
9
+ this.clientStyling = '';
10
+ /**
11
+ * Client custom styling via url content
12
+ */
13
+ this.clientStylingUrlContent = '';
14
+ this.limitStylingAppends = false;
15
+ this.setClientStyling = () => {
16
+ let sheet = document.createElement('style');
17
+ sheet.innerHTML = this.clientStyling;
18
+ this.stylingContainer.prepend(sheet);
19
+ };
20
+ this.setClientStylingURL = () => {
21
+ let cssFile = document.createElement('style');
22
+ setTimeout(() => {
23
+ cssFile.innerHTML = this.clientStylingUrlContent;
24
+ this.stylingContainer.prepend(cssFile);
25
+ }, 1);
26
+ };
27
+ }
28
+ componentDidRender() {
29
+ // start custom styling area
30
+ if (!this.limitStylingAppends && this.stylingContainer) {
31
+ if (this.clientStyling)
32
+ this.setClientStyling();
33
+ if (this.clientStylingUrlContent)
34
+ this.setClientStylingURL();
35
+ this.limitStylingAppends = true;
36
+ }
37
+ // end custom styling area
38
+ }
5
39
  render() {
6
- return (h("div", null,
7
- h("helper-accordion", { "header-title": "Game Details", collapsed: false },
8
- h("div", { slot: "accordionContent" },
9
- h("helper-tabs", null)))));
40
+ return (h("div", { class: "GamePageDetailsContainer", ref: el => this.stylingContainer = el },
41
+ h("helper-accordion", { "header-title": "Game Details", collapsed: false, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent },
42
+ h("div", { class: "AccordionContainer", slot: "accordionContent" },
43
+ h("helper-tabs", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
10
44
  }
11
45
  static get is() { return "lottery-game-details"; }
12
46
  static get encapsulation() { return "shadow"; }
@@ -16,4 +50,45 @@ export class LotteryGameDetails {
16
50
  static get styleUrls() { return {
17
51
  "$": ["lottery-game-details.css"]
18
52
  }; }
53
+ static get properties() { return {
54
+ "clientStyling": {
55
+ "type": "string",
56
+ "mutable": false,
57
+ "complexType": {
58
+ "original": "string",
59
+ "resolved": "string",
60
+ "references": {}
61
+ },
62
+ "required": false,
63
+ "optional": false,
64
+ "docs": {
65
+ "tags": [],
66
+ "text": "Client custom styling via string"
67
+ },
68
+ "attribute": "client-styling",
69
+ "reflect": false,
70
+ "defaultValue": "''"
71
+ },
72
+ "clientStylingUrlContent": {
73
+ "type": "string",
74
+ "mutable": false,
75
+ "complexType": {
76
+ "original": "string",
77
+ "resolved": "string",
78
+ "references": {}
79
+ },
80
+ "required": false,
81
+ "optional": false,
82
+ "docs": {
83
+ "tags": [],
84
+ "text": "Client custom styling via url content"
85
+ },
86
+ "attribute": "client-styling-url-content",
87
+ "reflect": false,
88
+ "defaultValue": "''"
89
+ }
90
+ }; }
91
+ static get states() { return {
92
+ "limitStylingAppends": {}
93
+ }; }
19
94
  }
@@ -15,7 +15,7 @@ const translate = (key, customLang) => {
15
15
  return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
16
16
  };
17
17
 
18
- const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:4px 4px 0 0;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff}.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}.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}";
18
+ const helperAccordionCss = "@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}.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}.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}";
19
19
 
20
20
  const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
21
21
  constructor() {
@@ -63,11 +63,43 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
63
63
  * Language
64
64
  */
65
65
  this.language = 'en';
66
+ /**
67
+ * Client custom styling via string
68
+ */
69
+ this.clientStyling = '';
70
+ /**
71
+ * Client custom styling via url content
72
+ */
73
+ this.clientStylingUrlContent = '';
74
+ this.limitStylingAppends = false;
75
+ this.setClientStyling = () => {
76
+ let sheet = document.createElement('style');
77
+ sheet.innerHTML = this.clientStyling;
78
+ this.stylingContainer.prepend(sheet);
79
+ };
80
+ this.setClientStylingURL = () => {
81
+ let cssFile = document.createElement('style');
82
+ setTimeout(() => {
83
+ cssFile.innerHTML = this.clientStylingUrlContent;
84
+ this.stylingContainer.prepend(cssFile);
85
+ }, 1);
86
+ };
66
87
  }
67
88
  // @TODO fix the `any` type :)
68
89
  connectedCallback() {
69
90
  this.showContent = !this.collapsed;
70
91
  }
92
+ componentDidRender() {
93
+ // start custom styling area
94
+ if (!this.limitStylingAppends && this.stylingContainer) {
95
+ if (this.clientStyling)
96
+ this.setClientStyling();
97
+ if (this.clientStylingUrlContent)
98
+ this.setClientStylingURL();
99
+ this.limitStylingAppends = true;
100
+ }
101
+ // end custom styling area
102
+ }
71
103
  toggleContent() {
72
104
  this.showContent = !this.showContent;
73
105
  }
@@ -79,7 +111,7 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
79
111
  this.accordionEvent.emit();
80
112
  }
81
113
  render() {
82
- return (h("div", { class: "Wrapper" }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
114
+ return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle Description" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
83
115
  h("div", null, h("div", { class: "Content" }, h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
84
116
  h("div", null, this.deleteTab &&
85
117
  h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
@@ -96,7 +128,10 @@ const Accordion = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
96
128
  "eventName": [1, "event-name"],
97
129
  "collapsed": [4],
98
130
  "language": [1],
99
- "showContent": [32]
131
+ "clientStyling": [1, "client-styling"],
132
+ "clientStylingUrlContent": [1, "client-styling-url-content"],
133
+ "showContent": [32],
134
+ "limitStylingAppends": [32]
100
135
  }]);
101
136
  function defineCustomElement() {
102
137
  if (typeof customElements === "undefined") {
@@ -11,20 +11,52 @@ const HelperTab = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
11
11
  * Selected index
12
12
  */
13
13
  this.selectedIndex = 0;
14
+ /**
15
+ * Client custom styling via string
16
+ */
17
+ this.clientStyling = '';
18
+ /**
19
+ * Client custom styling via url content
20
+ */
21
+ this.clientStylingUrlContent = '';
14
22
  this.tabContent = '';
23
+ this.limitStylingAppends = false;
24
+ this.setClientStyling = () => {
25
+ let sheet = document.createElement('style');
26
+ sheet.innerHTML = this.clientStyling;
27
+ this.stylingContainer.prepend(sheet);
28
+ };
29
+ this.setClientStylingURL = () => {
30
+ let cssFile = document.createElement('style');
31
+ setTimeout(() => {
32
+ cssFile.innerHTML = this.clientStylingUrlContent;
33
+ this.stylingContainer.prepend(cssFile);
34
+ }, 1);
35
+ };
15
36
  }
16
37
  connectedCallback() {
17
38
  /**
18
39
  * fetch(cmsEndpoint + / + / + selectedIndex)
19
40
  */
20
41
  }
42
+ componentDidRender() {
43
+ // start custom styling area
44
+ if (!this.limitStylingAppends && this.stylingContainer) {
45
+ if (this.clientStyling)
46
+ this.setClientStyling();
47
+ if (this.clientStylingUrlContent)
48
+ this.setClientStylingURL();
49
+ this.limitStylingAppends = true;
50
+ }
51
+ // end custom styling area
52
+ }
21
53
  render() {
22
- this.tabContent = h("div", { class: "TabContent" }, "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.");
54
+ this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, "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.");
23
55
  if (this.selectedIndex + 1 == 2) {
24
- this.tabContent = h("div", { class: "TabContent" }, h("ol", null, h("li", null, "Register or Login"), h("li", null, "Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \u201CI feel lucky\u201D."), h("li", null, "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!")));
56
+ this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, h("ol", null, h("li", null, "Register or Login"), h("li", null, "Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \u201CI feel lucky\u201D."), h("li", null, "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!")));
25
57
  }
26
58
  else if (this.selectedIndex + 1 == 3) {
27
- this.tabContent = h("div", { class: "TabContent" }, h("ul", null, h("li", null, "What are my odds of winning?"), h("li", null, "How can I find out if I\u2019ve won a draw game?"), h("li", null, "How do I claim my prize?")));
59
+ this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, h("ul", null, h("li", null, "What are my odds of winning?"), h("li", null, "How can I find out if I\u2019ve won a draw game?"), h("li", null, "How do I claim my prize?")));
28
60
  }
29
61
  return (this.tabContent);
30
62
  }
@@ -32,7 +64,10 @@ const HelperTab = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
32
64
  }, [1, "helper-tab", {
33
65
  "selectedIndex": [2, "selected-index"],
34
66
  "cmsEndpoint": [1, "cms-endpoint"],
35
- "tabContent": [32]
67
+ "clientStyling": [1, "client-styling"],
68
+ "clientStylingUrlContent": [1, "client-styling-url-content"],
69
+ "tabContent": [32],
70
+ "limitStylingAppends": [32]
36
71
  }]);
37
72
  function defineCustomElement() {
38
73
  if (typeof customElements === "undefined") {
@@ -24,11 +24,47 @@ const HelperTabs = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
24
24
  * Tabs details
25
25
  */
26
26
  this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
27
+ /**
28
+ * Client custom styling via string
29
+ */
30
+ this.clientStyling = '';
31
+ /**
32
+ * Client custom styling via url
33
+ */
34
+ this.clientStylingurl = '';
35
+ /**
36
+ * Client custom styling via url content
37
+ */
38
+ this.clientStylingUrlContent = '';
39
+ this.limitStylingAppends = false;
40
+ this.setClientStyling = () => {
41
+ let sheet = document.createElement('style');
42
+ sheet.innerHTML = this.clientStyling;
43
+ this.stylingContainer.prepend(sheet);
44
+ };
45
+ this.setClientStylingURL = () => {
46
+ let cssFile = document.createElement('style');
47
+ setTimeout(() => {
48
+ cssFile.innerHTML = this.clientStylingUrlContent;
49
+ this.stylingContainer.prepend(cssFile);
50
+ }, 1);
51
+ };
27
52
  }
28
53
  connectedCallback() {
29
54
  }
55
+ componentDidRender() {
56
+ // start custom styling area
57
+ if (!this.limitStylingAppends && this.stylingContainer) {
58
+ this.setClientStyling();
59
+ if (this.clientStylingUrlContent) {
60
+ this.setClientStylingURL();
61
+ }
62
+ this.limitStylingAppends = true;
63
+ }
64
+ // end custom styling area
65
+ }
30
66
  render() {
31
- return (h("div", null, h("div", { class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))), h("div", null, h("helper-tab", { selectedIndex: this.selectedIndex }))));
67
+ return (h("div", { ref: el => this.stylingContainer = el }, h("div", { class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))), h("div", null, h("helper-tab", { selectedIndex: this.selectedIndex, "client-styling": this.clientStyling, "client-stylingurl": this.clientStylingurl, "client-styling-url-content": this.clientStylingUrlContent }))));
32
68
  }
33
69
  get host() { return this; }
34
70
  static get style() { return helperTabsCss; }
@@ -38,7 +74,11 @@ const HelperTabs = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
38
74
  "selected": [4],
39
75
  "cmsEndpoint": [1, "cms-endpoint"],
40
76
  "selectedIndex": [1538, "selected-index"],
41
- "tabs": [16]
77
+ "tabs": [16],
78
+ "clientStyling": [1, "client-styling"],
79
+ "clientStylingurl": [1, "client-stylingurl"],
80
+ "clientStylingUrlContent": [1, "client-styling-url-content"],
81
+ "limitStylingAppends": [32]
42
82
  }]);
43
83
  function defineCustomElement() {
44
84
  if (typeof customElements === "undefined") {
@@ -10,12 +10,48 @@ const LotteryGameDetails$1 = /*@__PURE__*/ proxyCustomElement(class extends HTML
10
10
  super();
11
11
  this.__registerHost();
12
12
  this.__attachShadow();
13
+ /**
14
+ * Client custom styling via string
15
+ */
16
+ this.clientStyling = '';
17
+ /**
18
+ * Client custom styling via url content
19
+ */
20
+ this.clientStylingUrlContent = '';
21
+ this.limitStylingAppends = false;
22
+ this.setClientStyling = () => {
23
+ let sheet = document.createElement('style');
24
+ sheet.innerHTML = this.clientStyling;
25
+ this.stylingContainer.prepend(sheet);
26
+ };
27
+ this.setClientStylingURL = () => {
28
+ let cssFile = document.createElement('style');
29
+ setTimeout(() => {
30
+ cssFile.innerHTML = this.clientStylingUrlContent;
31
+ this.stylingContainer.prepend(cssFile);
32
+ }, 1);
33
+ };
34
+ }
35
+ componentDidRender() {
36
+ // start custom styling area
37
+ if (!this.limitStylingAppends && this.stylingContainer) {
38
+ if (this.clientStyling)
39
+ this.setClientStyling();
40
+ if (this.clientStylingUrlContent)
41
+ this.setClientStylingURL();
42
+ this.limitStylingAppends = true;
43
+ }
44
+ // end custom styling area
13
45
  }
14
46
  render() {
15
- return (h("div", null, h("helper-accordion", { "header-title": "Game Details", collapsed: false }, h("div", { slot: "accordionContent" }, h("helper-tabs", null)))));
47
+ return (h("div", { class: "GamePageDetailsContainer", ref: el => this.stylingContainer = el }, h("helper-accordion", { "header-title": "Game Details", collapsed: false, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("div", { class: "AccordionContainer", slot: "accordionContent" }, h("helper-tabs", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
16
48
  }
17
49
  static get style() { return lotteryGameDetailsCss; }
18
- }, [1, "lottery-game-details"]);
50
+ }, [1, "lottery-game-details", {
51
+ "clientStyling": [1, "client-styling"],
52
+ "clientStylingUrlContent": [1, "client-styling-url-content"],
53
+ "limitStylingAppends": [32]
54
+ }]);
19
55
  function defineCustomElement$1() {
20
56
  if (typeof customElements === "undefined") {
21
57
  return;
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h, g as getElement } from './index-515a97dd.js';
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index-627fc49c.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  const SUPPORTED_LANGUAGES = ['ro', 'en'];
@@ -15,7 +15,7 @@ const translate = (key, customLang) => {
15
15
  return TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
16
16
  };
17
17
 
18
- const helperAccordionCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");:host{display:block;font-family:\"Roboto\", sans-serif}.Header{border-radius:4px 4px 0 0;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff}.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}.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}";
18
+ const helperAccordionCss = "@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}.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}.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}";
19
19
 
20
20
  const Accordion = class {
21
21
  constructor(hostRef) {
@@ -61,11 +61,43 @@ const Accordion = class {
61
61
  * Language
62
62
  */
63
63
  this.language = 'en';
64
+ /**
65
+ * Client custom styling via string
66
+ */
67
+ this.clientStyling = '';
68
+ /**
69
+ * Client custom styling via url content
70
+ */
71
+ this.clientStylingUrlContent = '';
72
+ this.limitStylingAppends = false;
73
+ this.setClientStyling = () => {
74
+ let sheet = document.createElement('style');
75
+ sheet.innerHTML = this.clientStyling;
76
+ this.stylingContainer.prepend(sheet);
77
+ };
78
+ this.setClientStylingURL = () => {
79
+ let cssFile = document.createElement('style');
80
+ setTimeout(() => {
81
+ cssFile.innerHTML = this.clientStylingUrlContent;
82
+ this.stylingContainer.prepend(cssFile);
83
+ }, 1);
84
+ };
64
85
  }
65
86
  // @TODO fix the `any` type :)
66
87
  connectedCallback() {
67
88
  this.showContent = !this.collapsed;
68
89
  }
90
+ componentDidRender() {
91
+ // start custom styling area
92
+ if (!this.limitStylingAppends && this.stylingContainer) {
93
+ if (this.clientStyling)
94
+ this.setClientStyling();
95
+ if (this.clientStylingUrlContent)
96
+ this.setClientStylingURL();
97
+ this.limitStylingAppends = true;
98
+ }
99
+ // end custom styling area
100
+ }
69
101
  toggleContent() {
70
102
  this.showContent = !this.showContent;
71
103
  }
@@ -77,7 +109,7 @@ const Accordion = class {
77
109
  this.accordionEvent.emit();
78
110
  }
79
111
  render() {
80
- return (h("div", { class: "Wrapper" }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
112
+ return (h("div", { class: "Wrapper", ref: el => this.stylingContainer = el }, h("div", { class: this.ticketHistoryFlag === true ? 'HeaderTicketHistory' : 'Header' }, h("p", { class: "Title" }, this.headerTitle), h("p", { class: "Subtitle" }, this.headerSubtitle), h("p", { class: "Subtitle Description" }, this.description), h("span", { class: "Expand", onClick: () => this.toggleContent() }, this.showContent ? '<' : '>')), this.showContent &&
81
113
  h("div", null, h("div", { class: "Content" }, h("slot", { name: 'accordionContent' }), this.footer && this.showContent &&
82
114
  h("div", null, this.deleteTab &&
83
115
  h("span", { class: "ActionButton", onClick: () => this.deleteAction() }, translate('deleteTicket', this.language)))))));
@@ -94,20 +126,52 @@ const HelperTab = class {
94
126
  * Selected index
95
127
  */
96
128
  this.selectedIndex = 0;
129
+ /**
130
+ * Client custom styling via string
131
+ */
132
+ this.clientStyling = '';
133
+ /**
134
+ * Client custom styling via url content
135
+ */
136
+ this.clientStylingUrlContent = '';
97
137
  this.tabContent = '';
138
+ this.limitStylingAppends = false;
139
+ this.setClientStyling = () => {
140
+ let sheet = document.createElement('style');
141
+ sheet.innerHTML = this.clientStyling;
142
+ this.stylingContainer.prepend(sheet);
143
+ };
144
+ this.setClientStylingURL = () => {
145
+ let cssFile = document.createElement('style');
146
+ setTimeout(() => {
147
+ cssFile.innerHTML = this.clientStylingUrlContent;
148
+ this.stylingContainer.prepend(cssFile);
149
+ }, 1);
150
+ };
98
151
  }
99
152
  connectedCallback() {
100
153
  /**
101
154
  * fetch(cmsEndpoint + / + / + selectedIndex)
102
155
  */
103
156
  }
157
+ componentDidRender() {
158
+ // start custom styling area
159
+ if (!this.limitStylingAppends && this.stylingContainer) {
160
+ if (this.clientStyling)
161
+ this.setClientStyling();
162
+ if (this.clientStylingUrlContent)
163
+ this.setClientStylingURL();
164
+ this.limitStylingAppends = true;
165
+ }
166
+ // end custom styling area
167
+ }
104
168
  render() {
105
- this.tabContent = h("div", { class: "TabContent" }, "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.");
169
+ this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, "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.");
106
170
  if (this.selectedIndex + 1 == 2) {
107
- this.tabContent = h("div", { class: "TabContent" }, h("ol", null, h("li", null, "Register or Login"), h("li", null, "Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \u201CI feel lucky\u201D."), h("li", null, "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!")));
171
+ this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, h("ol", null, h("li", null, "Register or Login"), h("li", null, "Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose \u201CI feel lucky\u201D."), h("li", null, "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!")));
108
172
  }
109
173
  else if (this.selectedIndex + 1 == 3) {
110
- this.tabContent = h("div", { class: "TabContent" }, h("ul", null, h("li", null, "What are my odds of winning?"), h("li", null, "How can I find out if I\u2019ve won a draw game?"), h("li", null, "How do I claim my prize?")));
174
+ this.tabContent = h("div", { class: "TabContent", ref: el => this.stylingContainer = el }, h("ul", null, h("li", null, "What are my odds of winning?"), h("li", null, "How can I find out if I\u2019ve won a draw game?"), h("li", null, "How do I claim my prize?")));
111
175
  }
112
176
  return (this.tabContent);
113
177
  }
@@ -135,11 +199,47 @@ const HelperTabs = class {
135
199
  * Tabs details
136
200
  */
137
201
  this.tabs = [{ label: 'How to Play' }, { label: 'About' }, { label: 'FAQs' }];
202
+ /**
203
+ * Client custom styling via string
204
+ */
205
+ this.clientStyling = '';
206
+ /**
207
+ * Client custom styling via url
208
+ */
209
+ this.clientStylingurl = '';
210
+ /**
211
+ * Client custom styling via url content
212
+ */
213
+ this.clientStylingUrlContent = '';
214
+ this.limitStylingAppends = false;
215
+ this.setClientStyling = () => {
216
+ let sheet = document.createElement('style');
217
+ sheet.innerHTML = this.clientStyling;
218
+ this.stylingContainer.prepend(sheet);
219
+ };
220
+ this.setClientStylingURL = () => {
221
+ let cssFile = document.createElement('style');
222
+ setTimeout(() => {
223
+ cssFile.innerHTML = this.clientStylingUrlContent;
224
+ this.stylingContainer.prepend(cssFile);
225
+ }, 1);
226
+ };
138
227
  }
139
228
  connectedCallback() {
140
229
  }
230
+ componentDidRender() {
231
+ // start custom styling area
232
+ if (!this.limitStylingAppends && this.stylingContainer) {
233
+ this.setClientStyling();
234
+ if (this.clientStylingUrlContent) {
235
+ this.setClientStylingURL();
236
+ }
237
+ this.limitStylingAppends = true;
238
+ }
239
+ // end custom styling area
240
+ }
141
241
  render() {
142
- return (h("div", null, h("div", { class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))), h("div", null, h("helper-tab", { selectedIndex: this.selectedIndex }))));
242
+ return (h("div", { ref: el => this.stylingContainer = el }, h("div", { class: "Tabs" }, this.tabs.map((tab, index) => h("button", { class: 'TabButton' + (this.selectedIndex == index ? ' Active' : ''), onClick: () => this.selectedIndex = index }, tab.label))), h("div", null, h("helper-tab", { selectedIndex: this.selectedIndex, "client-styling": this.clientStyling, "client-stylingurl": this.clientStylingurl, "client-styling-url-content": this.clientStylingUrlContent }))));
143
243
  }
144
244
  get host() { return getElement(this); }
145
245
  };
@@ -150,9 +250,41 @@ const lotteryGameDetailsCss = ":host{display:block}";
150
250
  const LotteryGameDetails = class {
151
251
  constructor(hostRef) {
152
252
  registerInstance(this, hostRef);
253
+ /**
254
+ * Client custom styling via string
255
+ */
256
+ this.clientStyling = '';
257
+ /**
258
+ * Client custom styling via url content
259
+ */
260
+ this.clientStylingUrlContent = '';
261
+ this.limitStylingAppends = false;
262
+ this.setClientStyling = () => {
263
+ let sheet = document.createElement('style');
264
+ sheet.innerHTML = this.clientStyling;
265
+ this.stylingContainer.prepend(sheet);
266
+ };
267
+ this.setClientStylingURL = () => {
268
+ let cssFile = document.createElement('style');
269
+ setTimeout(() => {
270
+ cssFile.innerHTML = this.clientStylingUrlContent;
271
+ this.stylingContainer.prepend(cssFile);
272
+ }, 1);
273
+ };
274
+ }
275
+ componentDidRender() {
276
+ // start custom styling area
277
+ if (!this.limitStylingAppends && this.stylingContainer) {
278
+ if (this.clientStyling)
279
+ this.setClientStyling();
280
+ if (this.clientStylingUrlContent)
281
+ this.setClientStylingURL();
282
+ this.limitStylingAppends = true;
283
+ }
284
+ // end custom styling area
153
285
  }
154
286
  render() {
155
- return (h("div", null, h("helper-accordion", { "header-title": "Game Details", collapsed: false }, h("div", { slot: "accordionContent" }, h("helper-tabs", null)))));
287
+ return (h("div", { class: "GamePageDetailsContainer", ref: el => this.stylingContainer = el }, h("helper-accordion", { "header-title": "Game Details", collapsed: false, "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent }, h("div", { class: "AccordionContainer", slot: "accordionContent" }, h("helper-tabs", { "client-styling": this.clientStyling, "client-styling-url-content": this.clientStylingUrlContent })))));
156
288
  }
157
289
  };
158
290
  LotteryGameDetails.style = lotteryGameDetailsCss;
@@ -212,6 +212,12 @@ const setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
212
212
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
213
213
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
214
214
  }
215
+ else if (memberName === 'ref') {
216
+ // minifier will clean this up
217
+ if (newValue) {
218
+ newValue(elm);
219
+ }
220
+ }
215
221
  else if ((!isProp ) &&
216
222
  memberName[0] === 'o' &&
217
223
  memberName[1] === 'n') {
@@ -368,6 +374,7 @@ const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
368
374
  for (; startIdx <= endIdx; ++startIdx) {
369
375
  if ((vnode = vnodes[startIdx])) {
370
376
  elm = vnode.$elm$;
377
+ callNodeRefs(vnode);
371
378
  // remove the vnode's element from the dom
372
379
  elm.remove();
373
380
  }
@@ -489,6 +496,12 @@ const patch = (oldVNode, newVNode) => {
489
496
  elm.data = text;
490
497
  }
491
498
  };
499
+ const callNodeRefs = (vNode) => {
500
+ {
501
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
502
+ vNode.$children$ && vNode.$children$.map(callNodeRefs);
503
+ }
504
+ };
492
505
  const renderVdom = (hostRef, renderFnResults) => {
493
506
  const hostElm = hostRef.$hostElement$;
494
507
  const cmpMeta = hostRef.$cmpMeta$;
@@ -626,7 +639,11 @@ const postUpdateComponent = (hostRef) => {
626
639
  const tagName = hostRef.$cmpMeta$.$tagName$;
627
640
  const elm = hostRef.$hostElement$;
628
641
  const endPostUpdate = createTime('postUpdate', tagName);
642
+ const instance = hostRef.$lazyInstance$ ;
629
643
  const ancestorComponent = hostRef.$ancestorComponent$;
644
+ {
645
+ safeCall(instance, 'componentDidRender');
646
+ }
630
647
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
631
648
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
632
649
  {
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-515a97dd.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-627fc49c.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -10,7 +10,7 @@ const patchEsm = () => {
10
10
  const defineCustomElements = (win, options) => {
11
11
  if (typeof window === 'undefined') return Promise.resolve();
12
12
  return patchEsm().then(() => {
13
- return bootstrapLazy([["helper-accordion_4",[[1,"lottery-game-details"],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"showContent":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"tabContent":[32]}]]]], options);
13
+ return bootstrapLazy([["helper-accordion_4",[[1,"lottery-game-details",{"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"tabContent":[32],"limitStylingAppends":[32]}]]]], options);
14
14
  });
15
15
  };
16
16
 
@@ -1,4 +1,4 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-515a97dd.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-627fc49c.js';
2
2
 
3
3
  /*
4
4
  Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
@@ -13,5 +13,5 @@ const patchBrowser = () => {
13
13
  };
14
14
 
15
15
  patchBrowser().then(options => {
16
- return bootstrapLazy([["helper-accordion_4",[[1,"lottery-game-details"],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"showContent":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"tabContent":[32]}]]]], options);
16
+ return bootstrapLazy([["helper-accordion_4",[[1,"lottery-game-details",{"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-tabs",{"disabled":[4],"label":[1],"selected":[4],"cmsEndpoint":[1,"cms-endpoint"],"selectedIndex":[1538,"selected-index"],"tabs":[16],"clientStyling":[1,"client-styling"],"clientStylingurl":[1,"client-stylingurl"],"clientStylingUrlContent":[1,"client-styling-url-content"],"limitStylingAppends":[32]}],[1,"helper-accordion",{"ticketHistoryFlag":[4,"ticket-history-flag"],"headerTitle":[1,"header-title"],"headerSubtitle":[1,"header-subtitle"],"description":[1],"footer":[4],"deleteTab":[4,"delete-tab"],"postMessage":[4,"post-message"],"eventName":[1,"event-name"],"collapsed":[4],"language":[1],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"showContent":[32],"limitStylingAppends":[32]}],[1,"helper-tab",{"selectedIndex":[2,"selected-index"],"cmsEndpoint":[1,"cms-endpoint"],"clientStyling":[1,"client-styling"],"clientStylingUrlContent":[1,"client-styling-url-content"],"tabContent":[32],"limitStylingAppends":[32]}]]]], options);
17
17
  });
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-703a43dd.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-ea7da786",[[1,"lottery-game-details"],[1,"helper-tabs",{disabled:[4],label:[1],selected:[4],cmsEndpoint:[1,"cms-endpoint"],selectedIndex:[1538,"selected-index"],tabs:[16]}],[1,"helper-accordion",{ticketHistoryFlag:[4,"ticket-history-flag"],headerTitle:[1,"header-title"],headerSubtitle:[1,"header-subtitle"],description:[1],footer:[4],deleteTab:[4,"delete-tab"],postMessage:[4,"post-message"],eventName:[1,"event-name"],collapsed:[4],language:[1],showContent:[32]}],[1,"helper-tab",{selectedIndex:[2,"selected-index"],cmsEndpoint:[1,"cms-endpoint"],tabContent:[32]}]]]],e)));
1
+ import{p as t,b as e}from"./p-ca6b7fee.js";(()=>{const e=import.meta.url,n={};return""!==e&&(n.resourcesUrl=new URL(".",e).href),t(n)})().then((t=>e([["p-ce5b6f5f",[[1,"lottery-game-details",{clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}],[1,"helper-tabs",{disabled:[4],label:[1],selected:[4],cmsEndpoint:[1,"cms-endpoint"],selectedIndex:[1538,"selected-index"],tabs:[16],clientStyling:[1,"client-styling"],clientStylingurl:[1,"client-stylingurl"],clientStylingUrlContent:[1,"client-styling-url-content"],limitStylingAppends:[32]}],[1,"helper-accordion",{ticketHistoryFlag:[4,"ticket-history-flag"],headerTitle:[1,"header-title"],headerSubtitle:[1,"header-subtitle"],description:[1],footer:[4],deleteTab:[4,"delete-tab"],postMessage:[4,"post-message"],eventName:[1,"event-name"],collapsed:[4],language:[1],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],showContent:[32],limitStylingAppends:[32]}],[1,"helper-tab",{selectedIndex:[2,"selected-index"],cmsEndpoint:[1,"cms-endpoint"],clientStyling:[1,"client-styling"],clientStylingUrlContent:[1,"client-styling-url-content"],tabContent:[32],limitStylingAppends:[32]}]]]],t)));
@@ -0,0 +1 @@
1
+ let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),i=new WeakMap,a=e=>"sc-"+e.o,u={},f=e=>"object"==(e=typeof e)||"function"===e,d=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!f(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?$(null,l):l),o=s)};if(c(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const i=$(e,null);return i.u=t,r.length>0&&(i.$=r),i},$=(e,t)=>({t:0,h:e,i:t,m:null,$:null,u:null}),h={},m=(e,t,n,s,r,c)=>{if(n!==s){let i=B(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,l=p(n),o=p(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if("ref"===t)s&&s(e);else if(i||"o"!==t[0]||"n"!==t[1]){const l=f(s);if((i||l&&null!==s)&&!r)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?i=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&c||r)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):B(l,a)?a.slice(2):a[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},y=/\s/,p=e=>e?e.split(y):[],b=(e,t,n,l)=>{const s=11===t.m.nodeType&&t.m.host?t.m.host:t.m,o=e&&e.u||u,r=t.u||u;for(l in o)l in r||m(s,l,o[l],void 0,n,t.t);for(l in r)m(s,l,o[l],r[l],n,t.t)},w=(t,n,l)=>{let o,r,c=n.$[l],i=0;if(null!==c.i)o=c.m=s.createTextNode(c.i);else if(o=c.m=s.createElement(c.h),b(null,c,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),c.$)for(i=0;i<c.$.length;++i)r=w(t,c,i),r&&o.appendChild(r);return o},S=(e,n,l,s,o,r)=>{let c,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);o<=r;++o)s[o]&&(c=w(null,l,o),c&&(s[o].m=c,i.insertBefore(c,n)))},g=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.m,M(l),s.remove())},j=(e,t)=>e.h===t.h,v=(e,t)=>{const n=t.m=e.m,l=e.$,s=t.$,o=t.i;null===o?("slot"===t.h||b(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,r=0,c=t.length-1,i=t[0],a=t[c],u=l.length-1,f=l[0],d=l[u];for(;o<=c&&r<=u;)null==i?i=t[++o]:null==a?a=t[--c]:null==f?f=l[++r]:null==d?d=l[--u]:j(i,f)?(v(i,f),i=t[++o],f=l[++r]):j(a,d)?(v(a,d),a=t[--c],d=l[--u]):j(i,d)?(v(i,d),e.insertBefore(i.m,a.m.nextSibling),i=t[++o],d=l[--u]):j(a,f)?(v(a,f),e.insertBefore(a.m,i.m),a=t[--c],f=l[++r]):(s=w(t&&t[r],n,r),f=l[++r],s&&i.m.parentNode.insertBefore(s,i.m));o>c?S(e,null==l[u+1]?null:l[u+1].m,n,l,r,u):r>u&&g(t,o,c)})(n,l,t,s):null!==s?(null!==e.i&&(n.textContent=""),S(n,null,t,s,0,s.length-1)):null!==l&&g(l,0,l.length-1)):e.i!==o&&(n.data=o)},M=e=>{e.u&&e.u.ref&&e.u.ref(null),e.$&&e.$.map(M)},k=e=>V(e).p,C=(e,t,n)=>{const l=k(e);return{emit:e=>O(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},O=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},P=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},x=(e,t)=>{if(e.t|=16,!(4&e.t))return P(e,e.g),ne((()=>E(e,t)));e.t|=512},E=(e,t)=>{const n=e.j;return L(void 0,(()=>N(e,n,t)))},N=async(e,t,n)=>{const l=e.p,o=l["s-rc"];n&&(e=>{const t=e.v,n=e.p,l=t.t,o=((e,t)=>{let n=a(t),l=K.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=i.get(e=e.head||e);o||i.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);R(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>T(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},R=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.p,o=n.v,r=n.M||$(null,null),c=(e=>e&&e.h===h)(l)?l:d(null,null,l);t=s.tagName,o.k&&(c.u=c.u||{},o.k.map((([e,t])=>c.u[t]=s[e]))),c.h=null,c.t|=4,n.M=c,c.m=r.m=s.shadowRoot||s,e=s["s-sc"],v(r,c)})(n,l)}catch(e){G(e,n.p)}return null},T=e=>{const t=e.p,n=e.g;F(e.j,"componentDidRender"),64&e.t||(e.t|=64,U(t),e.C(t),n||A()),e.S&&(e.S(),e.S=void 0),512&e.t&&te((()=>x(e,!1))),e.t&=-517},A=()=>{U(s.documentElement),te((()=>O(l,"appload",{detail:{namespace:"lottery-game-details"}})))},F=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){G(e)}},L=(e,t)=>e&&e.then?e.then(t):t(),U=e=>e.classList.add("hydrated"),W=(e,t,n)=>{if(t.O){const l=Object.entries(t.O),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>V(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=V(e),o=s.P.get(t),r=s.t,c=s.j;n=((e,t)=>null==e||f(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.O[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.P.set(t,n),c&&2==(18&r)&&x(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){o.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.k.push([e,s]),s}))}}return e},q=e=>{F(e,"connectedCallback")},D=(e,t={})=>{const n=[],r=t.exclude||[],i=l.customElements,u=s.head,f=u.querySelector("meta[charset]"),d=s.createElement("style"),$=[];let h,m=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],o:t[1],O:t[2],N:t[3]};l.O=t[2],l.k=[];const s=l.o,u=class extends HTMLElement{constructor(e){super(e),z(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),m?$.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=V(e),n=t.v,l=()=>{};if(1&t.t)q(t.j);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){P(t,t.g=n);break}}n.O&&Object.entries(n.O).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=J(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(W(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){G(e)}t.t&=-9,e(),q(t.j)}if(s.style){let e=s.style;const t=a(n);if(!K.has(t)){const l=()=>{};((e,t,n)=>{let l=K.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,K.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.g,r=()=>x(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>{}))}componentOnReady(){return V(this).R}};l.T=e[0],r.includes(s)||i.get(s)||(n.push(s),i.define(s,W(u,l,1)))}))})),d.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),u.insertBefore(d,f?f.nextSibling:u.firstChild),m=!1,$.length?$.map((e=>e.connectedCallback())):o.jmp((()=>h=setTimeout(A,30)))},H=new WeakMap,V=e=>H.get(e),_=(e,t)=>H.set(t.j=e,t),z=(e,t)=>{const n={t:0,p:e,v:t,P:new Map};return n.R=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],H.set(e,n)},B=(e,t)=>t in e,G=(e,t)=>(0,console.error)(e,t),I=new Map,J=e=>{const t=e.o.replace(/-/g,"_"),n=e.T,l=I.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(I.set(n,e),e[t])),G)},K=new Map,Q=[],X=[],Y=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?te(ee):o.raf(ee))},Z=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){G(e)}e.length=0},ee=()=>{Z(Q),Z(X),(n=Q.length>0)&&o.raf(ee)},te=e=>r().then(e),ne=Y(X,!0);export{D as b,C as c,k as g,d as h,r as p,_ as r}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i,g as s}from"./p-ca6b7fee.js";const o=["ro","en"],n={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"}},r=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",7),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.limitStylingAppends=!1,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)}}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",{class:"Wrapper",ref:t=>this.stylingContainer=t},i("div",{class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header"},i("p",{class:"Title"},this.headerTitle),i("p",{class:"Subtitle"},this.headerSubtitle),i("p",{class:"Subtitle Description"},this.description),i("span",{class:"Expand",onClick:()=>this.toggleContent()},this.showContent?"<":">")),this.showContent&&i("div",null,i("div",{class:"Content"},i("slot",{name:"accordionContent"}),this.footer&&this.showContent&&i("div",null,this.deleteTab&&i("span",{class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return n[void 0!==t&&o.includes(t)?t:"en"].deleteTicket})())))))}};r.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}.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}.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 l=class{constructor(e){t(this,e),this.selectedIndex=0,this.clientStyling="",this.clientStylingUrlContent="",this.tabContent="",this.limitStylingAppends=!1,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)}}connectedCallback(){}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return this.tabContent=i("div",{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",{class:"TabContent",ref:t=>this.stylingContainer=t},i("ol",null,i("li",null,"Register or Login"),i("li",null,"Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose “I feel lucky”."),i("li",null,"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",{class:"TabContent",ref:t=>this.stylingContainer=t},i("ul",null,i("li",null,"What are my odds of winning?"),i("li",null,"How can I find out if I’ve won a draw game?"),i("li",null,"How do I claim my prize?")))),this.tabContent}};l.style=":host{display:block}.TabContent{font-size:14px;color:#000;font-weight:normal}";const a=class{constructor(e){t(this,e),this.disabled=!1,this.selected=!1,this.selectedIndex=0,this.tabs=[{label:"How to Play"},{label:"About"},{label:"FAQs"}],this.clientStyling="",this.clientStylingurl="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,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)}}connectedCallback(){}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{ref:t=>this.stylingContainer=t},i("div",{class:"Tabs"},this.tabs.map(((t,e)=>i("button",{class:"TabButton"+(this.selectedIndex==e?" Active":""),onClick:()=>this.selectedIndex=e},t.label)))),i("div",null,i("helper-tab",{selectedIndex:this.selectedIndex,"client-styling":this.clientStyling,"client-stylingurl":this.clientStylingurl,"client-styling-url-content":this.clientStylingUrlContent})))}get host(){return s(this)}};a.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 c=class{constructor(e){t(this,e),this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1,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)}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{class:"GamePageDetailsContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{"header-title":"Game Details",collapsed:!1,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{class:"AccordionContainer",slot:"accordionContent"},i("helper-tabs",{"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};c.style=":host{display:block}";export{r as helper_accordion,l as helper_tab,a as helper_tabs,c as lottery_game_details}
@@ -1,5 +1,18 @@
1
1
  import '@everymatrix/helper-accordion';
2
2
  import '@everymatrix/helper-tabs';
3
3
  export declare class LotteryGameDetails {
4
+ /**
5
+ * Client custom styling via string
6
+ */
7
+ clientStyling: string;
8
+ /**
9
+ * Client custom styling via url content
10
+ */
11
+ clientStylingUrlContent: string;
12
+ private limitStylingAppends;
13
+ private stylingContainer;
14
+ componentDidRender(): void;
15
+ setClientStyling: () => void;
16
+ setClientStylingURL: () => void;
4
17
  render(): any;
5
18
  }
@@ -7,6 +7,14 @@
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  export namespace Components {
9
9
  interface LotteryGameDetails {
10
+ /**
11
+ * Client custom styling via string
12
+ */
13
+ "clientStyling": string;
14
+ /**
15
+ * Client custom styling via url content
16
+ */
17
+ "clientStylingUrlContent": string;
10
18
  }
11
19
  }
12
20
  declare global {
@@ -22,6 +30,14 @@ declare global {
22
30
  }
23
31
  declare namespace LocalJSX {
24
32
  interface LotteryGameDetails {
33
+ /**
34
+ * Client custom styling via string
35
+ */
36
+ "clientStyling"?: string;
37
+ /**
38
+ * Client custom styling via url content
39
+ */
40
+ "clientStylingUrlContent"?: string;
25
41
  }
26
42
  interface IntrinsicElements {
27
43
  "lottery-game-details": LotteryGameDetails;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/lottery-game-details",
3
- "version": "0.1.7",
3
+ "version": "0.1.20",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -15,5 +15,9 @@
15
15
  ],
16
16
  "publishConfig": {
17
17
  "access": "public"
18
+ },
19
+ "dependencies": {
20
+ "@everymatrix/helper-accordion": "*",
21
+ "@everymatrix/helper-tabs": "*"
18
22
  }
19
23
  }
@@ -1 +0,0 @@
1
- let e,t,n=!1;const l="undefined"!=typeof window?window:{},s=l.document||{head:{}},o={t:0,l:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},r=e=>Promise.resolve(e),c=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replace}catch(e){}return!1})(),i=new WeakMap,a=e=>"sc-"+e.o,u={},f=e=>"object"==(e=typeof e)||"function"===e,d=(e,t,...n)=>{let l=null,s=!1,o=!1,r=[];const c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!f(l))&&(l+=""),s&&o?r[r.length-1].i+=l:r.push(s?$(null,l):l),o=s)};if(c(n),t){const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}const i=$(e,null);return i.u=t,r.length>0&&(i.$=r),i},$=(e,t)=>({t:0,h:e,i:t,m:null,$:null,u:null}),h={},y=(e,t,n,s,r,c)=>{if(n!==s){let i=z(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,l=p(n),o=p(s);t.remove(...l.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!l.includes(e))))}else if(i||"o"!==t[0]||"n"!==t[1]){const l=f(s);if((i||l&&null!==s)&&!r)try{if(e.tagName.includes("-"))e[t]=s;else{let l=null==s?"":s;"list"===t?i=!1:null!=n&&e[t]==l||(e[t]=l)}}catch(e){}null==s||!1===s?!1===s&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&c||r)&&!l&&e.setAttribute(t,s=!0===s?"":s)}else t="-"===t[2]?t.slice(3):z(l,a)?a.slice(2):a[2]+t.slice(3),n&&o.rel(e,t,n,!1),s&&o.ael(e,t,s,!1)}},m=/\s/,p=e=>e?e.split(m):[],b=(e,t,n,l)=>{const s=11===t.m.nodeType&&t.m.host?t.m.host:t.m,o=e&&e.u||u,r=t.u||u;for(l in o)l in r||y(s,l,o[l],void 0,n,t.t);for(l in r)y(s,l,o[l],r[l],n,t.t)},w=(t,n,l)=>{let o,r,c=n.$[l],i=0;if(null!==c.i)o=c.m=s.createTextNode(c.i);else if(o=c.m=s.createElement(c.h),b(null,c,!1),null!=e&&o["s-si"]!==e&&o.classList.add(o["s-si"]=e),c.$)for(i=0;i<c.$.length;++i)r=w(t,c,i),r&&o.appendChild(r);return o},S=(e,n,l,s,o,r)=>{let c,i=e;for(i.shadowRoot&&i.tagName===t&&(i=i.shadowRoot);o<=r;++o)s[o]&&(c=w(null,l,o),c&&(s[o].m=c,i.insertBefore(c,n)))},g=(e,t,n,l)=>{for(;t<=n;++t)(l=e[t])&&l.m.remove()},j=(e,t)=>e.h===t.h,v=(e,t)=>{const n=t.m=e.m,l=e.$,s=t.$,o=t.i;null===o?("slot"===t.h||b(e,t,!1),null!==l&&null!==s?((e,t,n,l)=>{let s,o=0,r=0,c=t.length-1,i=t[0],a=t[c],u=l.length-1,f=l[0],d=l[u];for(;o<=c&&r<=u;)null==i?i=t[++o]:null==a?a=t[--c]:null==f?f=l[++r]:null==d?d=l[--u]:j(i,f)?(v(i,f),i=t[++o],f=l[++r]):j(a,d)?(v(a,d),a=t[--c],d=l[--u]):j(i,d)?(v(i,d),e.insertBefore(i.m,a.m.nextSibling),i=t[++o],d=l[--u]):j(a,f)?(v(a,f),e.insertBefore(a.m,i.m),a=t[--c],f=l[++r]):(s=w(t&&t[r],n,r),f=l[++r],s&&i.m.parentNode.insertBefore(s,i.m));o>c?S(e,null==l[u+1]?null:l[u+1].m,n,l,r,u):r>u&&g(t,o,c)})(n,l,t,s):null!==s?(null!==e.i&&(n.textContent=""),S(n,null,t,s,0,s.length-1)):null!==l&&g(l,0,l.length-1)):e.i!==o&&(n.data=o)},M=e=>H(e).p,k=(e,t,n)=>{const l=M(e);return{emit:e=>C(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},C=(e,t,n)=>{const l=o.ce(t,n);return e.dispatchEvent(l),l},O=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},P=(e,t)=>{if(e.t|=16,!(4&e.t))return O(e,e.g),ee((()=>x(e,t)));e.t|=512},x=(e,t)=>{const n=e.j;return F(void 0,(()=>E(e,n,t)))},E=async(e,t,n)=>{const l=e.p,o=l["s-rc"];n&&(e=>{const t=e.v,n=e.p,l=t.t,o=((e,t)=>{let n=a(t),l=I.get(n);if(e=11===e.nodeType?e:s,l)if("string"==typeof l){let t,o=i.get(e=e.head||e);o||i.set(e,o=new Set),o.has(n)||(t=s.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link")),o&&o.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);N(e,t),o&&(o.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>T(e);0===t.length?n():(Promise.all(t).then(n),e.t|=4,t.length=0)}},N=(n,l)=>{try{l=l.render(),n.t&=-17,n.t|=2,((n,l)=>{const s=n.p,o=n.v,r=n.M||$(null,null),c=(e=>e&&e.h===h)(l)?l:d(null,null,l);t=s.tagName,o.k&&(c.u=c.u||{},o.k.map((([e,t])=>c.u[t]=s[e]))),c.h=null,c.t|=4,n.M=c,c.m=r.m=s.shadowRoot||s,e=s["s-sc"],v(r,c)})(n,l)}catch(e){B(e,n.p)}return null},T=e=>{const t=e.p,n=e.g;64&e.t||(e.t|=64,L(t),e.C(t),n||A()),e.S&&(e.S(),e.S=void 0),512&e.t&&Z((()=>P(e,!1))),e.t&=-517},A=()=>{L(s.documentElement),Z((()=>C(l,"appload",{detail:{namespace:"lottery-game-details"}})))},F=(e,t)=>e&&e.then?e.then(t):t(),L=e=>e.classList.add("hydrated"),R=(e,t,n)=>{if(t.O){const l=Object.entries(t.O),s=e.prototype;if(l.map((([e,[l]])=>{(31&l||2&n&&32&l)&&Object.defineProperty(s,e,{get(){return((e,t)=>H(this).P.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=H(e),o=s.P.get(t),r=s.t,c=s.j;n=((e,t)=>null==e||f(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.O[t][0]),8&r&&void 0!==o||n===o||Number.isNaN(o)&&Number.isNaN(n)||(s.P.set(t,n),c&&2==(18&r)&&P(s,!1))})(this,e,n,t)},configurable:!0,enumerable:!0})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){o.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.k.push([e,s]),s}))}}return e},U=e=>{((e,t)=>{if(e&&e[t])try{e[t](void 0)}catch(e){B(e)}})(e,"connectedCallback")},W=(e,t={})=>{const n=[],r=t.exclude||[],i=l.customElements,u=s.head,f=u.querySelector("meta[charset]"),d=s.createElement("style"),$=[];let h,y=!0;Object.assign(o,t),o.l=new URL(t.resourcesUrl||"./",s.baseURI).href,e.map((e=>{e[1].map((t=>{const l={t:t[0],o:t[1],O:t[2],N:t[3]};l.O=t[2],l.k=[];const s=l.o,u=class extends HTMLElement{constructor(e){super(e),_(e=this,l),1&l.t&&e.attachShadow({mode:"open"})}connectedCallback(){h&&(clearTimeout(h),h=null),y?$.push(this):o.jmp((()=>(e=>{if(0==(1&o.t)){const t=H(e),n=t.v,l=()=>{};if(1&t.t)U(t.j);else{t.t|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){O(t,t.g=n);break}}n.O&&Object.entries(n.O).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.t)){{if(t.t|=32,(s=G(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(R(s,n,2),s.isProxied=!0);const e=()=>{};t.t|=8;try{new s(t)}catch(e){B(e)}t.t&=-9,e(),U(t.j)}if(s.style){let e=s.style;const t=a(n);if(!I.has(t)){const l=()=>{};((e,t,n)=>{let l=I.get(e);c&&n?(l=l||new CSSStyleSheet,l.replace(t)):l=t,I.set(e,l)})(t,e,!!(1&n.t)),l()}}}const o=t.g,r=()=>P(t,!0);o&&o["s-rc"]?o["s-rc"].push(r):r()})(0,t,n)}l()}})(this)))}disconnectedCallback(){o.jmp((()=>{}))}componentOnReady(){return H(this).T}};l.A=e[0],r.includes(s)||i.get(s)||(n.push(s),i.define(s,R(u,l,1)))}))})),d.innerHTML=n+"{visibility:hidden}.hydrated{visibility:inherit}",d.setAttribute("data-styles",""),u.insertBefore(d,f?f.nextSibling:u.firstChild),y=!1,$.length?$.map((e=>e.connectedCallback())):o.jmp((()=>h=setTimeout(A,30)))},q=new WeakMap,H=e=>q.get(e),V=(e,t)=>q.set(t.j=e,t),_=(e,t)=>{const n={t:0,p:e,v:t,P:new Map};return n.T=new Promise((e=>n.C=e)),e["s-p"]=[],e["s-rc"]=[],q.set(e,n)},z=(e,t)=>t in e,B=(e,t)=>(0,console.error)(e,t),D=new Map,G=e=>{const t=e.o.replace(/-/g,"_"),n=e.A,l=D.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(D.set(n,e),e[t])),B)},I=new Map,J=[],K=[],Q=(e,t)=>l=>{e.push(l),n||(n=!0,t&&4&o.t?Z(Y):o.raf(Y))},X=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){B(e)}e.length=0},Y=()=>{X(J),X(K),(n=J.length>0)&&o.raf(Y)},Z=e=>r().then(e),ee=Q(K,!0);export{W as b,k as c,M as g,d as h,r as p,V as r}
@@ -1 +0,0 @@
1
- import{r as t,c as e,h as o,g as i}from"./p-703a43dd.js";const s=["ro","en"],r={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"}},n=class{constructor(o){t(this,o),this.accordionEvent=e(this,"helperAccordionAction",7),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"}connectedCallback(){this.showContent=!this.collapsed}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return o("div",{class:"Wrapper"},o("div",{class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header"},o("p",{class:"Title"},this.headerTitle),o("p",{class:"Subtitle"},this.headerSubtitle),o("p",{class:"Subtitle"},this.description),o("span",{class:"Expand",onClick:()=>this.toggleContent()},this.showContent?"<":">")),this.showContent&&o("div",null,o("div",{class:"Content"},o("slot",{name:"accordionContent"}),this.footer&&this.showContent&&o("div",null,this.deleteTab&&o("span",{class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return r[void 0!==t&&s.includes(t)?t:"en"].deleteTicket})())))))}};n.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:4px 4px 0 0;background:#009993;display:flex;gap:30px;border:1px solid #009993;padding:8px 10px;user-select:none}.Header:hover{background:#00ABA4}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:#fff}.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}.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 a=class{constructor(e){t(this,e),this.selectedIndex=0,this.tabContent=""}connectedCallback(){}render(){return this.tabContent=o("div",{class:"TabContent"},"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=o("div",{class:"TabContent"},o("ol",null,o("li",null,"Register or Login"),o("li",null,"Buy tickets. Select 'Buy Tickets' to pick your numbers. Want us to automatically generate random numbers for you? Choose “I feel lucky”."),o("li",null,"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=o("div",{class:"TabContent"},o("ul",null,o("li",null,"What are my odds of winning?"),o("li",null,"How can I find out if I’ve won a draw game?"),o("li",null,"How do I claim my prize?")))),this.tabContent}};a.style=":host{display:block}.TabContent{font-size:14px;color:#000;font-weight:normal}";const l=class{constructor(e){t(this,e),this.disabled=!1,this.selected=!1,this.selectedIndex=0,this.tabs=[{label:"How to Play"},{label:"About"},{label:"FAQs"}]}connectedCallback(){}render(){return o("div",null,o("div",{class:"Tabs"},this.tabs.map(((t,e)=>o("button",{class:"TabButton"+(this.selectedIndex==e?" Active":""),onClick:()=>this.selectedIndex=e},t.label)))),o("div",null,o("helper-tab",{selectedIndex:this.selectedIndex})))}get host(){return i(this)}};l.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 c=class{constructor(e){t(this,e)}render(){return o("div",null,o("helper-accordion",{"header-title":"Game Details",collapsed:!1},o("div",{slot:"accordionContent"},o("helper-tabs",null))))}};c.style=":host{display:block}";export{n as helper_accordion,a as helper_tab,l as helper_tabs,c as lottery_game_details}