@everymatrix/player-lugas-limit 1.54.12 → 1.56.0

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.
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'player-lugas-limit';
24
- const BUILD = /* player-lugas-limit */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, 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, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* player-lugas-limit */ { 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, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
27
  Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
@@ -833,14 +833,14 @@ var postUpdateComponent = (hostRef) => {
833
833
  const endPostUpdate = createTime("postUpdate", tagName);
834
834
  const instance = hostRef.$lazyInstance$ ;
835
835
  const ancestorComponent = hostRef.$ancestorComponent$;
836
- {
837
- safeCall(instance, "componentDidRender", void 0, elm);
838
- }
839
836
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
840
837
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
841
838
  {
842
839
  addHydratedFlag(elm);
843
840
  }
841
+ {
842
+ safeCall(instance, "componentDidLoad", void 0, elm);
843
+ }
844
844
  endPostUpdate();
845
845
  {
846
846
  hostRef.$onReadyResolve$(elm);
@@ -1150,12 +1150,17 @@ var connectedCallback = (elm) => {
1150
1150
  }
1151
1151
  };
1152
1152
  var disconnectInstance = (instance, elm) => {
1153
+ {
1154
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1155
+ }
1153
1156
  };
1154
1157
  var disconnectedCallback = async (elm) => {
1155
1158
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1156
1159
  const hostRef = getHostRef(elm);
1157
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1158
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1160
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1161
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1162
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1163
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1159
1164
  }
1160
1165
  }
1161
1166
  if (rootAppliedStyles.has(elm)) {
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-e9623402.js');
5
+ const index = require('./index-6747a595.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["player-lugas-limit.cjs",[[1,"player-lugas-limit",{"userId":[1,"user-id"],"session":[1],"endpoint":[1],"currency":[1],"amount":[1],"lang":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"showCustomAmount":[32],"isLoading":[32],"hasErrors":[32],"inputValue":[32],"showInvalidInputError":[32],"stylingAppends":[32],"predefinedAmountsArray":[32],"isWithinRange":[32],"minimumRange":[32],"selectedPredefinedAmount":[32],"errorMessage":[32],"wasSubmitted":[32],"minAmount":[32],"maxAmount":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
11
+ return index.bootstrapLazy([["player-lugas-limit.cjs",[[1,"player-lugas-limit",{"userId":[1,"user-id"],"session":[1],"endpoint":[1],"currency":[1],"amount":[1],"lang":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"showCustomAmount":[32],"isLoading":[32],"hasErrors":[32],"inputValue":[32],"showInvalidInputError":[32],"predefinedAmountsArray":[32],"isWithinRange":[32],"minimumRange":[32],"selectedPredefinedAmount":[32],"errorMessage":[32],"wasSubmitted":[32],"minAmount":[32],"maxAmount":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-e9623402.js');
5
+ const index = require('./index-6747a595.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'de';
8
8
  let TRANSLATIONS = {
@@ -82,6 +82,63 @@ const translate = (key, customLang, values) => {
82
82
  return translation;
83
83
  };
84
84
 
85
+ /**
86
+ * @name setClientStyling
87
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
88
+ * @param {HTMLElement} stylingContainer The reference element of the widget
89
+ * @param {string} clientStyling The style content
90
+ */
91
+ function setClientStyling(stylingContainer, clientStyling) {
92
+ if (stylingContainer) {
93
+ const sheet = document.createElement('style');
94
+ sheet.innerHTML = clientStyling;
95
+ stylingContainer.appendChild(sheet);
96
+ }
97
+ }
98
+
99
+ /**
100
+ * @name setClientStylingURL
101
+ * @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
102
+ * @param {HTMLElement} stylingContainer The reference element of the widget
103
+ * @param {string} clientStylingUrl The URL of the style content
104
+ */
105
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
106
+ const url = new URL(clientStylingUrl);
107
+
108
+ fetch(url.href)
109
+ .then((res) => res.text())
110
+ .then((data) => {
111
+ const cssFile = document.createElement('style');
112
+ cssFile.innerHTML = data;
113
+ if (stylingContainer) {
114
+ stylingContainer.appendChild(cssFile);
115
+ }
116
+ })
117
+ .catch((err) => {
118
+ console.error('There was an error while trying to load client styling from URL', err);
119
+ });
120
+ }
121
+
122
+ /**
123
+ * @name setStreamLibrary
124
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
125
+ * @param {HTMLElement} stylingContainer The highest element of the widget
126
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
127
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
128
+ */
129
+ function setStreamStyling(stylingContainer, domain, subscription) {
130
+ if (window.emMessageBus) {
131
+ const sheet = document.createElement('style');
132
+
133
+ window.emMessageBus.subscribe(domain, (data) => {
134
+ sheet.innerHTML = data;
135
+ if (stylingContainer) {
136
+ stylingContainer.appendChild(sheet);
137
+ }
138
+ });
139
+ }
140
+ }
141
+
85
142
  const playerLugasLimitCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n font-family: \"Roboto\", sans-serif;\n}\n\n.ModalContainer {\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: var(--emw--font-size-small, 12px);\n container-type: inline-size;\n}\n.ModalContainer hr {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin: 10px 0px;\n}\n.ModalContainer p {\n margin: 0;\n}\n.ModalContainer button {\n width: 100%;\n border: 1px solid var(--emw--color-gray-100, #E8E9EB);\n padding: 10px 0;\n cursor: pointer;\n width: 100%;\n border-radius: var(--emw--border-radius-small, 4px);\n}\n.ModalContainer button.PrimaryButton {\n background: var(--emw--color-primary, #6BB816);\n border: none;\n font-weight: 500;\n}\n.ModalContainer button.PrimaryButton:not(:disabled) {\n color: var(--emw--color-white, #FFF);\n}\n.ModalContainer .Container {\n position: fixed;\n top: 30vh;\n width: 320px;\n background: var(--emw--color-white, #fff);\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n transform: scale(1.1);\n border-radius: 4px;\n overflow: hidden;\n}\n.ModalContainer .ValidatorContainer {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.ModalContainer .Paragraphs:not(:last-child) {\n margin-bottom: 20px;\n}\n.ModalContainer .ModalHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: var(--emw--color-gray-50, #F7F8FA);\n padding: 12px;\n}\n.ModalContainer .ModalHeader h2 {\n font-weight: bold;\n font-size: var(--emw--font-size-small, 12px);\n margin: 0;\n}\n.ModalContainer .ModalBody {\n background: var(--emw--color-white, #FFF);\n padding: 12px;\n container-type: inline-size;\n border-radius: 4px;\n}\n.ModalContainer .ModalBody .ErrorContainer {\n display: flex;\n align-items: center;\n color: var(--emw--color-red-100, #E10014);\n border-bottom: 1px solid var(--emw--color-gray-100, #E8E9EB);\n margin: -12px;\n padding: 12px;\n margin-bottom: 12px;\n font-weight: bold;\n position: relative;\n background: linear-gradient(180deg, var(--emw--color-gray-100, #E8E9EB) 0%, rgba(255, 255, 255, 0.47) 30%);\n}\n.ModalContainer .ModalBody .DismissError {\n position: absolute;\n right: 12px;\n cursor: pointer;\n}\n.ModalContainer .ModalBody .ErrorParagraph {\n display: flex;\n align-items: center;\n}\n.ModalContainer .ModalBody .ErrorIcon {\n background: linear-gradient(180deg, var(--emw--color-red-100, #E10014) 0%, var(--emw--color-red-150, #D60080) 100%);\n text-align: center;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n margin-right: 6px;\n}\n.ModalContainer .ModalBody .ErrorIcon svg {\n width: 6px;\n height: 6px;\n}\n.ModalContainer .ModalBody .ErrorIcon svg path {\n fill: var(--emw--color-white, #FFF);\n}\n.ModalContainer .ModalBody .ChooseLimitLabel {\n text-transform: uppercase;\n}\n.ModalContainer .ModalBody .LimitAmountWrapper {\n display: flex;\n flex-direction: column;\n gap: 10px;\n position: relative;\n}\n.ModalContainer .ModalBody .PredefinedAmounts {\n display: flex;\n justify-content: space-between;\n}\n.ModalContainer .ModalBody .PredefinedAmounts button {\n background: none;\n margin: -1px 0 0 -1px;\n color: var(--emw--color-gray-150, #808080);\n}\n.ModalContainer .ModalBody .PredefinedAmounts button.Active {\n font-weight: bold;\n background: var(--emw--color-gray-50, #F7F8FA);\n color: var(--emw--color-gray-200, #323233);\n}\n.ModalContainer .ModalBody .PredefinedAmounts button:first-child {\n border-radius: 4px 0 0 4px;\n}\n.ModalContainer .ModalBody .PredefinedAmounts button:last-child {\n border-radius: 0 4px 4px 0;\n}\n.ModalContainer .ModalBody .CustomAmountInput {\n width: 100%;\n padding: 10px;\n border: 1px solid var(--emw--color-gray-100, #E8E9EB);\n border-radius: 4px;\n box-sizing: border-box;\n margin-bottom: 6px;\n color: var(--emw--color-gray-200, #323233);\n font-weight: bold;\n}\n.ModalContainer .ModalBody .CustomAmountInput.InvalidInput {\n border: 1px solid var(--emw--color-red, #FF0000);\n}\n.ModalContainer .ModalBody .InvalidParagraph {\n font-size: var(--emw--font-size-small, 12px);\n color: var(--emw--color-red, #FF0000);\n}\n.ModalContainer .ModalBody .SetLimitBtn {\n margin-top: 10px;\n}\n.ModalContainer .ModalFooter {\n padding-top: 12px;\n margin: 5px 0px;\n}\n.ModalContainer .Link {\n color: inherit;\n text-decoration: underline;\n cursor: pointer;\n}\n.ModalContainer .PrivacyNote {\n font-size: var(--emw--font-size-x-small, 10px);\n font-style: italic;\n}\n.ModalContainer .ExistingLimit {\n margin-bottom: 15px;\n}\n\ninput {\n /* Firefox */\n -moz-appearance: textfield;\n /* Chrome, Safari, Edge, Opera */\n}\ninput::-webkit-outer-spin-button, input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n@container (max-width: 1300px) {\n .ModalContainer .Container {\n width: 50%;\n }\n}\n@container (max-width: 800px) {\n .ModalContainer .Container {\n width: 70%;\n }\n}\n.LoadingWrapper {\n width: 100%;\n height: 100%;\n background: rgba(255, 255, 255, 0.8);\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n width: 30px;\n height: 30px;\n}\n.spinner .path {\n stroke: var(--emw--color-primary, #6BB816);\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}";
86
143
  const PlayerLugasLimitStyle0 = playerLugasLimitCss;
87
144
 
@@ -114,8 +171,6 @@ const PlayerLugasLimit = class {
114
171
  this.inputValue = '';
115
172
  /** Show error flag */
116
173
  this.showInvalidInputError = false;
117
- /** Styling applied flag */
118
- this.stylingAppends = false;
119
174
  /** Array of predefined amounts */
120
175
  this.predefinedAmountsArray = [];
121
176
  /** Error message */
@@ -206,25 +261,16 @@ const PlayerLugasLimit = class {
206
261
  handleNewTranslations() {
207
262
  getTranslations(this.translationUrl);
208
263
  }
209
- /**
210
- * Watch for changes in the client styling and apply the new styling
211
- *
212
- * @param newValue - new client styling
213
- * @param oldValue - previous client styling
214
- */
215
- handleStylingChange(newValue, oldValue) {
216
- if (newValue !== oldValue)
217
- this.setClientStyling();
264
+ handleClientStylingChange(newValue, oldValue) {
265
+ if (newValue != oldValue) {
266
+ setClientStyling(this.stylingContainer, this.clientStyling);
267
+ }
218
268
  }
219
- /**
220
- * Watch for changes in the client styling URL and fetch the new CSS
221
- *
222
- * @param newValue - new client styling URL
223
- * @param oldValue - previous client styling URL
224
- */
225
- handleStylingUrlChange(newValue, oldValue) {
226
- if (newValue !== oldValue)
227
- this.setClientStylingURL();
269
+ handleClientStylingUrlChange(newValue, oldValue) {
270
+ if (newValue != oldValue) {
271
+ if (this.clientStylingUrl)
272
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
273
+ }
228
274
  }
229
275
  /**
230
276
  * Lifecycle method that fetches translations when the component is loaded.
@@ -235,18 +281,22 @@ const PlayerLugasLimit = class {
235
281
  }
236
282
  await this.getMonthlyDepositLimit();
237
283
  }
238
- /**
239
- * Lifecycle method that checks if the component has rendered and appends custom styling.
240
- */
241
- componentDidRender() {
242
- if (!this.stylingAppends && this.stylingContainer) {
243
- if (this.clientStyling)
244
- this.setClientStyling();
245
- if (this.clientStylingUrl)
246
- this.setClientStylingURL();
247
- this.stylingAppends = true;
284
+ componentDidLoad() {
285
+ if (this.stylingContainer) {
286
+ if (window.emMessageBus != undefined) {
287
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
288
+ }
289
+ else {
290
+ if (this.clientStyling)
291
+ setClientStyling(this.stylingContainer, this.clientStyling);
292
+ if (this.clientStylingUrl)
293
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
294
+ }
248
295
  }
249
296
  }
297
+ disconnectedCallback() {
298
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
299
+ }
250
300
  /**
251
301
  * Fetches the monthly deposit limit configuration from the API.
252
302
  *
@@ -373,8 +423,8 @@ const PlayerLugasLimit = class {
373
423
  }
374
424
  static get watchers() { return {
375
425
  "translationUrl": ["handleNewTranslations"],
376
- "clientStyling": ["handleStylingChange"],
377
- "clientStylingUrl": ["handleStylingUrlChange"]
426
+ "clientStyling": ["handleClientStylingChange"],
427
+ "clientStylingUrl": ["handleClientStylingUrlChange"]
378
428
  }; }
379
429
  };
380
430
  PlayerLugasLimit.style = PlayerLugasLimitStyle0;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-e9623402.js');
5
+ const index = require('./index-6747a595.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["player-lugas-limit.cjs",[[1,"player-lugas-limit",{"userId":[1,"user-id"],"session":[1],"endpoint":[1],"currency":[1],"amount":[1],"lang":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"showCustomAmount":[32],"isLoading":[32],"hasErrors":[32],"inputValue":[32],"showInvalidInputError":[32],"stylingAppends":[32],"predefinedAmountsArray":[32],"isWithinRange":[32],"minimumRange":[32],"selectedPredefinedAmount":[32],"errorMessage":[32],"wasSubmitted":[32],"minAmount":[32],"maxAmount":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
22
+ return index.bootstrapLazy([["player-lugas-limit.cjs",[[1,"player-lugas-limit",{"userId":[1,"user-id"],"session":[1],"endpoint":[1],"currency":[1],"amount":[1],"lang":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"showCustomAmount":[32],"isLoading":[32],"hasErrors":[32],"inputValue":[32],"showInvalidInputError":[32],"predefinedAmountsArray":[32],"isWithinRange":[32],"minimumRange":[32],"selectedPredefinedAmount":[32],"errorMessage":[32],"wasSubmitted":[32],"minAmount":[32],"maxAmount":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { getTranslations, translate } from "../../utils/locale.utils";
3
+ import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
3
4
  /**
4
5
  * PlayerLugasLimit Component
5
6
  * Handles UI and logic for setting deposit limits for a user in a specific flow.
@@ -32,8 +33,6 @@ export class PlayerLugasLimit {
32
33
  this.inputValue = '';
33
34
  /** Show error flag */
34
35
  this.showInvalidInputError = false;
35
- /** Styling applied flag */
36
- this.stylingAppends = false;
37
36
  /** Array of predefined amounts */
38
37
  this.predefinedAmountsArray = [];
39
38
  /** Error message */
@@ -124,25 +123,16 @@ export class PlayerLugasLimit {
124
123
  handleNewTranslations() {
125
124
  getTranslations(this.translationUrl);
126
125
  }
127
- /**
128
- * Watch for changes in the client styling and apply the new styling
129
- *
130
- * @param newValue - new client styling
131
- * @param oldValue - previous client styling
132
- */
133
- handleStylingChange(newValue, oldValue) {
134
- if (newValue !== oldValue)
135
- this.setClientStyling();
126
+ handleClientStylingChange(newValue, oldValue) {
127
+ if (newValue != oldValue) {
128
+ setClientStyling(this.stylingContainer, this.clientStyling);
129
+ }
136
130
  }
137
- /**
138
- * Watch for changes in the client styling URL and fetch the new CSS
139
- *
140
- * @param newValue - new client styling URL
141
- * @param oldValue - previous client styling URL
142
- */
143
- handleStylingUrlChange(newValue, oldValue) {
144
- if (newValue !== oldValue)
145
- this.setClientStylingURL();
131
+ handleClientStylingUrlChange(newValue, oldValue) {
132
+ if (newValue != oldValue) {
133
+ if (this.clientStylingUrl)
134
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
135
+ }
146
136
  }
147
137
  /**
148
138
  * Lifecycle method that fetches translations when the component is loaded.
@@ -153,18 +143,22 @@ export class PlayerLugasLimit {
153
143
  }
154
144
  await this.getMonthlyDepositLimit();
155
145
  }
156
- /**
157
- * Lifecycle method that checks if the component has rendered and appends custom styling.
158
- */
159
- componentDidRender() {
160
- if (!this.stylingAppends && this.stylingContainer) {
161
- if (this.clientStyling)
162
- this.setClientStyling();
163
- if (this.clientStylingUrl)
164
- this.setClientStylingURL();
165
- this.stylingAppends = true;
146
+ componentDidLoad() {
147
+ if (this.stylingContainer) {
148
+ if (window.emMessageBus != undefined) {
149
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
150
+ }
151
+ else {
152
+ if (this.clientStyling)
153
+ setClientStyling(this.stylingContainer, this.clientStyling);
154
+ if (this.clientStylingUrl)
155
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
156
+ }
166
157
  }
167
158
  }
159
+ disconnectedCallback() {
160
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
161
+ }
168
162
  /**
169
163
  * Fetches the monthly deposit limit configuration from the API.
170
164
  *
@@ -462,6 +456,25 @@ export class PlayerLugasLimit {
462
456
  "reflect": false,
463
457
  "defaultValue": "''"
464
458
  },
459
+ "mbSource": {
460
+ "type": "string",
461
+ "mutable": false,
462
+ "complexType": {
463
+ "original": "string",
464
+ "resolved": "string",
465
+ "references": {}
466
+ },
467
+ "required": false,
468
+ "optional": false,
469
+ "docs": {
470
+ "tags": [],
471
+ "text": ""
472
+ },
473
+ "getter": false,
474
+ "setter": false,
475
+ "attribute": "mb-source",
476
+ "reflect": false
477
+ },
465
478
  "translationUrl": {
466
479
  "type": "string",
467
480
  "mutable": false,
@@ -491,7 +504,6 @@ export class PlayerLugasLimit {
491
504
  "hasErrors": {},
492
505
  "inputValue": {},
493
506
  "showInvalidInputError": {},
494
- "stylingAppends": {},
495
507
  "predefinedAmountsArray": {},
496
508
  "isWithinRange": {},
497
509
  "minimumRange": {},
@@ -508,10 +520,10 @@ export class PlayerLugasLimit {
508
520
  "methodName": "handleNewTranslations"
509
521
  }, {
510
522
  "propName": "clientStyling",
511
- "methodName": "handleStylingChange"
523
+ "methodName": "handleClientStylingChange"
512
524
  }, {
513
525
  "propName": "clientStylingUrl",
514
- "methodName": "handleStylingUrlChange"
526
+ "methodName": "handleClientStylingUrlChange"
515
527
  }];
516
528
  }
517
529
  }
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'player-lugas-limit';
2
- const BUILD = /* player-lugas-limit */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, 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, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* player-lugas-limit */ { 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, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, 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.26.0 | MIT Licensed | https://stenciljs.com
@@ -811,14 +811,14 @@ var postUpdateComponent = (hostRef) => {
811
811
  const endPostUpdate = createTime("postUpdate", tagName);
812
812
  const instance = hostRef.$lazyInstance$ ;
813
813
  const ancestorComponent = hostRef.$ancestorComponent$;
814
- {
815
- safeCall(instance, "componentDidRender", void 0, elm);
816
- }
817
814
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
818
815
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
819
816
  {
820
817
  addHydratedFlag(elm);
821
818
  }
819
+ {
820
+ safeCall(instance, "componentDidLoad", void 0, elm);
821
+ }
822
822
  endPostUpdate();
823
823
  {
824
824
  hostRef.$onReadyResolve$(elm);
@@ -1128,12 +1128,17 @@ var connectedCallback = (elm) => {
1128
1128
  }
1129
1129
  };
1130
1130
  var disconnectInstance = (instance, elm) => {
1131
+ {
1132
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1133
+ }
1131
1134
  };
1132
1135
  var disconnectedCallback = async (elm) => {
1133
1136
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1134
1137
  const hostRef = getHostRef(elm);
1135
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1136
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1138
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1139
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1140
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1141
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1137
1142
  }
1138
1143
  }
1139
1144
  if (rootAppliedStyles.has(elm)) {
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-8fc25b6d.js';
2
- export { s as setNonce } from './index-8fc25b6d.js';
1
+ import { b as bootstrapLazy } from './index-9686c665.js';
2
+ export { s as setNonce } from './index-9686c665.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([["player-lugas-limit",[[1,"player-lugas-limit",{"userId":[1,"user-id"],"session":[1],"endpoint":[1],"currency":[1],"amount":[1],"lang":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"showCustomAmount":[32],"isLoading":[32],"hasErrors":[32],"inputValue":[32],"showInvalidInputError":[32],"stylingAppends":[32],"predefinedAmountsArray":[32],"isWithinRange":[32],"minimumRange":[32],"selectedPredefinedAmount":[32],"errorMessage":[32],"wasSubmitted":[32],"minAmount":[32],"maxAmount":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
8
+ return bootstrapLazy([["player-lugas-limit",[[1,"player-lugas-limit",{"userId":[1,"user-id"],"session":[1],"endpoint":[1],"currency":[1],"amount":[1],"lang":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"showCustomAmount":[32],"isLoading":[32],"hasErrors":[32],"inputValue":[32],"showInvalidInputError":[32],"predefinedAmountsArray":[32],"isWithinRange":[32],"minimumRange":[32],"selectedPredefinedAmount":[32],"errorMessage":[32],"wasSubmitted":[32],"minAmount":[32],"maxAmount":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-8fc25b6d.js';
1
+ import { r as registerInstance, h } from './index-9686c665.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'de';
4
4
  let TRANSLATIONS = {
@@ -78,6 +78,63 @@ const translate = (key, customLang, values) => {
78
78
  return translation;
79
79
  };
80
80
 
81
+ /**
82
+ * @name setClientStyling
83
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
84
+ * @param {HTMLElement} stylingContainer The reference element of the widget
85
+ * @param {string} clientStyling The style content
86
+ */
87
+ function setClientStyling(stylingContainer, clientStyling) {
88
+ if (stylingContainer) {
89
+ const sheet = document.createElement('style');
90
+ sheet.innerHTML = clientStyling;
91
+ stylingContainer.appendChild(sheet);
92
+ }
93
+ }
94
+
95
+ /**
96
+ * @name setClientStylingURL
97
+ * @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
98
+ * @param {HTMLElement} stylingContainer The reference element of the widget
99
+ * @param {string} clientStylingUrl The URL of the style content
100
+ */
101
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
102
+ const url = new URL(clientStylingUrl);
103
+
104
+ fetch(url.href)
105
+ .then((res) => res.text())
106
+ .then((data) => {
107
+ const cssFile = document.createElement('style');
108
+ cssFile.innerHTML = data;
109
+ if (stylingContainer) {
110
+ stylingContainer.appendChild(cssFile);
111
+ }
112
+ })
113
+ .catch((err) => {
114
+ console.error('There was an error while trying to load client styling from URL', err);
115
+ });
116
+ }
117
+
118
+ /**
119
+ * @name setStreamLibrary
120
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
121
+ * @param {HTMLElement} stylingContainer The highest element of the widget
122
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
123
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
124
+ */
125
+ function setStreamStyling(stylingContainer, domain, subscription) {
126
+ if (window.emMessageBus) {
127
+ const sheet = document.createElement('style');
128
+
129
+ window.emMessageBus.subscribe(domain, (data) => {
130
+ sheet.innerHTML = data;
131
+ if (stylingContainer) {
132
+ stylingContainer.appendChild(sheet);
133
+ }
134
+ });
135
+ }
136
+ }
137
+
81
138
  const playerLugasLimitCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap\");\n:host {\n font-family: \"Roboto\", sans-serif;\n}\n\n.ModalContainer {\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: var(--emw--font-size-small, 12px);\n container-type: inline-size;\n}\n.ModalContainer hr {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin: 10px 0px;\n}\n.ModalContainer p {\n margin: 0;\n}\n.ModalContainer button {\n width: 100%;\n border: 1px solid var(--emw--color-gray-100, #E8E9EB);\n padding: 10px 0;\n cursor: pointer;\n width: 100%;\n border-radius: var(--emw--border-radius-small, 4px);\n}\n.ModalContainer button.PrimaryButton {\n background: var(--emw--color-primary, #6BB816);\n border: none;\n font-weight: 500;\n}\n.ModalContainer button.PrimaryButton:not(:disabled) {\n color: var(--emw--color-white, #FFF);\n}\n.ModalContainer .Container {\n position: fixed;\n top: 30vh;\n width: 320px;\n background: var(--emw--color-white, #fff);\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n transform: scale(1.1);\n border-radius: 4px;\n overflow: hidden;\n}\n.ModalContainer .ValidatorContainer {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.ModalContainer .Paragraphs:not(:last-child) {\n margin-bottom: 20px;\n}\n.ModalContainer .ModalHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: var(--emw--color-gray-50, #F7F8FA);\n padding: 12px;\n}\n.ModalContainer .ModalHeader h2 {\n font-weight: bold;\n font-size: var(--emw--font-size-small, 12px);\n margin: 0;\n}\n.ModalContainer .ModalBody {\n background: var(--emw--color-white, #FFF);\n padding: 12px;\n container-type: inline-size;\n border-radius: 4px;\n}\n.ModalContainer .ModalBody .ErrorContainer {\n display: flex;\n align-items: center;\n color: var(--emw--color-red-100, #E10014);\n border-bottom: 1px solid var(--emw--color-gray-100, #E8E9EB);\n margin: -12px;\n padding: 12px;\n margin-bottom: 12px;\n font-weight: bold;\n position: relative;\n background: linear-gradient(180deg, var(--emw--color-gray-100, #E8E9EB) 0%, rgba(255, 255, 255, 0.47) 30%);\n}\n.ModalContainer .ModalBody .DismissError {\n position: absolute;\n right: 12px;\n cursor: pointer;\n}\n.ModalContainer .ModalBody .ErrorParagraph {\n display: flex;\n align-items: center;\n}\n.ModalContainer .ModalBody .ErrorIcon {\n background: linear-gradient(180deg, var(--emw--color-red-100, #E10014) 0%, var(--emw--color-red-150, #D60080) 100%);\n text-align: center;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n margin-right: 6px;\n}\n.ModalContainer .ModalBody .ErrorIcon svg {\n width: 6px;\n height: 6px;\n}\n.ModalContainer .ModalBody .ErrorIcon svg path {\n fill: var(--emw--color-white, #FFF);\n}\n.ModalContainer .ModalBody .ChooseLimitLabel {\n text-transform: uppercase;\n}\n.ModalContainer .ModalBody .LimitAmountWrapper {\n display: flex;\n flex-direction: column;\n gap: 10px;\n position: relative;\n}\n.ModalContainer .ModalBody .PredefinedAmounts {\n display: flex;\n justify-content: space-between;\n}\n.ModalContainer .ModalBody .PredefinedAmounts button {\n background: none;\n margin: -1px 0 0 -1px;\n color: var(--emw--color-gray-150, #808080);\n}\n.ModalContainer .ModalBody .PredefinedAmounts button.Active {\n font-weight: bold;\n background: var(--emw--color-gray-50, #F7F8FA);\n color: var(--emw--color-gray-200, #323233);\n}\n.ModalContainer .ModalBody .PredefinedAmounts button:first-child {\n border-radius: 4px 0 0 4px;\n}\n.ModalContainer .ModalBody .PredefinedAmounts button:last-child {\n border-radius: 0 4px 4px 0;\n}\n.ModalContainer .ModalBody .CustomAmountInput {\n width: 100%;\n padding: 10px;\n border: 1px solid var(--emw--color-gray-100, #E8E9EB);\n border-radius: 4px;\n box-sizing: border-box;\n margin-bottom: 6px;\n color: var(--emw--color-gray-200, #323233);\n font-weight: bold;\n}\n.ModalContainer .ModalBody .CustomAmountInput.InvalidInput {\n border: 1px solid var(--emw--color-red, #FF0000);\n}\n.ModalContainer .ModalBody .InvalidParagraph {\n font-size: var(--emw--font-size-small, 12px);\n color: var(--emw--color-red, #FF0000);\n}\n.ModalContainer .ModalBody .SetLimitBtn {\n margin-top: 10px;\n}\n.ModalContainer .ModalFooter {\n padding-top: 12px;\n margin: 5px 0px;\n}\n.ModalContainer .Link {\n color: inherit;\n text-decoration: underline;\n cursor: pointer;\n}\n.ModalContainer .PrivacyNote {\n font-size: var(--emw--font-size-x-small, 10px);\n font-style: italic;\n}\n.ModalContainer .ExistingLimit {\n margin-bottom: 15px;\n}\n\ninput {\n /* Firefox */\n -moz-appearance: textfield;\n /* Chrome, Safari, Edge, Opera */\n}\ninput::-webkit-outer-spin-button, input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n@container (max-width: 1300px) {\n .ModalContainer .Container {\n width: 50%;\n }\n}\n@container (max-width: 800px) {\n .ModalContainer .Container {\n width: 70%;\n }\n}\n.LoadingWrapper {\n width: 100%;\n height: 100%;\n background: rgba(255, 255, 255, 0.8);\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n width: 30px;\n height: 30px;\n}\n.spinner .path {\n stroke: var(--emw--color-primary, #6BB816);\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}";
82
139
  const PlayerLugasLimitStyle0 = playerLugasLimitCss;
83
140
 
@@ -110,8 +167,6 @@ const PlayerLugasLimit = class {
110
167
  this.inputValue = '';
111
168
  /** Show error flag */
112
169
  this.showInvalidInputError = false;
113
- /** Styling applied flag */
114
- this.stylingAppends = false;
115
170
  /** Array of predefined amounts */
116
171
  this.predefinedAmountsArray = [];
117
172
  /** Error message */
@@ -202,25 +257,16 @@ const PlayerLugasLimit = class {
202
257
  handleNewTranslations() {
203
258
  getTranslations(this.translationUrl);
204
259
  }
205
- /**
206
- * Watch for changes in the client styling and apply the new styling
207
- *
208
- * @param newValue - new client styling
209
- * @param oldValue - previous client styling
210
- */
211
- handleStylingChange(newValue, oldValue) {
212
- if (newValue !== oldValue)
213
- this.setClientStyling();
260
+ handleClientStylingChange(newValue, oldValue) {
261
+ if (newValue != oldValue) {
262
+ setClientStyling(this.stylingContainer, this.clientStyling);
263
+ }
214
264
  }
215
- /**
216
- * Watch for changes in the client styling URL and fetch the new CSS
217
- *
218
- * @param newValue - new client styling URL
219
- * @param oldValue - previous client styling URL
220
- */
221
- handleStylingUrlChange(newValue, oldValue) {
222
- if (newValue !== oldValue)
223
- this.setClientStylingURL();
265
+ handleClientStylingUrlChange(newValue, oldValue) {
266
+ if (newValue != oldValue) {
267
+ if (this.clientStylingUrl)
268
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
269
+ }
224
270
  }
225
271
  /**
226
272
  * Lifecycle method that fetches translations when the component is loaded.
@@ -231,18 +277,22 @@ const PlayerLugasLimit = class {
231
277
  }
232
278
  await this.getMonthlyDepositLimit();
233
279
  }
234
- /**
235
- * Lifecycle method that checks if the component has rendered and appends custom styling.
236
- */
237
- componentDidRender() {
238
- if (!this.stylingAppends && this.stylingContainer) {
239
- if (this.clientStyling)
240
- this.setClientStyling();
241
- if (this.clientStylingUrl)
242
- this.setClientStylingURL();
243
- this.stylingAppends = true;
280
+ componentDidLoad() {
281
+ if (this.stylingContainer) {
282
+ if (window.emMessageBus != undefined) {
283
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
284
+ }
285
+ else {
286
+ if (this.clientStyling)
287
+ setClientStyling(this.stylingContainer, this.clientStyling);
288
+ if (this.clientStylingUrl)
289
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
290
+ }
244
291
  }
245
292
  }
293
+ disconnectedCallback() {
294
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
295
+ }
246
296
  /**
247
297
  * Fetches the monthly deposit limit configuration from the API.
248
298
  *
@@ -369,8 +419,8 @@ const PlayerLugasLimit = class {
369
419
  }
370
420
  static get watchers() { return {
371
421
  "translationUrl": ["handleNewTranslations"],
372
- "clientStyling": ["handleStylingChange"],
373
- "clientStylingUrl": ["handleStylingUrlChange"]
422
+ "clientStyling": ["handleClientStylingChange"],
423
+ "clientStylingUrl": ["handleClientStylingUrlChange"]
374
424
  }; }
375
425
  };
376
426
  PlayerLugasLimit.style = PlayerLugasLimitStyle0;
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-8fc25b6d.js';
2
- export { s as setNonce } from './index-8fc25b6d.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-9686c665.js';
2
+ export { s as setNonce } from './index-9686c665.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([["player-lugas-limit",[[1,"player-lugas-limit",{"userId":[1,"user-id"],"session":[1],"endpoint":[1],"currency":[1],"amount":[1],"lang":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"translationUrl":[1,"translation-url"],"showCustomAmount":[32],"isLoading":[32],"hasErrors":[32],"inputValue":[32],"showInvalidInputError":[32],"stylingAppends":[32],"predefinedAmountsArray":[32],"isWithinRange":[32],"minimumRange":[32],"selectedPredefinedAmount":[32],"errorMessage":[32],"wasSubmitted":[32],"minAmount":[32],"maxAmount":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleStylingChange"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
19
+ return bootstrapLazy([["player-lugas-limit",[[1,"player-lugas-limit",{"userId":[1,"user-id"],"session":[1],"endpoint":[1],"currency":[1],"amount":[1],"lang":[1],"clientStyling":[1,"client-styling"],"clientStylingUrl":[1,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[1,"translation-url"],"showCustomAmount":[32],"isLoading":[32],"hasErrors":[32],"inputValue":[32],"showInvalidInputError":[32],"predefinedAmountsArray":[32],"isWithinRange":[32],"minimumRange":[32],"selectedPredefinedAmount":[32],"errorMessage":[32],"wasSubmitted":[32],"minAmount":[32],"maxAmount":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
20
20
  });
@@ -0,0 +1 @@
1
+ import{r as n,h as t}from"./p-f5d72420.js";let i={en:{LugasSetLimitDialogTitle:"Monthly Central Deposit Limit",LugasInfoBox:"The central limit is your monthly deposit limit for all licensed websites in Germany. Note that your limit and deposit details may vary if changed on other sites.",ChooseLimit:"Choose Limit",ButtonCustomValue:"Other",ButtonMax:"Max",LugasSetLimitDialogButtonSetLimit:"SET LIMIT {amount} {currency}",invalidInputMessageLimit:"The value entered must be between {minValue} {currency} and {maxValue} {currency}.",LugasSetLimitDialogPrivacyNote:{text:"The selected limit is connected to processing player's personal data due to our legal obligations. In some cases setting a limit is a consent to processing player's personal data. For details see our ",link:"Privacy Policy"},LugasSetLimitDialogExistingLimit:{text:"If you would like to use your existing limit ",link:"click here"},LugasNotSet:"No deposit limit set. Please enter a new limit.",loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data"},de:{LugasSetLimitDialogTitle:"Monatliches zentrales Einzahlungslimit",LugasInfoBox:"Das zentrale Limit ist Ihr monatliches Einzahlungslimit für alle lizenzierten Websites in Deutschland. Beachten Sie, dass sich Ihr Limit und der verbleibende Betrag ändern können, wenn Sie auf anderen Websites Einzahlungen vornehmen oder Ihr Limit anpassen.",ChooseLimit:"Limit wählen",ButtonCustomValue:"Eigener",ButtonMax:"Max",LugasSetLimitDialogButtonSetLimit:"LIMIT SETZEN {amount} {currency}",invalidInputMessageLimit:"Der eingegebene Wert muss zwischen {minValue} und {maxValue} {currency} liegen.",LugasSetLimitDialogPrivacyNote:{text:"Das gewählte Limit steht wegen unserer rechtlichen Verpflichtungen in Verbindung mit der Verarbeitung persönlicher Daten der Spieler. In manchen Fällen gilt das Setzen eines Limits als Einwilligung zur Verarbeitung persönlicher Daten des Spielers. Mehr Infos unter ",link:"Erklärung zum Datenschutz"},LugasSetLimitDialogExistingLimit:{text:"Wenn Sie Ihr bestehendes Limit nutzen möchten, ",link:"klicken Sie hier"},LugasNotSet:"Kein Einzahlungslimit festgelegt. Bitte geben Sie ein neues Limit ein.",loading:"Laden, bitte warten ...",error:"Beim Versuch, die Daten abzurufen, ist ein Fehler aufgetreten"}};const e=n=>new Promise((t=>{fetch(n).then((n=>n.json())).then((n=>{Object.keys(n).forEach((t=>{i[t]||(i[t]={});for(let e in n[t])i[t][e]=n[t][e]})),t(!0)}))})),o=(n,t,e)=>{let o=(a=i[t||"de"],n.split(".").reduce(((n,t)=>n&&void 0!==n[t]?n[t]:null),a));var a;if(null===o)return n;if(void 0!==e)for(const[n,t]of Object.entries(e.values)){const i=new RegExp(`{${n}}`,"g");o=o.replace(i,t)}return o};function a(n,t){if(n){const i=document.createElement("style");i.innerHTML=t,n.appendChild(i)}}function s(n,t){const i=new URL(t);fetch(i.href).then((n=>n.text())).then((t=>{const i=document.createElement("style");i.innerHTML=t,n&&n.appendChild(i)})).catch((n=>{console.error("There was an error while trying to load client styling from URL",n)}))}const r=class{constructor(t){n(this,t),this.userId="",this.session="",this.endpoint="",this.currency="EUR",this.amount="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.showCustomAmount=!1,this.isLoading=!1,this.hasErrors=!1,this.inputValue="",this.showInvalidInputError=!1,this.predefinedAmountsArray=[],this.errorMessage="",this.wasSubmitted=!1,this.setClientStyling=()=>{const n=document.createElement("style");n.innerHTML=this.clientStyling,this.stylingContainer.prepend(n)},this.setClientStylingURL=()=>{const n=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(n.href).then((n=>n.text())).then((n=>{t.innerHTML=n,setTimeout((()=>{this.stylingContainer.prepend(t)}),1)})).catch((n=>{console.log("error ",n)}))},this.postPlayerSituation=(n,t=!1,i=!1)=>{this.wasSubmitted=!0,this.errorMessage="";const e=new URL(`${this.endpoint}v2/player/${this.userId}/limit/lugas`),a={keepLimit:t,roleLimitAmount:i?this.amount:0};n&&(a.amount=`${n}`);const s={method:"POST",headers:{"X-SessionId":this.session,"X-Session-Type":"others","Content-Type":"application/json",Authorization:`Bearer ${this.session}`},body:JSON.stringify(a)};fetch(e.href,s).then((async n=>{if(!n.ok)throw await n.json();return n.json()})).catch((n=>{var t;console.log(n),3===n.errorCode&&"GmLegislation"===n.errorSourceName?(console.error(n.error,null===(t=n.thirdPartyResponse)||void 0===t?void 0:t.message),this.errorMessage=o("LugasNotSet",this.lang)):console.error("Unexpected Error:",n)})).finally((()=>{this.wasSubmitted=!1}))}}handleNewTranslations(){e(this.translationUrl)}handleClientStylingChange(n,t){n!=t&&a(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(n,t){n!=t&&this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){this.translationUrl.length>2&&await e(this.translationUrl),await this.getMonthlyDepositLimit()}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?function(n,t){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{i.innerHTML=t,n&&n.appendChild(i)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&a(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&s(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}async getMonthlyDepositLimit(){const n=new URL(`${this.endpoint}api/v1/gm/legislation/config/month-deposit-limit`);return this.isLoading=!0,new Promise((t=>{fetch(n.href).then((n=>{if(n.status>=300)throw new Error("There was an error while fetching the configuration");return n.json()})).then((n=>{this.predefinedAmountsArray=n.preDefinedOptions,this.minAmount=n.minAmount,this.maxAmount=n.maxAmount,t(!0)})).catch((n=>{this.hasErrors=!0,console.log(n)})).finally((()=>{this.isLoading=!1}))}))}handleSubmit(n){n.preventDefault(),this.showInvalidInputError=!this.isValidNumber||!this.isWithinRange||!this.minimumRange,this.showInvalidInputError||this.postPlayerSituation(this.inputValue,!1,!0)}containsOnlyDigits(n){return/^[0-9]+$/.test(n)}handleInputChange(n){const t=n.target.value;this.showInvalidInputError=!1,this.inputValue=t,this.isValidNumber=!isNaN(Number(t))&&this.containsOnlyDigits(t),this.minimumRange=Number(t)>=this.minAmount,this.isWithinRange=Number(t)<=this.maxAmount}handleAmountClick(n){switch(this.showCustomAmount=!1,this.amount=n,this.inputValue="",this.showInvalidInputError=!1,this.selectedPredefinedAmount=n,n){case"Other":this.showCustomAmount=!0,this.amount="";break;case"Max":this.showCustomAmount=!0,this.amount=this.maxAmount.toString(),this.inputValue=this.maxAmount.toString();break;default:this.postPlayerSituation(this.amount,!1,!0)}}goToPrivacyPolicy(){window.postMessage({type:"GoToPrivacyPolicy"})}renderValidator(){const n="EUR"===this.currency?"€":this.currency;return t("div",{class:"ValidatorContainer"},this.errorMessage&&t("div",{class:"ErrorContainer"},t("span",{class:"DismissError",onClick:()=>this.errorMessage=""},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",viewBox:"0 0 9 9",fill:"none"},t("path",{d:"M8.18659 0.14708C8.37063 0.33182 8.38174 0.62421 8.21888 0.821452L8.18659 0.857219L4.87619 4.16727L8.18659 7.47732C8.27743 7.56861 8.32973 7.69132 8.33266 7.82007C8.3356 7.94883 8.28895 8.0738 8.20235 8.16913C8.11576 8.26446 7.99584 8.32288 7.86739 8.3323C7.73895 8.34172 7.61179 8.30143 7.51221 8.21975L7.47645 8.18746L4.1664 4.87706L0.856348 8.18746C0.765058 8.27831 0.64235 8.3306 0.513592 8.33354C0.384834 8.33647 0.25987 8.28982 0.164536 8.20322C0.0692018 8.11663 0.0107856 7.99671 0.00136402 7.86827C-0.00805761 7.73982 0.0322357 7.61266 0.113914 7.51308L0.146209 7.47732L3.4566 4.16727L0.146209 0.857219C0.0553613 0.765928 0.00306475 0.64322 0.000130477 0.514462C-0.0028038 0.385704 0.0438486 0.260741 0.130443 0.165407C0.217038 0.0700723 0.336953 0.0116562 0.4654 0.00223455C0.593846 -0.00718708 0.721002 0.0331062 0.820581 0.114785L0.856348 0.14708L4.1664 3.45748L7.47645 0.14708C7.52307 0.10045 7.57843 0.0634608 7.63935 0.0382248C7.70027 0.0129888 7.76557 0 7.83152 0C7.89746 0 7.96276 0.0129888 8.02368 0.0382248C8.0846 0.0634608 8.13996 0.10045 8.18659 0.14708Z",fill:"#111111"}))),t("p",{class:"ErrorParagraph"},t("span",{class:"ErrorIcon"},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",viewBox:"0 0 9 9"},t("path",{d:"M8.18659 0.14708C8.37063 0.33182 8.38174 0.62421 8.21888 0.821452L8.18659 0.857219L4.87619 4.16727L8.18659 7.47732C8.27743 7.56861 8.32973 7.69132 8.33266 7.82007C8.3356 7.94883 8.28895 8.0738 8.20235 8.16913C8.11576 8.26446 7.99584 8.32288 7.86739 8.3323C7.73895 8.34172 7.61179 8.30143 7.51221 8.21975L7.47645 8.18746L4.1664 4.87706L0.856348 8.18746C0.765058 8.27831 0.64235 8.3306 0.513592 8.33354C0.384834 8.33647 0.25987 8.28982 0.164536 8.20322C0.0692018 8.11663 0.0107856 7.99671 0.00136402 7.86827C-0.00805761 7.73982 0.0322357 7.61266 0.113914 7.51308L0.146209 7.47732L3.4566 4.16727L0.146209 0.857219C0.0553613 0.765928 0.00306475 0.64322 0.000130477 0.514462C-0.0028038 0.385704 0.0438486 0.260741 0.130443 0.165407C0.217038 0.0700723 0.336953 0.0116562 0.4654 0.00223455C0.593846 -0.00718708 0.721002 0.0331062 0.820581 0.114785L0.856348 0.14708L4.1664 3.45748L7.47645 0.14708C7.52307 0.10045 7.57843 0.0634608 7.63935 0.0382248C7.70027 0.0129888 7.76557 0 7.83152 0C7.89746 0 7.96276 0.0129888 8.02368 0.0382248C8.0846 0.0634608 8.13996 0.10045 8.18659 0.14708Z"}))),this.errorMessage)),t("div",{class:"Paragraphs"},t("p",null,o("LugasInfoBox",this.lang))),t("div",{class:"LimitAmountWrapper"},this.wasSubmitted&&t("slot",{name:"spinner"})&&t("div",{class:"LoadingWrapper"},t("svg",{class:"spinner",viewBox:"0 0 50 50"},t("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"}))),t("p",{class:"ChooseLimitLabel"},o("ChooseLimit",this.lang)),t("div",{class:"PredefinedAmounts"},t("button",{class:"Other"===this.selectedPredefinedAmount?"Active":"",onClick:()=>this.handleAmountClick("Other")},o("ButtonCustomValue",this.lang)),(()=>this.predefinedAmountsArray.map((n=>t("button",{class:this.selectedPredefinedAmount===n?"Active":"",onClick:()=>this.handleAmountClick(n)},n))))(),t("button",{class:"Max"===this.selectedPredefinedAmount?"Active":"",onClick:()=>this.handleAmountClick("Max")},o("ButtonMax",this.lang))),this.showCustomAmount&&t("form",{onSubmit:n=>this.handleSubmit(n)},this.showCustomAmount&&t("div",null,t("input",{class:"CustomAmountInput "+(this.showInvalidInputError?"InvalidInput":""),type:"number",value:this.amount,onInput:n=>this.handleInputChange(n),placeholder:"0.00",disabled:"Max"===this.selectedPredefinedAmount}),this.showInvalidInputError&&t("p",{class:"InvalidParagraph"},o("invalidInputMessageLimit",this.lang,{values:{currency:n,minValue:this.minAmount,maxValue:this.maxAmount}}))),this.selectedPredefinedAmount&&t("button",{class:"PrimaryButton SetLimitBtn",type:"submit",disabled:this.wasSubmitted},o("LugasSetLimitDialogButtonSetLimit",this.lang,{values:{currency:n,amount:this.inputValue||"0.00"}})))),t("div",{class:"ModalFooter"},t("hr",null),t("div",{class:"Paragraphs"},t("p",{class:"ExistingLimit"},o("LugasSetLimitDialogExistingLimit.text",this.lang),t("span",{class:"Link",onClick:()=>this.postPlayerSituation(this.amount,!0)},o("LugasSetLimitDialogExistingLimit.link",this.lang))),t("p",{class:"PrivacyNote"},o("LugasSetLimitDialogPrivacyNote.text",this.lang),t("span",{class:"Link",onClick:this.goToPrivacyPolicy},o("LugasSetLimitDialogPrivacyNote.link",this.lang))))))}render(){if(this.isLoading)return t("div",null,t("p",null,o("loading",this.lang,{values:{currency:this.currency}})));if(this.hasErrors)return t("div",null,t("p",null,o("error",this.lang)));{const n=this.renderValidator();return t("div",{class:"ModalContainer",ref:n=>this.stylingContainer=n},t("div",{class:"Container"},t("div",{class:"ModalHeader"},t("h2",null,o("LugasSetLimitDialogTitle",this.lang))),t("div",{class:"ModalBody"},n)))}}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};r.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");\n:host {\n font-family: "Roboto", sans-serif;\n}\n\n.ModalContainer {\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: var(--emw--font-size-small, 12px);\n container-type: inline-size;\n}\n.ModalContainer hr {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin: 10px 0px;\n}\n.ModalContainer p {\n margin: 0;\n}\n.ModalContainer button {\n width: 100%;\n border: 1px solid var(--emw--color-gray-100, #E8E9EB);\n padding: 10px 0;\n cursor: pointer;\n width: 100%;\n border-radius: var(--emw--border-radius-small, 4px);\n}\n.ModalContainer button.PrimaryButton {\n background: var(--emw--color-primary, #6BB816);\n border: none;\n font-weight: 500;\n}\n.ModalContainer button.PrimaryButton:not(:disabled) {\n color: var(--emw--color-white, #FFF);\n}\n.ModalContainer .Container {\n position: fixed;\n top: 30vh;\n width: 320px;\n background: var(--emw--color-white, #fff);\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n transform: scale(1.1);\n border-radius: 4px;\n overflow: hidden;\n}\n.ModalContainer .ValidatorContainer {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.ModalContainer .Paragraphs:not(:last-child) {\n margin-bottom: 20px;\n}\n.ModalContainer .ModalHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: var(--emw--color-gray-50, #F7F8FA);\n padding: 12px;\n}\n.ModalContainer .ModalHeader h2 {\n font-weight: bold;\n font-size: var(--emw--font-size-small, 12px);\n margin: 0;\n}\n.ModalContainer .ModalBody {\n background: var(--emw--color-white, #FFF);\n padding: 12px;\n container-type: inline-size;\n border-radius: 4px;\n}\n.ModalContainer .ModalBody .ErrorContainer {\n display: flex;\n align-items: center;\n color: var(--emw--color-red-100, #E10014);\n border-bottom: 1px solid var(--emw--color-gray-100, #E8E9EB);\n margin: -12px;\n padding: 12px;\n margin-bottom: 12px;\n font-weight: bold;\n position: relative;\n background: linear-gradient(180deg, var(--emw--color-gray-100, #E8E9EB) 0%, rgba(255, 255, 255, 0.47) 30%);\n}\n.ModalContainer .ModalBody .DismissError {\n position: absolute;\n right: 12px;\n cursor: pointer;\n}\n.ModalContainer .ModalBody .ErrorParagraph {\n display: flex;\n align-items: center;\n}\n.ModalContainer .ModalBody .ErrorIcon {\n background: linear-gradient(180deg, var(--emw--color-red-100, #E10014) 0%, var(--emw--color-red-150, #D60080) 100%);\n text-align: center;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n margin-right: 6px;\n}\n.ModalContainer .ModalBody .ErrorIcon svg {\n width: 6px;\n height: 6px;\n}\n.ModalContainer .ModalBody .ErrorIcon svg path {\n fill: var(--emw--color-white, #FFF);\n}\n.ModalContainer .ModalBody .ChooseLimitLabel {\n text-transform: uppercase;\n}\n.ModalContainer .ModalBody .LimitAmountWrapper {\n display: flex;\n flex-direction: column;\n gap: 10px;\n position: relative;\n}\n.ModalContainer .ModalBody .PredefinedAmounts {\n display: flex;\n justify-content: space-between;\n}\n.ModalContainer .ModalBody .PredefinedAmounts button {\n background: none;\n margin: -1px 0 0 -1px;\n color: var(--emw--color-gray-150, #808080);\n}\n.ModalContainer .ModalBody .PredefinedAmounts button.Active {\n font-weight: bold;\n background: var(--emw--color-gray-50, #F7F8FA);\n color: var(--emw--color-gray-200, #323233);\n}\n.ModalContainer .ModalBody .PredefinedAmounts button:first-child {\n border-radius: 4px 0 0 4px;\n}\n.ModalContainer .ModalBody .PredefinedAmounts button:last-child {\n border-radius: 0 4px 4px 0;\n}\n.ModalContainer .ModalBody .CustomAmountInput {\n width: 100%;\n padding: 10px;\n border: 1px solid var(--emw--color-gray-100, #E8E9EB);\n border-radius: 4px;\n box-sizing: border-box;\n margin-bottom: 6px;\n color: var(--emw--color-gray-200, #323233);\n font-weight: bold;\n}\n.ModalContainer .ModalBody .CustomAmountInput.InvalidInput {\n border: 1px solid var(--emw--color-red, #FF0000);\n}\n.ModalContainer .ModalBody .InvalidParagraph {\n font-size: var(--emw--font-size-small, 12px);\n color: var(--emw--color-red, #FF0000);\n}\n.ModalContainer .ModalBody .SetLimitBtn {\n margin-top: 10px;\n}\n.ModalContainer .ModalFooter {\n padding-top: 12px;\n margin: 5px 0px;\n}\n.ModalContainer .Link {\n color: inherit;\n text-decoration: underline;\n cursor: pointer;\n}\n.ModalContainer .PrivacyNote {\n font-size: var(--emw--font-size-x-small, 10px);\n font-style: italic;\n}\n.ModalContainer .ExistingLimit {\n margin-bottom: 15px;\n}\n\ninput {\n /* Firefox */\n -moz-appearance: textfield;\n /* Chrome, Safari, Edge, Opera */\n}\ninput::-webkit-outer-spin-button, input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n@container (max-width: 1300px) {\n .ModalContainer .Container {\n width: 50%;\n }\n}\n@container (max-width: 800px) {\n .ModalContainer .Container {\n width: 70%;\n }\n}\n.LoadingWrapper {\n width: 100%;\n height: 100%;\n background: rgba(255, 255, 255, 0.8);\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n width: 30px;\n height: 30px;\n}\n.spinner .path {\n stroke: var(--emw--color-primary, #6BB816);\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}';export{r as player_lugas_limit}
@@ -1,2 +1,2 @@
1
- var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>{e.set(n.t=t,n)},l=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),p=!1,m=[],y=[],v=(t,e)=>n=>{t.push(n),p||(p=!0,e&&4&f.o?$(b):f.raf(b))},w=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},b=()=>{w(m),w(y),(p=m.length>0)&&f.raf(b)},$=t=>h().then(t),g=v(y,!0),S=t=>"object"==(t=typeof t)||"function"===t;function j(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>E,map:()=>k,ok:()=>O,unwrap:()=>M,unwrapErr:()=>x});var O=t=>({isOk:!0,isErr:!1,value:t}),E=t=>({isOk:!1,isErr:!0,value:t});function k(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>O(t))):O(n)}if(t.isErr)return E(t.value);throw"should never get here"}var C,M=t=>{if(t.isOk)return t.value;throw t.value},x=t=>{if(t.isErr)return t.value;throw t.value},P=(t,e,...n)=>{let o=null,l=!1,s=!1;const i=[],r=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?r(o):null!=o&&"boolean"!=typeof o&&((l="function"!=typeof t&&!S(o))&&(o+=""),l&&s?i[i.length-1].i+=o:i.push(l?R(null,o):o),s=l)};if(r(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const c=R(t,null);return c.u=e,i.length>0&&(c.h=i),c},R=(t,e)=>({o:0,p:t,i:e,m:null,h:null,u:null}),A={},N=(t,e)=>null==t||S(t)?t:1&e?t+"":t,T=new WeakMap,D=t=>"sc-"+t.v,H=(t,e,n,o,s,i)=>{if(n!==o){let r=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=U(n);let s=U(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("ref"===e)o&&o(t);else if(r||"o"!==e[0]||"n"!==e[1]){const l=S(o);if((r||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&i||s)&&!l&&t.setAttribute(e,o=!0===o?"":o)}else if(e="-"===e[2]?e.slice(3):l(u,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(W);e=e.replace(F,""),n&&f.rel(t,e,n,l),o&&f.ael(t,e,o,l)}}},L=/\s/,U=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(L):[]),W="Capture",F=RegExp(W+"$"),V=(t,e,n)=>{const o=11===e.m.nodeType&&e.m.host?e.m.host:e.m,l=t&&t.u||{},s=e.u||{};for(const t of q(Object.keys(l)))t in s||H(o,t,l[t],void 0,n,e.o);for(const t of q(Object.keys(s)))H(o,t,l[t],s[t],n,e.o)};function q(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var G=!1,_=!1,z=(t,e,n)=>{const o=e.h[n];let l,s,i=0;if(null!==o.i)l=o.m=a.createTextNode(o.i);else{if(_||(_="svg"===o.p),l=o.m=a.createElementNS(_?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.p),_&&"foreignObject"===o.p&&(_=!1),V(null,o,_),o.h)for(i=0;i<o.h.length;++i)s=z(t,o,i),s&&l.appendChild(s);"svg"===o.p?_=!1:"foreignObject"===l.tagName&&(_=!0)}return l["s-hn"]=C,l},B=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===C&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=z(null,n,l),i&&(o[l].m=i,X(r,i,e)))},I=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.m;Q(e),t&&t.remove()}}},J=(t,e,n=!1)=>t.p===e.p&&(n&&!t.$&&e.$&&(t.$=e.$),!0),K=(t,e,n=!1)=>{const o=e.m=t.m,l=t.h,s=e.h,i=e.p,r=e.i;null===r?(_="svg"===i||"foreignObject"!==i&&_,("slot"!==i||G)&&V(t,e,_),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i=0,r=0,c=e.length-1,u=e[0],a=e[c],f=o.length-1,h=o[0],d=o[f];for(;i<=c&&r<=f;)null==u?u=e[++i]:null==a?a=e[--c]:null==h?h=o[++r]:null==d?d=o[--f]:J(u,h,l)?(K(u,h,l),u=e[++i],h=o[++r]):J(a,d,l)?(K(a,d,l),a=e[--c],d=o[--f]):J(u,d,l)?(K(u,d,l),X(t,u.m,a.m.nextSibling),u=e[++i],d=o[--f]):J(a,h,l)?(K(a,h,l),X(t,a.m,u.m),a=e[--c],h=o[++r]):(s=z(e&&e[r],n,r),h=o[++r],s&&X(u.m.parentNode,s,u.m));i>c?B(t,null==o[f+1]?null:o[f+1].m,n,o,r,f):r>f&&I(e,i,c)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),B(o,null,e,s,0,s.length-1)):!n&&null!==l&&I(l,0,l.length-1),_&&"svg"===i&&(_=!1)):t.i!==r&&(o.data=r)},Q=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(Q)},X=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),Y=(t,e)=>{if(e&&!t.S&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.S=()=>{e["s-p"].splice(n-1,1),o()})))}},Z=(t,e)=>{if(t.o|=16,!(4&t.o))return Y(t,t.j),g((()=>tt(t,e)));t.o|=512},tt=(t,e)=>{const n=t.$hostElement$,o=t.t;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e&&(l=rt(o,"componentWillLoad",void 0,n)),et(l,(()=>ot(t,o,e)))},et=(t,e)=>nt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),nt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ot=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.O,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=D(e),l=r.get(o);if(t=11===t.nodeType?t:a,l)if("string"==typeof l){let s,i=T.get(t=t.head||t);if(i||T.set(t,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||a.createElement("style"),s.innerHTML=l;const i=null!=(n=f.k)?n:j(a);if(null!=i&&s.setAttribute("nonce",i),!(1&e.o))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(s)}else t.append(s);1&e.o&&t.insertBefore(s,null)}4&e.o&&(s.innerHTML+=c),i&&i.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);(10&o&&2&o||128&o)&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);lt(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>st(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},lt=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.O,s=t.C||R(null,null),i=(t=>t&&t.p===A)(e)?e:P(null,null,e);if(C=o.tagName,n&&i.u)for(const t of Object.keys(i.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.u[t]=o[t]);i.p=null,i.o|=4,t.C=i,i.m=s.m=o.shadowRoot||o,G=!(!(1&l.o)||128&l.o),K(s,i,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},st=t=>{const e=t.$hostElement$,n=t.j;rt(t.t,"componentDidRender",void 0,e),64&t.o||(t.o|=64,ct(e),t.M(e),n||it()),t.S&&(t.S(),t.S=void 0),512&t.o&&$((()=>Z(t,!1))),t.o&=-517},it=()=>{$((()=>(t=>{const e=f.ce("appload",{detail:{namespace:"player-lugas-limit"}});return t.dispatchEvent(e),e})(u)))},rt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},ct=t=>t.classList.add("hydrated"),ut=(t,e,o,l)=>{const i=n(t);if(!i)throw Error(`Couldn't find host element for "${l.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=i.$hostElement$,c=i.P.get(e),u=i.o,a=i.t;if(o=N(o,l.R[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.P.set(e,o),a)){if(l.A&&128&u){const t=l.A[e];t&&t.map((t=>{try{a[t](o,c,e)}catch(t){s(t,r)}}))}2==(18&u)&&Z(i,!1)}},at=(t,e,o)=>{var l,s;const i=t.prototype;if(e.R||e.A||t.watchers){t.watchers&&!e.A&&(e.A=t.watchers);const r=Object.entries(null!=(l=e.R)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.R[t][0]|=2048),r&&(e.R[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.R[t][0]))return((t,e)=>n(this).P.get(e))(0,t);const o=n(this),l=o?o.t:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=n(this);if(r){const n=32&l?this[t]:i.$hostElement$[t];return void 0===n&&i.P.get(t)?s=i.P.get(t):!i.P.get(t)&&n&&i.P.set(t,n),r.call(this,N(s,l)),void ut(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&o&&4096&e.R[t][0]))return ut(this,t,s,e),void(1&o&&!i.t&&i.N.then((()=>{4096&e.R[t][0]&&i.t[t]!==i.P.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.P.get(t)&&n&&i.P.set(t,n),i.t[t]=N(s,l),ut(this,t,i.t[t],e)};i.t?n():i.N.then((()=>n()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){f.jmp((()=>{var r;const c=o.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=e.A)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.A)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,e])=>{const n=e[1]||t;return o.set(n,t),n}))]))}}return t},ft=(t,o={})=>{var l;const h=[],p=o.exclude||[],m=u.customElements,y=a.head,v=y.querySelector("meta[charset]"),w=a.createElement("style"),b=[];let $,g=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((o=>{var l;const c={o:o[0],v:o[1],R:o[2],T:o[3]};4&c.o&&(S=!0),c.R=o[2],c.A=null!=(l=o[4])?l:{};const u=c.v,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,O:n,P:new Map};o.N=new Promise((t=>o.M=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,c),1&c.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),$&&(clearTimeout($),$=null),g?b.push(this):f.jmp((()=>(t=>{if(!(1&f.o)){const e=n(t),o=e.O,l=()=>{};if(1&e.o)(null==e?void 0:e.t)||(null==e?void 0:e.N)&&e.N.then((()=>{}));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){Y(e,e.j=n);break}}o.R&&Object.entries(o.R).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.D){const l=((t,e)=>{const n=t.v.replace(/-/g,"_"),o=t.D;if(!o)return;const l=i.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{s(t,e.$hostElement$)}))
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.v}#${e.H}" was not found`);o.isProxied||(n.A=o.watchers,at(o,n,2),o.isProxied=!0);const r=()=>{};e.o|=8;try{new o(e)}catch(e){s(e,t)}e.o&=-9,e.o|=128,r()}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=D(n);if(!r.has(e)){const o=()=>{};((t,e,n)=>{let o=r.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.j,c=()=>Z(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async t=>{if(!(1&f.o)){const e=n(t);(null==e?void 0:e.t)||(null==e?void 0:e.N)&&e.N.then((()=>{}))}T.has(t)&&T.delete(t),t.shadowRoot&&T.has(t.shadowRoot)&&T.delete(t.shadowRoot)})(this))),f.raf((()=>{var t;const e=n(this),o=b.findIndex((t=>t===this));o>-1&&b.splice(o,1),(null==(t=null==e?void 0:e.C)?void 0:t.m)instanceof Node&&!e.C.m.isConnected&&delete e.C.m}))}componentOnReady(){return n(this).N}};c.D=t[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,at(a,c,1)))}))})),h.length>0&&(S&&(w.textContent+=c),w.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const t=null!=(l=f.k)?l:j(a);null!=t&&w.setAttribute("nonce",t),y.insertBefore(w,v?v.nextSibling:y.firstChild)}g=!1,b.length?b.map((t=>t.connectedCallback())):f.jmp((()=>$=setTimeout(it,30)))},ht=t=>f.k=t;export{ft as b,P as h,h as p,o as r,ht as s}
1
+ var t=Object.defineProperty,e=new WeakMap,n=t=>e.get(t),o=(t,n)=>{e.set(n.t=t,n)},l=(t,e)=>e in t,s=(t,e)=>(0,console.error)(t,e),i=new Map,r=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={o:0,l:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,o)=>t.addEventListener(e,n,o),rel:(t,e,n,o)=>t.removeEventListener(e,n,o),ce:(t,e)=>new CustomEvent(t,e)},h=t=>Promise.resolve(t),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(t){}return!1})(),p=!1,m=[],y=[],v=(t,e)=>n=>{t.push(n),p||(p=!0,e&&4&f.o?$(b):f.raf(b))},w=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},b=()=>{w(m),w(y),(p=m.length>0)&&f.raf(b)},$=t=>h().then(t),g=v(y,!0),S=t=>"object"==(t=typeof t)||"function"===t;function j(t){var e,n,o;return null!=(o=null==(n=null==(e=t.head)?void 0:e.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?o:void 0}((e,n)=>{for(var o in n)t(e,o,{get:n[o],enumerable:!0})})({},{err:()=>k,map:()=>E,ok:()=>O,unwrap:()=>M,unwrapErr:()=>x});var O=t=>({isOk:!0,isErr:!1,value:t}),k=t=>({isOk:!1,isErr:!0,value:t});function E(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>O(t))):O(n)}if(t.isErr)return k(t.value);throw"should never get here"}var C,M=t=>{if(t.isOk)return t.value;throw t.value},x=t=>{if(t.isErr)return t.value;throw t.value},P=(t,e,...n)=>{let o=null,l=!1,s=!1;const i=[],r=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?r(o):null!=o&&"boolean"!=typeof o&&((l="function"!=typeof t&&!S(o))&&(o+=""),l&&s?i[i.length-1].i+=o:i.push(l?A(null,o):o),s=l)};if(r(n),e){const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}const c=A(t,null);return c.u=e,i.length>0&&(c.h=i),c},A=(t,e)=>({o:0,p:t,i:e,m:null,h:null,u:null}),L={},N=(t,e)=>null==t||S(t)?t:1&e?t+"":t,R=new WeakMap,T=t=>"sc-"+t.v,D=(t,e,n,o,s,i)=>{if(n!==o){let r=l(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,l=U(n);let s=U(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("ref"===e)o&&o(t);else if(r||"o"!==e[0]||"n"!==e[1]){const l=S(o);if((r||l&&null!==o)&&!s)try{if(t.tagName.includes("-"))t[e]!==o&&(t[e]=o);else{const l=null==o?"":o;"list"===e?r=!1:null!=n&&t[e]==l||("function"==typeof t.__lookupSetter__(e)?t[e]=l:t.setAttribute(e,l))}}catch(t){}null==o||!1===o?!1===o&&""!==t.getAttribute(e)||t.removeAttribute(e):(!r||4&i||s)&&!l&&t.setAttribute(e,o=!0===o?"":o)}else if(e="-"===e[2]?e.slice(3):l(u,c)?c.slice(2):c[2]+e.slice(3),n||o){const l=e.endsWith(W);e=e.replace(F,""),n&&f.rel(t,e,n,l),o&&f.ael(t,e,o,l)}}},H=/\s/,U=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(H):[]),W="Capture",F=RegExp(W+"$"),V=(t,e,n)=>{const o=11===e.m.nodeType&&e.m.host?e.m.host:e.m,l=t&&t.u||{},s=e.u||{};for(const t of q(Object.keys(l)))t in s||D(o,t,l[t],void 0,n,e.o);for(const t of q(Object.keys(s)))D(o,t,l[t],s[t],n,e.o)};function q(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var G=!1,_=!1,z=(t,e,n)=>{const o=e.h[n];let l,s,i=0;if(null!==o.i)l=o.m=a.createTextNode(o.i);else{if(_||(_="svg"===o.p),l=o.m=a.createElementNS(_?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.p),_&&"foreignObject"===o.p&&(_=!1),V(null,o,_),o.h)for(i=0;i<o.h.length;++i)s=z(t,o,i),s&&l.appendChild(s);"svg"===o.p?_=!1:"foreignObject"===l.tagName&&(_=!0)}return l["s-hn"]=C,l},B=(t,e,n,o,l,s)=>{let i,r=t;for(r.shadowRoot&&r.tagName===C&&(r=r.shadowRoot);l<=s;++l)o[l]&&(i=z(null,n,l),i&&(o[l].m=i,X(r,i,e)))},I=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.m;Q(e),t&&t.remove()}}},J=(t,e,n=!1)=>t.p===e.p&&(n&&!t.$&&e.$&&(t.$=e.$),!0),K=(t,e,n=!1)=>{const o=e.m=t.m,l=t.h,s=e.h,i=e.p,r=e.i;null===r?(_="svg"===i||"foreignObject"!==i&&_,("slot"!==i||G)&&V(t,e,_),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i=0,r=0,c=e.length-1,u=e[0],a=e[c],f=o.length-1,h=o[0],d=o[f];for(;i<=c&&r<=f;)null==u?u=e[++i]:null==a?a=e[--c]:null==h?h=o[++r]:null==d?d=o[--f]:J(u,h,l)?(K(u,h,l),u=e[++i],h=o[++r]):J(a,d,l)?(K(a,d,l),a=e[--c],d=o[--f]):J(u,d,l)?(K(u,d,l),X(t,u.m,a.m.nextSibling),u=e[++i],d=o[--f]):J(a,h,l)?(K(a,h,l),X(t,a.m,u.m),a=e[--c],h=o[++r]):(s=z(e&&e[r],n,r),h=o[++r],s&&X(u.m.parentNode,s,u.m));i>c?B(t,null==o[f+1]?null:o[f+1].m,n,o,r,f):r>f&&I(e,i,c)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),B(o,null,e,s,0,s.length-1)):!n&&null!==l&&I(l,0,l.length-1),_&&"svg"===i&&(_=!1)):t.i!==r&&(o.data=r)},Q=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(Q)},X=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),Y=(t,e)=>{if(e&&!t.S&&e["s-p"]){const n=e["s-p"].push(new Promise((o=>t.S=()=>{e["s-p"].splice(n-1,1),o()})))}},Z=(t,e)=>{if(t.o|=16,!(4&t.o))return Y(t,t.j),g((()=>tt(t,e)));t.o|=512},tt=(t,e)=>{const n=t.$hostElement$,o=t.t;if(!o)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return e&&(l=rt(o,"componentWillLoad",void 0,n)),et(l,(()=>ot(t,o,e)))},et=(t,e)=>nt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),nt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,ot=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.O,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=T(e),l=r.get(o);if(t=11===t.nodeType?t:a,l)if("string"==typeof l){let s,i=R.get(t=t.head||t);if(i||R.set(t,i=new Set),!i.has(o)){{s=document.querySelector(`[sty-id="${o}"]`)||a.createElement("style"),s.innerHTML=l;const i=null!=(n=f.k)?n:j(a);if(null!=i&&s.setAttribute("nonce",i),!(1&e.o))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(s,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(d){const e=new CSSStyleSheet;e.replaceSync(l),t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=l+e.innerHTML:t.prepend(s)}else t.append(s);1&e.o&&t.insertBefore(s,null)}4&e.o&&(s.innerHTML+=c),i&&i.add(o)}}else t.adoptedStyleSheets.includes(l)||(t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]);return o})(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);(10&o&&2&o||128&o)&&(n["s-sc"]=l,n.classList.add(l+"-h"))})(t);lt(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>st(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},lt=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.O,s=t.C||A(null,null),i=(t=>t&&t.p===L)(e)?e:P(null,null,e);if(C=o.tagName,n&&i.u)for(const t of Object.keys(i.u))o.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(i.u[t]=o[t]);i.p=null,i.o|=4,t.C=i,i.m=s.m=o.shadowRoot||o,G=!(!(1&l.o)||128&l.o),K(s,i,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},st=t=>{const e=t.$hostElement$,n=t.t,o=t.j;64&t.o||(t.o|=64,ct(e),rt(n,"componentDidLoad",void 0,e),t.M(e),o||it()),t.S&&(t.S(),t.S=void 0),512&t.o&&$((()=>Z(t,!1))),t.o&=-517},it=()=>{$((()=>(t=>{const e=f.ce("appload",{detail:{namespace:"player-lugas-limit"}});return t.dispatchEvent(e),e})(u)))},rt=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},ct=t=>t.classList.add("hydrated"),ut=(t,e,o,l)=>{const i=n(t);if(!i)throw Error(`Couldn't find host element for "${l.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=i.$hostElement$,c=i.P.get(e),u=i.o,a=i.t;if(o=N(o,l.A[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.P.set(e,o),a)){if(l.L&&128&u){const t=l.L[e];t&&t.map((t=>{try{a[t](o,c,e)}catch(t){s(t,r)}}))}2==(18&u)&&Z(i,!1)}},at=(t,e,o)=>{var l,s;const i=t.prototype;if(e.A||e.L||t.watchers){t.watchers&&!e.L&&(e.L=t.watchers);const r=Object.entries(null!=(l=e.A)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.A[t][0]|=2048),r&&(e.A[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.A[t][0]))return((t,e)=>n(this).P.get(e))(0,t);const o=n(this),l=o?o.t:i;if(!l)return;return l[t]}},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=n(this);if(r){const n=32&l?this[t]:i.$hostElement$[t];return void 0===n&&i.P.get(t)?s=i.P.get(t):!i.P.get(t)&&n&&i.P.set(t,n),r.call(this,N(s,l)),void ut(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&o&&4096&e.A[t][0]))return ut(this,t,s,e),void(1&o&&!i.t&&i.N.then((()=>{4096&e.A[t][0]&&i.t[t]!==i.P.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.P.get(t)&&n&&i.P.set(t,n),i.t[t]=N(s,l),ut(this,t,i.t[t],e)};i.t?n():i.N.then((()=>n()))}}})}})),1&o){const o=new Map;i.attributeChangedCallback=function(t,l,s){f.jmp((()=>{var r;const c=o.get(t);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const o=n(this),i=null==o?void 0:o.o;if(i&&!(8&i)&&128&i&&s!==l){const n=o.t,i=null==(r=e.L)?void 0:r[t];null==i||i.forEach((e=>{null!=n[e]&&n[e].call(n,s,l,t)}))}return}}const u=Object.getOwnPropertyDescriptor(i,c);(s=(null!==s||"boolean"!=typeof this[c])&&s)===this[c]||u.get&&!u.set||(this[c]=s)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e.L)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,e])=>{const n=e[1]||t;return o.set(n,t),n}))]))}}return t},ft=(t,e)=>{rt(t,"disconnectedCallback",void 0,e||t)},ht=(t,o={})=>{var l;const h=[],p=o.exclude||[],m=u.customElements,y=a.head,v=y.querySelector("meta[charset]"),w=a.createElement("style"),b=[];let $,g=!0;Object.assign(f,o),f.l=new URL(o.resourcesUrl||"./",a.baseURI).href;let S=!1;if(t.map((t=>{t[1].map((o=>{var l;const c={o:o[0],v:o[1],A:o[2],R:o[3]};4&c.o&&(S=!0),c.A=o[2],c.L=null!=(l=o[4])?l:{};const u=c.v,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,O:n,P:new Map};o.N=new Promise((t=>o.M=t)),t["s-p"]=[],t["s-rc"]=[],e.set(t,o)})(t=this,c),1&c.o)if(t.shadowRoot){if("open"!==t.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),$&&(clearTimeout($),$=null),g?b.push(this):f.jmp((()=>(t=>{if(!(1&f.o)){const e=n(t),o=e.O,l=()=>{};if(1&e.o)(null==e?void 0:e.t)||(null==e?void 0:e.N)&&e.N.then((()=>{}));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){Y(e,e.j=n);break}}o.A&&Object.entries(o.A).map((([e,[n]])=>{if(31&n&&t.hasOwnProperty(e)){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let o;if(!(32&e.o)){if(e.o|=32,n.T){const l=((t,e)=>{const n=t.v.replace(/-/g,"_"),o=t.T;if(!o)return;const l=i.get(o);return l?l[n]:import(`./${o}.entry.js`).then((t=>(i.set(o,t),t[n])),(t=>{s(t,e.$hostElement$)}))
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n,e);if(l&&"then"in l){const t=()=>{};o=await l,t()}else o=l;if(!o)throw Error(`Constructor for "${n.v}#${e.D}" was not found`);o.isProxied||(n.L=o.watchers,at(o,n,2),o.isProxied=!0);const r=()=>{};e.o|=8;try{new o(e)}catch(e){s(e,t)}e.o&=-9,e.o|=128,r()}else o=t.constructor,customElements.whenDefined(t.localName).then((()=>e.o|=128));if(o&&o.style){let t;"string"==typeof o.style&&(t=o.style);const e=T(n);if(!r.has(e)){const o=()=>{};((t,e,n)=>{let o=r.get(t);d&&n?(o=o||new CSSStyleSheet,"string"==typeof o?o=e:o.replaceSync(e)):o=e,r.set(t,o)})(e,t,!!(1&n.o)),o()}}}const l=e.j,c=()=>Z(e,!0);l&&l["s-rc"]?l["s-rc"].push(c):c()})(t,e,o)}l()}})(this)))}disconnectedCallback(){f.jmp((()=>(async t=>{if(!(1&f.o)){const e=n(t);(null==e?void 0:e.t)?ft(e.t,t):(null==e?void 0:e.N)&&e.N.then((()=>ft(e.t,t)))}R.has(t)&&R.delete(t),t.shadowRoot&&R.has(t.shadowRoot)&&R.delete(t.shadowRoot)})(this))),f.raf((()=>{var t;const e=n(this),o=b.findIndex((t=>t===this));o>-1&&b.splice(o,1),(null==(t=null==e?void 0:e.C)?void 0:t.m)instanceof Node&&!e.C.m.isConnected&&delete e.C.m}))}componentOnReady(){return n(this).N}};c.T=t[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,at(a,c,1)))}))})),h.length>0&&(S&&(w.textContent+=c),w.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const t=null!=(l=f.k)?l:j(a);null!=t&&w.setAttribute("nonce",t),y.insertBefore(w,v?v.nextSibling:y.firstChild)}g=!1,b.length?b.map((t=>t.connectedCallback())):f.jmp((()=>$=setTimeout(it,30)))},dt=t=>f.k=t;export{ht as b,P as h,h as p,o as r,dt as s}
@@ -1 +1 @@
1
- import{p as n,b as t}from"./p-2088b5a6.js";export{s as setNonce}from"./p-2088b5a6.js";import{g as e}from"./p-e1255160.js";(()=>{const t=import.meta.url,e={};return""!==t&&(e.resourcesUrl=new URL(".",t).href),n(e)})().then((async n=>(await e(),t([["p-1911ce9a",[[1,"player-lugas-limit",{userId:[1,"user-id"],session:[1],endpoint:[1],currency:[1],amount:[1],lang:[1],clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],showCustomAmount:[32],isLoading:[32],hasErrors:[32],inputValue:[32],showInvalidInputError:[32],stylingAppends:[32],predefinedAmountsArray:[32],isWithinRange:[32],minimumRange:[32],selectedPredefinedAmount:[32],errorMessage:[32],wasSubmitted:[32],minAmount:[32],maxAmount:[32]},null,{translationUrl:["handleNewTranslations"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}]]]],n))));
1
+ import{p as n,b as t}from"./p-f5d72420.js";export{s as setNonce}from"./p-f5d72420.js";import{g as e}from"./p-e1255160.js";(()=>{const t=import.meta.url,e={};return""!==t&&(e.resourcesUrl=new URL(".",t).href),n(e)})().then((async n=>(await e(),t([["p-c0dcb029",[[1,"player-lugas-limit",{userId:[1,"user-id"],session:[1],endpoint:[1],currency:[1],amount:[1],lang:[1],clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],mbSource:[1,"mb-source"],translationUrl:[1,"translation-url"],showCustomAmount:[32],isLoading:[32],hasErrors:[32],inputValue:[32],showInvalidInputError:[32],predefinedAmountsArray:[32],isWithinRange:[32],minimumRange:[32],selectedPredefinedAmount:[32],errorMessage:[32],wasSubmitted:[32],minAmount:[32],maxAmount:[32]},null,{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}]]]],n))));
@@ -19,6 +19,7 @@ export declare class PlayerLugasLimit {
19
19
  clientStyling: string;
20
20
  /** URL for fetching client-specific styling */
21
21
  clientStylingUrl: string;
22
+ mbSource: string;
22
23
  /** URL for fetching translation strings */
23
24
  translationUrl: string;
24
25
  /** Show custom amount state */
@@ -31,8 +32,6 @@ export declare class PlayerLugasLimit {
31
32
  inputValue: string;
32
33
  /** Show error flag */
33
34
  private showInvalidInputError;
34
- /** Styling applied flag */
35
- private stylingAppends;
36
35
  /** Array of predefined amounts */
37
36
  private predefinedAmountsArray;
38
37
  /** Flag for checking if input is within range */
@@ -55,32 +54,19 @@ export declare class PlayerLugasLimit {
55
54
  hasValidDecimalSeparator: boolean;
56
55
  /** Container for applying dynamic styling */
57
56
  private stylingContainer;
57
+ private stylingSubscription;
58
58
  /**
59
59
  * Watch for changes in the translation URL and fetch new translations
60
60
  */
61
61
  handleNewTranslations(): void;
62
- /**
63
- * Watch for changes in the client styling and apply the new styling
64
- *
65
- * @param newValue - new client styling
66
- * @param oldValue - previous client styling
67
- */
68
- handleStylingChange(newValue: string, oldValue: string): void;
69
- /**
70
- * Watch for changes in the client styling URL and fetch the new CSS
71
- *
72
- * @param newValue - new client styling URL
73
- * @param oldValue - previous client styling URL
74
- */
75
- handleStylingUrlChange(newValue: string, oldValue: string): void;
62
+ handleClientStylingChange(newValue: any, oldValue: any): void;
63
+ handleClientStylingUrlChange(newValue: any, oldValue: any): void;
76
64
  /**
77
65
  * Lifecycle method that fetches translations when the component is loaded.
78
66
  */
79
67
  componentWillLoad(): Promise<void>;
80
- /**
81
- * Lifecycle method that checks if the component has rendered and appends custom styling.
82
- */
83
- componentDidRender(): void;
68
+ componentDidLoad(): void;
69
+ disconnectedCallback(): void;
84
70
  /**
85
71
  * Fetches the monthly deposit limit configuration from the API.
86
72
  *
@@ -35,6 +35,7 @@ export namespace Components {
35
35
  * Language for translations
36
36
  */
37
37
  "lang": string;
38
+ "mbSource": string;
38
39
  /**
39
40
  * Session ID for the user
40
41
  */
@@ -94,6 +95,7 @@ declare namespace LocalJSX {
94
95
  * Language for translations
95
96
  */
96
97
  "lang"?: string;
98
+ "mbSource"?: string;
97
99
  /**
98
100
  * Session ID for the user
99
101
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-lugas-limit",
3
- "version": "1.54.12",
3
+ "version": "1.56.0",
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 n,h as t}from"./p-2088b5a6.js";let i={en:{LugasSetLimitDialogTitle:"Monthly Central Deposit Limit",LugasInfoBox:"The central limit is your monthly deposit limit for all licensed websites in Germany. Note that your limit and deposit details may vary if changed on other sites.",ChooseLimit:"Choose Limit",ButtonCustomValue:"Other",ButtonMax:"Max",LugasSetLimitDialogButtonSetLimit:"SET LIMIT {amount} {currency}",invalidInputMessageLimit:"The value entered must be between {minValue} {currency} and {maxValue} {currency}.",LugasSetLimitDialogPrivacyNote:{text:"The selected limit is connected to processing player's personal data due to our legal obligations. In some cases setting a limit is a consent to processing player's personal data. For details see our ",link:"Privacy Policy"},LugasSetLimitDialogExistingLimit:{text:"If you would like to use your existing limit ",link:"click here"},LugasNotSet:"No deposit limit set. Please enter a new limit.",loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data"},de:{LugasSetLimitDialogTitle:"Monatliches zentrales Einzahlungslimit",LugasInfoBox:"Das zentrale Limit ist Ihr monatliches Einzahlungslimit für alle lizenzierten Websites in Deutschland. Beachten Sie, dass sich Ihr Limit und der verbleibende Betrag ändern können, wenn Sie auf anderen Websites Einzahlungen vornehmen oder Ihr Limit anpassen.",ChooseLimit:"Limit wählen",ButtonCustomValue:"Eigener",ButtonMax:"Max",LugasSetLimitDialogButtonSetLimit:"LIMIT SETZEN {amount} {currency}",invalidInputMessageLimit:"Der eingegebene Wert muss zwischen {minValue} und {maxValue} {currency} liegen.",LugasSetLimitDialogPrivacyNote:{text:"Das gewählte Limit steht wegen unserer rechtlichen Verpflichtungen in Verbindung mit der Verarbeitung persönlicher Daten der Spieler. In manchen Fällen gilt das Setzen eines Limits als Einwilligung zur Verarbeitung persönlicher Daten des Spielers. Mehr Infos unter ",link:"Erklärung zum Datenschutz"},LugasSetLimitDialogExistingLimit:{text:"Wenn Sie Ihr bestehendes Limit nutzen möchten, ",link:"klicken Sie hier"},LugasNotSet:"Kein Einzahlungslimit festgelegt. Bitte geben Sie ein neues Limit ein.",loading:"Laden, bitte warten ...",error:"Beim Versuch, die Daten abzurufen, ist ein Fehler aufgetreten"}};const e=n=>new Promise((t=>{fetch(n).then((n=>n.json())).then((n=>{Object.keys(n).forEach((t=>{i[t]||(i[t]={});for(let e in n[t])i[t][e]=n[t][e]})),t(!0)}))})),o=(n,t,e)=>{let o=(a=i[t||"de"],n.split(".").reduce(((n,t)=>n&&void 0!==n[t]?n[t]:null),a));var a;if(null===o)return n;if(void 0!==e)for(const[n,t]of Object.entries(e.values)){const i=new RegExp(`{${n}}`,"g");o=o.replace(i,t)}return o},a=class{constructor(t){n(this,t),this.userId="",this.session="",this.endpoint="",this.currency="EUR",this.amount="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.showCustomAmount=!1,this.isLoading=!1,this.hasErrors=!1,this.inputValue="",this.showInvalidInputError=!1,this.stylingAppends=!1,this.predefinedAmountsArray=[],this.errorMessage="",this.wasSubmitted=!1,this.setClientStyling=()=>{const n=document.createElement("style");n.innerHTML=this.clientStyling,this.stylingContainer.prepend(n)},this.setClientStylingURL=()=>{const n=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(n.href).then((n=>n.text())).then((n=>{t.innerHTML=n,setTimeout((()=>{this.stylingContainer.prepend(t)}),1)})).catch((n=>{console.log("error ",n)}))},this.postPlayerSituation=(n,t=!1,i=!1)=>{this.wasSubmitted=!0,this.errorMessage="";const e=new URL(`${this.endpoint}v2/player/${this.userId}/limit/lugas`),a={keepLimit:t,roleLimitAmount:i?this.amount:0};n&&(a.amount=`${n}`);const r={method:"POST",headers:{"X-SessionId":this.session,"X-Session-Type":"others","Content-Type":"application/json",Authorization:`Bearer ${this.session}`},body:JSON.stringify(a)};fetch(e.href,r).then((async n=>{if(!n.ok)throw await n.json();return n.json()})).catch((n=>{var t;console.log(n),3===n.errorCode&&"GmLegislation"===n.errorSourceName?(console.error(n.error,null===(t=n.thirdPartyResponse)||void 0===t?void 0:t.message),this.errorMessage=o("LugasNotSet",this.lang)):console.error("Unexpected Error:",n)})).finally((()=>{this.wasSubmitted=!1}))}}handleNewTranslations(){e(this.translationUrl)}handleStylingChange(n,t){n!==t&&this.setClientStyling()}handleStylingUrlChange(n,t){n!==t&&this.setClientStylingURL()}async componentWillLoad(){this.translationUrl.length>2&&await e(this.translationUrl),await this.getMonthlyDepositLimit()}componentDidRender(){!this.stylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async getMonthlyDepositLimit(){const n=new URL(`${this.endpoint}api/v1/gm/legislation/config/month-deposit-limit`);return this.isLoading=!0,new Promise((t=>{fetch(n.href).then((n=>{if(n.status>=300)throw new Error("There was an error while fetching the configuration");return n.json()})).then((n=>{this.predefinedAmountsArray=n.preDefinedOptions,this.minAmount=n.minAmount,this.maxAmount=n.maxAmount,t(!0)})).catch((n=>{this.hasErrors=!0,console.log(n)})).finally((()=>{this.isLoading=!1}))}))}handleSubmit(n){n.preventDefault(),this.showInvalidInputError=!this.isValidNumber||!this.isWithinRange||!this.minimumRange,this.showInvalidInputError||this.postPlayerSituation(this.inputValue,!1,!0)}containsOnlyDigits(n){return/^[0-9]+$/.test(n)}handleInputChange(n){const t=n.target.value;this.showInvalidInputError=!1,this.inputValue=t,this.isValidNumber=!isNaN(Number(t))&&this.containsOnlyDigits(t),this.minimumRange=Number(t)>=this.minAmount,this.isWithinRange=Number(t)<=this.maxAmount}handleAmountClick(n){switch(this.showCustomAmount=!1,this.amount=n,this.inputValue="",this.showInvalidInputError=!1,this.selectedPredefinedAmount=n,n){case"Other":this.showCustomAmount=!0,this.amount="";break;case"Max":this.showCustomAmount=!0,this.amount=this.maxAmount.toString(),this.inputValue=this.maxAmount.toString();break;default:this.postPlayerSituation(this.amount,!1,!0)}}goToPrivacyPolicy(){window.postMessage({type:"GoToPrivacyPolicy"})}renderValidator(){const n="EUR"===this.currency?"€":this.currency;return t("div",{class:"ValidatorContainer"},this.errorMessage&&t("div",{class:"ErrorContainer"},t("span",{class:"DismissError",onClick:()=>this.errorMessage=""},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",viewBox:"0 0 9 9",fill:"none"},t("path",{d:"M8.18659 0.14708C8.37063 0.33182 8.38174 0.62421 8.21888 0.821452L8.18659 0.857219L4.87619 4.16727L8.18659 7.47732C8.27743 7.56861 8.32973 7.69132 8.33266 7.82007C8.3356 7.94883 8.28895 8.0738 8.20235 8.16913C8.11576 8.26446 7.99584 8.32288 7.86739 8.3323C7.73895 8.34172 7.61179 8.30143 7.51221 8.21975L7.47645 8.18746L4.1664 4.87706L0.856348 8.18746C0.765058 8.27831 0.64235 8.3306 0.513592 8.33354C0.384834 8.33647 0.25987 8.28982 0.164536 8.20322C0.0692018 8.11663 0.0107856 7.99671 0.00136402 7.86827C-0.00805761 7.73982 0.0322357 7.61266 0.113914 7.51308L0.146209 7.47732L3.4566 4.16727L0.146209 0.857219C0.0553613 0.765928 0.00306475 0.64322 0.000130477 0.514462C-0.0028038 0.385704 0.0438486 0.260741 0.130443 0.165407C0.217038 0.0700723 0.336953 0.0116562 0.4654 0.00223455C0.593846 -0.00718708 0.721002 0.0331062 0.820581 0.114785L0.856348 0.14708L4.1664 3.45748L7.47645 0.14708C7.52307 0.10045 7.57843 0.0634608 7.63935 0.0382248C7.70027 0.0129888 7.76557 0 7.83152 0C7.89746 0 7.96276 0.0129888 8.02368 0.0382248C8.0846 0.0634608 8.13996 0.10045 8.18659 0.14708Z",fill:"#111111"}))),t("p",{class:"ErrorParagraph"},t("span",{class:"ErrorIcon"},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",viewBox:"0 0 9 9"},t("path",{d:"M8.18659 0.14708C8.37063 0.33182 8.38174 0.62421 8.21888 0.821452L8.18659 0.857219L4.87619 4.16727L8.18659 7.47732C8.27743 7.56861 8.32973 7.69132 8.33266 7.82007C8.3356 7.94883 8.28895 8.0738 8.20235 8.16913C8.11576 8.26446 7.99584 8.32288 7.86739 8.3323C7.73895 8.34172 7.61179 8.30143 7.51221 8.21975L7.47645 8.18746L4.1664 4.87706L0.856348 8.18746C0.765058 8.27831 0.64235 8.3306 0.513592 8.33354C0.384834 8.33647 0.25987 8.28982 0.164536 8.20322C0.0692018 8.11663 0.0107856 7.99671 0.00136402 7.86827C-0.00805761 7.73982 0.0322357 7.61266 0.113914 7.51308L0.146209 7.47732L3.4566 4.16727L0.146209 0.857219C0.0553613 0.765928 0.00306475 0.64322 0.000130477 0.514462C-0.0028038 0.385704 0.0438486 0.260741 0.130443 0.165407C0.217038 0.0700723 0.336953 0.0116562 0.4654 0.00223455C0.593846 -0.00718708 0.721002 0.0331062 0.820581 0.114785L0.856348 0.14708L4.1664 3.45748L7.47645 0.14708C7.52307 0.10045 7.57843 0.0634608 7.63935 0.0382248C7.70027 0.0129888 7.76557 0 7.83152 0C7.89746 0 7.96276 0.0129888 8.02368 0.0382248C8.0846 0.0634608 8.13996 0.10045 8.18659 0.14708Z"}))),this.errorMessage)),t("div",{class:"Paragraphs"},t("p",null,o("LugasInfoBox",this.lang))),t("div",{class:"LimitAmountWrapper"},this.wasSubmitted&&t("slot",{name:"spinner"})&&t("div",{class:"LoadingWrapper"},t("svg",{class:"spinner",viewBox:"0 0 50 50"},t("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"}))),t("p",{class:"ChooseLimitLabel"},o("ChooseLimit",this.lang)),t("div",{class:"PredefinedAmounts"},t("button",{class:"Other"===this.selectedPredefinedAmount?"Active":"",onClick:()=>this.handleAmountClick("Other")},o("ButtonCustomValue",this.lang)),(()=>this.predefinedAmountsArray.map((n=>t("button",{class:this.selectedPredefinedAmount===n?"Active":"",onClick:()=>this.handleAmountClick(n)},n))))(),t("button",{class:"Max"===this.selectedPredefinedAmount?"Active":"",onClick:()=>this.handleAmountClick("Max")},o("ButtonMax",this.lang))),this.showCustomAmount&&t("form",{onSubmit:n=>this.handleSubmit(n)},this.showCustomAmount&&t("div",null,t("input",{class:"CustomAmountInput "+(this.showInvalidInputError?"InvalidInput":""),type:"number",value:this.amount,onInput:n=>this.handleInputChange(n),placeholder:"0.00",disabled:"Max"===this.selectedPredefinedAmount}),this.showInvalidInputError&&t("p",{class:"InvalidParagraph"},o("invalidInputMessageLimit",this.lang,{values:{currency:n,minValue:this.minAmount,maxValue:this.maxAmount}}))),this.selectedPredefinedAmount&&t("button",{class:"PrimaryButton SetLimitBtn",type:"submit",disabled:this.wasSubmitted},o("LugasSetLimitDialogButtonSetLimit",this.lang,{values:{currency:n,amount:this.inputValue||"0.00"}})))),t("div",{class:"ModalFooter"},t("hr",null),t("div",{class:"Paragraphs"},t("p",{class:"ExistingLimit"},o("LugasSetLimitDialogExistingLimit.text",this.lang),t("span",{class:"Link",onClick:()=>this.postPlayerSituation(this.amount,!0)},o("LugasSetLimitDialogExistingLimit.link",this.lang))),t("p",{class:"PrivacyNote"},o("LugasSetLimitDialogPrivacyNote.text",this.lang),t("span",{class:"Link",onClick:this.goToPrivacyPolicy},o("LugasSetLimitDialogPrivacyNote.link",this.lang))))))}render(){if(this.isLoading)return t("div",null,t("p",null,o("loading",this.lang,{values:{currency:this.currency}})));if(this.hasErrors)return t("div",null,t("p",null,o("error",this.lang)));{const n=this.renderValidator();return t("div",{class:"ModalContainer",ref:n=>this.stylingContainer=n},t("div",{class:"Container"},t("div",{class:"ModalHeader"},t("h2",null,o("LugasSetLimitDialogTitle",this.lang))),t("div",{class:"ModalBody"},n)))}}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}}};a.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");\n:host {\n font-family: "Roboto", sans-serif;\n}\n\n.ModalContainer {\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: var(--emw--font-size-small, 12px);\n container-type: inline-size;\n}\n.ModalContainer hr {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin: 10px 0px;\n}\n.ModalContainer p {\n margin: 0;\n}\n.ModalContainer button {\n width: 100%;\n border: 1px solid var(--emw--color-gray-100, #E8E9EB);\n padding: 10px 0;\n cursor: pointer;\n width: 100%;\n border-radius: var(--emw--border-radius-small, 4px);\n}\n.ModalContainer button.PrimaryButton {\n background: var(--emw--color-primary, #6BB816);\n border: none;\n font-weight: 500;\n}\n.ModalContainer button.PrimaryButton:not(:disabled) {\n color: var(--emw--color-white, #FFF);\n}\n.ModalContainer .Container {\n position: fixed;\n top: 30vh;\n width: 320px;\n background: var(--emw--color-white, #fff);\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n transform: scale(1.1);\n border-radius: 4px;\n overflow: hidden;\n}\n.ModalContainer .ValidatorContainer {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n.ModalContainer .Paragraphs:not(:last-child) {\n margin-bottom: 20px;\n}\n.ModalContainer .ModalHeader {\n display: flex;\n justify-content: space-between;\n align-items: center;\n background-color: var(--emw--color-gray-50, #F7F8FA);\n padding: 12px;\n}\n.ModalContainer .ModalHeader h2 {\n font-weight: bold;\n font-size: var(--emw--font-size-small, 12px);\n margin: 0;\n}\n.ModalContainer .ModalBody {\n background: var(--emw--color-white, #FFF);\n padding: 12px;\n container-type: inline-size;\n border-radius: 4px;\n}\n.ModalContainer .ModalBody .ErrorContainer {\n display: flex;\n align-items: center;\n color: var(--emw--color-red-100, #E10014);\n border-bottom: 1px solid var(--emw--color-gray-100, #E8E9EB);\n margin: -12px;\n padding: 12px;\n margin-bottom: 12px;\n font-weight: bold;\n position: relative;\n background: linear-gradient(180deg, var(--emw--color-gray-100, #E8E9EB) 0%, rgba(255, 255, 255, 0.47) 30%);\n}\n.ModalContainer .ModalBody .DismissError {\n position: absolute;\n right: 12px;\n cursor: pointer;\n}\n.ModalContainer .ModalBody .ErrorParagraph {\n display: flex;\n align-items: center;\n}\n.ModalContainer .ModalBody .ErrorIcon {\n background: linear-gradient(180deg, var(--emw--color-red-100, #E10014) 0%, var(--emw--color-red-150, #D60080) 100%);\n text-align: center;\n width: 16px;\n height: 16px;\n border-radius: 50%;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n margin-right: 6px;\n}\n.ModalContainer .ModalBody .ErrorIcon svg {\n width: 6px;\n height: 6px;\n}\n.ModalContainer .ModalBody .ErrorIcon svg path {\n fill: var(--emw--color-white, #FFF);\n}\n.ModalContainer .ModalBody .ChooseLimitLabel {\n text-transform: uppercase;\n}\n.ModalContainer .ModalBody .LimitAmountWrapper {\n display: flex;\n flex-direction: column;\n gap: 10px;\n position: relative;\n}\n.ModalContainer .ModalBody .PredefinedAmounts {\n display: flex;\n justify-content: space-between;\n}\n.ModalContainer .ModalBody .PredefinedAmounts button {\n background: none;\n margin: -1px 0 0 -1px;\n color: var(--emw--color-gray-150, #808080);\n}\n.ModalContainer .ModalBody .PredefinedAmounts button.Active {\n font-weight: bold;\n background: var(--emw--color-gray-50, #F7F8FA);\n color: var(--emw--color-gray-200, #323233);\n}\n.ModalContainer .ModalBody .PredefinedAmounts button:first-child {\n border-radius: 4px 0 0 4px;\n}\n.ModalContainer .ModalBody .PredefinedAmounts button:last-child {\n border-radius: 0 4px 4px 0;\n}\n.ModalContainer .ModalBody .CustomAmountInput {\n width: 100%;\n padding: 10px;\n border: 1px solid var(--emw--color-gray-100, #E8E9EB);\n border-radius: 4px;\n box-sizing: border-box;\n margin-bottom: 6px;\n color: var(--emw--color-gray-200, #323233);\n font-weight: bold;\n}\n.ModalContainer .ModalBody .CustomAmountInput.InvalidInput {\n border: 1px solid var(--emw--color-red, #FF0000);\n}\n.ModalContainer .ModalBody .InvalidParagraph {\n font-size: var(--emw--font-size-small, 12px);\n color: var(--emw--color-red, #FF0000);\n}\n.ModalContainer .ModalBody .SetLimitBtn {\n margin-top: 10px;\n}\n.ModalContainer .ModalFooter {\n padding-top: 12px;\n margin: 5px 0px;\n}\n.ModalContainer .Link {\n color: inherit;\n text-decoration: underline;\n cursor: pointer;\n}\n.ModalContainer .PrivacyNote {\n font-size: var(--emw--font-size-x-small, 10px);\n font-style: italic;\n}\n.ModalContainer .ExistingLimit {\n margin-bottom: 15px;\n}\n\ninput {\n /* Firefox */\n -moz-appearance: textfield;\n /* Chrome, Safari, Edge, Opera */\n}\ninput::-webkit-outer-spin-button, input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n@container (max-width: 1300px) {\n .ModalContainer .Container {\n width: 50%;\n }\n}\n@container (max-width: 800px) {\n .ModalContainer .Container {\n width: 70%;\n }\n}\n.LoadingWrapper {\n width: 100%;\n height: 100%;\n background: rgba(255, 255, 255, 0.8);\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n width: 30px;\n height: 30px;\n}\n.spinner .path {\n stroke: var(--emw--color-primary, #6BB816);\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}';export{a as player_lugas_limit}