@everymatrix/player-sms-verification 1.52.5 → 1.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,32 +21,32 @@ const TRANSLATIONS = {
21
21
  errInvalidPhone: 'The provided phone number is invalid'
22
22
  },
23
23
  ro: {
24
- title: 'SMS Verification required',
25
- subtitle: 'You need to verify your phone number',
26
- btnSend: 'Send Code',
27
- btnResend: 'Resend Code',
28
- btnActivate: 'Activate',
29
- msgEnterCode: 'Please enter the verification code you received on your number',
30
- msgResendNotice: 'A new verification code has been sent to your phone number',
31
- errGenerateCode: 'An error occurred while generating your code. Please click the resend button to generate a new code',
32
- errInvalidCode: 'The code is incorrect',
33
- errExceededAttempts: 'Too many attempts. Try again later',
34
- errExpiredToken: 'The code expired, resend code',
35
- errInvalidPhone: 'The provided phone number is invalid'
24
+ title: 'Verificare SMS necesară',
25
+ subtitle: 'Trebuie verificați numărul de telefon',
26
+ btnSend: 'Trimite cod',
27
+ btnResend: 'Retrimite cod',
28
+ btnActivate: 'Activează',
29
+ msgEnterCode: 'Introduceți codul de verificare primit pe numărul dvs.',
30
+ msgResendNotice: 'Un nou cod de verificare a fost trimis pe numărul dvs. de telefon',
31
+ errGenerateCode: 'A apărut o eroare la generarea codului. Apăsați butonul de retrimitere pentru a genera un nou cod',
32
+ errInvalidCode: 'Codul este incorect',
33
+ errExceededAttempts: 'Prea multe încercări. Încercați din nou mai târziu',
34
+ errExpiredToken: 'Codul a expirat, retrimiteți codul',
35
+ errInvalidPhone: 'Numărul de telefon furnizat este invalid'
36
36
  },
37
37
  fr: {
38
- title: 'SMS Verification required',
39
- subtitle: 'You need to verify your phone number',
40
- btnSend: 'Send Code',
41
- btnResend: 'Resend Code',
42
- btnActivate: 'Activate',
43
- msgEnterCode: 'Please enter the verification code you received on your number',
44
- msgResendNotice: 'A new verification code has been sent to your phone number',
45
- errGenerateCode: 'An error occurred while generating your code. Please click the resend button to generate a new code',
46
- errInvalidCode: 'The code is incorrect',
47
- errExceededAttempts: 'Too many attempts. Try again later',
48
- errExpiredToken: 'The code expired, resend code',
49
- errInvalidPhone: 'The provided phone number is invalid'
38
+ title: 'Vérification SMS requise',
39
+ subtitle: 'Vous devez vérifier votre numéro de téléphone',
40
+ btnSend: 'Envoyer le code',
41
+ btnResend: 'Renvoyer le code',
42
+ btnActivate: 'Activer',
43
+ msgEnterCode: 'Veuillez entrer le code de vérification reçu sur votre numéro',
44
+ msgResendNotice: 'Un nouveau code de vérification a été envoyé à votre numéro de téléphone',
45
+ 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',
46
+ errInvalidCode: 'Le code est incorrect',
47
+ errExceededAttempts: 'Trop de tentatives. Réessayez plus tard',
48
+ errExpiredToken: 'Le code a expiré, renvoyez le code',
49
+ errInvalidPhone: 'Le numéro de téléphone fourni est invalide'
50
50
  },
51
51
  hu: {
52
52
  title: 'SMS Verification required',
@@ -91,32 +91,32 @@ const TRANSLATIONS = {
91
91
  errInvalidPhone: 'The provided phone number is invalid'
92
92
  },
93
93
  es: {
94
- title: 'SMS Verification required',
95
- subtitle: 'You need to verify your phone number',
96
- btnSend: 'Send Code',
97
- btnResend: 'Resend Code',
98
- btnActivate: 'Activate',
99
- msgEnterCode: 'Please enter the verification code you received on your number',
100
- msgResendNotice: 'A new verification code has been sent to your phone number',
101
- errGenerateCode: 'An error occurred while generating your code. Please click the resend button to generate a new code',
102
- errInvalidCode: 'The code is incorrect',
103
- errExceededAttempts: 'Too many attempts. Try again later',
104
- errExpiredToken: 'The code expired, resend code',
105
- errInvalidPhone: 'The provided phone number is invalid'
94
+ title: 'Verificación por SMS requerida',
95
+ subtitle: 'Debe verificar su número de teléfono',
96
+ btnSend: 'Enviar código',
97
+ btnResend: 'Reenviar código',
98
+ btnActivate: 'Activar',
99
+ msgEnterCode: 'Por favor, introduzca el código de verificación recibido en su número',
100
+ msgResendNotice: 'Se ha enviado un nuevo código de verificación a su número de teléfono',
101
+ errGenerateCode: 'Ocurrió un error al generar su código. Haga clic en el botón de reenviar para generar un nuevo código',
102
+ errInvalidCode: 'El código es incorrecto',
103
+ errExceededAttempts: 'Demasiados intentos. Inténtelo más tarde',
104
+ errExpiredToken: 'El código ha expirado, reenviar código',
105
+ errInvalidPhone: 'El número de teléfono proporcionado no es válido'
106
106
  },
107
107
  pt: {
108
- title: 'SMS Verification required',
109
- subtitle: 'You need to verify your phone number',
110
- btnSend: 'Send Code',
111
- btnResend: 'Resend Code',
112
- btnActivate: 'Activate',
113
- msgEnterCode: 'Please enter the verification code you received on your number',
114
- msgResendNotice: 'A new verification code has been sent to your phone number',
115
- errGenerateCode: 'An error occurred while generating your code. Please click the resend button to generate a new code',
116
- errInvalidCode: 'The code is incorrect',
117
- errExceededAttempts: 'Too many attempts. Try again later',
118
- errExpiredToken: 'The code expired, resend code',
119
- errInvalidPhone: 'The provided phone number is invalid'
108
+ title: 'Verificação SMS necessária',
109
+ subtitle: 'Você precisa verificar seu número de telefone',
110
+ btnSend: 'Enviar código',
111
+ btnResend: 'Reenviar código',
112
+ btnActivate: 'Ativar',
113
+ msgEnterCode: 'Por favor, insira o código de verificação recebido no seu número',
114
+ msgResendNotice: 'Um novo código de verificação foi enviado para o seu número de telefone',
115
+ errGenerateCode: 'Ocorreu um erro ao gerar seu código. Clique no botão reenviar para gerar um novo código',
116
+ errInvalidCode: 'O código está incorreto',
117
+ errExceededAttempts: 'Muitas tentativas. Tente novamente mais tarde',
118
+ errExpiredToken: 'O código expirou, reenviar código',
119
+ errInvalidPhone: 'O número de telefone fornecido é inválido'
120
120
  },
121
121
  hr: {
122
122
  title: 'SMS verifikacija je potrebna',
@@ -132,6 +132,48 @@ const TRANSLATIONS = {
132
132
  errExpiredToken: 'Verifikacijski kod je istekao, ponovno zatražite kod',
133
133
  errInvalidPhone: 'Navedeni telefonski broj je nevažeći'
134
134
  },
135
+ de: {
136
+ title: 'SMS-Verifizierung erforderlich',
137
+ subtitle: 'Sie müssen Ihre Telefonnummer verifizieren',
138
+ btnSend: 'Code senden',
139
+ btnResend: 'Code erneut senden',
140
+ btnActivate: 'Aktivieren',
141
+ msgEnterCode: 'Bitte geben Sie den Verifizierungscode ein, den Sie auf Ihrer Nummer erhalten haben',
142
+ msgResendNotice: 'Ein neuer Verifizierungscode wurde an Ihre Telefonnummer gesendet',
143
+ 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',
144
+ errInvalidCode: 'Der Code ist falsch',
145
+ errExceededAttempts: 'Zu viele Versuche. Bitte versuchen Sie es später erneut',
146
+ errExpiredToken: 'Der Code ist abgelaufen, bitte erneut senden',
147
+ errInvalidPhone: 'Die angegebene Telefonnummer ist ungültig'
148
+ },
149
+ 'es-mx': {
150
+ title: 'Verificación por SMS requerida',
151
+ subtitle: 'Debe verificar su número de teléfono',
152
+ btnSend: 'Enviar código',
153
+ btnResend: 'Reenviar código',
154
+ btnActivate: 'Activar',
155
+ msgEnterCode: 'Por favor, introduzca el código de verificación recibido en su número',
156
+ msgResendNotice: 'Se ha enviado un nuevo código de verificación a su número de teléfono',
157
+ errGenerateCode: 'Ocurrió un error al generar su código. Haga clic en el botón de reenviar para generar un nuevo código',
158
+ errInvalidCode: 'El código es incorrecto',
159
+ errExceededAttempts: 'Demasiados intentos. Inténtelo más tarde',
160
+ errExpiredToken: 'El código ha expirado, reenviar código',
161
+ errInvalidPhone: 'El número de teléfono proporcionado no es válido'
162
+ },
163
+ 'pt-br': {
164
+ title: 'Verificação SMS necessária',
165
+ subtitle: 'Você precisa verificar seu número de telefone',
166
+ btnSend: 'Enviar código',
167
+ btnResend: 'Reenviar código',
168
+ btnActivate: 'Ativar',
169
+ msgEnterCode: 'Por favor, insira o código de verificação recebido no seu número',
170
+ msgResendNotice: 'Um novo código de verificação foi enviado para o seu número de telefone',
171
+ errGenerateCode: 'Ocorreu um erro ao gerar seu código. Clique no botão reenviar para gerar um novo código',
172
+ errInvalidCode: 'O código está incorreto',
173
+ errExceededAttempts: 'Muitas tentativas. Tente novamente mais tarde',
174
+ errExpiredToken: 'O código expirou, reenviar código',
175
+ errInvalidPhone: 'O número de telefone fornecido é inválido'
176
+ }
135
177
  };
136
178
  const getTranslations = (url) => {
137
179
  return new Promise((resolve) => {
@@ -15,32 +15,32 @@ const TRANSLATIONS = {
15
15
  errInvalidPhone: 'The provided phone number is invalid'
16
16
  },
17
17
  ro: {
18
- title: 'SMS Verification required',
19
- subtitle: 'You need to verify your phone number',
20
- btnSend: 'Send Code',
21
- btnResend: 'Resend Code',
22
- btnActivate: 'Activate',
23
- msgEnterCode: 'Please enter the verification code you received on your number',
24
- msgResendNotice: 'A new verification code has been sent to your phone number',
25
- errGenerateCode: 'An error occurred while generating your code. Please click the resend button to generate a new code',
26
- errInvalidCode: 'The code is incorrect',
27
- errExceededAttempts: 'Too many attempts. Try again later',
28
- errExpiredToken: 'The code expired, resend code',
29
- errInvalidPhone: 'The provided phone number is invalid'
18
+ title: 'Verificare SMS necesară',
19
+ subtitle: 'Trebuie verificați numărul de telefon',
20
+ btnSend: 'Trimite cod',
21
+ btnResend: 'Retrimite cod',
22
+ btnActivate: 'Activează',
23
+ msgEnterCode: 'Introduceți codul de verificare primit pe numărul dvs.',
24
+ msgResendNotice: 'Un nou cod de verificare a fost trimis pe numărul dvs. de telefon',
25
+ errGenerateCode: 'A apărut o eroare la generarea codului. Apăsați butonul de retrimitere pentru a genera un nou cod',
26
+ errInvalidCode: 'Codul este incorect',
27
+ errExceededAttempts: 'Prea multe încercări. Încercați din nou mai târziu',
28
+ errExpiredToken: 'Codul a expirat, retrimiteți codul',
29
+ errInvalidPhone: 'Numărul de telefon furnizat este invalid'
30
30
  },
31
31
  fr: {
32
- title: 'SMS Verification required',
33
- subtitle: 'You need to verify your phone number',
34
- btnSend: 'Send Code',
35
- btnResend: 'Resend Code',
36
- btnActivate: 'Activate',
37
- msgEnterCode: 'Please enter the verification code you received on your number',
38
- msgResendNotice: 'A new verification code has been sent to your phone number',
39
- errGenerateCode: 'An error occurred while generating your code. Please click the resend button to generate a new code',
40
- errInvalidCode: 'The code is incorrect',
41
- errExceededAttempts: 'Too many attempts. Try again later',
42
- errExpiredToken: 'The code expired, resend code',
43
- errInvalidPhone: 'The provided phone number is invalid'
32
+ title: 'Vérification SMS requise',
33
+ subtitle: 'Vous devez vérifier votre numéro de téléphone',
34
+ btnSend: 'Envoyer le code',
35
+ btnResend: 'Renvoyer le code',
36
+ btnActivate: 'Activer',
37
+ msgEnterCode: 'Veuillez entrer le code de vérification reçu sur votre numéro',
38
+ msgResendNotice: 'Un nouveau code de vérification a été envoyé à votre numéro de téléphone',
39
+ 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',
40
+ errInvalidCode: 'Le code est incorrect',
41
+ errExceededAttempts: 'Trop de tentatives. Réessayez plus tard',
42
+ errExpiredToken: 'Le code a expiré, renvoyez le code',
43
+ errInvalidPhone: 'Le numéro de téléphone fourni est invalide'
44
44
  },
45
45
  hu: {
46
46
  title: 'SMS Verification required',
@@ -85,32 +85,32 @@ const TRANSLATIONS = {
85
85
  errInvalidPhone: 'The provided phone number is invalid'
86
86
  },
87
87
  es: {
88
- title: 'SMS Verification required',
89
- subtitle: 'You need to verify your phone number',
90
- btnSend: 'Send Code',
91
- btnResend: 'Resend Code',
92
- btnActivate: 'Activate',
93
- msgEnterCode: 'Please enter the verification code you received on your number',
94
- msgResendNotice: 'A new verification code has been sent to your phone number',
95
- errGenerateCode: 'An error occurred while generating your code. Please click the resend button to generate a new code',
96
- errInvalidCode: 'The code is incorrect',
97
- errExceededAttempts: 'Too many attempts. Try again later',
98
- errExpiredToken: 'The code expired, resend code',
99
- errInvalidPhone: 'The provided phone number is invalid'
88
+ title: 'Verificación por SMS requerida',
89
+ subtitle: 'Debe verificar su número de teléfono',
90
+ btnSend: 'Enviar código',
91
+ btnResend: 'Reenviar código',
92
+ btnActivate: 'Activar',
93
+ msgEnterCode: 'Por favor, introduzca el código de verificación recibido en su número',
94
+ msgResendNotice: 'Se ha enviado un nuevo código de verificación a su número de teléfono',
95
+ errGenerateCode: 'Ocurrió un error al generar su código. Haga clic en el botón de reenviar para generar un nuevo código',
96
+ errInvalidCode: 'El código es incorrecto',
97
+ errExceededAttempts: 'Demasiados intentos. Inténtelo más tarde',
98
+ errExpiredToken: 'El código ha expirado, reenviar código',
99
+ errInvalidPhone: 'El número de teléfono proporcionado no es válido'
100
100
  },
101
101
  pt: {
102
- title: 'SMS Verification required',
103
- subtitle: 'You need to verify your phone number',
104
- btnSend: 'Send Code',
105
- btnResend: 'Resend Code',
106
- btnActivate: 'Activate',
107
- msgEnterCode: 'Please enter the verification code you received on your number',
108
- msgResendNotice: 'A new verification code has been sent to your phone number',
109
- errGenerateCode: 'An error occurred while generating your code. Please click the resend button to generate a new code',
110
- errInvalidCode: 'The code is incorrect',
111
- errExceededAttempts: 'Too many attempts. Try again later',
112
- errExpiredToken: 'The code expired, resend code',
113
- errInvalidPhone: 'The provided phone number is invalid'
102
+ title: 'Verificação SMS necessária',
103
+ subtitle: 'Você precisa verificar seu número de telefone',
104
+ btnSend: 'Enviar código',
105
+ btnResend: 'Reenviar código',
106
+ btnActivate: 'Ativar',
107
+ msgEnterCode: 'Por favor, insira o código de verificação recebido no seu número',
108
+ msgResendNotice: 'Um novo código de verificação foi enviado para o seu número de telefone',
109
+ errGenerateCode: 'Ocorreu um erro ao gerar seu código. Clique no botão reenviar para gerar um novo código',
110
+ errInvalidCode: 'O código está incorreto',
111
+ errExceededAttempts: 'Muitas tentativas. Tente novamente mais tarde',
112
+ errExpiredToken: 'O código expirou, reenviar código',
113
+ errInvalidPhone: 'O número de telefone fornecido é inválido'
114
114
  },
115
115
  hr: {
116
116
  title: 'SMS verifikacija je potrebna',
@@ -126,6 +126,48 @@ const TRANSLATIONS = {
126
126
  errExpiredToken: 'Verifikacijski kod je istekao, ponovno zatražite kod',
127
127
  errInvalidPhone: 'Navedeni telefonski broj je nevažeći'
128
128
  },
129
+ de: {
130
+ title: 'SMS-Verifizierung erforderlich',
131
+ subtitle: 'Sie müssen Ihre Telefonnummer verifizieren',
132
+ btnSend: 'Code senden',
133
+ btnResend: 'Code erneut senden',
134
+ btnActivate: 'Aktivieren',
135
+ msgEnterCode: 'Bitte geben Sie den Verifizierungscode ein, den Sie auf Ihrer Nummer erhalten haben',
136
+ msgResendNotice: 'Ein neuer Verifizierungscode wurde an Ihre Telefonnummer gesendet',
137
+ 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',
138
+ errInvalidCode: 'Der Code ist falsch',
139
+ errExceededAttempts: 'Zu viele Versuche. Bitte versuchen Sie es später erneut',
140
+ errExpiredToken: 'Der Code ist abgelaufen, bitte erneut senden',
141
+ errInvalidPhone: 'Die angegebene Telefonnummer ist ungültig'
142
+ },
143
+ 'es-mx': {
144
+ title: 'Verificación por SMS requerida',
145
+ subtitle: 'Debe verificar su número de teléfono',
146
+ btnSend: 'Enviar código',
147
+ btnResend: 'Reenviar código',
148
+ btnActivate: 'Activar',
149
+ msgEnterCode: 'Por favor, introduzca el código de verificación recibido en su número',
150
+ msgResendNotice: 'Se ha enviado un nuevo código de verificación a su número de teléfono',
151
+ errGenerateCode: 'Ocurrió un error al generar su código. Haga clic en el botón de reenviar para generar un nuevo código',
152
+ errInvalidCode: 'El código es incorrecto',
153
+ errExceededAttempts: 'Demasiados intentos. Inténtelo más tarde',
154
+ errExpiredToken: 'El código ha expirado, reenviar código',
155
+ errInvalidPhone: 'El número de teléfono proporcionado no es válido'
156
+ },
157
+ 'pt-br': {
158
+ title: 'Verificação SMS necessária',
159
+ subtitle: 'Você precisa verificar seu número de telefone',
160
+ btnSend: 'Enviar código',
161
+ btnResend: 'Reenviar código',
162
+ btnActivate: 'Ativar',
163
+ msgEnterCode: 'Por favor, insira o código de verificação recebido no seu número',
164
+ msgResendNotice: 'Um novo código de verificação foi enviado para o seu número de telefone',
165
+ errGenerateCode: 'Ocorreu um erro ao gerar seu código. Clique no botão reenviar para gerar um novo código',
166
+ errInvalidCode: 'O código está incorreto',
167
+ errExceededAttempts: 'Muitas tentativas. Tente novamente mais tarde',
168
+ errExpiredToken: 'O código expirou, reenviar código',
169
+ errInvalidPhone: 'O número de telefone fornecido é inválido'
170
+ }
129
171
  };
130
172
  export const getTranslations = (url) => {
131
173
  return new Promise((resolve) => {
@@ -17,32 +17,32 @@ const TRANSLATIONS = {
17
17
  errInvalidPhone: 'The provided phone number is invalid'
18
18
  },
19
19
  ro: {
20
- title: 'SMS Verification required',
21
- subtitle: 'You need to verify your phone number',
22
- btnSend: 'Send Code',
23
- btnResend: 'Resend Code',
24
- btnActivate: 'Activate',
25
- msgEnterCode: 'Please enter the verification code you received on your number',
26
- msgResendNotice: 'A new verification code has been sent to your phone number',
27
- errGenerateCode: 'An error occurred while generating your code. Please click the resend button to generate a new code',
28
- errInvalidCode: 'The code is incorrect',
29
- errExceededAttempts: 'Too many attempts. Try again later',
30
- errExpiredToken: 'The code expired, resend code',
31
- errInvalidPhone: 'The provided phone number is invalid'
20
+ title: 'Verificare SMS necesară',
21
+ subtitle: 'Trebuie verificați numărul de telefon',
22
+ btnSend: 'Trimite cod',
23
+ btnResend: 'Retrimite cod',
24
+ btnActivate: 'Activează',
25
+ msgEnterCode: 'Introduceți codul de verificare primit pe numărul dvs.',
26
+ msgResendNotice: 'Un nou cod de verificare a fost trimis pe numărul dvs. de telefon',
27
+ errGenerateCode: 'A apărut o eroare la generarea codului. Apăsați butonul de retrimitere pentru a genera un nou cod',
28
+ errInvalidCode: 'Codul este incorect',
29
+ errExceededAttempts: 'Prea multe încercări. Încercați din nou mai târziu',
30
+ errExpiredToken: 'Codul a expirat, retrimiteți codul',
31
+ errInvalidPhone: 'Numărul de telefon furnizat este invalid'
32
32
  },
33
33
  fr: {
34
- title: 'SMS Verification required',
35
- subtitle: 'You need to verify your phone number',
36
- btnSend: 'Send Code',
37
- btnResend: 'Resend Code',
38
- btnActivate: 'Activate',
39
- msgEnterCode: 'Please enter the verification code you received on your number',
40
- msgResendNotice: 'A new verification code has been sent to your phone number',
41
- errGenerateCode: 'An error occurred while generating your code. Please click the resend button to generate a new code',
42
- errInvalidCode: 'The code is incorrect',
43
- errExceededAttempts: 'Too many attempts. Try again later',
44
- errExpiredToken: 'The code expired, resend code',
45
- errInvalidPhone: 'The provided phone number is invalid'
34
+ title: 'Vérification SMS requise',
35
+ subtitle: 'Vous devez vérifier votre numéro de téléphone',
36
+ btnSend: 'Envoyer le code',
37
+ btnResend: 'Renvoyer le code',
38
+ btnActivate: 'Activer',
39
+ msgEnterCode: 'Veuillez entrer le code de vérification reçu sur votre numéro',
40
+ msgResendNotice: 'Un nouveau code de vérification a été envoyé à votre numéro de téléphone',
41
+ 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',
42
+ errInvalidCode: 'Le code est incorrect',
43
+ errExceededAttempts: 'Trop de tentatives. Réessayez plus tard',
44
+ errExpiredToken: 'Le code a expiré, renvoyez le code',
45
+ errInvalidPhone: 'Le numéro de téléphone fourni est invalide'
46
46
  },
47
47
  hu: {
48
48
  title: 'SMS Verification required',
@@ -87,32 +87,32 @@ const TRANSLATIONS = {
87
87
  errInvalidPhone: 'The provided phone number is invalid'
88
88
  },
89
89
  es: {
90
- title: 'SMS Verification required',
91
- subtitle: 'You need to verify your phone number',
92
- btnSend: 'Send Code',
93
- btnResend: 'Resend Code',
94
- btnActivate: 'Activate',
95
- msgEnterCode: 'Please enter the verification code you received on your number',
96
- msgResendNotice: 'A new verification code has been sent to your phone number',
97
- errGenerateCode: 'An error occurred while generating your code. Please click the resend button to generate a new code',
98
- errInvalidCode: 'The code is incorrect',
99
- errExceededAttempts: 'Too many attempts. Try again later',
100
- errExpiredToken: 'The code expired, resend code',
101
- errInvalidPhone: 'The provided phone number is invalid'
90
+ title: 'Verificación por SMS requerida',
91
+ subtitle: 'Debe verificar su número de teléfono',
92
+ btnSend: 'Enviar código',
93
+ btnResend: 'Reenviar código',
94
+ btnActivate: 'Activar',
95
+ msgEnterCode: 'Por favor, introduzca el código de verificación recibido en su número',
96
+ msgResendNotice: 'Se ha enviado un nuevo código de verificación a su número de teléfono',
97
+ errGenerateCode: 'Ocurrió un error al generar su código. Haga clic en el botón de reenviar para generar un nuevo código',
98
+ errInvalidCode: 'El código es incorrecto',
99
+ errExceededAttempts: 'Demasiados intentos. Inténtelo más tarde',
100
+ errExpiredToken: 'El código ha expirado, reenviar código',
101
+ errInvalidPhone: 'El número de teléfono proporcionado no es válido'
102
102
  },
103
103
  pt: {
104
- title: 'SMS Verification required',
105
- subtitle: 'You need to verify your phone number',
106
- btnSend: 'Send Code',
107
- btnResend: 'Resend Code',
108
- btnActivate: 'Activate',
109
- msgEnterCode: 'Please enter the verification code you received on your number',
110
- msgResendNotice: 'A new verification code has been sent to your phone number',
111
- errGenerateCode: 'An error occurred while generating your code. Please click the resend button to generate a new code',
112
- errInvalidCode: 'The code is incorrect',
113
- errExceededAttempts: 'Too many attempts. Try again later',
114
- errExpiredToken: 'The code expired, resend code',
115
- errInvalidPhone: 'The provided phone number is invalid'
104
+ title: 'Verificação SMS necessária',
105
+ subtitle: 'Você precisa verificar seu número de telefone',
106
+ btnSend: 'Enviar código',
107
+ btnResend: 'Reenviar código',
108
+ btnActivate: 'Ativar',
109
+ msgEnterCode: 'Por favor, insira o código de verificação recebido no seu número',
110
+ msgResendNotice: 'Um novo código de verificação foi enviado para o seu número de telefone',
111
+ errGenerateCode: 'Ocorreu um erro ao gerar seu código. Clique no botão reenviar para gerar um novo código',
112
+ errInvalidCode: 'O código está incorreto',
113
+ errExceededAttempts: 'Muitas tentativas. Tente novamente mais tarde',
114
+ errExpiredToken: 'O código expirou, reenviar código',
115
+ errInvalidPhone: 'O número de telefone fornecido é inválido'
116
116
  },
117
117
  hr: {
118
118
  title: 'SMS verifikacija je potrebna',
@@ -128,6 +128,48 @@ const TRANSLATIONS = {
128
128
  errExpiredToken: 'Verifikacijski kod je istekao, ponovno zatražite kod',
129
129
  errInvalidPhone: 'Navedeni telefonski broj je nevažeći'
130
130
  },
131
+ de: {
132
+ title: 'SMS-Verifizierung erforderlich',
133
+ subtitle: 'Sie müssen Ihre Telefonnummer verifizieren',
134
+ btnSend: 'Code senden',
135
+ btnResend: 'Code erneut senden',
136
+ btnActivate: 'Aktivieren',
137
+ msgEnterCode: 'Bitte geben Sie den Verifizierungscode ein, den Sie auf Ihrer Nummer erhalten haben',
138
+ msgResendNotice: 'Ein neuer Verifizierungscode wurde an Ihre Telefonnummer gesendet',
139
+ 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',
140
+ errInvalidCode: 'Der Code ist falsch',
141
+ errExceededAttempts: 'Zu viele Versuche. Bitte versuchen Sie es später erneut',
142
+ errExpiredToken: 'Der Code ist abgelaufen, bitte erneut senden',
143
+ errInvalidPhone: 'Die angegebene Telefonnummer ist ungültig'
144
+ },
145
+ 'es-mx': {
146
+ title: 'Verificación por SMS requerida',
147
+ subtitle: 'Debe verificar su número de teléfono',
148
+ btnSend: 'Enviar código',
149
+ btnResend: 'Reenviar código',
150
+ btnActivate: 'Activar',
151
+ msgEnterCode: 'Por favor, introduzca el código de verificación recibido en su número',
152
+ msgResendNotice: 'Se ha enviado un nuevo código de verificación a su número de teléfono',
153
+ errGenerateCode: 'Ocurrió un error al generar su código. Haga clic en el botón de reenviar para generar un nuevo código',
154
+ errInvalidCode: 'El código es incorrecto',
155
+ errExceededAttempts: 'Demasiados intentos. Inténtelo más tarde',
156
+ errExpiredToken: 'El código ha expirado, reenviar código',
157
+ errInvalidPhone: 'El número de teléfono proporcionado no es válido'
158
+ },
159
+ 'pt-br': {
160
+ title: 'Verificação SMS necessária',
161
+ subtitle: 'Você precisa verificar seu número de telefone',
162
+ btnSend: 'Enviar código',
163
+ btnResend: 'Reenviar código',
164
+ btnActivate: 'Ativar',
165
+ msgEnterCode: 'Por favor, insira o código de verificação recebido no seu número',
166
+ msgResendNotice: 'Um novo código de verificação foi enviado para o seu número de telefone',
167
+ errGenerateCode: 'Ocorreu um erro ao gerar seu código. Clique no botão reenviar para gerar um novo código',
168
+ errInvalidCode: 'O código está incorreto',
169
+ errExceededAttempts: 'Muitas tentativas. Tente novamente mais tarde',
170
+ errExpiredToken: 'O código expirou, reenviar código',
171
+ errInvalidPhone: 'O número de telefone fornecido é inválido'
172
+ }
131
173
  };
132
174
  const getTranslations = (url) => {
133
175
  return new Promise((resolve) => {
@@ -0,0 +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 +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-b8d784c9",[[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 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))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/player-sms-verification",
3
- "version": "1.52.5",
3
+ "version": "1.53.0",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",
@@ -1 +0,0 @@
1
- import{r as e,h as i}from"./p-3e6eb9ea.js";const t={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:"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"},fr:{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"},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:"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"},pt:{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"},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"}},r=(e,i)=>t[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 r in e[i])t[i][r]=e[i][r]})),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(...t){clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((()=>{e.apply(this,t)}),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:r(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"},r("title",this.lang)),i("p",{key:"c20c1efb474c107aa560a9d4880f98df6467254a",class:"PlayerSmsVerificationSubtitle"},r("subtitle",this.lang))),i("div",{key:"99e96a1bd91e4c94813c4f29279a37f3de7cd037",class:"PlayerSmsVerificationContainer"},i("p",{key:"20762aa83d74261f01d834699159cb8f2a76038c",class:"PlayerSmsVerificationMsg"+(this.msgEnterCode?"":" Hidden")},r(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"},r(this.errMsg,this.lang)):i("p",{class:"PlayerSmsVerificationMsg"+(!this.isBtnSendAvailable&&this.isCodeSentOnce?"":" Hidden")},r("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?r("btnResend",this.lang):this.tempBtnResendCount:r("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},r("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}