@everymatrix/player-sms-verification 1.99.49 → 1.99.51
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.
- package/dist/cjs/{index-c10a634b.js → index-f1727e10.js} +13 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/player-sms-verification.cjs.entry.js +47 -8
- package/dist/cjs/player-sms-verification.cjs.js +1 -1
- package/dist/collection/components/player-sms-verification/player-sms-verification.js +19 -4
- package/dist/collection/utils/utils.js +10 -5
- package/dist/esm/{index-99e378bb.js → index-21bdd6f1.js} +12 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/player-sms-verification.entry.js +47 -8
- package/dist/esm/player-sms-verification.js +2 -2
- package/dist/player-sms-verification/index-21bdd6f1.js +2 -0
- package/dist/player-sms-verification/player-sms-verification.entry.js +1 -1
- package/dist/player-sms-verification/player-sms-verification.esm.js +1 -1
- package/dist/types/components/player-sms-verification/player-sms-verification.d.ts +3 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/player-sms-verification/index-99e378bb.js +0 -2
|
@@ -302,6 +302,7 @@ var parsePropertyValue = (propValue, propType) => {
|
|
|
302
302
|
}
|
|
303
303
|
return propValue;
|
|
304
304
|
};
|
|
305
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
305
306
|
var emitEvent = (elm, name, opts) => {
|
|
306
307
|
const ev = plt.ce(name, opts);
|
|
307
308
|
elm.dispatchEvent(ev);
|
|
@@ -815,6 +816,16 @@ var postUpdateComponent = (hostRef) => {
|
|
|
815
816
|
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
816
817
|
}
|
|
817
818
|
};
|
|
819
|
+
var forceUpdate = (ref) => {
|
|
820
|
+
{
|
|
821
|
+
const hostRef = getHostRef(ref);
|
|
822
|
+
const isConnected = hostRef.$hostElement$.isConnected;
|
|
823
|
+
if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
824
|
+
scheduleUpdate(hostRef, false);
|
|
825
|
+
}
|
|
826
|
+
return isConnected;
|
|
827
|
+
}
|
|
828
|
+
};
|
|
818
829
|
var appDidLoad = (who) => {
|
|
819
830
|
{
|
|
820
831
|
addHydratedFlag(doc.documentElement);
|
|
@@ -1191,6 +1202,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1191
1202
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1192
1203
|
|
|
1193
1204
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1205
|
+
exports.forceUpdate = forceUpdate;
|
|
1206
|
+
exports.getElement = getElement;
|
|
1194
1207
|
exports.h = h;
|
|
1195
1208
|
exports.promiseResolve = promiseResolve;
|
|
1196
1209
|
exports.registerInstance = registerInstance;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-f1727e10.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-f1727e10.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
8
|
const TRANSLATIONS = {
|
|
@@ -175,16 +175,21 @@ const TRANSLATIONS = {
|
|
|
175
175
|
errInvalidPhone: 'O número de telefone fornecido é inválido'
|
|
176
176
|
}
|
|
177
177
|
};
|
|
178
|
+
const setTranslation = (data, createMissingLocales = true) => {
|
|
179
|
+
Object.keys(data).forEach((locale) => {
|
|
180
|
+
if (createMissingLocales)
|
|
181
|
+
TRANSLATIONS[locale] = TRANSLATIONS[locale] || {};
|
|
182
|
+
Object.keys(data[locale]).forEach((key) => {
|
|
183
|
+
TRANSLATIONS[locale][key] = data[locale][key];
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
};
|
|
178
187
|
const getTranslations = (url) => {
|
|
179
188
|
return new Promise((resolve) => {
|
|
180
189
|
fetch(url)
|
|
181
190
|
.then((res) => res.json())
|
|
182
191
|
.then((data) => {
|
|
183
|
-
|
|
184
|
-
for (let key in data[item]) {
|
|
185
|
-
TRANSLATIONS[item][key] = data[item][key];
|
|
186
|
-
}
|
|
187
|
-
});
|
|
192
|
+
setTranslation(data, false);
|
|
188
193
|
resolve(true);
|
|
189
194
|
});
|
|
190
195
|
});
|
|
@@ -194,6 +199,26 @@ const translate = (key, customLang) => {
|
|
|
194
199
|
return TRANSLATIONS[lang !== undefined ? lang : DEFAULT_LANGUAGE][key];
|
|
195
200
|
};
|
|
196
201
|
|
|
202
|
+
/**
|
|
203
|
+
* Subscribe to translation updates from the message bus.
|
|
204
|
+
*
|
|
205
|
+
* @param {string} domain - Message bus topic, such as `MyWidget.Translation`.
|
|
206
|
+
* @param {object | undefined} subscription - Existing subscription returned if the message bus is unavailable.
|
|
207
|
+
* @param {Function} onChange - Callback receiving the payload or `(locale, messages)` when byLocale is true.
|
|
208
|
+
* @param {boolean} [byLocale=false] - Invoke the callback once per locale, ignoring invalid payloads.
|
|
209
|
+
* @returns {object | undefined} The new or existing subscription.
|
|
210
|
+
*/
|
|
211
|
+
function getStreamTranslations(domain, subscription, onChange, byLocale = false) {
|
|
212
|
+
if (window.emMessageBus) {
|
|
213
|
+
const callback = byLocale ? (data) => {
|
|
214
|
+
if (!data || typeof data !== 'object' || Array.isArray(data)) return;
|
|
215
|
+
Object.keys(data).forEach((locale) => onChange(locale, data[locale]));
|
|
216
|
+
} : onChange;
|
|
217
|
+
subscription = window.emMessageBus.subscribe(domain, callback);
|
|
218
|
+
}
|
|
219
|
+
return subscription;
|
|
220
|
+
}
|
|
221
|
+
|
|
197
222
|
const StyleCacheKey = '__WIDGET_GLOBAL_STYLE_CACHE__';
|
|
198
223
|
|
|
199
224
|
/**
|
|
@@ -370,7 +395,18 @@ const PlayerSmsVerification = class {
|
|
|
370
395
|
return translationPromise;
|
|
371
396
|
}
|
|
372
397
|
}
|
|
398
|
+
handleClientTranslations() {
|
|
399
|
+
if (this.mbSource && !this.translationUrl) {
|
|
400
|
+
this.translationSubscription = getStreamTranslations(`${this.mbSource}.Translation`, this.translationSubscription, (data) => {
|
|
401
|
+
if (!data || typeof data !== 'object')
|
|
402
|
+
return;
|
|
403
|
+
setTranslation(data);
|
|
404
|
+
index.forceUpdate(this.host);
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
}
|
|
373
408
|
componentDidLoad() {
|
|
409
|
+
this.handleClientTranslations();
|
|
374
410
|
if (this.stylingContainer) {
|
|
375
411
|
if (window.emMessageBus != undefined) {
|
|
376
412
|
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
@@ -488,13 +524,16 @@ const PlayerSmsVerification = class {
|
|
|
488
524
|
this.code = event.target.value;
|
|
489
525
|
}
|
|
490
526
|
disconnectedCallback() {
|
|
527
|
+
var _a;
|
|
528
|
+
(_a = this.translationSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
491
529
|
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
492
530
|
}
|
|
493
531
|
render() {
|
|
494
|
-
return index.h("div", { key: '
|
|
532
|
+
return index.h("div", { key: '2adf4de085c6a4a97cec80e8d0301310bc7f430b', class: "PlayerSmsVerification", ref: el => this.stylingContainer = el }, index.h("div", { key: 'ccd5b2ac76fccc614473bcedb8e910141e8f5f77', class: "PlayerSmsVerificationTitleContainer" }, index.h("h4", { key: '4fcd963bb0256db64453d01e4b4e5ec6195b6970', class: "PlayerSmsVerificationTitle" }, translate('title', this.lang)), index.h("p", { key: '5d5f792515496fcaedc164e89e0f4b0a09abea79', class: "PlayerSmsVerificationSubtitle" }, translate('subtitle', this.lang))), index.h("div", { key: 'df93b5d865fa8aef1ebd09011924ddea1bfb044e', class: "PlayerSmsVerificationContainer" }, index.h("p", { key: '9b7b2f57017c1bf87e203aea6c3cd68a4c0b4563', class: "PlayerSmsVerificationMsg" + (this.msgEnterCode ? "" : " Hidden") }, translate(this.msgEnterCode, this.lang)), index.h("div", { key: 'c7d80271ed3868f8a42d2b638e32a840dfb9823f', class: "PlayerSmsVerificationInput" }, index.h("input", { key: '953378e84131ac0dbf5e082ee2f8bac825161c3d', type: "text", onInput: (event) => this.handleInput(event), value: this.code })), this.errMsg
|
|
495
533
|
? index.h("p", { class: "PlayerSmsVerificationErrMsg" }, translate(this.errMsg, this.lang))
|
|
496
|
-
: index.h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && index.h("p", { key: '
|
|
534
|
+
: index.h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && index.h("p", { key: '57484d7e47a1ca9a01ca1b0ad8ac2b15c01d255d', class: "PlayerSMSErrorTextPlaceholder" })), index.h("div", { key: '469f9d367deada28badd1d7d37a32333fe85478e', class: "PlayerSmsVerificationButtonContainer" }, index.h("button", { key: '656935eb46abdbd6f342f4fb348dd1f8ce34022f', 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: 'f5ca8893925149988ecc58dae1cafaeda20d71e9', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleCheckCode.bind(this), 850), disabled: !this.isCodeSentOnce || this.code === '' || this.code === undefined }, translate('btnActivate', this.lang))));
|
|
497
535
|
}
|
|
536
|
+
get host() { return index.getElement(this); }
|
|
498
537
|
static get watchers() { return {
|
|
499
538
|
"clientStyling": ["handleClientStylingChange"],
|
|
500
539
|
"clientStylingUrl": ["handleClientStylingUrlChange"]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
2
|
-
import { getTranslations, translate } from "../../utils/utils";
|
|
1
|
+
import { forceUpdate, h } from "@stencil/core";
|
|
2
|
+
import { getTranslations, setTranslation, translate } from "../../utils/utils";
|
|
3
|
+
import { getStreamTranslations } from "../../../../../../../../libs/common/src/i18n/index";
|
|
3
4
|
import { setClientStyling, setClientStylingURL, setStreamStyling } from "../../../../../../../../libs/common/src/styling/index";
|
|
4
5
|
import { dispatchCustomEvent } from "../../../../../../../../libs/custom-events/src/index";
|
|
5
6
|
export class PlayerSmsVerification {
|
|
@@ -37,7 +38,18 @@ export class PlayerSmsVerification {
|
|
|
37
38
|
return translationPromise;
|
|
38
39
|
}
|
|
39
40
|
}
|
|
41
|
+
handleClientTranslations() {
|
|
42
|
+
if (this.mbSource && !this.translationUrl) {
|
|
43
|
+
this.translationSubscription = getStreamTranslations(`${this.mbSource}.Translation`, this.translationSubscription, (data) => {
|
|
44
|
+
if (!data || typeof data !== 'object')
|
|
45
|
+
return;
|
|
46
|
+
setTranslation(data);
|
|
47
|
+
forceUpdate(this.host);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
40
51
|
componentDidLoad() {
|
|
52
|
+
this.handleClientTranslations();
|
|
41
53
|
if (this.stylingContainer) {
|
|
42
54
|
if (window.emMessageBus != undefined) {
|
|
43
55
|
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
@@ -155,12 +167,14 @@ export class PlayerSmsVerification {
|
|
|
155
167
|
this.code = event.target.value;
|
|
156
168
|
}
|
|
157
169
|
disconnectedCallback() {
|
|
170
|
+
var _a;
|
|
171
|
+
(_a = this.translationSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
158
172
|
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
159
173
|
}
|
|
160
174
|
render() {
|
|
161
|
-
return h("div", { key: '
|
|
175
|
+
return h("div", { key: '2adf4de085c6a4a97cec80e8d0301310bc7f430b', class: "PlayerSmsVerification", ref: el => this.stylingContainer = el }, h("div", { key: 'ccd5b2ac76fccc614473bcedb8e910141e8f5f77', class: "PlayerSmsVerificationTitleContainer" }, h("h4", { key: '4fcd963bb0256db64453d01e4b4e5ec6195b6970', class: "PlayerSmsVerificationTitle" }, translate('title', this.lang)), h("p", { key: '5d5f792515496fcaedc164e89e0f4b0a09abea79', class: "PlayerSmsVerificationSubtitle" }, translate('subtitle', this.lang))), h("div", { key: 'df93b5d865fa8aef1ebd09011924ddea1bfb044e', class: "PlayerSmsVerificationContainer" }, h("p", { key: '9b7b2f57017c1bf87e203aea6c3cd68a4c0b4563', class: "PlayerSmsVerificationMsg" + (this.msgEnterCode ? "" : " Hidden") }, translate(this.msgEnterCode, this.lang)), h("div", { key: 'c7d80271ed3868f8a42d2b638e32a840dfb9823f', class: "PlayerSmsVerificationInput" }, h("input", { key: '953378e84131ac0dbf5e082ee2f8bac825161c3d', type: "text", onInput: (event) => this.handleInput(event), value: this.code })), this.errMsg
|
|
162
176
|
? h("p", { class: "PlayerSmsVerificationErrMsg" }, translate(this.errMsg, this.lang))
|
|
163
|
-
: h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && h("p", { key: '
|
|
177
|
+
: h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && h("p", { key: '57484d7e47a1ca9a01ca1b0ad8ac2b15c01d255d', class: "PlayerSMSErrorTextPlaceholder" })), h("div", { key: '469f9d367deada28badd1d7d37a32333fe85478e', class: "PlayerSmsVerificationButtonContainer" }, h("button", { key: '656935eb46abdbd6f342f4fb348dd1f8ce34022f', 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: 'f5ca8893925149988ecc58dae1cafaeda20d71e9', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleCheckCode.bind(this), 850), disabled: !this.isCodeSentOnce || this.code === '' || this.code === undefined }, translate('btnActivate', this.lang))));
|
|
164
178
|
}
|
|
165
179
|
static get is() { return "player-sms-verification"; }
|
|
166
180
|
static get encapsulation() { return "shadow"; }
|
|
@@ -309,6 +323,7 @@ export class PlayerSmsVerification {
|
|
|
309
323
|
"msgEnterCode": {}
|
|
310
324
|
};
|
|
311
325
|
}
|
|
326
|
+
static get elementRef() { return "host"; }
|
|
312
327
|
static get watchers() {
|
|
313
328
|
return [{
|
|
314
329
|
"propName": "clientStyling",
|
|
@@ -169,16 +169,21 @@ const TRANSLATIONS = {
|
|
|
169
169
|
errInvalidPhone: 'O número de telefone fornecido é inválido'
|
|
170
170
|
}
|
|
171
171
|
};
|
|
172
|
+
export const setTranslation = (data, createMissingLocales = true) => {
|
|
173
|
+
Object.keys(data).forEach((locale) => {
|
|
174
|
+
if (createMissingLocales)
|
|
175
|
+
TRANSLATIONS[locale] = TRANSLATIONS[locale] || {};
|
|
176
|
+
Object.keys(data[locale]).forEach((key) => {
|
|
177
|
+
TRANSLATIONS[locale][key] = data[locale][key];
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
};
|
|
172
181
|
export const getTranslations = (url) => {
|
|
173
182
|
return new Promise((resolve) => {
|
|
174
183
|
fetch(url)
|
|
175
184
|
.then((res) => res.json())
|
|
176
185
|
.then((data) => {
|
|
177
|
-
|
|
178
|
-
for (let key in data[item]) {
|
|
179
|
-
TRANSLATIONS[item][key] = data[item][key];
|
|
180
|
-
}
|
|
181
|
-
});
|
|
186
|
+
setTranslation(data, false);
|
|
182
187
|
resolve(true);
|
|
183
188
|
});
|
|
184
189
|
});
|
|
@@ -280,6 +280,7 @@ var parsePropertyValue = (propValue, propType) => {
|
|
|
280
280
|
}
|
|
281
281
|
return propValue;
|
|
282
282
|
};
|
|
283
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
283
284
|
var emitEvent = (elm, name, opts) => {
|
|
284
285
|
const ev = plt.ce(name, opts);
|
|
285
286
|
elm.dispatchEvent(ev);
|
|
@@ -793,6 +794,16 @@ var postUpdateComponent = (hostRef) => {
|
|
|
793
794
|
hostRef.$flags$ &= ~(4 /* isWaitingForChildren */ | 512 /* needsRerender */);
|
|
794
795
|
}
|
|
795
796
|
};
|
|
797
|
+
var forceUpdate = (ref) => {
|
|
798
|
+
{
|
|
799
|
+
const hostRef = getHostRef(ref);
|
|
800
|
+
const isConnected = hostRef.$hostElement$.isConnected;
|
|
801
|
+
if (isConnected && (hostRef.$flags$ & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
802
|
+
scheduleUpdate(hostRef, false);
|
|
803
|
+
}
|
|
804
|
+
return isConnected;
|
|
805
|
+
}
|
|
806
|
+
};
|
|
796
807
|
var appDidLoad = (who) => {
|
|
797
808
|
{
|
|
798
809
|
addHydratedFlag(doc.documentElement);
|
|
@@ -1168,4 +1179,4 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1168
1179
|
// src/runtime/nonce.ts
|
|
1169
1180
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1170
1181
|
|
|
1171
|
-
export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1182
|
+
export { bootstrapLazy as b, forceUpdate as f, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-21bdd6f1.js';
|
|
2
|
+
export { s as setNonce } from './index-21bdd6f1.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h, g as getElement, f as forceUpdate } from './index-21bdd6f1.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
4
|
const TRANSLATIONS = {
|
|
@@ -171,16 +171,21 @@ const TRANSLATIONS = {
|
|
|
171
171
|
errInvalidPhone: 'O número de telefone fornecido é inválido'
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
|
+
const setTranslation = (data, createMissingLocales = true) => {
|
|
175
|
+
Object.keys(data).forEach((locale) => {
|
|
176
|
+
if (createMissingLocales)
|
|
177
|
+
TRANSLATIONS[locale] = TRANSLATIONS[locale] || {};
|
|
178
|
+
Object.keys(data[locale]).forEach((key) => {
|
|
179
|
+
TRANSLATIONS[locale][key] = data[locale][key];
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
};
|
|
174
183
|
const getTranslations = (url) => {
|
|
175
184
|
return new Promise((resolve) => {
|
|
176
185
|
fetch(url)
|
|
177
186
|
.then((res) => res.json())
|
|
178
187
|
.then((data) => {
|
|
179
|
-
|
|
180
|
-
for (let key in data[item]) {
|
|
181
|
-
TRANSLATIONS[item][key] = data[item][key];
|
|
182
|
-
}
|
|
183
|
-
});
|
|
188
|
+
setTranslation(data, false);
|
|
184
189
|
resolve(true);
|
|
185
190
|
});
|
|
186
191
|
});
|
|
@@ -190,6 +195,26 @@ const translate = (key, customLang) => {
|
|
|
190
195
|
return TRANSLATIONS[lang !== undefined ? lang : DEFAULT_LANGUAGE][key];
|
|
191
196
|
};
|
|
192
197
|
|
|
198
|
+
/**
|
|
199
|
+
* Subscribe to translation updates from the message bus.
|
|
200
|
+
*
|
|
201
|
+
* @param {string} domain - Message bus topic, such as `MyWidget.Translation`.
|
|
202
|
+
* @param {object | undefined} subscription - Existing subscription returned if the message bus is unavailable.
|
|
203
|
+
* @param {Function} onChange - Callback receiving the payload or `(locale, messages)` when byLocale is true.
|
|
204
|
+
* @param {boolean} [byLocale=false] - Invoke the callback once per locale, ignoring invalid payloads.
|
|
205
|
+
* @returns {object | undefined} The new or existing subscription.
|
|
206
|
+
*/
|
|
207
|
+
function getStreamTranslations(domain, subscription, onChange, byLocale = false) {
|
|
208
|
+
if (window.emMessageBus) {
|
|
209
|
+
const callback = byLocale ? (data) => {
|
|
210
|
+
if (!data || typeof data !== 'object' || Array.isArray(data)) return;
|
|
211
|
+
Object.keys(data).forEach((locale) => onChange(locale, data[locale]));
|
|
212
|
+
} : onChange;
|
|
213
|
+
subscription = window.emMessageBus.subscribe(domain, callback);
|
|
214
|
+
}
|
|
215
|
+
return subscription;
|
|
216
|
+
}
|
|
217
|
+
|
|
193
218
|
const StyleCacheKey = '__WIDGET_GLOBAL_STYLE_CACHE__';
|
|
194
219
|
|
|
195
220
|
/**
|
|
@@ -366,7 +391,18 @@ const PlayerSmsVerification = class {
|
|
|
366
391
|
return translationPromise;
|
|
367
392
|
}
|
|
368
393
|
}
|
|
394
|
+
handleClientTranslations() {
|
|
395
|
+
if (this.mbSource && !this.translationUrl) {
|
|
396
|
+
this.translationSubscription = getStreamTranslations(`${this.mbSource}.Translation`, this.translationSubscription, (data) => {
|
|
397
|
+
if (!data || typeof data !== 'object')
|
|
398
|
+
return;
|
|
399
|
+
setTranslation(data);
|
|
400
|
+
forceUpdate(this.host);
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
}
|
|
369
404
|
componentDidLoad() {
|
|
405
|
+
this.handleClientTranslations();
|
|
370
406
|
if (this.stylingContainer) {
|
|
371
407
|
if (window.emMessageBus != undefined) {
|
|
372
408
|
setStreamStyling(this.stylingContainer, `${this.mbSource}.Style`, this.stylingSubscription);
|
|
@@ -484,13 +520,16 @@ const PlayerSmsVerification = class {
|
|
|
484
520
|
this.code = event.target.value;
|
|
485
521
|
}
|
|
486
522
|
disconnectedCallback() {
|
|
523
|
+
var _a;
|
|
524
|
+
(_a = this.translationSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
487
525
|
this.stylingSubscription && this.stylingSubscription.unsubscribe();
|
|
488
526
|
}
|
|
489
527
|
render() {
|
|
490
|
-
return h("div", { key: '
|
|
528
|
+
return h("div", { key: '2adf4de085c6a4a97cec80e8d0301310bc7f430b', class: "PlayerSmsVerification", ref: el => this.stylingContainer = el }, h("div", { key: 'ccd5b2ac76fccc614473bcedb8e910141e8f5f77', class: "PlayerSmsVerificationTitleContainer" }, h("h4", { key: '4fcd963bb0256db64453d01e4b4e5ec6195b6970', class: "PlayerSmsVerificationTitle" }, translate('title', this.lang)), h("p", { key: '5d5f792515496fcaedc164e89e0f4b0a09abea79', class: "PlayerSmsVerificationSubtitle" }, translate('subtitle', this.lang))), h("div", { key: 'df93b5d865fa8aef1ebd09011924ddea1bfb044e', class: "PlayerSmsVerificationContainer" }, h("p", { key: '9b7b2f57017c1bf87e203aea6c3cd68a4c0b4563', class: "PlayerSmsVerificationMsg" + (this.msgEnterCode ? "" : " Hidden") }, translate(this.msgEnterCode, this.lang)), h("div", { key: 'c7d80271ed3868f8a42d2b638e32a840dfb9823f', class: "PlayerSmsVerificationInput" }, h("input", { key: '953378e84131ac0dbf5e082ee2f8bac825161c3d', type: "text", onInput: (event) => this.handleInput(event), value: this.code })), this.errMsg
|
|
491
529
|
? h("p", { class: "PlayerSmsVerificationErrMsg" }, translate(this.errMsg, this.lang))
|
|
492
|
-
: h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && h("p", { key: '
|
|
530
|
+
: h("p", { class: "PlayerSmsVerificationMsg" + (!this.isBtnSendAvailable && this.isCodeSentOnce ? "" : " Hidden") }, translate('msgResendNotice', this.lang)), !this.errMsg && h("p", { key: '57484d7e47a1ca9a01ca1b0ad8ac2b15c01d255d', class: "PlayerSMSErrorTextPlaceholder" })), h("div", { key: '469f9d367deada28badd1d7d37a32333fe85478e', class: "PlayerSmsVerificationButtonContainer" }, h("button", { key: '656935eb46abdbd6f342f4fb348dd1f8ce34022f', 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: 'f5ca8893925149988ecc58dae1cafaeda20d71e9', class: "PlayerSmsVerificationButton", onClick: this.debounce(this.handleCheckCode.bind(this), 850), disabled: !this.isCodeSentOnce || this.code === '' || this.code === undefined }, translate('btnActivate', this.lang))));
|
|
493
531
|
}
|
|
532
|
+
get host() { return getElement(this); }
|
|
494
533
|
static get watchers() { return {
|
|
495
534
|
"clientStyling": ["handleClientStylingChange"],
|
|
496
535
|
"clientStylingUrl": ["handleClientStylingUrlChange"]
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-21bdd6f1.js';
|
|
2
|
+
export { s as setNonce } from './index-21bdd6f1.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -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),g=$(y,!0),S={},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=e=>n(e).$hostElement$,U=new WeakMap,W=e=>"sc-"+e.v,D=(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=H(n),s=H(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(q);t=t.replace(G,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},F=/\s/,H=e=>e?e.split(F):[],q="Capture",G=RegExp(q+"$"),V=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||S,s=t.u||S;for(const e of _(Object.keys(o)))e in s||D(l,e,o[e],void 0,n,t.l);for(const e of _(Object.keys(s)))D(l,e,o[e],s[e],n,t.l)};function _(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var z=!1,B=(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),V(null,l,z),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=B(e,l,r),s&&o.appendChild(s);return o["s-hn"]=x,o},I=(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=B(null,n,o),r&&(l[o].$=r,Y(i,r,t)))},J=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;X(t),e&&e.remove()}}},K=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),Q=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.i;null===r?(V(e,t,z),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(K(h,m,o))Q(h,m,o),h=t[++i],m=l[++c];else if(K(p,y,o))Q(p,y,o),p=t[--f],y=l[--d];else if(K(h,y,o))Q(h,y,o),Y(e,h.$,p.$.nextSibling),h=t[++i],y=l[--d];else if(K(p,m,o))Q(p,m,o),Y(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=B(t&&t[c],n,u):(Q(r,m,o),t[u]=void 0,s=r.$),m=l[++c]):(s=B(t&&t[c],n,c),m=l[++c]),s&&Y(h.$.parentNode,s,h.$)}i>f?I(e,null==l[d+1]?null:l[d+1].$,n,l,c,d):c>d&&J(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),I(l,null,t,s,0,s.length-1)):null!==o&&J(o,0,o.length-1)):e.i!==r&&(l.data=r)},X=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(X)},Y=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),Z=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},ee=(e,t)=>{if(e.l|=16,!(4&e.l))return Z(e,e.j),g((()=>te(e,t)));e.l|=512},te=(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=ue(n,"componentWillLoad")),ne(l,(()=>oe(e,n,t)))},ne=(e,t)=>le(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),le=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,oe=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=W(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=U.get(e=e.head||e);if(r||U.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);se(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>re(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},se=(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"],Q(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},re=e=>{const t=e.$hostElement$,n=e.t,l=e.j;64&e.l||(e.l|=64,ae(t),ue(n,"componentDidLoad"),e.P(t),l||ce()),e.S&&(e.S(),e.S=void 0),512&e.l&&b((()=>ee(e,!1))),e.l&=-517},ie=e=>{{const t=n(e),l=t.$hostElement$.isConnected;return l&&2==(18&t.l)&&ee(t,!1),l}},ce=()=>{ae(a.documentElement),b((()=>(e=>{const t=f.ce("appload",{detail:{namespace:"player-sms-verification"}});return e.dispatchEvent(t),t})(u)))},ue=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ae=e=>e.classList.add("hydrated"),fe=(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)&&ee(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},he=e=>{ue(e,"disconnectedCallback")},pe=(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,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!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&&(S=!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),g?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"]){Z(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,fe(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=W(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=()=>ee(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)?he(e.t):(null==e?void 0:e.N)&&e.N.then((()=>he(e.t)))}})()))}componentOnReady(){return n(this).N}};c.U=e[0],d.includes(u)||m.get(u)||(h.push(u),m.define(u,fe(a,c,1)))}))})),h.length>0&&(S&&(w.textContent+=c),w.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",w.innerHTML.length)){w.setAttribute("data-styles","");const e=null!=(o=f.O)?o:k(a);null!=e&&w.setAttribute("nonce",e),y.insertBefore(w,$?$.nextSibling:y.firstChild)}g=!1,v.length?v.map((e=>e.connectedCallback())):f.jmp((()=>b=setTimeout(ce,30)))},de=e=>f.O=e;export{pe as b,ie as f,N as g,R as h,h as p,l as r,de as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as i}from"./index-99e378bb.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],n="__WIDGET_GLOBAL_STYLE_CACHE__";function o(e,i){if(e){const r=document.createElement("style");r.innerHTML=i,e.appendChild(r)}}function a(e,i){if(!e||!i)return;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 d=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&&a(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,r,t=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!t)return function(e,i){const r=document.createElement("style");return window.emMessageBus.subscribe(i,(i=>{e&&(r.innerHTML=i,e.appendChild(r))}))}(e,i);window[n]||(window[n]={});const o=(r=function(e,i){return window.emMessageBus.subscribe(i,(r=>{if(!e)return;const t=e.getRootNode(),o=window[n];let a=o[i]&&o[i].sheet;a?o[i].refCount=o[i].refCount+1:(a=new CSSStyleSheet,a.replaceSync(r),o[i]={sheet:a,refCount:1});const d=t.adoptedStyleSheets||[];d.includes(a)||(t.adoptedStyleSheets=[...d,a])}))}(e,i)).unsubscribe.bind(r);r.unsubscribe=()=>{if(window[n][i]){const e=window[n][i];e.refCount>1?e.refCount=e.refCount-1:delete window[n][i]}o()}}(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription):(this.clientStyling&&o(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(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,((e,i={})=>{const r=new CustomEvent("track-custom-event",{detail:{type:"sms_code_resend",data:i},bubbles:!0,composed:!0});document.dispatchEvent(r)})(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:"449bdf96de92603f0882bd37fff03fa6edbbb905",class:"PlayerSmsVerification",ref:e=>this.stylingContainer=e},i("div",{key:"af4bc93419d2a2fb169d719a0a2245dfe73952bf",class:"PlayerSmsVerificationTitleContainer"},i("h4",{key:"05bc166a71aaad15e135e33c26375848d5fa7896",class:"PlayerSmsVerificationTitle"},t("title",this.lang)),i("p",{key:"69e71af868c18a8c7658c447cd4faad8474404d8",class:"PlayerSmsVerificationSubtitle"},t("subtitle",this.lang))),i("div",{key:"379d4223df2bb70d077fe0a61ce625988d94a4db",class:"PlayerSmsVerificationContainer"},i("p",{key:"e1bc65f9059db1026cf8ccfbe6ed1be7260ea92a",class:"PlayerSmsVerificationMsg"+(this.msgEnterCode?"":" Hidden")},t(this.msgEnterCode,this.lang)),i("div",{key:"141b38acc8f8f2500327782990cad15955af3608",class:"PlayerSmsVerificationInput"},i("input",{key:"3e68caa0da49cb710df3f317889d60ca8c22e5b1",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:"db78c93955b31f9f0f612902c805efeb41574dff",class:"PlayerSMSErrorTextPlaceholder"})),i("div",{key:"88b6294ad365a63961641b17bca33e1ecdd22b3b",class:"PlayerSmsVerificationButtonContainer"},i("button",{key:"5eab8b95b13af28c130a1d243e348fea411b134c",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:"dbb64063224e6fe3f41838c21ce4b2711b3cd5f1",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"]}}};d.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, #22B04E));border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));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{d as player_sms_verification}
|
|
1
|
+
import{r as e,h as i,g as r,f as t}from"./index-21bdd6f1.js";const n={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"}},o=(e,i=!0)=>{Object.keys(e).forEach((r=>{i&&(n[r]=n[r]||{}),Object.keys(e[r]).forEach((i=>{n[r][i]=e[r][i]}))}))},d=(e,i)=>n[void 0!==i?i:"en"][e],a="__WIDGET_GLOBAL_STYLE_CACHE__";function s(e,i){if(e){const r=document.createElement("style");r.innerHTML=i,e.appendChild(r)}}function c(e,i){if(!e||!i)return;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 l=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&&s(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(e,i){e!=i&&this.clientStylingUrl&&c(this.stylingContainer,this.clientStylingUrl)}componentWillLoad(){if(this.translationUrl)return e=this.translationUrl,new Promise((i=>{fetch(e).then((e=>e.json())).then((e=>{o(e,!1),i(!0)}))}));var e}handleClientTranslations(){this.mbSource&&!this.translationUrl&&(this.translationSubscription=function(e,i,r,t=!1){return window.emMessageBus&&(i=window.emMessageBus.subscribe(e,t?e=>{e&&"object"==typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((i=>r(i,e[i])))}:r)),i}(`${this.mbSource}.Translation`,this.translationSubscription,(e=>{e&&"object"==typeof e&&(o(e),t(this.host))})))}componentDidLoad(){this.handleClientTranslations(),this.stylingContainer&&(null!=window.emMessageBus?function(e,i,r,t=!1){if(!window.emMessageBus)return;if(!("adoptedStyleSheets"in Document.prototype)||!t)return function(e,i){const r=document.createElement("style");return window.emMessageBus.subscribe(i,(i=>{e&&(r.innerHTML=i,e.appendChild(r))}))}(e,i);window[a]||(window[a]={});const n=(r=function(e,i){return window.emMessageBus.subscribe(i,(r=>{if(!e)return;const t=e.getRootNode(),n=window[a];let o=n[i]&&n[i].sheet;o?n[i].refCount=n[i].refCount+1:(o=new CSSStyleSheet,o.replaceSync(r),n[i]={sheet:o,refCount:1});const d=t.adoptedStyleSheets||[];d.includes(o)||(t.adoptedStyleSheets=[...d,o])}))}(e,i)).unsubscribe.bind(r);r.unsubscribe=()=>{if(window[a][i]){const e=window[a][i];e.refCount>1?e.refCount=e.refCount-1:delete window[a][i]}n()}}(this.stylingContainer,`${this.mbSource}.Style`,this.stylingSubscription):(this.clientStyling&&s(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&c(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,((e,i={})=>{const r=new CustomEvent("track-custom-event",{detail:{type:"sms_code_resend",data:i},bubbles:!0,composed:!0});document.dispatchEvent(r)})(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:d(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(){var e;null===(e=this.translationSubscription)||void 0===e||e.unsubscribe(),this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return i("div",{key:"2adf4de085c6a4a97cec80e8d0301310bc7f430b",class:"PlayerSmsVerification",ref:e=>this.stylingContainer=e},i("div",{key:"ccd5b2ac76fccc614473bcedb8e910141e8f5f77",class:"PlayerSmsVerificationTitleContainer"},i("h4",{key:"4fcd963bb0256db64453d01e4b4e5ec6195b6970",class:"PlayerSmsVerificationTitle"},d("title",this.lang)),i("p",{key:"5d5f792515496fcaedc164e89e0f4b0a09abea79",class:"PlayerSmsVerificationSubtitle"},d("subtitle",this.lang))),i("div",{key:"df93b5d865fa8aef1ebd09011924ddea1bfb044e",class:"PlayerSmsVerificationContainer"},i("p",{key:"9b7b2f57017c1bf87e203aea6c3cd68a4c0b4563",class:"PlayerSmsVerificationMsg"+(this.msgEnterCode?"":" Hidden")},d(this.msgEnterCode,this.lang)),i("div",{key:"c7d80271ed3868f8a42d2b638e32a840dfb9823f",class:"PlayerSmsVerificationInput"},i("input",{key:"953378e84131ac0dbf5e082ee2f8bac825161c3d",type:"text",onInput:e=>this.handleInput(e),value:this.code})),this.errMsg?i("p",{class:"PlayerSmsVerificationErrMsg"},d(this.errMsg,this.lang)):i("p",{class:"PlayerSmsVerificationMsg"+(!this.isBtnSendAvailable&&this.isCodeSentOnce?"":" Hidden")},d("msgResendNotice",this.lang)),!this.errMsg&&i("p",{key:"57484d7e47a1ca9a01ca1b0ad8ac2b15c01d255d",class:"PlayerSMSErrorTextPlaceholder"})),i("div",{key:"469f9d367deada28badd1d7d37a32333fe85478e",class:"PlayerSmsVerificationButtonContainer"},i("button",{key:"656935eb46abdbd6f342f4fb348dd1f8ce34022f",class:"PlayerSmsVerificationButton",onClick:this.debounce(this.handleSendCode.bind(this),850),disabled:!this.isBtnSendAvailable},this.isCodeSentOnce?this.isBtnSendAvailable?d("btnResend",this.lang):this.tempBtnResendCount:d("btnSend",this.lang)),i("button",{key:"f5ca8893925149988ecc58dae1cafaeda20d71e9",class:"PlayerSmsVerificationButton",onClick:this.debounce(this.handleCheckCode.bind(this),850),disabled:!this.isCodeSentOnce||""===this.code||void 0===this.code},d("btnActivate",this.lang))))}get host(){return r(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};l.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, #22B04E));border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));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{l as player_sms_verification}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as n,b as e}from"./index-
|
|
1
|
+
import{p as n,b as e}from"./index-21bdd6f1.js";export{s as setNonce}from"./index-21bdd6f1.js";import{g as t}from"./app-globals-0f993ce5.js";(()=>{const e=import.meta.url,t={};return""!==e&&(t.resourcesUrl=new URL(".",e).href),n(t)})().then((async n=>(await t(),e([["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"]}]]]],n))));
|
|
@@ -33,11 +33,14 @@ export declare class PlayerSmsVerification {
|
|
|
33
33
|
isBtnSendAvailable: boolean;
|
|
34
34
|
debounceTimer: ReturnType<typeof setTimeout>;
|
|
35
35
|
btnResendTimer: ReturnType<typeof setInterval>;
|
|
36
|
+
host: HTMLElement;
|
|
36
37
|
private stylingContainer;
|
|
37
38
|
private stylingSubscription;
|
|
39
|
+
private translationSubscription;
|
|
38
40
|
handleClientStylingChange(newValue: any, oldValue: any): void;
|
|
39
41
|
handleClientStylingUrlChange(newValue: any, oldValue: any): void;
|
|
40
42
|
componentWillLoad(): Promise<any>;
|
|
43
|
+
handleClientTranslations(): void;
|
|
41
44
|
componentDidLoad(): void;
|
|
42
45
|
startTimerBtnResendCode(): void;
|
|
43
46
|
setErrMsg(errMsg: string): void;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
export declare const setTranslation: (data: Record<string, Record<string, unknown>>, createMissingLocales?: boolean) => void;
|
|
1
2
|
export declare const getTranslations: (url: string) => Promise<unknown>;
|
|
2
3
|
export declare const translate: (key: string, customLang?: any) => string;
|
package/package.json
CHANGED
|
@@ -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),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}
|