@everymatrix/player-sms-verification 1.55.0 → 1.56.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,10 +21,10 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'player-sms-verification';
24
- const BUILD = /* player-sms-verification */ { 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: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
24
+ const BUILD = /* player-sms-verification */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
@@ -343,31 +343,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
343
343
  if (nonce != null) {
344
344
  styleElm.setAttribute("nonce", nonce);
345
345
  }
346
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
347
- if (styleContainerNode.nodeName === "HEAD") {
348
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
349
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
350
- styleContainerNode.insertBefore(styleElm, referenceNode2);
351
- } else if ("host" in styleContainerNode) {
352
- if (supportsConstructableStylesheets) {
353
- const stylesheet = new CSSStyleSheet();
354
- stylesheet.replaceSync(style);
355
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
356
- } else {
357
- const existingStyleContainer = styleContainerNode.querySelector("style");
358
- if (existingStyleContainer) {
359
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
360
- } else {
361
- styleContainerNode.prepend(styleElm);
362
- }
363
- }
364
- } else {
365
- styleContainerNode.append(styleElm);
366
- }
367
- }
368
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
369
- styleContainerNode.insertBefore(styleElm, null);
370
- }
346
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
371
347
  }
372
348
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
373
349
  styleElm.innerHTML += SLOT_FB_CSS;
@@ -390,7 +366,7 @@ var attachStyles = (hostRef) => {
390
366
  const scopeId2 = addStyle(
391
367
  elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
392
368
  cmpMeta);
393
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
369
+ if (flags & 10 /* needsScopedEncapsulation */) {
394
370
  elm["s-sc"] = scopeId2;
395
371
  elm.classList.add(scopeId2 + "-h");
396
372
  }
@@ -438,11 +414,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
438
414
  if (memberName === "list") {
439
415
  isProp = false;
440
416
  } else if (oldValue == null || elm[memberName] != n) {
441
- if (typeof elm.__lookupSetter__(memberName) === "function") {
442
- elm[memberName] = n;
443
- } else {
444
- elm.setAttribute(memberName, n);
445
- }
417
+ elm[memberName] = n;
446
418
  }
447
419
  } else {
448
420
  elm[memberName] = newValue;
@@ -515,9 +487,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
515
487
  {
516
488
  updateElement(null, newVNode2, isSvgMode);
517
489
  }
518
- const rootNode = elm.getRootNode();
519
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
520
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
490
+ if (isDef(scopeId) && elm["s-si"] !== scopeId) {
521
491
  elm.classList.add(elm["s-si"] = scopeId);
522
492
  }
523
493
  if (newVNode2.$children$) {
@@ -671,10 +641,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
671
641
  elm.textContent = "";
672
642
  }
673
643
  addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
674
- } else if (
675
- // don't do this on initial render as it can cause non-hydrated content to be removed
676
- !isInitialRender && BUILD.updatable && oldChildren !== null
677
- ) {
644
+ } else if (oldChildren !== null) {
678
645
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
679
646
  }
680
647
  } else if (oldVNode.$text$ !== text) {
@@ -939,8 +906,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
939
906
  if (this.hasOwnProperty(propName)) {
940
907
  newValue = this[propName];
941
908
  delete this[propName];
942
- } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
943
- this[propName] == newValue) {
909
+ } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
944
910
  return;
945
911
  } else if (propName == null) {
946
912
  const hostRef = getHostRef(this);
@@ -1086,12 +1052,17 @@ var connectedCallback = (elm) => {
1086
1052
  }
1087
1053
  };
1088
1054
  var disconnectInstance = (instance) => {
1055
+ {
1056
+ safeCall(instance, "disconnectedCallback");
1057
+ }
1089
1058
  };
1090
1059
  var disconnectedCallback = async (elm) => {
1091
1060
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1092
1061
  const hostRef = getHostRef(elm);
1093
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1094
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1062
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1063
+ disconnectInstance(hostRef.$lazyInstance$);
1064
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1065
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1095
1066
  }
1096
1067
  }
1097
1068
  };
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1ab65bbf.js');
5
+ const index = require('./index-c10a634b.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-sms-verification.cjs",[[1,"player-sms-verification",{"endpoint":[513],"userId":[513,"user-id"],"lang":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"tempBtnResendCount":[32],"code":[32],"errMsg":[32],"msgEnterCode":[32]},null,{"clientStyling":["updateClientStyling"],"clientStylingUrl":["updateClientStyling"]}]]]], options);
11
+ return index.bootstrapLazy([["player-sms-verification.cjs",[[1,"player-sms-verification",{"endpoint":[513],"userId":[513,"user-id"],"lang":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[513,"translation-url"],"tempBtnResendCount":[32],"code":[32],"errMsg":[32],"msgEnterCode":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1ab65bbf.js');
5
+ const index = require('./index-c10a634b.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const TRANSLATIONS = {
@@ -194,6 +194,63 @@ const translate = (key, customLang) => {
194
194
  return TRANSLATIONS[lang !== undefined ? lang : DEFAULT_LANGUAGE][key];
195
195
  };
196
196
 
197
+ /**
198
+ * @name setClientStyling
199
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
200
+ * @param {HTMLElement} stylingContainer The reference element of the widget
201
+ * @param {string} clientStyling The style content
202
+ */
203
+ function setClientStyling(stylingContainer, clientStyling) {
204
+ if (stylingContainer) {
205
+ const sheet = document.createElement('style');
206
+ sheet.innerHTML = clientStyling;
207
+ stylingContainer.appendChild(sheet);
208
+ }
209
+ }
210
+
211
+ /**
212
+ * @name setClientStylingURL
213
+ * @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
214
+ * @param {HTMLElement} stylingContainer The reference element of the widget
215
+ * @param {string} clientStylingUrl The URL of the style content
216
+ */
217
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
218
+ const url = new URL(clientStylingUrl);
219
+
220
+ fetch(url.href)
221
+ .then((res) => res.text())
222
+ .then((data) => {
223
+ const cssFile = document.createElement('style');
224
+ cssFile.innerHTML = data;
225
+ if (stylingContainer) {
226
+ stylingContainer.appendChild(cssFile);
227
+ }
228
+ })
229
+ .catch((err) => {
230
+ console.error('There was an error while trying to load client styling from URL', err);
231
+ });
232
+ }
233
+
234
+ /**
235
+ * @name setStreamLibrary
236
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
237
+ * @param {HTMLElement} stylingContainer The highest element of the widget
238
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
239
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
240
+ */
241
+ function setStreamStyling(stylingContainer, domain, subscription) {
242
+ if (window.emMessageBus) {
243
+ const sheet = document.createElement('style');
244
+
245
+ window.emMessageBus.subscribe(domain, (data) => {
246
+ sheet.innerHTML = data;
247
+ if (stylingContainer) {
248
+ stylingContainer.appendChild(sheet);
249
+ }
250
+ });
251
+ }
252
+ }
253
+
197
254
  const playerSmsVerificationCss = ":host{display:block}.PlayerSmsVerification{padding:30px;display:flex;align-items:center;flex-direction:column;background:var(--emw--registration-color-bg, var(--emw--color-gray-50, #F9F8F8))}.PlayerSmsVerificationTitleContainer{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));position:relative;display:flex;flex-direction:column;width:100%;margin-bottom:60px}.PlayerSmsVerificationTitle{font-size:20px;font-weight:300;text-transform:uppercase;padding:0;margin:0}.PlayerSmsVerificationSubtitle{font-size:14px}.PlayerSmsVerificationContainer{position:relative;width:100%;display:flex;flex-direction:column;margin-bottom:75px}.PlayerSmsVerificationButtonContainer{position:relative;width:100%;display:flex;flex-direction:column;gap:25px}.PlayerSmsVerificationButton{color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));background:var(--emw--registration-color-primary, var(--emw--color-primary, #D0046C));border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #D0046C));border-radius:5px;width:100%;height:60px;padding:0;text-transform:uppercase;font-size:18px;cursor:pointer;font-family:inherit}.PlayerSmsVerificationButton:disabled{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-150, #828282);cursor:not-allowed}.PlayerSmsVerificationInput{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;position:relative;width:100%}.PlayerSmsVerificationInput input{width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;text-align:center;line-height:18px;font-family:inherit}.PlayerSmsVerificationInput.Hidden{display:none}.PlayerSmsVerificationMsg{font-size:12px;color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B))}.PlayerSmsVerificationMsg.Hidden{display:none}.PlayerSmsVerificationErrMsg{font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.PlayerSMSErrorTextPlaceholder{padding:3px}";
198
255
  const PlayerSmsVerificationStyle0 = playerSmsVerificationCss;
199
256
 
@@ -204,40 +261,28 @@ const PlayerSmsVerification = class {
204
261
  this.btnResendCount = 60;
205
262
  this.isCodeSentOnce = false;
206
263
  this.isBtnSendAvailable = true;
207
- this.setClientStyling = () => {
208
- let sheet = document.createElement('style');
209
- sheet.innerHTML = this.clientStyling;
210
- this.stylingContainer.prepend(sheet);
211
- };
212
- this.setClientStylingURL = () => {
213
- let url = new URL(this.clientStylingUrl);
214
- let cssFile = document.createElement('style');
215
- fetch(url.href)
216
- .then((res) => res.text())
217
- .then((data) => {
218
- cssFile.innerHTML = data;
219
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
220
- })
221
- .catch((err) => {
222
- console.log('error ', err);
223
- });
224
- };
225
264
  this.endpoint = undefined;
226
265
  this.userId = undefined;
227
266
  this.lang = 'en';
228
267
  this.clientStyling = '';
229
268
  this.clientStylingUrl = '';
269
+ this.mbSource = undefined;
230
270
  this.translationUrl = '';
231
271
  this.tempBtnResendCount = undefined;
232
272
  this.code = '';
233
273
  this.errMsg = '';
234
274
  this.msgEnterCode = '';
235
275
  }
236
- updateClientStyling() {
237
- if (this.clientStyling)
238
- this.setClientStyling();
239
- if (this.clientStylingUrl)
240
- this.setClientStylingURL();
276
+ handleClientStylingChange(newValue, oldValue) {
277
+ if (newValue != oldValue) {
278
+ setClientStyling(this.stylingContainer, this.clientStyling);
279
+ }
280
+ }
281
+ handleClientStylingUrlChange(newValue, oldValue) {
282
+ if (newValue != oldValue) {
283
+ if (this.clientStylingUrl)
284
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
285
+ }
241
286
  }
242
287
  componentWillLoad() {
243
288
  if (this.translationUrl) {
@@ -246,10 +291,17 @@ const PlayerSmsVerification = class {
246
291
  }
247
292
  }
248
293
  componentDidLoad() {
249
- if (this.clientStyling)
250
- this.setClientStyling();
251
- if (this.clientStylingUrl)
252
- this.setClientStylingURL();
294
+ if (this.stylingContainer) {
295
+ if (window.emMessageBus != undefined) {
296
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
297
+ }
298
+ else {
299
+ if (this.clientStyling)
300
+ setClientStyling(this.stylingContainer, this.clientStyling);
301
+ if (this.clientStylingUrl)
302
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
303
+ }
304
+ }
253
305
  }
254
306
  startTimerBtnResendCode() {
255
307
  this.isBtnSendAvailable = false;
@@ -354,14 +406,17 @@ const PlayerSmsVerification = class {
354
406
  handleInput(event) {
355
407
  this.code = event.target.value;
356
408
  }
409
+ disconnectedCallback() {
410
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
411
+ }
357
412
  render() {
358
- return index.h("div", { key: 'f9433650b2e4a6c674be0bfec4ed043dcfb89e4f', class: "PlayerSmsVerification", ref: el => this.stylingContainer = el }, index.h("div", { key: '5f232e9b271aec1ae71b37b5790593703088639f', class: "PlayerSmsVerificationTitleContainer" }, index.h("h4", { key: 'bb197f37b8bf50c4dd18a14d3961292fc195363f', class: "PlayerSmsVerificationTitle" }, translate('title', this.lang)), index.h("p", { key: 'c20c1efb474c107aa560a9d4880f98df6467254a', class: "PlayerSmsVerificationSubtitle" }, translate('subtitle', this.lang))), index.h("div", { key: '99e96a1bd91e4c94813c4f29279a37f3de7cd037', class: "PlayerSmsVerificationContainer" }, index.h("p", { key: '20762aa83d74261f01d834699159cb8f2a76038c', class: "PlayerSmsVerificationMsg" + (this.msgEnterCode ? "" : " Hidden") }, translate(this.msgEnterCode, this.lang)), index.h("div", { key: 'd55c2e83e5a97451051a0c8e6d16c00c43ea00df', class: "PlayerSmsVerificationInput" }, index.h("input", { key: '94acb6c934dde4f9b8b8476306c9851ab5ebb642', type: "text", onInput: (event) => this.handleInput(event), value: this.code })), this.errMsg
413
+ return index.h("div", { key: 'da8e1da7cf6a49519ff1c6cae3eb17ee288237f2', class: "PlayerSmsVerification", ref: el => this.stylingContainer = el }, index.h("div", { key: 'f6d7f84527ec88f6027e2ba717bb2a92fe6175e9', class: "PlayerSmsVerificationTitleContainer" }, index.h("h4", { key: '37f471083259e90b5b54e0a76f1fcff7bb40c14c', class: "PlayerSmsVerificationTitle" }, translate('title', this.lang)), index.h("p", { key: '545c12575aa056b7fc92e60f95db351c2938f85d', class: "PlayerSmsVerificationSubtitle" }, translate('subtitle', this.lang))), index.h("div", { key: '9277f7f1147b1f245393be66e66e81f1ae03f373', class: "PlayerSmsVerificationContainer" }, index.h("p", { key: 'a37c285eb9aade13bc80cc8d2fa48c3818f1316b', class: "PlayerSmsVerificationMsg" + (this.msgEnterCode ? "" : " Hidden") }, translate(this.msgEnterCode, this.lang)), index.h("div", { key: '57da383cbb9d70f9d5f656f7c9775d9311cdc923', class: "PlayerSmsVerificationInput" }, index.h("input", { key: 'cd34b784a81c9eab6b0c26dc03c5e7aafd917824', type: "text", onInput: (event) => this.handleInput(event), value: this.code })), this.errMsg
359
414
  ? index.h("p", { class: "PlayerSmsVerificationErrMsg" }, translate(this.errMsg, this.lang))
360
- : index.h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && index.h("p", { key: '1d1f1d16b5372a9bfb987ff1e905bb96e19d2ad2', class: "PlayerSMSErrorTextPlaceholder" })), index.h("div", { key: '722cc5e47fd4f45eca29624aa1227f1f313f3de3', class: "PlayerSmsVerificationButtonContainer" }, index.h("button", { key: '1413cb8915f12ab35cb87cd641d88252f520a6ae', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleSendCode.bind(this), 850), disabled: !this.isBtnSendAvailable }, this.isCodeSentOnce ? this.isBtnSendAvailable ? translate('btnResend', this.lang) : this.tempBtnResendCount : translate('btnSend', this.lang)), index.h("button", { key: '19cf151085f9b983565ff9df0851cd3256776842', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleCheckCode.bind(this), 850), disabled: !this.isCodeSentOnce || this.code === '' || this.code === undefined }, translate('btnActivate', this.lang))));
415
+ : index.h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && index.h("p", { key: 'f85d75a75e8f604fa7f5f491f1ecdb9aa1d0526e', class: "PlayerSMSErrorTextPlaceholder" })), index.h("div", { key: '51fd4a63efdf720ef743148ca2126cf188b14d83', class: "PlayerSmsVerificationButtonContainer" }, index.h("button", { key: '527ec723234d3479d120314a3bb09cea4d11224f', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleSendCode.bind(this), 850), disabled: !this.isBtnSendAvailable }, this.isCodeSentOnce ? this.isBtnSendAvailable ? translate('btnResend', this.lang) : this.tempBtnResendCount : translate('btnSend', this.lang)), index.h("button", { key: 'ac5d61787dcca55870e80e0d1c5423622b9caaf8', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleCheckCode.bind(this), 850), disabled: !this.isCodeSentOnce || this.code === '' || this.code === undefined }, translate('btnActivate', this.lang))));
361
416
  }
362
417
  static get watchers() { return {
363
- "clientStyling": ["updateClientStyling"],
364
- "clientStylingUrl": ["updateClientStyling"]
418
+ "clientStyling": ["handleClientStylingChange"],
419
+ "clientStylingUrl": ["handleClientStylingUrlChange"]
365
420
  }; }
366
421
  };
367
422
  PlayerSmsVerification.style = PlayerSmsVerificationStyle0;
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-1ab65bbf.js');
5
+ const index = require('./index-c10a634b.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  var patchBrowser = () => {
12
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('player-sms-verification.cjs.js', document.baseURI).href));
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["player-sms-verification.cjs",[[1,"player-sms-verification",{"endpoint":[513],"userId":[513,"user-id"],"lang":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"tempBtnResendCount":[32],"code":[32],"errMsg":[32],"msgEnterCode":[32]},null,{"clientStyling":["updateClientStyling"],"clientStylingUrl":["updateClientStyling"]}]]]], options);
22
+ return index.bootstrapLazy([["player-sms-verification.cjs",[[1,"player-sms-verification",{"endpoint":[513],"userId":[513,"user-id"],"lang":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[513,"translation-url"],"tempBtnResendCount":[32],"code":[32],"errMsg":[32],"msgEnterCode":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -4,8 +4,8 @@
4
4
  ],
5
5
  "compiler": {
6
6
  "name": "@stencil/core",
7
- "version": "4.22.3",
8
- "typescriptVersion": "5.5.4"
7
+ "version": "4.19.2",
8
+ "typescriptVersion": "5.4.5"
9
9
  },
10
10
  "collections": [],
11
11
  "bundles": []
@@ -1,45 +1,34 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { getTranslations, translate } from "../../utils/utils";
3
+ import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
3
4
  export class PlayerSmsVerification {
4
5
  constructor() {
5
6
  // Other variables
6
7
  this.btnResendCount = 60;
7
8
  this.isCodeSentOnce = false;
8
9
  this.isBtnSendAvailable = true;
9
- this.setClientStyling = () => {
10
- let sheet = document.createElement('style');
11
- sheet.innerHTML = this.clientStyling;
12
- this.stylingContainer.prepend(sheet);
13
- };
14
- this.setClientStylingURL = () => {
15
- let url = new URL(this.clientStylingUrl);
16
- let cssFile = document.createElement('style');
17
- fetch(url.href)
18
- .then((res) => res.text())
19
- .then((data) => {
20
- cssFile.innerHTML = data;
21
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
22
- })
23
- .catch((err) => {
24
- console.log('error ', err);
25
- });
26
- };
27
10
  this.endpoint = undefined;
28
11
  this.userId = undefined;
29
12
  this.lang = 'en';
30
13
  this.clientStyling = '';
31
14
  this.clientStylingUrl = '';
15
+ this.mbSource = undefined;
32
16
  this.translationUrl = '';
33
17
  this.tempBtnResendCount = undefined;
34
18
  this.code = '';
35
19
  this.errMsg = '';
36
20
  this.msgEnterCode = '';
37
21
  }
38
- updateClientStyling() {
39
- if (this.clientStyling)
40
- this.setClientStyling();
41
- if (this.clientStylingUrl)
42
- this.setClientStylingURL();
22
+ handleClientStylingChange(newValue, oldValue) {
23
+ if (newValue != oldValue) {
24
+ setClientStyling(this.stylingContainer, this.clientStyling);
25
+ }
26
+ }
27
+ handleClientStylingUrlChange(newValue, oldValue) {
28
+ if (newValue != oldValue) {
29
+ if (this.clientStylingUrl)
30
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
31
+ }
43
32
  }
44
33
  componentWillLoad() {
45
34
  if (this.translationUrl) {
@@ -48,10 +37,17 @@ export class PlayerSmsVerification {
48
37
  }
49
38
  }
50
39
  componentDidLoad() {
51
- if (this.clientStyling)
52
- this.setClientStyling();
53
- if (this.clientStylingUrl)
54
- this.setClientStylingURL();
40
+ if (this.stylingContainer) {
41
+ if (window.emMessageBus != undefined) {
42
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
43
+ }
44
+ else {
45
+ if (this.clientStyling)
46
+ setClientStyling(this.stylingContainer, this.clientStyling);
47
+ if (this.clientStylingUrl)
48
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
49
+ }
50
+ }
55
51
  }
56
52
  startTimerBtnResendCode() {
57
53
  this.isBtnSendAvailable = false;
@@ -156,10 +152,13 @@ export class PlayerSmsVerification {
156
152
  handleInput(event) {
157
153
  this.code = event.target.value;
158
154
  }
155
+ disconnectedCallback() {
156
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
157
+ }
159
158
  render() {
160
- return h("div", { key: 'f9433650b2e4a6c674be0bfec4ed043dcfb89e4f', class: "PlayerSmsVerification", ref: el => this.stylingContainer = el }, h("div", { key: '5f232e9b271aec1ae71b37b5790593703088639f', class: "PlayerSmsVerificationTitleContainer" }, h("h4", { key: 'bb197f37b8bf50c4dd18a14d3961292fc195363f', class: "PlayerSmsVerificationTitle" }, translate('title', this.lang)), h("p", { key: 'c20c1efb474c107aa560a9d4880f98df6467254a', class: "PlayerSmsVerificationSubtitle" }, translate('subtitle', this.lang))), h("div", { key: '99e96a1bd91e4c94813c4f29279a37f3de7cd037', class: "PlayerSmsVerificationContainer" }, h("p", { key: '20762aa83d74261f01d834699159cb8f2a76038c', class: "PlayerSmsVerificationMsg" + (this.msgEnterCode ? "" : " Hidden") }, translate(this.msgEnterCode, this.lang)), h("div", { key: 'd55c2e83e5a97451051a0c8e6d16c00c43ea00df', class: "PlayerSmsVerificationInput" }, h("input", { key: '94acb6c934dde4f9b8b8476306c9851ab5ebb642', type: "text", onInput: (event) => this.handleInput(event), value: this.code })), this.errMsg
159
+ return h("div", { key: 'da8e1da7cf6a49519ff1c6cae3eb17ee288237f2', class: "PlayerSmsVerification", ref: el => this.stylingContainer = el }, h("div", { key: 'f6d7f84527ec88f6027e2ba717bb2a92fe6175e9', class: "PlayerSmsVerificationTitleContainer" }, h("h4", { key: '37f471083259e90b5b54e0a76f1fcff7bb40c14c', class: "PlayerSmsVerificationTitle" }, translate('title', this.lang)), h("p", { key: '545c12575aa056b7fc92e60f95db351c2938f85d', class: "PlayerSmsVerificationSubtitle" }, translate('subtitle', this.lang))), h("div", { key: '9277f7f1147b1f245393be66e66e81f1ae03f373', class: "PlayerSmsVerificationContainer" }, h("p", { key: 'a37c285eb9aade13bc80cc8d2fa48c3818f1316b', class: "PlayerSmsVerificationMsg" + (this.msgEnterCode ? "" : " Hidden") }, translate(this.msgEnterCode, this.lang)), h("div", { key: '57da383cbb9d70f9d5f656f7c9775d9311cdc923', class: "PlayerSmsVerificationInput" }, h("input", { key: 'cd34b784a81c9eab6b0c26dc03c5e7aafd917824', type: "text", onInput: (event) => this.handleInput(event), value: this.code })), this.errMsg
161
160
  ? h("p", { class: "PlayerSmsVerificationErrMsg" }, translate(this.errMsg, this.lang))
162
- : h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && h("p", { key: '1d1f1d16b5372a9bfb987ff1e905bb96e19d2ad2', class: "PlayerSMSErrorTextPlaceholder" })), h("div", { key: '722cc5e47fd4f45eca29624aa1227f1f313f3de3', class: "PlayerSmsVerificationButtonContainer" }, h("button", { key: '1413cb8915f12ab35cb87cd641d88252f520a6ae', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleSendCode.bind(this), 850), disabled: !this.isBtnSendAvailable }, this.isCodeSentOnce ? this.isBtnSendAvailable ? translate('btnResend', this.lang) : this.tempBtnResendCount : translate('btnSend', this.lang)), h("button", { key: '19cf151085f9b983565ff9df0851cd3256776842', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleCheckCode.bind(this), 850), disabled: !this.isCodeSentOnce || this.code === '' || this.code === undefined }, translate('btnActivate', this.lang))));
161
+ : h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && h("p", { key: 'f85d75a75e8f604fa7f5f491f1ecdb9aa1d0526e', class: "PlayerSMSErrorTextPlaceholder" })), h("div", { key: '51fd4a63efdf720ef743148ca2126cf188b14d83', class: "PlayerSmsVerificationButtonContainer" }, h("button", { key: '527ec723234d3479d120314a3bb09cea4d11224f', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleSendCode.bind(this), 850), disabled: !this.isBtnSendAvailable }, this.isCodeSentOnce ? this.isBtnSendAvailable ? translate('btnResend', this.lang) : this.tempBtnResendCount : translate('btnSend', this.lang)), h("button", { key: 'ac5d61787dcca55870e80e0d1c5423622b9caaf8', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleCheckCode.bind(this), 850), disabled: !this.isCodeSentOnce || this.code === '' || this.code === undefined }, translate('btnActivate', this.lang))));
163
162
  }
164
163
  static get is() { return "player-sms-verification"; }
165
164
  static get encapsulation() { return "shadow"; }
@@ -263,6 +262,23 @@ export class PlayerSmsVerification {
263
262
  "reflect": true,
264
263
  "defaultValue": "''"
265
264
  },
265
+ "mbSource": {
266
+ "type": "string",
267
+ "mutable": false,
268
+ "complexType": {
269
+ "original": "string",
270
+ "resolved": "string",
271
+ "references": {}
272
+ },
273
+ "required": false,
274
+ "optional": false,
275
+ "docs": {
276
+ "tags": [],
277
+ "text": ""
278
+ },
279
+ "attribute": "mb-source",
280
+ "reflect": false
281
+ },
266
282
  "translationUrl": {
267
283
  "type": "string",
268
284
  "mutable": false,
@@ -294,10 +310,10 @@ export class PlayerSmsVerification {
294
310
  static get watchers() {
295
311
  return [{
296
312
  "propName": "clientStyling",
297
- "methodName": "updateClientStyling"
313
+ "methodName": "handleClientStylingChange"
298
314
  }, {
299
315
  "propName": "clientStylingUrl",
300
- "methodName": "updateClientStyling"
316
+ "methodName": "handleClientStylingUrlChange"
301
317
  }];
302
318
  }
303
319
  }
@@ -1,8 +1,8 @@
1
1
  const NAMESPACE = 'player-sms-verification';
2
- const BUILD = /* player-sms-verification */ { 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: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* player-sms-verification */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: false, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
@@ -321,31 +321,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
321
321
  if (nonce != null) {
322
322
  styleElm.setAttribute("nonce", nonce);
323
323
  }
324
- if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
325
- if (styleContainerNode.nodeName === "HEAD") {
326
- const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
327
- const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
328
- styleContainerNode.insertBefore(styleElm, referenceNode2);
329
- } else if ("host" in styleContainerNode) {
330
- if (supportsConstructableStylesheets) {
331
- const stylesheet = new CSSStyleSheet();
332
- stylesheet.replaceSync(style);
333
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
334
- } else {
335
- const existingStyleContainer = styleContainerNode.querySelector("style");
336
- if (existingStyleContainer) {
337
- existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
338
- } else {
339
- styleContainerNode.prepend(styleElm);
340
- }
341
- }
342
- } else {
343
- styleContainerNode.append(styleElm);
344
- }
345
- }
346
- if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
347
- styleContainerNode.insertBefore(styleElm, null);
348
- }
324
+ styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
349
325
  }
350
326
  if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
351
327
  styleElm.innerHTML += SLOT_FB_CSS;
@@ -368,7 +344,7 @@ var attachStyles = (hostRef) => {
368
344
  const scopeId2 = addStyle(
369
345
  elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
370
346
  cmpMeta);
371
- if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
347
+ if (flags & 10 /* needsScopedEncapsulation */) {
372
348
  elm["s-sc"] = scopeId2;
373
349
  elm.classList.add(scopeId2 + "-h");
374
350
  }
@@ -416,11 +392,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
416
392
  if (memberName === "list") {
417
393
  isProp = false;
418
394
  } else if (oldValue == null || elm[memberName] != n) {
419
- if (typeof elm.__lookupSetter__(memberName) === "function") {
420
- elm[memberName] = n;
421
- } else {
422
- elm.setAttribute(memberName, n);
423
- }
395
+ elm[memberName] = n;
424
396
  }
425
397
  } else {
426
398
  elm[memberName] = newValue;
@@ -493,9 +465,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
493
465
  {
494
466
  updateElement(null, newVNode2, isSvgMode);
495
467
  }
496
- const rootNode = elm.getRootNode();
497
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
498
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
468
+ if (isDef(scopeId) && elm["s-si"] !== scopeId) {
499
469
  elm.classList.add(elm["s-si"] = scopeId);
500
470
  }
501
471
  if (newVNode2.$children$) {
@@ -649,10 +619,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
649
619
  elm.textContent = "";
650
620
  }
651
621
  addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
652
- } else if (
653
- // don't do this on initial render as it can cause non-hydrated content to be removed
654
- !isInitialRender && BUILD.updatable && oldChildren !== null
655
- ) {
622
+ } else if (oldChildren !== null) {
656
623
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
657
624
  }
658
625
  } else if (oldVNode.$text$ !== text) {
@@ -917,8 +884,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
917
884
  if (this.hasOwnProperty(propName)) {
918
885
  newValue = this[propName];
919
886
  delete this[propName];
920
- } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
921
- this[propName] == newValue) {
887
+ } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
922
888
  return;
923
889
  } else if (propName == null) {
924
890
  const hostRef = getHostRef(this);
@@ -1064,12 +1030,17 @@ var connectedCallback = (elm) => {
1064
1030
  }
1065
1031
  };
1066
1032
  var disconnectInstance = (instance) => {
1033
+ {
1034
+ safeCall(instance, "disconnectedCallback");
1035
+ }
1067
1036
  };
1068
1037
  var disconnectedCallback = async (elm) => {
1069
1038
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1070
1039
  const hostRef = getHostRef(elm);
1071
- if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1072
- hostRef.$onReadyPromise$.then(() => disconnectInstance());
1040
+ if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1041
+ disconnectInstance(hostRef.$lazyInstance$);
1042
+ } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1043
+ hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
1073
1044
  }
1074
1045
  }
1075
1046
  };
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-2261775b.js';
2
- export { s as setNonce } from './index-2261775b.js';
1
+ import { b as bootstrapLazy } from './index-99e378bb.js';
2
+ export { s as setNonce } from './index-99e378bb.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-sms-verification",[[1,"player-sms-verification",{"endpoint":[513],"userId":[513,"user-id"],"lang":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"tempBtnResendCount":[32],"code":[32],"errMsg":[32],"msgEnterCode":[32]},null,{"clientStyling":["updateClientStyling"],"clientStylingUrl":["updateClientStyling"]}]]]], options);
8
+ return bootstrapLazy([["player-sms-verification",[[1,"player-sms-verification",{"endpoint":[513],"userId":[513,"user-id"],"lang":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[513,"translation-url"],"tempBtnResendCount":[32],"code":[32],"errMsg":[32],"msgEnterCode":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, h } from './index-2261775b.js';
1
+ import { r as registerInstance, h } from './index-99e378bb.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
4
  const TRANSLATIONS = {
@@ -190,6 +190,63 @@ const translate = (key, customLang) => {
190
190
  return TRANSLATIONS[lang !== undefined ? lang : DEFAULT_LANGUAGE][key];
191
191
  };
192
192
 
193
+ /**
194
+ * @name setClientStyling
195
+ * @description Method used to create and append to the passed element of the widget a style element with the content received
196
+ * @param {HTMLElement} stylingContainer The reference element of the widget
197
+ * @param {string} clientStyling The style content
198
+ */
199
+ function setClientStyling(stylingContainer, clientStyling) {
200
+ if (stylingContainer) {
201
+ const sheet = document.createElement('style');
202
+ sheet.innerHTML = clientStyling;
203
+ stylingContainer.appendChild(sheet);
204
+ }
205
+ }
206
+
207
+ /**
208
+ * @name setClientStylingURL
209
+ * @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
210
+ * @param {HTMLElement} stylingContainer The reference element of the widget
211
+ * @param {string} clientStylingUrl The URL of the style content
212
+ */
213
+ function setClientStylingURL(stylingContainer, clientStylingUrl) {
214
+ const url = new URL(clientStylingUrl);
215
+
216
+ fetch(url.href)
217
+ .then((res) => res.text())
218
+ .then((data) => {
219
+ const cssFile = document.createElement('style');
220
+ cssFile.innerHTML = data;
221
+ if (stylingContainer) {
222
+ stylingContainer.appendChild(cssFile);
223
+ }
224
+ })
225
+ .catch((err) => {
226
+ console.error('There was an error while trying to load client styling from URL', err);
227
+ });
228
+ }
229
+
230
+ /**
231
+ * @name setStreamLibrary
232
+ * @description Method used to create and append to the passed element of the widget a style element with content fetched from the MessageBus
233
+ * @param {HTMLElement} stylingContainer The highest element of the widget
234
+ * @param {string} domain The domain from where the content should be fetched (e.g. 'Casino.Style', 'App.Style', 'casino-footer.style', etc.)
235
+ * @param {ref} subscription A reference to a variable where the subscription should be saved for unsubscribing when no longer needed
236
+ */
237
+ function setStreamStyling(stylingContainer, domain, subscription) {
238
+ if (window.emMessageBus) {
239
+ const sheet = document.createElement('style');
240
+
241
+ window.emMessageBus.subscribe(domain, (data) => {
242
+ sheet.innerHTML = data;
243
+ if (stylingContainer) {
244
+ stylingContainer.appendChild(sheet);
245
+ }
246
+ });
247
+ }
248
+ }
249
+
193
250
  const playerSmsVerificationCss = ":host{display:block}.PlayerSmsVerification{padding:30px;display:flex;align-items:center;flex-direction:column;background:var(--emw--registration-color-bg, var(--emw--color-gray-50, #F9F8F8))}.PlayerSmsVerificationTitleContainer{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));position:relative;display:flex;flex-direction:column;width:100%;margin-bottom:60px}.PlayerSmsVerificationTitle{font-size:20px;font-weight:300;text-transform:uppercase;padding:0;margin:0}.PlayerSmsVerificationSubtitle{font-size:14px}.PlayerSmsVerificationContainer{position:relative;width:100%;display:flex;flex-direction:column;margin-bottom:75px}.PlayerSmsVerificationButtonContainer{position:relative;width:100%;display:flex;flex-direction:column;gap:25px}.PlayerSmsVerificationButton{color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));background:var(--emw--registration-color-primary, var(--emw--color-primary, #D0046C));border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #D0046C));border-radius:5px;width:100%;height:60px;padding:0;text-transform:uppercase;font-size:18px;cursor:pointer;font-family:inherit}.PlayerSmsVerificationButton:disabled{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-150, #828282);cursor:not-allowed}.PlayerSmsVerificationInput{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;position:relative;width:100%}.PlayerSmsVerificationInput input{width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;text-align:center;line-height:18px;font-family:inherit}.PlayerSmsVerificationInput.Hidden{display:none}.PlayerSmsVerificationMsg{font-size:12px;color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B))}.PlayerSmsVerificationMsg.Hidden{display:none}.PlayerSmsVerificationErrMsg{font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.PlayerSMSErrorTextPlaceholder{padding:3px}";
194
251
  const PlayerSmsVerificationStyle0 = playerSmsVerificationCss;
195
252
 
@@ -200,40 +257,28 @@ const PlayerSmsVerification = class {
200
257
  this.btnResendCount = 60;
201
258
  this.isCodeSentOnce = false;
202
259
  this.isBtnSendAvailable = true;
203
- this.setClientStyling = () => {
204
- let sheet = document.createElement('style');
205
- sheet.innerHTML = this.clientStyling;
206
- this.stylingContainer.prepend(sheet);
207
- };
208
- this.setClientStylingURL = () => {
209
- let url = new URL(this.clientStylingUrl);
210
- let cssFile = document.createElement('style');
211
- fetch(url.href)
212
- .then((res) => res.text())
213
- .then((data) => {
214
- cssFile.innerHTML = data;
215
- setTimeout(() => { this.stylingContainer.prepend(cssFile); }, 1);
216
- })
217
- .catch((err) => {
218
- console.log('error ', err);
219
- });
220
- };
221
260
  this.endpoint = undefined;
222
261
  this.userId = undefined;
223
262
  this.lang = 'en';
224
263
  this.clientStyling = '';
225
264
  this.clientStylingUrl = '';
265
+ this.mbSource = undefined;
226
266
  this.translationUrl = '';
227
267
  this.tempBtnResendCount = undefined;
228
268
  this.code = '';
229
269
  this.errMsg = '';
230
270
  this.msgEnterCode = '';
231
271
  }
232
- updateClientStyling() {
233
- if (this.clientStyling)
234
- this.setClientStyling();
235
- if (this.clientStylingUrl)
236
- this.setClientStylingURL();
272
+ handleClientStylingChange(newValue, oldValue) {
273
+ if (newValue != oldValue) {
274
+ setClientStyling(this.stylingContainer, this.clientStyling);
275
+ }
276
+ }
277
+ handleClientStylingUrlChange(newValue, oldValue) {
278
+ if (newValue != oldValue) {
279
+ if (this.clientStylingUrl)
280
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
281
+ }
237
282
  }
238
283
  componentWillLoad() {
239
284
  if (this.translationUrl) {
@@ -242,10 +287,17 @@ const PlayerSmsVerification = class {
242
287
  }
243
288
  }
244
289
  componentDidLoad() {
245
- if (this.clientStyling)
246
- this.setClientStyling();
247
- if (this.clientStylingUrl)
248
- this.setClientStylingURL();
290
+ if (this.stylingContainer) {
291
+ if (window.emMessageBus != undefined) {
292
+ setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`);
293
+ }
294
+ else {
295
+ if (this.clientStyling)
296
+ setClientStyling(this.stylingContainer, this.clientStyling);
297
+ if (this.clientStylingUrl)
298
+ setClientStylingURL(this.stylingContainer, this.clientStylingUrl);
299
+ }
300
+ }
249
301
  }
250
302
  startTimerBtnResendCode() {
251
303
  this.isBtnSendAvailable = false;
@@ -350,14 +402,17 @@ const PlayerSmsVerification = class {
350
402
  handleInput(event) {
351
403
  this.code = event.target.value;
352
404
  }
405
+ disconnectedCallback() {
406
+ this.stylingSubscription && this.stylingSubscription.unsubscribe();
407
+ }
353
408
  render() {
354
- return h("div", { key: 'f9433650b2e4a6c674be0bfec4ed043dcfb89e4f', class: "PlayerSmsVerification", ref: el => this.stylingContainer = el }, h("div", { key: '5f232e9b271aec1ae71b37b5790593703088639f', class: "PlayerSmsVerificationTitleContainer" }, h("h4", { key: 'bb197f37b8bf50c4dd18a14d3961292fc195363f', class: "PlayerSmsVerificationTitle" }, translate('title', this.lang)), h("p", { key: 'c20c1efb474c107aa560a9d4880f98df6467254a', class: "PlayerSmsVerificationSubtitle" }, translate('subtitle', this.lang))), h("div", { key: '99e96a1bd91e4c94813c4f29279a37f3de7cd037', class: "PlayerSmsVerificationContainer" }, h("p", { key: '20762aa83d74261f01d834699159cb8f2a76038c', class: "PlayerSmsVerificationMsg" + (this.msgEnterCode ? "" : " Hidden") }, translate(this.msgEnterCode, this.lang)), h("div", { key: 'd55c2e83e5a97451051a0c8e6d16c00c43ea00df', class: "PlayerSmsVerificationInput" }, h("input", { key: '94acb6c934dde4f9b8b8476306c9851ab5ebb642', type: "text", onInput: (event) => this.handleInput(event), value: this.code })), this.errMsg
409
+ return h("div", { key: 'da8e1da7cf6a49519ff1c6cae3eb17ee288237f2', class: "PlayerSmsVerification", ref: el => this.stylingContainer = el }, h("div", { key: 'f6d7f84527ec88f6027e2ba717bb2a92fe6175e9', class: "PlayerSmsVerificationTitleContainer" }, h("h4", { key: '37f471083259e90b5b54e0a76f1fcff7bb40c14c', class: "PlayerSmsVerificationTitle" }, translate('title', this.lang)), h("p", { key: '545c12575aa056b7fc92e60f95db351c2938f85d', class: "PlayerSmsVerificationSubtitle" }, translate('subtitle', this.lang))), h("div", { key: '9277f7f1147b1f245393be66e66e81f1ae03f373', class: "PlayerSmsVerificationContainer" }, h("p", { key: 'a37c285eb9aade13bc80cc8d2fa48c3818f1316b', class: "PlayerSmsVerificationMsg" + (this.msgEnterCode ? "" : " Hidden") }, translate(this.msgEnterCode, this.lang)), h("div", { key: '57da383cbb9d70f9d5f656f7c9775d9311cdc923', class: "PlayerSmsVerificationInput" }, h("input", { key: 'cd34b784a81c9eab6b0c26dc03c5e7aafd917824', type: "text", onInput: (event) => this.handleInput(event), value: this.code })), this.errMsg
355
410
  ? h("p", { class: "PlayerSmsVerificationErrMsg" }, translate(this.errMsg, this.lang))
356
- : h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && h("p", { key: '1d1f1d16b5372a9bfb987ff1e905bb96e19d2ad2', class: "PlayerSMSErrorTextPlaceholder" })), h("div", { key: '722cc5e47fd4f45eca29624aa1227f1f313f3de3', class: "PlayerSmsVerificationButtonContainer" }, h("button", { key: '1413cb8915f12ab35cb87cd641d88252f520a6ae', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleSendCode.bind(this), 850), disabled: !this.isBtnSendAvailable }, this.isCodeSentOnce ? this.isBtnSendAvailable ? translate('btnResend', this.lang) : this.tempBtnResendCount : translate('btnSend', this.lang)), h("button", { key: '19cf151085f9b983565ff9df0851cd3256776842', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleCheckCode.bind(this), 850), disabled: !this.isCodeSentOnce || this.code === '' || this.code === undefined }, translate('btnActivate', this.lang))));
411
+ : h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && h("p", { key: 'f85d75a75e8f604fa7f5f491f1ecdb9aa1d0526e', class: "PlayerSMSErrorTextPlaceholder" })), h("div", { key: '51fd4a63efdf720ef743148ca2126cf188b14d83', class: "PlayerSmsVerificationButtonContainer" }, h("button", { key: '527ec723234d3479d120314a3bb09cea4d11224f', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleSendCode.bind(this), 850), disabled: !this.isBtnSendAvailable }, this.isCodeSentOnce ? this.isBtnSendAvailable ? translate('btnResend', this.lang) : this.tempBtnResendCount : translate('btnSend', this.lang)), h("button", { key: 'ac5d61787dcca55870e80e0d1c5423622b9caaf8', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleCheckCode.bind(this), 850), disabled: !this.isCodeSentOnce || this.code === '' || this.code === undefined }, translate('btnActivate', this.lang))));
357
412
  }
358
413
  static get watchers() { return {
359
- "clientStyling": ["updateClientStyling"],
360
- "clientStylingUrl": ["updateClientStyling"]
414
+ "clientStyling": ["handleClientStylingChange"],
415
+ "clientStylingUrl": ["handleClientStylingUrlChange"]
361
416
  }; }
362
417
  };
363
418
  PlayerSmsVerification.style = PlayerSmsVerificationStyle0;
@@ -1,9 +1,9 @@
1
- import { p as promiseResolve, b as bootstrapLazy } from './index-2261775b.js';
2
- export { s as setNonce } from './index-2261775b.js';
1
+ import { p as promiseResolve, b as bootstrapLazy } from './index-99e378bb.js';
2
+ export { s as setNonce } from './index-99e378bb.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  /*
6
- Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
6
+ Stencil Client Patch Browser v4.19.2 | MIT Licensed | https://stenciljs.com
7
7
  */
8
8
  var patchBrowser = () => {
9
9
  const importMeta = import.meta.url;
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["player-sms-verification",[[1,"player-sms-verification",{"endpoint":[513],"userId":[513,"user-id"],"lang":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"tempBtnResendCount":[32],"code":[32],"errMsg":[32],"msgEnterCode":[32]},null,{"clientStyling":["updateClientStyling"],"clientStylingUrl":["updateClientStyling"]}]]]], options);
19
+ return bootstrapLazy([["player-sms-verification",[[1,"player-sms-verification",{"endpoint":[513],"userId":[513,"user-id"],"lang":[513],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[1,"mb-source"],"translationUrl":[513,"translation-url"],"tempBtnResendCount":[32],"code":[32],"errMsg":[32],"msgEnterCode":[32]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"]}]]]], options);
20
20
  });
@@ -1 +1 @@
1
- import{r as e,h as i}from"./p-3e6eb9ea.js";const r={en:{title:"SMS Verification required",subtitle:"You need to verify your phone number",btnSend:"Send Code",btnResend:"Resend Code",btnActivate:"Activate",msgEnterCode:"Please enter the verification code you received on your number",msgResendNotice:"A new verification code has been sent to your phone number",errGenerateCode:"An error occurred while generating your code. Please click the resend button to generate a new code",errInvalidCode:"The code is incorrect",errExceededAttempts:"Too many attempts. Try again later",errExpiredToken:"The code expired, resend code",errInvalidPhone:"The provided phone number is invalid"},ro:{title:"Verificare SMS necesară",subtitle:"Trebuie să vă verificați numărul de telefon",btnSend:"Trimite cod",btnResend:"Retrimite cod",btnActivate:"Activează",msgEnterCode:"Introduceți codul de verificare primit pe numărul dvs.",msgResendNotice:"Un nou cod de verificare a fost trimis pe numărul dvs. de telefon",errGenerateCode:"A apărut o eroare la generarea codului. Apăsați butonul de retrimitere pentru a genera un nou cod",errInvalidCode:"Codul este incorect",errExceededAttempts:"Prea multe încercări. Încercați din nou mai târziu",errExpiredToken:"Codul a expirat, retrimiteți codul",errInvalidPhone:"Numărul de telefon furnizat este invalid"},fr:{title:"Vérification SMS requise",subtitle:"Vous devez vérifier votre numéro de téléphone",btnSend:"Envoyer le code",btnResend:"Renvoyer le code",btnActivate:"Activer",msgEnterCode:"Veuillez entrer le code de vérification reçu sur votre numéro",msgResendNotice:"Un nouveau code de vérification a été envoyé à votre numéro de téléphone",errGenerateCode:"Une erreur est survenue lors de la génération de votre code. Cliquez sur le bouton renvoyer pour générer un nouveau code",errInvalidCode:"Le code est incorrect",errExceededAttempts:"Trop de tentatives. Réessayez plus tard",errExpiredToken:"Le code a expiré, renvoyez le code",errInvalidPhone:"Le numéro de téléphone fourni est invalide"},hu:{title:"SMS Verification required",subtitle:"You need to verify your phone number",btnSend:"Send Code",btnResend:"Resend Code",btnActivate:"Activate",msgEnterCode:"Please enter the verification code you received on your number",msgResendNotice:"A new verification code has been sent to your phone number",errGenerateCode:"An error occurred while generating your code. Please click the resend button to generate a new code",errInvalidCode:"The code is incorrect",errExceededAttempts:"Too many attempts. Try again later",errExpiredToken:"The code expired, resend code",errInvalidPhone:"The provided phone number is invalid"},tr:{title:"SMS Verification required",subtitle:"You need to verify your phone number",btnSend:"Send Code",btnResend:"Resend Code",btnActivate:"Activate",msgEnterCode:"Please enter the verification code you received on your number",msgResendNotice:"A new verification code has been sent to your phone number",errGenerateCode:"An error occurred while generating your code. Please click the resend button to generate a new code",errInvalidCode:"The code is incorrect",errExceededAttempts:"Too many attempts. Try again later",errExpiredToken:"The code expired, resend code",errInvalidPhone:"The provided phone number is invalid"},el:{title:"SMS Verification required",subtitle:"You need to verify your phone number",btnSend:"Send Code",btnResend:"Resend Code",btnActivate:"Activate",msgEnterCode:"Please enter the verification code you received on your number",msgResendNotice:"A new verification code has been sent to your phone number",errGenerateCode:"An error occurred while generating your code. Please click the resend button to generate a new code",errInvalidCode:"The code is incorrect",errExceededAttempts:"Too many attempts. Try again later",errExpiredToken:"The code expired, resend code",errInvalidPhone:"The provided phone number is invalid"},es:{title:"Verificación por SMS requerida",subtitle:"Debe verificar su número de teléfono",btnSend:"Enviar código",btnResend:"Reenviar código",btnActivate:"Activar",msgEnterCode:"Por favor, introduzca el código de verificación recibido en su número",msgResendNotice:"Se ha enviado un nuevo código de verificación a su número de teléfono",errGenerateCode:"Ocurrió un error al generar su código. Haga clic en el botón de reenviar para generar un nuevo código",errInvalidCode:"El código es incorrecto",errExceededAttempts:"Demasiados intentos. Inténtelo más tarde",errExpiredToken:"El código ha expirado, reenviar código",errInvalidPhone:"El número de teléfono proporcionado no es válido"},pt:{title:"Verificação SMS necessária",subtitle:"Você precisa verificar seu número de telefone",btnSend:"Enviar código",btnResend:"Reenviar código",btnActivate:"Ativar",msgEnterCode:"Por favor, insira o código de verificação recebido no seu número",msgResendNotice:"Um novo código de verificação foi enviado para o seu número de telefone",errGenerateCode:"Ocorreu um erro ao gerar seu código. Clique no botão reenviar para gerar um novo código",errInvalidCode:"O código está incorreto",errExceededAttempts:"Muitas tentativas. Tente novamente mais tarde",errExpiredToken:"O código expirou, reenviar código",errInvalidPhone:"O número de telefone fornecido é inválido"},hr:{title:"SMS verifikacija je potrebna",subtitle:"Potrebno je verificirati broj mobitela. Verifikacijski kod je poslan",btnSend:"Pošalji kod",btnResend:"Ponovno pošalji",btnActivate:"Aktiviraj",msgEnterCode:"Molimo unesite verifikacijski kod koji je poslan na broj mobitela",msgResendNotice:"Novi verifikacijski kod je poslan na broj mobitela",errGenerateCode:"Došlo je do pogreške prilikom generiranja Vašeg verifikacijskog koda. Molimo da odaberete Ponovno pošalji kako bismo poslali novi kod",errInvalidCode:"SMS kod nije ispravan",errExceededAttempts:"Previše pokušaja. Pokušajte ponovno kasnije",errExpiredToken:"Verifikacijski kod je istekao, ponovno zatražite kod",errInvalidPhone:"Navedeni telefonski broj je nevažeći"},de:{title:"SMS-Verifizierung erforderlich",subtitle:"Sie müssen Ihre Telefonnummer verifizieren",btnSend:"Code senden",btnResend:"Code erneut senden",btnActivate:"Aktivieren",msgEnterCode:"Bitte geben Sie den Verifizierungscode ein, den Sie auf Ihrer Nummer erhalten haben",msgResendNotice:"Ein neuer Verifizierungscode wurde an Ihre Telefonnummer gesendet",errGenerateCode:"Es ist ein Fehler bei der Generierung Ihres Codes aufgetreten. Klicken Sie auf die Schaltfläche zum erneuten Senden, um einen neuen Code zu generieren",errInvalidCode:"Der Code ist falsch",errExceededAttempts:"Zu viele Versuche. Bitte versuchen Sie es später erneut",errExpiredToken:"Der Code ist abgelaufen, bitte erneut senden",errInvalidPhone:"Die angegebene Telefonnummer ist ungültig"},"es-mx":{title:"Verificación por SMS requerida",subtitle:"Debe verificar su número de teléfono",btnSend:"Enviar código",btnResend:"Reenviar código",btnActivate:"Activar",msgEnterCode:"Por favor, introduzca el código de verificación recibido en su número",msgResendNotice:"Se ha enviado un nuevo código de verificación a su número de teléfono",errGenerateCode:"Ocurrió un error al generar su código. Haga clic en el botón de reenviar para generar un nuevo código",errInvalidCode:"El código es incorrecto",errExceededAttempts:"Demasiados intentos. Inténtelo más tarde",errExpiredToken:"El código ha expirado, reenviar código",errInvalidPhone:"El número de teléfono proporcionado no es válido"},"pt-br":{title:"Verificação SMS necessária",subtitle:"Você precisa verificar seu número de telefone",btnSend:"Enviar código",btnResend:"Reenviar código",btnActivate:"Ativar",msgEnterCode:"Por favor, insira o código de verificação recebido no seu número",msgResendNotice:"Um novo código de verificação foi enviado para o seu número de telefone",errGenerateCode:"Ocorreu um erro ao gerar seu código. Clique no botão reenviar para gerar um novo código",errInvalidCode:"O código está incorreto",errExceededAttempts:"Muitas tentativas. Tente novamente mais tarde",errExpiredToken:"O código expirou, reenviar código",errInvalidPhone:"O número de telefone fornecido é inválido"}},t=(e,i)=>r[void 0!==i?i:"en"][e],o=class{constructor(i){e(this,i),this.btnResendCount=60,this.isCodeSentOnce=!1,this.isBtnSendAvailable=!0,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{i.innerHTML=e,setTimeout((()=>{this.stylingContainer.prepend(i)}),1)})).catch((e=>{console.log("error ",e)}))},this.endpoint=void 0,this.userId=void 0,this.lang="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.tempBtnResendCount=void 0,this.code="",this.errMsg="",this.msgEnterCode=""}updateClientStyling(){this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL()}componentWillLoad(){if(this.translationUrl)return e=this.translationUrl,new Promise((i=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((i=>{for(let t in e[i])r[i][t]=e[i][t]})),i(!0)}))}));var e}componentDidLoad(){this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL()}startTimerBtnResendCode(){this.isBtnSendAvailable=!1,this.tempBtnResendCount=this.btnResendCount,this.btnResendTimer=setInterval((()=>{this.tempBtnResendCount--,this.tempBtnResendCount<0&&(clearInterval(this.btnResendTimer),this.isBtnSendAvailable=!0)}),1e3)}setErrMsg(e){"INVALID_CODE"===e?this.errMsg="errInvalidCode":"BLOCK_USER_INCORRECT_CODE"===e?this.errMsg="errExceededAttempts":"ExpiredToken"===e?this.errMsg="errExpiredToken":"errGenerateCode"===e?this.errMsg="errGenerateCode":"INVALID_PHONE_NUMBER"===e&&(this.errMsg="errInvalidPhone")}debounce(e,i){return function(...r){clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>{e.apply(this,r)}),i)}}handleSendCode(){this.errMsg="";let e=new URL(`${this.endpoint}/v1/player/legislation/generate2FACode`);const i={method:"POST",headers:{accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({userId:`${this.userId}`})};fetch(e.href,i).then((()=>{this.msgEnterCode="msgEnterCode",this.isCodeSentOnce&&this.startTimerBtnResendCode(),this.isCodeSentOnce=!0})).catch((e=>{this.setErrMsg("errGenerateCode"),window.postMessage({type:"WidgetNotification",data:{type:"error",message:e}},window.location.href)}))}handleCheckCode(){let e=new URL(`${this.endpoint}/v1/player/legislation/generate2FACode`);e.searchParams.append("userId",this.userId),e.searchParams.append("code",this.code),fetch(e.href,{method:"GET",headers:{accept:"application/json"}}).then((e=>e.json())).then((e=>{200===e.httpStatusCode?(this.errMsg="",window.postMessage({type:"SmsVerificationSuccess"},window.location.href)):e.thirdPartyResponse&&(this.setErrMsg(e.thirdPartyResponse.message),"errExceededAttempts"===this.errMsg&&window.postMessage({type:"SmsVerificationErrExceededAttempts",data:t(this.errMsg)},window.location.href))})).catch((e=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:e}},window.location.href)})).finally((()=>{this.code=""}))}handleInput(e){this.code=e.target.value}render(){return i("div",{key:"f9433650b2e4a6c674be0bfec4ed043dcfb89e4f",class:"PlayerSmsVerification",ref:e=>this.stylingContainer=e},i("div",{key:"5f232e9b271aec1ae71b37b5790593703088639f",class:"PlayerSmsVerificationTitleContainer"},i("h4",{key:"bb197f37b8bf50c4dd18a14d3961292fc195363f",class:"PlayerSmsVerificationTitle"},t("title",this.lang)),i("p",{key:"c20c1efb474c107aa560a9d4880f98df6467254a",class:"PlayerSmsVerificationSubtitle"},t("subtitle",this.lang))),i("div",{key:"99e96a1bd91e4c94813c4f29279a37f3de7cd037",class:"PlayerSmsVerificationContainer"},i("p",{key:"20762aa83d74261f01d834699159cb8f2a76038c",class:"PlayerSmsVerificationMsg"+(this.msgEnterCode?"":" Hidden")},t(this.msgEnterCode,this.lang)),i("div",{key:"d55c2e83e5a97451051a0c8e6d16c00c43ea00df",class:"PlayerSmsVerificationInput"},i("input",{key:"94acb6c934dde4f9b8b8476306c9851ab5ebb642",type:"text",onInput:e=>this.handleInput(e),value:this.code})),this.errMsg?i("p",{class:"PlayerSmsVerificationErrMsg"},t(this.errMsg,this.lang)):i("p",{class:"PlayerSmsVerificationMsg"+(!this.isBtnSendAvailable&&this.isCodeSentOnce?"":" Hidden")},t("msgResendNotice",this.lang)),!this.errMsg&&i("p",{key:"1d1f1d16b5372a9bfb987ff1e905bb96e19d2ad2",class:"PlayerSMSErrorTextPlaceholder"})),i("div",{key:"722cc5e47fd4f45eca29624aa1227f1f313f3de3",class:"PlayerSmsVerificationButtonContainer"},i("button",{key:"1413cb8915f12ab35cb87cd641d88252f520a6ae",class:"PlayerSmsVerificationButton",onClick:this.debounce(this.handleSendCode.bind(this),850),disabled:!this.isBtnSendAvailable},this.isCodeSentOnce?this.isBtnSendAvailable?t("btnResend",this.lang):this.tempBtnResendCount:t("btnSend",this.lang)),i("button",{key:"19cf151085f9b983565ff9df0851cd3256776842",class:"PlayerSmsVerificationButton",onClick:this.debounce(this.handleCheckCode.bind(this),850),disabled:!this.isCodeSentOnce||""===this.code||void 0===this.code},t("btnActivate",this.lang))))}static get watchers(){return{clientStyling:["updateClientStyling"],clientStylingUrl:["updateClientStyling"]}}};o.style=":host{display:block}.PlayerSmsVerification{padding:30px;display:flex;align-items:center;flex-direction:column;background:var(--emw--registration-color-bg, var(--emw--color-gray-50, #F9F8F8))}.PlayerSmsVerificationTitleContainer{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));position:relative;display:flex;flex-direction:column;width:100%;margin-bottom:60px}.PlayerSmsVerificationTitle{font-size:20px;font-weight:300;text-transform:uppercase;padding:0;margin:0}.PlayerSmsVerificationSubtitle{font-size:14px}.PlayerSmsVerificationContainer{position:relative;width:100%;display:flex;flex-direction:column;margin-bottom:75px}.PlayerSmsVerificationButtonContainer{position:relative;width:100%;display:flex;flex-direction:column;gap:25px}.PlayerSmsVerificationButton{color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));background:var(--emw--registration-color-primary, var(--emw--color-primary, #D0046C));border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #D0046C));border-radius:5px;width:100%;height:60px;padding:0;text-transform:uppercase;font-size:18px;cursor:pointer;font-family:inherit}.PlayerSmsVerificationButton:disabled{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-150, #828282);cursor:not-allowed}.PlayerSmsVerificationInput{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;position:relative;width:100%}.PlayerSmsVerificationInput input{width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;text-align:center;line-height:18px;font-family:inherit}.PlayerSmsVerificationInput.Hidden{display:none}.PlayerSmsVerificationMsg{font-size:12px;color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B))}.PlayerSmsVerificationMsg.Hidden{display:none}.PlayerSmsVerificationErrMsg{font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.PlayerSMSErrorTextPlaceholder{padding:3px}";export{o as player_sms_verification}
1
+ import{r as e,h as i}from"./p-b187e9e6.js";const r={en:{title:"SMS Verification required",subtitle:"You need to verify your phone number",btnSend:"Send Code",btnResend:"Resend Code",btnActivate:"Activate",msgEnterCode:"Please enter the verification code you received on your number",msgResendNotice:"A new verification code has been sent to your phone number",errGenerateCode:"An error occurred while generating your code. Please click the resend button to generate a new code",errInvalidCode:"The code is incorrect",errExceededAttempts:"Too many attempts. Try again later",errExpiredToken:"The code expired, resend code",errInvalidPhone:"The provided phone number is invalid"},ro:{title:"Verificare SMS necesară",subtitle:"Trebuie să vă verificați numărul de telefon",btnSend:"Trimite cod",btnResend:"Retrimite cod",btnActivate:"Activează",msgEnterCode:"Introduceți codul de verificare primit pe numărul dvs.",msgResendNotice:"Un nou cod de verificare a fost trimis pe numărul dvs. de telefon",errGenerateCode:"A apărut o eroare la generarea codului. Apăsați butonul de retrimitere pentru a genera un nou cod",errInvalidCode:"Codul este incorect",errExceededAttempts:"Prea multe încercări. Încercați din nou mai târziu",errExpiredToken:"Codul a expirat, retrimiteți codul",errInvalidPhone:"Numărul de telefon furnizat este invalid"},fr:{title:"Vérification SMS requise",subtitle:"Vous devez vérifier votre numéro de téléphone",btnSend:"Envoyer le code",btnResend:"Renvoyer le code",btnActivate:"Activer",msgEnterCode:"Veuillez entrer le code de vérification reçu sur votre numéro",msgResendNotice:"Un nouveau code de vérification a été envoyé à votre numéro de téléphone",errGenerateCode:"Une erreur est survenue lors de la génération de votre code. Cliquez sur le bouton renvoyer pour générer un nouveau code",errInvalidCode:"Le code est incorrect",errExceededAttempts:"Trop de tentatives. Réessayez plus tard",errExpiredToken:"Le code a expiré, renvoyez le code",errInvalidPhone:"Le numéro de téléphone fourni est invalide"},hu:{title:"SMS Verification required",subtitle:"You need to verify your phone number",btnSend:"Send Code",btnResend:"Resend Code",btnActivate:"Activate",msgEnterCode:"Please enter the verification code you received on your number",msgResendNotice:"A new verification code has been sent to your phone number",errGenerateCode:"An error occurred while generating your code. Please click the resend button to generate a new code",errInvalidCode:"The code is incorrect",errExceededAttempts:"Too many attempts. Try again later",errExpiredToken:"The code expired, resend code",errInvalidPhone:"The provided phone number is invalid"},tr:{title:"SMS Verification required",subtitle:"You need to verify your phone number",btnSend:"Send Code",btnResend:"Resend Code",btnActivate:"Activate",msgEnterCode:"Please enter the verification code you received on your number",msgResendNotice:"A new verification code has been sent to your phone number",errGenerateCode:"An error occurred while generating your code. Please click the resend button to generate a new code",errInvalidCode:"The code is incorrect",errExceededAttempts:"Too many attempts. Try again later",errExpiredToken:"The code expired, resend code",errInvalidPhone:"The provided phone number is invalid"},el:{title:"SMS Verification required",subtitle:"You need to verify your phone number",btnSend:"Send Code",btnResend:"Resend Code",btnActivate:"Activate",msgEnterCode:"Please enter the verification code you received on your number",msgResendNotice:"A new verification code has been sent to your phone number",errGenerateCode:"An error occurred while generating your code. Please click the resend button to generate a new code",errInvalidCode:"The code is incorrect",errExceededAttempts:"Too many attempts. Try again later",errExpiredToken:"The code expired, resend code",errInvalidPhone:"The provided phone number is invalid"},es:{title:"Verificación por SMS requerida",subtitle:"Debe verificar su número de teléfono",btnSend:"Enviar código",btnResend:"Reenviar código",btnActivate:"Activar",msgEnterCode:"Por favor, introduzca el código de verificación recibido en su número",msgResendNotice:"Se ha enviado un nuevo código de verificación a su número de teléfono",errGenerateCode:"Ocurrió un error al generar su código. Haga clic en el botón de reenviar para generar un nuevo código",errInvalidCode:"El código es incorrecto",errExceededAttempts:"Demasiados intentos. Inténtelo más tarde",errExpiredToken:"El código ha expirado, reenviar código",errInvalidPhone:"El número de teléfono proporcionado no es válido"},pt:{title:"Verificação SMS necessária",subtitle:"Você precisa verificar seu número de telefone",btnSend:"Enviar código",btnResend:"Reenviar código",btnActivate:"Ativar",msgEnterCode:"Por favor, insira o código de verificação recebido no seu número",msgResendNotice:"Um novo código de verificação foi enviado para o seu número de telefone",errGenerateCode:"Ocorreu um erro ao gerar seu código. Clique no botão reenviar para gerar um novo código",errInvalidCode:"O código está incorreto",errExceededAttempts:"Muitas tentativas. Tente novamente mais tarde",errExpiredToken:"O código expirou, reenviar código",errInvalidPhone:"O número de telefone fornecido é inválido"},hr:{title:"SMS verifikacija je potrebna",subtitle:"Potrebno je verificirati broj mobitela. Verifikacijski kod je poslan",btnSend:"Pošalji kod",btnResend:"Ponovno pošalji",btnActivate:"Aktiviraj",msgEnterCode:"Molimo unesite verifikacijski kod koji je poslan na broj mobitela",msgResendNotice:"Novi verifikacijski kod je poslan na broj mobitela",errGenerateCode:"Došlo je do pogreške prilikom generiranja Vašeg verifikacijskog koda. Molimo da odaberete Ponovno pošalji kako bismo poslali novi kod",errInvalidCode:"SMS kod nije ispravan",errExceededAttempts:"Previše pokušaja. Pokušajte ponovno kasnije",errExpiredToken:"Verifikacijski kod je istekao, ponovno zatražite kod",errInvalidPhone:"Navedeni telefonski broj je nevažeći"},de:{title:"SMS-Verifizierung erforderlich",subtitle:"Sie müssen Ihre Telefonnummer verifizieren",btnSend:"Code senden",btnResend:"Code erneut senden",btnActivate:"Aktivieren",msgEnterCode:"Bitte geben Sie den Verifizierungscode ein, den Sie auf Ihrer Nummer erhalten haben",msgResendNotice:"Ein neuer Verifizierungscode wurde an Ihre Telefonnummer gesendet",errGenerateCode:"Es ist ein Fehler bei der Generierung Ihres Codes aufgetreten. Klicken Sie auf die Schaltfläche zum erneuten Senden, um einen neuen Code zu generieren",errInvalidCode:"Der Code ist falsch",errExceededAttempts:"Zu viele Versuche. Bitte versuchen Sie es später erneut",errExpiredToken:"Der Code ist abgelaufen, bitte erneut senden",errInvalidPhone:"Die angegebene Telefonnummer ist ungültig"},"es-mx":{title:"Verificación por SMS requerida",subtitle:"Debe verificar su número de teléfono",btnSend:"Enviar código",btnResend:"Reenviar código",btnActivate:"Activar",msgEnterCode:"Por favor, introduzca el código de verificación recibido en su número",msgResendNotice:"Se ha enviado un nuevo código de verificación a su número de teléfono",errGenerateCode:"Ocurrió un error al generar su código. Haga clic en el botón de reenviar para generar un nuevo código",errInvalidCode:"El código es incorrecto",errExceededAttempts:"Demasiados intentos. Inténtelo más tarde",errExpiredToken:"El código ha expirado, reenviar código",errInvalidPhone:"El número de teléfono proporcionado no es válido"},"pt-br":{title:"Verificação SMS necessária",subtitle:"Você precisa verificar seu número de telefone",btnSend:"Enviar código",btnResend:"Reenviar código",btnActivate:"Ativar",msgEnterCode:"Por favor, insira o código de verificação recebido no seu número",msgResendNotice:"Um novo código de verificação foi enviado para o seu número de telefone",errGenerateCode:"Ocorreu um erro ao gerar seu código. Clique no botão reenviar para gerar um novo código",errInvalidCode:"O código está incorreto",errExceededAttempts:"Muitas tentativas. Tente novamente mais tarde",errExpiredToken:"O código expirou, reenviar código",errInvalidPhone:"O número de telefone fornecido é inválido"}},t=(e,i)=>r[void 0!==i?i:"en"][e];function o(e,i){if(e){const r=document.createElement("style");r.innerHTML=i,e.appendChild(r)}}function n(e,i){const r=new URL(i);fetch(r.href).then((e=>e.text())).then((i=>{const r=document.createElement("style");r.innerHTML=i,e&&e.appendChild(r)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}const a=class{constructor(i){e(this,i),this.btnResendCount=60,this.isCodeSentOnce=!1,this.isBtnSendAvailable=!0,this.endpoint=void 0,this.userId=void 0,this.lang="en",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.tempBtnResendCount=void 0,this.code="",this.errMsg="",this.msgEnterCode=""}handleClientStylingChange(e,i){e!=i&&o(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(e,i){e!=i&&this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl)}componentWillLoad(){if(this.translationUrl)return e=this.translationUrl,new Promise((i=>{fetch(e).then((e=>e.json())).then((e=>{Object.keys(e).forEach((i=>{for(let t in e[i])r[i][t]=e[i][t]})),i(!0)}))}));var e}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?function(e,i){if(window.emMessageBus){const r=document.createElement("style");window.emMessageBus.subscribe(i,(i=>{r.innerHTML=i,e&&e.appendChild(r)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl)))}startTimerBtnResendCode(){this.isBtnSendAvailable=!1,this.tempBtnResendCount=this.btnResendCount,this.btnResendTimer=setInterval((()=>{this.tempBtnResendCount--,this.tempBtnResendCount<0&&(clearInterval(this.btnResendTimer),this.isBtnSendAvailable=!0)}),1e3)}setErrMsg(e){"INVALID_CODE"===e?this.errMsg="errInvalidCode":"BLOCK_USER_INCORRECT_CODE"===e?this.errMsg="errExceededAttempts":"ExpiredToken"===e?this.errMsg="errExpiredToken":"errGenerateCode"===e?this.errMsg="errGenerateCode":"INVALID_PHONE_NUMBER"===e&&(this.errMsg="errInvalidPhone")}debounce(e,i){return function(...r){clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>{e.apply(this,r)}),i)}}handleSendCode(){this.errMsg="";let e=new URL(`${this.endpoint}/v1/player/legislation/generate2FACode`);const i={method:"POST",headers:{accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({userId:`${this.userId}`})};fetch(e.href,i).then((()=>{this.msgEnterCode="msgEnterCode",this.isCodeSentOnce&&this.startTimerBtnResendCode(),this.isCodeSentOnce=!0})).catch((e=>{this.setErrMsg("errGenerateCode"),window.postMessage({type:"WidgetNotification",data:{type:"error",message:e}},window.location.href)}))}handleCheckCode(){let e=new URL(`${this.endpoint}/v1/player/legislation/generate2FACode`);e.searchParams.append("userId",this.userId),e.searchParams.append("code",this.code),fetch(e.href,{method:"GET",headers:{accept:"application/json"}}).then((e=>e.json())).then((e=>{200===e.httpStatusCode?(this.errMsg="",window.postMessage({type:"SmsVerificationSuccess"},window.location.href)):e.thirdPartyResponse&&(this.setErrMsg(e.thirdPartyResponse.message),"errExceededAttempts"===this.errMsg&&window.postMessage({type:"SmsVerificationErrExceededAttempts",data:t(this.errMsg)},window.location.href))})).catch((e=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:e}},window.location.href)})).finally((()=>{this.code=""}))}handleInput(e){this.code=e.target.value}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return i("div",{key:"da8e1da7cf6a49519ff1c6cae3eb17ee288237f2",class:"PlayerSmsVerification",ref:e=>this.stylingContainer=e},i("div",{key:"f6d7f84527ec88f6027e2ba717bb2a92fe6175e9",class:"PlayerSmsVerificationTitleContainer"},i("h4",{key:"37f471083259e90b5b54e0a76f1fcff7bb40c14c",class:"PlayerSmsVerificationTitle"},t("title",this.lang)),i("p",{key:"545c12575aa056b7fc92e60f95db351c2938f85d",class:"PlayerSmsVerificationSubtitle"},t("subtitle",this.lang))),i("div",{key:"9277f7f1147b1f245393be66e66e81f1ae03f373",class:"PlayerSmsVerificationContainer"},i("p",{key:"a37c285eb9aade13bc80cc8d2fa48c3818f1316b",class:"PlayerSmsVerificationMsg"+(this.msgEnterCode?"":" Hidden")},t(this.msgEnterCode,this.lang)),i("div",{key:"57da383cbb9d70f9d5f656f7c9775d9311cdc923",class:"PlayerSmsVerificationInput"},i("input",{key:"cd34b784a81c9eab6b0c26dc03c5e7aafd917824",type:"text",onInput:e=>this.handleInput(e),value:this.code})),this.errMsg?i("p",{class:"PlayerSmsVerificationErrMsg"},t(this.errMsg,this.lang)):i("p",{class:"PlayerSmsVerificationMsg"+(!this.isBtnSendAvailable&&this.isCodeSentOnce?"":" Hidden")},t("msgResendNotice",this.lang)),!this.errMsg&&i("p",{key:"f85d75a75e8f604fa7f5f491f1ecdb9aa1d0526e",class:"PlayerSMSErrorTextPlaceholder"})),i("div",{key:"51fd4a63efdf720ef743148ca2126cf188b14d83",class:"PlayerSmsVerificationButtonContainer"},i("button",{key:"527ec723234d3479d120314a3bb09cea4d11224f",class:"PlayerSmsVerificationButton",onClick:this.debounce(this.handleSendCode.bind(this),850),disabled:!this.isBtnSendAvailable},this.isCodeSentOnce?this.isBtnSendAvailable?t("btnResend",this.lang):this.tempBtnResendCount:t("btnSend",this.lang)),i("button",{key:"ac5d61787dcca55870e80e0d1c5423622b9caaf8",class:"PlayerSmsVerificationButton",onClick:this.debounce(this.handleCheckCode.bind(this),850),disabled:!this.isCodeSentOnce||""===this.code||void 0===this.code},t("btnActivate",this.lang))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};a.style=":host{display:block}.PlayerSmsVerification{padding:30px;display:flex;align-items:center;flex-direction:column;background:var(--emw--registration-color-bg, var(--emw--color-gray-50, #F9F8F8))}.PlayerSmsVerificationTitleContainer{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));position:relative;display:flex;flex-direction:column;width:100%;margin-bottom:60px}.PlayerSmsVerificationTitle{font-size:20px;font-weight:300;text-transform:uppercase;padding:0;margin:0}.PlayerSmsVerificationSubtitle{font-size:14px}.PlayerSmsVerificationContainer{position:relative;width:100%;display:flex;flex-direction:column;margin-bottom:75px}.PlayerSmsVerificationButtonContainer{position:relative;width:100%;display:flex;flex-direction:column;gap:25px}.PlayerSmsVerificationButton{color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));background:var(--emw--registration-color-primary, var(--emw--color-primary, #D0046C));border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #D0046C));border-radius:5px;width:100%;height:60px;padding:0;text-transform:uppercase;font-size:18px;cursor:pointer;font-family:inherit}.PlayerSmsVerificationButton:disabled{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-150, #828282);cursor:not-allowed}.PlayerSmsVerificationInput{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;position:relative;width:100%}.PlayerSmsVerificationInput input{width:100%;height:44px;border:1px solid var(--emw--color-gray-100, #E6E6E6);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;text-align:center;line-height:18px;font-family:inherit}.PlayerSmsVerificationInput.Hidden{display:none}.PlayerSmsVerificationMsg{font-size:12px;color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B))}.PlayerSmsVerificationMsg.Hidden{display:none}.PlayerSmsVerificationErrMsg{font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.PlayerSMSErrorTextPlaceholder{padding:3px}";export{a as player_sms_verification}
@@ -0,0 +1,2 @@
1
+ var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),d=!1,m=[],y=[],$=(e,t)=>n=>{e.push(n),d||(d=!0,t&&4&f.l?b(v):f.raf(v))},w=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},v=()=>{w(m),w(y),(d=m.length>0)&&f.raf(v)},b=e=>h().then(e),S=$(y,!0),g={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>O,unwrap:()=>P,unwrapErr:()=>L});var O=e=>({isOk:!0,isErr:!1,value:e}),E=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return E(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},L=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!j(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?T(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=T(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},T=(e,t)=>({l:0,m:e,i:t,$:null,h:null,u:null,p:null}),A={},N=new WeakMap,U=e=>"sc-"+e.v,W=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=F(n),s=F(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(H);t=t.replace(q,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},D=/\s/,F=e=>e?e.split(D):[],H="Capture",q=RegExp(H+"$"),G=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||g,s=t.u||g;for(const e of V(Object.keys(o)))e in s||W(l,e,o[e],void 0,n,t.l);for(const e of V(Object.keys(s)))W(l,e,o[e],s[e],n,t.l)};function V(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var _=!1,z=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.$=a.createTextNode(l.i);else if(o=l.$=a.createElement(l.m),G(null,l,_),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=z(e,l,r),s&&o.appendChild(s);return o["s-hn"]=x,o},B=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=z(null,n,o),r&&(l[o].$=r,X(i,r,t)))},I=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;Q(t),e&&e.remove()}}},J=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),K=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.i;null===r?(G(e,t,_),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],p=t[f],d=l.length-1,m=l[0],y=l[d];for(;i<=f&&c<=d;)if(null==h)h=t[++i];else if(null==p)p=t[--f];else if(null==m)m=l[++c];else if(null==y)y=l[--d];else if(J(h,m,o))K(h,m,o),h=t[++i],m=l[++c];else if(J(p,y,o))K(p,y,o),p=t[--f],y=l[--d];else if(J(h,y,o))K(h,y,o),X(e,h.$,p.$.nextSibling),h=t[++i],y=l[--d];else if(J(p,m,o))K(p,m,o),X(e,p.$,h.$),p=t[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(r=t[u],r.m!==m.m?s=z(t&&t[c],n,u):(K(r,m,o),t[u]=void 0,s=r.$),m=l[++c]):(s=z(t&&t[c],n,c),m=l[++c]),s&&X(h.$.parentNode,s,h.$)}i>f?B(e,null==l[d+1]?null:l[d+1].$,n,l,c,d):c>d&&I(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),B(l,null,t,s,0,s.length-1)):null!==o&&I(o,0,o.length-1)):e.i!==r&&(l.data=r)},Q=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Q)},X=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),Y=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},Z=(e,t)=>{if(e.l|=16,!(4&e.l))return Y(e,e.j),S((()=>ee(e,t)));e.l|=512},ee=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.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 t&&(l=ie(n,"componentWillLoad")),te(l,(()=>le(e,n,t)))},te=(e,t)=>ne(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),ne=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,le=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.k,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=U(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=N.get(e=e.head||e);if(r||N.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const t=null!=(n=f.O)?n:k(a);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);oe(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>se(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},oe=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.k,s=e.C||T(null,null),r=(e=>e&&e.m===A)(t)?t:R(null,null,t);if(x=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.C=r,r.$=s.$=l.shadowRoot||l,M=l["s-sc"],K(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},se=e=>{const t=e.$hostElement$,n=e.t,l=e.j;64&e.l||(e.l|=64,ce(t),ie(n,"componentDidLoad"),e.P(t),l||re()),e.S&&(e.S(),e.S=void 0),512&e.l&&b((()=>Z(e,!1))),e.l&=-517},re=()=>{ce(a.documentElement),b((()=>(e=>{const t=f.ce("appload",{detail:{namespace:"player-sms-verification"}});return e.dispatchEvent(t),t})(u)))},ie=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ce=e=>e.classList.add("hydrated"),ue=(e,t,l)=>{var o,r;const i=e.prototype;if(t.L||t.R||e.watchers){e.watchers&&!t.R&&(t.R=e.watchers);const c=Object.entries(null!=(o=t.L)?o:{});if(c.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).T.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.T.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||j(e)?e:1&t?e+"":e)(l,o.L[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.T.set(t,l),a)){if(o.R&&128&u){const e=o.R[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&Z(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);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 l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.R)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.R)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.M)||o.push([e,s])),s}))]))}}return e},ae=e=>{ie(e,"disconnectedCallback")},fe=(e,l={})=>{var o;const h=[],d=l.exclude||[],m=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),w=a.createElement("style"),v=[];let b,S=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let g=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],v:l[1],L:l[2],A:l[3]};4&c.l&&(g=!0),c.L=l[2],c.M=[],c.R=null!=(o=l[4])?o:{};const u=c.v,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,k:n,T:new Map};l.N=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),S?v.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.k,o=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.N)&&t.N.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Y(t,t.j=n);break}}l.L&&Object.entries(l.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.U){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.U;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
2
+ /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.W}" was not found`);l.isProxied||(n.R=l.watchers,ue(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=U(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);p&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>Z(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);(null==e?void 0:e.t)?ae(e.t):(null==e?void 0:e.N)&&e.N.then((()=>ae(e.t)))}})()))}componentOnReady(){return n(this).N}};c.U=e[0],d.includes(u)||m.get(u)||(h.push(u),m.define(u,ue(a,c,1)))}))})),h.length>0&&(g&&(w.textContent+=c),w.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const e=null!=(o=f.O)?o:k(a);null!=e&&w.setAttribute("nonce",e),y.insertBefore(w,$?$.nextSibling:y.firstChild)}S=!1,v.length?v.map((e=>e.connectedCallback())):f.jmp((()=>b=setTimeout(re,30)))},he=e=>f.O=e;export{fe as b,R as h,h as p,l as r,he as s}
@@ -1 +1 @@
1
- import{p as t,b as e}from"./p-3e6eb9ea.js";export{s as setNonce}from"./p-3e6eb9ea.js";import{g as n}from"./p-e1255160.js";(()=>{const e=import.meta.url,n={};return""!==e&&(n.resourcesUrl=new URL(".",e).href),t(n)})().then((async t=>(await n(),e([["p-9cdfa3fa",[[1,"player-sms-verification",{endpoint:[513],userId:[513,"user-id"],lang:[513],clientStyling:[1537,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],tempBtnResendCount:[32],code:[32],errMsg:[32],msgEnterCode:[32]},null,{clientStyling:["updateClientStyling"],clientStylingUrl:["updateClientStyling"]}]]]],t))));
1
+ import{p as n,b as e}from"./p-b187e9e6.js";export{s as setNonce}from"./p-b187e9e6.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-58804c28",[[1,"player-sms-verification",{endpoint:[513],userId:[513,"user-id"],lang:[513],clientStyling:[1537,"client-styling"],clientStylingUrl:[513,"client-styling-url"],mbSource:[1,"mb-source"],translationUrl:[513,"translation-url"],tempBtnResendCount:[32],code:[32],errMsg:[32],msgEnterCode:[32]},null,{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}]]]],n))));
@@ -19,6 +19,7 @@ export declare class PlayerSmsVerification {
19
19
  * Client custom styling via url
20
20
  */
21
21
  clientStylingUrl: string;
22
+ mbSource: string;
22
23
  /**
23
24
  * Translations via URL
24
25
  */
@@ -33,16 +34,17 @@ export declare class PlayerSmsVerification {
33
34
  debounceTimer: ReturnType<typeof setTimeout>;
34
35
  btnResendTimer: ReturnType<typeof setInterval>;
35
36
  private stylingContainer;
36
- updateClientStyling(): void;
37
+ private stylingSubscription;
38
+ handleClientStylingChange(newValue: any, oldValue: any): void;
39
+ handleClientStylingUrlChange(newValue: any, oldValue: any): void;
37
40
  componentWillLoad(): Promise<any>;
38
41
  componentDidLoad(): void;
39
- setClientStyling: () => void;
40
- setClientStylingURL: () => void;
41
42
  startTimerBtnResendCode(): void;
42
43
  setErrMsg(errMsg: string): void;
43
44
  debounce(func: Function, delay: number): () => void;
44
45
  handleSendCode(): void;
45
46
  handleCheckCode(): void;
46
47
  handleInput(event: Event): void;
48
+ disconnectedCallback(): void;
47
49
  render(): any;
48
50
  }
@@ -23,6 +23,7 @@ export namespace Components {
23
23
  * Currently selected language
24
24
  */
25
25
  "lang": string;
26
+ "mbSource": string;
26
27
  /**
27
28
  * Translations via URL
28
29
  */
@@ -62,6 +63,7 @@ declare namespace LocalJSX {
62
63
  * Currently selected language
63
64
  */
64
65
  "lang"?: string;
66
+ "mbSource"?: string;
65
67
  /**
66
68
  * Translations via URL
67
69
  */
@@ -1015,8 +1015,6 @@ export declare namespace JSXBase {
1015
1015
  autoPlay?: boolean;
1016
1016
  autoplay?: boolean | string;
1017
1017
  controls?: boolean;
1018
- controlslist?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
1019
- controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
1020
1018
  crossOrigin?: string;
1021
1019
  crossorigin?: string;
1022
1020
  loop?: boolean;
@@ -1566,10 +1564,6 @@ export declare namespace JSXBase {
1566
1564
  onSubmitCapture?: (event: Event) => void;
1567
1565
  onInvalid?: (event: Event) => void;
1568
1566
  onInvalidCapture?: (event: Event) => void;
1569
- onBeforeToggle?: (event: Event) => void;
1570
- onBeforeToggleCapture?: (event: Event) => void;
1571
- onToggle?: (event: Event) => void;
1572
- onToggleCapture?: (event: Event) => void;
1573
1567
  onLoad?: (event: Event) => void;
1574
1568
  onLoadCapture?: (event: Event) => void;
1575
1569
  onError?: (event: Event) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-sms-verification",
3
- "version": "1.55.0",
3
+ "version": "1.56.2",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1,2 +0,0 @@
1
- var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),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={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),m=!1,d=[],y=[],$=(e,t)=>n=>{e.push(n),m||(m=!0,t&&4&f.l?b(v):f.raf(v))},w=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},v=()=>{w(d),w(y),(m=d.length>0)&&f.raf(v)},b=e=>h().then(e),S=$(y,!0),g={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>O,map:()=>C,ok:()=>E,unwrap:()=>x,unwrapErr:()=>P});var E=e=>({isOk:!0,isErr:!1,value:e}),O=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>E(e))):E(n)}if(e.isErr)return O(e.value);throw"should never get here"}var M,x=e=>{if(e.isOk)return e.value;throw e.value},P=e=>{if(e.isErr)return e.value;throw e.value},A=(e,t,...n)=>{let l=null,o=null,s=!1,i=!1;const r=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!j(l))&&(l+=""),s&&i?r[r.length-1].i+=l:r.push(s?D(null,l):l),i=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=D(e,null);return u.u=t,r.length>0&&(u.h=r),u.p=o,u},D=(e,t)=>({l:0,m:e,i:t,$:null,h:null,u:null,p:null}),H={},L=new WeakMap,R=e=>"sc-"+e.v,T=(e,t,n,l,s,i)=>{if(n!==l){let r=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=U(n),s=U(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else if(r||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((r||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?r=!1:null!=n&&e[t]==o||("function"==typeof e.__lookupSetter__(t)?e[t]=o:e.setAttribute(t,o))}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!r||4&i||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(W);t=t.replace(F,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},N=/\s/,U=e=>e?e.split(N):[],W="Capture",F=RegExp(W+"$"),q=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||g,s=t.u||g;for(const e of G(Object.keys(o)))e in s||T(l,e,o[e],void 0,n,t.l);for(const e of G(Object.keys(s)))T(l,e,o[e],s[e],n,t.l)};function G(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var V=!1,_=(e,t,n)=>{const l=t.h[n];let o,s,i=0;if(null!==l.i)o=l.$=a.createTextNode(l.i);else if(o=l.$=a.createElement(l.m),q(null,l,V),o.getRootNode().querySelector("body"),l.h)for(i=0;i<l.h.length;++i)s=_(e,l,i),s&&o.appendChild(s);return o["s-hn"]=M,o},z=(e,t,n,l,o,s)=>{let i,r=e;for(r.shadowRoot&&r.tagName===M&&(r=r.shadowRoot);o<=s;++o)l[o]&&(i=_(null,n,o),i&&(l[o].$=i,Q(r,i,t)))},B=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;K(t),e&&e.remove()}}},I=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),J=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,i=t.i;null===i?(q(e,t,V),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,i,r=0,c=0,u=0,a=0,f=t.length-1,h=t[0],p=t[f],m=l.length-1,d=l[0],y=l[m];for(;r<=f&&c<=m;)if(null==h)h=t[++r];else if(null==p)p=t[--f];else if(null==d)d=l[++c];else if(null==y)y=l[--m];else if(I(h,d,o))J(h,d,o),h=t[++r],d=l[++c];else if(I(p,y,o))J(p,y,o),p=t[--f],y=l[--m];else if(I(h,y,o))J(h,y,o),Q(e,h.$,p.$.nextSibling),h=t[++r],y=l[--m];else if(I(p,d,o))J(p,d,o),Q(e,p.$,h.$),p=t[--f],d=l[++c];else{for(u=-1,a=r;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===d.p){u=a;break}u>=0?(i=t[u],i.m!==d.m?s=_(t&&t[c],n,u):(J(i,d,o),t[u]=void 0,s=i.$),d=l[++c]):(s=_(t&&t[c],n,c),d=l[++c]),s&&Q(h.$.parentNode,s,h.$)}r>f?z(e,null==l[m+1]?null:l[m+1].$,n,l,c,m):c>m&&B(t,r,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),z(l,null,t,s,0,s.length-1)):!n&&null!==o&&B(o,0,o.length-1)):e.i!==i&&(l.data=i)},K=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(K)},Q=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),X=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},Y=(e,t)=>{if(e.l|=16,!(4&e.l))return X(e,e.j),S((()=>Z(e,t)));e.l|=512},Z=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.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 t&&(l=ie(n,"componentWillLoad")),ee(l,(()=>ne(e,n,t)))},ee=(e,t)=>te(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),te=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,ne=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.k,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=R(t),o=r.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,i=L.get(e=e.head||e);if(i||L.set(e,i=new Set),!i.has(l)){{s=a.createElement("style"),s.innerHTML=o;const l=null!=(n=f.O)?n:k(a);if(null!=l&&s.setAttribute("nonce",l),!(1&t.l))if("HEAD"===e.nodeName){const t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(s,n)}else if("host"in e)if(p){const t=new CSSStyleSheet;t.replaceSync(o),e.adoptedStyleSheets=[t,...e.adoptedStyleSheets]}else{const t=e.querySelector("style");t?t.innerHTML=o+t.innerHTML:e.prepend(s)}else e.append(s);1&t.l&&"HEAD"!==e.nodeName&&e.insertBefore(s,null)}4&t.l&&(s.innerHTML+=c),i&&i.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&2&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);le(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>oe(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},le=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.k,s=e.C||D(null,null),i=(e=>e&&e.m===H)(t)?t:A(null,null,t);if(M=l.tagName,o.M&&(i.u=i.u||{},o.M.map((([e,t])=>i.u[t]=l[e]))),n&&i.u)for(const e of Object.keys(i.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(i.u[e]=l[e]);i.m=null,i.l|=4,e.C=i,i.$=s.$=l.shadowRoot||l,J(s,i,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},oe=e=>{const t=e.$hostElement$,n=e.t,l=e.j;64&e.l||(e.l|=64,re(t),ie(n,"componentDidLoad"),e.P(t),l||se()),e.S&&(e.S(),e.S=void 0),512&e.l&&b((()=>Y(e,!1))),e.l&=-517},se=()=>{re(a.documentElement),b((()=>(e=>{const t=f.ce("appload",{detail:{namespace:"player-sms-verification"}});return e.dispatchEvent(t),t})(u)))},ie=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},re=e=>e.classList.add("hydrated"),ce=(e,t,l)=>{var o,i;const r=e.prototype;if(t.A||t.D||e.watchers){e.watchers&&!t.D&&(t.D=e.watchers);const c=Object.entries(null!=(o=t.A)?o:{});if(c.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(r,e,{get(){return((e,t)=>n(this).H.get(t))(0,e)},set(l){((e,t,l,o)=>{const i=n(e);if(!i)throw Error(`Couldn't find host element for "${o.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const r=i.$hostElement$,c=i.H.get(t),u=i.l,a=i.t;if(l=((e,t)=>null==e||j(e)?e:1&t?e+"":e)(l,o.A[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(i.H.set(t,l),a)){if(o.D&&128&u){const e=o.D[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,r)}}))}2==(18&u)&&Y(i,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;r.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var i;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(r.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),r=null==l?void 0:l.l;if(r&&!(8&r)&&128&r&&s!==o){const n=l.t,r=null==(i=t.D)?void 0:i[e];null==r||r.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(i=t.D)?i:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.M)||o.push([e,s])),s}))]))}}return e},ue=(e,l={})=>{var o;const h=[],m=l.exclude||[],d=u.customElements,y=a.head,$=y.querySelector("meta[charset]"),w=a.createElement("style"),v=[];let b,S=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let g=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],v:l[1],A:l[2],L:l[3]};4&c.l&&(g=!0),c.A=l[2],c.M=[],c.D=null!=(o=l[4])?o:{};const u=c.v,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,k:n,H:new Map};l.R=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),S?v.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.k,o=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.R)&&t.R.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){X(t,t.j=n);break}}l.A&&Object.entries(l.A).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.T){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.T;if(!n)return;const l=i.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(i.set(n,e),e[t])),s)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.N}" was not found`);l.isProxied||(n.D=l.watchers,ce(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=R(n);if(!r.has(t)){const l=()=>{};((e,t,n)=>{let l=r.get(e);p&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,r.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>Y(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);(null==e?void 0:e.t)||(null==e?void 0:e.R)&&e.R.then((()=>{}))}})()))}componentOnReady(){return n(this).R}};c.T=e[0],m.includes(u)||d.get(u)||(h.push(u),d.define(u,ce(a,c,1)))}))})),h.length>0&&(g&&(w.textContent+=c),w.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const e=null!=(o=f.O)?o:k(a);null!=e&&w.setAttribute("nonce",e),y.insertBefore(w,$?$.nextSibling:y.firstChild)}S=!1,v.length?v.map((e=>e.connectedCallback())):f.jmp((()=>b=setTimeout(se,30)))},ae=e=>f.O=e;export{ue as b,A as h,h as p,l as r,ae as s}