"use strict";(("undefined"!=typeof self?self:this).wpChessCom_dvZK=("undefined"!=typeof self?self:this).wpChessCom_dvZK||[]).push([[4202],{23449:function(e,n,t){t.d(n,{A:function(){return o}});let o={CHANGE_STEP:"change-step",CLEAR_ERROR:"clear-error",CLOSE_MODAL:"close-modal",HANDLE_INPUT:"handle-input",HANDLE_SELECTED_SUGGESTION:"handle-selected-suggestion",LOGIN_AS_GUEST:"login-as-guest",PLAY_AS_GUEST:"play-as-guest",SHOW_AUTHENTICATION_MODAL:"show-authentication-modal",SHOW_ERROR_MESSAGE:"show-error-message",HIDE_LOGIN_MODAL:"hide-login-modal",SKILL_LEVEL_UPDATED:"skill-level-updated"}},30505:function(e,n,t){t.d(n,{Y:function(){return showLoginModal}});var o=t(23449),i=t(51334),l=t(31286),r=t(39784),s=t(7118);function showLoginModal(){let e=document.getElementById(i.D.LOGIN_MODAL),n=!1,a=!1;if(e){n=!!e.getAttribute("data-is-web-view");a=!!e.getAttribute("data-turnstile-token")}let d=(0,l.E)((0,s.defineAsyncComponent)(()=>Promise.all([t.e(7308),t.e(788),t.e(6429)]).then(t.bind(t,57946))),{isWebView:n,useTurnstile:a});d.mount(`#${i.D.LOGIN_MODAL}`);r.A.once(o.A.HIDE_LOGIN_MODAL,()=>{d.unmount()})}},47954:function(e,n,t){t.r(n);t.d(n,{loginModalClient:function(){return r}});var o=t(15591),i=t(30505);function onClickLoginModalTrigger(e){e.preventDefault();e.stopPropagation();(0,i.Y)()}function setupLoginModalTriggers(e){e.forEach(e=>{e.addEventListener("click",onClickLoginModalTrigger)})}var l=t(51334);function getLoginModalTriggerElements(){return[...document.querySelectorAll(`.${l.D.LOGIN_MODAL_TRIGGER}`)]}let r=(0,o.createClient)({init(){setupLoginModalTriggers(getLoginModalTriggerElements())}})}}]);