try{if(void 0===$.magnificPopup)(el=document.createElement("script")).setAttribute("type","text/javascript"),el.setAttribute("src","https://s1.vnecdn.net/myvne/j/v1/lib/jquery.magnific-popup-1.1.min.js"),document.getElementsByTagName("head")[0].appendChild(el)}catch(e){var el;(el=document.createElement("script")).setAttribute("type","text/javascript"),el.setAttribute("src","https://s1.vnecdn.net/myvne/j/v1/lib/jquery.magnific-popup-1.1.min.js"),document.getElementsByTagName("head")[0].appendChild(el)}var isVrace=!1,defaultDomain="vnexpress.net";location.hostname.indexOf("ngoisao.net")>-1?defaultDomain="ngoisao.net":location.hostname.indexOf("ione.net")>-1?defaultDomain="ione.net":location.hostname.indexOf("vrace.com.vn")>-1?(defaultDomain="vrace.com.vn",isVrace=!0):location.hostname.indexOf("ebox.com.vn")>-1&&(defaultDomain="ebox.com.vn",isVrace=!0);var cookieName="login_system",cookieValue=1;if(document.cookie.indexOf(cookieName+"="+cookieValue)<0){var myDate=new Date;myDate.setMonth(myDate.getMonth()+12),document.cookie=cookieName+"="+cookieValue+";expires="+myDate+";domain=."+defaultDomain+";path=/"}if(window.console||(console={log:function(){}}),void 0===device_env)var device_env=4;var isMyVne=window.location.href.includes("my."+defaultDomain),isIone=window.location.href.includes("//ione.net")||window.location.href.includes("//ione.vnexpress.net"),arrDomainVNE=["demo.vnexpress.net","vnexpress.net","demo-my.vnexpress.net","my.vnexpress.net","review-internal.vnexpress.net","video.vnexpress.net","demo-video.vnexpress.net","beta-video.vnexpress.net","beta.vnexpress.net"],isVNE="undefined"!=typeof ns_ldp_hanhtrinhtutraitim&&1==ns_ldp_hanhtrinhtutraitim||arrDomainVNE.includes(window.location.hostname),arrDomainAllowToken=["demo.vnexpress.net","vnexpress.net"],isDomainAllowToken=arrDomainAllowToken.includes(window.location.hostname),myvne_users={language:/(^e|-e)\.vnexpress/.test(location.hostname)?"en":"string"==typeof language?language:"vi",dictionary:{en:{"Đăng nhập":"Log In","Hoạt động bình luận":"Comment History","Tin đã lưu":"Saved Articles","Tin đã xem":"Reading History","Tài khoản của tôi":"My Account","Thoát":"Log Out","Xem thêm":"See more","Bạn chưa có hoạt động bình luận nào trên VnExpress":"You have no comments on VnExpress","Có lỗi xảy ra":"Errors, please try again","Gửi lại thành công":"Resend successful","Thông báo":"Notification","Mời xác thực email":"Please verify email","Để đảm bảo an toàn cho tài khoản và có thể lấy lại mật khẩu bằng email":"To ensure the safety of your account and to be able to retrieve your password by email","Xác thực ngay":"Verify now","Để xác thực email trên là của bạn":"To verify the above email is yours","Hãy nhớ kiểm tra hòm thư rác":"Remember to check your spam folder","Gửi lại email":"Resend email","Đang gửi":"Sending","Kiểm tra email":"Email sent to","Xác thực email":"Email Verification","Xác thực tài khoản":"Account Verification","Email xác thực đã được gửi tới địa chỉ email":"Verification email has been sent to your email address","Vui lòng kiểm tra email hoặc trong mục “Thư rác” (Spam) để xem hướng dẫn xác thực tài khoản":"Please check your email or spam folder for instructions on how to verify your account","Kiểm tra email":"Check Email","Bạn không nhận được email xác thực?":"Didn't receive the verification email?","Gửi lại email":"Resend Email","Gửi lại thành công":"Resend successful"}},domain:"."+defaultDomain,prefix_cookie:"myvne_",static_url:"https://s1.vnecdn.net/myvne",myvne_url:location.hostname.indexOf("beta-")>-1||location.hostname.indexOf("dev.")>-1||location.hostname.indexOf("beta-e")>-1||location.hostname.indexOf("beta.")>-1||location.hostname.indexOf("demo-")>-1||location.hostname.indexOf("demo.")>-1||location.hostname.indexOf("demo-my.")>-1||location.hostname.indexOf("redesign.")>-1||location.hostname.indexOf("staging-e.vnexpress")>-1||location.hostname.indexOf("alpha-e.vnexpress")>-1?"https://demo-my."+defaultDomain:"https://my."+defaultDomain,vne_url:"https://"+defaultDomain,profile:{},notifycount:0,notifylimit:10,notifyoffset:0,windowWidth:0,taskbarload:{not_login:0,profile:0},listenloaded:0,timeoutprofile:"",timeoutClose:"",config:{},options:{taskbar:!0,type:"popup"},runloaded:0,callback:"",notify_max_time:0,callbackAction:{},divposition:"body",fullname:null,action:null,return_code:null,message:null,oauth_type:null,time_now:(new Date).getTime(),check_responsive:0,login_method:null,busy_get_profile:!1,trackingSite:function(){return window.location.href.includes("//e.vnexpress.net")||window.location.href.includes("//staging-e.vnexpress.net/")?"eVne":"Vne"},cookieNameByHost:function(e){if("string"==typeof e&&""!=e){var t=location.host.match(/([^.]*)\.net/)||location.host.match(/([^.]*)\.com/);t.length>0&&"vnexpress"!=t[1]&&(e+="_"+t[1])}return e},translate:function(e){return this.dictionary[this.language]&&this.dictionary[this.language][e]||e},setCallback:function(e,t){var n=this.callbackAction;return n[e]?-1==n[e].indexOf(t)&&n[e].push(t):n[e]=[t],this.callbackAction=n,"setcallback ok"},unsetCallback:function(e,t){var n=this.callbackAction;if(n[e]){if("authen"==e)return delete n[e];var o=n[e].indexOf(t);-1!=o&&n[e].splice(o,1)}return!1},processCallback:function(e,t){var n=this;"object"==typeof e&&$.each(e,(function(e,o){n.processCallback(o,t)}));var o=this.callbackAction;return o[e]&&$.each(o[e],(function(o,i){"authen"==e&&n.callbackAction[e].splice(o,1),n.runcallback(i,t)})),!1},addScripts:function(e,t,n,o){var i=document.createElement("script");i.type=void 0===o?"text/javascript":o,i.src=e,i.async=t,i.onload=function(){i.setAttribute("loaded","loaded"),"function"==typeof n&&n()},document.getElementsByTagName("head")[0].append(i)},getUrlParameter:function(e){var t,n,o=window.location.search.substring(1).split("&");for(n=0;n0){var a=parseInt($('[name="tt_site_id"]').attr("content")),s=$('[name="tt_category_id"]').length>0?parseInt($('[name="tt_category_id"]').attr("content")):a,r=$('[name="tt_article_id"]').length>0?parseInt($('[name="tt_article_id"]').attr("content")):0;o=o.charAt(0).toUpperCase()+o.slice(1),dataLayer.push({event:"MyVNE "+o,site_id:a,folder_id:s,article_id:r,myvne_user_id:i,device_platform:device_env,myvne_action:"join",myvne_from:"onetap",referrer_url:n}),myvne_users.syncWP("login"),""!=n&&setTimeout((function(){window.location.href=n}),800)}}else{var l=this.options;this.options=$.extend(!0,l,e||{});window.location.href.includes("demo."+defaultDomain);this._responsive(),this._check_javascript_exist(),(i=parseInt(this.getCookie("user_id")))?this.getprofile_v2():(this._html_taskbar_not_login(),this.processCallback("not_login",{type:1}),this.onetap(),"undefined"!=typeof sendo_smart_buy&&!0===sendo_smart_buy&&SendoEmbedApp.receiver("SendoExternalLogin",(()=>{myvne_users._html_popup_login()}))),this._listener_basic()}if(void 0!==this.openid&&1==+this.openid){var c=this,m=c.getUrlParameter("email"),p=c.getUrlParameter("match_key");setTimeout((function(){c._html_popup_login(m,p)}),1e3),window.history.replaceState(!1,!1,location.href.replace(location.search,""))}"undefined"!=typeof sendo_smart_buy&&!0===sendo_smart_buy&&SendoEmbedApp.receiver("SendoExternalLogout",(()=>{myvne_users.logout()}))},syncWP:function(e){"undefined"!=typeof vneNotify&&("login"===e?setTimeout((function(){vneNotify.loginSubscriber(myvne_users.getCookieWitoutPrefix("orig_aid"),myvne_users.getCookieWitoutPrefix(myvne_users.cookieNameByHost("myvne_user_id"))),console.log("Push WP Login")}),2e3):"logout"===e&&(vneNotify.logoutSubscriber(myvne_users.getCookieWitoutPrefix("orig_aid")),console.log("Push WP Logout")))},onetap:function(){var e=this,t=encodeURIComponent(location.href.replace(/#.*?$/,""));t=e.isValidXSS(t)?t:encodeURIComponent(location.origin+location.pathname);var n='data-event-category="Article Link Display" data-event-action="Box-Google_Singin" data-event-label="Item-0" data-event-site="'+e.trackingSite()+'"',o=parseInt($('[name="tt_site_id"]').attr("content")),i=$('[name="tt_category_id"]').length>0?parseInt($('[name="tt_category_id"]').attr("content")):o,a=$('[name="tt_article_id"]').length>0?parseInt($('[name="tt_article_id"]').attr("content")):0;n+=' data-host="'+window.location.host+'" data-r_siteid="'+o+'" data-r_folderid="'+i+'" data-r_articleid="'+a+'"',$("body").append('
'),e.addScripts("https://accounts.google.com/gsi/client",!1)},_responsive:function(){this.windowWidth=$(window).width()},getProfileData:function(e=null){var t=this;return new Promise((function(e){try{var n=t.getCookie("user_id");if(null!=n&&parseInt(n)>0){var o=setInterval((function(){Object.keys(t.profile).length>0&&(clearInterval(o),e(t.profile))}),50);setTimeout((function(){clearInterval(o),e(t.profile)}),5e3)}else e(t.profile)}catch(n){e(t.profile)}})).then((function(n){"function"==typeof e&&t.runcallback(e,n)})),t.profile},getprofile:function(){var e=this,t="undefined"!=typeof ZONE_ADS?parseInt(ZONE_ADS):0;if(e.profile.user_fullname&&e.profile.user_id)return e.profile;var n=e.getCookie("user_id")+e.getCookie("just_updated");$.ajax({type:"get",dataType:"jsonp",data:n?{_:btoa(n).split("").reduce((function(e,t){return 0|(e=(e<<5)-e+t.charCodeAt(0))}),0),user_id:e.getCookie("user_id")}:{},cache:!1,jsonpCallback:"MyvneCallback",url:e.myvne_url+"/authen/users/profile?global_env="+t,success:function(n){if(0==n.error){"undefined"!=typeof sendo_smart_buy&&!0===sendo_smart_buy&&SendoEmbedApp.postMessage("SendoLoginCallback",{extra:{userId:n.profile.user_id,status:n.profile.status},authCode:n.profile.user_session});var o="object"==typeof n.profile?n.profile:{};void 0!==o.user_avatar&&1==t&&(o.user_avatar=o.user_avatar.replace("a.vnecdn.net","vcdn-a.vnecdn.net"),o.user_avatar_original=o.user_avatar_original.replace("a.vnecdn.net","vcdn-a.vnecdn.net")),e.notifycount=n.count_notify,e.profile=o;var i=localStorage.getItem("myvne_settings"),a=i?JSON.parse(i):null;if(null==a)void 0===o.settings||"string"!=typeof o.settings&&"object"!=typeof o.settings||e.updateSettings_v2(o.settings,!0);else if("string"==typeof o.settings&&(o.settings=JSON.parse(o.settings)),o.settings&&o.settings.version&&(!a.version&&o.settings.version>0||a.version&&o.settings.version>a.version))e.updateSettings_v2(o.settings,!0);else{var s=o?.settings?.my_news;null===localStorage.getItem("my_news_generate_key")&&s&&s.length>0&&e.get_key_my_news(o.settings)}if("onetap"==e.login_method&&"/myvne"==window.location.pathname&&o.settings&&o.settings.my_news&&o.settings.my_news.length>0&&(window.location.href="/myvne/chu-de"),e.profilecallback(),null!=e.getCookie("social_id"))var r=e.getCookie("social_id").split("%2C");if(e.deleteCookie("social_id"),null!=e.oauth_type)(window._logAdp||[]).push({action:e.oauth_type,regis_on:window.location.origin,my_vne:o.user_id,vne_avatar:o.user_avatar,vne_email:o.user_email,vne_phone:o.mobile||"",vne_name:o.user_fullname||"",vne_gender:o.sex||0,vne_age:o.age,vne_birthday:o.date_of_birth,vne_city:o.city,vne_dist:o.district,vne_address:o.address,login_type:o.user_login_type,facebook_id:r[0]||"",google_id:r[1]||""});var l=setInterval((function(){$("#myvne_notify_lists").length>0&&(clearInterval(l),e._get_notify(!0))}),100);if(setTimeout((function(){clearInterval(l)}),3e3),void 0!==n.profile.email_hash&&void 0!==n.profile.phone_hash){var c={emailHash:n.profile.email_hash,phoneHash:n.profile.phone_hash};localStorage.setItem("ads_ss:uid2",JSON.stringify(c))}}else"not_login"==n.rev&&e._reset_user();e.processCallback("profile",e.profile)},error:function(e,t){console.log(e,t),setTimeout((function(){myvne_users.getprofile()}),1e3)}});var o="undefined"!=typeof sessionStorage?parseInt(sessionStorage.getItem("myvne_check_user_online")):NaN;(isNaN(o)||Math.floor(Date.now()/1e3)-900>=o)&&$.ajax({type:"get",dataType:"jsonp",url:e.myvne_url+"/authen/users/updateusersession",jsonpCallback:"MyvneCallback",success:function(e){0==e.error&&"undefined"!=typeof sessionStorage&&sessionStorage.setItem("myvne_check_user_online",Math.floor(Date.now()/1e3))},error:function(e,t){console.log(e,t)}})},getprofile_v2:function(){var e=this,t="undefined"!=typeof ZONE_ADS?parseInt(ZONE_ADS):0;if(e.profile.user_fullname&&e.profile.user_id)return e.profile;if(!e.busy_get_profile){e.busy_get_profile=!0,$.ajax({type:"post",dataType:"json",url:e.myvne_url+"/authen/users/profilev2?global_env="+t,xhrFields:{withCredentials:!0},success:function(n){if(0==n.error){"undefined"!=typeof sendo_smart_buy&&!0===sendo_smart_buy&&SendoEmbedApp.postMessage("SendoLoginCallback",{extra:{userId:n.profile.user_id,status:n.profile.status},authCode:n.profile.user_session});var o="object"==typeof n.profile?n.profile:{};void 0!==o.user_avatar&&1==t&&(o.user_avatar=o.user_avatar.replace("a.vnecdn.net","vcdn-a.vnecdn.net"),o.user_avatar_original=o.user_avatar_original.replace("a.vnecdn.net","vcdn-a.vnecdn.net")),e.notifycount=n.count_notify,e.profile=o;var i=localStorage.getItem("myvne_settings"),a=i?JSON.parse(i):null;if(null==a)void 0===o.settings||"string"!=typeof o.settings&&"object"!=typeof o.settings||e.updateSettings_v2(o.settings,!0);else if("string"==typeof o.settings&&(o.settings=JSON.parse(o.settings)),o.settings&&o.settings.version&&(!a.version&&o.settings.version>0||a.version&&o.settings.version>a.version))e.updateSettings_v2(o.settings,!0);else{var s=o?.settings?.my_news;null===localStorage.getItem("my_news_generate_key")&&s&&s.length>0&&e.get_key_my_news(o.settings)}if("onetap"==e.login_method&&"/myvne"==window.location.pathname&&o.settings&&o.settings.my_news&&o.settings.my_news.length>0&&(window.location.href="/myvne/chu-de"),e.profilecallback(),null!=e.getCookie("social_id"))var r=e.getCookie("social_id").split("%2C");if(e.deleteCookie("social_id"),null!=e.oauth_type)(window._logAdp||[]).push({action:e.oauth_type,regis_on:window.location.origin,my_vne:o.user_id,vne_avatar:o.user_avatar,vne_email:o.user_email,vne_phone:o.mobile||"",vne_name:o.user_fullname||"",vne_gender:o.sex||0,vne_age:o.age,vne_birthday:o.date_of_birth,vne_city:o.city,vne_dist:o.district,vne_address:o.address,login_type:o.user_login_type,facebook_id:r[0]||"",google_id:r[1]||""});var l=setInterval((function(){$("#myvne_notify_lists").length>0&&(clearInterval(l),e._get_notify(!0))}),100);if(setTimeout((function(){clearInterval(l)}),3e3),void 0!==n.profile.email_hash&&void 0!==n.profile.phone_hash){var c={emailHash:n.profile.email_hash,phoneHash:n.profile.phone_hash};localStorage.setItem("ads_ss:uid2",JSON.stringify(c))}}else"not_login"==n.rev&&e._reset_user();e.busy_get_profile=!1,e.processCallback("profile",e.profile)}});var n="undefined"!=typeof sessionStorage?parseInt(sessionStorage.getItem("myvne_check_user_online")):NaN;(isNaN(n)||Math.floor(Date.now()/1e3)-900>=n)&&$.ajax({type:"get",dataType:"jsonp",url:e.myvne_url+"/authen/users/updateusersession",jsonpCallback:"MyvneCallback",success:function(e){0==e.error&&"undefined"!=typeof sessionStorage&&sessionStorage.setItem("myvne_check_user_online",Math.floor(Date.now()/1e3))},error:function(e,t){console.log(e,t)}})}},profilecallback:function(){this._set_user(),$("#myvne_action_log").hide()},logout:function(){var e=this,t=function(){$.ajax({type:"post",dataType:"jsonp",url:e.myvne_url+"/authen/users/logout",data:{userid:e.user_id,count:1,dist:myvne_users.myvne_url,return:window.location.href},success:function(t){0==t.error?(e.clearSettings(),localStorage.setItem("myvne_onetap",Math.floor(Date.now()/1e3)),e._reset_user(),e.deleteCookie("user_id"),sessionStorage.removeItem("myvne_check_user_online"),e.processCallback("logout",t),$(".message_box").length>0&&($(".message_box").remove(),localStorage.setItem(myvne_users.cookieNameByHost("myvne_tmp_notify"),1)),"undefined"!=typeof myvne_plugins&&void 0!==myvne_plugins.initButton&&myvne_plugins.initButton(),"undefined"!=typeof dataLayer&&dataLayer.push({event:"userEvent",user_action:"User Logout",user_signup_method:"Email"}),(window._logAdp||[]).push({action:"logout",regis_on:location.origin}),myvne_users.syncWP("logout"),location.hostname.indexOf("my.vnexpress.net")>-1?location.pathname.indexOf("/en/")>-1?location.href="https://e.vnexpress.net/":location.href="https://vnexpress.net/":location.href=t.url_redirect):alert(t.message)},error:function(t,n){alert(e._get_message("system_error"))}})},n=localStorage.getItem("myvne_settings")||{};"string"==typeof n&&(n=JSON.parse(n));var{my_news:o}=n;return isDomainAllowToken&&void 0!==o&&(""===o||Array.isArray(o))?(Array.isArray(o)&&0==o.length&&(o=""),myvne_users.updateSettings_v2({my_news:o},!1,(function(){t()}))):t(),!1},_check_javascript_exist:function(){},set_time_topbar:function(){var e=new Date,t=new Array(7);t[0]="Chủ nhật",t[1]="Thứ hai",t[2]="Thứ ba",t[3]="Thứ tư",t[4]="Thứ năm",t[5]="Thứ sáu",t[6]="Thứ bảy";var n=t[e.getDay()],o=new Date,i=o.getDate(),a=o.getMonth()+1;o.getHours(),o.getMinutes();return n+", "+i+"/"+a+"/"+o.getFullYear()},_html_taskbar_not_login:function(){var e=this,t=this.set_time_topbar();if(!$("#myvne_taskbar").length)return!1;isIone?($("#myvne_taskbar").html('
'),0==e.taskbarload.not_login&&($("#myvne_taskbar").on("click",".myvne_login_button",(function(){e._html_popup_login()})),e.taskbarload.not_login=1)):(isVNE?e.block_notify_vne.init():($("#myvne_taskbar").html('
'+e.translate("Đăng nhập")+"
"),isMyVne&&($(".time-now").html(t),$("#logoVneHeader").html('VNExpress'))),0==e.taskbarload.not_login&&($("#myvne_taskbar").on("click",".myvne_login_button",(function(){e._html_popup_login()})),e.taskbarload.not_login=1))},_notify_replace_url:function(){"beta.vnexpress.net"===location.host&&$("#myvne_notify_lists .myvne_nofify_item:not(.link_replaced)").each((function(){var e=$(this);e.find("a").each((function(){$(this).removeAttr("onclick");var t=$(this).attr("href"),n=t.split("/");if(t.indexOf("//vnexpress.net/")>-1&&t.indexOf(".html")>-1){var o="https://beta.vnexpress.net/"+n.pop();e.addClass("link_replaced"),$(this).attr("href",o)}}))}))},_get_notify_count:0,_get_notify:function(e=!1){var t=this;isVrace||isMyVne||isVNE||$.ajax({type:"get",dataType:"jsonp",cache:!0,jsonpCallback:"MyvneCallback",data:{offset:t.notifyoffset,limit:t.notifylimit},url:t.myvne_url+"/authen/users/notify",success:function(n){if(0==n.error){t.notifyoffset=t.notifyoffset+t.notifylimit,$("#myvne_notify_lists .ss-content").length&&t._get_notify_count>0?($("#myvne_notify_lists .ss-content").append(n.html),t._notify_replace_url()):n.html.indexOf(t.translate("Bạn chưa có hoạt động bình luận nào trên VnExpress"))>-1?($("#myvne_notify_lists").css("height","auto"),$("#myvne_notify_lists").append('
  • '+t.translate("Bạn chưa có hoạt động bình luận nào trên VnExpress")+"
  • ")):($("#myvne_notify_lists").append(n.html),t._notify_replace_url()),$("#myvne_notify_count").remove(),$("#myvne_notify_lists").find(".myvne_loading").remove(),1==n.viewmore?($("#myvne_notify_viewmore_area").show(),$("#myvne_loading_viewmore").hide(),$("#myvne_notify_viewmore").show()):$("#myvne_notify_viewmore_area").remove(),t._get_notify_count++,$("#myvne_notify_lists").find(".myvne_nofify_item").find("a").length>0&&$("#myvne_notify_lists").find(".myvne_nofify_item").find("a").on("click",(function(e){e.preventDefault();var n=$(this).attr("data-id"),o=$(this).attr("href");n&&$.ajax({type:"get",dataType:"jsonp",data:{notify_id:n},url:t.myvne_url+"/authen/users/changenotifystatus",success:function(e){t._redirect(o)},error:function(){console.log(t._get_message("system_error"))}})})),!0===e&&t.checkNewNotify()}},error:function(e,n){console.log(t._get_message("system_error"))}})},_html_taskbar_profile:function(){var e=this,t=this.set_time_topbar();if(!$("#myvne_taskbar").length||"object"!=typeof e.profile||null==e.profile.user_avatar||void 0===e.profile.user_avatar)return!1;var n=e.profile.user_avatar.indexOf("/src/")>10?this.replaceAvatar(e.profile.user_avatar,"/c60x60/"):e.profile.user_avatar,o=e.profile.user_email.substring(0,e.profile.user_email.lastIndexOf("@"));if(e.fullname?o=e.fullname:e.profile.user_fullname&&e.profile.user_fullname.length>0&&(o=e.profile.user_fullname),n.indexOf("/img_60x60.gif")>0)var i=o.charAt(0);else i='';e.fullname=null;var a=e.myvne_url+("vi"==e.language?"/users/feed/":"/en/users/feed/")+e.profile.user_id,s=e.myvne_url+("vi"==e.language?"/users/tin-da-luu":"/en/users/saved-articles"),r=e.myvne_url+("vi"==e.language?"/users/tin-da-doc":"/en/users/reading-history"),l=e.myvne_url+("vi"==e.language?"/users/chi-tiet-tai-khoan":"/en/users/my-account"),c=e.myvne_url+("vi"==e.language?"/subscription/manage":"/en/subscription/manage"),m='
    ',$("#myvne_taskbar").html(m),$("#fEmail").length&&($("#fEmail").val(e.profile.user_email),$("#fName").val(e.profile.user_fullname)),isMyVne&&($(".time-now").html(t),$("#logoVneHeader").html('VNExpress')),0==e.taskbarload.profile&&($("#myvne_taskbar").on("click","#myvne_logout_link",(function(){e.logout()})),$("#myvne_taskbar").on("click","#myvne_avatar_taskbar",(function(){$("#myvne_notify_box").hide(),$(".myvne_user_status").toggle()})),$(document).click((function(e){0==$(e.target).parents(".myvne_user").length&&0==$(e.target).parents(".myvne_user_status").length&&$(".myvne_user_status").hide()})),$("#myvne_taskbar").on("click",".myvne_icon_bell_click",(function(){$("#myvne_profile_tool").find(".myvne_user_status").hide(),"none"!==$("#myvne_notify_box").css("display")?($("#myvne_notify_box").hide(),$(this).parent().removeClass("active")):($("#myvne_notify_box").show(),$(this).parent().addClass("active"),($("#myvne_notify_lists").find(".myvne_loading").length||$("#myvne_notify_count").length)&&e._get_notify()),$("#myvne_notify_area").length>0&&e.updateStatusNewNotify()})),$("#myvne_taskbar").on("click","#myvne_notify_viewmore",(function(){$("#myvne_notify_viewmore").hide(),$("#myvne_loading_viewmore").show(),e._get_notify()})),e.taskbarload.profile=1)},_listener_basic:function(){var e=this;if(1==e.listenloaded)return!1;e.listenloaded=1;var t=function(t){if(isVrace||"https://my.vnexpress.net"==t.origin||"https://demo-my.vnexpress.net"==t.origin){var n=t.data;switch(n){case"success":break;case"close":$.magnificPopup.close(),$("#iframe_register").length>0&&$("#iframe_register").remove();break;default:try{if(void 0!==(n=JSON.parse(n)).callback&&"login"==n.callback&&void 0!==n.profile&&"object"==typeof n.profile){e.login(n);break}}catch(t){}if(1==n.success&&void 0!==n.callback)switch(!0===n.layout_2024&&e.removeCss("myvne_2019.css"),n.callback){case"subscribe":case"changepassword":case"forgotpass":case"resendactiveemail":case"resetpassword":e._html_popup_success(n.message,n.title);break;case"register":e.login(n),void 0!==e.callbackAction.authen?$.magnificPopup.close():void 0!==n.url_redirect?e._html_popup_success(n.message,n.title,(function(){location.href=n.url_redirect})):e._html_popup_success(n.message,n.title),e.deleteCookie("tmp_notify"),localStorage.removeItem(myvne_users.cookieNameByHost("myvne_tmp_notify")),e.deleteCookie("expired_notify"),e.deleteCookie("count_notify"),localStorage.removeItem(myvne_users.cookieNameByHost("myvne_count_notify")),setTimeout((function(){e._html_notify_confirm_email()}),3e4);break;case"register_2024":e._html_popup_close(),$.magnificPopup.open({items:{src:n.email_active_form,type:"inline",mainClass:"mfp-with-zoom mfp-myvne"},callbacks:{open:function(){$(".mfp-content").css({"min-height":"610px","max-width":"420px"}),$(document).on("click",".open-gmail",(function(){var e=$(this);window.open(e.attr("data-link"),"_blank")})),$(document).on("click","#resendemail_2024",(function(){var t=$(this);t.removeAttr("id"),t.html(`${e.translate("Gửi lại email")}`),$.ajax({type:"post",dataType:"json",url:e.myvne_url+"/authen/users/resendemail",data:{myvne_email:n.profile.user_email},xhrFields:{withCredentials:!0},success:function(n){0==n.error&&(t.html(`${e.translate("Gửi lại thành công")}!`),setTimeout((function(){t.attr("id","resendemail_2024").html(`\n \n \n \n ${e.translate("Gửi lại email")}\n `)}),15e3))},error:function(){}})}))}}});break;case"login_2024":e._html_popup_close(),location.href=n.url_redirect;break;case"new_password_2024":e._html_popup_close(),$.magnificPopup.open({items:{src:n.success_new_password_form,type:"inline",mainClass:"mfp-with-zoom mfp-myvne"},callbacks:{open:function(){$(".mfp-content").css({"min-height":"610px","max-width":"420px"}),$("#myvne_forgotpassword .close_success_new_password").click((function(){e._html_popup_close()}))},close:function(){location.href=n.url_redirect}}});break;default:return e[n.callback](n)}else if(n.refer)switch(n.refer){case"profile":e.profile=n.profile,e._set_user();break;case"login":e._reset_user()}else if(n.error){var o='

    '+n.message+"

    ";e._html_popup_success(o,n.title)}}}};window.addEventListener?window.addEventListener("message",t,!1):window.attachEvent&&window.attachEvent("onmessage",t)},resetpassword:function(e){this._html_popup_success(e.message,this.vne_url)},_html_popup_reset_password:function(e,t){if(!t||!e)return!1;return $.magnificPopup.open({type:"iframe",iframe:{markup:'
    '},items:{src:this.myvne_url+"/authen/users/resetpassword?userid="+e+"&tokenkey="+t,type:"iframe"},mainClass:"mfp-with-zoom mfp-myvne"}),!1},login:function(e){var t=this;if(window.myvne_new_register=null!=e.callback&&"register"==e.callback,null!=t.getCookie("social_id"))var n=t.getCookie("social_id").split("%2C");t.deleteCookie("social_id");var o=null;if("login"==e.callback){if(void 0!==e.profile.login_myvne&&1==e.profile.login_myvne)t.profile=e.profile.profile,t.notifycount=void 0!==t.profile.count_notify?t.profile.count_notify:0;else{if(void 0!==e.profile.login_otp&&1==e.profile.login_otp)return void $(".mfp-content").attr("style","min-height: 610px;max-width: 460px;");t.profile="object"==typeof e.profile?e.profile:{},t.notifycount=void 0!==t.profile.count_notify?t.profile.count_notify:0}o=function(){setTimeout((function(){myvne_users._get_notify(!0)}),800)}}else t.profile=e.profile,t.notifycount=e.count_notify;if(t.profilecallback(),$.magnificPopup.close(),setTimeout((function(){t._html_notify_confirm_email()}),3e3),$("#myvne_create_account").length>0&&$("#myvne_create_account").remove(),"undefined"!=typeof myvne_plugins&&(myvne_plugins.checking=0,myvne_plugins.check()),t.processCallback(["login","authen"],t.profile),user_signup_method="Email",5===t.profile.user_login_type&&(user_signup_method="Facebook"),6===t.profile.user_login_type&&(user_signup_method="Gmail"),"undefined"!=typeof dataLayer&&dataLayer.push({event:"userEvent",user_action:"User Login",user_signup_method:user_signup_method,user_id:e.profile.user_id}),1===e.success&&"register"==e.callback&&e.profile.user_id)(window._logAdp||[]).push({action:"register",regis_on:window.location.origin,my_vne:e.profile.user_id,vne_avatar:e.profile.user_avatar,vne_email:e.profile.user_email,vne_phone:e.profile.mibile||"",vne_name:e.profile.user_fullname||"",vne_gender:e.profile.sex||0,vne_age:e.profile.age,vne_birthday:e.profile.date_of_birth,vne_city:e.profile.city,vne_dist:e.profile.district,vne_address:e.profile.address,login_type:e.profile.user_login_type,facebook_id:void 0!==n&&void 0!==n[0]?n[0]:"",google_id:void 0!==n&&void 0!==n[1]?n[1]:""});else if(void 0!==e.adp&&void 0!==e.adp.my_vne){(window._logAdp||[]).push({action:e.adp.action,regis_on:window.location.origin,my_vne:e.adp.my_vne,vne_avatar:e.adp.vne_avatar,vne_email:e.adp.vne_email,vne_phone:e.adp.vne_phone||"",vne_name:e.adp.vne_name||"",vne_gender:e.adp.vne_gender||0,vne_age:e.adp.vne_age,vne_birthday:e.adp.vne_birthday,vne_city:e.adp.vne_city,vne_dist:e.adp.vne_dist,vne_address:e.adp.vne_address,login_type:e.profile.user_login_type,facebook_id:void 0!==n&&void 0!==n[0]?n[0]:"",google_id:void 0!==n&&void 0!==n[1]?n[1]:""})}"undefined"!=typeof sendo_smart_buy&&!0===sendo_smart_buy&&SendoEmbedApp.postMessage("SendoLoginCallback",{extra:{userId:e.profile.user_id,status:e.profile.status},authCode:e.profile.user_session}),myvne_users.syncWP("login"),isMyVne&&(1==window.myvne_new_register?setTimeout((function(){$.magnificPopup.instance.close=function(){location.reload()}}),3e3):location.reload()),o&&"function"==typeof o&&o(),"function"==typeof window.refresh_settings&&window.refresh_settings(t.profile),void 0===myvne_users.callbackAction.authen&&void 0===myvne_users.callbackAction.login&&location.reload()},guestpost:function(e){var t=this;t.profile=e.profile,$.magnificPopup.close(),t.processCallback("authen",t.profile)},isValidXSS:function(e){var t=!0;if(e)for(var n=["onbeforecopy","onbeforecut","onbeforepaste","oncopy","oncut","oninput","onkeydown","onkeypress","onkeyup","onpaste","textInput","onabort","onbeforeunload","onhashchange","onload","onoffline","ononline","onreadystatechange","onstop","onunload","onreset","onsubmit","onclick","oncontextmenu","ondblclick","onlosecapture","onmouseenter","onmousedown","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onscroll","onmove","onmoveend","onmovestart","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","onresize","onresizeend","onresizestart","onactivate","onbeforeactivate","onbeforedeactivate","onbeforeeditfocus","onblur","ondeactivate","onfocus","onfocusin","onfocusout","oncontrolselect","onselect","onselectionchange","onselectstart","onafterprint","onbeforeprint","onhelp","onerror","onerrorupdate","onafterupdate","onbeforeupdate","oncellchange","ondataavailable","ondatasetchanged","ondatasetcomplete","onrowenter","onrowexit","onrowsdelete","onrowsinserted","onbounce","onfinish","onstart","onchange","onfilterchange","onpropertychange","onsearch","onmessage","CheckboxStateChange","DOMActivate","DOMAttrModified","DOMCharacterDataModified","DOMFocusIn","DOMFocusOut","DOMMouseScroll","DOMNodeInserted","DOMNodeInsertedIntoDocument","DOMNodeRemoved","DOMNodeRemovedFromDocument","DOMSubtreeModified","dragdrop","dragexit","draggesture","overflow","overflowchanged","RadioStateChange","underflow","FSCommand","onAbort","onActivate","onAfterPrint","onAfterUpdate","onBeforeActivate","onBeforeCopy","onBeforeCut","onBeforeDeactivate","onBeforeEditFocus","onBeforePaste","onBeforePrint","onBeforeUnload","onBeforeUpdate","onBegin","onBlur","onBouncewindow","onCellChange","onChange","onClick","onContextMenu","onControlSelect","onCopy","onCut","onDataAvailable","onDataSetChanged","onDataSetComplete","onDblClick","onDeactivate","onDrag","onDragEnd","onDragLeave","onDragEnter","onDragOver","onDragDrop","onDragStart","onDrop","onEnd","onError","onErrorUpdate","onFilterChange","onFinish","onFocus","onFocusIn","onFocusOut","onHashChange","onHelp","onInput","onKeyDown","onKeyPress","onKeyUp","onLayoutComplete","onLoad","onLoseCapture","onMediaComplete","onMediaError","onMessage","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onMouseWheel","onMove","onMoveEnd","onMoveStart","onOffline","onOnline","onOutOfSync","onPaste","onPause","onPopState","onProgress","onPropertyChange","onReadyStateChange","onRedo","onRepeat","onReset","onResize","onResizeEnd","onResizeStart","onResume","onReverse","onRowsEnter","onRowExit","onRowDelete","onRowInserted","onScroll","onSeek","onSelect","onSelectionChange","onSelectStart","onStart","onStop","onStorage","onSyncRestored","onSubmit","onTimeError","onTrackChange","onUndo","onUnload","onURLFlip","seekSegmentTime","behavior","xss:expression","javascript","alert","