@everymatrix/user-login 1.65.3 → 1.65.4
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/user-login.cjs.entry.js +45 -28
- package/dist/collection/components/user-login/user-login.js +17 -12
- package/dist/collection/utils/locale.utils.js +28 -16
- package/dist/esm/user-login.entry.js +45 -28
- package/dist/user-login/{p-41a3101d.entry.js → p-a00864b0.entry.js} +64 -64
- package/dist/user-login/user-login.esm.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,h as e}from"./p-55620ccb.js";const i={en:{invalidField:"Sorry, that username/email address and/or password has not been recognized.",forgotPassword:"Forgot Password",userEmail:"Username or Email",userPhone:"Phone number",userPrefix:"Phone prefix",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful",Forbidden_UserAccount_Blocked:"Player account blocked",GmErr_USER_ACCOUNT_BLOCKED:"You’re currently unable to login to your account - please contact Customer Services for more information.",setUpPassowrd:"You need to reset your password",Unauthorized:"The player account number, e-mail address or password is incorrect",CountryRestricted:"Registration is not possible from a restricted jurisdiction. If you encounter further issues, please contact support.",configError:"An unexpected error has occured when fetchig the configuration",userEmailError:"The email or username have an invalid format.",userPhoneError:"The prefix or the phone number have an invalid format.",userPasswordError:"The password has an invalid format."},tr:{invalidField:"Üzgünüz, bu kullanıcı adı/e-posta adresi ve/veya şifre tanınmadı.",forgotPassword:"Şifremi Unuttum",userEmail:"Kullanıcı Adı veya E-posta",userPhone:"Telefon numarası",userPrefix:"Telefon kodu",password:"Şifre",login:"Giriş Yap",genericError:"Beklenmeyen bir hata oluştu",successMessage:"Giriş başarılı",Forbidden_UserAccount_Blocked:"Oyuncu hesabı engellendi",GmErr_USER_ACCOUNT_BLOCKED:"Şu anda hesabınıza giriş yapamıyorsunuz - daha fazla bilgi için Müşteri Hizmetleri ile iletişime geçin.",setUpPassowrd:"Şifrenizi sıfırlamanız gerekiyor",Unauthorized:"Oyuncu hesap numarası, e-posta adresi veya şifre hatalı",CountryRestricted:"Kısıtlı bir yargı bölgesinden kayıt yapılamaz. Daha fazla sorunla karşılaşırsanız, lütfen destek ile iletişime geçin.",configError:"Yapılandırma alınırken beklenmeyen bir hata oluştu",userEmailError:"E-posta veya kullanıcı adı geçersiz bir formata sahip.",userPhoneError:"Ön ek veya telefon numarası geçersiz bir formata sahip.",userPasswordError:"Şifre geçersiz bir formata sahip."},"en-us":{invalidField:"Sorry, that username/email address and/or password has not been recognized.",forgotPassword:"Forgot Password",userEmail:"Username or Email",userPhone:"Phone number",userPrefix:"Phone prefix",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful",Forbidden_UserAccount_Blocked:"Player account blocked",GmErr_USER_ACCOUNT_BLOCKED:"You’re currently unable to login to your account - please contact Customer Services for more information.",setUpPassowrd:"You need to reset your password",Unauthorized:"The player account number, e-mail address or password is incorrect",CountryRestricted:"Registration is not possible from a restricted jurisdiction. If you encounter further issues, please contact support.",configError:"An unexpected error has occured when fetchig the configuration",userEmailError:"The email or username have an invalid format.",userPhoneError:"The prefix or the phone number have an invalid format.",userPasswordError:"The password has an invalid format."},ro:{invalidField:"Ne pare rău, acest nume de utilizator/adresă de e-mail și/sau parolă nu a fost recunoscut.",forgotPassword:"Ați uitat parola",userEmail:"Nume utilizator sau email",userPhone:"Număr de telefon",userPrefix:"Prefix telefon",password:"Parolă",login:"Autentificare",genericError:"A apărut o eroare neașteptată",successMessage:"Autentificare reușită",Forbidden_UserAccount_Blocked:"Contul de jucător este blocat",GmErr_USER_ACCOUNT_BLOCKED:"În prezent, nu vă puteți conecta la contul dvs. - vă rugăm să contactați Serviciul Clienți pentru mai multe informații.",setUpPassowrd:"Trebuie să vă resetați parola",Unauthorized:"Numărul contului de jucător, adresa de e-mail sau parola sunt incorecte",CountryRestricted:"Înregistrarea nu este posibilă dintr-o jurisdicție restricționată. Dacă întâmpinați alte probleme, vă rugăm să contactați asistența.",configError:"A apărut o eroare neașteptată la preluarea configurației",userEmailError:"Emailul sau numele de utilizator au un format invalid.",userPhoneError:"Prefixul sau numărul de telefon au un format invalid.",userPasswordError:"Parola are un format invalid."},hr:{invalidField:"Žao nam je, to korisničko ime/adresa e-pošte i/ili lozinka nisu prepoznati.",forgotPassword:"Zaboravljena lozinka",userEmail:"Korisničko ime ili email",userPhone:"Broj telefona",userPrefix:"Telefonski prefix",password:"Lozinka",login:"Prijava",genericError:"Došlo je do neočekivane pogreške",successMessage:"Prijava uspješna",setUpPassowrd:"Morate resetirati svoju lozinku",Forbidden_UserAccount_Blocked:"Vaš račun je blokiran",GmErr_USER_ACCOUNT_BLOCKED:"Trenutno se ne možete prijaviti na svoj račun - molimo kontaktirajte Službu za korisnike za više informacija.",Unauthorized:"Lozinka, e-mail adresa ili korisničko ime su pogrešno uneseni",CountryRestricted:"Prijava nije moguća iz zemlje ograničene jurisdikcije. U slučaju daljnjih poteškoća, molimo kontaktirajte podršku.",configError:"Došlo je do neočekivane pogreške prilikom dohvaćanja konfiguracije",userEmailError:"E-mail ili korisničko ime imaju nevažeći format.",userPhoneError:"Prefiks ili telefonski broj imaju nevažeći format.",userPasswordError:"Lozinka ima nevažeći format."},fr:{invalidField:"Désolé, ce nom d'utilisateur/adresse e-mail et/ou mot de passe n'a pas été reconnu.",forgotPassword:"Mot de passe oublié",userEmail:"Nom d'utilisateur ou email",userPhone:"Numéro de téléphone",userPrefix:"Préfixe téléphonique",password:"Mot de passe",login:"Connexion",genericError:"Une erreur inattendue est survenue",successMessage:"Connexion réussie",Forbidden_UserAccount_Blocked:"Compte joueur bloqué",GmErr_USER_ACCOUNT_BLOCKED:"Vous ne pouvez actuellement pas vous connecter à votre compte - veuillez contacter le service client pour plus d'informations.",setUpPassowrd:"Vous devez réinitialiser votre mot de passe",Unauthorized:"Le numéro de compte joueur, l'adresse e-mail ou le mot de passe est incorrect",CountryRestricted:"L'inscription n'est pas possible depuis une juridiction restreinte. Si vous rencontrez d'autres problèmes, veuillez contacter le support.",configError:"Une erreur inattendue s'est produite lors de la récupération de la configuration",userEmailError:"L'email ou le nom d'utilisateur ont un format invalide.",userPhoneError:"Le préfixe ou le numéro de téléphone ont un format invalide.",userPasswordError:"Le mot de passe a un format invalide."},cs:{invalidField:"Omlouváme se, toto uživatelské jméno/e-mailová adresa a/nebo heslo nebyly rozpoznány.",forgotPassword:"Zaboravio sam lozinku ",userEmail:"Korisničko ime ili email",userPhone:"Telefonní číslo",userPrefix:"Telefonní předvolba",password:"Lozinka",login:"Prijava",genericError:"An unexpected error has occured",successMessage:"Login successful",Forbidden_UserAccount_Blocked:"Player account blocked",GmErr_USER_ACCOUNT_BLOCKED:"Momentálně se nemůžete přihlásit ke svému účtu - pro více informací kontaktujte zákaznický servis.",setUpPassowrd:"Musíte resetovat své heslo",Unauthorized:"Číslo účtu hráče, e-mailová adresa nebo heslo je nesprávné",CountryRestricted:"Registrace není možná z omezené jurisdikce. Pokud narazíte na další potíže, kontaktujte prosím podporu.",configError:"Při načítání konfigurace došlo k neočekávané chybě",userEmailError:"E-mail nebo uživatelské jméno mají neplatný formát.",userPhoneError:"Předvolba nebo telefonní číslo mají neplatný formát.",userPasswordError:"Heslo má neplatný formát."},de:{invalidField:"Entschuldigung, dieser Benutzername/diese E-Mail-Adresse und/oder dieses Passwort wurde nicht erkannt.",forgotPassword:"Passwort vergessen",userEmail:"Benutzername oder E-Mail",userPhone:"Telefonnummer",userPrefix:"Telefonvorwahl",password:"Passwort",login:"Anmelden",genericError:"Ein unerwarteter Fehler ist aufgetreten",successMessage:"Erfolgreich angemeldet",Forbidden_UserAccount_Blocked:"Spielerkonto gesperrt",GmErr_USER_ACCOUNT_BLOCKED:"Sie können sich derzeit nicht in Ihr Konto einloggen - bitte kontaktieren Sie den Kundenservice für weitere Informationen.",setUpPassowrd:"Sie müssen Ihr Passwort zurücksetzen",Unauthorized:"Die Spieler-Kontonummer, E-Mail-Adresse oder das Passwort ist falsch",CountryRestricted:"Eine Registrierung ist aus einer eingeschränkten Gerichtsbarkeit nicht möglich. Wenn Sie weitere Probleme haben, wenden Sie sich bitte an den Support.",configError:"Beim Abrufen der Konfiguration ist ein unerwarteter Fehler aufgetreten",userEmailError:"Die E-Mail oder der Benutzername haben ein ungültiges Format.",userPhoneError:"Die Vorwahl oder die Telefonnummer haben ein ungültiges Format.",userPasswordError:"Das Passwort hat ein ungültiges Format."},"pt-br":{invalidField:"Desculpe, esse nome de usuário/endereço de e-mail e/ou senha não foram reconhecidos.",forgotPassword:"Esqueceu a senha",userEmail:"Nome de usuário ou e-mail",userPhone:"Número de telefone",userPrefix:"Prefixo de telefone",password:"Senha",login:"Login",genericError:"Ocorreu um erro inesperado",successMessage:"Login bem-sucedido",Forbidden_UserAccount_Blocked:"Conta de jogador bloqueada",GmErr_USER_ACCOUNT_BLOCKED:"Você não pode fazer login na sua conta no momento - entre em contato com o Atendimento ao Cliente para mais informações.",setUpPassowrd:"Você precisa redefinir sua senha",Unauthorized:"O número da conta de jogador, o endereço de e-mail ou a senha estão incorretos",CountryRestricted:"O registro não é possível a partir de uma jurisdição restrita. Caso encontre outros problemas, entre em contato com o suporte.",configError:"Ocorreu um erro inesperado ao buscar a configuração",userEmailError:"O e-mail ou nome de usuário têm um formato inválido.",userPhoneError:"O prefixo ou o número de telefone têm um formato inválido.",userPasswordError:"A senha tem um formato inválido."},"es-mx":{invalidField:"Lo siento, ese nombre de usuario/dirección de correo electrónico y/o contraseña no ha sido reconocido.",forgotPassword:"Olvidé la contraseña",userEmail:"Nombre de usuario o correo electrónico",userPhone:"Número de teléfono",userPrefix:"Prefijo telefónico",password:"Contraseña",login:"Iniciar sesión",genericError:"Ocurrió un error inesperado",successMessage:"Inicio de sesión exitoso",Forbidden_UserAccount_Blocked:"Cuenta de jugador bloqueada",GmErr_USER_ACCOUNT_BLOCKED:"Actualmente no puede iniciar sesión en su cuenta - comuníquese con el Servicio al Cliente para obtener más información.",setUpPassowrd:"Necesitas restablecer tu contraseña",Unauthorized:"El número de cuenta de jugador, la dirección de correo electrónico o la contraseña son incorrectos",CountryRestricted:"El registro no es posible desde una jurisdicción restringida. Si encuentra más problemas, por favor contacte al soporte.",configError:"Se ha producido un error inesperado al obtener la configuración",userEmailError:"El correo electrónico o nombre de usuario tienen un formato inválido.",userPhoneError:"El prefijo o el número de teléfono tienen un formato inválido.",userPasswordError:"La contraseña tiene un formato inválido."},es:{invalidField:"Lo siento, ese nombre de usuario/dirección de correo electrónico y/o contraseña no ha sido reconocido.",forgotPassword:"Olvidé mi contraseña",userEmail:"Nombre de usuario o correo electrónico",userPhone:"Número de teléfono",userPrefix:"Prefijo de teléfono",password:"Contraseña",login:"Iniciar sesión",genericError:"Se ha producido un error inesperado",successMessage:"Inicio de sesión exitoso",Forbidden_UserAccount_Blocked:"Cuenta de jugador bloqueada",GmErr_USER_ACCOUNT_BLOCKED:"Actualmente no puede iniciar sesión en su cuenta - comuníquese con el Servicio al Cliente para obtener más información.",setUpPassowrd:"Necesitas restablecer tu contraseña",Unauthorized:"El número de cuenta, correo electrónico o contraseña es incorrecto",CountryRestricted:"No es posible registrarse desde una jurisdicción restringida. Si encuentra más problemas, comuníquese con el soporte.",configError:"Se ha producido un error inesperado al obtener la configuración",userEmailError:"El correo electrónico o nombre de usuario tienen un formato inválido.",userPhoneError:"El prefijo o el número de teléfono tienen un formato inválido.",userPasswordError:"La contraseña tiene un formato inválido."},pt:{invalidField:"Desculpe, esse nome de usuário/endereço de e-mail e/ou senha não foram reconhecidos.",forgotPassword:"Esqueceu a senha",userEmail:"Nome de usuário ou email",userPhone:"Número de telefone",userPrefix:"Prefixo de telefone",password:"Senha",login:"Entrar",genericError:"Ocorreu um erro inesperado",successMessage:"Login realizado com sucesso",Forbidden_UserAccount_Blocked:"Conta de jogador bloqueada",GmErr_USER_ACCOUNT_BLOCKED:"Você não pode fazer login na sua conta no momento - entre em contato com o Atendimento ao Cliente para mais informações.",setUpPassowrd:"Você precisa redefinir a sua senha",Unauthorized:"O número da conta, e-mail ou senha está incorreto",CountryRestricted:"Não é possível se registrar de uma jurisdição restrita. Se encontrar mais problemas, entre em contato com o suporte.",configError:"Ocorreu um erro inesperado ao procurar a configuração",userEmailError:"O e-mail ou nome de usuário têm um formato inválido.",userPhoneError:"O prefixo ou o número de telefone têm um formato inválido.",userPasswordError:"A senha tem um formato inválido."}},s=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]||(i[e]={});for(let s in t[e])i[e][s]=t[e][s]})),e(!0)}))})),o=(t,e,s)=>{let o=i[void 0!==e&&e in i?e:"en"][t];if(void 0!==s)for(const[t,e]of Object.entries(s.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o};function r(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function n(t,e){const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}
|
|
1
|
+
import{r as t,h as e}from"./p-55620ccb.js";const i={en:{invalidField:"Sorry, that username/email address and/or password has not been recognized.",forgotPassword:"Forgot Password",userEmail:"Username or Email",userPhone:"Phone number",userPrefix:"Phone prefix",password:"Password",login:"Login",genericError:"An unexpected error has occurred",successMessage:"Login successful",Forbidden_UserAccount_Blocked:"Player account blocked",GmErr_USER_ACCOUNT_BLOCKED:"You’re currently unable to login to your account - please contact Customer Services for more information.",setUpPassowrd:"You need to reset your password",GmErr_USER_AUTH_FAILED:"The username/email address and/or password entered is incorrect.",AuthFailedPhoneNumber:"The phone number and/or password entered is incorrect.",CountryRestricted:"Login is not possible from a restricted jurisdiction. If you encounter further issues, please contact support.",configError:"An unexpected error has occurred when fetching the configuration",userEmailError:"The email or username have an invalid format.",userPhoneError:"The prefix or the phone number have an invalid format.",userPasswordError:"The password has an invalid format."},tr:{invalidField:"Üzgünüz, bu kullanıcı adı/e-posta adresi ve/veya şifre tanınmadı.",forgotPassword:"Şifremi Unuttum",userEmail:"Kullanıcı Adı veya E-posta",userPhone:"Telefon numarası",userPrefix:"Telefon kodu",password:"Şifre",login:"Giriş Yap",genericError:"Beklenmeyen bir hata oluştu",successMessage:"Giriş başarılı",Forbidden_UserAccount_Blocked:"Oyuncu hesabı engellendi",GmErr_USER_ACCOUNT_BLOCKED:"Şu anda hesabınıza giriş yapamıyorsunuz - daha fazla bilgi için Müşteri Hizmetleri ile iletişime geçin.",setUpPassowrd:"Şifrenizi sıfırlamanız gerekiyor",GmErr_USER_AUTH_FAILED:"Girilen kullanıcı adı/e-posta adresi ve/veya şifre yanlış.",AuthFailedPhoneNumber:"Girilen telefon numarası ve/veya şifre yanlış.",CountryRestricted:"Kısıtlı bir yargı bölgesinden kayıt yapılamaz. Daha fazla sorunla karşılaşırsanız, lütfen destek ile iletişime geçin.",configError:"Yapılandırma alınırken beklenmeyen bir hata oluştu",userEmailError:"E-posta veya kullanıcı adı geçersiz bir formata sahip.",userPhoneError:"Ön ek veya telefon numarası geçersiz bir formata sahip.",userPasswordError:"Şifre geçersiz bir formata sahip."},"en-us":{invalidField:"Sorry, that username/email address and/or password has not been recognized.",forgotPassword:"Forgot Password",userEmail:"Username or Email",userPhone:"Phone number",userPrefix:"Phone prefix",password:"Password",login:"Login",genericError:"An unexpected error has occured",successMessage:"Login successful",Forbidden_UserAccount_Blocked:"Player account blocked",GmErr_USER_ACCOUNT_BLOCKED:"You’re currently unable to login to your account - please contact Customer Services for more information.",setUpPassowrd:"You need to reset your password",GmErr_USER_AUTH_FAILED:"The username/email address and/or password entered is incorrect.",AuthFailedPhoneNumber:"The phone number and/or password entered is incorrect.",CountryRestricted:"Login is not possible from a restricted jurisdiction. If you encounter further issues, please contact support.",configError:"An unexpected error has occured when fetchig the configuration",userEmailError:"The email or username have an invalid format.",userPhoneError:"The prefix or the phone number have an invalid format.",userPasswordError:"The password has an invalid format."},ro:{invalidField:"Ne pare rău, acest nume de utilizator/adresă de e-mail și/sau parolă nu a fost recunoscut.",forgotPassword:"Ați uitat parola",userEmail:"Nume utilizator sau email",userPhone:"Număr de telefon",userPrefix:"Prefix telefon",password:"Parolă",login:"Autentificare",genericError:"A apărut o eroare neașteptată",successMessage:"Autentificare reușită",Forbidden_UserAccount_Blocked:"Contul de jucător este blocat",GmErr_USER_ACCOUNT_BLOCKED:"În prezent, nu vă puteți conecta la contul dvs. - vă rugăm să contactați Serviciul Clienți pentru mai multe informații.",setUpPassowrd:"Trebuie să vă resetați parola",GmErr_USER_AUTH_FAILED:"Numele de utilizator/adresa de e-mail și/sau parola introduse sunt incorecte.",AuthFailedPhoneNumber:"Numărul de telefon și/sau parola introduse sunt incorecte.",CountryRestricted:"Înregistrarea nu este posibilă dintr-o jurisdicție restricționată. Dacă întâmpinați alte probleme, vă rugăm să contactați asistența.",configError:"A apărut o eroare neașteptată la preluarea configurației",userEmailError:"Emailul sau numele de utilizator au un format invalid.",userPhoneError:"Prefixul sau numărul de telefon au un format invalid.",userPasswordError:"Parola are un format invalid."},hr:{invalidField:"Žao nam je, to korisničko ime/adresa e-pošte i/ili lozinka nisu prepoznati.",forgotPassword:"Zaboravljena lozinka",userEmail:"Korisničko ime ili email",userPhone:"Broj telefona",userPrefix:"Telefonski prefix",password:"Lozinka",login:"Prijava",genericError:"Došlo je do neočekivane pogreške",successMessage:"Prijava uspješna",setUpPassowrd:"Morate resetirati svoju lozinku",Forbidden_UserAccount_Blocked:"Vaš račun je blokiran",GmErr_USER_ACCOUNT_BLOCKED:"Trenutno se ne možete prijaviti na svoj račun - molimo kontaktirajte Službu za korisnike za više informacija.",GmErr_USER_AUTH_FAILED:"Uneseno korisničko ime/adresa e-pošte i/ili lozinka su netočni.",AuthFailedPhoneNumber:"Uneseni broj telefona i/ili lozinka su netočni.",CountryRestricted:"Prijava nije moguća iz zemlje ograničene jurisdikcije. U slučaju daljnjih poteškoća, molimo kontaktirajte podršku.",configError:"Došlo je do neočekivane pogreške prilikom dohvaćanja konfiguracije",userEmailError:"E-mail ili korisničko ime imaju nevažeći format.",userPhoneError:"Prefiks ili telefonski broj imaju nevažeći format.",userPasswordError:"Lozinka ima nevažeći format."},fr:{invalidField:"Désolé, ce nom d'utilisateur/adresse e-mail et/ou mot de passe n'a pas été reconnu.",forgotPassword:"Mot de passe oublié",userEmail:"Nom d'utilisateur ou email",userPhone:"Numéro de téléphone",userPrefix:"Préfixe téléphonique",password:"Mot de passe",login:"Connexion",genericError:"Une erreur inattendue est survenue",successMessage:"Connexion réussie",Forbidden_UserAccount_Blocked:"Compte joueur bloqué",GmErr_USER_ACCOUNT_BLOCKED:"Vous ne pouvez actuellement pas vous connecter à votre compte - veuillez contacter le service client pour plus d'informations.",setUpPassowrd:"Vous devez réinitialiser votre mot de passe",GmErr_USER_AUTH_FAILED:"Le nom d'utilisateur/adresse e-mail et/ou le mot de passe saisis sont incorrects.",AuthFailedPhoneNumber:"Le numéro de téléphone et/ou le mot de passe saisis sont incorrects.",CountryRestricted:"L'inscription n'est pas possible depuis une juridiction restreinte. Si vous rencontrez d'autres problèmes, veuillez contacter le support.",configError:"Une erreur inattendue s'est produite lors de la récupération de la configuration",userEmailError:"L'email ou le nom d'utilisateur ont un format invalide.",userPhoneError:"Le préfixe ou le numéro de téléphone ont un format invalide.",userPasswordError:"Le mot de passe a un format invalide."},cs:{invalidField:"Omlouváme se, toto uživatelské jméno/e-mailová adresa a/nebo heslo nebyly rozpoznány.",forgotPassword:"Zaboravio sam lozinku ",userEmail:"Korisničko ime ili email",userPhone:"Telefonní číslo",userPrefix:"Telefonní předvolba",password:"Lozinka",login:"Prijava",genericError:"An unexpected error has occured",successMessage:"Login successful",Forbidden_UserAccount_Blocked:"Player account blocked",GmErr_USER_ACCOUNT_BLOCKED:"Momentálně se nemůžete přihlásit ke svému účtu - pro více informací kontaktujte zákaznický servis.",setUpPassowrd:"Musíte resetovat své heslo",GmErr_USER_AUTH_FAILED:"Zadané uživatelské jméno/e-mailová adresa a/nebo heslo jsou nesprávné.",AuthFailedPhoneNumber:"Zadané telefonní číslo a/nebo heslo jsou nesprávné.",CountryRestricted:"Registrace není možná z omezené jurisdikce. Pokud narazíte na další potíže, kontaktujte prosím podporu.",configError:"Při načítání konfigurace došlo k neočekávané chybě",userEmailError:"E-mail nebo uživatelské jméno mají neplatný formát.",userPhoneError:"Předvolba nebo telefonní číslo mají neplatný formát.",userPasswordError:"Heslo má neplatný formát."},de:{invalidField:"Entschuldigung, dieser Benutzername/diese E-Mail-Adresse und/oder dieses Passwort wurde nicht erkannt.",forgotPassword:"Passwort vergessen",userEmail:"Benutzername oder E-Mail",userPhone:"Telefonnummer",userPrefix:"Telefonvorwahl",password:"Passwort",login:"Anmelden",genericError:"Ein unerwarteter Fehler ist aufgetreten",successMessage:"Erfolgreich angemeldet",Forbidden_UserAccount_Blocked:"Spielerkonto gesperrt",GmErr_USER_ACCOUNT_BLOCKED:"Sie können sich derzeit nicht in Ihr Konto einloggen - bitte kontaktieren Sie den Kundenservice für weitere Informationen.",setUpPassowrd:"Sie müssen Ihr Passwort zurücksetzen",GmErr_USER_AUTH_FAILED:"Der eingegebene Benutzername/die E-Mail-Adresse und/oder das Passwort sind falsch.",AuthFailedPhoneNumber:"Die eingegebene Telefonnummer und/oder das Passwort sind falsch.",CountryRestricted:"Eine Registrierung ist aus einer eingeschränkten Gerichtsbarkeit nicht möglich. Wenn Sie weitere Probleme haben, wenden Sie sich bitte an den Support.",configError:"Beim Abrufen der Konfiguration ist ein unerwarteter Fehler aufgetreten",userEmailError:"Die E-Mail oder der Benutzername haben ein ungültiges Format.",userPhoneError:"Die Vorwahl oder die Telefonnummer haben ein ungültiges Format.",userPasswordError:"Das Passwort hat ein ungültiges Format."},"pt-br":{invalidField:"Desculpe, esse nome de usuário/endereço de e-mail e/ou senha não foram reconhecidos.",forgotPassword:"Esqueceu a senha",userEmail:"Nome de usuário ou e-mail",userPhone:"Número de telefone",userPrefix:"Prefixo de telefone",password:"Senha",login:"Login",genericError:"Ocorreu um erro inesperado",successMessage:"Login bem-sucedido",Forbidden_UserAccount_Blocked:"Conta de jogador bloqueada",GmErr_USER_ACCOUNT_BLOCKED:"Você não pode fazer login na sua conta no momento - entre em contato com o Atendimento ao Cliente para mais informações.",setUpPassowrd:"Você precisa redefinir sua senha",GmErr_USER_AUTH_FAILED:"O nome de usuário/endereço de e-mail e/ou a senha inseridos estão incorretos.",AuthFailedPhoneNumber:"O número de telefone e/ou a senha inseridos estão incorretos.",CountryRestricted:"O registro não é possível a partir de uma jurisdição restrita. Caso encontre outros problemas, entre em contato com o suporte.",configError:"Ocorreu um erro inesperado ao buscar a configuração",userEmailError:"O e-mail ou nome de usuário têm um formato inválido.",userPhoneError:"O prefixo ou o número de telefone têm um formato inválido.",userPasswordError:"A senha tem um formato inválido."},"es-mx":{invalidField:"Lo siento, ese nombre de usuario/dirección de correo electrónico y/o contraseña no ha sido reconocido.",forgotPassword:"Olvidé la contraseña",userEmail:"Nombre de usuario o correo electrónico",userPhone:"Número de teléfono",userPrefix:"Prefijo telefónico",password:"Contraseña",login:"Iniciar sesión",genericError:"Ocurrió un error inesperado",successMessage:"Inicio de sesión exitoso",Forbidden_UserAccount_Blocked:"Cuenta de jugador bloqueada",GmErr_USER_ACCOUNT_BLOCKED:"Actualmente no puede iniciar sesión en su cuenta - comuníquese con el Servicio al Cliente para obtener más información.",setUpPassowrd:"Necesitas restablecer tu contraseña",GmErr_USER_AUTH_FAILED:"El nombre de usuario/dirección de correo electrónico y/o la contraseña ingresados son incorrectos.",AuthFailedPhoneNumber:"El número de teléfono y/o la contraseña ingresados son incorrectos.",CountryRestricted:"El registro no es posible desde una jurisdicción restringida. Si encuentra más problemas, por favor contacte al soporte.",configError:"Se ha producido un error inesperado al obtener la configuración",userEmailError:"El correo electrónico o nombre de usuario tienen un formato inválido.",userPhoneError:"El prefijo o el número de teléfono tienen un formato inválido.",userPasswordError:"La contraseña tiene un formato inválido."},es:{invalidField:"Lo siento, ese nombre de usuario/dirección de correo electrónico y/o contraseña no ha sido reconocido.",forgotPassword:"Olvidé mi contraseña",userEmail:"Nombre de usuario o correo electrónico",userPhone:"Número de teléfono",userPrefix:"Prefijo de teléfono",password:"Contraseña",login:"Iniciar sesión",genericError:"Se ha producido un error inesperado",successMessage:"Inicio de sesión exitoso",Forbidden_UserAccount_Blocked:"Cuenta de jugador bloqueada",GmErr_USER_ACCOUNT_BLOCKED:"Actualmente no puede iniciar sesión en su cuenta - comuníquese con el Servicio al Cliente para obtener más información.",setUpPassowrd:"Necesitas restablecer tu contraseña",GmErr_USER_AUTH_FAILED:"El nombre de usuario/dirección de correo electrónico y/o la contraseña ingresados son incorrectos.",AuthFailedPhoneNumber:"El número de teléfono y/o la contraseña ingresados son incorrectos.",CountryRestricted:"No es posible registrarse desde una jurisdicción restringida. Si encuentra más problemas, comuníquese con el soporte.",configError:"Se ha producido un error inesperado al obtener la configuración",userEmailError:"El correo electrónico o nombre de usuario tienen un formato inválido.",userPhoneError:"El prefijo o el número de teléfono tienen un formato inválido.",userPasswordError:"La contraseña tiene un formato inválido."},pt:{invalidField:"Desculpe, esse nome de usuário/endereço de e-mail e/ou senha não foram reconhecidos.",forgotPassword:"Esqueceu a senha",userEmail:"Nome de usuário ou email",userPhone:"Número de telefone",userPrefix:"Prefixo de telefone",password:"Senha",login:"Entrar",genericError:"Ocorreu um erro inesperado",successMessage:"Login realizado com sucesso",Forbidden_UserAccount_Blocked:"Conta de jogador bloqueada",GmErr_USER_ACCOUNT_BLOCKED:"Você não pode fazer login na sua conta no momento - entre em contato com o Atendimento ao Cliente para mais informações.",setUpPassowrd:"Você precisa redefinir a sua senha",GmErr_USER_AUTH_FAILED:"O nome de usuário/endereço de e-mail e/ou a senha inseridos estão incorretos.",AuthFailedPhoneNumber:"O número de telefone e/ou a senha inseridos estão incorretos.",CountryRestricted:"Não é possível se registrar de uma jurisdição restrita. Se encontrar mais problemas, entre em contato com o suporte.",configError:"Ocorreu um erro inesperado ao procurar a configuração",userEmailError:"O e-mail ou nome de usuário têm um formato inválido.",userPhoneError:"O prefixo ou o número de telefone têm um formato inválido.",userPasswordError:"A senha tem um formato inválido."}},s=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]||(i[e]={});for(let s in t[e])i[e][s]=t[e][s]})),e(!0)}))})),o=(t,e,s)=>{let o=i[void 0!==e&&e in i?e:"en"][t];if(void 0!==s)for(const[t,e]of Object.entries(s.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o};function r(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function n(t,e){const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -20,13 +20,13 @@ const h=globalThis,c=h.ShadowRoot&&(void 0===h.ShadyCSS||h.ShadyCSS.nativeShadow
|
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/,{is:g,defineProperty:b,getOwnPropertyDescriptor:y,getOwnPropertyNames:w,getOwnPropertySymbols:_,getPrototypeOf:x}=Object,C=globalThis,
|
|
23
|
+
*/,{is:g,defineProperty:b,getOwnPropertyDescriptor:y,getOwnPropertyNames:w,getOwnPropertySymbols:_,getPrototypeOf:x}=Object,C=globalThis,A=C.trustedTypes,k=A?A.emptyScript:"",E=C.reactiveElementPolyfillSupport,P={toAttribute(t,e){switch(e){case Boolean:t=t?k:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},I=(t,e)=>!g(t,e),S={attribute:!0,type:String,converter:P,reflect:!1,hasChanged:I};Symbol.metadata??=Symbol("metadata"),C.litPropertyMetadata??=new WeakMap;class z extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=S){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&b(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=y(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return s?.call(this)},set(e){const r=s?.call(this);o.call(this,e),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??S}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=x(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...w(t),..._(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(v(t))}else void 0!==t&&e.push(v(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return f(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:P).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:P;this._$Em=s,this[s]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??I)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}z.elementStyles=[],z.shadowRootOptions={mode:"open"},z.elementProperties=new Map,z.finalized=new Map,E?.({ReactiveElement:z}),(C.reactiveElementVersions??=[]).push("2.0.4");
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*/
|
|
29
|
-
const T=globalThis,O=T.trustedTypes,
|
|
29
|
+
const T=globalThis,O=T.trustedTypes,N=O?O.createPolicy("lit-html",{createHTML:t=>t}):void 0,F="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,M="?"+B,U=`<${M}>`,j=document,L=()=>j.createComment(""),D=t=>null===t||"object"!=typeof t&&"function"!=typeof t,R=Array.isArray,V="[ \t\n\f\r]",q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,G=/-->/g,H=/>/g,W=RegExp(`>|${V}(?:([^\\s"'>=/]+)(${V}*=${V}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),$=/'/g,Y=/"/g,K=/^(?:script|style|textarea|title)$/i,J=Symbol.for("lit-noChange"),Z=Symbol.for("lit-nothing"),Q=new WeakMap,X=j.createTreeWalker(j,129);function tt(t,e){if(!R(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==N?N.createHTML(e):e}const et=(t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=q;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(n.lastIndex=c,l=n.exec(i),null!==l);)c=n.lastIndex,n===q?"!--"===l[1]?n=G:void 0!==l[1]?n=H:void 0!==l[2]?(K.test(l[2])&&(o=RegExp("</"+l[2],"g")),n=W):void 0!==l[3]&&(n=W):n===W?">"===l[0]?(n=o??q,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?W:'"'===l[3]?Y:$):n===Y||n===$?n=W:n===G||n===H?n=q:(n=W,o=void 0);const d=n===W&&t[e+1].startsWith("/>")?" ":"";r+=n===q?i+U:h>=0?(s.push(a),i.slice(0,h)+F+i.slice(h)+B+d):i+B+(-2===h?e:d)}return[tt(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};class it{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,a=this.parts,[l,h]=et(t,e);if(this.el=it.createElement(l,i),X.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=X.nextNode())&&a.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(F)){const e=h[r++],i=s.getAttribute(t).split(B),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?at:"?"===n[1]?lt:"@"===n[1]?ht:nt}),s.removeAttribute(t)}else t.startsWith(B)&&(a.push({type:6,index:o}),s.removeAttribute(t));if(K.test(s.tagName)){const t=s.textContent.split(B),e=t.length-1;if(e>0){s.textContent=O?O.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],L()),X.nextNode(),a.push({type:2,index:++o});s.append(t[e],L())}}}else if(8===s.nodeType)if(s.data===M)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(B,t+1));)a.push({type:7,index:o}),t+=B.length-1}o++}}static createElement(t,e){const i=j.createElement("template");return i.innerHTML=t,i}}function st(t,e,i=t,s){if(e===J)return e;let o=void 0!==s?i._$Co?.[s]:i._$Cl;const r=D(e)?void 0:e._$litDirective$;return o?.constructor!==r&&(o?._$AO?.(!1),void 0===r?o=void 0:(o=new r(t),o._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=o:i._$Cl=o),void 0!==o&&(e=st(t,o._$AS(t,e.values),o,s)),e}class ot{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??j).importNode(e,!0);X.currentNode=s;let o=X.nextNode(),r=0,n=0,a=i[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new rt(o,o.nextSibling,this,t):1===a.type?e=new a.ctor(o,a.name,a.strings,this,t):6===a.type&&(e=new ct(o,this,t)),this._$AV.push(e),a=i[++n]}r!==a?.index&&(o=X.nextNode(),r++)}return X.currentNode=j,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class rt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=Z,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=st(this,t,e),D(t)?t===Z||null==t||""===t?(this._$AH!==Z&&this._$AR(),this._$AH=Z):t!==this._$AH&&t!==J&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>R(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Z&&D(this._$AH)?this._$AA.nextSibling.data=t:this.T(j.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=it.createElement(tt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new ot(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=Q.get(t.strings);return void 0===e&&Q.set(t.strings,e=new it(t)),e}k(t){R(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new rt(this.O(L()),this.O(L()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class nt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=Z,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Z}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=st(this,t,e,0),r=!D(t)||t!==this._$AH&&t!==J,r&&(this._$AH=t);else{const s=t;let n,a;for(t=o[0],n=0;n<o.length-1;n++)a=st(this,s[i+n],e,n),a===J&&(a=this._$AH[n]),r||=!D(a)||a!==this._$AH[n],a===Z?t=Z:t!==Z&&(t+=(a??"")+o[n+1]),this._$AH[n]=a}r&&!s&&this.j(t)}j(t){t===Z?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class at extends nt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Z?void 0:t}}class lt extends nt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Z)}}class ht extends nt{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=st(this,t,e,0)??Z)===J)return;const i=this._$AH,s=t===Z&&i!==Z||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==Z&&(i===Z||s);s&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class ct{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){st(this,t)}}const dt=T.litHtmlPolyfillSupport;dt?.(it,rt),(T.litHtmlVersions??=[]).push("3.2.1");
|
|
30
30
|
/**
|
|
31
31
|
* @license
|
|
32
32
|
* Copyright 2017 Google LLC
|
|
@@ -43,7 +43,7 @@ const mt=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
45
45
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
46
|
-
*/,ft=[],vt=new Set,gt=new Set;function bt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function yt(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function wt(t){return t.map((t=>t.cssText)).join("\n")}const _t="vaadin-themable-mixin-style";function xt(t){t.prototype instanceof ut?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(_t).textContent=wt(t.getStylesForThis()),gt.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&xt(i)}))}function Ct(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof p||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):ft.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&>.forEach((i=>{if(yt(t,i)&&function(t){return bt(customElements.get(t))}(i)){const t=customElements.get(i);!function(t,e){const i=t.__themes;return!(!i||!e)&&i.some((t=>t.styles.some((t=>e.some((e=>e.cssText===t.cssText))))))}(t,e)?window.Vaadin&&window.Vaadin.suppressPostFinalizeStylesWarning||console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),xt(t),function(t){vt.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof ut?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),f(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(_t).textContent=e.prototype._template.content.getElementById(_t).textContent}(i):i||vt.delete(e)}))}(t)}}))}function
|
|
46
|
+
*/,ft=[],vt=new Set,gt=new Set;function bt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function yt(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function wt(t){return t.map((t=>t.cssText)).join("\n")}const _t="vaadin-themable-mixin-style";function xt(t){t.prototype instanceof ut?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(_t).textContent=wt(t.getStylesForThis()),gt.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&xt(i)}))}function Ct(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof p||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):ft.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&>.forEach((i=>{if(yt(t,i)&&function(t){return bt(customElements.get(t))}(i)){const t=customElements.get(i);!function(t,e){const i=t.__themes;return!(!i||!e)&&i.some((t=>t.styles.some((t=>e.some((e=>e.cssText===t.cssText))))))}(t,e)?window.Vaadin&&window.Vaadin.suppressPostFinalizeStylesWarning||console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),xt(t),function(t){vt.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof ut?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),f(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(_t).textContent=e.prototype._template.content.getElementById(_t).textContent}(i):i||vt.delete(e)}))}(t)}}))}function At(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():ft}function kt(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function Et(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=At().find((e=>e.moduleId===t));i?e.push(...Et(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function Pt(t){const e=`${t}-default-theme`,i=At().filter((i=>i.moduleId!==e&&yt(i.themeFor,t))).map((t=>({...t,styles:[...Et(t),...t.styles],includePriority:kt(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:At().filter((t=>t.moduleId===e))}const It=t=>class extends(mt(t)){constructor(){super(),vt.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&>.add(this.is),this.elementStyles)return;const t=this.prototype._template;t&&!bt(this)&&function(t,e){const i=document.createElement("style");i.id=_t,i.textContent=wt(t),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...[t].flat(1/0),...e]:e}static getStylesForThis(){const e=t.__themes||[],i=Object.getPrototypeOf(this.prototype);this.__themes=[...e,...(i?i.constructor.__themes:[])||[],...Pt(this.is)];const s=this.__themes.flatMap((t=>t.styles));return s.filter(((t,e)=>e===s.lastIndexOf(t)))}}
|
|
47
47
|
/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
@@ -709,7 +709,7 @@ const Ot=m`
|
|
|
709
709
|
* @license
|
|
710
710
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
711
711
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
712
|
-
*/,
|
|
712
|
+
*/,Nt=m`
|
|
713
713
|
:host {
|
|
714
714
|
top: var(--lumo-space-m);
|
|
715
715
|
right: var(--lumo-space-m);
|
|
@@ -774,13 +774,13 @@ const Ot=m`
|
|
|
774
774
|
opacity: 1;
|
|
775
775
|
}
|
|
776
776
|
}
|
|
777
|
-
`;Ct("",
|
|
777
|
+
`;Ct("",Nt,{moduleId:"lumo-overlay"});
|
|
778
778
|
/**
|
|
779
779
|
* @license
|
|
780
780
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
781
781
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
782
782
|
*/
|
|
783
|
-
const
|
|
783
|
+
const Ft=m`
|
|
784
784
|
:host([opening]),
|
|
785
785
|
:host([closing]) {
|
|
786
786
|
animation: 0.14s lumo-overlay-dummy-animation;
|
|
@@ -810,7 +810,7 @@ const Nt=m`
|
|
|
810
810
|
opacity: 0;
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
|
-
`;Ct("",
|
|
813
|
+
`;Ct("",Ft,{moduleId:"lumo-menu-overlay-core"}),Ct("",[Nt,Ft,m`
|
|
814
814
|
/* Small viewport (bottom sheet) styles */
|
|
815
815
|
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
816
816
|
@media (max-width: 450px), (max-height: 450px) {
|
|
@@ -872,7 +872,7 @@ const Nt=m`
|
|
|
872
872
|
transform: translateY(150%);
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
|
-
`],{moduleId:"lumo-menu-overlay"}),Ct("vaadin-combo-box-overlay",[
|
|
875
|
+
`],{moduleId:"lumo-menu-overlay"}),Ct("vaadin-combo-box-overlay",[Nt,Ft,m`
|
|
876
876
|
[part='content'] {
|
|
877
877
|
padding: 0;
|
|
878
878
|
}
|
|
@@ -1090,7 +1090,7 @@ const Nt=m`
|
|
|
1090
1090
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1091
1091
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1092
1092
|
*/
|
|
1093
|
-
const
|
|
1093
|
+
const Bt=m`
|
|
1094
1094
|
[part$='button'] {
|
|
1095
1095
|
flex: none;
|
|
1096
1096
|
width: 1em;
|
|
@@ -1117,13 +1117,13 @@ const Mt=m`
|
|
|
1117
1117
|
font-family: 'lumo-icons';
|
|
1118
1118
|
display: block;
|
|
1119
1119
|
}
|
|
1120
|
-
`;Ct("",
|
|
1120
|
+
`;Ct("",Bt,{moduleId:"lumo-field-button"});
|
|
1121
1121
|
/**
|
|
1122
1122
|
* @license
|
|
1123
1123
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1124
1124
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1125
1125
|
*/
|
|
1126
|
-
const
|
|
1126
|
+
const Mt=m`
|
|
1127
1127
|
:host {
|
|
1128
1128
|
--_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
|
|
1129
1129
|
}
|
|
@@ -1184,7 +1184,7 @@ const Ft=m`
|
|
|
1184
1184
|
* @license
|
|
1185
1185
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1186
1186
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1187
|
-
*/,
|
|
1187
|
+
*/,Ut=m`
|
|
1188
1188
|
[part='label'] {
|
|
1189
1189
|
align-self: flex-start;
|
|
1190
1190
|
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
@@ -1296,13 +1296,13 @@ const Ft=m`
|
|
|
1296
1296
|
margin-left: 0;
|
|
1297
1297
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
1298
1298
|
}
|
|
1299
|
-
`;Ct("",
|
|
1299
|
+
`;Ct("",Ut,{moduleId:"lumo-required-field"});
|
|
1300
1300
|
/**
|
|
1301
1301
|
* @license
|
|
1302
1302
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1303
1303
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1304
1304
|
*/
|
|
1305
|
-
const
|
|
1305
|
+
const jt=[Ut,Bt,Mt,m`
|
|
1306
1306
|
:host {
|
|
1307
1307
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
1308
1308
|
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
@@ -1433,7 +1433,7 @@ const Ut=[jt,Mt,Ft,m`
|
|
|
1433
1433
|
[part='clear-button']::before {
|
|
1434
1434
|
content: var(--lumo-icons-cross);
|
|
1435
1435
|
}
|
|
1436
|
-
`];Ct("",
|
|
1436
|
+
`];Ct("",jt,{moduleId:"lumo-input-field-shared-styles"}),Ct("vaadin-combo-box",[jt,m`
|
|
1437
1437
|
[part='toggle-button']::before {
|
|
1438
1438
|
content: var(--lumo-icons-dropdown);
|
|
1439
1439
|
}
|
|
@@ -1457,7 +1457,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
1457
1457
|
Code distributed by Google as part of the polymer project is also
|
|
1458
1458
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1459
1459
|
*/
|
|
1460
|
-
let Lt,Rt
|
|
1460
|
+
let Lt,Dt,Rt=/(url\()([^)]*)(\))/g,Vt=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function qt(t,e){if(t&&Vt.test(t))return t;if("//"===t)return t;if(void 0===Lt){Lt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Lt="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),Lt)try{return new URL(t,e).href}catch(e){return t}return Dt||(Dt=document.implementation.createHTMLDocument("temp"),Dt.base=Dt.createElement("base"),Dt.head.appendChild(Dt.base),Dt.anchor=Dt.createElement("a"),Dt.body.appendChild(Dt.anchor)),Dt.base.href=e,Dt.anchor.href=t,Dt.anchor.href||t}function Gt(t,e){return t.replace(Rt,(function(t,i,s,o){return i+"'"+qt(s.replace(/["']/g,""),e)+"'"+o}))}function Ht(t){return t.substring(0,t.lastIndexOf("/")+1)}
|
|
1461
1461
|
/**
|
|
1462
1462
|
@license
|
|
1463
1463
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1466,7 +1466,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1466
1466
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1467
1467
|
Code distributed by Google as part of the polymer project is also
|
|
1468
1468
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1469
|
-
*/const
|
|
1469
|
+
*/const Wt=(!window.ShadyDOM||!window.ShadyDOM.inUse)&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let $t=window.Polymer&&window.Polymer.rootPath||Ht(document.baseURI||window.location.href),Yt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Kt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Jt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Zt=window.Polymer&&window.Polymer.legacyOptimizations||!1,Qt=window.Polymer&&window.Polymer.legacyWarnings||!1,Xt=window.Polymer&&window.Polymer.syncInitialRender||!1,te=window.Polymer&&window.Polymer.legacyUndefined||!1,ee=window.Polymer&&window.Polymer.orderedComputed||!1,ie=window.Polymer&&window.Polymer.removeNestedTemplates||!1,se=window.Polymer&&window.Polymer.fastDomIf||!1,oe=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,re=0;const ne=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=re++;return function(s){let o=s.__mixinSet;if(o&&o[i])return s;let r=e,n=r.get(s);if(!n){n=t(s),r.set(s,n);let e=Object.create(n.__mixinSet||o||null);e[i]=!0,n.__mixinSet=e}return n}};
|
|
1470
1470
|
/**
|
|
1471
1471
|
@license
|
|
1472
1472
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1475,7 +1475,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1475
1475
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1476
1476
|
Code distributed by Google as part of the polymer project is also
|
|
1477
1477
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1478
|
-
*/let ae={},le={};function he(t,e){ae[t]=le[t.toLowerCase()]=e}function ce(t){return ae[t]||le[t.toLowerCase()]}class de extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=ce(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,s){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=qt(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath
|
|
1478
|
+
*/let ae={},le={};function he(t,e){ae[t]=le[t.toLowerCase()]=e}function ce(t){return ae[t]||le[t.toLowerCase()]}class de extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=ce(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,s){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=qt(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Ht(e)}return this.__assetpath}register(t){if(t=t||this.id){if(Kt&&void 0!==ce(t))throw he(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,he(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}de.prototype.modules=ae,customElements.define("dom-module",de);
|
|
1479
1479
|
/**
|
|
1480
1480
|
@license
|
|
1481
1481
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1485,7 +1485,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
1485
1485
|
Code distributed by Google as part of the polymer project is also
|
|
1486
1486
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1487
1487
|
*/
|
|
1488
|
-
const ue="link[rel=import][type~=css]",pe="include",me="shady-unscoped";function fe(t){return de.import(t)}function ve(t){const e=
|
|
1488
|
+
const ue="link[rel=import][type~=css]",pe="include",me="shady-unscoped";function fe(t){return de.import(t)}function ve(t){const e=Gt((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function ge(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...be(e[t]));return i}function be(t){const e=fe(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...we(e));const i=e.querySelector("template");i&&t.push(...ye(i,e.assetpath)),e._styles=t}return e._styles}function ye(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let o=s[t],r=o.getAttribute(pe);r&&i.push(...ge(r).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(o.textContent=Gt(o.textContent,e)),i.push(o)}t._styles=i}return t._styles}function we(t){const e=[],i=t.querySelectorAll(ue);for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute(me);if(i&&!t._unscopedStyle){const e=ve(t);e.setAttribute(me,""),t._unscopedStyle=e}else t._style||(t._style=ve(t));e.push(i?t._unscopedStyle:t._style)}}return e}
|
|
1489
1489
|
/**
|
|
1490
1490
|
@license
|
|
1491
1491
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1503,7 +1503,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1503
1503
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1504
1504
|
Code distributed by Google as part of the polymer project is also
|
|
1505
1505
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1506
|
-
*/function xe(t){return t.indexOf(".")>=0}function Ce(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function
|
|
1506
|
+
*/function xe(t){return t.indexOf(".")>=0}function Ce(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function Ae(t,e){return 0===e.indexOf(t+".")}function ke(t,e,i){return e+i.slice(t.length)}function Ee(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let s=t[i].toString().split(".");for(let t=0;t<s.length;t++)e.push(s[t])}return e.join(".")}return t}function Pe(t){return Array.isArray(t)?Ee(t).split("."):t.toString().split(".")}function Ie(t,e,i){let s=t,o=Pe(e);for(let t=0;t<o.length;t++){if(!s)return;s=s[o[t]]}return i&&(i.path=o.join(".")),s}function Se(t,e,i){let s=t,o=Pe(e),r=o[o.length-1];if(o.length>1){for(let t=0;t<o.length-1;t++)if(s=s[o[t]],!s)return;s[r]=i}else s[e]=i;return o.join(".")}
|
|
1507
1507
|
/**
|
|
1508
1508
|
@license
|
|
1509
1509
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1512,7 +1512,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1512
1512
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1513
1513
|
Code distributed by Google as part of the polymer project is also
|
|
1514
1514
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1515
|
-
*/const ze={},Te=/-[a-z]/g,Oe=/([A-Z])/g;function
|
|
1515
|
+
*/const ze={},Te=/-[a-z]/g,Oe=/([A-Z])/g;function Ne(t){return ze[t]||(ze[t]=t.indexOf("-")<0?t:t.replace(Te,(t=>t[1].toUpperCase())))}function Fe(t){return ze[t]||(ze[t]=t.replace(Oe,"-$1").toLowerCase())}
|
|
1516
1516
|
/**
|
|
1517
1517
|
@license
|
|
1518
1518
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1521,7 +1521,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1521
1521
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1522
1522
|
Code distributed by Google as part of the polymer project is also
|
|
1523
1523
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1524
|
-
*/let
|
|
1524
|
+
*/let Be=0,Me=0,Ue=[],je=0,Le=!1,De=document.createTextNode("");new window.MutationObserver((function(){Le=!1;const t=Ue.length;for(let e=0;e<t;e++){let t=Ue[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Ue.splice(0,t),Me+=t})).observe(De,{characterData:!0});const Re={run:t=>(Le||(Le=!0,De.textContent=je++),Ue.push(t),Be++),cancel(t){const e=t-Me;if(e>=0){if(!Ue[e])throw new Error("invalid async handle: "+t);Ue[e]=null}}},Ve=ne((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let s=this.__data[t],o=this._shouldPropertyChange(t,e,s);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),o}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Re.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,s){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,s)}_attributeToProperty(t,e,i){if(!this.__serializing){const s=this.__dataAttributes,o=s&&s[t]||t;this[o]=this._deserializeValue(e,i||this.constructor.typeForProperty(o))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=_e(t)),void 0===s?t.removeAttribute(i):t.setAttribute(i,""===s&&window.trustedTypes?window.trustedTypes.emptyScript:s)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),qe={};
|
|
1525
1525
|
/**
|
|
1526
1526
|
@license
|
|
1527
1527
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1530,7 +1530,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
1530
1530
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1531
1531
|
Code distributed by Google as part of the polymer project is also
|
|
1532
1532
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1533
|
-
*/let
|
|
1533
|
+
*/let Ge=HTMLElement.prototype;for(;Ge;){let t=Object.getOwnPropertyNames(Ge);for(let e=0;e<t.length;e++)qe[t[e]]=!0;Ge=Object.getPrototypeOf(Ge)}const He=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,We=ne((t=>{const e=Ve(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(Ne(t[e]))}static attributeNameForProperty(t){return Fe(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(He(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){!function(t,e){if(!qe[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),$e={"dom-if":!0,"dom-repeat":!0};let Ye=!1,Ke=!1;const Je=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const o=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(o,s)):e.setAttribute(s,o)}})();function Ze(t){let e=t.getAttribute("is");if(e&&$e[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];Je(t,i,e),i.removeAttribute(e)}}return t}function Qe(t,e){let i=e.parentInfo&&Qe(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,s=0;t;t=t.nextSibling)if(e.parentIndex===s++)return t}function Xe(t,e,i,s){s.id&&(e[s.id]=i)}function ti(t,e,i){if(i.events&&i.events.length)for(let s,o=0,r=i.events;o<r.length&&(s=r[o]);o++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function ei(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const ii=ne((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(e),i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let s=!1,o=t;return"template"!=o.localName||o.hasAttribute("preserve-content")?"slot"===o.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(o,e,i)||s,function(t){(function(){if(!Ye){Ye=!0;const t=document.createElement("textarea");t.placeholder="a",Ke=t.placeholder===t.textContent}return Ke})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(o),o.firstChild&&this._parseTemplateChildNodes(o,e,i),o.hasAttributes&&o.hasAttributes()&&(s=this._parseTemplateNodeAttributes(o,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,o=t.firstChild,r=0;o;o=s){if("template"==o.localName&&(o=Ze(o)),s=o.nextSibling,o.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)o.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!o.textContent.trim()){t.removeChild(o);continue}}let n={parentIndex:r,parentInfo:i};this._parseTemplateNode(o,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),o.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,o=this._parseTemplate(s,e);return(o.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=o,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,o=Array.from(t.attributes);for(let r,n=o.length-1;r=o[n];n--)s=this._parseTemplateNodeAttribute(t,e,i,r.name,r.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,o){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:o}),!0):"id"===s&&(i.id=o,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let o=s.nodeList=new Array(i.length);s.$={};for(let t,r=0,n=i.length;r<n&&(t=i[r]);r++){let i=o[r]=Qe(s,t);Xe(0,s.$,i,t),ei(0,i,t,e),ti(this,i,t)}return s}_addMethodEventListenerToNode(t,e,i,s){let o=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,o),o}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
|
|
1534
1534
|
/**
|
|
1535
1535
|
* @fileoverview
|
|
1536
1536
|
* @suppress {checkPrototypalTypes}
|
|
@@ -1541,7 +1541,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
1541
1541
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
1542
1542
|
* Google as part of the polymer project is also subject to an additional IP
|
|
1543
1543
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1544
|
-
*/let si=0;const oi=[],ri={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},ni="__computeInfo",ai=/[A-Z]/;function li(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function hi(t,e,i,s,o,r){if(e){let n=!1;const a=si++;for(let l in i){let h=e[o?Ce(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===a||o&&!di(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,i,s,e.info,o,r),n=!0)}return n}return!1}function ci(t,e,i,s,o,r,n,a){let l=!1,h=e[n?Ce(s):s];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===i||n&&!di(s,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,n,a),l=!0);return l}function di(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!function(t,e){return 0===t.indexOf(e+".")}(i,t))||!(!e.wildcard||!ke(i,t))}return!0}function ui(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,n=o.property;r?r.call(t,t.__data[n],s[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function pi(t,e,i){let s=Ce(e);return s!==e&&(mi(t,Ne(s)+"-changed",i[e],e),!0)}function mi(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),_e(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function fi(t,e,i,s,o,r){let n=(r?Ce(e):e)!=e?e:null,a=n?Ie(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),mi(t,o.eventName,a,n)}function vi(t,e,i,s,o){let r=t.__data[e];Yt&&(r=Yt(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const gi=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const n=s+o>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){r=n;break}o=n-1}}r<0&&(r=o+1),e.splice(r,0,t)},bi=(t,e,i,s,o)=>{const r=e[o?Ce(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun===si||o&&!di(t,n.trigger)||(n.info.lastRun=si,gi(n.info,i,s))}};function yi(t,e,i,s,o){let r=Pi(t,e,i,0,o);if(r===oi)return!1;let n=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function wi(t,e,i,s,o,r,n){i.bindings=i.bindings||[];let a={kind:s,target:o,parts:r,literal:n,isCompound:1!==r.length};if(i.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Ne(o)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,_i(t,e,a,s,l)}}function _i(t,e,i,s,o){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,n={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=Bi(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:xi,info:n,trigger:s})}}}function xi(t,e,i,s,o,r,n){let a=n[o.index],l=o.binding,h=o.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[e];e=Ae(h.source,l.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=o.evaluator._evaluateBinding(t,h,e,i,s,r);n!==oi&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,o,i,s),Yt&&(o=Yt(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?e[ri.READ_ONLY]&&e[ri.READ_ONLY][s]||e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,a,l,h,n)}}function Ci(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=_e(t)),t[r]=e.literal)}}function ki(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,n=t.detail,a=n&&n.path;a?(s=Ae(i,s,a),r=n&&n.value):r=t.currentTarget[i],r=o?!r:r,e[ri.READ_ONLY]&&e[ri.READ_ONLY][s]||!e._setPendingPropertyOrPath(s,r,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function Ai(t,e,i,s,o,r){let n={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:n,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function Pi(t,e,i,s,o){let r=t._methodHost||t,n=r[o.methodName];if(n){let s=t._marshalArgs(o.args,e,i);return s===oi?oi:n.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const Ei=[],Ii="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Si="(?:("+Ii+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",zi=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Ii+"\\s*(?:\\(\\s*(?:(?:"+Si+"(?:,\\s*"+Si+")*)?)\\)\\s*)?)(?:]]|}})","g");function Ti(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Oi(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Ei};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Bi(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Bi(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=Ce(e),i.structured=xe(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Ni(t,e,i){let s=Ie(t,i);return void 0===s&&(s=e[i]),s}function Mi(t,e,i,s){const o={indexSplices:s};te&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),te&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function Fi(t,e,i,s,o,r){Mi(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const ji=ne((t=>{const e=ii(Ge(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return ri}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(Ui.length){let t=Ui[Ui.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[ri.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==ri.READ_ONLY);let s=li(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=li(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,ri.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,ri.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,ri.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,ri.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||Ce(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=Ie(this,t);if(!(t=Se(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let n=s[r];ke(r,e)?(o=Ae(r,n,e),t._setPendingPropertyOrPath(o,i,!0,!0)):ke(n,e)&&(o=Ae(n,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=_e(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&xe(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[ri.NOTIFY]&&this[ri.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[ri.READ_ONLY]&&this[ri.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[ri.COMPUTE];if(o)if(ee){si++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[ri.COMPUTE];let s,{counts:o,ready:r,total:n}=function(t){const e=t[ni],i={},s=t[ri.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--o[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)bi(t,o,n,r,s);let a;for(;a=n.shift();)yi(t,"",e,0,a)&&bi(a.methodInfo,o,n,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;hi(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),hi(this,this[ri.REFLECT],e,i,o),hi(this,this[ri.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,n,a=t[ri.NOTIFY],l=si++;for(let n in e)e[n]&&(a&&ci(t,a,l,n,i,s,o)||o&&pi(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[ri.PROPAGATE]&&hi(this,this[ri.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{hi(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=Pe(t),e=Pe(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Pe(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Mi(this,Ie(this,t,i),i.path,e)}get(t,e){return Ie(e||this,t)}set(t,e,i){i?Se(i,t,e):this[ri.READ_ONLY]&&this[ri.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=Ie(this,t,i),o=s.length,r=s.push(...e);return e.length&&Fi(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=Ie(this,t,e),s=Boolean(i.length),o=i.pop();return s&&Fi(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},n=Ie(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||o.length)&&Fi(this,n,r.path,e,s.length,o),o}shift(t){let e={path:""},i=Ie(this,t,e),s=Boolean(i.length),o=i.shift();return s&&Fi(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=Ie(this,t,i),o=s.unshift(...e);return e.length&&Fi(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=Ie(this,t,s),i=s.path}else i=Array.isArray(t)?Pe(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,ri.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,ri.OBSERVE,{fn:ui,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,ri.OBSERVE,{fn:ui,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Oi(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");Ai(this,i,ri.OBSERVE,Pi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,ri.NOTIFY,{fn:fi,info:{eventName:Ne(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,ri.REFLECT,{fn:vi,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Oi(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=Ai(this,s,ri.COMPUTE,yi,t,i);li(this,ni)[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:l,value:h,literal:c}=t[r];if(!c)if(l){const t=ke(n,e),o=Ni(s,i,t?e:n);h={path:t?e:n,value:o,base:t?Ie(s,n):o}}else h=a?Ni(s,i,n):s[n];if(te&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return oi;o[r]=h}return o}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Ui.push(this);let i=super._stampTemplate(t,e);if(Ui.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];Ci(o,i),ki(o,t,i)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];_e(_e(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Ti(e)||" ",wi(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let n=this._parseBindings(r,i);if(n){let e=o,r="property";ai.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let a=Ti(n);return a&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(o)),t.setAttribute(o,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=Be(o)),wi(this,i,s,r,o,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,n=s.templateInfo,a="dom-if"===r.localName;ie&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,o=!1);let l=n.hostProps;if(se&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),ie||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)wi(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=zi.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],n=Boolean(i[2]),a=i[3].trim(),l=!1,h="",c=-1;"{"==r&&(c=a.indexOf("::"))>0&&(h=a.substring(c+2),a=a.substring(0,c),l=!0);let d=Oi(a),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(a);s.push({source:a,mode:r,negate:n,customEvent:l,signature:d,dependencies:u,event:h}),o=zi.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let n;return n=e.signature?Pi(t,i,s,0,e.signature):i!=e.source?Ie(t,e.source):r&&xe(i)?Ie(t,i):t.__data[i],e.negate&&(n=!n),n}}})),Ui=[],Li=ne((t=>{const e=Ve(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
1544
|
+
*/let si=0;const oi=[],ri={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},ni="__computeInfo",ai=/[A-Z]/;function li(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function hi(t,e,i,s,o,r){if(e){let n=!1;const a=si++;for(let l in i){let h=e[o?Ce(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===a||o&&!di(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,i,s,e.info,o,r),n=!0)}return n}return!1}function ci(t,e,i,s,o,r,n,a){let l=!1,h=e[n?Ce(s):s];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===i||n&&!di(s,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,n,a),l=!0);return l}function di(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!function(t,e){return 0===t.indexOf(e+".")}(i,t))||!(!e.wildcard||!Ae(i,t))}return!0}function ui(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,n=o.property;r?r.call(t,t.__data[n],s[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function pi(t,e,i){let s=Ce(e);return s!==e&&(mi(t,Fe(s)+"-changed",i[e],e),!0)}function mi(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),_e(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function fi(t,e,i,s,o,r){let n=(r?Ce(e):e)!=e?e:null,a=n?Ie(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),mi(t,o.eventName,a,n)}function vi(t,e,i,s,o){let r=t.__data[e];Yt&&(r=Yt(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const gi=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const n=s+o>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){r=n;break}o=n-1}}r<0&&(r=o+1),e.splice(r,0,t)},bi=(t,e,i,s,o)=>{const r=e[o?Ce(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun===si||o&&!di(t,n.trigger)||(n.info.lastRun=si,gi(n.info,i,s))}};function yi(t,e,i,s,o){let r=Ei(t,e,i,0,o);if(r===oi)return!1;let n=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function wi(t,e,i,s,o,r,n){i.bindings=i.bindings||[];let a={kind:s,target:o,parts:r,literal:n,isCompound:1!==r.length};if(i.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Fe(o)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,_i(t,e,a,s,l)}}function _i(t,e,i,s,o){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,n={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=Ni(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:xi,info:n,trigger:s})}}}function xi(t,e,i,s,o,r,n){let a=n[o.index],l=o.binding,h=o.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[e];e=ke(h.source,l.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=o.evaluator._evaluateBinding(t,h,e,i,s,r);n!==oi&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,o,i,s),Yt&&(o=Yt(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?e[ri.READ_ONLY]&&e[ri.READ_ONLY][s]||e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,a,l,h,n)}}function Ci(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=_e(t)),t[r]=e.literal)}}function Ai(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,n=t.detail,a=n&&n.path;a?(s=ke(i,s,a),r=n&&n.value):r=t.currentTarget[i],r=o?!r:r,e[ri.READ_ONLY]&&e[ri.READ_ONLY][s]||!e._setPendingPropertyOrPath(s,r,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function ki(t,e,i,s,o,r){let n={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:n,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function Ei(t,e,i,s,o){let r=t._methodHost||t,n=r[o.methodName];if(n){let s=t._marshalArgs(o.args,e,i);return s===oi?oi:n.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const Pi=[],Ii="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Si="(?:("+Ii+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",zi=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Ii+"\\s*(?:\\(\\s*(?:(?:"+Si+"(?:,\\s*"+Si+")*)?)\\)\\s*)?)(?:]]|}})","g");function Ti(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Oi(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Pi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Ni(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Ni(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=Ce(e),i.structured=xe(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Fi(t,e,i){let s=Ie(t,i);return void 0===s&&(s=e[i]),s}function Bi(t,e,i,s){const o={indexSplices:s};te&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),te&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function Mi(t,e,i,s,o,r){Bi(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const Ui=ne((t=>{const e=ii(We(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return ri}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(ji.length){let t=ji[ji.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[ri.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==ri.READ_ONLY);let s=li(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=li(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,ri.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,ri.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,ri.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,ri.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||Ce(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=Ie(this,t);if(!(t=Se(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let n=s[r];Ae(r,e)?(o=ke(r,n,e),t._setPendingPropertyOrPath(o,i,!0,!0)):Ae(n,e)&&(o=ke(n,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=_e(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&xe(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[ri.NOTIFY]&&this[ri.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[ri.READ_ONLY]&&this[ri.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[ri.COMPUTE];if(o)if(ee){si++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[ri.COMPUTE];let s,{counts:o,ready:r,total:n}=function(t){const e=t[ni],i={},s=t[ri.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--o[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)bi(t,o,n,r,s);let a;for(;a=n.shift();)yi(t,"",e,0,a)&&bi(a.methodInfo,o,n,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;hi(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),hi(this,this[ri.REFLECT],e,i,o),hi(this,this[ri.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,n,a=t[ri.NOTIFY],l=si++;for(let n in e)e[n]&&(a&&ci(t,a,l,n,i,s,o)||o&&pi(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[ri.PROPAGATE]&&hi(this,this[ri.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{hi(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=Ee(t),e=Ee(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Ee(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Bi(this,Ie(this,t,i),i.path,e)}get(t,e){return Ie(e||this,t)}set(t,e,i){i?Se(i,t,e):this[ri.READ_ONLY]&&this[ri.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=Ie(this,t,i),o=s.length,r=s.push(...e);return e.length&&Mi(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=Ie(this,t,e),s=Boolean(i.length),o=i.pop();return s&&Mi(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},n=Ie(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||o.length)&&Mi(this,n,r.path,e,s.length,o),o}shift(t){let e={path:""},i=Ie(this,t,e),s=Boolean(i.length),o=i.shift();return s&&Mi(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=Ie(this,t,i),o=s.unshift(...e);return e.length&&Mi(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=Ie(this,t,s),i=s.path}else i=Array.isArray(t)?Ee(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,ri.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,ri.OBSERVE,{fn:ui,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,ri.OBSERVE,{fn:ui,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Oi(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");ki(this,i,ri.OBSERVE,Ei,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,ri.NOTIFY,{fn:fi,info:{eventName:Fe(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,ri.REFLECT,{fn:vi,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Oi(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=ki(this,s,ri.COMPUTE,yi,t,i);li(this,ni)[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:l,value:h,literal:c}=t[r];if(!c)if(l){const t=Ae(n,e),o=Fi(s,i,t?e:n);h={path:t?e:n,value:o,base:t?Ie(s,n):o}}else h=a?Fi(s,i,n):s[n];if(te&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return oi;o[r]=h}return o}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),ji.push(this);let i=super._stampTemplate(t,e);if(ji.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];Ci(o,i),Ai(o,t,i)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];_e(_e(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Ti(e)||" ",wi(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let n=this._parseBindings(r,i);if(n){let e=o,r="property";ai.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let a=Ti(n);return a&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(o)),t.setAttribute(o,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=Ne(o)),wi(this,i,s,r,o,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,n=s.templateInfo,a="dom-if"===r.localName;ie&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,o=!1);let l=n.hostProps;if(se&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),ie||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)wi(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=zi.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],n=Boolean(i[2]),a=i[3].trim(),l=!1,h="",c=-1;"{"==r&&(c=a.indexOf("::"))>0&&(h=a.substring(c+2),a=a.substring(0,c),l=!0);let d=Oi(a),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(a);s.push({source:a,mode:r,negate:n,customEvent:l,signature:d,dependencies:u,event:h}),o=zi.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let n;return n=e.signature?Ei(t,i,s,0,e.signature):i!=e.source?Ie(t,e.source):r&&xe(i)?Ie(t,i):t.__data[i],e.negate&&(n=!n),n}}})),ji=[],Li=ne((t=>{const e=Ve(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
1545
1545
|
/**
|
|
1546
1546
|
@license
|
|
1547
1547
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1551,7 +1551,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
1551
1551
|
Code distributed by Google as part of the polymer project is also
|
|
1552
1552
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1553
1553
|
*/
|
|
1554
|
-
function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class o extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o})),
|
|
1554
|
+
function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class o extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o})),Di=window.ShadyCSS&&window.ShadyCSS.cssBuild,Ri=ne((t=>{const e=Li(Ui(t));function i(t,e,i,s){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,s)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,s[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):Zt||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let s=0;s<t.length;s++)i._createMethodObserver(t[s],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!Kt||Jt)&&(e=de.import(t,"template"),Kt&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=Ht(t.url);else{const t=de.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super()}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=$t,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let s=e[i];"value"in s&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=s)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return Gt(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const i=this.importPath;(function(t,e,i,s){if(!Di){const o=e.content.querySelectorAll("style"),r=ye(e),n=function(t){let e=fe(t);return e?we(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let o=n[i];o.textContent=t._processStyleText(o.textContent,s),e.content.insertBefore(o,a)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],n=o[l];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):l++,i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),oe&&Di&&Wt){const i=e.content.querySelectorAll("style");if(i){let e="";Array.from(i).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,i?qt(i):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=_e(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Xt&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=qt(this.importPath)),qt(t,e)}static _parseTemplateContent(t,i,s){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,s)}static _addTemplatePropertyEffect(t,i,s){return!Qt||i in this._properties||s.info.part.signature&&s.info.part.signature.static||s.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,i,s)}}})),Vi=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class qi{constructor(t,e){Wi(t,e);const i=e.reduce(((e,i,s)=>e+Gi(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Gi(t){if(t instanceof qi)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Hi=function(t,...e){Wi(t,e);const i=document.createElement("template");let s=e.reduce(((e,i,s)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof qi)return Gi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return Vi&&(s=Vi.createHTML(s)),i.innerHTML=s,i},Wi=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},$i=Ri(HTMLElement),Yi=[];function Ki(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function Ji(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=Ji();Yi.forEach((e=>{Ki(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Zi=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),Ki(this,Ji(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=Ji(),o=i===s&&-1===Yi.indexOf(this),r=!i&&e&&-1===Yi.indexOf(this),n=i!==s&&e===s;o||r?(this.__subscribe(),Ki(this,s,i)):n&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=Yi.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,e,i){("dir"!==i||""!==e||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,e,i)}_attributeToProperty(t,e,i){"dir"!==t||e?super._attributeToProperty(t,e,i):this.dir=""}__subscribe(){Yi.includes(this)||Yi.push(this)}__unsubscribe(){Yi.includes(this)&&Yi.splice(Yi.indexOf(this),1)}}
|
|
1555
1555
|
/**
|
|
1556
1556
|
* @license
|
|
1557
1557
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -1632,7 +1632,7 @@ Ct("vaadin-input-container",m`
|
|
|
1632
1632
|
/* Override default opacity in Firefox */
|
|
1633
1633
|
opacity: 1;
|
|
1634
1634
|
}
|
|
1635
|
-
`,{moduleId:"vaadin-input-container-styles"});class Xi extends(Qi(It(Zi(
|
|
1635
|
+
`,{moduleId:"vaadin-input-container-styles"});class Xi extends(Qi(It(Zi($i)))){static get is(){return"vaadin-input-container"}static get template(){return Hi`
|
|
1636
1636
|
<slot name="prefix"></slot>
|
|
1637
1637
|
<slot></slot>
|
|
1638
1638
|
<slot name="suffix"></slot>
|
|
@@ -1647,7 +1647,7 @@ const ts=t=>class extends t{static get properties(){return{index:{type:Number},i
|
|
|
1647
1647
|
* @license
|
|
1648
1648
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
1649
1649
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1650
|
-
*/;class es extends(ts(It(Zi(
|
|
1650
|
+
*/;class es extends(ts(It(Zi($i)))){static get template(){return Hi`
|
|
1651
1651
|
<style>
|
|
1652
1652
|
:host {
|
|
1653
1653
|
display: block;
|
|
@@ -1694,38 +1694,38 @@ class bs{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t
|
|
|
1694
1694
|
* @license
|
|
1695
1695
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1696
1696
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1697
|
-
*/let ys=!1;function ws(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function _s(){return ys}function xs(t,e){const i=Math.max(t.tabIndex,0),s=Math.max(e.tabIndex,0);return 0===i||0===s?s>i:i>s}function Cs(t){const e=t.length;if(e<2)return t;const i=Math.ceil(e/2);return function(t,e){const i=[];for(;t.length>0&&e.length>0;)xs(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(Cs(t.slice(0,i)),Cs(t.slice(i)))}function
|
|
1697
|
+
*/let ys=!1;function ws(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function _s(){return ys}function xs(t,e){const i=Math.max(t.tabIndex,0),s=Math.max(e.tabIndex,0);return 0===i||0===s?s>i:i>s}function Cs(t){const e=t.length;if(e<2)return t;const i=Math.ceil(e/2);return function(t,e){const i=[];for(;t.length>0&&e.length>0;)xs(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(Cs(t.slice(0,i)),Cs(t.slice(i)))}function As(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}function ks(t){return t.getRootNode().activeElement===t}function Es(t,e){if(t.nodeType!==Node.ELEMENT_NODE||function(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const i=window.getComputedStyle(t);return"hidden"===i.visibility||"none"===i.display}(t))return!1;const i=t,s=function(t){if(!As(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let o=s>0;s>=0&&e.push(i);let r=[];return r="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...r].forEach((t=>{o=Es(t,e)||o})),o}window.addEventListener("keydown",(()=>{ys=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{ys=!1}),{capture:!0});
|
|
1698
1698
|
/**
|
|
1699
1699
|
* @license
|
|
1700
1700
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1701
1701
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1702
1702
|
*/
|
|
1703
|
-
class
|
|
1703
|
+
class Ps{saveFocus(t){this.focusNode=t||ws()}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=!!t&&t.preventScroll;ws()===document.body?setTimeout((()=>e.focus({preventScroll:i}))):e.focus({preventScroll:i}),this.focusNode=null}}
|
|
1704
1704
|
/**
|
|
1705
1705
|
* @license
|
|
1706
1706
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1707
1707
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1708
|
-
*/const Is=[];class Ss{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return
|
|
1708
|
+
*/const Is=[];class Ss{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return Es(t,e)?Cs(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(ks).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(t){if(this.__trapNode=t,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Is.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Is.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(Is).pop()&&"Tab"===t.key&&(t.preventDefault(),this.__focusNextElement(t.shiftKey))}__focusNextElement(t=!1){const e=this.__focusableElements,i=e[(e.length+this.__focusedElementIndex+(t?-1:1))%e.length];i.focus(),"input"===i.localName&&i.select()}}
|
|
1709
1709
|
/**
|
|
1710
1710
|
* @license
|
|
1711
1711
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1712
1712
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1713
|
-
*/const zs=ne((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}})),Ts=t=>class extends(zs(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new bs(this),this.__focusTrapController=new Ss(this),this.__focusRestorationController=new
|
|
1713
|
+
*/const zs=ne((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}})),Ts=t=>class extends(zs(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new bs(this),this.__focusTrapController=new Ss(this),this.__focusRestorationController=new Ps}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const t=!_s();this.__focusRestorationController.restoreFocus({preventScroll:t})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=ws();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}}
|
|
1714
1714
|
/**
|
|
1715
1715
|
* @license
|
|
1716
1716
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1717
1717
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1718
|
-
*/,Os=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),
|
|
1718
|
+
*/,Os=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),Ns=()=>Os().filter((t=>t.$.overlay)),Fs=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===Ns().pop())()}bringToFront(){let t="";const e=Os().filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Ns().forEach((t=>{t!==this&&(t.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=Ns();let e;for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}}
|
|
1719
1719
|
/**
|
|
1720
1720
|
* @license
|
|
1721
1721
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1722
1722
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1723
|
-
*/,
|
|
1723
|
+
*/,Bs=t=>class extends(Ts(Fs(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),hs&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e>t&&i>t?i-t+"px":"0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(t,e,i,s){const o=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const r=this._oldRenderer!==t,n=void 0!==this._oldRenderer;this._oldRenderer=t;const a=this._oldOpened!==s;this._oldOpened=s,r&&n&&(this.innerHTML="",delete this._$litPart$),s&&t&&(r||a||o)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){var i;t?(this._saveFocus(),this._animatedOpening(),i=()=>{this._trapFocus();const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)},is||(is=!0,requestAnimationFrame((function(){is=!1,function(t){for(;t.length;)rs(t.shift())}(ss),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)rs(t.shift())}(os)}))}))),os.push([this,i,undefined]),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this),e=t.getPropertyValue("animation-name");return!("none"===t.getPropertyValue("display"))&&e&&"none"!==e}_enqueueAnimation(t,e){const i=`__${t}Handler`,s=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_flushAnimation(t){const e=`__${t}Handler`;"function"==typeof this[e]&&this[e]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(t){return this._last}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(t))return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}}
|
|
1724
1724
|
/**
|
|
1725
1725
|
* @license
|
|
1726
1726
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1727
1727
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1728
|
-
*/,
|
|
1728
|
+
*/,Ms=m`
|
|
1729
1729
|
:host {
|
|
1730
1730
|
z-index: 200;
|
|
1731
1731
|
position: fixed;
|
|
@@ -1794,29 +1794,29 @@ class Es{saveFocus(t){this.focusNode=t||ws()}restoreFocus(t){const e=this.focusN
|
|
|
1794
1794
|
* @license
|
|
1795
1795
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1796
1796
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1797
|
-
*/function
|
|
1797
|
+
*/function Us(t){return t?new Set(t.split(" ")):new Set}function js(t){return t?[...t].join(" "):""}function Ls(t,e,i){const s=Us(t.getAttribute(e));s.add(i),t.setAttribute(e,js(s))}
|
|
1798
1798
|
/**
|
|
1799
1799
|
* @license
|
|
1800
1800
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
1801
1801
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1802
1802
|
*/
|
|
1803
|
-
const
|
|
1803
|
+
const Ds={start:"top",end:"bottom"},Rs={start:"left",end:"right"},Vs=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),qs=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)})),this.positionTarget&&(this.__observePositionTargetMove=
|
|
1804
1804
|
/**
|
|
1805
1805
|
* @license
|
|
1806
1806
|
* Copyright (c) 2024 Vaadin Ltd.
|
|
1807
1807
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1808
1808
|
*/
|
|
1809
|
-
function(t,e){let i=null;const s=document.documentElement;function o(){i&&i.disconnect(),i=null}return function r(n=!1,a=1){o();const{left:l,top:h,width:c,height:d}=t.getBoundingClientRect();if(n||e(),!c||!d)return;const u={rootMargin:`${-Math.floor(h)}px ${-Math.floor(s.clientWidth-(l+c))}px ${-Math.floor(s.clientHeight-(h+d))}px ${-Math.floor(l)}px`,threshold:Math.max(0,Math.min(1,a))||1};let p=!0;i=new IntersectionObserver((function(t){let e=t[0].intersectionRatio;if(e!==a){if(!p)return r();0===e&&(e=1e-7),r(!1,e)}p=!1}),u),i.observe(t)}(!0),o}(this.positionTarget,(()=>{this._updatePosition()})))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,Vs.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,Vs.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){t.target instanceof Node&&this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const t=this.positionTarget.getBoundingClientRect();if(0===t.width&&0===t.height&&this.opened)return void(this.opened=!1);const e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,s=this.__shouldAlignStartHorizontally(t,i),o=!i&&s||i&&!s;this.style.alignItems=o?"flex-start":"flex-end";const r=this.getBoundingClientRect(),n=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,
|
|
1809
|
+
function(t,e){let i=null;const s=document.documentElement;function o(){i&&i.disconnect(),i=null}return function r(n=!1,a=1){o();const{left:l,top:h,width:c,height:d}=t.getBoundingClientRect();if(n||e(),!c||!d)return;const u={rootMargin:`${-Math.floor(h)}px ${-Math.floor(s.clientWidth-(l+c))}px ${-Math.floor(s.clientHeight-(h+d))}px ${-Math.floor(l)}px`,threshold:Math.max(0,Math.min(1,a))||1};let p=!0;i=new IntersectionObserver((function(t){let e=t[0].intersectionRatio;if(e!==a){if(!p)return r();0===e&&(e=1e-7),r(!1,e)}p=!1}),u),i.observe(t)}(!0),o}(this.positionTarget,(()=>{this._updatePosition()})))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,Vs.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,Vs.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){t.target instanceof Node&&this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const t=this.positionTarget.getBoundingClientRect();if(0===t.width&&0===t.height&&this.opened)return void(this.opened=!1);const e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,s=this.__shouldAlignStartHorizontally(t,i),o=!i&&s||i&&!s;this.style.alignItems=o?"flex-start":"flex-end";const r=this.getBoundingClientRect(),n=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,Ds,this,e),a=this.__calculatePositionInOneDimension(t,r,this.noHorizontalOverlap,Rs,this,s);Object.assign(this.style,n,a),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!o),this.toggleAttribute("start-aligned",o)}__shouldAlignStartHorizontally(t,e){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const s=Math.min(window.innerWidth,document.documentElement.clientWidth);return this.__shouldAlignStart(t,i,s,this.__margins,!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign,this.noHorizontalOverlap,Rs)}__shouldAlignStartVertically(t){const e=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight);return this.__shouldAlignStart(t,e,i,this.__margins,"top"===this.verticalAlign,this.noVerticalOverlap,Ds)}__shouldAlignStart(t,e,i,s,o,r,n){const a=i-t[r?n.end:n.start]-s[n.end],l=t[r?n.start:n.end]-s[n.start],h=o?a:l;return o===(h>(o?l:a)||h>e)}__adjustBottomProperty(t,e,i){let s;if(t===e.end){if(e.end===Ds.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);i>t&&this.__oldViewportHeight&&(s=i-(this.__oldViewportHeight-t)),this.__oldViewportHeight=t}if(e.end===Rs.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);i>t&&this.__oldViewportWidth&&(s=i-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return s}__calculatePositionInOneDimension(t,e,i,s,o,r){const n=r?s.start:s.end,a=r?s.end:s.start,l=parseFloat(o.style[n]||getComputedStyle(o)[n]),h=this.__adjustBottomProperty(n,s,l),c=h?`${h}px`:`${l+(e[r?s.start:s.end]-t[i===r?s.end:s.start])*(r?-1:1)}px`;return{[n]:c,[a]:""}}}
|
|
1810
1810
|
/**
|
|
1811
1811
|
* @license
|
|
1812
1812
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
1813
1813
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1814
|
-
*/,
|
|
1814
|
+
*/,Gs=t=>class extends(qs(t)){static get observers(){return["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200}connectedCallback(){super.connectedCallback();const t=this._comboBox,e=t&&t.getAttribute("dir");e&&this.setAttribute("dir",e)}_shouldCloseOnOutsideClick(t){const e=t.composedPath();return!e.includes(this.positionTarget)&&!e.includes(this)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!As(t.composedPath()[0])&&t.preventDefault()}_updateOverlayWidth(){const t=this.localName;this.style.setProperty(`--_${t}-default-width`,`${this.positionTarget.clientWidth}px`);const e=getComputedStyle(this._comboBox).getPropertyValue(`--${t}-width`);""===e?this.style.removeProperty(`--${t}-width`):this.style.setProperty(`--${t}-width`,e)}_setOverlayWidth(t,e){t&&e&&(this._updateOverlayWidth(),this._updatePosition())}}
|
|
1815
1815
|
/**
|
|
1816
1816
|
* @license
|
|
1817
1817
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
1818
1818
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1819
|
-
*/;Ct("vaadin-combo-box-overlay",[
|
|
1819
|
+
*/;Ct("vaadin-combo-box-overlay",[Ms,m`
|
|
1820
1820
|
#overlay {
|
|
1821
1821
|
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
|
1822
1822
|
}
|
|
@@ -1826,7 +1826,7 @@ function(t,e){let i=null;const s=document.documentElement;function o(){i&&i.disc
|
|
|
1826
1826
|
flex-direction: column;
|
|
1827
1827
|
height: 100%;
|
|
1828
1828
|
}
|
|
1829
|
-
`],{moduleId:"vaadin-combo-box-overlay-styles"});class
|
|
1829
|
+
`],{moduleId:"vaadin-combo-box-overlay-styles"});class Hs extends(Gs(Bs(Zi(It($i))))){static get is(){return"vaadin-combo-box-overlay"}static get template(){return Hi`
|
|
1830
1830
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
1831
1831
|
<div part="overlay" id="overlay">
|
|
1832
1832
|
<div part="loader"></div>
|
|
@@ -1838,12 +1838,12 @@ function(t,e){let i=null;const s=document.documentElement;function o(){i&&i.disc
|
|
|
1838
1838
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
1839
1839
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1840
1840
|
*/
|
|
1841
|
-
function
|
|
1841
|
+
function Ws(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
|
|
1842
1842
|
/**
|
|
1843
1843
|
* @license
|
|
1844
1844
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
1845
1845
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1846
|
-
*/a(
|
|
1846
|
+
*/a(Hs);let $s=0;function Ys(){return $s++}
|
|
1847
1847
|
/**
|
|
1848
1848
|
* @license
|
|
1849
1849
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -1866,7 +1866,7 @@ function Gs(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
|
|
|
1866
1866
|
* @license
|
|
1867
1867
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
1868
1868
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1869
|
-
*/const fo=class{toString(){return""}},vo=t=>class extends t{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){const t=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[t.paddingBottom,t.borderBottomWidth].map((t=>parseInt(t,10))).reduce(((t,e)=>t+e))}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${Ys()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(t){if(!this.__virtualizer||!(this.opened&&t>=0))return;const e=this._visibleItemsCount();let i=t;t>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(t),i=t-e+1):t>this.__virtualizer.firstVisibleIndex&&(i=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,i));const s=[...this.children].find((t=>!t.hidden&&t.index===this.__virtualizer.lastVisibleIndex));if(!s||t!==s.index)return;const o=s.getBoundingClientRect(),r=this.getBoundingClientRect(),n=o.bottom-r.bottom+this._viewportTotalPaddingBottom;n>0&&(this.scrollTop+=n)}_isItemSelected(t,e,i){return!(t instanceof fo)&&(i&&void 0!==t&&void 0!==e?
|
|
1869
|
+
*/const fo=class{toString(){return""}},vo=t=>class extends t{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){const t=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[t.paddingBottom,t.borderBottomWidth].map((t=>parseInt(t,10))).reduce(((t,e)=>t+e))}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${Ys()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(t){if(!this.__virtualizer||!(this.opened&&t>=0))return;const e=this._visibleItemsCount();let i=t;t>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(t),i=t-e+1):t>this.__virtualizer.firstVisibleIndex&&(i=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,i));const s=[...this.children].find((t=>!t.hidden&&t.index===this.__virtualizer.lastVisibleIndex));if(!s||t!==s.index)return;const o=s.getBoundingClientRect(),r=this.getBoundingClientRect(),n=o.bottom-r.bottom+this._viewportTotalPaddingBottom;n>0&&(this.scrollTop+=n)}_isItemSelected(t,e,i){return!(t instanceof fo)&&(i&&void 0!==t&&void 0!==e?Ws(i,t)===Ws(i,e):t===e)}__initVirtualizer(){this.__virtualizer=new mo({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0})}__itemsChanged(t){t&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(t){t&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate())}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.requestContentUpdate()}__focusedIndexChanged(t,e){t!==e&&this.requestContentUpdate(),t>=0&&!this.loading&&this.scrollIntoView(t)}__rendererChanged(t,e){(t||e)&&this.requestContentUpdate()}__createElements(t){return[...Array(t)].map((()=>{const t=document.createElement(`${this.__hostTagName}-item`);return t.addEventListener("click",this.__boundOnItemClick),t.tabIndex="-1",t.style.width="100%",t}))}_updateElement(t,e){const i=this.items[e],s=this.focusedIndex,o=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:o,renderer:this.renderer,focused:!this.loading&&s===e}),"function"==typeof this.itemClassNameGenerator?t.className=this.itemClassNameGenerator(i):""!==t.className&&(t.className=""),t.performUpdate&&!t.hasUpdated&&t.performUpdate(),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",void 0!==e&&"option"),t.setAttribute("aria-selected",o.toString()),t.setAttribute("aria-posinset",e+1),t.setAttribute("aria-setsize",this.items.length),this.theme?t.setAttribute("theme",this.theme):t.removeAttribute("theme"),i instanceof fo&&this.__requestItemByIndex(e)}__onItemClick(t){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:t.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",(t=>{(0===this.scrollTop&&t.deltaY<0||this.scrollHeight-this.scrollTop-this.clientHeight<=1&&t.deltaY>0)&&t.preventDefault()}))}__requestItemByIndex(t){requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:t}}))}))}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}
|
|
1870
1870
|
/**
|
|
1871
1871
|
* @license
|
|
1872
1872
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
@@ -1876,7 +1876,7 @@ function Gs(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
|
|
|
1876
1876
|
* @license
|
|
1877
1877
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
1878
1878
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1879
|
-
*/class go extends(vo(
|
|
1879
|
+
*/class go extends(vo($i)){static get is(){return"vaadin-combo-box-scroller"}static get template(){return Hi`
|
|
1880
1880
|
<style>
|
|
1881
1881
|
:host {
|
|
1882
1882
|
display: block;
|
|
@@ -2388,22 +2388,22 @@ try {
|
|
|
2388
2388
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2389
2389
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2390
2390
|
*/
|
|
2391
|
-
window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){!function(t,e){if(window.Vaadin.developmentMode)wo(t,e)}(_o)};const Co=new Set,
|
|
2391
|
+
window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){!function(t,e){if(window.Vaadin.developmentMode)wo(t,e)}(_o)};const Co=new Set,Ao=t=>class extends(Zi(t)){static finalize(){super.finalize();const{is:t}=this;t&&!Co.has(t)&&(window.Vaadin.registrations.push(this),Co.add(t),window.Vaadin.developmentModeCallback&&(xo=oo.debounce(xo,eo,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),ro(xo)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
|
|
2392
2392
|
/**
|
|
2393
2393
|
* @license
|
|
2394
2394
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
2395
2395
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2396
|
-
*/;class
|
|
2396
|
+
*/;class ko{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],s=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,o)=>{const r=t.indexOf(e);-1===r?i.push(e):r!==o&&s.push(e)})),(e.length||i.length||s.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:s,removedNodes:i}),this._storedNodes=t}}
|
|
2397
2397
|
/**
|
|
2398
2398
|
* @license
|
|
2399
2399
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2400
2400
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2401
|
-
*/class
|
|
2401
|
+
*/class Eo extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${Ys()}`}constructor(t,e,i,s={}){super();const{initializer:o,multiple:r,observe:n,useUniqueId:a,uniqueIdPrefix:l}=s;this.host=t,this.slotName=e,this.tagName=i,this.observe="boolean"!=typeof n||n,this.multiple="boolean"==typeof r&&r,this.slotInitializer=o,r&&(this.nodes=[]),a&&(this.defaultId=this.constructor.generateId(t,l||e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let s=this.defaultNode;return!s&&i&&(s=document.createElement(i),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.defaultNode=s)),s&&(this.node=s,t.appendChild(s)),s}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new ko(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],s=t.filter((t=>!function(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}(t)&&!i.includes(t)));e.length&&(this.nodes=i.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),s&&s.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...i,...s].filter((t=>t!==this.defaultNode)),s.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=s[0],this.initAddedNode(this.node)))}))}}
|
|
2402
2402
|
/**
|
|
2403
2403
|
* @license
|
|
2404
2404
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
2405
2405
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2406
|
-
*/class
|
|
2406
|
+
*/class Po extends Eo{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}
|
|
2407
2407
|
/**
|
|
2408
2408
|
* @license
|
|
2409
2409
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -2413,59 +2413,59 @@ window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.re
|
|
|
2413
2413
|
* @license
|
|
2414
2414
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2415
2415
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2416
|
-
*/,To=ne((t=>class extends(Io(zo(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),Oo=ne((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})),
|
|
2416
|
+
*/,To=ne((t=>class extends(Io(zo(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),Oo=ne((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})),No=new WeakMap,Fo=ne((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return No.has(t)||No.set(t,new Set),No.get(t)}(t);this.slotStyles.forEach((i=>{e.has(i)||(function(t,e){const i=document.createElement("style");i.textContent=t,e===document?document.head.appendChild(i):e.insertBefore(i,e.firstChild)}(i,t),e.add(i))}))}})),Bo=ne((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),""===t&&void 0===e||this.__userInput||this._forwardInputValue(t)}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),Mo=t=>class extends(Bo(Oo(t))){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",(t=>this._onClearButtonMouseDown(t))),this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t))))}_onClearButtonClick(t){t.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(t){t.preventDefault(),ds||this.inputElement.focus()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}}
|
|
2417
2417
|
/**
|
|
2418
2418
|
* @license
|
|
2419
2419
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
2420
2420
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2421
|
-
*/,
|
|
2421
|
+
*/,Uo=new Map;
|
|
2422
2422
|
/**
|
|
2423
2423
|
* @license
|
|
2424
2424
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2425
2425
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2426
|
-
*/function
|
|
2426
|
+
*/function jo(t){return Uo.has(t)||Uo.set(t,new WeakMap),Uo.get(t)}function Lo(t,e){t&&t.removeAttribute(e)}function Do(t,e){if(!t||!e)return;const i=jo(e);if(i.has(t))return;const s=Us(t.getAttribute(e));i.set(t,new Set(s))}function Ro(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:s,oldId:o,fromUser:r}=i,n=jo(e),a=n.get(t);if(!r&&a)return o&&a.delete(o),void(s&&a.add(s));r&&(a?s||n.delete(t):Do(t,e),Lo(t,e)),function(t,e,i){const s=Us(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,js(s)):t.removeAttribute(e)}(t,e,o);const l=s||js(a);l&&Ls(t,e,l)}
|
|
2427
2427
|
/**
|
|
2428
2428
|
* @license
|
|
2429
2429
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2430
2430
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2431
2431
|
*/
|
|
2432
|
-
class Vo{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t}setLabelId(t,e=!1){this.__setLabelIdToAriaAttribute(t,e?this.__labelIdFromUser:this.__labelId,e),e?this.__labelIdFromUser=t:this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}__setAriaLabelToAttribute(t){var e;this.__target&&(t?(
|
|
2432
|
+
class Vo{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t}setLabelId(t,e=!1){this.__setLabelIdToAriaAttribute(t,e?this.__labelIdFromUser:this.__labelId,e),e?this.__labelIdFromUser=t:this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}__setAriaLabelToAttribute(t){var e;this.__target&&(t?(Do(e=this.__target,"aria-labelledby"),Lo(e,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=jo(e),s=i.get(t);s&&0!==s.size?Ls(t,e,js(s)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){Ro(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){Ro(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){Ro(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}
|
|
2433
2433
|
/**
|
|
2434
2434
|
* @license
|
|
2435
2435
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
2436
2436
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2437
|
-
*/const qo=document.createElement("div");let
|
|
2437
|
+
*/const qo=document.createElement("div");let Go;qo.style.position="fixed",qo.style.clip="rect(0px, 0px, 0px, 0px)",qo.setAttribute("aria-live","polite"),document.body.appendChild(qo);
|
|
2438
2438
|
/**
|
|
2439
2439
|
* @license
|
|
2440
2440
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
2441
2441
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2442
2442
|
*/
|
|
2443
|
-
class
|
|
2443
|
+
class Ho extends Eo{constructor(t,e,i,s={}){super(t,e,i,{...s,useUniqueId:!0})}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t)}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t)}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;"attributes"===t.type?i&&this.__updateNodeId(e):(i||e.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(t){return!!t&&(t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&""!==t.textContent.trim())}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}))}__updateNodeId(t){t.nodeType!==Node.ELEMENT_NODE||this.multiple&&this.nodes&&t!==this.nodes[0]||t.id||(t.id=this.defaultId)}}
|
|
2444
2444
|
/**
|
|
2445
2445
|
* @license
|
|
2446
2446
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2447
2447
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2448
|
-
*/class
|
|
2448
|
+
*/class Wo extends Ho{constructor(t){super(t,"error-message","div")}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node)}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node)}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t)}initNode(t){this.updateDefaultNode(t)}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,s=Boolean(i&&e&&""!==e.trim());t&&(t.textContent=s?e:"",t.hidden=!s,s&&function(t,e={}){const i=e.mode||"polite",s=void 0===e.timeout?150:e.timeout;"alert"===i?(qo.removeAttribute("aria-live"),qo.removeAttribute("role"),Go=oo.debounce(Go,to,(()=>{qo.setAttribute("role","alert")}))):(Go&&Go.cancel(),qo.removeAttribute("role"),qo.setAttribute("aria-live",i)),qo.textContent="",setTimeout((()=>{qo.textContent=t}),s)}(e,{mode:"assertive"})),super.updateDefaultNode(t)}}
|
|
2449
2449
|
/**
|
|
2450
2450
|
* @license
|
|
2451
2451
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2452
2452
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2453
|
-
*/class
|
|
2453
|
+
*/class $o extends Ho{constructor(t){super(t,"helper",null)}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:t}=this;if(t&&""!==t.trim()){this.tagName="div";const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
|
|
2454
2454
|
/**
|
|
2455
2455
|
* @license
|
|
2456
2456
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2457
2457
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2458
|
-
*/class Yo extends
|
|
2458
|
+
*/class Yo extends Ho{constructor(t){super(t,"label","label")}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:t}=this;if(t&&""!==t.trim()){const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
|
|
2459
2459
|
/**
|
|
2460
2460
|
* @license
|
|
2461
2461
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2462
2462
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2463
|
-
*/const Ko=ne((t=>class extends(zs(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Yo(this),this._labelController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-label",t.detail.hasContent)}))}get _labelId(){const t=this._labelNode;return t&&t.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}})),Jo=ne((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const t=this.checkValidity();return this._setInvalid(!t),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:t}})),t}checkValidity(){return!this.required||!!this.value}_setInvalid(t){this._shouldSetInvalid(t)&&(this.invalid=t)}_shouldSetInvalid(t){return!0}})),Zo=t=>class extends(Jo(Ko(zs(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new Vo(this),this._helperController=new
|
|
2463
|
+
*/const Ko=ne((t=>class extends(zs(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Yo(this),this._labelController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-label",t.detail.hasContent)}))}get _labelId(){const t=this._labelNode;return t&&t.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}})),Jo=ne((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const t=this.checkValidity();return this._setInvalid(!t),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:t}})),t}checkValidity(){return!this.required||!!this.value}_setInvalid(t){this._shouldSetInvalid(t)&&(this.invalid=t)}_shouldSetInvalid(t){return!0}})),Zo=t=>class extends(Jo(Ko(zs(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new Vo(this),this._helperController=new $o(this),this._errorController=new Wo(this),this._errorController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-error-message",t.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.toggleAttribute("has-helper",e),this.__helperChanged(e,i)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,e){this._fieldAriaController.setHelperId(t?e.id:null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,e){this._fieldAriaController.setLabelId(t?e.id:null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{if(t){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)}))}}
|
|
2464
2464
|
/**
|
|
2465
2465
|
* @license
|
|
2466
2466
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2467
2467
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2468
|
-
*/,Qo=ne((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,i)=>{this._delegateAttribute(e,t[i])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,i)=>{this._delegateProperty(e,t[i])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}})),Xo=ne((t=>class extends(Qo(Jo(
|
|
2468
|
+
*/,Qo=ne((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,i)=>{this._delegateAttribute(e,t[i])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,i)=>{this._delegateProperty(e,t[i])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}})),Xo=ne((t=>class extends(Qo(Jo(Bo(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...e){if(!t)return;const i=this._hasValidConstraints(e),s=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():s&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return Boolean(t)||0===t}})),tr=t=>class extends(Fo(To(Xo(Zo(Mo(Oo(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&t.target===this.inputElement&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=oo.debounce(this._preventInputDebouncer,Xs.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||1!==t.key.length||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const e=t.clipboardData.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onDrop(t){if(this.allowedCharPattern){const e=t.dataTransfer.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onBeforeInput(t){this.allowedCharPattern&&t.data&&!this.__allowedTextRegExp.test(t.data)&&(t.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(t){if(t)try{this.__allowedCharRegExp=new RegExp(`^${t}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${t}*$`,"u")}catch(t){console.error(t)}}}
|
|
2469
2469
|
/**
|
|
2470
2470
|
* @license
|
|
2471
2471
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -2475,7 +2475,7 @@ class $o extends Po{constructor(t,e,i,s={}){super(t,e,i,{...s,useUniqueId:!0})}i
|
|
|
2475
2475
|
* @license
|
|
2476
2476
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
2477
2477
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2478
|
-
*/class er extends
|
|
2478
|
+
*/class er extends Eo{constructor(t,e,i={}){const{uniqueIdPrefix:s}=i;super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0,uniqueIdPrefix:s})}}
|
|
2479
2479
|
/**
|
|
2480
2480
|
* @license
|
|
2481
2481
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
@@ -2602,12 +2602,12 @@ class ur{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.
|
|
|
2602
2602
|
* @license
|
|
2603
2603
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
2604
2604
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2605
|
-
*/function pr(t){return null!=t}function mr(t,e){return t.findIndex((t=>!(t instanceof fo)&&e(t)))}const fr=t=>class extends(dr(zs(Jo(Io(Oo(Mo(So(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};var e;this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),e=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(e):e.querySelector("template")&&console.warn(`WARNING: <template> inside <${e.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`),this.addController(new ur(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach((t=>{t.requestContentUpdate()})))}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(t,e,i){super._propertiesChanged(t,e,i),void 0!==e.filter&&this._filterChanged(e.filter)}updated(t){super.updated(t),t.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const t=this.$.overlay;t._comboBox=this,t.addEventListener("touchend",this._boundOnOverlayTouchAction),t.addEventListener("touchmove",this._boundOnOverlayTouchAction),t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("opened-changed",(t=>{this._overlayOpened=t.detail.value})),this._overlayElement=t}_initScroller(t){const e=document.createElement(`${this._tagNamePrefix}-scroller`);e.owner=t||this,e.getItemLabel=this._getItemLabel.bind(this),e.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const i=this._overlayElement;i.renderer=t=>{t.innerHTML||t.appendChild(e)},i.requestContentUpdate(),this._scroller=e}_updateScroller(t,e,i,s,o,r,n,a,l,h){if(t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:s,selectedItem:o,itemIdPath:r,focusedIndex:n,renderer:a,theme:l,itemClassNameGenerator:h}),t.performUpdate&&!t.hasUpdated))try{t.performUpdate()}catch(t){}}_openedOrItemsChanged(t,e,i,s){this._overlayOpened=t&&(s||i||!(!e||!e.length))}_overlayOpenedChanged(t,e){t?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):e&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(t,e){void 0!==e&&this._updateActiveDescendant(t)}_isInputFocused(){return this.inputElement&&As(this.inputElement)}_updateActiveDescendant(t){const e=this._nativeInput;if(!e)return;const i=this._getItemElements().find((e=>e.index===t));i?e.setAttribute("aria-activedescendant",i.id):e.removeAttribute("aria-activedescendant")}_openedChanged(t,e){if(void 0===e)return;t?this._isInputFocused()||ds||this.inputElement&&this.inputElement.focus():this._onClosed();const i=this._nativeInput;i&&(i.setAttribute("aria-expanded",!!t),t?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(t){return t.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_onClearButtonClick(t){t.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(t){t.preventDefault(),this.opened?this.close():this.open()}_onHostClick(t){this.autoOpenDisabled||(t.preventDefault(),this.open())}_onClick(t){this._isClearButton(t)?this._onClearButtonClick(t):t.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(t):this._onHostClick(t)}_onKeyDown(t){super._onKeyDown(t),"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?Gs(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?Gs(this.itemValuePath,t):void 0;return void 0===e&&(e=t?t.toString():""),e}_onArrowDown(){if(this.opened){const t=this._dropdownItems;t&&(this._focusedIndex=Math.min(t.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const t=this._dropdownItems;t&&(this._focusedIndex=t.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this._dropdownItems[this._focusedIndex]),this._markAllSelectionRange())}_setSelectionRange(t,e){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(t,e)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const t=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(t,t)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(t){if(!this._hasValidInputValue())return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const t=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!t}_onEscape(t){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{ds&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){this.loading&&!this.allowCustomValue||this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const t=this._dropdownItems[this._focusedIndex];this.selectedItem!==t&&(this.selectedItem=t),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const t=[this.selectedItem,...this._dropdownItems||[]],e=t[this.__getItemIndexByLabel(t,this._inputElementValue)];if(this.allowCustomValue&&!e){const t=this._inputElementValue;this._lastCustomValue=t;const e=new CustomEvent("custom-value-set",{detail:t,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(e),e.defaultPrevented||(this.value=t)}else this.allowCustomValue||this.opened||!e?this._revertInputValueToValue():this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(t){const e=this._inputElementValue,i={};this.filter===e?this._filterChanged(this.filter):i.filter=e,this.opened||this._isClearButton(t)||this.autoOpenDisabled||(i.opened=!0),this.setProperties(i)}_onChange(t){t.stopPropagation()}_itemLabelPathChanged(t){"string"!=typeof t&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(t){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,t):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this._inputElementValue=this.allowCustomValue&&!this.selectedItem?this.value:this._getItemLabel(this.selectedItem)}_selectedItemChanged(t){if(null==t)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const e=this._getItemValue(t);if(this.value!==e&&(this.value=e,this.value!==e))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(t)}}_valueChanged(t,e){""===t&&void 0===e||(pr(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.items=e})),t?this.filteredItems=t.slice(0):e&&(this.filteredItems=null)}_filteredItemsChanged(t){this._setDropdownItems(t)}_filterItems(t,e){if(!t)return t;const i=t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)));return i}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){const e=this._dropdownItems;this._dropdownItems=t;const i=e?e[this._focusedIndex]:null,s=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&s>=0&&(this.selectedItem=t[s]);const o=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=o>-1?o:this.__getItemIndexByLabel(t,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&pr(e)?mr(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?mr(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),t.detail.item instanceof fo||this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}_setFocused(t){if(super._setFocused(t),!t&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue)return void delete this._lastCustomValue;if(_s())return void this._closeOrCommit();this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(t){return!(t.relatedTarget&&t.relatedTarget.localName===`${this._tagNamePrefix}-item`||t.relatedTarget===this._overlayElement&&(t.composedPath()[0].focus(),1))}_onTouchend(t){this.clearElement&&t.composedPath()[0]===this.clearElement&&(t.preventDefault(),this._onClearAction())}}
|
|
2605
|
+
*/function pr(t){return null!=t}function mr(t,e){return t.findIndex((t=>!(t instanceof fo)&&e(t)))}const fr=t=>class extends(dr(zs(Jo(Io(Oo(Bo(So(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};var e;this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),e=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(e):e.querySelector("template")&&console.warn(`WARNING: <template> inside <${e.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`),this.addController(new ur(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach((t=>{t.requestContentUpdate()})))}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(t,e,i){super._propertiesChanged(t,e,i),void 0!==e.filter&&this._filterChanged(e.filter)}updated(t){super.updated(t),t.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const t=this.$.overlay;t._comboBox=this,t.addEventListener("touchend",this._boundOnOverlayTouchAction),t.addEventListener("touchmove",this._boundOnOverlayTouchAction),t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("opened-changed",(t=>{this._overlayOpened=t.detail.value})),this._overlayElement=t}_initScroller(t){const e=document.createElement(`${this._tagNamePrefix}-scroller`);e.owner=t||this,e.getItemLabel=this._getItemLabel.bind(this),e.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const i=this._overlayElement;i.renderer=t=>{t.innerHTML||t.appendChild(e)},i.requestContentUpdate(),this._scroller=e}_updateScroller(t,e,i,s,o,r,n,a,l,h){if(t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:s,selectedItem:o,itemIdPath:r,focusedIndex:n,renderer:a,theme:l,itemClassNameGenerator:h}),t.performUpdate&&!t.hasUpdated))try{t.performUpdate()}catch(t){}}_openedOrItemsChanged(t,e,i,s){this._overlayOpened=t&&(s||i||!(!e||!e.length))}_overlayOpenedChanged(t,e){t?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):e&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(t,e){void 0!==e&&this._updateActiveDescendant(t)}_isInputFocused(){return this.inputElement&&ks(this.inputElement)}_updateActiveDescendant(t){const e=this._nativeInput;if(!e)return;const i=this._getItemElements().find((e=>e.index===t));i?e.setAttribute("aria-activedescendant",i.id):e.removeAttribute("aria-activedescendant")}_openedChanged(t,e){if(void 0===e)return;t?this._isInputFocused()||ds||this.inputElement&&this.inputElement.focus():this._onClosed();const i=this._nativeInput;i&&(i.setAttribute("aria-expanded",!!t),t?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(t){return t.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_onClearButtonClick(t){t.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(t){t.preventDefault(),this.opened?this.close():this.open()}_onHostClick(t){this.autoOpenDisabled||(t.preventDefault(),this.open())}_onClick(t){this._isClearButton(t)?this._onClearButtonClick(t):t.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(t):this._onHostClick(t)}_onKeyDown(t){super._onKeyDown(t),"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?Ws(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?Ws(this.itemValuePath,t):void 0;return void 0===e&&(e=t?t.toString():""),e}_onArrowDown(){if(this.opened){const t=this._dropdownItems;t&&(this._focusedIndex=Math.min(t.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const t=this._dropdownItems;t&&(this._focusedIndex=t.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this._dropdownItems[this._focusedIndex]),this._markAllSelectionRange())}_setSelectionRange(t,e){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(t,e)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const t=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(t,t)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(t){if(!this._hasValidInputValue())return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const t=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!t}_onEscape(t){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{ds&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){this.loading&&!this.allowCustomValue||this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const t=this._dropdownItems[this._focusedIndex];this.selectedItem!==t&&(this.selectedItem=t),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const t=[this.selectedItem,...this._dropdownItems||[]],e=t[this.__getItemIndexByLabel(t,this._inputElementValue)];if(this.allowCustomValue&&!e){const t=this._inputElementValue;this._lastCustomValue=t;const e=new CustomEvent("custom-value-set",{detail:t,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(e),e.defaultPrevented||(this.value=t)}else this.allowCustomValue||this.opened||!e?this._revertInputValueToValue():this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_onInput(t){const e=this._inputElementValue,i={};this.filter===e?this._filterChanged(this.filter):i.filter=e,this.opened||this._isClearButton(t)||this.autoOpenDisabled||(i.opened=!0),this.setProperties(i)}_onChange(t){t.stopPropagation()}_itemLabelPathChanged(t){"string"!=typeof t&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(t){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,t):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this._inputElementValue=this.allowCustomValue&&!this.selectedItem?this.value:this._getItemLabel(this.selectedItem)}_selectedItemChanged(t){if(null==t)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const e=this._getItemValue(t);if(this.value!==e&&(this.value=e,this.value!==e))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(t)}}_valueChanged(t,e){""===t&&void 0===e||(pr(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.items=e})),t?this.filteredItems=t.slice(0):e&&(this.filteredItems=null)}_filteredItemsChanged(t){this._setDropdownItems(t)}_filterItems(t,e){if(!t)return t;const i=t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)));return i}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){const e=this._dropdownItems;this._dropdownItems=t;const i=e?e[this._focusedIndex]:null,s=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&s>=0&&(this.selectedItem=t[s]);const o=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=o>-1?o:this.__getItemIndexByLabel(t,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&pr(e)?mr(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?mr(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),t.detail.item instanceof fo||this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}_setFocused(t){if(super._setFocused(t),!t&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue)return void delete this._lastCustomValue;if(_s())return void this._closeOrCommit();this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(t){return!(t.relatedTarget&&t.relatedTarget.localName===`${this._tagNamePrefix}-item`||t.relatedTarget===this._overlayElement&&(t.composedPath()[0].focus(),1))}_onTouchend(t){this.clearElement&&t.composedPath()[0]===this.clearElement&&(t.preventDefault(),this._onClearAction())}}
|
|
2606
2606
|
/**
|
|
2607
2607
|
* @license
|
|
2608
2608
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
2609
2609
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2610
|
-
*/;Ct("vaadin-combo-box",or,{moduleId:"vaadin-combo-box-styles"});class vr extends(cr(fr(sr(tr(It(
|
|
2610
|
+
*/;Ct("vaadin-combo-box",or,{moduleId:"vaadin-combo-box-styles"});class vr extends(cr(fr(sr(tr(It(Ao($i))))))){static get is(){return"vaadin-combo-box"}static get template(){return Hi`
|
|
2611
2611
|
<style>
|
|
2612
2612
|
:host([opened]) {
|
|
2613
2613
|
pointer-events: auto;
|
|
@@ -2652,4 +2652,4 @@ class ur{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.
|
|
|
2652
2652
|
></vaadin-combo-box-overlay>
|
|
2653
2653
|
|
|
2654
2654
|
<slot name="tooltip"></slot>
|
|
2655
|
-
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new er(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new ir(this.inputElement,this._labelController)),this._tooltipController=new Eo(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}a(vr);const gr=class{constructor(e){t(this,e),this.errorCode="",this.getPhonePrefixes=()=>{const t=new URL("v1/player/validPhoneCodes",this.endpoint);return new Promise((e=>{fetch(t.href).then((t=>t.json())).then((t=>{this.userPrefixOptions=t.phoneCodes.map((t=>({label:t.Prefix,value:t.Prefix}))),e()}))}))},this.autofillCredentialsHandler=t=>{this.userNameEmail=t.detail.userNameEmail,this.userPassword=t.detail.userPassword,this.handleLogin()},this.userLoginGm17=async()=>{let t={"Content-Type":"application/json"};const e={contact:this.userNameEmail,password:this.userPassword};this.captchaData.isEnabled&&(t["X-Captcha-Response"]=this.captchaData.token);const i={method:"POST",headers:t,body:JSON.stringify(e)};try{const t=await fetch(`${this.endpoint}/api/v1/players/password-management/auth/password/verify`,i),e=await t.json(),{token:s}=e;if(!s)throw this.isLoginLoading=!1,new Error("Token not received from the API call.");await this.sendLegislationLogin(s)}catch(t){console.error(t),this.hasError=!0,this.isLoginLoading=!1,this.errorMessage=o("genericError",this.lang),this.sendErrorNotification(this.errorMessage)}},this.sendLegislationLogin=async t=>{const e={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:t,method:"login"})};try{const t=await fetch(`${this.endpoint}/api/v2/gm/legislation/login`,e),i=await t.json();if(!t.ok){const{message:t,errors:e}=i;throw this.isLoginLoading=!1,console.error(`Legislation login failed: ${t}`,e),new Error("Legislation login request failed.")}{const{sessionId:t,playerId:e}=i;t&&(this.isLoginLoading=!1,window.postMessage({type:"UserSessionID",session:t,userid:e},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"success",message:o("successMessage",this.lang)}},window.location.href),this.hasError=!1)}}catch(t){console.error(t),this.hasError=!0,this.isLoginLoading=!1,this.errorMessage=o("genericError",this.lang),this.sendErrorNotification(this.errorMessage)}},this.userLogin=async()=>{const t=new URL("/v1/player/legislation/login",this.endpoint),e=new Headers;e.append("Content-Type","application/json");const i=JSON.stringify({username:"true"===this.loginByPhoneNumber?`${this.userPrefix} ${this.userPhone}`:this.userNameEmail,password:this.userPassword});fetch(t.href,{method:"POST",headers:e,body:i}).then((t=>t.json())).then((t=>{var e,i,s;if((null===(e=t.sessionBlockers)||void 0===e?void 0:e.includes("has-to-set-consents"))&&window.postMessage({type:"PlayerActions",gmversion:"gm16"},window.location.href),!0===(null==t?void 0:t.hasToSetPass))return this.hasError=!0,this.errorMessage=o("setUpPassowrd",this.lang),this.sendErrorNotification(o("setUpPassowrd",this.lang)),void window.postMessage({type:"HasToSetPass"},window.location.href);t.sessionId?(window.postMessage({type:"UserSessionID",session:t.sessionId,userid:t.userId},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"success",message:o("successMessage",this.lang)}},window.location.href),this.hasError=!1,((t,e={})=>{const i=new CustomEvent("track-custom-event",{detail:{type:"logged_in",data:e},bubbles:!0,composed:!0});document.dispatchEvent(i)})(0,{userId:t.userId})):(this.hasError=!0,this.errorCode=null===(i=null==t?void 0:t.thirdPartyResponse)||void 0===i?void 0:i.errorCode,this.errorMessage=o(`${this.errorCode}`,this.lang)||(null===(s=null==t?void 0:t.thirdPartyResponse)||void 0===s?void 0:s.message)||o("genericError",this.lang),this.errorMessage&&(console.error(this.errorMessage),this.sendErrorNotification(this.errorMessage)))})).catch((t=>{console.error(t),this.hasError=!0,this.errorMessage=o("genericError",this.lang),this.sendErrorNotification(this.errorMessage)})).finally((()=>{this.isLoginLoading=!1}))},this.handleLogin=()=>{this.isLoginLoading=!0,this.debounce({gm16:this.userLogin,gm17:this.userLoginGm17}[this.version]||this.userLogin,850)(),this.dispatchUpdateLoginCredentialsEvent()},this.handleSubmit=t=>{"Enter"===t.key&&!this.checkIsDisabled()&&this.handleLogin()},this.handleInputChange=(t,e)=>{const i=t.target.value;switch(e){case"user":this.userNameEmail=i,this.isValidUserEmail=this.validate("user",this.userNameEmail),this.errorForFields[e]=!this.isValidUserEmail&&i.length>3;break;case"phone":this.userPhone=i,this.isValidUserPhone=this.validate("phone",this.userPhone),this.errorForFields[e]=!this.isValidUserPhone&&i.length>3;break;case"prefix":this.userPrefix=i,this.isValidUserPhone=this.validate("phone",this.userPhone),this.errorForFields[e]=!this.isValidUserPhone;break;case"password":this.userPassword=i,this.isValidPassword=this.validate("password",i),this.errorForFields[e]=!this.isValidPassword&&i.length>3}},this.handleInputChangePartial=t=>e=>this.handleInputChange(e,t),this.validate=(t,e)=>{let i;switch(t){case"user":return i=new RegExp(this.userEmailRegex,this.userEmailRegexOptions),i.test(e);case"phone":return i=new RegExp(this.userPhoneRegex,this.userPhoneRegexOptions),i.test(e)&&!!this.userPrefix;case"password":return i=new RegExp(this.passwordRegex,this.passwordRegexOptions),i.test(e)}},this.togglePassword=()=>{this.isPasswordVisible=!this.isPasswordVisible},this.resetPassword=()=>{window.postMessage({type:"NavForgotPassword"},window.location.href)},this.endpoint="",this.lang="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.passwordReset="false",this.userEmailRegex=void 0,this.userEmailRegexOptions="i",this.userPhoneRegex=void 0,this.userPhoneRegexOptions="",this.passwordRegex=void 0,this.passwordRegexOptions="",this.version="gm16",this.loginByPhoneNumber="false",this.userNameEmail="",this.userPassword="",this.isValidUserEmail=!0,this.userPhone="",this.userPrefix="",this.isValidPassword=!0,this.isValidUserPhone=!0,this.isPasswordVisible=!1,this.errorMessage="",this.errorForFields={},this.hasError=!1,this.userPrefixOptions=void 0,this.isLoginLoading=!1,this.captchaData={isEnabled:!0,token:"",provider:"",siteKey:""},this.mbSource=void 0}handleNewTranslations(){s(this.translationUrl)}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){"true"===this.loginByPhoneNumber&&await this.getPhonePrefixes(),this.translationUrl.length>2&&await s(this.translationUrl),"gm17"===this.version&&this.getLoginConfig().then((()=>{this.appendCaptchaScript()})).catch((t=>{console.error(t),this.hasError=!0,this.errorMessage=o("configError",this.lang),this.sendErrorNotification(this.errorMessage)}))}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?function(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))),window.addEventListener("LoginCredentials",this.autofillCredentialsHandler),window.postMessage({type:"UserLoginDidLoad"})}getLoginConfig(){const t=new URL("/api/v1/players/password-management/auth/password/config",this.endpoint);return new Promise(((e,i)=>{fetch(t.href).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>{const{captcha:i}=t;i&&"string"==typeof i.provider&&(i.provider=i.provider.toLowerCase()),this.captchaData=Object.assign({},i),e()})).catch((t=>{console.error("Error fetching login configuration:",t),i(t)}))}))}handleCaptcha(){const{isEnabled:t,provider:e,siteKey:i}=this.captchaData;t&&["cloudflare","google"].includes(e)&&("cloudflare"===e?window.turnstile.render("#turnstileContainer",{sitekey:i,theme:"light",callback:this.captchaCallback.bind(this)}):"google"===e&&window.grecaptcha.ready((()=>{window.grecaptcha.render("googleContainer",{sitekey:i,callback:this.captchaCallback.bind(this),theme:"light"})})))}captchaCallback(t){this.captchaData.token=t,this.captchaData=Object.assign({},this.captchaData)}appendCaptchaScript(){const{isEnabled:t,provider:e}=this.captchaData;if(!t)return;const i=document.createElement("script");"cloudflare"===e?i.src="https://challenges.cloudflare.com/turnstile/v0/api.js":"google"===e&&(i.src="https://www.google.com/recaptcha/api.js"),i.onload=this.handleCaptcha.bind(this),document.head.appendChild(i)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),window.removeEventListener("LoginCredentials",this.autofillCredentialsHandler)}sendErrorNotification(t){window.postMessage({type:"HasError",error:t},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"error",message:t}},window.location.href)}debounce(t,e){let i;return function(...s){clearTimeout(i),i=setTimeout((()=>{t.apply(this,s)}),e)}}dispatchUpdateLoginCredentialsEvent(){this.hasError||(this.updateLoginCredentialsEvent=new CustomEvent("UpdateLoginCredentials",{bubbles:!0,detail:{userNameEmail:this.userNameEmail,userPassword:this.userPassword}}),window.dispatchEvent(this.updateLoginCredentialsEvent))}checkIsDisabled(){return Boolean("true"!==this.loginByPhoneNumber&&(!this.isValidUserEmail||!this.userNameEmail)||"true"===this.loginByPhoneNumber&&(!this.isValidUserPhone||!this.userPhone||!this.userPrefix)||!this.userPassword||!this.isValidPassword||this.isLoginLoading||"gm17"===this.version&&this.captchaData.isEnabled&&!this.captchaData.token)}render(){let t=e("span",{key:"873b46cd052e54869d17d36008134d68f729d22c",class:"InputIcon"},this.isPasswordVisible&&e("svg",{key:"baf9760bab38a8399b2cbfbfd303b4c961bf90ec",onClick:()=>this.togglePassword(),class:"TogglePasswordVisibility",part:"TogglePasswordVisibility",xmlns:"http://www.w3.org/2000/svg",width:"18.844",height:"12.887",viewBox:"0 0 18.844 12.887"},e("g",{key:"00fbf2dd477a2ee870382c516f958a079679bab3",transform:"translate(-110.856 -23.242)"},e("circle",{key:"0e2504e866afe424d2c8af5d6c5eaa67bd2c579d",class:"PasswordVisibilityIcon",cx:"0.05",cy:"0.05",r:"0.05",transform:"translate(121.017 31.148)"}),e("g",{key:"fdae6fb56663c96c05eaf5f38426c82d73c536e6",transform:"translate(117.499 27.37)"},e("path",{key:"b90367f121550b9107437f619c5e4bce7984eb98",class:"PasswordVisibilityIcon",d:"M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z",transform:"translate(-142.164 -39.123)"}),e("path",{key:"b9ea058a252ab4cdec4731a60124527f790239b7",class:"PasswordVisibilityIcon",d:"M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z",transform:"translate(-136.413 -42.068)"})),e("g",{key:"9f69d6f33eb954e9b61109ff693055dde06a636b",transform:"translate(110.856 24.899)"},e("path",{key:"091beb6da885916a0f236eb9ab715a83291d651e",class:"PasswordVisibilityIcon",d:"M122.538,42.061a7.043,7.043,0,0,1-2.325.53,10.373,10.373,0,0,1-4.393-1.482,36.509,36.509,0,0,1-3.873-2.391.13.13,0,0,1,0-.208,44.141,44.141,0,0,1,3.873-2.651c.394-.233.768-.437,1.13-.622l-.686-.838c-.322.167-.651.347-.99.55a37.989,37.989,0,0,0-3.977,2.729,1.21,1.21,0,0,0-.442.962,1.1,1.1,0,0,0,.494.936,34.416,34.416,0,0,0,3.977,2.469,11.468,11.468,0,0,0,4.886,1.611,8.427,8.427,0,0,0,3.039-.725Z",transform:"translate(-110.856 -33.157)"}),e("path",{key:"e2072711623a0dcb418b9eac1e32e41e891a4990",class:"PasswordVisibilityIcon",d:"M149.119,34.14a45.875,45.875,0,0,0-4.055-2.729,20.541,20.541,0,0,0-2.547-1.248,5.6,5.6,0,0,0-4.79-.017l.7.856a5.254,5.254,0,0,1,1.672-.346,10.072,10.072,0,0,1,4.445,1.663,34.132,34.132,0,0,1,3.925,2.651.13.13,0,0,1,0,.208,40.2,40.2,0,0,1-3.925,2.391c-.179.092-.352.176-.525.26l.684.835c.1-.054.2-.1.309-.159a36.356,36.356,0,0,0,4.055-2.469,1.067,1.067,0,0,0,.52-.936A1.159,1.159,0,0,0,149.119,34.14Z",transform:"translate(-130.743 -29.617)"})),e("rect",{key:"7d1b2db153303218409fbc1e516137d0ec3b4bb6",class:"PasswordVisibilityIcon",width:"0.972",height:"15.861",rx:"0.486",transform:"translate(114.827 23.858) rotate(-39.315)"}))),!this.isPasswordVisible&&e("svg",{key:"81f870783083b3baf63de05c8a089d243677243e",onClick:()=>this.togglePassword(),class:"TogglePasswordVisibility PasswordVisible",part:"TogglePasswordVisibility",xmlns:"http://www.w3.org/2000/svg",width:"18.843",height:"10.5",viewBox:"0 0 18.843 10.5"},e("g",{key:"80f5984776ece67a2571f7a91c9acbeab7fdfdec",transform:"translate(-14.185 -27.832)"},e("path",{key:"bec2b1f38bfc6f7240c5da81284640056840846a",class:"PasswordVisibilityIcon",d:"M23.541,38.332a11.467,11.467,0,0,1-4.886-1.611,34.413,34.413,0,0,1-3.976-2.469,1.1,1.1,0,0,1-.494-.936,1.21,1.21,0,0,1,.442-.962A37.986,37.986,0,0,1,18.6,29.625a16.06,16.06,0,0,1,2.521-1.248,6.862,6.862,0,0,1,2.417-.546,6.862,6.862,0,0,1,2.417.546,20.541,20.541,0,0,1,2.547,1.248,45.872,45.872,0,0,1,4.054,2.729,1.159,1.159,0,0,1,.468.962,1.067,1.067,0,0,1-.52.936,36.353,36.353,0,0,1-4.054,2.469A11.2,11.2,0,0,1,23.541,38.332Zm0-9.46a9.813,9.813,0,0,0-4.392,1.663,44.138,44.138,0,0,0-3.873,2.651.13.13,0,0,0,0,.208,36.5,36.5,0,0,0,3.873,2.391,10.372,10.372,0,0,0,4.392,1.481,11.051,11.051,0,0,0,4.444-1.481,40.2,40.2,0,0,0,3.925-2.391.13.13,0,0,0,0-.208h0a34.132,34.132,0,0,0-3.925-2.651A10.072,10.072,0,0,0,23.541,28.872Z",transform:"translate(0)"}),e("circle",{key:"36d74b0356775e54cffa9af1ab339ab89e3b4307",class:"PasswordVisibilityIcon",cx:"2.779",cy:"2.779",r:"2.779",transform:"translate(20.827 30.303)"})))),i=e("div",{key:"4b08d425d71e42f6a9418c46cc514221d1d4c233",class:"FormBox"},e("div",{key:"fedc3017c5cfe937373a8197bfcbe21c056b40f7",class:"FormValue",onKeyDown:this.handleSubmit},"true"===this.loginByPhoneNumber?e("div",{class:!this.isValidUserPhone&&this.hasError?"InputBox InputInvalidBox":"InputBox "},e("div",{class:"PhoneInputBox"},e("div",{class:"PrefixBox"},e("vaadin-combo-box",{items:this.userPrefixOptions,value:this.userPrefix,onChange:this.handleInputChangePartial("prefix")}),e("label",{class:(this.userPrefix?"FieldFilledIn":"")+" "+(!this.isValidUserPhone&&this.errorForFields.phone?"FieldInvalid":"")},o("userPrefix",this.lang))),e("div",{class:"PhoneBox"},e("input",{type:"text",placeholder:"",value:this.userPhone,onFocus:this.handleInputChangePartial("phone"),onInput:this.handleInputChangePartial("phone"),autocapitalize:"none",required:!0}),e("label",{class:(this.userPhone?"FieldFilledIn":"")+" "+(!this.isValidUserPhone&&this.errorForFields.phone?"FieldInvalid":"")},o("userPhone",this.lang)),!this.isValidUserPhone&&this.errorForFields.phone&&e("p",{class:"CredentialsError"},o("userPhoneError",this.lang))))):e("div",{class:!this.isValidUserEmail&&this.errorForFields.user?"InputBox InputInvalidBox":"InputBox"},e("input",{type:"text",placeholder:"",value:this.userNameEmail,onInput:this.handleInputChangePartial("user"),autocapitalize:"none",required:!0}),e("label",{class:(this.userNameEmail?"FieldFilledIn":"")+" "+(!this.isValidUserEmail&&this.errorForFields.user?"FieldInvalid":"")},o("userEmail",this.lang)),!this.isValidUserEmail&&this.errorForFields.user&&e("p",{class:"CredentialsError"},o("userEmailError",this.lang))),e("div",{key:"735796631e7eab7a6f74300d84f5765c9ae90f82",class:!this.isValidPassword&&this.errorForFields.password?"InputBox InputInvalidBox":"InputBox"},t,e("input",{key:"ad6ad6d6520897acfb74fcde6e6cf3558f05cca0",type:this.isPasswordVisible?"text":"password",placeholder:"",value:this.userPassword,onInput:this.handleInputChangePartial("password"),autocapitalize:"none",required:!0}),e("label",{key:"30f7b42430136df0ae9547a04045ec5d32936f35",class:(this.userPassword?"FieldFilledIn":"")+" "+(!this.isValidPassword&&this.errorForFields.password?"FieldInvalid":"")},o("password",this.lang)),!this.isValidPassword&&this.errorForFields.password&&e("p",{key:"e4484e3ca22588db694d5df88a6e90289fae26be",class:"CredentialsError"},o("userPasswordError",this.lang))),"true"==this.passwordReset&&e("div",{key:"88e5b7b9d1bb587fb444505b38acd0de1071e0c6",class:"ForgotPassword"},e("button",{key:"270efba86a89b52dcc746650ab03a0906ff40f96",onClick:this.resetPassword},o("forgotPassword",this.lang))),this.captchaData.isEnabled&&"cloudflare"===this.captchaData.provider&&e("slot",{key:"6b6e886f022704f812ddb247166f5f49ccdba075",name:"turnstile"}),this.captchaData.isEnabled&&"google"===this.captchaData.provider&&e("slot",{key:"19edf70dd8f5b28f75df706600041678fff98d3e",name:"google"}),e("button",{key:"9edd0f60e6046f5cd8b4d4546781d88d9df9a498",disabled:this.checkIsDisabled(),class:"SubmitCredentials",onClick:this.handleLogin},o("login",this.lang)),this.hasError&&e("p",{key:"d33f306d71c082c278b7c125ba9fe9b51aef0416",class:"CredentialsError"},this.errorMessage)));return e("section",{key:"d6646783e9967e2ddedf2dd02a95da1717745ded",ref:t=>this.stylingContainer=t},i)}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};gr.style=':host{display:block;font-family:"Roboto", sans-serif}section{height:100%;width:100%;background-position:center;background-size:cover}.FormValue{width:100%}.FormBox{height:100%;display:flex;position:relative;background:none;border:none;justify-content:center;align-items:center}.InputBox{position:relative;margin:30px 0;width:100%;border-bottom:2px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.InputBox .PhoneInputBox{display:flex;flex-direction:row}.InputBox .PhoneInputBox .PhoneBox{position:relative;width:100%}.InputBox .PhoneInputBox .PrefixBox{position:relative;width:fit-content}.InputBox.InputInvalidBox .PasswordVisibilityIcon{fill:var(--emfw-w-color-error, var(--emw--color-red, #FD2839))}.InputBox.InputInvalidBox input{color:var(--emfw-w-color-error, var(--emw--color-red, #FD2839))}.InputBox.InputInvalidBox::after{content:"";height:2px;width:100%;transition:width 0.6s linear;background:var(--emfw-w-color-error, var(--emw--color-red, #FD2839))}.InputBox::after{content:"";display:block;width:0;height:2px;position:relative;top:2px}.InputBox .PasswordVisibilityIcon{fill:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.InputBox .InputIcon .TogglePasswordVisibility{cursor:pointer;position:absolute;top:18px;right:0}.InputBox .InputIcon .TogglePasswordVisibility.PasswordVisible{top:19.5px}.InputBox label{position:absolute;top:50%;left:5px;transform:translateY(-50%);color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));font-size:var(--emw--font-size-medium, 16px);pointer-events:none;transition:0.5s}.InputBox label.FieldInvalid{color:#C23135}.InputBox input{width:100%;height:50px;background:transparent;border:none;outline:none;font-size:var(--emw--font-size-medium, 16px);padding:0 35px 0 5px;color:var(--emw--registration-typography, var(--emw--color-typography, #000000));box-sizing:border-box}input:focus~label,label.FieldFilledIn{top:-3px;font-size:var(--emw--font-size-x-small, 16px)}vaadin-combo-box:focus-within~label,label.FieldFilledIn{top:-3px;font-size:var(--emw--font-size-x-small, 16px)}.ForgotPassword button{margin:-10px 0 17px;font-size:var(--emw--font-size-medium, 16px);color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));display:flex;justify-content:space-between;background-color:transparent;padding:0;height:unset;border:0;cursor:pointer}.SubmitCredentials{display:block;margin:0 auto;outline:none;cursor:pointer;background:var(--emw--color-primary, #0E5924);border-radius:var(--emw--button-border-radius, 10px);padding:10px 20px;font-size:var(--emw--font-size-large, 20px);font-family:var(--emw--button-typography);color:var(--emw--button-text-color, #FFFFFF)}.SubmitCredentials:disabled{background:var(--emw--color-primary, #0E5924);opacity:0.4;cursor:default}.Register{font-size:var(--emw--font-size-medium, 16px);color:var(--emw--registration-typography, var(--emw--color-typography, #FFFFFF));text-align:center;margin:25px 0 10px}.Register p a{text-decoration:none;font-weight:600}.Register p a:hover{text-decoration:underline}.InvalidField{position:absolute;color:var(--emfw-w-color-error, var(--emw--color-red, #FD2839));font-size:var(--emw--font-size-x-small, 12px)}.SubmitCredentials{margin-bottom:20px}.CredentialsError{color:var(--emfw-w-color-error, var(--emw--color-red, #FD2839));font-size:var(--emw--font-size-x-small, 12px);padding:0 0 20px 0;margin:0}.CredentialsError input{color:var(--emfw-w-color-error, var(--emw--color-red, #FD2839))}@media screen and (max-width: 480px){.FormBox{width:100%;border-radius:0px}}';export{gr as user_login}
|
|
2655
|
+
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new er(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new ir(this.inputElement,this._labelController)),this._tooltipController=new Po(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}a(vr);const gr=class{constructor(e){t(this,e),this.errorCode="",this.getPhonePrefixes=()=>{const t=new URL("v1/player/validPhoneCodes",this.endpoint);return new Promise((e=>{fetch(t.href).then((t=>t.json())).then((t=>{this.userPrefixOptions=t.phoneCodes.map((t=>({label:t.Prefix,value:t.Prefix}))),e()}))}))},this.autofillCredentialsHandler=t=>{this.userNameEmail=t.detail.userNameEmail,this.userPassword=t.detail.userPassword,this.handleLogin()},this.userLoginGm17=async()=>{let t={"Content-Type":"application/json"};const e={contact:this.userNameEmail,password:this.userPassword};this.captchaData.isEnabled&&(t["X-Captcha-Response"]=this.captchaData.token);const i={method:"POST",headers:t,body:JSON.stringify(e)};try{const t=await fetch(`${this.endpoint}/api/v1/players/password-management/auth/password/verify`,i),e=await t.json(),{token:s}=e;if(!s)throw this.isLoginLoading=!1,new Error("Token not received from the API call.");await this.sendLegislationLogin(s)}catch(t){console.error(t),this.hasError=!0,this.isLoginLoading=!1,this.errorMessage=o("genericError",this.lang),this.sendErrorNotification(this.errorMessage)}},this.sendLegislationLogin=async t=>{const e={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:t,method:"login"})};try{const t=await fetch(`${this.endpoint}/api/v2/gm/legislation/login`,e),i=await t.json();if(!t.ok){const{message:t,errors:e}=i;throw this.isLoginLoading=!1,console.error(`Legislation login failed: ${t}`,e),new Error("Legislation login request failed.")}{const{sessionId:t,playerId:e}=i;t&&(this.isLoginLoading=!1,window.postMessage({type:"UserSessionID",session:t,userid:e},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"success",message:o("successMessage",this.lang)}},window.location.href),this.hasError=!1)}}catch(t){console.error(t),this.hasError=!0,this.isLoginLoading=!1,this.errorMessage=o("genericError",this.lang),this.sendErrorNotification(this.errorMessage)}},this.userLogin=async()=>{const t=new URL("/v1/player/legislation/login",this.endpoint),e=new Headers;e.append("Content-Type","application/json");const i=JSON.stringify({username:"true"===this.loginByPhoneNumber?`${this.userPrefix} ${this.userPhone}`:this.userNameEmail,password:this.userPassword});fetch(t.href,{method:"POST",headers:e,body:i}).then((t=>t.json())).then((t=>{var e,i,s;if((null===(e=t.sessionBlockers)||void 0===e?void 0:e.includes("has-to-set-consents"))&&window.postMessage({type:"PlayerActions",gmversion:"gm16"},window.location.href),!0===(null==t?void 0:t.hasToSetPass))return this.hasError=!0,this.errorMessage=o("setUpPassowrd",this.lang),this.sendErrorNotification(o("setUpPassowrd",this.lang)),void window.postMessage({type:"HasToSetPass"},window.location.href);t.sessionId?(window.postMessage({type:"UserSessionID",session:t.sessionId,userid:t.userId},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"success",message:o("successMessage",this.lang)}},window.location.href),this.hasError=!1,((t,e={})=>{const i=new CustomEvent("track-custom-event",{detail:{type:"logged_in",data:e},bubbles:!0,composed:!0});document.dispatchEvent(i)})(0,{userId:t.userId})):(this.hasError=!0,this.errorCode=null===(i=null==t?void 0:t.thirdPartyResponse)||void 0===i?void 0:i.errorCode,this.errorMessage="GmErr_USER_AUTH_FAILED"===this.errorCode&&"true"===this.loginByPhoneNumber?o("AuthFailedPhoneNumber",this.lang):o(`${this.errorCode}`,this.lang)||(null===(s=null==t?void 0:t.thirdPartyResponse)||void 0===s?void 0:s.message)||o("genericError",this.lang),this.errorMessage&&(console.error(this.errorMessage),this.sendErrorNotification(this.errorMessage)))})).catch((t=>{console.error(t),this.hasError=!0,this.errorMessage=o("genericError",this.lang),this.sendErrorNotification(this.errorMessage)})).finally((()=>{this.isLoginLoading=!1}))},this.handleLogin=()=>{this.isLoginLoading=!0,this.debounce({gm16:this.userLogin,gm17:this.userLoginGm17}[this.version]||this.userLogin,850)(),this.dispatchUpdateLoginCredentialsEvent()},this.handleSubmit=t=>{"Enter"===t.key&&!this.checkIsDisabled()&&this.handleLogin()},this.handleInputChange=(t,e)=>{const i=t.target.value;switch(e){case"user":this.userNameEmail=i,this.isValidUserEmail=this.validate("user",this.userNameEmail),this.errorForFields[e]=!this.isValidUserEmail&&i.length>3;break;case"phone":this.userPhone=i,this.isValidUserPhone=this.validate("phone",this.userPhone),this.errorForFields[e]=!this.isValidUserPhone&&i.length>3;break;case"prefix":this.userPrefix=i,this.isValidUserPhone=this.validate("phone",this.userPhone),this.errorForFields[e]=!this.isValidUserPhone;break;case"password":this.userPassword=i,this.isValidPassword=this.validate("password",i),this.errorForFields[e]=!this.isValidPassword&&i.length>3}},this.handleInputChangePartial=t=>e=>this.handleInputChange(e,t),this.validate=(t,e)=>{let i;switch(t){case"user":return i=new RegExp(this.userEmailRegex,this.userEmailRegexOptions),i.test(e);case"phone":return i=new RegExp(this.userPhoneRegex,this.userPhoneRegexOptions),i.test(e)&&!!this.userPrefix;case"password":return i=new RegExp(this.passwordRegex,this.passwordRegexOptions),i.test(e)}},this.togglePassword=()=>{this.isPasswordVisible=!this.isPasswordVisible},this.resetPassword=()=>{window.postMessage({type:"NavForgotPassword"},window.location.href)},this.endpoint="",this.lang="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.passwordReset="false",this.userEmailRegex=void 0,this.userEmailRegexOptions="i",this.userPhoneRegex=void 0,this.userPhoneRegexOptions="",this.passwordRegex=void 0,this.passwordRegexOptions="",this.version="gm16",this.loginByPhoneNumber="false",this.userNameEmail="",this.userPassword="",this.isValidUserEmail=!0,this.userPhone="",this.userPrefix="",this.isValidPassword=!0,this.isValidUserPhone=!0,this.isPasswordVisible=!1,this.errorMessage="",this.errorForFields={},this.hasError=!1,this.userPrefixOptions=void 0,this.isLoginLoading=!1,this.captchaData={isEnabled:!0,token:"",provider:"",siteKey:""},this.mbSource=void 0}handleNewTranslations(){s(this.translationUrl)}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){"true"===this.loginByPhoneNumber&&await this.getPhonePrefixes(),this.translationUrl.length>2&&await s(this.translationUrl),"gm17"===this.version&&this.getLoginConfig().then((()=>{this.appendCaptchaScript()})).catch((t=>{console.error(t),this.hasError=!0,this.errorMessage=o("configError",this.lang),this.sendErrorNotification(this.errorMessage)}))}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?function(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&n(this.stylingContainer,this.clientStylingUrl))),window.addEventListener("LoginCredentials",this.autofillCredentialsHandler),window.postMessage({type:"UserLoginDidLoad"})}getLoginConfig(){const t=new URL("/api/v1/players/password-management/auth/password/config",this.endpoint);return new Promise(((e,i)=>{fetch(t.href).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>{const{captcha:i}=t;i&&"string"==typeof i.provider&&(i.provider=i.provider.toLowerCase()),this.captchaData=Object.assign({},i),e()})).catch((t=>{console.error("Error fetching login configuration:",t),i(t)}))}))}handleCaptcha(){const{isEnabled:t,provider:e,siteKey:i}=this.captchaData;t&&["cloudflare","google"].includes(e)&&("cloudflare"===e?window.turnstile.render("#turnstileContainer",{sitekey:i,theme:"light",callback:this.captchaCallback.bind(this)}):"google"===e&&window.grecaptcha.ready((()=>{window.grecaptcha.render("googleContainer",{sitekey:i,callback:this.captchaCallback.bind(this),theme:"light"})})))}captchaCallback(t){this.captchaData.token=t,this.captchaData=Object.assign({},this.captchaData)}appendCaptchaScript(){const{isEnabled:t,provider:e}=this.captchaData;if(!t)return;const i=document.createElement("script");"cloudflare"===e?i.src="https://challenges.cloudflare.com/turnstile/v0/api.js":"google"===e&&(i.src="https://www.google.com/recaptcha/api.js"),i.onload=this.handleCaptcha.bind(this),document.head.appendChild(i)}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),window.removeEventListener("LoginCredentials",this.autofillCredentialsHandler)}sendErrorNotification(t){window.postMessage({type:"HasError",error:t},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"error",message:t}},window.location.href)}debounce(t,e){let i;return function(...s){clearTimeout(i),i=setTimeout((()=>{t.apply(this,s)}),e)}}dispatchUpdateLoginCredentialsEvent(){this.hasError||(this.updateLoginCredentialsEvent=new CustomEvent("UpdateLoginCredentials",{bubbles:!0,detail:{userNameEmail:this.userNameEmail,userPassword:this.userPassword}}),window.dispatchEvent(this.updateLoginCredentialsEvent))}checkIsDisabled(){return Boolean("true"!==this.loginByPhoneNumber&&(!this.isValidUserEmail||!this.userNameEmail)||"true"===this.loginByPhoneNumber&&(!this.isValidUserPhone||!this.userPhone||!this.userPrefix)||!this.userPassword||!this.isValidPassword||this.isLoginLoading||"gm17"===this.version&&this.captchaData.isEnabled&&!this.captchaData.token)}render(){let t=e("span",{key:"0567bd04c49ef7b4a31de0bf508a363d0bbaa26a",class:"InputIcon"},this.isPasswordVisible&&e("svg",{key:"793920403180085cf7c365673b8302eb6aaacc4c",onClick:()=>this.togglePassword(),class:"TogglePasswordVisibility",part:"TogglePasswordVisibility",xmlns:"http://www.w3.org/2000/svg",width:"18.844",height:"12.887",viewBox:"0 0 18.844 12.887"},e("g",{key:"ae7bd644effa0491711d4b516a7059a91ee3b476",transform:"translate(-110.856 -23.242)"},e("circle",{key:"9fab6b1cd86bfe21fbf1a2d87a1e2e35280ade02",class:"PasswordVisibilityIcon",cx:"0.05",cy:"0.05",r:"0.05",transform:"translate(121.017 31.148)"}),e("g",{key:"0152c671924811b7718e9b580c5a611b884bcd44",transform:"translate(117.499 27.37)"},e("path",{key:"626a3631ab6eac6d793f3ea0648753784ce8af32",class:"PasswordVisibilityIcon",d:"M147.413,43.174a2.774,2.774,0,0,0-3.229-3.943Z",transform:"translate(-142.164 -39.123)"}),e("path",{key:"026fe2d110810902b89f1d30616a800be8ae3d3f",class:"PasswordVisibilityIcon",d:"M137.031,43.1a2.778,2.778,0,0,0,3.447,4.209Z",transform:"translate(-136.413 -42.068)"})),e("g",{key:"caabae285980948b1c782486f47fd6e1afefdb5a",transform:"translate(110.856 24.899)"},e("path",{key:"7edbbd6bd63f49875b2e9e5d58447147f5005d40",class:"PasswordVisibilityIcon",d:"M122.538,42.061a7.043,7.043,0,0,1-2.325.53,10.373,10.373,0,0,1-4.393-1.482,36.509,36.509,0,0,1-3.873-2.391.13.13,0,0,1,0-.208,44.141,44.141,0,0,1,3.873-2.651c.394-.233.768-.437,1.13-.622l-.686-.838c-.322.167-.651.347-.99.55a37.989,37.989,0,0,0-3.977,2.729,1.21,1.21,0,0,0-.442.962,1.1,1.1,0,0,0,.494.936,34.416,34.416,0,0,0,3.977,2.469,11.468,11.468,0,0,0,4.886,1.611,8.427,8.427,0,0,0,3.039-.725Z",transform:"translate(-110.856 -33.157)"}),e("path",{key:"c9ebd5b3c2d560b7a63a47c3b90fef0f8bb27d32",class:"PasswordVisibilityIcon",d:"M149.119,34.14a45.875,45.875,0,0,0-4.055-2.729,20.541,20.541,0,0,0-2.547-1.248,5.6,5.6,0,0,0-4.79-.017l.7.856a5.254,5.254,0,0,1,1.672-.346,10.072,10.072,0,0,1,4.445,1.663,34.132,34.132,0,0,1,3.925,2.651.13.13,0,0,1,0,.208,40.2,40.2,0,0,1-3.925,2.391c-.179.092-.352.176-.525.26l.684.835c.1-.054.2-.1.309-.159a36.356,36.356,0,0,0,4.055-2.469,1.067,1.067,0,0,0,.52-.936A1.159,1.159,0,0,0,149.119,34.14Z",transform:"translate(-130.743 -29.617)"})),e("rect",{key:"493569ad725c98735032bb95be827c31a34954ed",class:"PasswordVisibilityIcon",width:"0.972",height:"15.861",rx:"0.486",transform:"translate(114.827 23.858) rotate(-39.315)"}))),!this.isPasswordVisible&&e("svg",{key:"82446b94cc27200bae6a4bbff93122ba81bcced8",onClick:()=>this.togglePassword(),class:"TogglePasswordVisibility PasswordVisible",part:"TogglePasswordVisibility",xmlns:"http://www.w3.org/2000/svg",width:"18.843",height:"10.5",viewBox:"0 0 18.843 10.5"},e("g",{key:"84c9ca1a06fb0ee05a9a8f221d4692134be398b6",transform:"translate(-14.185 -27.832)"},e("path",{key:"f224a2009b2188a9818055aa32f57784ca075d6e",class:"PasswordVisibilityIcon",d:"M23.541,38.332a11.467,11.467,0,0,1-4.886-1.611,34.413,34.413,0,0,1-3.976-2.469,1.1,1.1,0,0,1-.494-.936,1.21,1.21,0,0,1,.442-.962A37.986,37.986,0,0,1,18.6,29.625a16.06,16.06,0,0,1,2.521-1.248,6.862,6.862,0,0,1,2.417-.546,6.862,6.862,0,0,1,2.417.546,20.541,20.541,0,0,1,2.547,1.248,45.872,45.872,0,0,1,4.054,2.729,1.159,1.159,0,0,1,.468.962,1.067,1.067,0,0,1-.52.936,36.353,36.353,0,0,1-4.054,2.469A11.2,11.2,0,0,1,23.541,38.332Zm0-9.46a9.813,9.813,0,0,0-4.392,1.663,44.138,44.138,0,0,0-3.873,2.651.13.13,0,0,0,0,.208,36.5,36.5,0,0,0,3.873,2.391,10.372,10.372,0,0,0,4.392,1.481,11.051,11.051,0,0,0,4.444-1.481,40.2,40.2,0,0,0,3.925-2.391.13.13,0,0,0,0-.208h0a34.132,34.132,0,0,0-3.925-2.651A10.072,10.072,0,0,0,23.541,28.872Z",transform:"translate(0)"}),e("circle",{key:"8b393ae40f3a6b828fa98fac6049162fddd66252",class:"PasswordVisibilityIcon",cx:"2.779",cy:"2.779",r:"2.779",transform:"translate(20.827 30.303)"})))),i=e("div",{key:"5d4c897408d2d4851569820e72257cfa26238827",class:"FormBox"},e("div",{key:"125282b434d58a2ae594ff8c8de5acec7b16c6a0",class:"FormValue",onKeyDown:this.handleSubmit},"true"===this.loginByPhoneNumber?e("div",{class:!this.isValidUserPhone&&this.hasError?"InputBox InputInvalidBox":"InputBox "},e("div",{class:"PhoneInputBox"},e("div",{class:"PrefixBox"},e("vaadin-combo-box",{items:this.userPrefixOptions,value:this.userPrefix,onChange:this.handleInputChangePartial("prefix")}),e("label",{class:(this.userPrefix?"FieldFilledIn":"")+" "+(!this.isValidUserPhone&&this.errorForFields.phone?"FieldInvalid":"")},o("userPrefix",this.lang))),e("div",{class:"PhoneBox"},e("input",{type:"text",placeholder:"",value:this.userPhone,onFocus:this.handleInputChangePartial("phone"),onInput:this.handleInputChangePartial("phone"),autocapitalize:"none",required:!0}),e("label",{class:(this.userPhone?"FieldFilledIn":"")+" "+(!this.isValidUserPhone&&this.errorForFields.phone?"FieldInvalid":"")},o("userPhone",this.lang)),!this.isValidUserPhone&&this.errorForFields.phone&&e("p",{class:"CredentialsError"},o("userPhoneError",this.lang))))):e("div",{class:!this.isValidUserEmail&&this.errorForFields.user?"InputBox InputInvalidBox":"InputBox"},e("input",{type:"text",placeholder:"",value:this.userNameEmail,onInput:this.handleInputChangePartial("user"),autocapitalize:"none",required:!0}),e("label",{class:(this.userNameEmail?"FieldFilledIn":"")+" "+(!this.isValidUserEmail&&this.errorForFields.user?"FieldInvalid":"")},o("userEmail",this.lang)),!this.isValidUserEmail&&this.errorForFields.user&&e("p",{class:"CredentialsError"},o("userEmailError",this.lang))),e("div",{key:"456fadfe988ea1327a908309c42789f27f2c9ff9",class:!this.isValidPassword&&this.errorForFields.password?"InputBox InputInvalidBox":"InputBox"},t,e("input",{key:"bf19272a751547f3a7dad0be9d7030dd68135664",type:this.isPasswordVisible?"text":"password",placeholder:"",value:this.userPassword,onInput:this.handleInputChangePartial("password"),autocapitalize:"none",required:!0}),e("label",{key:"8b9a0ca4110096c2e7c08be75069c452b5c5da9c",class:(this.userPassword?"FieldFilledIn":"")+" "+(!this.isValidPassword&&this.errorForFields.password?"FieldInvalid":"")},o("password",this.lang)),!this.isValidPassword&&this.errorForFields.password&&e("p",{key:"17c314a82f4e15adff8918086af85e6452d4fc7d",class:"CredentialsError"},o("userPasswordError",this.lang))),"true"==this.passwordReset&&e("div",{key:"c4271c3b1f65174824b1d5a137e9562f98588f4d",class:"ForgotPassword"},e("button",{key:"2e9cd528e7581c8997a40dddadd932ceb724d18f",onClick:this.resetPassword},o("forgotPassword",this.lang))),this.captchaData.isEnabled&&"cloudflare"===this.captchaData.provider&&e("slot",{key:"c0d8ed9cf6fa85982bc9ca89378f359f5db9d375",name:"turnstile"}),this.captchaData.isEnabled&&"google"===this.captchaData.provider&&e("slot",{key:"7f63f3ea8413a3f3fcc91270de43a4cc81c0db39",name:"google"}),e("button",{key:"3d490cbd64e75c330c2884dc00fa76fb076b278d",disabled:this.checkIsDisabled(),class:"SubmitCredentials",onClick:this.handleLogin},o("login",this.lang)),this.hasError&&e("p",{key:"b4e37899e35f7c0ba2eb158aebb7c676a61834cb",class:"CredentialsError"},this.errorMessage)));return e("section",{key:"3a37084eea3c0d356eb0869f9113c173095bd33f",ref:t=>this.stylingContainer=t},i)}static get watchers(){return{translationUrl:["handleNewTranslations"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};gr.style=':host{display:block;font-family:"Roboto", sans-serif}section{height:100%;width:100%;background-position:center;background-size:cover}.FormValue{width:100%}.FormBox{height:100%;display:flex;position:relative;background:none;border:none;justify-content:center;align-items:center}.InputBox{position:relative;margin:30px 0;width:100%;border-bottom:2px solid var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.InputBox .PhoneInputBox{display:flex;flex-direction:row}.InputBox .PhoneInputBox .PhoneBox{position:relative;width:100%}.InputBox .PhoneInputBox .PrefixBox{position:relative;width:fit-content}.InputBox.InputInvalidBox .PasswordVisibilityIcon{fill:var(--emfw-w-color-error, var(--emw--color-red, #FD2839))}.InputBox.InputInvalidBox input{color:var(--emfw-w-color-error, var(--emw--color-red, #FD2839))}.InputBox.InputInvalidBox::after{content:"";height:2px;width:100%;transition:width 0.6s linear;background:var(--emfw-w-color-error, var(--emw--color-red, #FD2839))}.InputBox::after{content:"";display:block;width:0;height:2px;position:relative;top:2px}.InputBox .PasswordVisibilityIcon{fill:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E))}.InputBox .InputIcon .TogglePasswordVisibility{cursor:pointer;position:absolute;top:18px;right:0}.InputBox .InputIcon .TogglePasswordVisibility.PasswordVisible{top:19.5px}.InputBox label{position:absolute;top:50%;left:5px;transform:translateY(-50%);color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));font-size:var(--emw--font-size-medium, 16px);pointer-events:none;transition:0.5s}.InputBox label.FieldInvalid{color:#C23135}.InputBox input{width:100%;height:50px;background:transparent;border:none;outline:none;font-size:var(--emw--font-size-medium, 16px);padding:0 35px 0 5px;color:var(--emw--registration-typography, var(--emw--color-typography, #000000));box-sizing:border-box}input:focus~label,label.FieldFilledIn{top:-3px;font-size:var(--emw--font-size-x-small, 16px)}vaadin-combo-box:focus-within~label,label.FieldFilledIn{top:-3px;font-size:var(--emw--font-size-x-small, 16px)}.ForgotPassword button{margin:-10px 0 17px;font-size:var(--emw--font-size-medium, 16px);color:var(--emw--registration-color-primary, var(--emw--color-primary, #22B04E));display:flex;justify-content:space-between;background-color:transparent;padding:0;height:unset;border:0;cursor:pointer}.SubmitCredentials{display:block;margin:0 auto;outline:none;cursor:pointer;background:var(--emw--color-primary, #0E5924);border-radius:var(--emw--button-border-radius, 10px);padding:10px 20px;font-size:var(--emw--font-size-large, 20px);font-family:var(--emw--button-typography);color:var(--emw--button-text-color, #FFFFFF)}.SubmitCredentials:disabled{background:var(--emw--color-primary, #0E5924);opacity:0.4;cursor:default}.Register{font-size:var(--emw--font-size-medium, 16px);color:var(--emw--registration-typography, var(--emw--color-typography, #FFFFFF));text-align:center;margin:25px 0 10px}.Register p a{text-decoration:none;font-weight:600}.Register p a:hover{text-decoration:underline}.InvalidField{position:absolute;color:var(--emfw-w-color-error, var(--emw--color-red, #FD2839));font-size:var(--emw--font-size-x-small, 12px)}.SubmitCredentials{margin-bottom:20px}.CredentialsError{color:var(--emfw-w-color-error, var(--emw--color-red, #FD2839));font-size:var(--emw--font-size-x-small, 12px);padding:0 0 20px 0;margin:0}.CredentialsError input{color:var(--emfw-w-color-error, var(--emw--color-red, #FD2839))}@media screen and (max-width: 480px){.FormBox{width:100%;border-radius:0px}}';export{gr as user_login}
|