!function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}var i=n(1),o=r(i),a=n(54),u=r(a),s=n(61),c=r(s),l=n(63),f=r(l),d=n(64),p=r(d),h=n(65),v=r(h),g=n(66),m=n(73),y=r(m),b=n(74),w=r(b),x=n(99),_=n(100),C=r(_),A=n(102),k=r(A),T=(0,x.getFormatWebpFn)();(0,f.default)(function(){function e(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:location.href,t=(0,f.default)(".open-app").data("link"),n="";if(/test\.myoas\.net\/$|realme\.com\/$/.test(e)&&(e+="/cn/"),-1!==location.href.indexOf("/goods/")){var r=s.getUrl(window.location.href),i=r.inviteId;n="redirectType=3&resource="+window.location.pathname.match(/\d+/g)[0]+"&extra="+(0,c.default)({inviteId:i})}if(/android/i.test(navigator.userAgent||navigator.vendor||window.opera)){var o="store://com.realmestore.app/main?utmSource=h5store&utmCode=Top_download_button&utmPid=&"+n,a=document.createElement("iframe");a.style.display="none",a.src=o,document.body.appendChild(a);var u=Date.now();setTimeout(function(){!(document.hidden||document.mozHidden||document.msHidden||document.webkitHidden)&&Date.now()-u<2500&&(location.href=t)},2e3)}else location.href=t}function t(){switch(/(\w{2,}-\w{2,})|(\w{2,})/.exec(window.location.pathname)&&/(\w{2,}-\w{2,})|(\w{2,})/.exec(window.location.pathname)[0]||"cn"){case"cn":return"抱歉,暂只支持横屏浏览";case"id":return"Maaf, hanya mendukung dalam horizontal ";default:return"Sorry, only horizontal viewing is supported temporarily"}}function n(){s.setCookie("hadViewApp",!0,365),(0,f.default)(".toApp-header").slideUp(200),(0,f.default)("html").removeClass("header-app-visable")}var r=this;(0,p.default)();var i={scroll:function(){var e=(0,f.default)(window).scrollTop(),t=window.navigator.userAgent.toLowerCase();if(t.indexOf("realmestore")>-1||t.indexOf("x-businesssystem/realme")>-1)return void(0,f.default)(".header").hide();if(e>0){if((0,f.default)(".product-nav").length>0){(0,f.default)(".product-nav").addClass("fixed");(window.navigator.userAgent.indexOf("realmeLink")>-1||window.navigator.userAgent.indexOf("realmeCommunity")>-1||window.navigator.userAgent.indexOf("oppostore")>-1)&&(0,f.default)(".product-nav").css("top","0px"),(0,f.default)(window).width()>768?(0,f.default)(".header").hide():(0,f.default)(".header").show()}r.hadSetBg||(r.hadSetBg=!0),(0,f.default)(".header-main").addClass("header-scroll")}else(0,f.default)(".product-nav").removeClass("fixed"),(0,f.default)(".header").show(),i.showHeaderNotify(),r.hadSetBg=!1,(0,f.default)(".header-main").removeClass("header-scroll")},logoAnimate:function(){(0,f.default)(".logo-dist").addClass("animate"),(0,f.default)(".logo-src").addClass("animate")},logoAnimateRemove:function(){(0,f.default)(".logo-src").removeClass("animate"),setTimeout(function(){(0,f.default)(".logo-dist").removeClass("animate")},300)},login:!1,loginStatus:function(){var e="cn",t="https://www.realme.com/",n="https://api.realme.com/",r=window.location.href;r.indexOf("/in/")>=0&&(e="in"),r.indexOf("/id/")>=0&&(e="id"),r.indexOf("/es/")>=0&&(e="es"),r.indexOf("/it/")>=0&&(e="it"),r.indexOf("/eu/")>=0&&(e="eu"),r.indexOf("/uk/")>=0&&(e="uk"),r.indexOf("/fr/")>=0&&(e="fr"),r.indexOf("test2.myoas.net")>=0||r.indexOf("test2-buy.myoas.net")>=0||r.indexOf("test2-event.myoas.net")>=0?(t="https://test2.myoas.net/",n="https://test2-api.myoas.net/"):(r.indexOf("myoas.net")>0||r.indexOf("dev.")>0||r.indexOf("localhost")>0)&&(t="https://test.myoas.net/",n="https://test1-api.myoas.net/"),r.indexOf("pre-")>0&&(t="https://pre-3w.realme.com/",n="https://pre-api.realme.com/");var o=function(e){return e+"?cb="+encodeURIComponent(r)},a=o(t+e+"/login"),u=o(t+e+"/logout"),l=n+e+"/auth/login";"id"===e&&(l=n+e+"/login");var d="";d="cn"==e?"退出":"es"==e?"Cerrar sesión":"it"==e?"ESCI":"fr"==e?"Se déconnecter":"Logout",f.default.ajax({url:l,timeout:8e3,xhrFields:{withCredentials:!0},crossDomain:!0,type:"post",success:function(e){if(200===e.code){sessionStorage.setItem("userInfo",(0,c.default)(e.data)),(0,f.default)(".accountLogin").addClass("isLogin"),(0,f.default)(".accountLogin label").html(d);var t=(0,f.default)(".header-plus #user-avatar").attr("data-default");s.isMobile&&((0,f.default)("#mobile-login").css("display","none"),(0,f.default)("#mobile-account").css("display","block"),(0,f.default)("#mobile-account .user-avatar img").attr("src",e.data.avatarUrl||t),(0,f.default)("#mobile-account .user-name label").html(e.data.username)),(0,f.default)(".header-plus #plus-accountLogin").css("display","none"),(0,f.default)(".header-plus .user-avatar img").attr("src",e.data.avatarUrl||t),(0,f.default)(".header-plus .user-avatar").css("display","block"),(0,f.default)(".header-plus .user-name label").html(e.data.username),(0,f.default)(".user-info .accountLogin").css("display","none"),(0,f.default)(".header-item a").each(function(){var e=(0,f.default)(this).attr("data-href");(0,f.default)(this).attr("href",e)}),(0,f.default)("#account-cart")&&window.eventEmmiter.combineCart(),sessionStorage.setItem("securityToken",e.data.securityToken),window.gtmDataLayerPush&&window.gtmDataLayerPush({UserID:e.data.userId,LoginStatus:!0})}else 401===e.code&&((0,f.default)("#login-guide").addClass("visible"),s.isMobile&&((0,f.default)("#mobile-login").css("display","flex"),(0,f.default)("#mobile-account").css("display","none")))}}),(0,f.default)("#accountLogin, #plus-accountLogin").click(function(){(0,f.default)(".accountLogin").hasClass("isLogin")?window.location.href=u:window.location.href=a}),s.isMobile&&((0,f.default)("#mobile-login .mobile-login-btn").click(function(){window.location.href=a}),(0,f.default)("#mobile-account .head-item-logout").click(function(){window.location.href=u}));var p=n+e+"/product/spu/show/price";i.displaySpuPrice(p)},formatPrice:function(e){var t=/it|es|fr|eu/i,n=e.toString();return t.test(l)?n.replace(/\b(\.\d)\b/g,"$10").replace(/\./g,",").replace(/\B(?=(\d{3})+(?!\d))/g,"."):"id"===l?n.replace(/\B(?=(\d{3})+(?!\d))/g,"."):"cn"===l?n:n.replace(/\B(?=(\d{3})+(?!\d))/g,",")},getSpuPrice:function(e,t){f.default.ajax({url:e,timeout:8e3,xhrFields:{withCredentials:!0},data:(0,c.default)(t),crossDomain:!0,type:"POST",dataType:"json",contentType:"application/json; charset=utf-8",success:function(e){if(200===e.code){var t=e.data;(0,f.default)(".tag-product-price").map(function(e,n){var r=(0,f.default)(n).attr("data-id"),o=t[r];if(o){var a=o.minPrice,u=o.showPrice,s=i.formatPrice(a),c=i.formatPrice(u);(0,f.default)(n).text(s),u&&u>a&&(0,f.default)(n).siblings("del").show().find("span").text(c)}}),(0,f.default)(".nav-submenu-desc").map(function(e,n){var r=(0,f.default)(n).attr("data-id"),i=t[r];if(i){var o=i.shortDesc;(0,f.default)(n).text(o)}})}}})},displaySpuPrice:function(e){var t=[];(0,f.default)(".tag-product-price").map(function(e,n){var r=Number((0,f.default)(n).attr("data-id"));t.some(function(e){return e===r})||t.push(r)}),t.length&&this.getSpuPrice(e,{spuIdList:t})},showNavSubMenu:function(e){(0,f.default)(".nav-submenu").removeClass("visible"),(0,f.default)(".header-main").addClass("header-hover"),(0,f.default)(e).parent().find(".nav-submenu").addClass("visible"),f.default.each((0,f.default)(e).parent().find(".nav-submenu").find("img.nav-lazyload"),function(e,t){(0,f.default)(t).attr("src","function"==typeof T?T((0,f.default)(t).data("src")):(0,f.default)(t).data("src")).removeClass("nav-lazyload")})},removeNavSubMenu:function(){(0,f.default)(".nav-submenu").removeClass("visible"),(0,f.default)(".header-main").removeClass("header-hover"),(0,f.default)(".nav-submenu .submenu-tabs .secondary-menu").map(function(e,t){(0,f.default)(t).removeClass("visible"),0===e&&((0,f.default)(t).mouseover(),(0,f.default)(t).addClass("visible"))})},showAcount:function(){(0,f.default)(".header-account").addClass("visible"),i.removeNavMenu()},removeAccount:function(){(0,f.default)(".header-account").removeClass("visible")},showNavMenu:function(){console.log("showNavMenu"),(0,f.default)(".menu-fold").find(".icon-menu").addClass("icon-menu-open"),(0,f.default)(".nav").addClass("visible"),(0,f.default)(".nav-submenu-panel").addClass("visible"),(0,f.default)("header.header").css("z-index","15"),(0,f.default)(".header-main").addClass("header-hover"),i.removeAccount()},removeNavMenu:function(){(0,f.default)(".menu-fold").find(".icon-menu").removeClass("icon-menu-open"),(0,f.default)(".nav").removeClass("visible"),(0,f.default)(".nav-submenu").removeClass("visible"),(0,f.default)(".nav-submenu-panel").removeClass("visible"),(0,f.default)("header.header").css("z-index","11"),(0,f.default)(".header-main").removeClass("header-hover")},mobileListener:function(){(0,f.default)(".nav-group").on("click",function(){var e=(0,f.default)(this).parent().find(".nav-submenu"),t=(0,f.default)(this).find(".icon");(0,f.default)(e).hasClass("visible")?((0,f.default)(e).removeClass("visible"),(0,f.default)(t).removeClass("icon-rotate-180")):((0,f.default)(e).addClass("visible"),(0,f.default)(t).addClass("icon-rotate-180"),f.default.each((0,f.default)(this).parent().find(".nav-submenu").find("img.nav-lazyload"),function(e,t){(0,f.default)(t).attr("src","function"==typeof T?T((0,f.default)(t).data("src")):(0,f.default)(t).data("src")).removeClass("nav-lazyload")}))}),(0,f.default)(".menu-fold").on("click",function(){(0,f.default)(this).find(".icon-menu").hasClass("icon-menu-open")?(i.removeNavMenu(),(0,f.default)("#search-bar").hide(),(0,f.default)(".hot-search").hide(),(0,f.default)(".recommend-search").hide(),(0,f.default)(".search-input").val(""),s.isMobile&&(document.body.style.overflow="",document.body.style.height="")):i.showNavMenu()}),(0,f.default)(".submenu-container").on("click",function(e){e.target.scrollIntoView(!1);var t=(0,f.default)(this).find(".icon").hasClass("icon-rotate-180");(0,f.default)(this).siblings(".submenu-container-list").find(".icon").removeClass("icon-rotate-180"),(0,f.default)(this).siblings(".submenu-container-list").find("ul.secondary-products").removeClass("visible"),t?((0,f.default)(this).find(".icon").removeClass("icon-rotate-180"),(0,f.default)(this).find("ul.secondary-products").removeClass("visible")):((0,f.default)(this).find(".icon").addClass("icon-rotate-180"),(0,f.default)(this).find("ul.secondary-products").addClass("visible"))}),i.scroll(),(0,f.default)(window).scroll(i.scroll)},pcListener:function(){(0,f.default)(".nav-menu > li > a").on("mouseover",function(){(0,f.default)(this).hasClass("nav-group")?i.showNavSubMenu(this):i.removeNavSubMenu()}),i.scroll(),(0,f.default)(window).scroll(i.scroll),(0,f.default)(".nav").on("mouseleave",function(){i.removeNavSubMenu()}),(0,f.default)(".secondary-menu").mouseover(function(){var e=(0,f.default)(this).attr("data-index");(0,f.default)(this).siblings(".secondary-menu").removeClass("active"),(0,f.default)(this).addClass("active"),(0,f.default)(this).parent().siblings(".submenu-container-list").find(".submenu-container").map(function(t,n){var r=(0,f.default)(n).attr("data-menu")==e;(0,f.default)(n).removeClass("visible"),r&&(0,f.default)(n).addClass("visible")})}),(0,f.default)(".header-account-panel").on("mouseleave",function(){i.removeAccount()}),(0,f.default)(".logo").on("mouseover",function(){i.logoAnimate()}),(0,f.default)(".logo").on("mouseleave",function(){i.logoAnimateRemove()})},listen:function(){if(s.isMobile)i.mobileListener();else{i.pcListener(),i.horizontalScreenPrompt(),i.orientationchange(),(0,f.default)(".nav-user").on("mouseover, click",function(){(0,f.default)(".header-account").hasClass("visible")?i.removeAccount():i.showAcount()});var e="";(0,f.default)(".header-account").on("mouseover",function(){clearTimeout(e),i.showAcount()}),(0,f.default)(".header-plus #user-avatar").on("mouseover",function(){i.showAcount(),(0,f.default)(".header-account").addClass("plus-account-list")}),(0,f.default)(".header-plus #user-avatar, .header-account").on("mouseleave",function(){e=setTimeout(function(){i.removeAccount()},50)})}(0,f.default)(".mask").on("click",function(){(0,f.default)(".cookie-manage-container").removeClass("visible"),i.removeAccount(),(0,f.default)(".mask").removeClass("visible")}),(0,f.default)(".footer-region a").click(function(){(0,f.default)("body").css("overflow-y","hidden"),(0,f.default)(".region-select").addClass("visible")}),(0,f.default)(".region-select-close").click(function(){(0,f.default)("body").css("overflow-y","auto"),(0,f.default)(".region-select").removeClass("visible")}),(0,f.default)(".product-nav .product-nav-btn").click(function(){(0,f.default)("html,body").css("overflow-y","hidden"),(0,f.default)(".purchase-box").addClass("visible")}),(0,f.default)(".purchase-site-close-icon").click(function(){(0,f.default)("html,body").css("overflow-y","auto"),(0,f.default)(".purchase-box").removeClass("visible")}),(0,f.default)(".icon-notify-close").click(function(e){e.preventDefault(),(0,f.default)(".header-notify").slideUp(200),v.default.set("headerNotifyVisible",(0,f.default)(".header-notify").attr("href"),{expires:3})}),(0,f.default)(".icon-notify-container").click(function(e){e.preventDefault(),(0,f.default)(".header-notify").slideUp(200),v.default.set("headerNotifyVisible",(0,f.default)(".header-notify").attr("href"),{expires:3})})},init:function(){["/","/cn","/cn/","/cn/store","/cn/store/","/cn/store.html","/cn/store/index.html","/in","/in/","/in/store","/in/store/","/in/store.html","/in/store/index.html"].includes(location.pathname)||(0,f.default)(".header-main").removeClass("header-opactity")},showHeaderNotify:function(){if((0,f.default)(".header-notify")){var e=["https://www.realme.com","https://test.myoas.net","https://pre-3w.realme.com","http://localhost:3000"],t=(0,f.default)(".header-notify").data("start")||0,n=(0,f.default)(".header-notify").data("end")||0,r=t-new Date<0&&n-new Date>0&&("/"===window.location.href[location.href.length-1]&&e.includes(window.location.origin)||window.location.href.indexOf("/store")),i=v.default.get("headerNotifyVisible");if(console.log("headerNotifyVisible",i),i!==(0,f.default)(".header-notify").attr("href")&&r&&(0,f.default)(".header-notify").length>0&&-1==navigator.userAgent.toLowerCase().indexOf("realmestore")&&-1===navigator.userAgent.toLowerCase().indexOf("x-businesssystem/realme")&&-1==window.location.href.indexOf("buy")){(0,f.default)(".header-notify-bg")[0]?(window.innerWidth<769?(0,f.default)(".header-notify-bg.mobile").attr("src",(0,f.default)(".header-notify-bg.mobile").data("images")):(0,f.default)(".header-notify-bg.pc").attr("src",(0,f.default)(".header-notify-bg.pc").data("images")),(0,f.default)(".header-notify-bg").on("load",function(){(0,f.default)("html").addClass("header-notify-visible"),(0,f.default)(".header-notify").css("dispaly","inline")})):((0,f.default)("html").addClass("header-notify-visible"),(0,f.default)(".header-notify").css("dispaly","inline"))}}},horizontalScreenPrompt:function(){(0,f.default)("#horizontal-screen .horizontal-screen-tips").text(t()),window.addEventListener("orientationchange",function(){if(!s.isMobile){var e=(0,f.default)(window).width();(0===Math.abs(window.orientation)||180===Math.abs(window.orientation))&&e<1200?((0,f.default)("#horizontal-screen").addClass("fiexd"),(0,f.default)("body").addClass("horizontal-screen-fixed"),document.documentElement.addEventListener("touchstart",function(e){e.touches.length>1&&e.preventDefault()},{passive:!1}),document.documentElement.addEventListener("touchend",function(e){var t=Date.now();t-lastTouchEnd<=300&&e.preventDefault(),lastTouchEnd=t},{passive:!1})):((0,f.default)("#horizontal-screen").removeClass("fiexd"),(0,f.default)("body").removeClass("horizontal-screen-fixed"),document.documentElement.removeEventListener("touchstart",function(){},{passive:!1}),document.documentElement.removeEventListener("touchend",function(){},{passive:!1})),location.href=location.href}})},orientationchange:function(){if(!s.isMobile){var e=(0,f.default)(window).width();(0===Math.abs(window.orientation)||180===Math.abs(window.orientation))&&e<1200?((0,f.default)("#horizontal-screen").addClass("fiexd"),(0,f.default)("body").addClass("horizontal-screen-fixed"),document.documentElement.addEventListener("touchstart",function(e){e.touches.length>1&&e.preventDefault()},{passive:!1}),document.documentElement.addEventListener("touchend",function(e){var t=Date.now();t-lastTouchEnd<=300&&e.preventDefault(),lastTouchEnd=t},{passive:!1})):((0,f.default)("#horizontal-screen").removeClass("fiexd"),(0,f.default)("body").removeClass("horizontal-screen-fixed"),document.documentElement.removeEventListener("touchstart",function(){},{passive:!1}),document.documentElement.removeEventListener("touchend",function(){},{passive:!1}))}}},a={showSubMenu:function(e){(0,f.default)(e).parent().addClass("visible")},removeSubMenu:function(e){(0,f.default)(e).parent().removeClass("visible")},listen:function(){s.isMobile&&(0,f.default)(".footer-menu-title").click(function(){(0,f.default)(this).parent().hasClass("visible")?a.removeSubMenu(this):a.showSubMenu(this)})}},s={isMobile:(0,f.default)(window).width()<769,init:function(){s.listen(),i.loginStatus(),i.init(),s.informationdialog(),s.backTop()},stopBodyScroll:function(){(0,f.default)(".mask-untouch").hasClass("fixed")?(document.body.style.overflow="hidden",document.body.style.height="100%",document.body.style.top=0):(document.body.style.overflow="",document.body.style.height="")},dialogVideoPlay:function(e){var t='
';(0,f.default)("body").append(t),(0,f.default)(".dialog-video-container").find("video")[0].play(),(0,f.default)(".dialog-video-close").click(function(){(0,f.default)(".dialog-video").remove()})},listen:function(){},setCookie:function(e,t,n){var r="";if(n){var i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),r="; expires="+i.toUTCString()}var o="";o=-1===location.host.indexOf("realme.com")?";domain=.myoas.net; path=/":";domain=.realme.com; path=/",document.cookie=e+"="+(t||"")+r+o},getCookie:function(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r