@everymatrix/general-player-login-form 1.54.4 → 1.54.8

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.
@@ -0,0 +1 @@
1
+ "use strict";var V=(r,t,i)=>new Promise((a,o)=>{var s=d=>{try{c(i.next(d))}catch(g){o(g)}},m=d=>{try{c(i.throw(d))}catch(g){o(g)}},c=d=>d.done?a(d.value):Promise.resolve(d.value).then(s,m);c((i=i.apply(r,t)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./GeneralPlayerLoginForm-Co2gKUgp.cjs");function O({withLocale:r,translations:t}){e.$locale.subscribe(i=>{i==null&&(e.$dictionary.set(t),e.$locale.set(r))})}function U(r,t){e.addMessages(r,t)}const H={en:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"A new verification code has been sent to your phone number.",activate:"Activate Account",resend:"Resend",loginSMSHint:"A new verification code has been sent to your phone number"},"zh-hk":{title:"请输入您在号码上收到的验证码",errorTitle:"您的代码无效,您可以重新发送代码并重试",code:"短信代码",smsCodeError:"短信验证码无效,请重新发送验证码",resendMessage:"新的验证码已发送至您的手机号码",activate:"激活账户",resend:"重发"},fr:{title:"Veuillez entrer le code de vérification que vous avez reçu sur votre numéro",errorTitle:"Votre code n'était pas valide, vous pouvez renvoyer le code et réessayer",code:"Code SMS",smsCodeError:"Code sms invalide, vous pouvez renvoyer le code",resendMessage:"Un nouveau code de vérification a été envoyé à votre numéro de téléphone.",activate:"Activer le compte",resend:"Renvoyer"},tr:{title:"Please enter the verification code you received on your number",errorTitle:"Kodunuz geçersizdi, kodu tekrar gönderip tekrar deneyebilirsiniz",code:"SMS kodu",smsCodeError:"Geçersiz sms kodu, kodu tekrar gönderebilirsiniz",resendMessage:"Telefon numaranıza yeni bir doğrulama kodu gönderildi.",activate:"Aktif hesap",resend:"Yeniden gönder",loginSMSHint:"Telefon numaranıza yeni bir doğrulama kodu gönderildi"},ro:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"Un nou cod de verificare a fost trimis catre numarul dumneavoastra.",activate:"Activate Account",resend:"Resend"},es:{title:"Por favor ingrese su código de verificación enviado por mensaje de texto a su número de telefono",errorTitle:"Su código es invalido",code:"Código SMS",smsCodeError:"Código SMS invalido",resendMessage:"Un nuevo codigo de verificación ha sido enviado a tu número celular.",activate:"Activar Cuenta",resend:"Reenviar"},pt:{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"Um novo código de verificação foi enviado para o seu número de telefone.",activate:"Activate Account",resend:"Resend"},hr:{title:"Unesite verifikacijski kod koji ste primili na svoj broj telefona",errorTitle:"Vaš kod je nevažeći",code:"Sms kod",smsCodeError:"Nevažeći sms kod",resendMessage:"Novi verifkacijski kod poslan je na vaš broj telefona.",activate:"Aktiviraj račun",resend:"Ponovno pošalji",loginSMSHint:"Novi verifkacijski kod poslan je na vaš broj telefona"},"pt-br":{title:"Por favor, insira o código de verificação que você recebeu no seu número de celular",errorTitle:"Código inválido,vôce pode reenviar o código e tentar novamente",code:"Código SMS",smsCodeError:"Código SMS inválido,vôce pode reenviar o código",resendMessage:"Um novo código de verificação foi enviado para o seu número de celular.",activate:"Ativar conta",resend:"Reenviar",loginSMSHint:"Um novo código de verificação foi enviado para o seu número de celular."},"es-mx":{title:"Por favor ingrese el código de verificación que recibió en su número móvil",errorTitle:"Código inválido,Puede enviar el código e intentar de nuevo",code:"Código SMS",smsCodeError:"Código SMS inválido,Puede reenviar el código",resendMessage:"Un nuevo código de verificación ha sido enviado a su número móvil .",activate:"Activar Cuenta",resend:"Reenviar",loginSMSHint:"Un nuevo código de verificación ha sido enviado a su número móvil ."},"en-us":{title:"Please enter the verification code you received on your number",errorTitle:"Your code was invalid, you can resend the code and try again",code:"Sms code",smsCodeError:"Invalid sms code, you can resend the code",resendMessage:"A new verification code has been sent to your phone number.",activate:"Activate Account",resend:"Resend",loginSMSHint:"A new verification code has been sent to your phone number"}};function q(r){e.append_styles(r,"svelte-uutjwi","*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.Title{font-size:14px;margin:0;padding-bottom:20px}.Field{color:var(--emw--registration-contrast, var(--emw--color-gray-300, #58586B));display:flex;flex-direction:column;padding-bottom:30px;position:relative}.Field label{font-size:14px;font-weight:300;padding-bottom:5px}.Field input,.Field select{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;line-height:18px}.Field.InvalidField input{border:1px solid var(--emw--registration-color-primary, var(--emw--color-primary, #D0046C));background:var(--emw--color-pale, #FBECF4);color:var(--emw--registration-color-primary, var(--emw--color-primary, #D0046C))}.Field.Hidden{display:none}.LoginSMSHint{margin-top:20px}.InvalidInput{color:var(--emw--color-error, var(--emw--color-red, #ed0909));font-size:10px;line-height:10px}.ErrorMessage{margin:0 0 15px 0;font-size:12px;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.Button{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;margin-top:24px}.Button[disabled]{background:var(--emw--color-gray-100, #E6E6E6);border:1px solid var(--emw--color-gray-100, #E6E6E6);cursor:not-allowed}.Button.SmsVerificationResend{background:var(--emw--registration-color-bg, var(--emw--color-gray-50, #F9F8F8));color:var(--emw--registration-typography, var(--emw--color-contrast, #07072A))}")}function Y(r){let t=r[5]("errorTitle")+"",i;return{c(){i=e.text(t)},m(a,o){e.insert(a,i,o)},p(a,o){o&32&&t!==(t=a[5]("errorTitle")+"")&&e.set_data(i,t)},d(a){a&&e.detach(i)}}}function G(r){let t=r[5]("title")+"",i;return{c(){i=e.text(t)},m(a,o){e.insert(a,i,o)},p(a,o){o&32&&t!==(t=a[5]("title")+"")&&e.set_data(i,t)},d(a){a&&e.detach(i)}}}function N(r){let t,i=r[5]("smsCodeError")+"",a;return{c(){t=e.element("p"),a=e.text(i),e.attr(t,"class","InvalidInput")},m(o,s){e.insert(o,t,s),e.append(t,a)},p(o,s){s&32&&i!==(i=o[5]("smsCodeError")+"")&&e.set_data(a,i)},d(o){o&&e.detach(t)}}}function L(r){let t,i=r[5]("resendMessage")+"",a;return{c(){t=e.element("p"),a=e.text(i),e.attr(t,"class","SmsVerificationResendMessage")},m(o,s){e.insert(o,t,s),e.append(t,a)},p(o,s){s&32&&i!==(i=o[5]("resendMessage")+"")&&e.set_data(a,i)},d(o){o&&e.detach(t)}}}function D(r){let t,i,a=r[4]<10?"0":"",o,s,m;return{c(){t=e.element("span"),i=e.text("(0:"),o=e.text(a),s=e.text(r[4]),m=e.text(")"),e.attr(t,"class","SmsVerificationResendTimer")},m(c,d){e.insert(c,t,d),e.append(t,i),e.append(t,o),e.append(t,s),e.append(t,m)},p(c,d){d&16&&a!==(a=c[4]<10?"0":"")&&e.set_data(o,a),d&16&&e.set_data(s,c[4])},d(c){c&&e.detach(t)}}}function J(r){let t,i,a,o,s,m=r[5]("code")+"",c,d,g,_,u,C,S,T,k,h,E=r[5]("activate")+"",F,w,b,j=r[5]("resend")+"",z,I,A,P;function R(n,l){return n[2]?G:Y}let M=R(r),y=M(r),p=!r[2]&&N(r),f=r[3]&&L(r),v=r[3]&&D(r);return{c(){t=e.element("div"),i=e.element("h3"),y.c(),a=e.space(),o=e.element("div"),s=e.element("label"),c=e.text(m),d=e.text(":"),g=e.element("span"),g.textContent="*",_=e.space(),u=e.element("input"),C=e.space(),p&&p.c(),T=e.space(),f&&f.c(),k=e.space(),h=e.element("button"),F=e.text(E),w=e.space(),b=e.element("button"),z=e.text(j),I=e.space(),v&&v.c(),e.attr(i,"class","Title"),e.attr(g,"class","FormRequired"),e.attr(s,"for","SmsCode"),e.attr(u,"type","text"),e.attr(u,"id","SmsCode"),e.attr(u,"inputmode","numeric"),e.attr(u,"pattern","[0-9]*"),e.attr(u,"maxlength","6"),e.attr(o,"class",S="Field SmsVerificationField "+(r[2]?"":"InvalidField")),e.attr(h,"class","Button SmsVerificationValidate"),e.attr(b,"class","Button SmsVerificationResend"),b.disabled=r[3],e.attr(t,"class","Container SmsVerificationContainer")},m(n,l){e.insert(n,t,l),e.append(t,i),y.m(i,null),e.append(t,a),e.append(t,o),e.append(o,s),e.append(s,c),e.append(s,d),e.append(s,g),e.append(o,_),e.append(o,u),e.set_input_value(u,r[1]),e.append(o,C),p&&p.m(o,null),e.append(t,T),f&&f.m(t,null),e.append(t,k),e.append(t,h),e.append(h,F),e.append(t,w),e.append(t,b),e.append(b,z),e.append(b,I),v&&v.m(b,null),r[19](t),A||(P=[e.listen(u,"input",r[17]),e.listen(u,"keydown",r[18]),e.listen(h,"click",r[6]),e.listen(b,"click",r[7])],A=!0)},p(n,[l]){M===(M=R(n))&&y?y.p(n,l):(y.d(1),y=M(n),y&&(y.c(),y.m(i,null))),l&32&&m!==(m=n[5]("code")+"")&&e.set_data(c,m),l&2&&u.value!==n[1]&&e.set_input_value(u,n[1]),n[2]?p&&(p.d(1),p=null):p?p.p(n,l):(p=N(n),p.c(),p.m(o,null)),l&4&&S!==(S="Field SmsVerificationField "+(n[2]?"":"InvalidField"))&&e.attr(o,"class",S),n[3]?f?f.p(n,l):(f=L(n),f.c(),f.m(t,k)):f&&(f.d(1),f=null),l&32&&E!==(E=n[5]("activate")+"")&&e.set_data(F,E),l&32&&j!==(j=n[5]("resend")+"")&&e.set_data(z,j),n[3]?v?v.p(n,l):(v=D(n),v.c(),v.m(b,null)):v&&(v.d(1),v=null),l&8&&(b.disabled=n[3])},i:e.noop,o:e.noop,d(n){n&&e.detach(t),y.d(),p&&p.d(),f&&f.d(),v&&v.d(),r[19](null),A=!1,e.run_all(P)}}}function K(r,t,i){let a;e.component_subscribe(r,e.$format,n=>i(5,a=n));let{endpoint:o=""}=t,{tokenid:s=""}=t,{playerid:m=""}=t,{smstemplate:c="Please use this code {0} to activate your accout"}=t,{number:d=""}=t,{clientstyling:g=""}=t,{clientstylingurl:_=""}=t,{translationurl:u=""}=t,C,S=!0,T=!1,k,h,E=+localStorage.getItem("smsTimer")||0,F=Date.now()/1e3-E,w=60-Math.floor(F);const b={numeric:/^[0-9]{0,6}$/};O({withLocale:"en",translations:{}});const j=()=>{fetch(u).then(l=>l.json()).then(l=>{Object.keys(l).forEach(x=>{U(x,l[x])})}).catch(l=>{console.log(l)})};Object.keys(H).forEach(n=>{U(n,H[n])});const z=()=>V(this,null,function*(){try{if((yield fetch(`${o}/v1/player/${m}/activateSMS?tokenId=${s}&validationCode=${C}`,{headers:{"Content-Type":"application/json",accept:"application/json"}})).ok)i(2,S=!0),window.postMessage({type:"SmsHasBeenValidated"},window.location.href);else throw window.postMessage({type:"WidgetNotification",data:{type:"error",message:"Could not activate user"}},window.location.href),i(2,S=!1),new Error("Could not activate user")}catch(n){console.log(n)}}),I=()=>V(this,null,function*(){localStorage.setItem("smsTimer",JSON.stringify(Math.floor(Date.now()/1e3))),M();try{const n=yield fetch(`${o}/v1/player/sms/token`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json"},body:JSON.stringify({userId:m,messageTemplate:c,destination:d})}),l=yield n.json();if(n.ok)i(9,s=l.id),T=!1,A();else throw T=!0,new Error("Failed to fetch")}catch(n){T=!0,console.error(n)}}),A=()=>{w>0?i(4,w--,w):(clearInterval(k),i(3,k=!1),i(4,w=60))},P=()=>{let n=document.createElement("style");n.innerHTML=g,h.appendChild(n)},R=()=>{let n=new URL(_),l=document.createElement("style");fetch(n.href).then(x=>x.text()).then(x=>{l.innerHTML=x,setTimeout(()=>{h.appendChild(l)},1),setTimeout(()=>{},500)})},M=()=>{F<60&&i(3,k=setInterval(()=>{A()},1e3))},y=n=>{!b.numeric.test(n.key)&&n.keyCode!==8&&n.keyCode!==9&&n.keyCode!==46&&n.preventDefault()};e.onMount(()=>{if(!m||!d){let n=JSON.parse(localStorage.getItem("playerData"));i(10,m=n.playerid),i(11,d=n.number)}M()});function p(){C=this.value,i(1,C)}const f=n=>y(n);function v(n){e.binding_callbacks[n?"unshift":"push"](()=>{h=n,i(0,h)})}return r.$$set=n=>{"endpoint"in n&&i(12,o=n.endpoint),"tokenid"in n&&i(9,s=n.tokenid),"playerid"in n&&i(10,m=n.playerid),"smstemplate"in n&&i(13,c=n.smstemplate),"number"in n&&i(11,d=n.number),"clientstyling"in n&&i(14,g=n.clientstyling),"clientstylingurl"in n&&i(15,_=n.clientstylingurl),"translationurl"in n&&i(16,u=n.translationurl)},r.$$.update=()=>{r.$$.dirty&5632,r.$$.dirty&16385&&g&&h&&P(),r.$$.dirty&32769&&_&&h&&R(),r.$$.dirty&65536&&u&&j()},[h,C,S,k,w,a,z,I,y,s,m,d,o,c,g,_,u,p,f,v]}class B extends e.SvelteComponent{constructor(t){super(),e.init(this,t,K,J,e.safe_not_equal,{endpoint:12,tokenid:9,playerid:10,smstemplate:13,number:11,clientstyling:14,clientstylingurl:15,translationurl:16},q)}get endpoint(){return this.$$.ctx[12]}set endpoint(t){this.$$set({endpoint:t}),e.flush()}get tokenid(){return this.$$.ctx[9]}set tokenid(t){this.$$set({tokenid:t}),e.flush()}get playerid(){return this.$$.ctx[10]}set playerid(t){this.$$set({playerid:t}),e.flush()}get smstemplate(){return this.$$.ctx[13]}set smstemplate(t){this.$$set({smstemplate:t}),e.flush()}get number(){return this.$$.ctx[11]}set number(t){this.$$set({number:t}),e.flush()}get clientstyling(){return this.$$.ctx[14]}set clientstyling(t){this.$$set({clientstyling:t}),e.flush()}get clientstylingurl(){return this.$$.ctx[15]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),e.flush()}get translationurl(){return this.$$.ctx[16]}set translationurl(t){this.$$set({translationurl:t}),e.flush()}}e.create_custom_element(B,{endpoint:{},tokenid:{},playerid:{},smstemplate:{},number:{},clientstyling:{},clientstylingurl:{},translationurl:{}},[],[],!0);exports.default=B;
@@ -0,0 +1 @@
1
+ "use strict";if(typeof window!="undefined"){let n=function(e){return function(...r){try{return e.apply(this,r)}catch(t){if(t instanceof DOMException&&t.message.includes("has already been used with this registry")||t.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw t}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/GeneralPlayerLoginForm-Co2gKUgp.cjs")).then(e=>e.GeneralPlayerLoginForm_ce).then(({default:e})=>{!customElements.get("general-player-login-form")&&customElements.define("general-player-login-form",e.element)})}
@@ -0,0 +1,16 @@
1
+ if (typeof window != "undefined") {
2
+ let n = function(e) {
3
+ return function(...s) {
4
+ try {
5
+ return e.apply(this, s);
6
+ } catch (t) {
7
+ if (t instanceof DOMException && t.message.includes("has already been used with this registry") || t.message.includes("Cannot define multiple custom elements with the same tag name"))
8
+ return !1;
9
+ throw t;
10
+ }
11
+ };
12
+ };
13
+ customElements.define = n(customElements.define), import("../components/GeneralPlayerLoginForm-02QMdS8-.js").then((e) => e.G).then(({ default: e }) => {
14
+ !customElements.get("general-player-login-form") && customElements.define("general-player-login-form", e.element);
15
+ });
16
+ }
@@ -1,4 +1,4 @@
1
- import { G as r } from "../components/GeneralPlayerLoginForm-MMmgBHKW.js";
1
+ import { G as r } from "../components/GeneralPlayerLoginForm-CrntUfLK.js";
2
2
  function s(t) {
3
3
  return function(...n) {
4
4
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/general-player-login-form",
3
- "version": "1.54.4",
3
+ "version": "1.54.8",
4
4
  "type": "module",
5
5
  "main": "esnext/general-player-login-form.js",
6
6
  "module": "esnext/general-player-login-form.js",