@everymatrix/user-action-controller 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 = 'user-action-controller';
24
- const BUILD = /* user-action-controller */ { 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: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, 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: true, propMutable: true, propNumber: false, propString: true, reflect: true, 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: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* user-action-controller */ { 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: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, 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: true, propMutable: true, propNumber: false, propString: true, reflect: true, 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: true, 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
@@ -916,14 +916,14 @@ var postUpdateComponent = (hostRef) => {
916
916
  const endPostUpdate = createTime("postUpdate", tagName);
917
917
  const instance = hostRef.$lazyInstance$ ;
918
918
  const ancestorComponent = hostRef.$ancestorComponent$;
919
- {
920
- safeCall(instance, "componentDidRender", void 0, elm);
921
- }
922
919
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
923
920
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
924
921
  {
925
922
  addHydratedFlag(elm);
926
923
  }
924
+ {
925
+ safeCall(instance, "componentDidLoad", void 0, elm);
926
+ }
927
927
  endPostUpdate();
928
928
  {
929
929
  hostRef.$onReadyResolve$(elm);
@@ -1238,6 +1238,9 @@ var connectedCallback = (elm) => {
1238
1238
  }
1239
1239
  };
1240
1240
  var disconnectInstance = (instance, elm) => {
1241
+ {
1242
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1243
+ }
1241
1244
  };
1242
1245
  var disconnectedCallback = async (elm) => {
1243
1246
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1248,8 +1251,10 @@ var disconnectedCallback = async (elm) => {
1248
1251
  hostRef.$rmListeners$ = void 0;
1249
1252
  }
1250
1253
  }
1251
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1252
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1254
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1255
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1256
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1257
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1253
1258
  }
1254
1259
  }
1255
1260
  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-eb2c9562.js');
5
+ const index = require('./index-acdc077f.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-user-consents_2.cjs",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"gmVersion":[1,"gm-version"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"queryFired":[32],"readyActionsCount":[32],"activeUserActions":[32],"userActionsValidated":[32],"receivedQueryResponses":[32],"limitStylingAppends":[32],"isLoading":[32],"mandatoryActionsChecked":[32],"mandatoryItems":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]],{"translationUrl":["handleNewTranslations"],"receivedQueryResponses":["handleQueryResponse"]}],[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
11
+ return index.bootstrapLazy([["player-user-consents_2.cjs",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"gmVersion":[1,"gm-version"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"queryFired":[32],"readyActionsCount":[32],"activeUserActions":[32],"userActionsValidated":[32],"receivedQueryResponses":[32],"isLoading":[32],"mandatoryActionsChecked":[32],"mandatoryItems":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]],{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"receivedQueryResponses":["handleQueryResponse"]}],[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"mbSource":[513,"mb-source"],"textContent":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], 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-eb2c9562.js');
5
+ const index = require('./index-acdc077f.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE$1 = 'en';
8
8
  const TRANSLATIONS$1 = {
@@ -130,6 +130,63 @@ const translate$1 = (key, customLang, values) => {
130
130
  return translation;
131
131
  };
132
132
 
133
+ /**
134
+ * @name setClientStyling
135
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
136
+ * @param {HTMLElement} stylingContainer The reference element of the widget
137
+ * @param {string} clientStyling The style content
138
+ */
139
+ function setClientStyling(stylingContainer, clientStyling) {
140
+ if (stylingContainer) {
141
+ const sheet = document.createElement('style');
142
+ sheet.innerHTML = clientStyling;
143
+ stylingContainer.appendChild(sheet);
144
+ }
145
+ }
146
+
147
+ /**
148
+ * @name setClientStylingURL
149
+ * @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
150
+ * @param {HTMLElement} stylingContainer The reference element of the widget
151
+ * @param {string} clientStylingUrl The URL of the style content
152
+ */
153
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
154
+ const url = new URL(clientStylingUrl);
155
+
156
+ fetch(url.href)
157
+ .then((res) => res.text())
158
+ .then((data) => {
159
+ const cssFile = document.createElement('style');
160
+ cssFile.innerHTML = data;
161
+ if (stylingContainer) {
162
+ stylingContainer.appendChild(cssFile);
163
+ }
164
+ })
165
+ .catch((err) => {
166
+ console.error('There was an error while trying to load client styling from URL', err);
167
+ });
168
+ }
169
+
170
+ /**
171
+ * @name setStreamLibrary
172
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
173
+ * @param {HTMLElement} stylingContainer The highest element of the widget
174
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
175
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
176
+ */
177
+ function setStreamStyling(stylingContainer, domain, subscription) {
178
+ if (window.emMessageBus) {
179
+ const sheet = document.createElement('style');
180
+
181
+ window.emMessageBus.subscribe(domain, (data) => {
182
+ sheet.innerHTML = data;
183
+ if (stylingContainer) {
184
+ stylingContainer.appendChild(sheet);
185
+ }
186
+ });
187
+ }
188
+ }
189
+
133
190
  const playerUserConsentsCss = ":host{display:block}.ConsentTitle{margin-bottom:0.2rem;font-weight:600}.UserConsent:hover{cursor:pointer}.UserConsent{display:flex;align-items:baseline}.MandatoryItem{color:#f00;font-size:1.2rem}.ConsentLink{text-decoration:underline;color:var(--emw--color-primary);font-weight:bold}";
134
191
  const PlayerUserConsentsStyle0 = playerUserConsentsCss;
135
192
 
@@ -173,38 +230,16 @@ const PlayerUserConsents = class {
173
230
  * Translation url
174
231
  */
175
232
  this.translationUrl = '';
176
- /**
177
- * the text content to be rendered by the component. Determined at runtime
178
- */
179
233
  this.textContent = '';
180
- this.limitStylingAppends = false;
181
234
  this.goToTermsAndConditions = () => window.postMessage({ type: 'GoToTermsAndConditions' });
182
235
  this.goToPrivacyPolicy = () => window.postMessage({ type: 'GoToPrivacyPolicy' });
183
- this.setClientStyling = () => {
184
- let sheet = document.createElement('style');
185
- sheet.innerHTML = this.clientStyling;
186
- this.stylingContainer.prepend(sheet);
187
- };
188
- this.setClientStylingURL = () => {
189
- let url = new URL(this.clientStylingUrl);
190
- let cssFile = document.createElement('style');
191
- fetch(url.href)
192
- .then((res) => res.text())
193
- .then((data) => {
194
- cssFile.innerHTML = data;
195
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
196
- })
197
- .catch((err) => {
198
- console.log('error ', err);
199
- });
200
- };
201
236
  }
202
237
  handleNewTranslations() {
203
238
  getTranslations$1(this.translationUrl);
204
239
  }
205
240
  handleStylingUrlChange(newValue, oldValue) {
206
241
  if (newValue !== oldValue)
207
- this.setClientStylingURL();
242
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
208
243
  }
209
244
  async componentWillLoad() {
210
245
  if (this.translationUrl.length > 2) {
@@ -217,17 +252,22 @@ const PlayerUserConsents = class {
217
252
  value: this.checkboxInput.checked
218
253
  });
219
254
  }
220
- componentDidRender() {
221
- // start custom styling area
222
- if (!this.limitStylingAppends && this.stylingContainer) {
223
- if (this.clientStylingUrl) {
224
- this.setClientStylingURL();
255
+ componentDidLoad() {
256
+ if (this.stylingContainer) {
257
+ // @ts-ignore
258
+ if (window.emMessageBus != undefined) {
259
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
260
+ }
261
+ else {
262
+ if (this.clientStyling)
263
+ setClientStyling(this.stylingContainer, this.clientStyling);
264
+ if (this.clientStylingUrl)
265
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
225
266
  }
226
- if (this.clientStyling)
227
- this.setClientStyling();
228
- this.limitStylingAppends = true;
229
267
  }
230
- // end custom styling area
268
+ }
269
+ disconnectedCallback() {
270
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
231
271
  }
232
272
  determineTextContent() {
233
273
  if (this.gmVersion === 'gmcore') {
@@ -249,7 +289,7 @@ const PlayerUserConsents = class {
249
289
  if (this.queried) {
250
290
  this.userLegislationConsentHandler();
251
291
  }
252
- return (index.h("div", { key: '54601e536a075b95277641c2d123f21fb5b9a9e8', ref: el => this.stylingContainer = el }, index.h("p", { key: '8cceca5a2a2e69a4180e10848d0fea081fe7a78a', class: "ConsentTitle" }, this.consentTitle), index.h("label", { key: '80f41a7876f3831c1030cba896282290f33c14b3', class: "UserConsent", htmlFor: "userConsent" }, index.h("input", { key: '7db0bada1af6d9df763f63a4eb92e79615322801', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && index.h("span", { key: 'ce67fcdf09cfefb48df87d043950fd4fba7fdb00', class: "MandatoryItem" }, "*"))));
292
+ return (index.h("div", { key: 'aba04e96251f2f0febe96883b931193fb5ca8c94', ref: el => this.stylingContainer = el }, index.h("p", { key: 'd3f0cbeb5b45b4538462a53c41ab041b176a7c26', class: "ConsentTitle" }, this.consentTitle), index.h("label", { key: '800ab8d45e87b075402c3178e60a16866d0321d4', class: "UserConsent", htmlFor: "userConsent" }, index.h("input", { key: '919c15c353a8146661eca2870e7a63f7c689953e', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && index.h("span", { key: 'f7126adee1ba5540837da4b852961d08a9eae857', class: "MandatoryItem" }, "*"))));
253
293
  }
254
294
  static get watchers() { return {
255
295
  "translationUrl": ["handleNewTranslations"],
@@ -412,7 +452,6 @@ const UserActionController = class {
412
452
  this.activeUserActions = [];
413
453
  this.userActionsValidated = true;
414
454
  this.receivedQueryResponses = 0;
415
- this.limitStylingAppends = false;
416
455
  this.isLoading = true;
417
456
  this.mandatoryActionsChecked = 0;
418
457
  //for now this variable is hardcoded bcs we have terms and conditions and privacy policy mandatory and we dont receive with these new functionality the mandatory actions
@@ -424,28 +463,21 @@ const UserActionController = class {
424
463
  emailmarketing: translate('emailMarketingTitle', this.lang),
425
464
  privacypolicy: translate('privacyPolicyTitle', this.lang)
426
465
  };
427
- this.setClientStyling = () => {
428
- let sheet = document.createElement('style');
429
- sheet.innerHTML = this.clientStyling;
430
- this.stylingContainer.prepend(sheet);
431
- };
432
- this.setClientStylingURL = () => {
433
- let url = new URL(this.clientStylingUrl);
434
- let cssFile = document.createElement('style');
435
- fetch(url.href)
436
- .then((res) => res.text())
437
- .then((data) => {
438
- cssFile.innerHTML = data;
439
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
440
- })
441
- .catch((err) => {
442
- console.log('error ', err);
443
- });
444
- };
445
466
  }
446
467
  handleNewTranslations() {
447
468
  getTranslations(this.translationUrl);
448
469
  }
470
+ handleClientStylingChange(newValue, oldValue) {
471
+ if (newValue != oldValue) {
472
+ setClientStyling(this.stylingContainer, this.clientStyling);
473
+ }
474
+ }
475
+ handleClientStylingUrlChange(newValue, oldValue) {
476
+ if (newValue != oldValue) {
477
+ if (this.clientStylingUrl)
478
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
479
+ }
480
+ }
449
481
  handleQueryResponse() {
450
482
  if (this.receivedQueryResponses === this.activeUserActions.length) {
451
483
  this.updateUserConsents();
@@ -578,16 +610,22 @@ const UserActionController = class {
578
610
  await getTranslations(this.translationUrl);
579
611
  }
580
612
  }
581
- componentDidRender() {
582
- // start custom styling area
583
- if (!this.limitStylingAppends && this.stylingContainer) {
584
- if (this.clientStyling)
585
- this.setClientStyling();
586
- if (this.clientStylingUrl)
587
- this.setClientStylingURL();
588
- this.limitStylingAppends = true;
613
+ componentDidLoad() {
614
+ if (this.stylingContainer) {
615
+ // @ts-ignore
616
+ if (window.emMessageBus != undefined) {
617
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
618
+ }
619
+ else {
620
+ if (this.clientStyling)
621
+ setClientStyling(this.stylingContainer, this.clientStyling);
622
+ if (this.clientStylingUrl)
623
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
624
+ }
589
625
  }
590
- // end custom styling area
626
+ }
627
+ disconnectedCallback() {
628
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
591
629
  }
592
630
  calcMandatoryActions() {
593
631
  this.mandatoryItems = 0;
@@ -603,7 +641,7 @@ const UserActionController = class {
603
641
  this.userActionsValidated = this.mandatoryActionsChecked === this.mandatoryItems;
604
642
  return (index.h("div", { class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (index.h("slot", { name: 'spinner' })
605
643
  &&
606
- index.h("svg", { class: "spinner", viewBox: "0 0 50 50" }, index.h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))) : (index.h("div", { class: "UserActionController" }, index.h("h2", { class: "UserConsentNotice" }, translate('userNoticeText', this.lang)), index.h("div", { class: "PlayerLegislationWrapper" }, this.activeUserActions.map(action => (index.h("slot", { name: action }, index.h("player-user-consents", { lang: this.lang, "gm-version": this.gmVersion, "translation-url": this.translationUrl, consentType: action, consentTitle: this.consentTitles[action], queried: this.queryFired, mandatory: this.mandatoryActions.includes(action), "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling }))))), this.includeSubmitButton &&
644
+ index.h("svg", { class: "spinner", viewBox: "0 0 50 50" }, index.h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))) : (index.h("div", { class: "UserActionController" }, index.h("h2", { class: "UserConsentNotice" }, translate('userNoticeText', this.lang)), index.h("div", { class: "PlayerLegislationWrapper" }, this.activeUserActions.map(action => (index.h("slot", { name: action }, index.h("player-user-consents", { lang: this.lang, "gm-version": this.gmVersion, "translation-url": this.translationUrl, consentType: action, consentTitle: this.consentTitles[action], queried: this.queryFired, mandatory: this.mandatoryActions.includes(action), "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, "client-styling": this.clientStyling }))))), this.includeSubmitButton &&
607
645
  index.h("button", { class: "ConsentSubmitButton", disabled: !this.userActionsValidated, onClick: () => this.handleApplyClick() }, translate('submitButtonText', this.lang))))));
608
646
  }
609
647
  else {
@@ -612,6 +650,8 @@ const UserActionController = class {
612
650
  }
613
651
  static get watchers() { return {
614
652
  "translationUrl": ["handleNewTranslations"],
653
+ "clientStyling": ["handleClientStylingChange"],
654
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
615
655
  "receivedQueryResponses": ["handleQueryResponse"]
616
656
  }; }
617
657
  };
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-eb2c9562.js');
5
+ const index = require('./index-acdc077f.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-user-consents_2.cjs",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"gmVersion":[1,"gm-version"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"queryFired":[32],"readyActionsCount":[32],"activeUserActions":[32],"userActionsValidated":[32],"receivedQueryResponses":[32],"limitStylingAppends":[32],"isLoading":[32],"mandatoryActionsChecked":[32],"mandatoryItems":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]],{"translationUrl":["handleNewTranslations"],"receivedQueryResponses":["handleQueryResponse"]}],[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
22
+ return index.bootstrapLazy([["player-user-consents_2.cjs",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"gmVersion":[1,"gm-version"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"queryFired":[32],"readyActionsCount":[32],"activeUserActions":[32],"userActionsValidated":[32],"receivedQueryResponses":[32],"isLoading":[32],"mandatoryActionsChecked":[32],"mandatoryItems":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]],{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"receivedQueryResponses":["handleQueryResponse"]}],[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"mbSource":[513,"mb-source"],"textContent":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], 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
  import "../../../../../player-user-consents/dist/types/index";
4
5
  export class UserActionController {
5
6
  constructor() {
@@ -31,7 +32,6 @@ export class UserActionController {
31
32
  this.activeUserActions = [];
32
33
  this.userActionsValidated = true;
33
34
  this.receivedQueryResponses = 0;
34
- this.limitStylingAppends = false;
35
35
  this.isLoading = true;
36
36
  this.mandatoryActionsChecked = 0;
37
37
  //for now this variable is hardcoded bcs we have terms and conditions and privacy policy mandatory and we dont receive with these new functionality the mandatory actions
@@ -43,28 +43,21 @@ export class UserActionController {
43
43
  emailmarketing: translate('emailMarketingTitle', this.lang),
44
44
  privacypolicy: translate('privacyPolicyTitle', this.lang)
45
45
  };
46
- this.setClientStyling = () => {
47
- let sheet = document.createElement('style');
48
- sheet.innerHTML = this.clientStyling;
49
- this.stylingContainer.prepend(sheet);
50
- };
51
- this.setClientStylingURL = () => {
52
- let url = new URL(this.clientStylingUrl);
53
- let cssFile = document.createElement('style');
54
- fetch(url.href)
55
- .then((res) => res.text())
56
- .then((data) => {
57
- cssFile.innerHTML = data;
58
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
59
- })
60
- .catch((err) => {
61
- console.log('error ', err);
62
- });
63
- };
64
46
  }
65
47
  handleNewTranslations() {
66
48
  getTranslations(this.translationUrl);
67
49
  }
50
+ handleClientStylingChange(newValue, oldValue) {
51
+ if (newValue != oldValue) {
52
+ setClientStyling(this.stylingContainer, this.clientStyling);
53
+ }
54
+ }
55
+ handleClientStylingUrlChange(newValue, oldValue) {
56
+ if (newValue != oldValue) {
57
+ if (this.clientStylingUrl)
58
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
59
+ }
60
+ }
68
61
  handleQueryResponse() {
69
62
  if (this.receivedQueryResponses === this.activeUserActions.length) {
70
63
  this.updateUserConsents();
@@ -197,16 +190,22 @@ export class UserActionController {
197
190
  await getTranslations(this.translationUrl);
198
191
  }
199
192
  }
200
- componentDidRender() {
201
- // start custom styling area
202
- if (!this.limitStylingAppends && this.stylingContainer) {
203
- if (this.clientStyling)
204
- this.setClientStyling();
205
- if (this.clientStylingUrl)
206
- this.setClientStylingURL();
207
- this.limitStylingAppends = true;
193
+ componentDidLoad() {
194
+ if (this.stylingContainer) {
195
+ // @ts-ignore
196
+ if (window.emMessageBus != undefined) {
197
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
198
+ }
199
+ else {
200
+ if (this.clientStyling)
201
+ setClientStyling(this.stylingContainer, this.clientStyling);
202
+ if (this.clientStylingUrl)
203
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
204
+ }
208
205
  }
209
- // end custom styling area
206
+ }
207
+ disconnectedCallback() {
208
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
210
209
  }
211
210
  calcMandatoryActions() {
212
211
  this.mandatoryItems = 0;
@@ -222,7 +221,7 @@ export class UserActionController {
222
221
  this.userActionsValidated = this.mandatoryActionsChecked === this.mandatoryItems;
223
222
  return (h("div", { class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (h("slot", { name: 'spinner' })
224
223
  &&
225
- h("svg", { class: "spinner", viewBox: "0 0 50 50" }, h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))) : (h("div", { class: "UserActionController" }, h("h2", { class: "UserConsentNotice" }, translate('userNoticeText', this.lang)), h("div", { class: "PlayerLegislationWrapper" }, this.activeUserActions.map(action => (h("slot", { name: action }, h("player-user-consents", { lang: this.lang, "gm-version": this.gmVersion, "translation-url": this.translationUrl, consentType: action, consentTitle: this.consentTitles[action], queried: this.queryFired, mandatory: this.mandatoryActions.includes(action), "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling }))))), this.includeSubmitButton &&
224
+ h("svg", { class: "spinner", viewBox: "0 0 50 50" }, h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))) : (h("div", { class: "UserActionController" }, h("h2", { class: "UserConsentNotice" }, translate('userNoticeText', this.lang)), h("div", { class: "PlayerLegislationWrapper" }, this.activeUserActions.map(action => (h("slot", { name: action }, h("player-user-consents", { lang: this.lang, "gm-version": this.gmVersion, "translation-url": this.translationUrl, consentType: action, consentTitle: this.consentTitles[action], queried: this.queryFired, mandatory: this.mandatoryActions.includes(action), "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, "client-styling": this.clientStyling }))))), this.includeSubmitButton &&
226
225
  h("button", { class: "ConsentSubmitButton", disabled: !this.userActionsValidated, onClick: () => this.handleApplyClick() }, translate('submitButtonText', this.lang))))));
227
226
  }
228
227
  else {
@@ -418,6 +417,25 @@ export class UserActionController {
418
417
  "attribute": "client-styling-url",
419
418
  "reflect": true,
420
419
  "defaultValue": "''"
420
+ },
421
+ "mbSource": {
422
+ "type": "string",
423
+ "mutable": false,
424
+ "complexType": {
425
+ "original": "string",
426
+ "resolved": "string",
427
+ "references": {}
428
+ },
429
+ "required": false,
430
+ "optional": false,
431
+ "docs": {
432
+ "tags": [],
433
+ "text": ""
434
+ },
435
+ "getter": false,
436
+ "setter": false,
437
+ "attribute": "mb-source",
438
+ "reflect": true
421
439
  }
422
440
  };
423
441
  }
@@ -428,7 +446,6 @@ export class UserActionController {
428
446
  "activeUserActions": {},
429
447
  "userActionsValidated": {},
430
448
  "receivedQueryResponses": {},
431
- "limitStylingAppends": {},
432
449
  "isLoading": {},
433
450
  "mandatoryActionsChecked": {},
434
451
  "mandatoryItems": {}
@@ -438,6 +455,12 @@ export class UserActionController {
438
455
  return [{
439
456
  "propName": "translationUrl",
440
457
  "methodName": "handleNewTranslations"
458
+ }, {
459
+ "propName": "clientStyling",
460
+ "methodName": "handleClientStylingChange"
461
+ }, {
462
+ "propName": "clientStylingUrl",
463
+ "methodName": "handleClientStylingUrlChange"
441
464
  }, {
442
465
  "propName": "receivedQueryResponses",
443
466
  "methodName": "handleQueryResponse"
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'user-action-controller';
2
- const BUILD = /* user-action-controller */ { 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: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, 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: true, propMutable: true, propNumber: false, propString: true, reflect: true, 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: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* user-action-controller */ { 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: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, 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: true, propMutable: true, propNumber: false, propString: true, reflect: true, 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: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
@@ -894,14 +894,14 @@ var postUpdateComponent = (hostRef) => {
894
894
  const endPostUpdate = createTime("postUpdate", tagName);
895
895
  const instance = hostRef.$lazyInstance$ ;
896
896
  const ancestorComponent = hostRef.$ancestorComponent$;
897
- {
898
- safeCall(instance, "componentDidRender", void 0, elm);
899
- }
900
897
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
901
898
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
902
899
  {
903
900
  addHydratedFlag(elm);
904
901
  }
902
+ {
903
+ safeCall(instance, "componentDidLoad", void 0, elm);
904
+ }
905
905
  endPostUpdate();
906
906
  {
907
907
  hostRef.$onReadyResolve$(elm);
@@ -1216,6 +1216,9 @@ var connectedCallback = (elm) => {
1216
1216
  }
1217
1217
  };
1218
1218
  var disconnectInstance = (instance, elm) => {
1219
+ {
1220
+ safeCall(instance, "disconnectedCallback", void 0, elm || instance);
1221
+ }
1219
1222
  };
1220
1223
  var disconnectedCallback = async (elm) => {
1221
1224
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1226,8 +1229,10 @@ var disconnectedCallback = async (elm) => {
1226
1229
  hostRef.$rmListeners$ = void 0;
1227
1230
  }
1228
1231
  }
1229
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1230
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1232
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1233
+ disconnectInstance(hostRef.$lazyInstance$, elm);
1234
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1235
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
1231
1236
  }
1232
1237
  }
1233
1238
  if (rootAppliedStyles.has(elm)) {
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-b5753d50.js';
2
- export { s as setNonce } from './index-b5753d50.js';
1
+ import { b as bootstrapLazy } from './index-82e2d554.js';
2
+ export { s as setNonce } from './index-82e2d554.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-user-consents_2",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"gmVersion":[1,"gm-version"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"queryFired":[32],"readyActionsCount":[32],"activeUserActions":[32],"userActionsValidated":[32],"receivedQueryResponses":[32],"limitStylingAppends":[32],"isLoading":[32],"mandatoryActionsChecked":[32],"mandatoryItems":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]],{"translationUrl":["handleNewTranslations"],"receivedQueryResponses":["handleQueryResponse"]}],[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
8
+ return bootstrapLazy([["player-user-consents_2",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"gmVersion":[1,"gm-version"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"queryFired":[32],"readyActionsCount":[32],"activeUserActions":[32],"userActionsValidated":[32],"receivedQueryResponses":[32],"isLoading":[32],"mandatoryActionsChecked":[32],"mandatoryItems":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]],{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"receivedQueryResponses":["handleQueryResponse"]}],[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"mbSource":[513,"mb-source"],"textContent":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, h } from './index-b5753d50.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-82e2d554.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE$1 = 'en';
4
4
  const TRANSLATIONS$1 = {
@@ -126,6 +126,63 @@ const translate$1 = (key, customLang, values) => {
126
126
  return translation;
127
127
  };
128
128
 
129
+ /**
130
+ * @name setClientStyling
131
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
132
+ * @param {HTMLElement} stylingContainer The reference element of the widget
133
+ * @param {string} clientStyling The style content
134
+ */
135
+ function setClientStyling(stylingContainer, clientStyling) {
136
+ if (stylingContainer) {
137
+ const sheet = document.createElement('style');
138
+ sheet.innerHTML = clientStyling;
139
+ stylingContainer.appendChild(sheet);
140
+ }
141
+ }
142
+
143
+ /**
144
+ * @name setClientStylingURL
145
+ * @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
146
+ * @param {HTMLElement} stylingContainer The reference element of the widget
147
+ * @param {string} clientStylingUrl The URL of the style content
148
+ */
149
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
150
+ const url = new URL(clientStylingUrl);
151
+
152
+ fetch(url.href)
153
+ .then((res) => res.text())
154
+ .then((data) => {
155
+ const cssFile = document.createElement('style');
156
+ cssFile.innerHTML = data;
157
+ if (stylingContainer) {
158
+ stylingContainer.appendChild(cssFile);
159
+ }
160
+ })
161
+ .catch((err) => {
162
+ console.error('There was an error while trying to load client styling from URL', err);
163
+ });
164
+ }
165
+
166
+ /**
167
+ * @name setStreamLibrary
168
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
169
+ * @param {HTMLElement} stylingContainer The highest element of the widget
170
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
171
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
172
+ */
173
+ function setStreamStyling(stylingContainer, domain, subscription) {
174
+ if (window.emMessageBus) {
175
+ const sheet = document.createElement('style');
176
+
177
+ window.emMessageBus.subscribe(domain, (data) => {
178
+ sheet.innerHTML = data;
179
+ if (stylingContainer) {
180
+ stylingContainer.appendChild(sheet);
181
+ }
182
+ });
183
+ }
184
+ }
185
+
129
186
  const playerUserConsentsCss = ":host{display:block}.ConsentTitle{margin-bottom:0.2rem;font-weight:600}.UserConsent:hover{cursor:pointer}.UserConsent{display:flex;align-items:baseline}.MandatoryItem{color:#f00;font-size:1.2rem}.ConsentLink{text-decoration:underline;color:var(--emw--color-primary);font-weight:bold}";
130
187
  const PlayerUserConsentsStyle0 = playerUserConsentsCss;
131
188
 
@@ -169,38 +226,16 @@ const PlayerUserConsents = class {
169
226
  * Translation url
170
227
  */
171
228
  this.translationUrl = '';
172
- /**
173
- * the text content to be rendered by the component. Determined at runtime
174
- */
175
229
  this.textContent = '';
176
- this.limitStylingAppends = false;
177
230
  this.goToTermsAndConditions = () => window.postMessage({ type: 'GoToTermsAndConditions' });
178
231
  this.goToPrivacyPolicy = () => window.postMessage({ type: 'GoToPrivacyPolicy' });
179
- this.setClientStyling = () => {
180
- let sheet = document.createElement('style');
181
- sheet.innerHTML = this.clientStyling;
182
- this.stylingContainer.prepend(sheet);
183
- };
184
- this.setClientStylingURL = () => {
185
- let url = new URL(this.clientStylingUrl);
186
- let cssFile = document.createElement('style');
187
- fetch(url.href)
188
- .then((res) => res.text())
189
- .then((data) => {
190
- cssFile.innerHTML = data;
191
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
192
- })
193
- .catch((err) => {
194
- console.log('error ', err);
195
- });
196
- };
197
232
  }
198
233
  handleNewTranslations() {
199
234
  getTranslations$1(this.translationUrl);
200
235
  }
201
236
  handleStylingUrlChange(newValue, oldValue) {
202
237
  if (newValue !== oldValue)
203
- this.setClientStylingURL();
238
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
204
239
  }
205
240
  async componentWillLoad() {
206
241
  if (this.translationUrl.length > 2) {
@@ -213,17 +248,22 @@ const PlayerUserConsents = class {
213
248
  value: this.checkboxInput.checked
214
249
  });
215
250
  }
216
- componentDidRender() {
217
- // start custom styling area
218
- if (!this.limitStylingAppends && this.stylingContainer) {
219
- if (this.clientStylingUrl) {
220
- this.setClientStylingURL();
251
+ componentDidLoad() {
252
+ if (this.stylingContainer) {
253
+ // @ts-ignore
254
+ if (window.emMessageBus != undefined) {
255
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
256
+ }
257
+ else {
258
+ if (this.clientStyling)
259
+ setClientStyling(this.stylingContainer, this.clientStyling);
260
+ if (this.clientStylingUrl)
261
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
221
262
  }
222
- if (this.clientStyling)
223
- this.setClientStyling();
224
- this.limitStylingAppends = true;
225
263
  }
226
- // end custom styling area
264
+ }
265
+ disconnectedCallback() {
266
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
227
267
  }
228
268
  determineTextContent() {
229
269
  if (this.gmVersion === 'gmcore') {
@@ -245,7 +285,7 @@ const PlayerUserConsents = class {
245
285
  if (this.queried) {
246
286
  this.userLegislationConsentHandler();
247
287
  }
248
- return (h("div", { key: '54601e536a075b95277641c2d123f21fb5b9a9e8', ref: el => this.stylingContainer = el }, h("p", { key: '8cceca5a2a2e69a4180e10848d0fea081fe7a78a', class: "ConsentTitle" }, this.consentTitle), h("label", { key: '80f41a7876f3831c1030cba896282290f33c14b3', class: "UserConsent", htmlFor: "userConsent" }, h("input", { key: '7db0bada1af6d9df763f63a4eb92e79615322801', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && h("span", { key: 'ce67fcdf09cfefb48df87d043950fd4fba7fdb00', class: "MandatoryItem" }, "*"))));
288
+ return (h("div", { key: 'aba04e96251f2f0febe96883b931193fb5ca8c94', ref: el => this.stylingContainer = el }, h("p", { key: 'd3f0cbeb5b45b4538462a53c41ab041b176a7c26', class: "ConsentTitle" }, this.consentTitle), h("label", { key: '800ab8d45e87b075402c3178e60a16866d0321d4', class: "UserConsent", htmlFor: "userConsent" }, h("input", { key: '919c15c353a8146661eca2870e7a63f7c689953e', ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.determineTextContent(), this.mandatory && h("span", { key: 'f7126adee1ba5540837da4b852961d08a9eae857', class: "MandatoryItem" }, "*"))));
249
289
  }
250
290
  static get watchers() { return {
251
291
  "translationUrl": ["handleNewTranslations"],
@@ -408,7 +448,6 @@ const UserActionController = class {
408
448
  this.activeUserActions = [];
409
449
  this.userActionsValidated = true;
410
450
  this.receivedQueryResponses = 0;
411
- this.limitStylingAppends = false;
412
451
  this.isLoading = true;
413
452
  this.mandatoryActionsChecked = 0;
414
453
  //for now this variable is hardcoded bcs we have terms and conditions and privacy policy mandatory and we dont receive with these new functionality the mandatory actions
@@ -420,28 +459,21 @@ const UserActionController = class {
420
459
  emailmarketing: translate('emailMarketingTitle', this.lang),
421
460
  privacypolicy: translate('privacyPolicyTitle', this.lang)
422
461
  };
423
- this.setClientStyling = () => {
424
- let sheet = document.createElement('style');
425
- sheet.innerHTML = this.clientStyling;
426
- this.stylingContainer.prepend(sheet);
427
- };
428
- this.setClientStylingURL = () => {
429
- let url = new URL(this.clientStylingUrl);
430
- let cssFile = document.createElement('style');
431
- fetch(url.href)
432
- .then((res) => res.text())
433
- .then((data) => {
434
- cssFile.innerHTML = data;
435
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
436
- })
437
- .catch((err) => {
438
- console.log('error ', err);
439
- });
440
- };
441
462
  }
442
463
  handleNewTranslations() {
443
464
  getTranslations(this.translationUrl);
444
465
  }
466
+ handleClientStylingChange(newValue, oldValue) {
467
+ if (newValue != oldValue) {
468
+ setClientStyling(this.stylingContainer, this.clientStyling);
469
+ }
470
+ }
471
+ handleClientStylingUrlChange(newValue, oldValue) {
472
+ if (newValue != oldValue) {
473
+ if (this.clientStylingUrl)
474
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
475
+ }
476
+ }
445
477
  handleQueryResponse() {
446
478
  if (this.receivedQueryResponses === this.activeUserActions.length) {
447
479
  this.updateUserConsents();
@@ -574,16 +606,22 @@ const UserActionController = class {
574
606
  await getTranslations(this.translationUrl);
575
607
  }
576
608
  }
577
- componentDidRender() {
578
- // start custom styling area
579
- if (!this.limitStylingAppends && this.stylingContainer) {
580
- if (this.clientStyling)
581
- this.setClientStyling();
582
- if (this.clientStylingUrl)
583
- this.setClientStylingURL();
584
- this.limitStylingAppends = true;
609
+ componentDidLoad() {
610
+ if (this.stylingContainer) {
611
+ // @ts-ignore
612
+ if (window.emMessageBus != undefined) {
613
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
614
+ }
615
+ else {
616
+ if (this.clientStyling)
617
+ setClientStyling(this.stylingContainer, this.clientStyling);
618
+ if (this.clientStylingUrl)
619
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
620
+ }
585
621
  }
586
- // end custom styling area
622
+ }
623
+ disconnectedCallback() {
624
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
587
625
  }
588
626
  calcMandatoryActions() {
589
627
  this.mandatoryItems = 0;
@@ -599,7 +637,7 @@ const UserActionController = class {
599
637
  this.userActionsValidated = this.mandatoryActionsChecked === this.mandatoryItems;
600
638
  return (h("div", { class: "QueryReferenceContainer", ref: el => this.stylingContainer = el }, this.isLoading ? (h("slot", { name: 'spinner' })
601
639
  &&
602
- h("svg", { class: "spinner", viewBox: "0 0 50 50" }, h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))) : (h("div", { class: "UserActionController" }, h("h2", { class: "UserConsentNotice" }, translate('userNoticeText', this.lang)), h("div", { class: "PlayerLegislationWrapper" }, this.activeUserActions.map(action => (h("slot", { name: action }, h("player-user-consents", { lang: this.lang, "gm-version": this.gmVersion, "translation-url": this.translationUrl, consentType: action, consentTitle: this.consentTitles[action], queried: this.queryFired, mandatory: this.mandatoryActions.includes(action), "client-styling-url": this.clientStylingUrl, "client-styling": this.clientStyling }))))), this.includeSubmitButton &&
640
+ h("svg", { class: "spinner", viewBox: "0 0 50 50" }, h("circle", { class: "path", cx: "25", cy: "25", r: "20", fill: "none", "stroke-width": "5" }))) : (h("div", { class: "UserActionController" }, h("h2", { class: "UserConsentNotice" }, translate('userNoticeText', this.lang)), h("div", { class: "PlayerLegislationWrapper" }, this.activeUserActions.map(action => (h("slot", { name: action }, h("player-user-consents", { lang: this.lang, "gm-version": this.gmVersion, "translation-url": this.translationUrl, consentType: action, consentTitle: this.consentTitles[action], queried: this.queryFired, mandatory: this.mandatoryActions.includes(action), "client-styling-url": this.clientStylingUrl, "mb-source": this.mbSource, "client-styling": this.clientStyling }))))), this.includeSubmitButton &&
603
641
  h("button", { class: "ConsentSubmitButton", disabled: !this.userActionsValidated, onClick: () => this.handleApplyClick() }, translate('submitButtonText', this.lang))))));
604
642
  }
605
643
  else {
@@ -608,6 +646,8 @@ const UserActionController = class {
608
646
  }
609
647
  static get watchers() { return {
610
648
  "translationUrl": ["handleNewTranslations"],
649
+ "clientStyling": ["handleClientStylingChange"],
650
+ "clientStylingUrl": ["handleClientStylingUrlChange"],
611
651
  "receivedQueryResponses": ["handleQueryResponse"]
612
652
  }; }
613
653
  };
@@ -1,5 +1,5 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-b5753d50.js';
2
- export { s as setNonce } from './index-b5753d50.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-82e2d554.js';
2
+ export { s as setNonce } from './index-82e2d554.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-user-consents_2",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"gmVersion":[1,"gm-version"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"queryFired":[32],"readyActionsCount":[32],"activeUserActions":[32],"userActionsValidated":[32],"receivedQueryResponses":[32],"limitStylingAppends":[32],"isLoading":[32],"mandatoryActionsChecked":[32],"mandatoryItems":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]],{"translationUrl":["handleNewTranslations"],"receivedQueryResponses":["handleQueryResponse"]}],[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"textContent":[32],"limitStylingAppends":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
19
+ return bootstrapLazy([["player-user-consents_2",[[1,"user-action-controller",{"endpoint":[513],"userSession":[513,"user-session"],"userId":[513,"user-id"],"lang":[1537],"includeSubmitButton":[516,"include-submit-button"],"gmVersion":[1,"gm-version"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"queryFired":[32],"readyActionsCount":[32],"activeUserActions":[32],"userActionsValidated":[32],"receivedQueryResponses":[32],"isLoading":[32],"mandatoryActionsChecked":[32],"mandatoryItems":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]],{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"receivedQueryResponses":["handleQueryResponse"]}],[1,"player-user-consents",{"lang":[1537],"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"gmVersion":[1,"gm-version"],"consentTitle":[513,"consent-title"],"clientStyling":[1,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"mbSource":[513,"mb-source"],"textContent":[32]},null,{"translationUrl":["handleNewTranslations"],"clientStylingUrl":["handleStylingUrlChange"]}]]]], options);
20
20
  });
@@ -40,7 +40,10 @@ export declare class UserActionController {
40
40
  * Client custom styling via url
41
41
  */
42
42
  clientStylingUrl: string;
43
+ mbSource: string;
43
44
  handleNewTranslations(): void;
45
+ handleClientStylingChange(newValue: any, oldValue: any): void;
46
+ handleClientStylingUrlChange(newValue: any, oldValue: any): void;
44
47
  handleQueryResponse(): void;
45
48
  userLegislationConsentHandler(event: CustomEvent<LegislationConsentEvent>): void;
46
49
  /**
@@ -51,22 +54,21 @@ export declare class UserActionController {
51
54
  activeUserActions: Array<string>;
52
55
  userActionsValidated: boolean;
53
56
  receivedQueryResponses: number;
54
- private limitStylingAppends;
55
57
  private isLoading;
56
58
  private mandatoryActionsChecked;
57
59
  private mandatoryItems;
58
60
  private mandatoryActions;
59
61
  private userActions;
60
62
  private stylingContainer;
63
+ private stylingSubscription;
61
64
  private consentTitles;
62
65
  determineUserActionsCore(): Promise<void>;
63
66
  determineUserActions16(): Promise<void>;
64
67
  updateUserConsents(): void;
65
68
  handleApplyClick(): void;
66
69
  componentWillLoad(): Promise<void>;
67
- componentDidRender(): void;
68
- setClientStyling: () => void;
69
- setClientStylingURL: () => void;
70
+ componentDidLoad(): void;
71
+ disconnectedCallback(): void;
70
72
  calcMandatoryActions(): void;
71
73
  render(): any;
72
74
  }
@@ -31,6 +31,7 @@ export namespace Components {
31
31
  * Language
32
32
  */
33
33
  "lang": string;
34
+ "mbSource": string;
34
35
  /**
35
36
  * Translation url
36
37
  */
@@ -82,6 +83,7 @@ declare namespace LocalJSX {
82
83
  * Language
83
84
  */
84
85
  "lang"?: string;
86
+ "mbSource"?: string;
85
87
  /**
86
88
  * Translation url
87
89
  */
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i}from"./p-e2754eb5.js";const n={en:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},ro:{termsAndConditions:{acceptPart1:"Accept ",acceptPart2:" platformei. Am citit şi înţeles ",acceptPart3:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",tc:"Termenii şi condiţiile"},privacyPolicy:{readUnderstandPart1:"Am citit şi înţeles ",readUnderstandPart2:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",privacy:"Politica de confidenţialitate"},sms:"Sunt de acord să primesc promoţii de marketing prin SMS.",emailmarketing:"Sunt de acord să primesc promoţii de marketing pe e-mail."},hr:{termsAndConditions:{acceptPart1:"Prihvaćam Opće uvjete i odredbe ",acceptPart2:"",acceptPart3:"",tcLink:"Opći uvjeti i odredbe"},privacyPolicy:{readUnderstandPart1:"Pročitao sam i razumijem Politiku Privatnosti ",readUnderstandPart2:", i potvrđujem da imam više od 18 godina",privacyLink:"Politika Privatnosti"},sms:"Želim dobivati marketinški sadržaj putem sms",emailmarketing:"Želim dobivati marketinški sadržaj putem e-maila"},fr:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},cs:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},de:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."}},s=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])n[e][i]=t[e][i]})),e(!0)}))})),a=(t,e,i)=>{let s=(a=n[e||"en"],t.split(".").reduce(((t,e)=>t&&void 0!==t[e]?t[e]:null),a));var a;if(null===s)return t;if(void 0!==i)for(const[t,e]of Object.entries(i)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s};function o(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function r(t,e){const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function c(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}const d=class{constructor(i){t(this,i),this.userLegislationConsent=e(this,"userLegislationConsent",7),this.lang="en",this.queried=!1,this.consentType="",this.mandatory=!1,this.gmVersion="",this.consentTitle="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.textContent="",this.goToTermsAndConditions=()=>window.postMessage({type:"GoToTermsAndConditions"}),this.goToPrivacyPolicy=()=>window.postMessage({type:"GoToPrivacyPolicy"})}handleNewTranslations(){s(this.translationUrl)}handleStylingUrlChange(t,e){t!==e&&r(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){this.translationUrl.length>2&&await s(this.translationUrl)}userLegislationConsentHandler(){this.userLegislationConsent.emit({type:this.consentType,value:this.checkboxInput.checked})}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?c(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}determineTextContent(){if("gmcore"===this.gmVersion&&"termsandconditions"===this.consentType)return i("p",null,a("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},a("termsAndConditions.tcLink",this.lang)),a("termsAndConditions.acceptPart2",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},a("privacyPolicy.privacyLink",this.lang)),a("termsAndConditions.acceptPart3",this.lang));if("gm16"===this.gmVersion){if("termsandconditions"===this.consentType)return i("p",null,a("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},a("termsAndConditions.tcLink",this.lang)));if("privacypolicy"===this.consentType)return i("p",null,a("privacyPolicy.readUnderstandPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},a("privacyPolicy.privacyLink",this.lang)),a("privacyPolicy.readUnderstandPart2",this.lang))}return i("p",null,a(this.consentType,this.lang))}render(){return this.queried&&this.userLegislationConsentHandler(),i("div",{key:"aba04e96251f2f0febe96883b931193fb5ca8c94",ref:t=>this.stylingContainer=t},i("p",{key:"d3f0cbeb5b45b4538462a53c41ab041b176a7c26",class:"ConsentTitle"},this.consentTitle),i("label",{key:"800ab8d45e87b075402c3178e60a16866d0321d4",class:"UserConsent",htmlFor:"userConsent"},i("input",{key:"919c15c353a8146661eca2870e7a63f7c689953e",ref:t=>this.checkboxInput=t,id:"userConsent",type:"checkbox",onInput:()=>this.userLegislationConsentHandler()}),this.determineTextContent(),this.mandatory&&i("span",{key:"f7126adee1ba5540837da4b852961d08a9eae857",class:"MandatoryItem"},"*")))}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStylingUrl:["handleStylingUrlChange"]}}};d.style=":host{display:block}.ConsentTitle{margin-bottom:0.2rem;font-weight:600}.UserConsent:hover{cursor:pointer}.UserConsent{display:flex;align-items:baseline}.MandatoryItem{color:#f00;font-size:1.2rem}.ConsentLink{text-decoration:underline;color:var(--emw--color-primary);font-weight:bold}";const l={en:{termsAndConditionsTitle:"Terms and Conditions",smsTitle:"SMS marketing",emailMarketingTitle:"Email marketing",privacyPolicyTitle:"Privacy Policy",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Submit"},"en-us":{termsAndConditionsTitle:"Terms and Conditions",smsTitle:"SMS marketing",emailMarketingTitle:"Email marketing",privacyPolicyTitle:"Privacy Policy",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Submit"},ro:{termsAndConditionsTitle:"Termeni și Condiții",smsTitle:"Marketing prin SMS",emailMarketingTitle:"Marketing prin Email",privacyPolicyTitle:"Politica de Confidențialitate",userNoticeText:"Înainte de a continua, trebuie să vă dați consimțământul pentru următoarele",submitButtonText:"Trimite"},hr:{termsAndConditionsTitle:"Opći uvjeti i odredbe",smsTitle:"SMS makretinški sadržaj",emailMarketingTitle:"E-mail makretinški sadržaj",privacyPolicyTitle:"Politika Privatnosti",userNoticeText:"Prije nego što možete nastaviti, morate pristati na sljedeće",submitButtonText:"Pošalji"},fr:{termsAndConditionsTitle:"Termes et Conditions",smsTitle:"Marketing par SMS",emailMarketingTitle:"Marketing par Email",privacyPolicyTitle:"Politique de Confidentialité",userNoticeText:"Avant de continuer, vous devez consentir aux éléments suivants",submitButtonText:"Soumettre"},cs:{termsAndConditionsTitle:"Terms and Conditions",smsTitle:"SMS marketing",emailMarketingTitle:"Email marketing",privacyPolicyTitle:"Privacy Policy",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Submit"},de:{termsAndConditionsTitle:"Allgemeine Geschäftsbedingungen",smsTitle:"SMS-Marketing",emailMarketingTitle:"E-Mail-Marketing",privacyPolicyTitle:"Datenschutzrichtlinie",userNoticeText:"Bevor Sie fortfahren können, müssen Sie den folgenden Punkten zustimmen",submitButtonText:"Absenden"},es:{termsAndConditionsTitle:"Términos y Condiciones",smsTitle:"Marketing por SMS",emailMarketingTitle:"Marketing por Email",privacyPolicyTitle:"Política de Privacidad",userNoticeText:"Antes de continuar, debe dar su consentimiento a lo siguiente",submitButtonText:"Enviar"},pt:{termsAndConditionsTitle:"Termos e Condições",smsTitle:"Marketing por SMS",emailMarketingTitle:"Marketing por Email",privacyPolicyTitle:"Política de Privacidade",userNoticeText:"Antes de continuar, você deve consentir com o seguinte",submitButtonText:"Enviar"},"es-mx":{termsAndConditionsTitle:"Términos y Condiciones",smsTitle:"Marketing por SMS",emailMarketingTitle:"Marketing por Email",privacyPolicyTitle:"Política de Privacidad",userNoticeText:"Antes de continuar, debe dar su consentimiento a lo siguiente",submitButtonText:"Enviar"},"pt-br":{termsAndConditionsTitle:"Termos e Condições",smsTitle:"Marketing por SMS",emailMarketingTitle:"Marketing por Email",privacyPolicyTitle:"Política de Privacidade",userNoticeText:"Antes de continuar, você deve consentir com o seguinte",submitButtonText:"Enviar"}},h=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{l[e]||(l[e]={});for(let i in t[e])l[e][i]=t[e][i]})),e(!0)}))})),m=(t,e,i)=>{let n=l[void 0!==e&&e in l?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");n=n.replace(i,e)}return n},p=class{constructor(e){t(this,e),this.lang="en",this.gmVersion="",this.translationUrl="",this.clientStyling="",this.clientStylingUrl="",this.queryFired=!1,this.readyActionsCount=0,this.activeUserActions=[],this.userActionsValidated=!0,this.receivedQueryResponses=0,this.isLoading=!0,this.mandatoryActionsChecked=0,this.mandatoryActions=["termsandconditions","privacypolicy"],this.userActions=[],this.consentTitles={termsandconditions:m("termsAndConditionsTitle",this.lang),sms:m("smsTitle",this.lang),emailmarketing:m("emailMarketingTitle",this.lang),privacypolicy:m("privacyPolicyTitle",this.lang)}}handleNewTranslations(){h(this.translationUrl)}handleClientStylingChange(t,e){t!=e&&o(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl)}handleQueryResponse(){this.receivedQueryResponses===this.activeUserActions.length&&this.updateUserConsents()}userLegislationConsentHandler(t){const e=t.detail.type,i=t.detail.value;this.mandatoryActions.includes(e)&&!1===this.queryFired&&(!0===i?this.mandatoryActionsChecked++:this.mandatoryActionsChecked--),this.queryFired&&(this.userActions.push(Object.assign({tagCode:e,status:(t=>"gm16"===this.gmVersion?t?1:0:t?"Accepted":"Denied")(i)},"gm16"===this.gmVersion&&{note:""})),this.receivedQueryResponses++)}determineUserActionsCore(){const t=new URL(`${this.endpoint}/v1/player/${this.userId}/consent`),e=new Headers;return e.append("X-SessionId",this.userSession),fetch(t.href,{method:"GET",headers:e}).then((t=>t.json())).then((t=>{t.items.forEach((t=>{"Expired"===t.status&&this.activeUserActions.push(t.tagCode)})),this.isLoading=!1})).catch((t=>{console.error("Error fetching data:",t),this.isLoading=!1})).finally((()=>{this.calcMandatoryActions(),window.postMessage({type:"UserActionsExists",displayUserActions:this.mandatoryItems>0},window.location.href)}))}determineUserActions16(){const t=new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`),e=new Headers;return e.append("X-SessionId",this.userSession),fetch(t.href,{method:"GET",headers:e}).then((t=>t.json())).then((t=>{t.consents.forEach((t=>{2===t.status&&"pepconsent"!==t.tagCode&&this.activeUserActions.push(t.tagCode)})),this.isLoading=!1})).catch((t=>{console.error("Error fetching data:",t),this.isLoading=!1})).finally((()=>{this.calcMandatoryActions(),window.postMessage({type:"UserActionsExists",displayUserActions:this.mandatoryItems>0},window.location.href)}))}updateUserConsents(){const t="gmcore"===this.gmVersion?new URL(`${this.endpoint}/v1/player/${this.userId}/consent`):new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`);let e={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-SessionId":`${this.userSession}`},body:JSON.stringify({consents:this.userActions})};fetch(t.href,e).then((t=>t.json())).then((()=>{window.postMessage({type:"WidgetNotification",data:{type:"success",message:"Consent update successful!"}},window.location.href)})).catch((t=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:"Server might not be responding",err:t}},window.location.href)})).finally((()=>{window.postMessage({type:"UserActionsCompleted"},window.location.href)}))}handleApplyClick(){this.queryFired=!0}async componentWillLoad(){"gmcore"===this.gmVersion&&this.determineUserActionsCore(),"gm16"===this.gmVersion&&this.determineUserActions16(),this.translationUrl.length>2&&await h(this.translationUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?c(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&r(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}calcMandatoryActions(){this.mandatoryItems=0,this.mandatoryActions.map((t=>{this.activeUserActions.includes(t)&&this.mandatoryItems++}))}render(){return this.mandatoryItems>0?(this.userActionsValidated=this.mandatoryActionsChecked===this.mandatoryItems,i("div",{class:"QueryReferenceContainer",ref:t=>this.stylingContainer=t},this.isLoading?i("slot",{name:"spinner"})&&i("svg",{class:"spinner",viewBox:"0 0 50 50"},i("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"})):i("div",{class:"UserActionController"},i("h2",{class:"UserConsentNotice"},m("userNoticeText",this.lang)),i("div",{class:"PlayerLegislationWrapper"},this.activeUserActions.map((t=>i("slot",{name:t},i("player-user-consents",{lang:this.lang,"gm-version":this.gmVersion,"translation-url":this.translationUrl,consentType:t,consentTitle:this.consentTitles[t],queried:this.queryFired,mandatory:this.mandatoryActions.includes(t),"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,"client-styling":this.clientStyling}))))),this.includeSubmitButton&&i("button",{class:"ConsentSubmitButton",disabled:!this.userActionsValidated,onClick:()=>this.handleApplyClick()},m("submitButtonText",this.lang))))):void 0}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],receivedQueryResponses:["handleQueryResponse"]}}};p.style=":host{display:block}.QueryReferenceContainer{height:100%;width:100%}.UserConsentNotice{font-size:1.2rem;font-weight:200;text-align:center}.CloseButton{width:25px;height:25px;align-self:flex-end}.UserActionController{font-family:Arial, Helvetica, sans-serif;font-weight:100;height:100%;width:100%;padding:1rem 1.5rem 2rem;background-color:#fff;display:flex;flex-direction:column;justify-content:space-between;border-radius:5%}.ConsentSubmitButton{font-size:1rem;padding:0.4rem 1.4rem;background:#fff;border:2px solid #000;color:#000;border-radius:5px;align-self:flex-end;cursor:pointer}.ConsentSubmitButton:disabled{border:2px solid #ccc;color:#ccc;cursor:unset}@media screen and (max-width: 320px){.QueryReferenceContainer{font-size:0.8rem;color:blue}}.spinner{animation:rotate 2s linear infinite;z-index:2;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;width:50px;height:50px}.spinner .path{stroke:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}";export{d as player_user_consents,p as user_action_controller}
@@ -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=[],v=[],y=(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(v),(p=m.length>0)&&f.raf(b)},$=t=>h().then(t),g=y(v,!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=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!S(o))&&(o+=""),s&&i?r[r.length-1].i+=o:r.push(s?R(null,o):o),i=s)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=R(t,null);return u.u=e,r.length>0&&(u.h=r),u.p=l,u},R=(t,e)=>({o:0,m:t,i:e,v:null,h:null,u:null,p:null}),A={},N=(t,e)=>null==t||S(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?t+"":t,T=(t,e,o)=>{const l=(t=>n(t).$hostElement$)(t);return{emit:t=>D(l,e,{bubbles:!!(4&o),composed:!!(2&o),cancelable:!!(1&o),detail:t})}},D=(t,e,n)=>{const o=f.ce(e,n);return t.dispatchEvent(o),o},H=new WeakMap,L=t=>"sc-"+t.$,U=(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=F(n);let s=F(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("key"===e);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(V);e=e.replace(q,""),n&&f.rel(t,e,n,l),o&&f.ael(t,e,o,l)}}},W=/\s/,F=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(W):[]),V="Capture",q=RegExp(V+"$"),G=(t,e,n)=>{const o=11===e.v.nodeType&&e.v.host?e.v.host:e.v,l=t&&t.u||{},s=e.u||{};for(const t of _(Object.keys(l)))t in s||U(o,t,l[t],void 0,n,e.o);for(const t of _(Object.keys(s)))U(o,t,l[t],s[t],n,e.o)};function _(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var z=!1,B=!1,I=(t,e,n)=>{const o=e.h[n];let l,s,i=0;if(null!==o.i)l=o.v=a.createTextNode(o.i);else{if(B||(B="svg"===o.m),l=o.v=a.createElementNS(B?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.m),B&&"foreignObject"===o.m&&(B=!1),G(null,o,B),o.h)for(i=0;i<o.h.length;++i)s=I(t,o,i),s&&l.appendChild(s);"svg"===o.m?B=!1:"foreignObject"===l.tagName&&(B=!0)}return l["s-hn"]=C,l},J=(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=I(null,n,l),i&&(o[l].v=i,Z(r,i,e)))},K=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.v;Y(e),t&&t.remove()}}},Q=(t,e,n=!1)=>t.m===e.m&&(n?(n&&!t.p&&e.p&&(t.p=e.p),!0):t.p===e.p),X=(t,e,n=!1)=>{const o=e.v=t.v,l=t.h,s=e.h,i=e.m,r=e.i;null===r?(B="svg"===i||"foreignObject"!==i&&B,("slot"!==i||z)&&G(t,e,B),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=e.length-1,h=e[0],d=e[f],p=o.length-1,m=o[0],v=o[p];for(;r<=f&&c<=p;)if(null==h)h=e[++r];else if(null==d)d=e[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(Q(h,m,l))X(h,m,l),h=e[++r],m=o[++c];else if(Q(d,v,l))X(d,v,l),d=e[--f],v=o[--p];else if(Q(h,v,l))X(h,v,l),Z(t,h.v,d.v.nextSibling),h=e[++r],v=o[--p];else if(Q(d,m,l))X(d,m,l),Z(t,d.v,h.v),d=e[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].p&&e[a].p===m.p){u=a;break}u>=0?(i=e[u],i.m!==m.m?s=I(e&&e[c],n,u):(X(i,m,l),e[u]=void 0,s=i.v),m=o[++c]):(s=I(e&&e[c],n,c),m=o[++c]),s&&Z(h.v.parentNode,s,h.v)}r>f?J(t,null==o[p+1]?null:o[p+1].v,n,o,c,p):c>p&&K(e,r,f)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),J(o,null,e,s,0,s.length-1)):!n&&null!==l&&K(l,0,l.length-1),B&&"svg"===i&&(B=!1)):t.i!==r&&(o.data=r)},Y=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(Y)},Z=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),tt=(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()})))}},et=(t,e)=>{if(t.o|=16,!(4&t.o))return tt(t,t.j),g((()=>nt(t,e)));t.o|=512},nt=(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&&(t.o|=256,t.O&&(t.O.map((([t,e])=>ut(o,t,e,n))),t.O=void 0),l=ut(o,"componentWillLoad",void 0,n)),ot(l,(()=>st(t,o,e)))},ot=(t,e)=>lt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),lt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,st=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.k,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=L(e),l=r.get(o);if(t=11===t.nodeType?t:a,l)if("string"==typeof l){let s,i=H.get(t=t.head||t);if(i||H.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.C)?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);it(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>rt(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},it=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.k,s=t.M||R(null,null),i=(t=>t&&t.m===A)(e)?e:P(null,null,e);if(C=o.tagName,l.P&&(i.u=i.u||{},l.P.map((([t,e])=>i.u[e]=o[t]))),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.m=null,i.o|=4,t.M=i,i.v=s.v=o.shadowRoot||o,z=!(!(1&l.o)||128&l.o),X(s,i,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},rt=t=>{const e=t.$hostElement$,n=t.j;ut(t.t,"componentDidRender",void 0,e),64&t.o||(t.o|=64,at(e),t.R(e),n||ct()),t.S&&(t.S(),t.S=void 0),512&t.o&&$((()=>et(t,!1))),t.o&=-517},ct=()=>{$((()=>D(u,"appload",{detail:{namespace:"user-action-controller"}})))},ut=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},at=t=>t.classList.add("hydrated"),ft=(t,e,o,l)=>{const i=n(t);if(!i)throw Error(`Couldn't find host element for "${l.$}" 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.A.get(e),u=i.o,a=i.t;if(o=N(o,l.N[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.A.set(e,o),a)){if(l.T&&128&u){const t=l.T[e];t&&t.map((t=>{try{a[t](o,c,e)}catch(t){s(t,r)}}))}2==(18&u)&&et(i,!1)}},ht=(t,e,o)=>{var l,s;const i=t.prototype;if(e.N||e.T||t.watchers){t.watchers&&!e.T&&(e.T=t.watchers);const r=Object.entries(null!=(l=e.N)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.N[t][0]|=2048),r&&(e.N[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.N[t][0]))return((t,e)=>n(this).A.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.A.get(t)?s=i.A.get(t):!i.A.get(t)&&n&&i.A.set(t,n),r.call(this,N(s,l)),void ft(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&o&&4096&e.N[t][0]))return ft(this,t,s,e),void(1&o&&!i.t&&i.D.then((()=>{4096&e.N[t][0]&&i.t[t]!==i.A.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.A.get(t)&&n&&i.A.set(t,n),i.t[t]=N(s,l),ft(this,t,i.t[t],e)};i.t?n():i.D.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.T)?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.T)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,n])=>{var l;const s=n[1]||t;return o.set(s,t),512&n[0]&&(null==(l=e.P)||l.push([t,s])),s}))]))}}return t},dt=(t,o={})=>{var l;const h=[],p=o.exclude||[],m=u.customElements,v=a.head,y=v.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],$:o[1],N:o[2],H:o[3]};4&c.o&&(S=!0),c.N=o[2],c.H=o[3],c.P=[],c.T=null!=(l=o[4])?l:{};const u=c.$,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,k:n,A:new Map};o.D=new Promise((t=>o.R=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.$}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){const t=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,pt(this,t,c.H)),$&&(clearTimeout($),$=null),g?b.push(this):f.jmp((()=>(t=>{if(!(1&f.o)){const e=n(t),o=e.k,l=()=>{};if(1&e.o)pt(t,e,o.H),(null==e?void 0:e.t)||(null==e?void 0:e.D)&&e.D.then((()=>{}));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){tt(e,e.j=n);break}}o.N&&Object.entries(o.N).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.L){const l=((t,e)=>{const n=t.$.replace(/-/g,"_"),o=t.L;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.$}#${e.U}" was not found`);o.isProxied||(n.T=o.watchers,ht(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=L(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=()=>et(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);e.W&&(e.W.map((t=>t())),e.W=void 0),(null==e?void 0:e.t)||(null==e?void 0:e.D)&&e.D.then((()=>{}))}H.has(t)&&H.delete(t),t.shadowRoot&&H.has(t.shadowRoot)&&H.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.M)?void 0:t.v)instanceof Node&&!e.M.v.isConnected&&delete e.M.v}))}componentOnReady(){return n(this).D}};c.L=t[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,ht(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.C)?l:j(a);null!=t&&w.setAttribute("nonce",t),v.insertBefore(w,y?y.nextSibling:v.firstChild)}g=!1,b.length?b.map((t=>t.connectedCallback())):f.jmp((()=>$=setTimeout(ct,30)))},pt=(t,e,n)=>{n&&n.map((([n,o,l])=>{const s=t,i=mt(e,l),r=vt(n);f.ael(s,o,i,r),(e.W=e.W||[]).push((()=>f.rel(s,o,i,r)))}))},mt=(t,e)=>n=>{var o;try{256&t.o?null==(o=t.t)||o[e](n):(t.O=t.O||[]).push([e,n])}catch(e){s(e,t.$hostElement$)}},vt=t=>({passive:!!(1&t),capture:!!(2&t)}),yt=t=>f.C=t;export{dt as b,T as c,P as h,h as p,o as r,yt 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=[],v=[],y=(t,e)=>n=>{t.push(n),p||(p=!0,e&&4&f.o?$(w):f.raf(w))},b=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){s(t)}t.length=0},w=()=>{b(m),b(v),(p=m.length>0)&&f.raf(w)},$=t=>h().then(t),g=y(v,!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=null,s=!1,i=!1;const r=[],c=e=>{for(let n=0;n<e.length;n++)o=e[n],Array.isArray(o)?c(o):null!=o&&"boolean"!=typeof o&&((s="function"!=typeof t&&!S(o))&&(o+=""),s&&i?r[r.length-1].i+=o:r.push(s?A(null,o):o),i=s)};if(c(n),e){e.key&&(l=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const u=A(t,null);return u.u=e,r.length>0&&(u.h=r),u.p=l,u},A=(t,e)=>({o:0,m:t,i:e,v:null,h:null,u:null,p:null}),L={},N=(t,e)=>null==t||S(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?t+"":t,R=(t,e,o)=>{const l=(t=>n(t).$hostElement$)(t);return{emit:t=>T(l,e,{bubbles:!!(4&o),composed:!!(2&o),cancelable:!!(1&o),detail:t})}},T=(t,e,n)=>{const o=f.ce(e,n);return t.dispatchEvent(o),o},D=new WeakMap,H=t=>"sc-"+t.$,U=(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=F(n);let s=F(o);e.remove(...l.filter((t=>t&&!s.includes(t)))),e.add(...s.filter((t=>t&&!l.includes(t))))}else if("key"===e);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(V);e=e.replace(q,""),n&&f.rel(t,e,n,l),o&&f.ael(t,e,o,l)}}},W=/\s/,F=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(W):[]),V="Capture",q=RegExp(V+"$"),G=(t,e,n)=>{const o=11===e.v.nodeType&&e.v.host?e.v.host:e.v,l=t&&t.u||{},s=e.u||{};for(const t of _(Object.keys(l)))t in s||U(o,t,l[t],void 0,n,e.o);for(const t of _(Object.keys(s)))U(o,t,l[t],s[t],n,e.o)};function _(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var z=!1,B=!1,I=(t,e,n)=>{const o=e.h[n];let l,s,i=0;if(null!==o.i)l=o.v=a.createTextNode(o.i);else{if(B||(B="svg"===o.m),l=o.v=a.createElementNS(B?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.m),B&&"foreignObject"===o.m&&(B=!1),G(null,o,B),o.h)for(i=0;i<o.h.length;++i)s=I(t,o,i),s&&l.appendChild(s);"svg"===o.m?B=!1:"foreignObject"===l.tagName&&(B=!0)}return l["s-hn"]=C,l},J=(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=I(null,n,l),i&&(o[l].v=i,Z(r,i,e)))},K=(t,e,n)=>{for(let o=e;o<=n;++o){const e=t[o];if(e){const t=e.v;Y(e),t&&t.remove()}}},Q=(t,e,n=!1)=>t.m===e.m&&(n?(n&&!t.p&&e.p&&(t.p=e.p),!0):t.p===e.p),X=(t,e,n=!1)=>{const o=e.v=t.v,l=t.h,s=e.h,i=e.m,r=e.i;null===r?(B="svg"===i||"foreignObject"!==i&&B,("slot"!==i||z)&&G(t,e,B),null!==l&&null!==s?((t,e,n,o,l=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=e.length-1,h=e[0],d=e[f],p=o.length-1,m=o[0],v=o[p];for(;r<=f&&c<=p;)if(null==h)h=e[++r];else if(null==d)d=e[--f];else if(null==m)m=o[++c];else if(null==v)v=o[--p];else if(Q(h,m,l))X(h,m,l),h=e[++r],m=o[++c];else if(Q(d,v,l))X(d,v,l),d=e[--f],v=o[--p];else if(Q(h,v,l))X(h,v,l),Z(t,h.v,d.v.nextSibling),h=e[++r],v=o[--p];else if(Q(d,m,l))X(d,m,l),Z(t,d.v,h.v),d=e[--f],m=o[++c];else{for(u=-1,a=r;a<=f;++a)if(e[a]&&null!==e[a].p&&e[a].p===m.p){u=a;break}u>=0?(i=e[u],i.m!==m.m?s=I(e&&e[c],n,u):(X(i,m,l),e[u]=void 0,s=i.v),m=o[++c]):(s=I(e&&e[c],n,c),m=o[++c]),s&&Z(h.v.parentNode,s,h.v)}r>f?J(t,null==o[p+1]?null:o[p+1].v,n,o,c,p):c>p&&K(e,r,f)})(o,l,e,s,n):null!==s?(null!==t.i&&(o.textContent=""),J(o,null,e,s,0,s.length-1)):!n&&null!==l&&K(l,0,l.length-1),B&&"svg"===i&&(B=!1)):t.i!==r&&(o.data=r)},Y=t=>{t.u&&t.u.ref&&t.u.ref(null),t.h&&t.h.map(Y)},Z=(t,e,n)=>null==t?void 0:t.insertBefore(e,n),tt=(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()})))}},et=(t,e)=>{if(t.o|=16,!(4&t.o))return tt(t,t.j),g((()=>nt(t,e)));t.o|=512},nt=(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&&(t.o|=256,t.O&&(t.O.map((([t,e])=>ut(o,t,e,n))),t.O=void 0),l=ut(o,"componentWillLoad",void 0,n)),ot(l,(()=>st(t,o,e)))},ot=(t,e)=>lt(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),lt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,st=async(t,e,n)=>{var o;const l=t.$hostElement$,s=l["s-rc"];n&&(t=>{const e=t.k,n=t.$hostElement$,o=e.o,l=((t,e)=>{var n;const o=H(e),l=r.get(o);if(t=11===t.nodeType?t:a,l)if("string"==typeof l){let s,i=D.get(t=t.head||t);if(i||D.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.C)?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);it(t,e,l,n),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const e=null!=(o=l["s-p"])?o:[],n=()=>rt(t);0===e.length?n():(Promise.all(e).then(n),t.o|=4,e.length=0)}},it=(t,e,n,o)=>{try{e=e.render(),t.o&=-17,t.o|=2,((t,e,n=!1)=>{const o=t.$hostElement$,l=t.k,s=t.M||A(null,null),i=(t=>t&&t.m===L)(e)?e:P(null,null,e);if(C=o.tagName,l.P&&(i.u=i.u||{},l.P.map((([t,e])=>i.u[e]=o[t]))),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.m=null,i.o|=4,t.M=i,i.v=s.v=o.shadowRoot||o,z=!(!(1&l.o)||128&l.o),X(s,i,n)})(t,e,o)}catch(e){s(e,t.$hostElement$)}return null},rt=t=>{const e=t.$hostElement$,n=t.t,o=t.j;64&t.o||(t.o|=64,at(e),ut(n,"componentDidLoad",void 0,e),t.A(e),o||ct()),t.S&&(t.S(),t.S=void 0),512&t.o&&$((()=>et(t,!1))),t.o&=-517},ct=()=>{$((()=>T(u,"appload",{detail:{namespace:"user-action-controller"}})))},ut=(t,e,n,o)=>{if(t&&t[e])try{return t[e](n)}catch(t){s(t,o)}},at=t=>t.classList.add("hydrated"),ft=(t,e,o,l)=>{const i=n(t);if(!i)throw Error(`Couldn't find host element for "${l.$}" 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.L.get(e),u=i.o,a=i.t;if(o=N(o,l.N[e][0]),(!(8&u)||void 0===c)&&o!==c&&(!Number.isNaN(c)||!Number.isNaN(o))&&(i.L.set(e,o),a)){if(l.R&&128&u){const t=l.R[e];t&&t.map((t=>{try{a[t](o,c,e)}catch(t){s(t,r)}}))}2==(18&u)&&et(i,!1)}},ht=(t,e,o)=>{var l,s;const i=t.prototype;if(e.N||e.R||t.watchers){t.watchers&&!e.R&&(e.R=t.watchers);const r=Object.entries(null!=(l=e.N)?l:{});if(r.map((([t,[l]])=>{if(31&l||2&o&&32&l){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.N[t][0]|=2048),r&&(e.N[t][0]|=4096),(1&o||!s)&&Object.defineProperty(i,t,{get(){{if(!(2048&e.N[t][0]))return((t,e)=>n(this).L.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.L.get(t)?s=i.L.get(t):!i.L.get(t)&&n&&i.L.set(t,n),r.call(this,N(s,l)),void ft(this,t,s=32&l?this[t]:i.$hostElement$[t],e)}{if(!(1&o&&4096&e.N[t][0]))return ft(this,t,s,e),void(1&o&&!i.t&&i.T.then((()=>{4096&e.N[t][0]&&i.t[t]!==i.L.get(t)&&(i.t[t]=s)})));const n=()=>{const n=i.t[t];!i.L.get(t)&&n&&i.L.set(t,n),i.t[t]=N(s,l),ft(this,t,i.t[t],e)};i.t?n():i.T.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.R)?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.R)?s:{}),...r.filter((([t,e])=>15&e[0])).map((([t,n])=>{var l;const s=n[1]||t;return o.set(s,t),512&n[0]&&(null==(l=e.P)||l.push([t,s])),s}))]))}}return t},dt=(t,e)=>{ut(t,"disconnectedCallback",void 0,e||t)},pt=(t,o={})=>{var l;const h=[],p=o.exclude||[],m=u.customElements,v=a.head,y=v.querySelector("meta[charset]"),b=a.createElement("style"),w=[];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],$:o[1],N:o[2],D:o[3]};4&c.o&&(S=!0),c.N=o[2],c.D=o[3],c.P=[],c.R=null!=(l=o[4])?l:{};const u=c.$,a=class extends HTMLElement{constructor(t){if(super(t),this.hasRegisteredEventListeners=!1,((t,n)=>{const o={o:0,$hostElement$:t,k:n,L:new Map};o.T=new Promise((t=>o.A=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.$}! Mode is set to ${t.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else t.attachShadow({mode:"open"})}connectedCallback(){const t=n(this);this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0,mt(this,t,c.D)),$&&(clearTimeout($),$=null),g?w.push(this):f.jmp((()=>(t=>{if(!(1&f.o)){const e=n(t),o=e.k,l=()=>{};if(1&e.o)mt(t,e,o.D),(null==e?void 0:e.t)||(null==e?void 0:e.T)&&e.T.then((()=>{}));else{e.o|=1;{let n=t;for(;n=n.parentNode||n.host;)if(n["s-p"]){tt(e,e.j=n);break}}o.N&&Object.entries(o.N).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.H){const l=((t,e)=>{const n=t.$.replace(/-/g,"_"),o=t.H;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.$}#${e.U}" was not found`);o.isProxied||(n.R=o.watchers,ht(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=H(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=()=>et(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);e.W&&(e.W.map((t=>t())),e.W=void 0),(null==e?void 0:e.t)?dt(e.t,t):(null==e?void 0:e.T)&&e.T.then((()=>dt(e.t,t)))}D.has(t)&&D.delete(t),t.shadowRoot&&D.has(t.shadowRoot)&&D.delete(t.shadowRoot)})(this))),f.raf((()=>{var t;const e=n(this),o=w.findIndex((t=>t===this));o>-1&&w.splice(o,1),(null==(t=null==e?void 0:e.M)?void 0:t.v)instanceof Node&&!e.M.v.isConnected&&delete e.M.v}))}componentOnReady(){return n(this).T}};c.H=t[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,ht(a,c,1)))}))})),h.length>0&&(S&&(b.textContent+=c),b.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",b.innerHTML.length)){b.setAttribute("data-styles","");const t=null!=(l=f.C)?l:j(a);null!=t&&b.setAttribute("nonce",t),v.insertBefore(b,y?y.nextSibling:v.firstChild)}g=!1,w.length?w.map((t=>t.connectedCallback())):f.jmp((()=>$=setTimeout(ct,30)))},mt=(t,e,n)=>{n&&n.map((([n,o,l])=>{const s=t,i=vt(e,l),r=yt(n);f.ael(s,o,i,r),(e.W=e.W||[]).push((()=>f.rel(s,o,i,r)))}))},vt=(t,e)=>n=>{var o;try{256&t.o?null==(o=t.t)||o[e](n):(t.O=t.O||[]).push([e,n])}catch(e){s(e,t.$hostElement$)}},yt=t=>({passive:!!(1&t),capture:!!(2&t)}),bt=t=>f.C=t;export{pt as b,R as c,P as h,h as p,o as r,bt as s}
@@ -1 +1 @@
1
- import{p as n,b as e}from"./p-a70608c7.js";export{s as setNonce}from"./p-a70608c7.js";import{g as t}from"./p-e1255160.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),n(t)})().then((async n=>(await t(),e([["p-649aa648",[[1,"user-action-controller",{endpoint:[513],userSession:[513,"user-session"],userId:[513,"user-id"],lang:[1537],includeSubmitButton:[516,"include-submit-button"],gmVersion:[1,"gm-version"],translationUrl:[513,"translation-url"],clientStyling:[1537,"client-styling"],clientStylingUrl:[513,"client-styling-url"],queryFired:[32],readyActionsCount:[32],activeUserActions:[32],userActionsValidated:[32],receivedQueryResponses:[32],limitStylingAppends:[32],isLoading:[32],mandatoryActionsChecked:[32],mandatoryItems:[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]],{translationUrl:["handleNewTranslations"],receivedQueryResponses:["handleQueryResponse"]}],[1,"player-user-consents",{lang:[1537],queried:[516],consentType:[513,"consent-type"],mandatory:[516],gmVersion:[1,"gm-version"],consentTitle:[513,"consent-title"],clientStyling:[1,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],textContent:[32],limitStylingAppends:[32]},null,{translationUrl:["handleNewTranslations"],clientStylingUrl:["handleStylingUrlChange"]}]]]],n))));
1
+ import{p as n,b as e}from"./p-e2754eb5.js";export{s as setNonce}from"./p-e2754eb5.js";import{g as t}from"./p-e1255160.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),n(t)})().then((async n=>(await t(),e([["p-839810ba",[[1,"user-action-controller",{endpoint:[513],userSession:[513,"user-session"],userId:[513,"user-id"],lang:[1537],includeSubmitButton:[516,"include-submit-button"],gmVersion:[1,"gm-version"],translationUrl:[513,"translation-url"],clientStyling:[1537,"client-styling"],clientStylingUrl:[513,"client-styling-url"],mbSource:[513,"mb-source"],queryFired:[32],readyActionsCount:[32],activeUserActions:[32],userActionsValidated:[32],receivedQueryResponses:[32],isLoading:[32],mandatoryActionsChecked:[32],mandatoryItems:[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]],{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],receivedQueryResponses:["handleQueryResponse"]}],[1,"player-user-consents",{lang:[1537],queried:[516],consentType:[513,"consent-type"],mandatory:[516],gmVersion:[1,"gm-version"],consentTitle:[513,"consent-title"],clientStyling:[1,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],mbSource:[513,"mb-source"],textContent:[32]},null,{translationUrl:["handleNewTranslations"],clientStylingUrl:["handleStylingUrlChange"]}]]]],n))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/user-action-controller",
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 t,c as e,h as i}from"./p-a70608c7.js";const n={en:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},ro:{termsAndConditions:{acceptPart1:"Accept ",acceptPart2:" platformei. Am citit şi înţeles ",acceptPart3:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",tc:"Termenii şi condiţiile"},privacyPolicy:{readUnderstandPart1:"Am citit şi înţeles ",readUnderstandPart2:" publicată pe acest site şi confirm că am vârstă peste 18 ani.",privacy:"Politica de confidenţialitate"},sms:"Sunt de acord să primesc promoţii de marketing prin SMS.",emailmarketing:"Sunt de acord să primesc promoţii de marketing pe e-mail."},hr:{termsAndConditions:{acceptPart1:"Prihvaćam Opće uvjete i odredbe ",acceptPart2:"",acceptPart3:"",tcLink:"Opći uvjeti i odredbe"},privacyPolicy:{readUnderstandPart1:"Pročitao sam i razumijem Politiku Privatnosti ",readUnderstandPart2:", i potvrđujem da imam više od 18 godina",privacyLink:"Politika Privatnosti"},sms:"Želim dobivati marketinški sadržaj putem sms",emailmarketing:"Želim dobivati marketinški sadržaj putem e-maila"},fr:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},cs:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."},de:{termsAndConditions:{acceptPart1:"I accept the ",acceptPart2:", I have read and understood the ",acceptPart3:" as published on this site and confirm that I am over 18 years old.",tc:"Terms and Conditions"},privacyPolicy:{readUnderstandPart1:"I have read and understood the ",readUnderstandPart2:", as published on this site and confirm that I am over 18 years old.",privacy:"Privacy Policy"},sms:"I consent to receive marketing communication via SMS.",emailmarketing:"I consent to receive marketing communication via Email."}},s=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])n[e][i]=t[e][i]})),e(!0)}))})),a=(t,e,i)=>{let s=(a=n[e||"en"],t.split(".").reduce(((t,e)=>t&&void 0!==t[e]?t[e]:null),a));var a;if(null===s)return t;if(void 0!==i)for(const[t,e]of Object.entries(i)){const i=new RegExp(`{${t}}`,"g");s=s.replace(i,e)}return s},o=class{constructor(i){t(this,i),this.userLegislationConsent=e(this,"userLegislationConsent",7),this.lang="en",this.queried=!1,this.consentType="",this.mandatory=!1,this.gmVersion="",this.consentTitle="",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.textContent="",this.limitStylingAppends=!1,this.goToTermsAndConditions=()=>window.postMessage({type:"GoToTermsAndConditions"}),this.goToPrivacyPolicy=()=>window.postMessage({type:"GoToPrivacyPolicy"}),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)})).catch((t=>{console.log("error ",t)}))}}handleNewTranslations(){s(this.translationUrl)}handleStylingUrlChange(t,e){t!==e&&this.setClientStylingURL()}async componentWillLoad(){this.translationUrl.length>2&&await s(this.translationUrl)}userLegislationConsentHandler(){this.userLegislationConsent.emit({type:this.consentType,value:this.checkboxInput.checked})}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStylingUrl&&this.setClientStylingURL(),this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}determineTextContent(){if("gmcore"===this.gmVersion&&"termsandconditions"===this.consentType)return i("p",null,a("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},a("termsAndConditions.tcLink",this.lang)),a("termsAndConditions.acceptPart2",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},a("privacyPolicy.privacyLink",this.lang)),a("termsAndConditions.acceptPart3",this.lang));if("gm16"===this.gmVersion){if("termsandconditions"===this.consentType)return i("p",null,a("termsAndConditions.acceptPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToTermsAndConditions},a("termsAndConditions.tcLink",this.lang)));if("privacypolicy"===this.consentType)return i("p",null,a("privacyPolicy.readUnderstandPart1",this.lang),i("span",{class:"ConsentLink",onClick:this.goToPrivacyPolicy},a("privacyPolicy.privacyLink",this.lang)),a("privacyPolicy.readUnderstandPart2",this.lang))}return i("p",null,a(this.consentType,this.lang))}render(){return this.queried&&this.userLegislationConsentHandler(),i("div",{key:"54601e536a075b95277641c2d123f21fb5b9a9e8",ref:t=>this.stylingContainer=t},i("p",{key:"8cceca5a2a2e69a4180e10848d0fea081fe7a78a",class:"ConsentTitle"},this.consentTitle),i("label",{key:"80f41a7876f3831c1030cba896282290f33c14b3",class:"UserConsent",htmlFor:"userConsent"},i("input",{key:"7db0bada1af6d9df763f63a4eb92e79615322801",ref:t=>this.checkboxInput=t,id:"userConsent",type:"checkbox",onInput:()=>this.userLegislationConsentHandler()}),this.determineTextContent(),this.mandatory&&i("span",{key:"ce67fcdf09cfefb48df87d043950fd4fba7fdb00",class:"MandatoryItem"},"*")))}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStylingUrl:["handleStylingUrlChange"]}}};o.style=":host{display:block}.ConsentTitle{margin-bottom:0.2rem;font-weight:600}.UserConsent:hover{cursor:pointer}.UserConsent{display:flex;align-items:baseline}.MandatoryItem{color:#f00;font-size:1.2rem}.ConsentLink{text-decoration:underline;color:var(--emw--color-primary);font-weight:bold}";const r={en:{termsAndConditionsTitle:"Terms and Conditions",smsTitle:"SMS marketing",emailMarketingTitle:"Email marketing",privacyPolicyTitle:"Privacy Policy",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Submit"},"en-us":{termsAndConditionsTitle:"Terms and Conditions",smsTitle:"SMS marketing",emailMarketingTitle:"Email marketing",privacyPolicyTitle:"Privacy Policy",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Submit"},ro:{termsAndConditionsTitle:"Termeni și Condiții",smsTitle:"Marketing prin SMS",emailMarketingTitle:"Marketing prin Email",privacyPolicyTitle:"Politica de Confidențialitate",userNoticeText:"Înainte de a continua, trebuie să vă dați consimțământul pentru următoarele",submitButtonText:"Trimite"},hr:{termsAndConditionsTitle:"Opći uvjeti i odredbe",smsTitle:"SMS makretinški sadržaj",emailMarketingTitle:"E-mail makretinški sadržaj",privacyPolicyTitle:"Politika Privatnosti",userNoticeText:"Prije nego što možete nastaviti, morate pristati na sljedeće",submitButtonText:"Pošalji"},fr:{termsAndConditionsTitle:"Termes et Conditions",smsTitle:"Marketing par SMS",emailMarketingTitle:"Marketing par Email",privacyPolicyTitle:"Politique de Confidentialité",userNoticeText:"Avant de continuer, vous devez consentir aux éléments suivants",submitButtonText:"Soumettre"},cs:{termsAndConditionsTitle:"Terms and Conditions",smsTitle:"SMS marketing",emailMarketingTitle:"Email marketing",privacyPolicyTitle:"Privacy Policy",userNoticeText:"Before you can proceed you must consent to the following",submitButtonText:"Submit"},de:{termsAndConditionsTitle:"Allgemeine Geschäftsbedingungen",smsTitle:"SMS-Marketing",emailMarketingTitle:"E-Mail-Marketing",privacyPolicyTitle:"Datenschutzrichtlinie",userNoticeText:"Bevor Sie fortfahren können, müssen Sie den folgenden Punkten zustimmen",submitButtonText:"Absenden"},es:{termsAndConditionsTitle:"Términos y Condiciones",smsTitle:"Marketing por SMS",emailMarketingTitle:"Marketing por Email",privacyPolicyTitle:"Política de Privacidad",userNoticeText:"Antes de continuar, debe dar su consentimiento a lo siguiente",submitButtonText:"Enviar"},pt:{termsAndConditionsTitle:"Termos e Condições",smsTitle:"Marketing por SMS",emailMarketingTitle:"Marketing por Email",privacyPolicyTitle:"Política de Privacidade",userNoticeText:"Antes de continuar, você deve consentir com o seguinte",submitButtonText:"Enviar"},"es-mx":{termsAndConditionsTitle:"Términos y Condiciones",smsTitle:"Marketing por SMS",emailMarketingTitle:"Marketing por Email",privacyPolicyTitle:"Política de Privacidad",userNoticeText:"Antes de continuar, debe dar su consentimiento a lo siguiente",submitButtonText:"Enviar"},"pt-br":{termsAndConditionsTitle:"Termos e Condições",smsTitle:"Marketing por SMS",emailMarketingTitle:"Marketing por Email",privacyPolicyTitle:"Política de Privacidade",userNoticeText:"Antes de continuar, você deve consentir com o seguinte",submitButtonText:"Enviar"}},c=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{r[e]||(r[e]={});for(let i in t[e])r[e][i]=t[e][i]})),e(!0)}))})),d=(t,e,i)=>{let n=r[void 0!==e&&e in r?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");n=n.replace(i,e)}return n},l=class{constructor(e){t(this,e),this.lang="en",this.gmVersion="",this.translationUrl="",this.clientStyling="",this.clientStylingUrl="",this.queryFired=!1,this.readyActionsCount=0,this.activeUserActions=[],this.userActionsValidated=!0,this.receivedQueryResponses=0,this.limitStylingAppends=!1,this.isLoading=!0,this.mandatoryActionsChecked=0,this.mandatoryActions=["termsandconditions","privacypolicy"],this.userActions=[],this.consentTitles={termsandconditions:d("termsAndConditionsTitle",this.lang),sms:d("smsTitle",this.lang),emailmarketing:d("emailMarketingTitle",this.lang),privacypolicy:d("privacyPolicyTitle",this.lang)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)})).catch((t=>{console.log("error ",t)}))}}handleNewTranslations(){c(this.translationUrl)}handleQueryResponse(){this.receivedQueryResponses===this.activeUserActions.length&&this.updateUserConsents()}userLegislationConsentHandler(t){const e=t.detail.type,i=t.detail.value;this.mandatoryActions.includes(e)&&!1===this.queryFired&&(!0===i?this.mandatoryActionsChecked++:this.mandatoryActionsChecked--),this.queryFired&&(this.userActions.push(Object.assign({tagCode:e,status:(t=>"gm16"===this.gmVersion?t?1:0:t?"Accepted":"Denied")(i)},"gm16"===this.gmVersion&&{note:""})),this.receivedQueryResponses++)}determineUserActionsCore(){const t=new URL(`${this.endpoint}/v1/player/${this.userId}/consent`),e=new Headers;return e.append("X-SessionId",this.userSession),fetch(t.href,{method:"GET",headers:e}).then((t=>t.json())).then((t=>{t.items.forEach((t=>{"Expired"===t.status&&this.activeUserActions.push(t.tagCode)})),this.isLoading=!1})).catch((t=>{console.error("Error fetching data:",t),this.isLoading=!1})).finally((()=>{this.calcMandatoryActions(),window.postMessage({type:"UserActionsExists",displayUserActions:this.mandatoryItems>0},window.location.href)}))}determineUserActions16(){const t=new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`),e=new Headers;return e.append("X-SessionId",this.userSession),fetch(t.href,{method:"GET",headers:e}).then((t=>t.json())).then((t=>{t.consents.forEach((t=>{2===t.status&&"pepconsent"!==t.tagCode&&this.activeUserActions.push(t.tagCode)})),this.isLoading=!1})).catch((t=>{console.error("Error fetching data:",t),this.isLoading=!1})).finally((()=>{this.calcMandatoryActions(),window.postMessage({type:"UserActionsExists",displayUserActions:this.mandatoryItems>0},window.location.href)}))}updateUserConsents(){const t="gmcore"===this.gmVersion?new URL(`${this.endpoint}/v1/player/${this.userId}/consent`):new URL(`${this.endpoint}/v1/player/${this.userId}/legislation/consents`);let e={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json","X-SessionId":`${this.userSession}`},body:JSON.stringify({consents:this.userActions})};fetch(t.href,e).then((t=>t.json())).then((()=>{window.postMessage({type:"WidgetNotification",data:{type:"success",message:"Consent update successful!"}},window.location.href)})).catch((t=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:"Server might not be responding",err:t}},window.location.href)})).finally((()=>{window.postMessage({type:"UserActionsCompleted"},window.location.href)}))}handleApplyClick(){this.queryFired=!0}async componentWillLoad(){"gmcore"===this.gmVersion&&this.determineUserActionsCore(),"gm16"===this.gmVersion&&this.determineUserActions16(),this.translationUrl.length>2&&await c(this.translationUrl)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}calcMandatoryActions(){this.mandatoryItems=0,this.mandatoryActions.map((t=>{this.activeUserActions.includes(t)&&this.mandatoryItems++}))}render(){return this.mandatoryItems>0?(this.userActionsValidated=this.mandatoryActionsChecked===this.mandatoryItems,i("div",{class:"QueryReferenceContainer",ref:t=>this.stylingContainer=t},this.isLoading?i("slot",{name:"spinner"})&&i("svg",{class:"spinner",viewBox:"0 0 50 50"},i("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"})):i("div",{class:"UserActionController"},i("h2",{class:"UserConsentNotice"},d("userNoticeText",this.lang)),i("div",{class:"PlayerLegislationWrapper"},this.activeUserActions.map((t=>i("slot",{name:t},i("player-user-consents",{lang:this.lang,"gm-version":this.gmVersion,"translation-url":this.translationUrl,consentType:t,consentTitle:this.consentTitles[t],queried:this.queryFired,mandatory:this.mandatoryActions.includes(t),"client-styling-url":this.clientStylingUrl,"client-styling":this.clientStyling}))))),this.includeSubmitButton&&i("button",{class:"ConsentSubmitButton",disabled:!this.userActionsValidated,onClick:()=>this.handleApplyClick()},d("submitButtonText",this.lang))))):void 0}static get watchers(){return{translationUrl:["handleNewTranslations"],receivedQueryResponses:["handleQueryResponse"]}}};l.style=":host{display:block}.QueryReferenceContainer{height:100%;width:100%}.UserConsentNotice{font-size:1.2rem;font-weight:200;text-align:center}.CloseButton{width:25px;height:25px;align-self:flex-end}.UserActionController{font-family:Arial, Helvetica, sans-serif;font-weight:100;height:100%;width:100%;padding:1rem 1.5rem 2rem;background-color:#fff;display:flex;flex-direction:column;justify-content:space-between;border-radius:5%}.ConsentSubmitButton{font-size:1rem;padding:0.4rem 1.4rem;background:#fff;border:2px solid #000;color:#000;border-radius:5px;align-self:flex-end;cursor:pointer}.ConsentSubmitButton:disabled{border:2px solid #ccc;color:#ccc;cursor:unset}@media screen and (max-width: 320px){.QueryReferenceContainer{font-size:0.8rem;color:blue}}.spinner{animation:rotate 2s linear infinite;z-index:2;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;width:50px;height:50px}.spinner .path{stroke:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C));stroke-linecap:round;animation:dash 1.5s ease-in-out infinite}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes dash{0%{stroke-dasharray:1, 150;stroke-dashoffset:0}50%{stroke-dasharray:90, 150;stroke-dashoffset:-35}100%{stroke-dasharray:90, 150;stroke-dashoffset:-124}}";export{o as player_user_consents,l as user_action_controller}