@everymatrix/casino-challenges-overlay-modal 0.16.0 → 0.16.2

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.
Files changed (31) hide show
  1. package/dist/casino-challenges-overlay-modal/casino-challenges-overlay-modal-a6da84b6.js +1 -0
  2. package/dist/casino-challenges-overlay-modal/casino-challenges-overlay-modal.entry.js +1 -1
  3. package/dist/casino-challenges-overlay-modal/casino-challenges-overlay-modal.esm.js +1 -1
  4. package/dist/casino-challenges-overlay-modal/index-603664b0.js +2 -0
  5. package/dist/casino-challenges-overlay-modal/index.esm.js +1 -1
  6. package/dist/cjs/casino-challenges-overlay-modal-5004ed4a.js +369 -0
  7. package/dist/cjs/casino-challenges-overlay-modal.cjs.entry.js +2 -2
  8. package/dist/cjs/casino-challenges-overlay-modal.cjs.js +2 -2
  9. package/dist/cjs/{index-c1a8ddc1.js → index-3aa45572.js} +26 -3
  10. package/dist/cjs/index.cjs.js +2 -2
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/collection/components/casino-challenges-overlay-modal/casino-challenges-overlay-modal.css +191 -36
  13. package/dist/collection/components/casino-challenges-overlay-modal/casino-challenges-overlay-modal.js +158 -1
  14. package/dist/collection/utils/locale.utils.js +10 -2
  15. package/dist/collection/utils/types.js +1 -0
  16. package/dist/collection/utils/utils.js +7 -3
  17. package/dist/esm/casino-challenges-overlay-modal-a6da84b6.js +367 -0
  18. package/dist/esm/casino-challenges-overlay-modal.entry.js +2 -2
  19. package/dist/esm/casino-challenges-overlay-modal.js +3 -3
  20. package/dist/esm/{index-f13cfc58.js → index-603664b0.js} +26 -3
  21. package/dist/esm/index.js +2 -2
  22. package/dist/esm/loader.js +3 -3
  23. package/dist/types/components/casino-challenges-overlay-modal/casino-challenges-overlay-modal.d.ts +20 -0
  24. package/dist/types/components.d.ts +6 -0
  25. package/dist/types/utils/types.d.ts +4 -0
  26. package/dist/types/utils/utils.d.ts +1 -1
  27. package/package.json +1 -1
  28. package/dist/casino-challenges-overlay-modal/casino-challenges-overlay-modal-f5be3740.js +0 -1
  29. package/dist/casino-challenges-overlay-modal/index-f13cfc58.js +0 -2
  30. package/dist/cjs/casino-challenges-overlay-modal-3fbdf2d7.js +0 -244
  31. package/dist/esm/casino-challenges-overlay-modal-f5be3740.js +0 -242
@@ -0,0 +1,367 @@
1
+ import { r as registerInstance, h } from './index-603664b0.js';
2
+
3
+ const StyleCacheKey = '__WIDGET_GLOBAL_STYLE_CACHE__';
4
+
5
+ /**
6
+ * @name setClientStyling
7
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
8
+ * @param {HTMLElement} stylingContainer The reference element of the widget
9
+ * @param {string} clientStyling The style content
10
+ */
11
+ function setClientStyling(stylingContainer, clientStyling) {
12
+ if (stylingContainer) {
13
+ const sheet = document.createElement('style');
14
+ sheet.innerHTML = clientStyling;
15
+ stylingContainer.appendChild(sheet);
16
+ }
17
+ }
18
+
19
+ /**
20
+ * @name setClientStylingURL
21
+ * @description Method used to create and append to the passed element of the widget a style element with the content fetched from a given URL
22
+ * @param {HTMLElement} stylingContainer The reference element of the widget
23
+ * @param {string} clientStylingUrl The URL of the style content
24
+ */
25
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
26
+ if (!stylingContainer || !clientStylingUrl) return;
27
+
28
+ const url = new URL(clientStylingUrl);
29
+
30
+ fetch(url.href)
31
+ .then((res) => res.text())
32
+ .then((data) => {
33
+ const cssFile = document.createElement('style');
34
+ cssFile.innerHTML = data;
35
+ if (stylingContainer) {
36
+ stylingContainer.appendChild(cssFile);
37
+ }
38
+ })
39
+ .catch((err) => {
40
+ console.error('There was an error while trying to load client styling from URL', err);
41
+ });
42
+ }
43
+
44
+ /**
45
+ * @name setStreamLibrary
46
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
47
+ * @param {HTMLElement} stylingContainer The highest element of the widget
48
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
49
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
50
+ * @param {boolean} useAdoptedStyleSheets A flag to gradually enable testing of adoptedStyleSheets
51
+ */
52
+ function setStreamStyling(stylingContainer, domain, subscription, useAdoptedStyleSheets = false) {
53
+ if (!window.emMessageBus) return;
54
+
55
+ const supportAdoptStyle = 'adoptedStyleSheets' in Document.prototype;
56
+
57
+ if (!supportAdoptStyle || !useAdoptedStyleSheets) {
58
+ subscription = getStyleTagSubscription(stylingContainer, domain);
59
+
60
+ return subscription;
61
+ }
62
+
63
+ if (!window[StyleCacheKey]) {
64
+ window[StyleCacheKey] = {};
65
+ }
66
+ subscription = getAdoptStyleSubscription(stylingContainer, domain);
67
+
68
+ const originalUnsubscribe = subscription.unsubscribe.bind(subscription);
69
+ const wrappedUnsubscribe = () => {
70
+ if (window[StyleCacheKey][domain]) {
71
+ const cachedObject = window[StyleCacheKey][domain];
72
+ cachedObject.refCount > 1
73
+ ? (cachedObject.refCount = cachedObject.refCount - 1)
74
+ : delete window[StyleCacheKey][domain];
75
+ }
76
+
77
+ originalUnsubscribe();
78
+ };
79
+ subscription.unsubscribe = wrappedUnsubscribe;
80
+
81
+ return subscription;
82
+ }
83
+
84
+ function getStyleTagSubscription(stylingContainer, domain) {
85
+ const sheet = document.createElement('style');
86
+
87
+ return window.emMessageBus.subscribe(domain, (data) => {
88
+ if (stylingContainer) {
89
+ sheet.innerHTML = data;
90
+ stylingContainer.appendChild(sheet);
91
+ }
92
+ });
93
+ }
94
+
95
+ function getAdoptStyleSubscription(stylingContainer, domain) {
96
+ return window.emMessageBus.subscribe(domain, (data) => {
97
+ if (!stylingContainer) return;
98
+
99
+ const shadowRoot = stylingContainer.getRootNode();
100
+ const cacheStyleObject = window[StyleCacheKey];
101
+ let cachedStyle = cacheStyleObject[domain] && cacheStyleObject[domain].sheet;
102
+
103
+ if (!cachedStyle) {
104
+ cachedStyle = new CSSStyleSheet();
105
+ cachedStyle.replaceSync(data);
106
+ cacheStyleObject[domain] = {
107
+ sheet: cachedStyle,
108
+ refCount: 1
109
+ };
110
+ } else {
111
+ cacheStyleObject[domain].refCount = cacheStyleObject[domain].refCount + 1;
112
+ }
113
+
114
+ const currentSheets = shadowRoot.adoptedStyleSheets || [];
115
+ if (!currentSheets.includes(cachedStyle)) {
116
+ shadowRoot.adoptedStyleSheets = [...currentSheets, cachedStyle];
117
+ }
118
+ });
119
+ }
120
+
121
+ const giftboxSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMyIgdmlld0JveD0iMCAwIDIyIDIzIiBmaWxsPSJub25lIj4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuNDY0MjkgMi41QzcuMjE0NDIgMi41IDYuOTcxMDYgMi42MDA5IDYuNzg4NzggMi43ODY0OUM2LjYwNTkgMi45NzI3IDYuNTAwMDEgMy4yMjkwMyA2LjUwMDAxIDMuNUM2LjUwMDAxIDMuNzcwOTcgNi42MDU5IDQuMDI3MyA2Ljc4ODc4IDQuMjEzNTFDNi45NzEwNiA0LjM5OTEgNy4yMTQ0MiA0LjUgNy40NjQyOSA0LjVIOS42MzQyNUM5LjU2MTg3IDQuMzI4NjUgOS40Nzg1NyA0LjE1MTE2IDkuMzgzNTYgMy45NzUyN0M4Ljg5NzY5IDMuMDc1ODEgOC4yNzM5OCAyLjUgNy40NjQyOSAyLjVaTTEwIDYuNVY5LjVMMi42MDAwMSA5LjVDMi4zMDM0OCA5LjUgMi4xNDEyMiA5LjQ5OTIyIDIuMDI0NjQgOS40ODk3QzIuMDIgOS40ODkzMiAyLjAxNTYgOS40ODg5MyAyLjAxMTQ1IDkuNDg4NTVDMi4wMTEwNyA5LjQ4NDQgMi4wMTA2OSA5LjQ4MDAxIDIuMDEwMzEgOS40NzUzN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xNS41IDMuMjI5MDMgMTUuMzk0MSAyLjk3MjcgMTUuMjExMiAyLjc4NjQ5QzE1LjAyODkgMi42MDA5IDE0Ljc4NTYgMi41IDE0LjUzNTcgMi41QzEzLjcyNiAyLjUgMTMuMTAyMyAzLjA3NTgxIDEyLjYxNjUgMy45NzUyN0MxMi41MjE0IDQuMTUxMTYgMTIuNDM4MSA0LjMyODY1IDEyLjM2NTggNC41SDE0LjUzNTdaIiBmaWxsPSJ1cmwoI3BhaW50MF9saW5lYXJfMjA1MV80MzkpIi8+CiAgPGRlZnM+CiAgICA8bGluZWFyR3JhZGllbnQgaWQ9InBhaW50MF9saW5lYXJfMjA1MV80MzkiIHgxPSIwIiB5MT0iMTEuNSIgeDI9IjIyIiB5Mj0iMTEuNSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgICA8c3RvcCBzdG9wLWNvbG9yPSIjMUU2NTRGIi8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzFDOEQ1NiIvPgogICAgPC9saW5lYXJHcmFkaWVudD4KICA8L2RlZnM+Cjwvc3ZnPgo=';
122
+
123
+ const DEFAULT_LANGUAGE = 'en';
124
+ const TRANSLATIONS = {
125
+ en: {
126
+ congrats: 'Congratulations!',
127
+ continue: 'Continue',
128
+ errorBtnText: 'Ok',
129
+ errorTitle: 'Reward failed',
130
+ errorSubTitle: 'Sorry — we couldn’t grant the reward. Please try again.',
131
+ level: 'Level',
132
+ completed: 'has been completed!',
133
+ youWon: 'You have won',
134
+ physicalReward: 'for physical rewards please contact ',
135
+ linkText: 'Customer Support',
136
+ playNowOrLater: 'Play your free spins now or come back later.',
137
+ rewardInLobby: 'You can find your reward in the relevant section of the Lobby Widget.',
138
+ assistance: 'If you need any assistance, please contact',
139
+ useSpinsNow: 'Use spins now'
140
+ },
141
+ da: {
142
+ congrats: 'Tillykke!',
143
+ continue: 'Fortsæt',
144
+ errorBtnText: 'Ok',
145
+ errorTitle: 'Belønning fejlede',
146
+ errorSubTitle: 'Beklager — vi kunne ikke tildele belønning. Prøv venligst igen.',
147
+ level: 'Niveau',
148
+ completed: 'er blevet gennemført!',
149
+ youWon: 'Du har vundet',
150
+ physicalReward: 'Ved fysiske præmier, venligst kontakt ',
151
+ linkText: 'Kundeservice',
152
+ playNowOrLater: 'Brug dine freespins nu eller gem dem til senere.',
153
+ rewardInLobby: 'Du kan finde din belønning under ”Mine tilbud”',
154
+ assistance: 'Har du brug for hjælp? Kontakt venligst',
155
+ useSpinsNow: 'Brug dine spins nu'
156
+ }
157
+ };
158
+ const translate = (key, customLang) => {
159
+ const lang = customLang;
160
+ return TRANSLATIONS[lang !== undefined && lang in TRANSLATIONS ? lang : DEFAULT_LANGUAGE][key];
161
+ };
162
+ const getTranslations = (data) => {
163
+ Object.keys(data).forEach((item) => {
164
+ if (!TRANSLATIONS[item]) {
165
+ TRANSLATIONS[item] = {};
166
+ }
167
+ for (let key in data[item]) {
168
+ TRANSLATIONS[item][key] = data[item][key];
169
+ }
170
+ });
171
+ };
172
+ const resolveTranslationUrl = async (translationUrl) => {
173
+ if (translationUrl) {
174
+ try {
175
+ const response = await fetch(translationUrl);
176
+ if (!response.ok) {
177
+ throw new Error(`HTTP error! status: ${response.status}`);
178
+ }
179
+ const translations = await response.json();
180
+ getTranslations(translations);
181
+ }
182
+ catch (error) {
183
+ console.error('Failed to fetch or parse translations from URL:', error);
184
+ }
185
+ }
186
+ };
187
+
188
+ const isMobile = () => {
189
+ let userAgent = window.navigator.userAgent;
190
+ return !!(userAgent.toLowerCase().match(/android/i) ||
191
+ userAgent.toLowerCase().match(/blackberry|bb/i) ||
192
+ userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
193
+ userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
194
+ };
195
+
196
+ const casinoChallengesOverlayModalCss = ":host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0);justify-content:center;align-items:center;z-index:1}.ModalOverlay.Open{display:flex}.ModalContent{display:flex;flex-direction:column;align-items:center;position:relative;background:linear-gradient(90deg, var(--emw--color-background, #003e5c) 0.05%, var(--emw--color-background-secondary, #113b21) 87.69%);padding:60px;border-radius:26px;border:2px solid var(--emw--color-primary-variant, #1e654f);width:540px;max-width:90%;text-align:center;max-height:90dvh;min-height:100px;font-family:\"Roboto\", sans-serif}.InnerContainer{border-radius:20px;background:#f9f8f8;padding:40px 50px;width:100%;display:flex;flex-direction:column;align-items:center}.ImageWrapper{margin-bottom:10px}.ModalHeader{color:var(--emw--color-typography, #212529);text-align:center;font-family:var(--emw--button-typography, \"PF BeauSans Pro\", sans-serif);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-bold, 700);line-height:normal;text-transform:uppercase;letter-spacing:1px}.ModalSubtitle{color:var(--emw--color-gray-300, #212529);text-align:center;font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weigh-normal, 400);margin-top:10px;line-height:24px;width:316px}.ModalErrorMessage{color:var(--emw--color-typography, #212529);font-size:var(--emw--font-size-medium, 16px);line-height:24px;margin:10px 0}.ModalReward{background:linear-gradient(90deg, var(--emw--color-primary, #24aa4d) 0%, var(--emw--color-background-secondary, #113f21) 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-family:var(--emw--button-typography, \"PF BeauSans Pro\", sans-serif);font-size:var(--emw--font-size-medium, 16px);font-weight:var(--emw--font-weight-bold, 700)}.ModalAddition{color:var(--emw--color-gray-100, #727672);text-align:center;font-family:var(--emw--button-typography, \"Roboto\", sans-serif);font-size:var(--emw--font-size-medium, 16px);font-style:normal;font-weight:400;align-content:center;margin-top:10px;line-height:24px}.ModalAddition span{background:linear-gradient(90deg, var(--emw--color-primary, #24aa4d) 0%, var(--emw--color-background-secondary, #113f21) 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-style:normal;font-weight:700;line-height:15px;text-decoration:none;position:relative}.ModalAddition span::after{content:\"\";position:absolute;left:0;bottom:0;height:1px;width:100%;background:linear-gradient(90deg, var(--emw--color-primary, #24aa4d) 0%, var(--emw--color-background-secondary, #113f21) 100%)}.ModalAction{border-radius:var(--emw--button-border-radius, 99px);border:2px solid var(--emw--button-border-color, #083b17);background:linear-gradient(90deg, var(--emw--color-primary, #24aa4d) 0%, var(--emw--color-background-secondary, #113f21) 100%);padding:9px 20px;margin-top:24px;text-transform:uppercase;color:var(--emw--button-text-color, #fff);text-align:center;font-family:var(--emw--button-typography, \"PF BeauSans Pro\", sans-serif);font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);min-width:100px}.ModalSliderWrapper{margin-top:24px;position:relative;overflow:hidden;width:316px;justify-self:center}.ModalSlider{display:flex;transition:transform 0.3s ease;cursor:pointer;touch-action:pan-y}.ModalSlider:active{cursor:grabbing}.ModalSlide{min-width:100%;flex-shrink:0;position:relative;display:flex;justify-content:center}.ModalSlide .ModalSlideSpins{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:99px;width:188px;height:48px;text-transform:uppercase;font-size:var(--emw--font-size-small, 14px);font-weight:var(--emw--font-weight-bold, 700);color:var(--emw--color-white, white);align-content:center;background:var(--emw--use-spins-button-bg, linear-gradient(180deg, #ea9018 0%, #e0a84e 100%))}.ModalSlide .ModalSlideSpins svg{margin-left:8px}.ModalSlide .ModalSlideImageWrapper{position:relative;width:244px;height:144px;border-radius:12px;overflow:hidden}.ModalSlide .ModalSlideImageWrapper img{width:100%;height:100%;object-fit:cover;pointer-events:none;user-select:none;-webkit-user-drag:none}.ModalSlide .ModalSlideImageWrapper::after{content:\"\";position:absolute;inset:0;background:var(--emw--color-black-shadow, rgba(0, 0, 0, 0.5019607843))}.prev,.next{position:absolute;top:42%;transform:translateY(-50%);stroke:white;width:22px;height:22px;border-radius:50%;border:2px solid var(--emw--button-border-color, #083b17);background:var(--emw--slider-arrow-primary-bg, linear-gradient(90deg, #24aa4d 0%, #113f21 100%));display:flex;align-items:center;justify-content:center}.prev.disabled,.next.disabled{stroke:var(--emw--color-gray-100, #727672);background:var(--emw--ingame-color-black40, rgba(0, 0, 0, 0.4));border-color:var(--emw--color-gray-100, #727672)}.prev{left:2px}.next{right:2px}.ModalSliderDots{display:flex;justify-content:center;margin-top:10px}.ModalSliderDot{width:8px;height:8px;border-radius:50%;background:var(--emw--color-gray-50, #e2e2e2);margin:8px;cursor:pointer}.ModalSliderDot.active{background:var(--emw--border-success-color, #00b74f)}.Mobile .ModalContent{padding:26px}.Mobile .InnerContainer{padding:25px}.Mobile .ImageWrapper{margin-bottom:6px}.Mobile .ModalHeader{margin-bottom:16px}.Mobile .ModalAddition{margin-top:8px}.Mobile .ModalAction,.Mobile .ModalSliderWrapper{margin-top:20px}.Mobile .ModalSliderWrapper{width:230px;justify-self:center}.Mobile .ModalSliderWrapper .prev,.Mobile .ModalSliderWrapper .next{display:none}.Mobile .ModalSliderWrapper .ModalSlideImageWrapper{width:220px;height:125px}.Mobile .ModalSliderWrapper .ModalSlideSpins{width:154px;height:34px;font-size:var(--emw--font-size-x-small, 12px)}.Mobile .ModalSliderWrapper .ModalSliderDot{margin:8px 4px}.Mobile .ModalSubtitle{width:220px}";
197
+ const CasinoChallengesOverlayModalStyle0 = casinoChallengesOverlayModalCss;
198
+
199
+ const CasinoChallengesOverlayModal = class {
200
+ constructor(hostRef) {
201
+ registerInstance(this, hostRef);
202
+ this.startX = 0;
203
+ this.currentTranslate = 0;
204
+ this.prevTranslate = 0;
205
+ this.isDragging = false;
206
+ this.moved = false;
207
+ this.threshold = 50;
208
+ this.onPointerDown = (e) => {
209
+ var _a;
210
+ this.isDragging = true;
211
+ this.moved = false;
212
+ this.startX = e.clientX;
213
+ (_a = this.sliderContainer) === null || _a === void 0 ? void 0 : _a.setPointerCapture(e.pointerId);
214
+ };
215
+ this.onPointerMove = (e) => {
216
+ if (!this.isDragging)
217
+ return;
218
+ const diff = e.clientX - this.startX;
219
+ if (Math.abs(diff) > 5) {
220
+ this.moved = true;
221
+ }
222
+ this.currentTranslate = this.prevTranslate + diff;
223
+ this.setSliderPosition(this.currentTranslate);
224
+ };
225
+ this.onPointerUp = (e) => {
226
+ var _a;
227
+ if (!this.isDragging)
228
+ return;
229
+ this.isDragging = false;
230
+ (_a = this.sliderContainer) === null || _a === void 0 ? void 0 : _a.releasePointerCapture(e.pointerId);
231
+ const movedBy = this.currentTranslate - this.prevTranslate;
232
+ if (movedBy < -this.threshold)
233
+ this.next();
234
+ else if (movedBy > this.threshold)
235
+ this.prev();
236
+ else
237
+ this.setPositionByIndex();
238
+ };
239
+ this.next = () => {
240
+ if (!this.bonusProgramGames.length)
241
+ return;
242
+ if (this.currentIndex === this.bonusProgramGames.length - 1) {
243
+ this.setPositionByIndex();
244
+ return;
245
+ }
246
+ this.currentIndex = (this.currentIndex + 1) % this.bonusProgramGames.length;
247
+ this.setPositionByIndex();
248
+ };
249
+ this.prev = () => {
250
+ if (!this.bonusProgramGames.length)
251
+ return;
252
+ if (this.currentIndex === 0) {
253
+ this.setPositionByIndex();
254
+ return;
255
+ }
256
+ this.currentIndex = (this.currentIndex - 1 + this.bonusProgramGames.length) % this.bonusProgramGames.length;
257
+ this.setPositionByIndex();
258
+ };
259
+ this.onSlideClick = (gameSlug) => {
260
+ if (this.moved)
261
+ return;
262
+ if (gameSlug) {
263
+ window.postMessage({
264
+ type: 'ChallengeInGameRedirect',
265
+ data: { Slug: gameSlug }
266
+ }, window.location.href);
267
+ }
268
+ };
269
+ this.mbSource = undefined;
270
+ this.clientStyling = undefined;
271
+ this.clientStylingUrl = undefined;
272
+ this.translationUrl = '';
273
+ this.language = 'en';
274
+ this.isOpen = false;
275
+ this.reward = '';
276
+ this.addition = false;
277
+ this.handleClick = () => { };
278
+ this.errored = false;
279
+ this.orderNumber = 0;
280
+ this.isFreeSpinsGranted = false;
281
+ this.bonusProgramGames = [];
282
+ this.currentIndex = 0;
283
+ }
284
+ handleClientStylingChange(newValue, oldValue) {
285
+ if (newValue != oldValue) {
286
+ setClientStyling(this.stylingContainer, this.clientStyling);
287
+ }
288
+ }
289
+ handleClientStylingUrlChange(newValue, oldValue) {
290
+ if (newValue != oldValue) {
291
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
292
+ }
293
+ }
294
+ handleMbSourceChange(newValue, oldValue) {
295
+ if (newValue != oldValue) {
296
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
297
+ }
298
+ }
299
+ handleBonusProgramGameChange(newValue) {
300
+ if (this.currentIndex >= newValue.length) {
301
+ this.currentIndex = 0;
302
+ this.setPositionByIndex();
303
+ }
304
+ }
305
+ componentWillLoad() {
306
+ if (this.translationUrl) {
307
+ resolveTranslationUrl(this.translationUrl);
308
+ }
309
+ }
310
+ componentDidLoad() {
311
+ if (this.stylingContainer) {
312
+ if (this.mbSource)
313
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
314
+ if (this.clientStyling)
315
+ setClientStyling(this.stylingContainer, this.clientStyling);
316
+ if (this.clientStylingUrl)
317
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
318
+ }
319
+ this.setPositionByIndex();
320
+ }
321
+ disconnectedCallback() {
322
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
323
+ }
324
+ setSliderPosition(value) {
325
+ if (this.bonusProgramGames.length < 2)
326
+ return;
327
+ if (this.sliderContainer) {
328
+ this.sliderContainer.style.transform = `translateX(${value}px)`;
329
+ }
330
+ }
331
+ setPositionByIndex() {
332
+ var _a;
333
+ const width = ((_a = this.sliderContainer) === null || _a === void 0 ? void 0 : _a.clientWidth) || 0;
334
+ this.currentTranslate = -this.currentIndex * width;
335
+ this.prevTranslate = this.currentTranslate;
336
+ this.setSliderPosition(this.currentTranslate);
337
+ }
338
+ render() {
339
+ var _a;
340
+ return (h("div", { key: 'a069be23593a04f768fcca1b86094d3af8e58ca3', ref: (el) => (this.stylingContainer = el), class: {
341
+ ModalOverlay: true,
342
+ Mobile: isMobile() || window.innerWidth <= 768,
343
+ Open: this.isOpen
344
+ } }, h("div", { key: 'f41925c7697a9cd1c3da2f61c4e3a0673bd5728b', class: "ModalWinAnimation" }), h("div", { key: '9fac97b95cc682790d5e925fc40782ae71b9f54c', class: "ModalContent GradientBorder" }, h("div", { key: '14683c5830b0317dd11d064a6a88a69f4805d250', class: "InnerContainer" }, !this.errored && (h("div", { key: '2b7091ea3619423d41d98440d7800d95ec92a1bc', class: "ImageWrapper" }, h("img", { key: 'd23cfe79a0e7a2e138c0bb1e9894cc7534e5c173', src: giftboxSvg, alt: "gift-box-icon" }))), h("h1", { key: 'f95fbb76d703c28c45c568a0163df747dd269556', class: "ModalHeader" }, translate(this.errored ? 'errorTitle' : 'congrats', this.language)), this.errored ? (h("div", { class: "ModalErrorMessage" }, translate('errorSubTitle', this.language))) : (h("div", { class: "ModalSubtitle" }, `${translate('level', this.language)} ${this.orderNumber} ${translate('completed', this.language)}`, h("div", null, translate('youWon', this.language)), h("div", { class: "ModalReward" }, this.reward), this.isFreeSpinsGranted && (h("div", { class: "ModalAddition" }, translate('playNowOrLater', this.language))), h("div", { class: "ModalAddition" }, translate('rewardInLobby', this.language)))), this.addition && (h("div", { key: '201e5f0d4b3e04797c0478429dcd3c22dd30a4d3', class: "ModalAddition" }, h("div", { key: 'ef793ed69b572f4a9654f55cae0a71dd66af0ad6' }, translate('physicalReward', this.language)), h("span", { key: '131e4d36dc54d3682469a61c7196f0e379efe42f' }, translate('linkText', this.language)))), h("button", { key: 'bca6bc399277288d0ca2d9bd453eef6f6c9793e2', class: "ModalAction", onClick: this.handleClick }, this.errored ? translate('errorBtnText', this.language) : translate('continue', this.language)), this.isFreeSpinsGranted && ((_a = this.bonusProgramGames) === null || _a === void 0 ? void 0 : _a.length) > 0 && (h("div", { key: '13b921d1ff411987b9045950b1676e22b52481ab', class: "ModalSliderWrapper" }, h("div", { key: 'b48c9553aec2d709cede91d67b678aa545ed03a2', class: "ModalSlider", ref: (el) => (this.sliderContainer = el), onPointerDown: this.onPointerDown, onPointerMove: this.onPointerMove, onPointerUp: this.onPointerUp, onPointerLeave: this.onPointerUp }, this.bonusProgramGames.map((item) => (h("div", { class: "ModalSlide", key: item.GameSlug, onClick: () => this.onSlideClick(item.GameSlug) }, h("div", { class: "ModalSlideImageWrapper" }, h("img", { src: item.Thumbnail, alt: "" })), h("div", { class: "ModalSlideSpins" }, translate('useSpinsNow', this.language), h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "6", height: "10", viewBox: "0 0 6 10", fill: "none" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M0.195262 0.195262C0.455612 -0.0650874 0.877722 -0.0650874 1.13807 0.195262L5.13807 4.19526C5.39842 4.45561 5.39842 4.87772 5.13807 5.13807L1.13807 9.13807C0.877722 9.39842 0.455612 9.39842 0.195262 9.13807C-0.0650874 8.87772 -0.0650874 8.45561 0.195262 8.19526L3.72386 4.66667L0.195262 1.13807C-0.0650874 0.877722 -0.0650874 0.455612 0.195262 0.195262Z", fill: "white" }))))))), this.bonusProgramGames.length > 1 && (h("div", { key: '5878e9df2ba211fbe330d959c89278d611b0d501' }, h("button", { key: '25008b1e3500bdde9b1cf9285640ca342e8490a7', class: {
345
+ prev: true,
346
+ disabled: this.currentIndex === 0
347
+ }, onClick: this.prev }, h("svg", { key: '2433588c5615f8b788022f8859a98f9d16504e84', xmlns: "http://www.w3.org/2000/svg", width: "6", height: "10", viewBox: "0 0 6 10", fill: "none" }, h("path", { key: '14d34bf5a6538e458b7c18bb481f6a5b7c2f55bf', d: "M5 1L1 5L5 9", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("button", { key: '63be7d730151f3741802f415ec3c9e66508b78e7', class: {
348
+ next: true,
349
+ disabled: this.currentIndex === this.bonusProgramGames.length - 1
350
+ }, onClick: this.next }, h("svg", { key: '52f1005fe412de34c71060974688874e5bf45a47', xmlns: "http://www.w3.org/2000/svg", width: "6", height: "10", viewBox: "0 0 6 10", fill: "none" }, h("path", { key: '1af4edf8dc717f54d5735d34ec27de8313918e0d', d: "M1 1L5 5L1 9", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))), h("div", { key: '13201c67ba3cb6a1215fb41f5a6fe3ae60864bdd', class: "ModalSliderDots" }, this.bonusProgramGames.map((_, i) => (h("span", { class: {
351
+ ModalSliderDot: true,
352
+ active: i === this.currentIndex
353
+ }, onClick: () => {
354
+ this.currentIndex = i;
355
+ this.setPositionByIndex();
356
+ } }))))))))))));
357
+ }
358
+ static get watchers() { return {
359
+ "clientStyling": ["handleClientStylingChange"],
360
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
361
+ "mbSource": ["handleMbSourceChange"],
362
+ "bonusProgramGames": ["handleBonusProgramGameChange"]
363
+ }; }
364
+ };
365
+ CasinoChallengesOverlayModal.style = CasinoChallengesOverlayModalStyle0;
366
+
367
+ export { CasinoChallengesOverlayModal as C };
@@ -1,2 +1,2 @@
1
- export { C as casino_challenges_overlay_modal } from './casino-challenges-overlay-modal-f5be3740.js';
2
- import './index-f13cfc58.js';
1
+ export { C as casino_challenges_overlay_modal } from './casino-challenges-overlay-modal-a6da84b6.js';
2
+ import './index-603664b0.js';
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-f13cfc58.js';
2
- export { s as setNonce } from './index-f13cfc58.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-603664b0.js';
2
+ export { s as setNonce } from './index-603664b0.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["casino-challenges-overlay-modal",[[1,"casino-challenges-overlay-modal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"isOpen":[516,"is-open"],"reward":[513],"addition":[516],"handleClick":[16],"errored":[516],"orderNumber":[514,"order-number"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
19
+ return bootstrapLazy([["casino-challenges-overlay-modal",[[1,"casino-challenges-overlay-modal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"isOpen":[516,"is-open"],"reward":[513],"addition":[516],"handleClick":[16],"errored":[516],"orderNumber":[514,"order-number"],"isFreeSpinsGranted":[516,"is-free-spins-granted"],"bonusProgramGames":[16],"currentIndex":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"bonusProgramGames":["handleBonusProgramGameChange"]}]]]], options);
20
20
  });
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'casino-challenges-overlay-modal';
2
- const BUILD = /* casino-challenges-overlay-modal */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* casino-challenges-overlay-modal */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -131,6 +131,8 @@ var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
131
131
 
132
132
  // src/utils/constants.ts
133
133
  var EMPTY_OBJ = {};
134
+ var SVG_NS = "http://www.w3.org/2000/svg";
135
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
134
136
 
135
137
  // src/utils/helpers.ts
136
138
  var isDef = (v) => v != null;
@@ -465,9 +467,16 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
465
467
  if (newVNode2.$text$ !== null) {
466
468
  elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
467
469
  } else {
468
- elm = newVNode2.$elm$ = doc.createElement(
470
+ if (!isSvgMode) {
471
+ isSvgMode = newVNode2.$tag$ === "svg";
472
+ }
473
+ elm = newVNode2.$elm$ = doc.createElementNS(
474
+ isSvgMode ? SVG_NS : HTML_NS,
469
475
  !useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
470
- );
476
+ ) ;
477
+ if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
478
+ isSvgMode = false;
479
+ }
471
480
  {
472
481
  updateElement(null, newVNode2, isSvgMode);
473
482
  }
@@ -482,6 +491,13 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
482
491
  }
483
492
  }
484
493
  }
494
+ {
495
+ if (newVNode2.$tag$ === "svg") {
496
+ isSvgMode = false;
497
+ } else if (elm.tagName === "foreignObject") {
498
+ isSvgMode = true;
499
+ }
500
+ }
485
501
  }
486
502
  elm["s-hn"] = hostTagName;
487
503
  return elm;
@@ -611,8 +627,12 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
611
627
  const elm = newVNode2.$elm$ = oldVNode.$elm$;
612
628
  const oldChildren = oldVNode.$children$;
613
629
  const newChildren = newVNode2.$children$;
630
+ const tag = newVNode2.$tag$;
614
631
  const text = newVNode2.$text$;
615
632
  if (text === null) {
633
+ {
634
+ isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
635
+ }
616
636
  {
617
637
  {
618
638
  updateElement(oldVNode, newVNode2, isSvgMode);
@@ -628,6 +648,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
628
648
  } else if (oldChildren !== null) {
629
649
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
630
650
  }
651
+ if (isSvgMode && tag === "svg") {
652
+ isSvgMode = false;
653
+ }
631
654
  } else if (oldVNode.$text$ !== text) {
632
655
  elm.data = text;
633
656
  }
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { C as CasinoChallengesOverlayModal } from './casino-challenges-overlay-modal-f5be3740.js';
2
- import './index-f13cfc58.js';
1
+ export { C as CasinoChallengesOverlayModal } from './casino-challenges-overlay-modal-a6da84b6.js';
2
+ import './index-603664b0.js';
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-f13cfc58.js';
2
- export { s as setNonce } from './index-f13cfc58.js';
1
+ import { b as bootstrapLazy } from './index-603664b0.js';
2
+ export { s as setNonce } from './index-603664b0.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["casino-challenges-overlay-modal",[[1,"casino-challenges-overlay-modal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"isOpen":[516,"is-open"],"reward":[513],"addition":[516],"handleClick":[16],"errored":[516],"orderNumber":[514,"order-number"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
8
+ return bootstrapLazy([["casino-challenges-overlay-modal",[[1,"casino-challenges-overlay-modal",{"mbSource":[513,"mb-source"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"language":[513],"isOpen":[516,"is-open"],"reward":[513],"addition":[516],"handleClick":[16],"errored":[516],"orderNumber":[514,"order-number"],"isFreeSpinsGranted":[516,"is-free-spins-granted"],"bonusProgramGames":[16],"currentIndex":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"bonusProgramGames":["handleBonusProgramGameChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1,3 +1,4 @@
1
+ import { IBonusProgramGame } from '../../utils/types';
1
2
  export declare class CasinoChallengesOverlayModal {
2
3
  mbSource: string;
3
4
  clientStyling: string;
@@ -10,13 +11,32 @@ export declare class CasinoChallengesOverlayModal {
10
11
  handleClick: (event: MouseEvent) => void;
11
12
  errored: boolean;
12
13
  orderNumber: number;
14
+ isFreeSpinsGranted: boolean;
15
+ bonusProgramGames: IBonusProgramGame[];
16
+ currentIndex: number;
13
17
  private stylingContainer;
18
+ private sliderContainer?;
14
19
  private stylingSubscription;
20
+ private startX;
21
+ private currentTranslate;
22
+ private prevTranslate;
23
+ private isDragging;
24
+ private moved;
25
+ private readonly threshold;
15
26
  handleClientStylingChange(newValue: any, oldValue: any): void;
16
27
  handleClientStylingUrlChange(newValue: any, oldValue: any): void;
17
28
  handleMbSourceChange(newValue: any, oldValue: any): void;
29
+ handleBonusProgramGameChange(newValue: IBonusProgramGame[]): void;
18
30
  componentWillLoad(): void;
19
31
  componentDidLoad(): void;
20
32
  disconnectedCallback(): void;
33
+ private onPointerDown;
34
+ private onPointerMove;
35
+ private onPointerUp;
36
+ private next;
37
+ private prev;
38
+ private setSliderPosition;
39
+ private setPositionByIndex;
40
+ private onSlideClick;
21
41
  render(): any;
22
42
  }
@@ -5,13 +5,17 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ import { IBonusProgramGame } from "./utils/types";
9
+ export { IBonusProgramGame } from "./utils/types";
8
10
  export namespace Components {
9
11
  interface CasinoChallengesOverlayModal {
10
12
  "addition": boolean;
13
+ "bonusProgramGames": IBonusProgramGame[];
11
14
  "clientStyling": string;
12
15
  "clientStylingUrl": string;
13
16
  "errored": boolean;
14
17
  "handleClick": (event: MouseEvent) => void;
18
+ "isFreeSpinsGranted": boolean;
15
19
  "isOpen": boolean;
16
20
  "language": string;
17
21
  "mbSource": string;
@@ -34,10 +38,12 @@ declare global {
34
38
  declare namespace LocalJSX {
35
39
  interface CasinoChallengesOverlayModal {
36
40
  "addition"?: boolean;
41
+ "bonusProgramGames"?: IBonusProgramGame[];
37
42
  "clientStyling"?: string;
38
43
  "clientStylingUrl"?: string;
39
44
  "errored"?: boolean;
40
45
  "handleClick"?: (event: MouseEvent) => void;
46
+ "isFreeSpinsGranted"?: boolean;
41
47
  "isOpen"?: boolean;
42
48
  "language"?: string;
43
49
  "mbSource"?: string;
@@ -0,0 +1,4 @@
1
+ export interface IBonusProgramGame {
2
+ GameSlug: string;
3
+ Thumbnail: string;
4
+ }
@@ -1 +1 @@
1
- export declare function format(first: string, middle: string, last: string): string;
1
+ export declare const isMobile: () => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-challenges-overlay-modal",
3
- "version": "0.16.0",
3
+ "version": "0.16.2",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as M,h as e}from"./index-f13cfc58.js";const i="__WIDGET_GLOBAL_STYLE_CACHE__";function t(M,e){if(M){const i=document.createElement("style");i.innerHTML=e,M.appendChild(i)}}function D(M,e){if(!M||!e)return;const i=new URL(e);fetch(i.href).then((M=>M.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,M&&M.appendChild(i)})).catch((M=>{console.error("There was an error while trying to load client styling from URL",M)}))}function g(M,e,t,D=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!D)return t=function(M,e){const i=document.createElement("style");return window.emMessageBus.subscribe(e,(e=>{M&&(i.innerHTML=e,M.appendChild(i))}))}(M,e),t;window[i]||(window[i]={}),t=function(M,e){return window.emMessageBus.subscribe(e,(t=>{if(!M)return;const D=M.getRootNode(),g=window[i];let n=g[e]&&g[e].sheet;n?g[e].refCount=g[e].refCount+1:(n=new CSSStyleSheet,n.replaceSync(t),g[e]={sheet:n,refCount:1});const o=D.adoptedStyleSheets||[];o.includes(n)||(D.adoptedStyleSheets=[...o,n])}))}(M,e);const g=t.unsubscribe.bind(t);return t.unsubscribe=()=>{if(window[i][e]){const M=window[i][e];M.refCount>1?M.refCount=M.refCount-1:delete window[i][e]}g()},t}const n={en:{congrats:"Congratulations!",continue:"Continue",errorBtnText:"Ok",errorTitle:"Reward failed",errorSubTitle:"Sorry — we couldn’t grant the reward. Please try again.",level:"Level",completed:"has been completed!",youWon:"You have won",physicalReward:"for physical rewards please contact ",linkText:"Customer Support"},da:{congrats:"Tillykke!",continue:"Fortsæt",errorBtnText:"Ok",errorTitle:"Belønning fejlede",errorSubTitle:"Beklager — vi kunne ikke tildele belønning. Prøv venligst igen.",level:"Niveau",completed:"er blevet gennemført!",youWon:"Du har vundet",physicalReward:"Ved fysiske præmier, venligst kontakt ",linkText:"Kundeservice"}},o=(M,e)=>n[void 0!==e&&e in n?e:"en"][M],N=class{constructor(e){M(this,e),this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl="",this.language="en",this.isOpen=!1,this.reward="",this.addition=!1,this.handleClick=()=>{},this.errored=!1,this.orderNumber=0}handleClientStylingChange(M,e){M!=e&&t(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(M,e){M!=e&&D(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(M,e){M!=e&&g(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription)}componentWillLoad(){this.translationUrl&&(async M=>{if(M)try{const i=await fetch(M);if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);const t=await i.json();e=t,Object.keys(e).forEach((M=>{n[M]||(n[M]={});for(let i in e[M])n[M][i]=e[M][i]}))}catch(M){console.error("Failed to fetch or parse translations from URL:",M)}var e})(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&g(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription),this.clientStyling&&t(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&D(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return e("div",{key:"6c704266619b5ad109ec6289d65fd6a26f827951",ref:M=>this.stylingContainer=M,class:`ModalOverlay ${this.isOpen&&"Open"}`},e("div",{key:"65b800fd71f65afa246804ff35116bc0f2a6ff6b",class:"ModalWinAnimation"}),e("div",{key:"51df6e0c7d487762f0da0c874805c1e34a520fc2",class:"ModalContent GradientBorder"},e("div",{key:"ac9b44635eb8cb1fda4d1a4549c42c5e7055fc18",class:"InnerContainer"},!this.errored&&e("div",{key:"7b5e93f30b1cb40af1d8f621f13d1e18bb1a06b6",class:"ImageWrapper"},e("img",{key:"4e7867d129678e327ffc12d1da93b31bef4bc3b8",src:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMiIgaGVpZ2h0PSIyMyIgdmlld0JveD0iMCAwIDIyIDIzIiBmaWxsPSJub25lIj4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuN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vbG9yPSIjMUU2NTRGIi8+CiAgICAgIDxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzFDOEQ1NiIvPgogICAgPC9saW5lYXJHcmFkaWVudD4KICA8L2RlZnM+Cjwvc3ZnPgo=",alt:"gift-box-icon"})),e("h1",{key:"05782d9c5b5f905bd726dfbd8a32b51b7993e6c8",class:"ModalHeader"},o(this.errored?"errorTitle":"congrats",this.language)),this.errored?e("div",{class:"ModalErrorMessage"},o("errorSubTitle",this.language)):e("div",{class:"ModalSubtitle"},`${o("level",this.language)} ${this.orderNumber} ${o("completed",this.language)}`,e("div",null,o("youWon",this.language)),e("div",{class:"ModalReward"},this.reward)),this.addition&&e("div",{key:"62617e0e83f280c03a51f347d5b4fa487ce327c8",class:"ModalAddition"},e("div",{key:"c2aa358edd22cc8fd710fd0e68ae83641652d329"},o("physicalReward",this.language)),e("span",{key:"1d116c9906d98b828628a4404988fc33103e9fb2"},o("linkText",this.language))),e("button",{key:"432cad82cd0590ae5c2939a33ba7f52dd4ad31e4",class:"ModalAction",onClick:this.handleClick},o(this.errored?"errorBtnText":"continue",this.language)))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};N.style=':host{display:block;font-family:inherit}*{box-sizing:border-box;margin:0;padding:0}button{border:none;background:none;cursor:pointer;touch-action:manipulation}button:focus{outline:none}.ModalOverlay{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0);justify-content:center;align-items:center;z-index:1}.ModalOverlay.Open{display:flex}.ModalContent{display:flex;flex-direction:column;align-items:center;position:relative;background:linear-gradient(90deg, var(--emw--color-background, #003E5C) 0.05%, var(--emw--color-background-secondary, #113B21) 87.69%);padding:26px;border-radius:26px;border:2px solid var(--emw--color-primary-variant, #1E654F);width:450px;max-width:90%;text-align:center;max-height:90dvh;min-height:100px;font-family:"Roboto", sans-serif}.InnerContainer{border-radius:20px;background:#F9F8F8;padding:25px;width:100%}.ImageWrapper{margin-bottom:6px}.ModalHeader{color:var(--emw--color-typography, #212529);text-align:center;font-family:var(--emw--button-typography, "PF BeauSans Pro", sans-serif);font-size:16px;font-style:normal;font-weight:700;line-height:normal;text-transform:uppercase;letter-spacing:1px}.ModalSubtitle{color:var(--emw--color-gray-300, #212529);text-align:center;font-size:var(--emw--font-size-small, 14px);font-style:normal;font-weight:400;margin:16px 0 10px;line-height:22px}.ModalErrorMessage{color:var(--emw--color-typography, #212529);font-size:var(--emw--font-size-medium, 16px);line-height:24px;margin:10px 0 10px}.ModalReward{background:linear-gradient(90deg, var(--emw--color-primary, #24AA4D) 0%, var(--emw--color-background-secondary, #113F21) 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-family:var(--emw--button-typography, "PF BeauSans Pro", sans-serif);font-size:14px;font-style:normal;font-weight:700;margin-bottom:10px}.ModalAddition{color:var(--emw--color-gray-100, #727672);text-align:center;font-family:var(--emw--button-typography, "Roboto", sans-serif);font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:400;height:39px;align-content:center}.ModalAddition span{background:linear-gradient(90deg, var(--emw--color-primary, #24AA4D) 0%, var(--emw--color-background-secondary, #113F21) 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;font-size:12px;font-style:normal;font-weight:700;line-height:15px;text-decoration:none;margin-left:8px;position:relative}.ModalAddition span::after{content:"";position:absolute;left:0;bottom:0;height:1px;width:100%;background:linear-gradient(90deg, var(--emw--color-primary, #24AA4D) 0%, var(--emw--color-background-secondary, #113F21) 100%)}.ModalAction{border-radius:var(--emw--button-border-radius, 99px);border:2px solid var(--emw--button-border-color, #083B17);background:linear-gradient(90deg, var(--emw--color-primary, #24AA4D) 0%, var(--emw--color-background-secondary, #113F21) 100%);padding:9px 20px;margin-top:10px;text-transform:uppercase;color:var(--emw--button-text-color, #FFF);text-align:center;font-family:var(--emw--button-typography, "PF BeauSans Pro", sans-serif);font-size:12px;font-style:normal;font-weight:700;letter-spacing:1px;line-height:1}';export{N as C}