var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(g){var n=0;return function(){return n>>0,$jscomp.propertyToPolyfillSymbol[a]=$jscomp.IS_SYMBOL_NATIVE? $jscomp.global.Symbol(a):$jscomp.POLYFILL_PREFIX+q+"$"+a),$jscomp.defineProperty(l,$jscomp.propertyToPolyfillSymbol[a],{configurable:!0,writable:!0,value:n})))};$jscomp.underscoreProtoCanBeSet=function(){var g={a:!0},n={};try{return n.__proto__=g,n.a}catch(q){}return!1}; $jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(g,n){g.__proto__=n;if(g.__proto__!==n)throw new TypeError(g+" is not extensible");return g}:null;$jscomp.generator={};$jscomp.generator.ensureIteratorResultIsObject_=function(g){if(!(g instanceof Object))throw new TypeError("Iterator result "+g+" is not an object");}; $jscomp.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null};$jscomp.generator.Context.prototype.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};$jscomp.generator.Context.prototype.stop_=function(){this.isRunning_=!1}; $jscomp.generator.Context.prototype.jumpToErrorHandler_=function(){this.nextAddress=this.catchAddress_||this.finallyAddress_};$jscomp.generator.Context.prototype.next_=function(g){this.yieldResult=g};$jscomp.generator.Context.prototype.throw_=function(g){this.abruptCompletion_={exception:g,isException:!0};this.jumpToErrorHandler_()};$jscomp.generator.Context.prototype.return=function(g){this.abruptCompletion_={return:g};this.nextAddress=this.finallyAddress_}; $jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(g){this.abruptCompletion_={jumpTo:g};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(g,n){this.nextAddress=n;return{value:g}};$jscomp.generator.Context.prototype.yieldAll=function(g,n){g=$jscomp.makeIterator(g);var q=g.next();$jscomp.generator.ensureIteratorResultIsObject_(q);if(q.done)this.yieldResult=q.value,this.nextAddress=n;else return this.yieldAllIterator_=g,this.yield(q.value,n)}; $jscomp.generator.Context.prototype.jumpTo=function(g){this.nextAddress=g};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0};$jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(g,n){this.catchAddress_=g;void 0!=n&&(this.finallyAddress_=n)};$jscomp.generator.Context.prototype.setFinallyBlock=function(g){this.catchAddress_=0;this.finallyAddress_=g||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(g,n){this.nextAddress=g;this.catchAddress_=n||0}; $jscomp.generator.Context.prototype.enterCatchBlock=function(g){this.catchAddress_=g||0;g=this.abruptCompletion_.exception;this.abruptCompletion_=null;return g};$jscomp.generator.Context.prototype.enterFinallyBlock=function(g,n,q){q?this.finallyContexts_[q]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=g||0;this.finallyAddress_=n||0}; $jscomp.generator.Context.prototype.leaveFinallyBlock=function(g,n){n=this.finallyContexts_.splice(n||0)[0];if(n=this.abruptCompletion_=this.abruptCompletion_||n){if(n.isException)return this.jumpToErrorHandler_();void 0!=n.jumpTo&&this.finallyAddress_>>0)+"_",l=0,a=function(c){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new n(q+(c||"")+"_"+l++,c)};return a},"es6","es3"); $jscomp.polyfill("Symbol.iterator",function(g){if(g)return g;g=Symbol("Symbol.iterator");for(var n="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),q=0;qq&&(q=Math.max(q+a,0));q");c>=k?k=c:c=k;l=n.pageX-l-c/2;n=n.pageY-a-k/2;isNaN(l)||isNaN(n)||$(".com-ripple").css({width:c,height:k,top:n+"px",left:l+"px"}).addClass("com-ripple-effect");this.timer&&clearTimeout(this.timer);this.timer=setTimeout(function(){$(".com-ripple").remove()},this.speed);if(q.hasClass("com-ripple-href"))return setTimeout(function(){window.location.href=q.find("a").attr("href")},200),!1}}.init()}); (function(g){"function"===typeof define&&define.amd?define("ui/lazyload",["lib/jquery"],g):g(window.jQuery||window.Zepto)})(function(g,n){function q(){}function l(m,p){return(p._$container==h?("innerHeight"in e?e.innerHeight:h.height())+h.scrollTop():p._$container.offset().top+p._$container.height())<=m.offset().top-p.threshold}function a(m,p){return(p._$container==h?h.width()+(g.fn.scrollLeft?h.scrollLeft():e.pageXOffset):p._$container.offset().left+p._$container.width())<=m.offset().left-p.threshold} function c(m,p){return(p._$container==h?h.scrollTop():p._$container.offset().top)>=m.offset().top+p.threshold+m.height()}function k(m,p){return(p._$container==h?g.fn.scrollLeft?h.scrollLeft():e.pageXOffset:p._$container.offset().left)>=m.offset().left+p.threshold+m.width()}function f(m,p){var v=0;m.each(function(w,z){function b(){r.trigger("_lazyload_appear");v=0}var r=m.eq(w);if(!(0>=r.width()&&0>=r.height()||"none"===r.css("display")))if(p.vertical_only){if(!c(r,p))if(!l(r,p))b();else if(++v>p.failure_limit)return!1}else if(!c(r, p)&&!k(r,p))if(!l(r,p)&&!a(r,p))b();else if(++v>p.failure_limit)return!1})}function d(m){return m.filter(function(p,v){return!m.eq(p)._lazyload_loadStarted})}var e=window,h=g(e),t={threshold:0,failure_limit:0,event:"scroll",effect:"show",effect_params:null,container:e,data_attribute:"original",data_srcset_attribute:"original-srcset",skip_invisible:!0,appear:q,load:q,vertical_only:!1,check_appear_throttle_time:300,url_rewriter_fn:q,no_fake_img_loader:!1,placeholder_data_img:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC", placeholder_real_img:"//css.dhresource.com/mobile_v2/common/image/grey.png"};var u=function(){var m=Object.prototype.toString;return function(p){return m.call(p).replace("[object ","").replace("]","")}}();g.fn.hasOwnProperty("lazyload")||(g.fn.lazyload=function(m){var p=this;g.isPlainObject(m)||(m={});g.each(t,function(b,r){-1!=g.inArray(b,["threshold","failure_limit","check_appear_throttle_time"])?"String"==u(m[b])?m[b]=parseInt(m[b],10):m[b]=r:"container"==b?(m.hasOwnProperty(b)?m._$container=m[b]== e||m[b]==document?h:g(m[b]):m._$container=h,delete m.container):!t.hasOwnProperty(b)||m.hasOwnProperty(b)&&u(m[b])==u(t[b])||(m[b]=r)});var v="scroll"==m.event;var w=0==m.check_appear_throttle_time?f:_.throttle(f,m.check_appear_throttle_time);var z=v||"scrollstart"==m.event||"scrollstop"==m.event;p.each(function(b,r){var y=this,x=p.eq(b);b=x.attr("src");r=x.attr("data-"+m.data_attribute);var B=m.url_rewriter_fn==q?r:m.url_rewriter_fn.call(y,x,r),D=x.attr("data-"+m.data_srcset_attribute),G=x.is("img"); if(1==x._lazyload_loadStarted||b==B)x._lazyload_loadStarted=!0,p=d(p);else if(x._lazyload_loadStarted=!1,G&&!b&&x.one("error",function(){x.attr("src",m.placeholder_real_img)}).attr("src",m.placeholder_data_img),x.one("_lazyload_appear",function(){function F(){N&&x.hide();G?(D&&x.attr("srcset",D),B&&x.attr("src",B)):x.css("background-image",'url("'+B+'")');N&&x[m.effect].apply(x,J?m.effect_params:[]);p=d(p)}var J=g.isArray(m.effect_params);if(!x._lazyload_loadStarted){var N="show"!=m.effect&&g.fn[m.effect]&& (!m.effect_params||J&&0==m.effect_params.length);m.appear!=q&&m.appear.call(y,x,p.length,m);x._lazyload_loadStarted=!0;if(m.no_fake_img_loader||D){if(m.load!=q)x.one("load",function(){m.load.call(y,x,p.length,m)});F()}else g("").one("load",function(){F();m.load!=q&&m.load.call(y,p.length,m)}).attr("src",B)}}),!z)x.on(m.event,function(){x._lazyload_loadStarted||x.trigger("_lazyload_appear")})});if(z)m._$container.on(m.event,function(){w(p,m)});h.on("resize load",function(){w(p,m)});g(function(){w(p, m)});return this})}); define("tpl/appSpreadTpl",[],function(){return{main:'<% var data = obj;%>,<% if(data.abVersion580==="580_1"){%>,
,
,<% if(data.isNew &&data.appSumCouponAmount){%>,
,

<%=data.appSumCouponAmount%> <%=data.guideText%>

,
<%=data.countDownTitle%>
,
,<% }else{%>,
,

<%=data.guideText%>

,
,<% } %>,
,
,
,<% }else{ %>,
,<% } %>'.split(","),lead_flu:'<% var data = obj;%>,
,
,
,,,
,
'.split(",")}}); define("tpl/header/hotKeyWordTpl",[],function(){return['
<%=$.lang["hot_search"]%>
',"
    ","<% var data = obj; %>","<% for (var i = 0, len = data.length; i < len; i++) { %>","<% if(data[i].mobileIcon){%>",'
  • <%=data[i].keyword%>
  • ', "<% }else{%>",'
  • <%=data[i].keyword%>
  • ',"<%}%>","<% } %>","
"]}); define("tpl/header/recentKeyWordTpl",[],function(){return["<% var data = obj.list; %>",'
Search History
',"<% if( data.length > 5) {%>",'
    ',"<% for (var i = 0, len = data.length; i < len; i ++) { %>",'
  • <%=data[i]%>
  • ', "<% } %>","
",'',"<% } else {%>","
    ","<% for (var i = 0, len = data.length; i < len; i ++) { %>",'
  • <%=data[i]%>
  • ',"<% } %>","
","<% }%>"]}); define("tpl/header/suggestTpl",[],function(){return["<% var data = obj.list, data2 = obj.storeList; %>",'
',"<% if (data2.length!==0) { %>","<% for (var i =0, len = data2.length; i",'', "<% } %>","<% } %>","<% if(obj.storeUrl!==undefined||obj.storeName!==undefined || bitList.length > 0) { %>",'
',"<% if(obj.storeUrl!==undefined||obj.storeName!==undefined) { %>",'","<% } %>","<% var bitList = obj.bitList; %>","<% if(bitList.length > 0) { %>",'
    ',"<% for(var i = 0; i < bitList.length; i++ ) { %>","
  • ",'', '',"","
  • ","<% } %>","
","<% } %>","
","<% } %>","<% if (data.length!==0) { %>",'
    ',"<% for (var i = 0, len = data.length; i < len; i++) {%>","<% if (data[i].cid||data[i].cid===0){%>","<% if (data[i].cid===0){%>",'
  • <%=data[i].key%>','<% if (data[i].cateName!==""){%>', ' <%=$.lang["Head_in"]%> <%=data[i].cateName%>
  • ',"<% } %>","<% }else{ %>",'
  • <%=data[i].key%>','<% if (data[i].cateName!==""){%>',' <%=$.lang["Head_in"]%> <%=data[i].cateName%>
  • ',"<% } %>","<% } %>","<% }else{ %>", '
  • <%=data[i].key%>',"
  • ","<% } %>","<% } %>","
","<% } %>"]}); define("tpl/header/topMenuInitTpl",[],function(){return{warp:'
;
;;;
;
;
;
;;;
;
;
;
;
;
;
;
;
;<%=$.lang["newUserVerifyMail_email_verified"]%>;
;
;
;;
;
;{{entranceOne}};{{entranceTwo}};{{entranceThree}};
;
'.split(";"),fixedShadow:['
'], notLogin:'<% var data = obj.list; %>,<% if (!$.cookie("b2b_b_t_v2")) { %>,
,
, <%=$.lang["Head_or"]%> <%=$.lang["Head_joinFree"]%>,
,
,<% } %>'.split(","),isLogin:'<% var data = obj.list; %>,<% if ($.cookie("b2b_b_t_v2")) { %>,
,
,
,<%=data.nickName%>,
,
,<% if (!window.DH_SWITCH_LOGIN_PAGE) { %>, <%=$.lang["Head_or"]%> ,<% } %>,<%=$.lang["sign_out"]%>,
,
,
,<% } %>'.split(","), entranceOne:'<% var data = obj.list; %>,,<% if (data.site !== "hk") { %>,
,<% } %>,<% if (/^(?:en)$/i.test(data.site)) { %>,<% } %>'.split(","),entranceTwo:'<% var data = obj.list; %>,
,,
,<% if (!$.cookie("b2b_b_t_v2")) { %>,,<% } else { %>,,<% } %>'.split(","), entranceThree:["<% var data = obj.list, contactUsUrl = obj.contactUsUrl; %>",'
',"
    ",'",'
  • ', '
  • ','
  • ',"
","
",'"],needEDMEmailConfirmTips:'<% var data = obj %>;<% if (data.result === "1") { %>;We\u2019ve email you a confirmation link.Please confirm your account within 48 hours for a chance to get a free coupon!;<% }else{%>;Your email address has been confirmed already.;<% } %>'.split(";")}}); define("tpl/header/getMenuShiptoCountryListTpl",[],function(){return{main:'<% var data = obj; %>,
,
<%=$.lang["DETAIL_country"]%>
,
<%=$.lang["l_back"]%><%=$.lang["DETAIL_shipsto"]%>
,
,{{countryList}},
,
'.split(","), countryList:["<% var data = obj; %>",'
<%=$.lang["DETAIL_popular"]%>
',"<% $.each(data.popular, function(index, country){ %>",'
    ','<% if ($.cookie("b2b_ship_country") !== country.whitherCountryId) { %>','
  • <%=country.whitherCountryName%>
  • ', "<% } else { %>",'
  • <%=country.whitherCountryName%>
  • ',"<% } %>","
","<% }); %>","<% $.each(data.all, function(letter, items){ %>",'
<%=letter%>
','
    ',"<% $.each(items, function(index, country){ %>",'<% if ($.cookie("b2b_ship_country") !== country.whitherCountryId) { %>', '
  • <%=country.whitherCountryName%>
  • ',"<% } else { %>",'
  • <%=country.whitherCountryName%>
  • ', "<% } %>","<% }) %>","
","<% }) %>"]}}); define("tpl/header/turnToLanguagesWebsiteTpl",[],function(){return{warp:'
;
;{{list}};

<%=$.lang["cancel"]%>

;
;
'.split(";"),list:'<% var isLocalSite = /local.dhgate.com/i.test(location.host); %>,'.split(","),currencyWarp:'
;
;{{currencyList}};

<%=$.lang["cancel"]%>

;
;
'.split(";"), currencyList:["<% var data = obj; %>",'
    ',"<% for (var i = 0, len = data.length; i < len; i++) { %>",'
  • <%=data[i]%>
  • ',"<% } %>","
"],shadow:['
']}}); define("tpl/header/petAreaTpl",[],function(){return{main:'
;{{title}};
;
    ;{{products}};
;
;
'.split(";"),title:["<% var data = obj; %>",''],products:["<% var data = obj; %>","<% for (var i = 0, len = data.list.length; i < len; i++) { %>","
  • ",'">', '<% if (data.list[i].videoUrl&&i===1 && obj.abversion==="870_2") { %>','
    ','','',"
    ","<% }else{ %>",'
    ',"<% if (data.list[i].discount>0) { %>",'-<%=data.list[i].discount%>%',"<% } %>",'<%=data.list[i].title%>', "
    ","<% } %>",'
    ','

    ',"<% if (data.list[i].discount>0) { %>","<%=data.list[i].price%><%=data.list[i].oPrice%>","<% }else{ %>","<%=data.list[i].price%>","<% } %>","

    ",'<% if (data.list[i].freeshipping==="1") { %>','
    <%=$.lang["free_shipping"]%>
    ',"<%}%>","
    ","
    ","
  • ","<% } %>"]}}); define("tpl/login/newBuyerAutoBindCouponTpl",[],function(){return{main:'<%var data = obj;%>,
    ,
    ,
    ,{{newBuyerCoupon}},
    ,
    '.split(","),newBuyerCoupon:'<%var data = obj;%>,
    ,
    ,
    <%=$.lang["Congrats! You just got"]%>
    ,
    ,<%=data.sumCouponAmount%>,

    <%=$.lang["newBuyerCoupon_DHcouponPack"]%>

    ,
    ,
    <%=$.lang["Shop Now"]%>
    ,
    '.split(",")}}); define("tpl/login/verifyNumberTpl",[],function(){return{main:';;
    ;'.split(";"),addMobileNumberTit:'<% var data = obj%>;<% if(data.phonestate ==="1") { %>;<%=$.lang["buyerSms_Authentication"]%>;<% } else { %>;<%=$.lang["buyerSms_VerifyMobileNumber"]%>;<% } %>;'.split(";"), addMobileNumberTextInfo:';'.split(";"), submitAddMobileNumberBtn:'<% var data = obj;%>,<% if(data.phonestate ==="1") { %>,<%=$.lang["buyerSms_Continue"]%>,<%=$.lang["buyerSms_Return"]%>,<% } else if(data.phonestate ===""|| data.phonestate === undefined) { %>,<%=$.lang["buyerSms_Submit"]%>,<%=$.lang["buyerSms_NotNow"]%>,<% } else { %>,<%=$.lang["buyerSms_Submit"]%>,<%=$.lang["buyerSms_Cancel"]%>,<% } %>'.split(","), verificationCodeRules:''.split(";"),verificationMobile:';'.split(";"), verification:'<% var data = obj%>;'.split(";"), couponLayer:'
    ;

    <%=$.lang["buyerSms_Congratulations"]%>

    ;

    <%=$.lang["buyerSms_YouSupriseCoupon"]%>

    ;

    <%=$.lang["buyerSms_ViewMyCoupons"]%> >

    ;
    <%=$.lang["buyerSms_Close"]%>
    ;
    '.split(";")}}); define("tpl/login/addMobileNumberTpl",[],function(){return{main:'<% var data = obj;%>,'.split(","),addMobileNumberTit:'<% var data = obj;%>,<% if(data.userAttention.phonestate === "1"||data.userAttention.phonestate==="0") { %>,<%=$.lang["buyerSms_ModifyMobileNumber"]%>,<% } else { %>,<%=$.lang["buyerSms_addMobileNumber"]%>,<% } %>,'.split(","), addMobileNumberTextInfo:["<% var data = obj;%>",'<% if(data.userAttention.phonestate ===""||data.userAttention.phonestate ===undefined) { %>','
    <%=$.lang["buyerSms_SuccessfullySupriseCoupon"]%>
    ','',"<% } %>"],countryMobileNumber:'<% var data = obj;%>,'.split(","), submitAddMobileNumberBtn:'<% var data = obj;%>,<% if(data.userAttention.phonestate === "1") { %>,<%=$.lang["buyerSms_Continue"]%>,<%=$.lang["buyerSms_Cancel"]%>,<% } else { %>,<%=$.lang["buyerSms_Continue"]%>,<%=$.lang["buyerSms_NotNow"]%>,<% } %>'.split(","), deleteMobileNumberPop:'
    ;
    ;
    ;
    ;
    ;
    ;
    ;

    <%=$.lang["buyerSms_DeleteMobileNumber"]%>

    ;<%=$.lang["buyerSms_sureDeleteMobileNumber"]%>;
    ;<%=$.lang["buyerSms_Confirm"]%>;
    ;
    <%=$.lang["buyerSms_Cancel"]%>
    ;
    ;
    ;
    ;
    '.split(";")}}); define("tpl/login/signinPopupTpl",[],function(){return{main:['<% var myyshoploginclass = ""; %>','<% if (window.$ && window.$.cookie && window.$.cookie("__DH_Detail__url")) { %>','<% myyshoploginclass = "myyshop-login"; %>',"<% } %>",''],container:'<% var data = obj; %>,'.split(","), loginTab:'<% var data = obj; %>,'.split(","),main1:["<% var data = obj; %>",'<% var myyshoploginclass = ""; %>','<% if (window.$ && window.$.cookie && window.$.cookie("__DH_Detail__url")) { %>','<% myyshoploginclass = "myyshop-login"; %>',"<% } %>",'','
    ', '","
    ","<% if (data.pfls) { %>",'
    ','
    ','',"<% if (data.pfls.length>1 || data.isSwitchLoginPage===true) { %>",'
    ','
    ', "
      ","<% for (var i=0,len=data.pfls.length; i",'
    • data-selected="1"<%}%>>', '
      ',"<% if (data.pfls[i].avatar) { %>",'',"<% } else { %>",'',"<% } %>",'<% if (data.pfls[i].thirdType==="0") { %>','', '<% } else if (data.pfls[i].thirdType==="1") { %>','','<% } else if (data.pfls[i].thirdType==="3"||data.pfls[i].thirdType==="3_2") { %>','','<% } else if (data.pfls[i].thirdType==="7") { %>','', '<% } else if (data.pfls[i].thirdType==="8") { %>','',"<% } %>","
      ",'","<% if (data.isSwitchLoginPage===true) { %>","<% if (data.pfls[i].buyerid===data.currentBuyerId) { %>", '
      ',"<% } else { %>",'
      ',"<% } %>","<% } else { %>",'
      ',"<% } %>","
    • ","<% } %>","
    ","
    ","<% if (data.isSwitchLoginPage===true) { %>",'', "<% } else { %>",'',"<% } %>","<% if (data.pfls.length>1) { %>",'','
    <%=$.lang["l_done"]%>
    ',"<% } %>","
    ","<% } %>",'
    ',"
    ","
    ",'
    ', '
    <%=$.lang["Are you sure to remove this account?"]%>
    ','
    ','<%=$.lang["cancel"]%>','<%=$.lang["DETAIL_confirm"]%>',"
    ","
    ",'
    ',"<% } %>"],localSingle:["<% var data = obj; %>",'
    ',"<% if (data.avatar) { %>", '',"<% } else { %>",'',"<% } %>","
    ",'
    <%=data.nickname%>
    ','
    <%=data.domainnameMask%>
    ','
    ','" data-placeholder="" data-validate="pw4" autocorrect="off" autocapitalize="off" value="" data-element=".j-local-single-password-closeBtn">', '<%=$.lang["pay_success_Password"]%>','','','
    <%=$.lang["Password you entered is incorrect."]%>
    ',"
    ",'
    ', '<% if (data.thirdType==="0") { %>','<%=$.lang.replaceTplVar("Sign in With ${val}", {val: "Facebook"})%>','<% } else if (data.thirdType==="1") { %>','<%=$.lang.replaceTplVar("Sign in With ${val}", {val: "Google"})%>','<% } else if (data.thirdType==="3"||data.thirdType==="3_2") { %>','<%=$.lang.replaceTplVar("Sign in With ${val}", {val: "Apple"})%>','<% } else if (data.thirdType==="7") { %>','<%=$.lang.replaceTplVar("Sign in With ${val}", {val: "TikTok"})%>','<% } else if (data.thirdType==="8") { %>', '<%=$.lang.replaceTplVar("Sign in With ${val}", {val: "Klarna"})%>',"<% } else { %>",'<%=$.lang["STORE_SignIn"]%>',"<% } %>","
    ",'',''], loginTab1:'<% var data = obj; %>,'.split(","),loginCloseBtn:[''],websiteSignin:['<% var data = obj;var language = $.cookie("language") || "en"; %>', '
    ','','',"
    ",'
    ','','', '',"
    ",'

    <%=$.lang.replaceTplVar("LOGIN_loginAccount", {val: language})%>

    ','','

    <%=$.lang["LOGIN_forgetPassword"]%>

    '], signinCode:["<% var data = obj; %>",'','',''],thirdSignin:'<% var data = obj; %>,'.split(","), isLogin:'<% var data = obj.list; %>,<% if ($.cookie("b2b_b_t_v2")) { %>,
    ,
    ,
    ,<%=data.nickName%>,
    ,
    ,<% if (!window.DH_SWITCH_LOGIN_PAGE) { %>, <%=$.lang["Head_or"]%> ,<% } %>,<%=$.lang["sign_out"]%>,
    ,
    ,
    ,<% } %>'.split(","), noAccount:''.split(";"),errorTipsLogin:['"], errorTipsRegister:['"],appleAccountSelect:["<% var data = obj; %>",'",'']}}); define("tpl/login/registerPopupTpl",[],function(){return{websiteRegister:'
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;;{{thirdSignin}};{{part3}};{{noAccount}};{{agreePolicy}}'.split(";"),part1:'
    ;;
    <%=$.lang["LOGIN_emailConfirm"]%>
    ;;<%=$.lang["LOGIN_inputNotNum"]%>;
    '.split(";"), pwd:'
    ;;
    <%=$.lang["LOGIN_password"]%>
    ;;<%=$.lang["LOGIN_inputNotNum"]%>;;
    '.split(";"),part2:'
    ;;
    ;
    ;;
    <%=$.lang["LOGIN_Descriptions"]%>
    ;
    ;
    <%=$.lang["LOGIN_Dropshipper"]%>\uff1a
    ;

    <%=$.lang["LOGIN_DropshipperInfro"]%>

    ;
    <%=$.lang["LOGIN_Smallwholesaler"]%>\uff1a
    ;

    <%=$.lang["LOGIN_Smallwholesalerinfro"]%>

    ;
    <%=$.lang["LOGIN_Mediumlarge"]%>\uff1a
    ;

    <%=$.lang["LOGIN_Mediumlargeinfro"]%>

    ;
    ;
    ;
    ;
    '.split(";"), part3:["<% var language = obj;%>",''],websiteRegister1:'
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;
    ;;{{thirdSignin}};{{part3}};{{noAccount}};{{agreePolicy}}'.split(";"), pwd1:'
    ;;
    <%=$.lang["LOGIN_password"]%>
    ;;<%=$.lang["LOGIN_inputNotNum"]%>;;
    '.split(";"),thirdSignin:'<% var data = obj; %>,'.split(","), noAccount:''.split(";"),agreePolicy:'
    ;
    ;
    <%=$.lang["LOGIN_agree_policy_desc"]%>
    ;
    ;<%=$.lang["cancel"]%>;<%=$.lang["Agree"]%>;
    ;
    '.split(";")}}); define("tpl/header/getShiptoLayerTpl",[],function(){return{main:'<% var data = obj; %>,,,,
    ,,'.split(","), countryList:["<% var data = obj; %>","<% $.each(data.popular, function(index, country){ %>",'
      ','<% if ($.cookie("b2b_ship_country").toLowerCase()!== country.whitherCountryId.toLowerCase()) { %>','
    • <%=country.whitherCountryName%>
    • ', "<% } else {%>",'
    • <%=country.whitherCountryName%>
    • ',"<% } %>","
    ","<% }); %>","<% $.each(data.all, function(letter, items){ %>",'
    <%=letter%>
    ','
      ',"<% $.each(items, function(index, country){ %>", '<% if ($.cookie("b2b_ship_country").toLowerCase() !== country.whitherCountryId.toLowerCase()) { %>','
    • <%=country.whitherCountryName%>
    • ',"<% } else { %>",'
    • <%=country.whitherCountryName%>
    • ', "<% } %>","<% }) %>","
    ","<% }) %>"],languageList:'<% var isLocalSite = /local.dhgate.com/i.test(location.host); %>,'.split(","), currencyList:["<% var data = obj.currencyList; %>",'"]}}); define("tpl/emailModifyTpl",[],function(){return{main:['
    ',"{{newUserVerifyMail}}","
    "],newUserVerifyMail:'
    ;;<%=$.lang["newUserVerifyMail_contact_Email"]%>;;
    ;
    ;
    <%=$.lang["newUserVerifyMail_verify_following"]%>
    ;
    ;

    <%=$.lang["newUserVerifyMail_Confirm_emailAddress"]%>

    ;

    <%=$.lang["newUserVerifyMail_stay_essentialOrder"]%>

    ;

    <%=$.lang["newUserVerifyMail_useemail"]%>

    ;

    <%=$.lang["newUserVerifyMail_Contact_email_address"]%>

    ;
    ;">;;
    ;<%if($.cookie("m_login_name")) { %>;
    ;<% } else { %>;
    ;<% } %>;<%=$.lang["newUserVerifyMail_submit_to_confirm"]%>;
    ;
    ;
    ;
    ;
    '.split(";"),validationSucceeded:'
    ;
    ;
    ;

    <%=$.lang["newUserVerifyMail_we_sent_email"]%>

    ;

    <%=obj%>

    ;
    <%=$.lang["newUserVerifyMail_please_trade_partners"]%>
    ;
    ;
    ;<%=$.lang["DETAIL_OK"]%>;
    ;
    '.split(";"), followBenefitsLayer:'
    ,
    ,
    ,,,

    <%=$.lang["newUserVerifyMail_following_benefits"]%>

    ,

    1.<%=$.lang["newUserVerifyMail_Discount_information"]%>;

    ,

    2. <%=$.lang["newUserVerifyMail_Special_invitation"]%>;

    ,

    3. <%=$.lang["newUserVerifyMail_Starting_disputes"]%>;

    ,

    4. <%=$.lang["newUserVerifyMail_EDM_right"]%>;

    ,

    5. <%=$.lang["newUserVerifyMail_Opportunity_rewards"]%>

    ,

    <%=$.lang["newUserVerifyMail_ContactUs"]%><%=obj%>

    ,
    ,
    '.split(",")}}); define("common/config",["tools/jquery.cookie"],function(g){var n={error:function(p){window.Sentry&&window.Sentry.captureException&&window.Sentry.captureException(Error($.cookie("vid")+" "+p))},info:function(p){window.Sentry&&window.Sentry.captureException&&window.Sentry.captureMessage($.cookie("vid")+" "+p)}},q=(!1===/https/i.test(location.protocol)?"http://":"https://")+location.hostname,l=function(p){var v=p.params||location.search;if(!v)return"";p=v.match(p.reg||new RegExp(".+"+p.name+"=([^&#]*).*", "i"));return null!==p?p[1]:""},a=function(){var p=q.match(/(?:m\.)?(es|pt|ru|fr|de|it|tr|hk|mx|cl|pe|co|kr|ar|nl|pl|jp|se|ie)\..+/i)||"en";p=$.isArray(p)?p[1].replace(/mx|cl|pe|co/,"es"):p;if(-1!=q.indexOf("drt.eos.dhgate.com")||-1!=q.indexOf("drt.dhgate.com")){var v=l({name:"site"})||"";""!==v&&(p=v)}return p}();g=/(A|a)ndroid/i.test(navigator.userAgent);var c=function(){var p=navigator.userAgent;return/\d\.\d\.\d/.test(p)&&null!==p.match(/\/(\d\.\d\.\d)/)&&"4.0.2"v&&0w&&0z&&0w)&&$.ajax({type:"GET",url:"https://abtest.dhgate.com/abversion_pv",data:{vid:v,exp_type:2,timestamp:p},async:!0,cache:!1,dataType:"jsonp",context:this,success:function(b){console.log(b);window.DHJSSDK&&b.pv&&DHJSSDK.Storage.setItem("abversions_pv",b.pv,144E5,function(r){})},error:function(){try{throw"error(): request is wrong"; }catch(b){}}})})();var m=function(){var p="en",v={ar:"ar",de:"de",en:"en",es:"es",fr:"fr",it:"it",jp:"ja",pt:"pt",ru:"ru",tr:"tr",kr:"ko"};v[a]&&(p=v[a]);return p}();window.__DH_MSITE_CONFIG__={};(function(){try{var p=$("
    "),v=$(""),w=$("body"),z=[];window.navigator&&window.navigator.connection?(z.push("connection:1"),z.push("downlink:"+window.navigator.connection.downlink),z.push("downlinkMax:"+window.navigator.connection.downlinkMax),z.push("effectiveType:"+window.navigator.connection.effectiveType), z.push("rtt:"+window.navigator.connection.rtt),z.push("saveData:"+window.navigator.connection.saveData)):z.push("connection:0");p.css({display:"none"});v.css({width:1,height:1,borderStyle:"none"}).attr({src:"https://app.dhgate.com/mobileApiWeb/biz-FeedBack-log.do?client=wap&language="+a+"&v="+JSON.stringify(z.join(";"))});w.append(p.append(v))}catch(b){console.error(b)}})();return{isAndroid:g,preventClick:function(){},isLocalStorageNameSupported:function(){try{if("localStorage"in window&&window.localStorage)return localStorage.setItem("__DH_LOCALSTORAGETEST__", 1),!0}catch(p){return!1}},wwwURL:q,wwwPATHNAME:location.pathname,wwwHASH:location.hash,wwwSEARCH:location.search,countrys:{en:"English (EN)",es:"Espa\u00f1ol (ES)",pt:"Portugu\u00eas (PT)",ru:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439 (RU)",fr:"Fran\u00e7ais (FR)",de:"Deutsch (DE)",it:"Italiano (IT)",tr:"T\u00fcrk\u00e7e(TR)",hk:"Hongkong (HK)",kr:"\ud55c\uad6d\uc5b4 (KR)",ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (AR)",nl:"Nederlands (NL)",pl:"Polski (PL)",jp:"\u65e5\u672c\u8a9e (JP)",se:"Svenska (SE)", ie:"English (IE)"},countryCur:a,site:k,version:"1752137304280",b2b_nick_n:$.cookie("b2b_nick_n"),b2b_buyer_lv:$.cookie("b2b_buyer_lv"),vid:$.cookie("vid"),b2b_cart_sid:$.cookie("b2b_cart_sid"),b2b_buyerid:$.cookie("b2b_buyerid"),isNewestApp:function(){var p=navigator.userAgent;return/i(P|p)hone(N|n)ative/i.test(p)&&c()?!0:/(A|a)ndroid(N|n)ative/i.test(p)&&c()?!0:!1}(),buyerType:function(){var p=$.cookie("bc"),v="";"b|r"===p?v="Reseller":"b|p"===p?v="Purchase for company":"c|e"===p&&(v="End consumer"); return v}(),userType:function(){var p=$.cookie("bc");return"b|r"===p||"b|p"===p?"B":"C"}(),app_dhgate:"https://app.dhgate.com",mrd_dhgate:"https://mrd.dhgate.com",mall_dhgate:"https://mall.dhgate.com",mlogin_dhgate:"https://mlogin.dhgate.com",mshoppingcart_dhgate:"https://shoppingcart.dhgate.com",www_dhgate:"https://www.dhgate.com",m_dhgate:"https://m.dhgate.com",leo_dhgate:"https://leo.dhgate.com",asm_dhgate:"https://asm.dhgate.com",yf_dhgate:"https://yf.dhgate.com",dg_dhgate:"https://dg.dhgate.com", leoread_dhgate:"https://leoread.dhgate.com",payment_dhpay:"https://payment.dhpay.com",contactUsUrl:{en:"https://dg.dhgate.com/contact/contactUs.do",es:"https://es.dhgate.com/contact/contactUs.do#eshp1806-cs3",pt:"https://pt.dhgate.com/contact/contactUs.do#eshp1806-cs3",ru:"https://ru.dhgate.com/contact/contactUs.do#eshp1806-cs3",fr:"https://fr.dhgate.com/contact/contactUs.do?act=contactUsWap#eshp1806-cs3",de:"https://de.dhgate.com/contact/contactUs.do?act=contactUsWap#eshp1806-cs3",it:"https://it.dhgate.com/contact/contactUs.do#eshp1806-cs3", tr:"https://dg.dhgate.com/contact/contactUs.do",hk:"https://dg.dhgate.com/contact/contactUs.do",kr:"https://kr.dhgate.com/contact/contactUs.do#eshp1806-cs3",ar:"https://ar.dhgate.com/contact/contactUs.do#arhp1806_cs-2-b"},getD1:function(p){return f(p)},inserJStoHead:function(p){var v=document.createElement("script");v.type="text/javascript";v.async=!0;v.src=("https:"==document.location.protocol?"https://":"http://")+p;document.getElementsByTagName("head")[0].appendChild(v)},preload:function(p){var v= document.createElement("link");v.href=p;v.rel="preload";v.as="script";document.head.appendChild(v)},googleTrafficDifferent:d,isReptile:e,isolateReptile:function(){var p=$("body");return/^(de|it)$/i.test(k)&&!0===e||("itemDetail"===p.attr("data-pagetype")||"homePage"===p.attr("data-pagetype"))&&!0===e?!1:!0}(),geetestLanguage:{en:"eng",hk:"zho-hk",jp:"jpn",kr:"kor",ru:"rus",ar:"ara",es:"spa",pt:"por",fr:"fra",de:"deu"}[k]||"eng",netRedStoreHomeUrl:h,logger:n,slientIntersectionObserver:function(p,v, w){try{var z=new IntersectionObserver(function(b,r){b&&b[0]&&b[0].isIntersecting&&(r.unobserve(b[0].target),setTimeout(function(){p()},1))},{root:null,rootMargin:w||"0px",threshold:0});v&&z.observe(v)}catch(b){v&&setTimeout(function(){p()},1),n.info("common/config: \u9759\u9ed8\u76d1\u542c\u542f\u52a8\u5931\u8d25 "+b.message)}},cookie:$.cookie||function(){},turboLinkParams:{appKey:"d70717c46a0f494ae52c618c766afb79",appSecret:"748b74fdca2c8f3b561a06dce99539c43caa124a",projectId:"cov0fl5a5kl5jmcf8ns0", lang:m},loadTurboLinkSdk:function(p){window.__DH_MSITE_CONFIG_TURBOLINK__||(window.__DH_MSITE_CONFIG_TURBOLINK__=$({}),window.__DH_MSITE_CONFIG_TURBOLINK__.addToQueue=function(v){this.queue("taskQueue",v)},window.__DH_MSITE_CONFIG_TURBOLINK__.executeQueue=function(v){this.queue(v).length&&(this.dequeue(v),this.executeQueue(v))});"y"!==window.__DH_MSITE_CONFIG_TURBOLINK__.cache?window.__DH_MSITE_CONFIG_TURBOLINK__.addToQueue(p):p();window.__DH_MSITE_CONFIG_TURBOLINK__.flag||$.ajax({type:"GET",url:"https://js.dhresource.com/mobile_v2/sdk/turbolink.js?v=1752137304280", context:this,async:!0,cache:!0,dataType:"script",success:function(){window.__DH_MSITE_CONFIG_TURBOLINK__.cache="y";window.__DH_MSITE_CONFIG_TURBOLINK__.executeQueue("taskQueue")}});window.__DH_MSITE_CONFIG_TURBOLINK__.flag=!0}}}); define("common/langLoader",["common/config"],function(g){$.langLoader=function(){};$.extend($.langLoader,{$el:$("body"),init:function(){window.dh_langLoader_instance||(window.$.langLoader.instance=new $.langLoader);return window.$.langLoader.instance},cache:null,flag:!1});$.extend($.langLoader.prototype,{add:function(n){$.langLoader.$el.queue("langLoader",$.proxy(n,window))},run:function(n){var q=$.langLoader.$el;if(!q.queue(n).length)return!1;q.dequeue(n);this.run(n)},get:function(n){null!==$.langLoader.cache? n():this.add(n);$.langLoader.flag||$.ajax({type:"GET",url:"//js.dhresource.com/mobile_v2/common/lang/common_msg_"+g.countryCur+".js?v="+g.version,context:this,async:!0,cache:!0,dataType:"script",success:function(q){$.langLoader.cache="y";this.run("langLoader")}});$.langLoader.flag=!0}});return $.langLoader.init()}); define("common/getUserInfo",["common/config","checkoutflow/popupTip","checkoutflow/dataErrorLog"],function(g,n,q){q=new q({flag:!0,url:"/mobileApiWeb/biz-FeedBack-log.do"});var l=g.mlogin_dhgate+"/musr/auth.do",a={client:"wap",language:g.countryCur,version:"0.1"},c=window.location.href;return{init:function(k){this.isAsync=void 0===k.isAsync?!0:!1;this.supportVisitors=k.supportVisitors||!1;this.isTip=void 0===k.isTip?!0:!1;this.fixedURL=k.fixedURL||c;this.type=k.type||"signin";this.successCallback= k.successCallback;this.appLoginParam=k.appLoginParam||"";this.noSkipLogin=k.noSkipLogin||"1";this.canVisitorSignin=k.canVisitorSignin;this.guestReturnUrl=k.guestReturnUrl;this.returnURL=k.returnURL;this.isSetPageStyle=k.isSetPageStyle;this.cpsTag=k.cpsTag;this.isAutoBindNewBuyerCoupon=void 0===k.isAutoBindNewBuyerCoupon?!0:!1;this.isShowNewBuyerTip=void 0===k.isShowNewBuyerTip?!0:!1;this.isBuyItNow=k.isBuyItNow;this.loginSuccessCallback=k.loginSuccessCallback;window.__DH_Login_Params__=$.extend(!0, {},window.__DH_Login_Params__,k.params);this.fetch()},appSendParams:function(k){try{window.webkit.messageHandlers.getNecessaryData.postMessage(k||{})}catch(f){window.order&&window.order.getNecessaryData&&window.order.getNecessaryData(JSON.stringify(k||{}))}},appLogin:function(k,f){this.appSendParams(f);try{this.noRefreshLogin()}catch(d){this.needRefreshLogin()}window.DH_OnSale_GetSession=k},noRefreshLogin:function(){try{window.webkit&&window.webkit.messageHandlers?window.webkit.messageHandlers.toLoginJsRefresh.postMessage(""): toLoginJsRefresh()}catch(k){window.order&&window.order.toLoginJsRefresh&&window.order.toLoginJsRefresh()}},needRefreshLogin:function(){try{window.webkit&&window.webkit.messageHandlers?window.webkit.messageHandlers.toLogin.postMessage(""):toLogin("")}catch(k){window.order&&window.order.toLogin&&window.order.toLogin("")}},fetch:function(){$.ajax({type:"GET",url:l,data:a,async:this.isAsync,cache:!1,dataType:"jsonp",context:this,success:function(k){if("0x0000"===k.state)this.parse(k);else{!0===this.isTip&& (n.events.trigger("popupTip:loading",!1),n.events.trigger("popupTip:dataErrorTip",{action:"custom",customUrl:"/login.do?returnURL="+c,message:k.message}));try{throw"success(): data is wrong";}catch(f){q.events.trigger("save:dataErrorLog",{message:f,url:l,params:a,result:k})}}},error:function(){!0===this.isTip&&(n.events.trigger("popupTip:loading",!1),n.events.trigger("popupTip:dataErrorTip",{action:"refresh",message:"Network anomaly."}));try{throw"error(): request is wrong";}catch(k){q.events.trigger("save:dataErrorLog", {message:k,url:l,params:a})}}})},parse:function(k){var f={},d=k.data.user;f.code=!1===this.supportVisitors&&void 0!==d?200:!0!==this.supportVisitors||!0!==k.data.isVisitor&&void 0===d?-1:200;if(-1===f.code&&"1"===this.noSkipLogin)try{window.webkit&&window.webkit.messageHandlers?window.webkit.messageHandlers.toLogin.postMessage(this.appLoginParam):toLogin(this.appLoginParam)}catch(e){if(window.order&&window.order.toLogin)window.order.toLogin(this.appLoginParam);else{n.events.trigger("popupTip:loading", !1);if(window.$.DH_signin_popup){if("integrate_page"===this.fixedURL){window.$.DH_signin_popup.nonePopupRender({type:"signin",canVisitorSignin:this.canVisitorSignin,guestReturnUrl:this.guestReturnUrl,returnURL:this.returnURL,isBuyItNow:this.isBuyItNow,isAutoBindNewBuyerCoupon:this.isAutoBindNewBuyerCoupon,isShowNewBuyerTip:this.isShowNewBuyerTip});return}if("integrate_popup"===this.fixedURL){window.$.DH_signin_popup.render({type:this.type,isSetPageStyle:this.isSetPageStyle,canVisitorSignin:this.canVisitorSignin, guestReturnUrl:this.guestReturnUrl,returnURL:this.returnURL,isBuyItNow:this.isBuyItNow,isAutoBindNewBuyerCoupon:this.isAutoBindNewBuyerCoupon,isShowNewBuyerTip:this.isShowNewBuyerTip,cpsTag:this.cpsTag,loginSuccessCallback:this.loginSuccessCallback||$.noop});return}}location.href="/login.do?returnURL="+c}}else f.isVisitor=k.data.isVisitor,f.buyer=d&&d.isBuyer||"",f.buyerid=d&&d.buyerid||"",f.domainname=d&&d.domainname||"",f.email=d&&d.email||"",f.emailisvalid=d&&d.emailisvalid||"",f.nickname=d&&d.nickname|| "",f.systemuserid=d&&d.systemuserid||"",f.usertype=d&&1*d.usertype||"",!this.loginSuccessCallback||"integrate_page"!==this.fixedURL&&"integrate_popup"!==this.fixedURL?this.successCallback&&this.successCallback(f):this.loginSuccessCallback(f)}}}); define("common/goBack",["common/config","tools/getSpecifyUrlParam"],function(g,n){var q=function(l){this.setOptions(l);this.$el=$("body");this.customReturnToUrl=this.options.customReturnToUrl;this.sourceUrl=decodeURIComponent(n({name:"sourceUrl"}))||"";this.page=decodeURIComponent(n({name:"page"}))||"";this.mPathnameSearchUrlReg=new RegExp(g.wwwPATHNAME+g.wwwSEARCH.replace(/\+/g,"\\+"),"i");this.initEvent()};$.extend(q,{init:function(l){DHJSSDK&&DHJSSDK.Storage.init({dataKey:["__dh_placeVisitorGoBack__", "__dh_registerGoBack__"]});window.dh_GoBack_instance||(window.dh_GoBack_instance=new q(l));l&&l.customReturnToUrl&&(window.dh_GoBack_instance.customReturnToUrl=l.customReturnToUrl);return window.dh_GoBack_instance}});$.extend(q.prototype,{setOptions:function(l){this.options={customReturnToUrl:null};$.extend(this.options,l||{})},initEvent:function(){if(0<$(".j-headerWarp").length)$(".j-headerWarp").on("click",".j-common-back",$.proxy(this.returnToUrl,this));else this.$el.on("click",".j-common-back", $.proxy(this.returnToUrl,this));var l=window.location.href;/\/placeorder\/placeOrder\.html/i.test(l)||/\/static\/address\.html/i.test(l)||localStorage.removeItem("window.__DH_placeOrder__isGuest")},returnToUrl:function(){var l=document.referrer,a=this.sourceUrl,c=null;l&&/dhgate\./i.test(l)?(/\/viewcart\.do/i.test(g.wwwPATHNAME)?c=this.cartBack(l):/\/placeorder\/placeOrder\.html/i.test(g.wwwPATHNAME)?"V5"===this.page?c=this.newPlaceOrderBack(a):(c=this.placeOrderBack(l),window.DHJSSDK&&DHJSSDK.Storage.setItem("__dh_registerGoBack__", "1",-1,function(k){})):/\/static\/address\.html/i.test(g.wwwPATHNAME)&&(c=this.addressBack(a)),_.isFunction(this.customReturnToUrl)?this.customReturnToUrl():_.isNumber(c)?-1===c?window.history.back():window.history.go(c):_.isString(c)?window.location.href=c:window.location.href=g.wwwURL):window.location.href=g.wwwURL},cartBack:function(l){if(this.mPathnameSearchUrlReg.test(l)&&!/returnURL=/i.test(l))return g.wwwURL;if(/\/login\.do|\/register\.do/i.test(l))return-2;if(/\/placeorder\/placeOrder\.html/i.test(l)){l= new URL(l);l=(new URLSearchParams(l.search)).get("page");var a=window.DHJSSDK&&DHJSSDK.Storage.getItem("__dh_placeVisitorGoBack__"),c=window.DHJSSDK&&DHJSSDK.Storage.getItem("__dh_registerGoBack__");"V5"===l?"1"===a?(window.history.go(-6),window.DHJSSDK&&DHJSSDK.Storage.setItem("__dh_placeVisitorGoBack__","1",-1,function(k){})):"1"===c?(window.history.go(-5),window.DHJSSDK&&DHJSSDK.Storage.setItem("__dh_registerGoBack__","1",-1,function(k){})):window.history.go(-4):window.history.go(-1)}else return-1}, placeOrderBack:function(l){if(this.mPathnameSearchUrlReg.test(l)&&!/returnURL=/i.test(l))return g.wwwURL;/\/login\.do|\/register\.do/i.test(l)||(window.__DH_placeOrder_backUrgeCoupon=0);return-1},newPlaceOrderBack:function(l){if(""!==l)return/placeOrder\.html/i.test(l)?"/":l;window.__DH_placeOrder_backUrgeCoupon=0;return-1},addressBack:function(l){return""!==l?l:-1}});return q}); define("common/serverTime",["common/config"],function(g){return{get:function(n){$.ajax({type:"GET",url:g.mrd_dhgate+"/home/web/serverTime.do",data:{client:"wap",language:g.countryCur,version:"1.0"},async:!0,cache:!1,dataType:"json",xhrFields:{withCredentials:!0},success:n})}}}); define("common/getAppOpenData",["common/config","checkoutflow/dataErrorLog"],function(g,n){n=new n({flag:!0,url:"/mobileApiWeb/biz-FeedBack-log.do"});return{init:function(q){$.ajax({type:"GET",url:g.wwwURL+"/home/wapConfigInfo.do",data:{client:"wap",language:g.countryCur,dispCurrency:$.__currentCurrency,version:"1.0"},async:!0,cache:!1,dataType:"json",success:function(l){l.data&&l.data.isNew&&(void 0===l.data.appSumCouponAmount||""===l.data.appSumCouponAmount||null===l.data.appSumCouponAmount||"null"=== l.data.appSumCouponAmount)&&n.events.trigger("save:dataErrorLog",{message:"not get appSumCouponAmount",url:g.wwwURL+"/home/wapConfigInfo.do",params:{client:"wap",language:g.countryCur,dispCurrency:$.__currentCurrency,version:"1.0"},result:l});q&&q(l)},error:function(){}})}}}); define("common/recordClickMessage",["common/config"],function(g){return{get:function(n){$.ajax({type:"GET",url:g.wwwURL+"/mread/wap-PageRiverFlow-clickMyMessage.do",data:{client:"wap",language:g.countryCur,version:"1.0"},async:!0,cache:!1,dataType:"json",success:function(q){n&&n(q)}})}}}); define("common/appopen",["common/config","tools/deeplink","tools/jquery.cookie"],function(g,n,q){return{init:function(l){this.setOptions(l);this.dRoot=this.options.dRoot;this.cOpenBtn=this.options.cOpenBtn;this.Deeplink=this.options.Deeplink;this.set_timer=this.options.set_timer;this.iOS=this.options.iOS;this.android=this.options.android;this.downloadUrl=this.options.downloadUrl;this.schemeUrl=this.options.schemeUrl;this.entrance=this.options.entrance;this.skuId=this.options.skuId;this.selectedAttr= this.options.selectedAttr;this.currentTarget=this.options.currentTarget;this.couponHelpUrl=this.options.couponHelpUrl;this.config={};this.paramsObj={};this.clickEl=this.options.clickEl;this.isEvokeDirectly=this.options.isEvokeDirectly;this.isDetail=!1;this.initElement();this.initEvent()},setOptions:function(l){this.options={dRoot:"body",cOpenBtn:".j-openApp",currentTarget:"",entrance:null,set_timer:null,iOS:{appId:"905869418",appName:"DHgate",storeUrl:"https://app.appsflyer.com/id905869418?pid=WAP-top"}, android:{appId:"com.dhgate.buyermob",appName:"DHgate",storeUrl:"https://m.dhgate.com/common/download.html"},downloadUrl:"https://m.dhgate.com/common/download.html",schemeUrl:"dhgate://virtual",Deeplink:n};$.extend(!0,this.options,l||{})},initElement:function(){this.$dRoot=this.$dRoot||$(this.dRoot);this.$cOpenBtn=$(this.cOpenBtn);this.pagetype=this.$dRoot.attr("data-pagetype")},initEvent:function(){this.setSchemeUrl();this.entrance&&(this.downloadUrl=this.downloadUrl+"?entrance="+this.entrance,this.android.storeUrl= this.android.storeUrl+"?entrance="+this.entrance);"WAP-Topnew"===this.entrance&&(this.iOS.storeUrl="https://app.appsflyer.com/id905869418?pid=wap-top-new");"Maindirect"===this.entrance&&(this.iOS.storeUrl="https://app.appsflyer.com/id905869418?pid=WAP&c=Hbmenu");void 0===this.isEvokeDirectly&&this.openAppMethod()},getThirdPartyCookie:function(){var l=g.cookie("ref_f")||"",a=g.cookie("ref_f_full")||"";l&&(this.paramsObj.d1code=l+"_wap");if(a)try{var c=JSON.parse(decodeURIComponent(a)),k=c.utm_source|| "",f=c.utm_medium||"",d=c.utm_content||"",e=c.utm_campaign||"",h=c.cst2||"",t=c.cst1||"";this.paramsObj.utm_term=c.utm_term||"";this.paramsObj.utm_source=k;this.paramsObj.utm_medium=f;this.paramsObj.utm_content=d;this.paramsObj.utm_campaign=e;this.paramsObj.cst2=h;this.paramsObj.cst1=t}catch(u){console.log(u)}l="appexclusive"===this.entrance?"wapdhrefer_priceonapp":"wapdhrefer";"en"===g.countryCur&&g.cookie("dhrefer_cps")&&""!==g.cookie("dhrefer_cps")&&"itemDetail"===this.$dRoot.attr("data-pagetype")&& (this.paramsObj.d1code=this.paramsObj.d1code?this.paramsObj.d1code+"_"+l:l)},setSchemeUrl:function(){var l=this.$dRoot.attr("data-pagetype"),a=this.$dRoot.attr("spm-b");-1!=this.schemeUrl.indexOf("params")?(this.paramsObj=JSON.parse(this.schemeUrl.split("=")[1]),this.schemeUrl=this.schemeUrl.split("=")[0].split("?")[0]):this.paramsObj.des="home";if("itemDetail"===l)if("groupbuypd"===a)this.des=l,this.itemcode=window.location.pathname.match(/(\d+).html/)[1],this.extension="groupBuy",this.paramsObj= {des:this.des,itemcode:this.itemcode,extension:this.extension};else if("seo-pd"===a){var c=JSON.parse(this.$dRoot.attr("data-goods"))||{};this.paramsObj="1"===c.type?{des:"search",key:"",cid:c.cateId||""}:"3"===c.type?{des:"search",key:c.searchkey||""}:{des:l,itemcode:c.itemcode||window.location.pathname.match(/(\d+).html/)[1]}}else this.des=l,this.itemcode=window.location.pathname.match(/(\d+).html/)[1],this.str=window.location.search.split("&")[0]||"",this.token=this.str.split("?token=")[1]||"", this.paramsObj={des:this.des,itemcode:this.itemcode,token:this.token,skuId:this.skuId||"",selectedAttr:this.selectedAttr||"",invitationCode:encodeURIComponent(this.getSpecifyUrlParam({name:"invitationCode"})),storeInvitationCode:this.getSpecifyUrlParam({name:"storeInvitationCode"})},this.getDHcpsCookie(this.itemcode),this.isDetail=!0;"seo-video"===a&&(this.itemcode=window.location.pathname.match(/(\d+).html/)[1],this.paramsObj={des:"itemDetail",itemcode:this.itemcode});if("seo-video-ai"===a){c=window.location.pathname.match(/dhshorts-(.+)\.htm/); var k="";c&&c[1]&&(k=c[1]);this.paramsObj={des:"shortsdetail",content_id:k,list:"0"}}"postbuyingrequest"===this.entrance&&(c="m.dhgate.com","en"!==g.site&&(c="m."+g.site+".dhgate.com"),this.paramsObj={des:"web-in",webUrl:"https://"+c+"/static/inquiry.html"});"stylemix"===a&&(c="m.dhgate.com","en"!==g.site&&(c="m."+g.site+".dhgate.com"),this.paramsObj={des:"web-in",webUrl:"https://"+c+"/static/insootd-lp.html"});$(".j-boost-wapindex-list")[0]&&"app"!==l&&(this.paramsObj={des:"web-in",webUrl:this.couponHelpUrl|| ""},"coinsCenter"===this.couponHelpUrl&&(this.paramsObj={des:"coinsCenter"}));"app"!==l&&"fl"===a&&(this.paramsObj.des="flashdeals");"app"===l||"seo-srp"!==a&&"seo-onsh"!==a&&"seo-ca"!==a&&"seo-uk"!==a&&"seo-au"!==a&&"seo-nz"!==a&&"seo-il"!==a||!this.$dRoot.attr("data-keyword")||(this.paramsObj.des="search",this.paramsObj.key=this.$dRoot.attr("data-keyword"));"app"!==l&&"seo-category"===a&&this.$dRoot.attr("data-cid")&&(this.paramsObj.des="search",this.paramsObj.key="",this.paramsObj.cid=this.$dRoot.attr("data-cid")); "app"!==l&&"seo-bestseller"===a&&(this.paramsObj.des="search",this.$dRoot.attr("data-cid")?this.paramsObj.cid=this.$dRoot.attr("data-cid"):this.paramsObj.key=this.$dRoot.attr("data-keyword"));"app"!==l&&"store"===a&&(c=location.href.replace(/^https:\/\/.+\/store\/(\d+).*/i,"$1"),/\d+/.test(c)&&(this.paramsObj={des:"storeHome",storeId:c}));"coinsCenter"===l&&(this.paramsObj={des:"coinsCenter"});$(".j-coinsinvitelpzw")[0]&&"coinsinvitelpzw"===a&&(this.paramsObj={des:"web-in",webUrl:g.wwwURL+"/static/invitationToSendPoints/collectpointsapp.html?invite_buyerid="+ window.__DH_inviteBuyerId__});$(".j-fissionshare-wap")[0]&&"rafactivity"===a&&(this.paramsObj={des:"web-in",webUrl:g.wwwURL+"/static/fissionShare/index.html"});if($(".j-wapIndexchecknow")[0]&&"share"===a){c=this.getSpecifyUrlParam({name:"shareType"})||"";k=this.getSpecifyUrlParam({name:"shareCode"})||"";var f=this.getSpecifyUrlParam({name:"f"})||"";this.paramsObj={des:"web-in",webUrl:g.wwwURL+"/static/socialfission/index.html",shareCode:k,shareType:c,f:f}}"app"!==l&&"clp"===a&&(this.itemcode=this.getSpecifyUrlParam({name:"itemcode"}), this.paramsObj={des:"web-in",webUrl:g.wwwURL+"/static/channelNewuserzoneapp.html?itemcode="+this.itemcode});a&&-1!==a.indexOf("drt-")&&(c=$("#drt_current_page_app_link"),0a-l.startTime)window.location=l.downloadUrl},1500),window.onblur=function(){clearTimeout(l.set_timer);self.set_timer=null})},getSpecifyUrlParam:function(l){var a=l.params||g.wwwSEARCH;if(!a)return"";l=a.match(l.reg||new RegExp("(?:^\\?|.+&)"+l.name+"=([^&#]*).*","i"));return null!==l?l[1]:""},setAfTracks:function(l){var a={},c=g.cookie("vid")||"";a.tracksContent= {};a.tracksContent.vid=c;a.af_ad_type="";c=$(this.clickEl&&this.clickEl.currentTarget).attr("ab-version")||"";"wap-top"===l?(l=this.$cOpenBtn.find("img").attr("src"),a.tracksContent.resource_id=l,"homePage"===this.pagetype?(a.af_ad_type="hp-topbanner",a.tracksContent.dspm="wapen.hp.topbanner.1."):"searchPage"===this.pagetype?(a.af_ad_type="sp-topbanner",a.tracksContent.dspm="wapen.sp.topbanner.1."):"itemDetail"===this.pagetype?(a.af_ad_type="pd-topbanner",a.tracksContent.dspm="wapen.pd.topbanner.1."): "myAccountPage"===this.pagetype?(a.af_ad_type="mydh-topbanner",a.tracksContent.dspm="wapen.md.topbanner.1."):"storePage"===this.pagetype?(a.af_ad_type="st-topbanner",a.tracksContent.dspm="wapen.st.topbanner.1."):"cartPage"===this.pagetype?(a.af_ad_type="cart-topbanner",a.tracksContent.dspm="wapen.ct.topbanner.1."):"paySuccPage"===this.pagetype?(a.af_ad_type="succ-topbanner",a.tracksContent.dspm="wapen.su.topbanner.1."):(a.af_ad_type="other-topbanner",a.tracksContent.dspm="wapen.other.topbanner.1.")): "WAP-Topnew"===this.entrance?(l=this.$cOpenBtn.find("img").attr("src"),a.tracksContent.resource_id=l,"homePage"===this.pagetype?(a.af_ad_type="hp-topbannernew",a.tracksContent.dspm="wapen.hp.topbannernew"+c+".1."):"searchPage"===this.pagetype?(a.af_ad_type="sp-topbannernew",a.tracksContent.dspm="wapen.sp.topbannernew"+c+".1."):"itemDetail"===this.pagetype?(a.af_ad_type="pd-topbannernew",a.tracksContent.dspm="wapen.pd.topbannernew"+c+".1."):"myAccountPage"===this.pagetype?(a.af_ad_type="mydh-topbannernew", a.tracksContent.dspm="wapen.md.topbannernew.1."):"storePage"===this.pagetype?(a.af_ad_type="st-topbannernew",a.tracksContent.dspm="wapen.st.topbannernew.1."):"cartPage"===this.pagetype?(a.af_ad_type="cart-topbannernew",a.tracksContent.dspm="wapen.ct.topbannernew.1."):"paySuccPage"===this.pagetype?(a.af_ad_type="succ-topbannernew",a.tracksContent.dspm="wapen.su.topbannernew.1."):(a.af_ad_type="other-topbannernew",a.tracksContent.dspm="wapen.other.topbannernew.1.")):"wap-r-openapp"===l?"itemDetail"=== this.pagetype?(a.af_ad_type="pd-openapp",a.tracksContent.dspm="wapen.pd.openapp.1"):"storePage"===this.pagetype?(a.af_ad_type="store-openapp",a.tracksContent.dspm="wapen.store.openapp.1"):"seosrp"===this.pagetype&&(a.af_ad_type="seo-srp-openapp",a.tracksContent.dspm="wapen.seo-srp.openapp.1"):"homeloadicon"===l?(a.af_ad_type="hp-appdownload",a.tracksContent.dspm="wapen.hp.down.1."):"homemessageicon"===l?(a.af_ad_type="hp-mymessage",a.tracksContent.dspm="wapen.hp.mymessage.1."):"appscpwap"===l?(a.af_ad_type= "coupons-appdownload",a.tracksContent.dspm="wapen.hp.coupons-appdownload.1"):"maindirect"===l?(a.af_ad_type="right-appdownload",a.tracksContent.dspm="wapen.hp.right-appdownload.1"):"sp-appdownload"===l?(a.af_ad_type="sp-appdownload",a.tracksContent.dspm="wapen.hp.sp-appdownload.1"):"leadflu"===l?(a.af_ad_type="Popup-appdownload",a.tracksContent.dspm="wapen.hp.Popup-appdownload.1"):"menu-myorders"===l?"homePage"===this.pagetype?(a.af_ad_type="hp-menu-myorders",a.tracksContent.dspm="wapen.hp.as.myorder."): "searchPage"===this.pagetype?(a.af_ad_type="sp-menu-myorders",a.tracksContent.dspm="wapen.sp.as.myorder."):"itemDetail"===this.pagetype?(a.af_ad_type="pd-menu-myorders",a.tracksContent.dspm="wapen.pd.as.myorder."):"allCategory"===this.pagetype?(a.af_ad_type="cate-menu-myorders",a.tracksContent.dspm="wapen.cate.as.myorder."):"categoryList"===this.pagetype?(a.af_ad_type="cs-menu-myorders",a.tracksContent.dspm="wapen.cs.as.myorder."):(a.af_ad_type="other-menu-myorders",a.tracksContent.dspm="wapen.other.as.myorder."): "menu-mydhrefer"===l?"homePage"===this.pagetype?(a.af_ad_type="hp-menu-mydhrefer",a.tracksContent.dspm="wapen.hp.as.mydhrefer."):"searchPage"===this.pagetype?(a.af_ad_type="sp-menu-mydhrefer",a.tracksContent.dspm="wapen.sp.as.mydhrefer."):"itemDetail"===this.pagetype?(a.af_ad_type="pd-menu-mydhrefer",a.tracksContent.dspm="wapen.pd.as.mydhrefer."):"allCategory"===this.pagetype?(a.af_ad_type="cate-menu-mydhrefer",a.tracksContent.dspm="wapen.cate.as.mydhrefer."):"categoryList"===this.pagetype?(a.af_ad_type= "cs-menu-mydhrefer",a.tracksContent.dspm="wapen.cs.as.mydhrefer."):(a.af_ad_type="other-menu-mydhrefer",a.tracksContent.dspm="wapen.other.as.mydhrefer."):"menu-myfavorites"===l?"homePage"===this.pagetype?(a.af_ad_type="hp-menu-myfav",a.tracksContent.dspm="wapen.hp.as.myfavorites."):"searchPage"===this.pagetype?(a.af_ad_type="sp-menu-myfav",a.tracksContent.dspm="wapen.sp.as.myfavorites."):"itemDetail"===this.pagetype?(a.af_ad_type="pd-menu-myfav",a.tracksContent.dspm="wapen.pd.as.myfavorites."):"allCategory"=== this.pagetype?(a.af_ad_type="cate-menu-myfav",a.tracksContent.dspm="wapen.cate.as.myfavorites."):"categoryList"===this.pagetype?(a.af_ad_type="cs-menu-myfav",a.tracksContent.dspm="wapen.cs.as.myfavorites."):(a.af_ad_type="other-menu-myfav",a.tracksContent.dspm="wapen.other.as.myfavorites."):"menu-mydhgate"===l?"homePage"===this.pagetype?(a.af_ad_type="hp-menu-myacc",a.tracksContent.dspm="wapen.hp.as.myaccount."):"searchPage"===this.pagetype?(a.af_ad_type="sp-menu-myacc",a.tracksContent.dspm="wapen.sp.as.myaccount."): "itemDetail"===this.pagetype?(a.af_ad_type="pd-menu-myacc",a.tracksContent.dspm="wapen.pd.as.myaccount."):"allCategory"===this.pagetype?(a.af_ad_type="cate-menu-myacc",a.tracksContent.dspm="wapen.cate.as.myaccount."):"categoryList"===this.pagetype?(a.af_ad_type="cs-menu-myacc",a.tracksContent.dspm="wapen.cs.as.myaccount."):(a.af_ad_type="other-menu-myacc",a.tracksContent.dspm="wapen.other.as.myaccount."):"menu-mycoupons"===l?"homePage"===this.pagetype?(a.af_ad_type="hp-menu-mycoupons",a.tracksContent.dspm= "wapen.hp.as.mycoupons."):"searchPage"===this.pagetype?(a.af_ad_type="sp-menu-mycoupons",a.tracksContent.dspm="wapen.sp.as.mycoupons."):"itemDetail"===this.pagetype?(a.af_ad_type="pd-menu-mycoupons",a.tracksContent.dspm="wapen.pd.as.mycoupons."):"allCategory"===this.pagetype?(a.af_ad_type="cate-menu-mycoupons",a.tracksContent.dspm="wapen.cate.as.mycoupons."):"categoryList"===this.pagetype?(a.af_ad_type="cs-menu-mycoupons",a.tracksContent.dspm="wapen.cs.as.mycoupons."):(a.af_ad_type="other-menu-mycoupons", a.tracksContent.dspm="wapen.other.as.mycoupons."):"menu-mycreditcards"===l?"homePage"===this.pagetype?(a.af_ad_type="hp-menu-mycards",a.tracksContent.dspm="wapen.hp.as.mycards."):"searchPage"===this.pagetype?(a.af_ad_type="sp-menu-mycards",a.tracksContent.dspm="wapen.sp.as.mycards."):"itemDetail"===this.pagetype?(a.af_ad_type="pd-menu-mycards",a.tracksContent.dspm="wapen.pd.as.mycards."):"allCategory"===this.pagetype?(a.af_ad_type="cate-menu-mycards",a.tracksContent.dspm="wapen.cate.as.mycards."): "categoryList"===this.pagetype?(a.af_ad_type="cs-menu-mycards",a.tracksContent.dspm="wapen.cs.as.mycards."):(a.af_ad_type="other-menu-mycards",a.tracksContent.dspm="wapen.other.as.mycards."):"menu-store-membership"===l?"homePage"===this.pagetype?(a.af_ad_type="hp-menu-stmember",a.tracksContent.dspm="wapen.hp.as.mystore."):"searchPage"===this.pagetype?(a.af_ad_type="sp-menu-stmember",a.tracksContent.dspm="wapen.sp.as.mystore."):"itemDetail"===this.pagetype?(a.af_ad_type="pd-menu-stmember",a.tracksContent.dspm= "wapen.pd.as.mystore."):"allCategory"===this.pagetype?(a.af_ad_type="cate-menu-stmember",a.tracksContent.dspm="wapen.cate.as.mystore."):"categoryList"===this.pagetype?(a.af_ad_type="cs-menu-stmember",a.tracksContent.dspm="wapen.cs.as.mystore."):(a.af_ad_type="other-menu-stmember",a.tracksContent.dspm="wapen.other.as.mystore."):"menu-onestepbuy"===l?"homePage"===this.pagetype?(a.af_ad_type="hp-menu-1stepbuy",a.tracksContent.dspm="wapen.hp.as.setting."):"searchPage"===this.pagetype?(a.af_ad_type="sp-menu-1stepbuy", a.tracksContent.dspm="wapen.sp.as.setting."):"itemDetail"===this.pagetype?(a.af_ad_type="pd-menu-1stepbuy",a.tracksContent.dspm="wapen.pd.as.setting."):"allCategory"===this.pagetype?(a.af_ad_type="cate-menu-1stepbuy",a.tracksContent.dspm="wapen.cate.as.setting."):"categoryList"===this.pagetype?(a.af_ad_type="cs-menu-1stepbuy",a.tracksContent.dspm="wapen.cs.as.setting."):(a.af_ad_type="other-menu-1stepbuy",a.tracksContent.dspm="wapen.other.as.setting."):"appexclusive"===l?"itemDetail"===this.pagetype&& (a.af_ad_type="pd-appdownload",a.tracksContent.dspm="wapen.pd.down.1."):"coupon-slash"===l?(a.af_ad_type="coupons-home-slash",a.tracksContent.dspm="wapen.coupons.slashit.1."):"coupon-get"===l?(a.af_ad_type="coupons-home-getcoupons",a.tracksContent.dspm="wapen.coupons.getcoupon.1."):"coupon-coinscenter"===l?(a.af_ad_type="coupons-home-coinscenter",a.tracksContent.dspm="wapen.coupons.coinscenter.1."):"dailyrewards"===l?(a.af_ad_type="coints-getdailycoins",a.tracksContent.dspm="wapen.coints.getdailycoins.1."): "winfreeprize"===l?(a.af_ad_type="coints-win-freeprize",a.tracksContent.dspm="wapen.coints.winfreeprize.1."):"redeemcoupons"===l?(a.af_ad_type="coints-redeem-coupons",a.tracksContent.dspm="wapen.coints.redeemcoupons.1."):"coinsinvite_get"===l?(a.af_ad_type="coinsinvite-home-get",a.tracksContent.dspm="wapen.Coinsinvite.get.1"):"coinsinvite_goshopping"===l?(a.af_ad_type="coinsinvite-home-goshopping",a.tracksContent.dspm="wapen.coinsinvite.goshopping.1"):"referafriends"===l?(a.af_ad_type="rafactivity-referafriends", a.tracksContent.dspm="wapen.rafactivity.referafriends.1"):"share"===l?(a.af_ad_type="share-return",a.tracksContent.dspm="wapen.share.return.1"):"guide_get"===l?(a.af_ad_type="hp_guide_get",a.tracksContent.dspm="wapen.hp.guide_get.1"):"getnow"===l?(a.af_ad_type="waptoapp-getnow",a.tracksContent.dspm="wapen.waptoapp.getnow.1"):"mainitem"===l?(a.af_ad_type="waptoapp-mainitem",a.tracksContent.dspm="wapen.waptoapp.mainitem.1"):"card"===l?(a.af_ad_type="waptoapp-card",a.tracksContent.dspm="wapen.waptoapp.card.1"): "waptoappviewmore"===l?(a.af_ad_type="waptoapp-viewmore",a.tracksContent.dspm="wapen.waptoapp.viewmore.1"):"waptoappnbdisccard"===l?(a.af_ad_type="waptoapp-nbdisccard",a.tracksContent.dspm="wapen.waptoapp.nbdisccard.1"):"top1ic"===l?(a.af_ad_type="waptoapp-top1ic",a.tracksContent.dspm="wapen.waptoapp.top1ic.1"):"top1icdownload"===l?(a.af_ad_type="waptoapp-top1icdownload",a.tracksContent.dspm="wapen.waptoapp.top1icdownload.1"):"downloadbottom"===l?(a.af_ad_type="waptoapp-downloadbottom",a.tracksContent.dspm= "wapen.waptoapp.downloadbottom.1"):"couponnew1"===l?(a.af_ad_type="waptoapp-couponnew1",a.tracksContent.dspm="wapen.waptoapp.couponnew1.1"):"couponicnew2"===l?(a.af_ad_type="waptoapp-couponicnew2",a.tracksContent.dspm="wapen.waptoapp.couponicnew2.1"):"afftoapp1banner"===l?(a.af_ad_type="afftoapp1-banner",a.tracksContent.dspm="wapen.afftoapp1.banner.1"):"afftoapp1newitem"===l?(a.af_ad_type="afftoapp1-newitem",a.tracksContent.dspm="wapen.afftoapp1.newitem."+this.currentTarget.attr("spm-index")):"afftoapp1card"=== l?(a.af_ad_type="afftoapp1-card",a.tracksContent.dspm="wapen.afftoapp1.card."+this.currentTarget.attr("spm-index")):"afftoapp2button"===l?(a.af_ad_type="afftoapp1-button",a.tracksContent.dspm="wapen.afftoapp2.button.1"):"goodswaptoappcouponlayer"===l?(a.af_ad_type="seo-pd-openapp_popup",a.tracksContent.dspm="wapen.seo-pd.openapp_popup.1"):"goods-getinapp"===l?(a.af_ad_type="seo-pd-openapp_button",a.tracksContent.dspm="wapen.seo-pd.openapp_button.1"):"afftoapp4-newcoupon"===l?(a.af_ad_type="afftoapp4-newcoupon", a.tracksContent.dspm="wapen.afftoapp4.newcoupon.1"):"afftoapp4-newprod"===l?(a.af_ad_type="afftoapp4-newprod",a.tracksContent.dspm="wapen.afftoapp4.new."+this.currentTarget.attr("spm-index")):"afftoapp4-viewmore"===l&&(a.af_ad_type="afftoapp4-viewmore",a.tracksContent.dspm="wapen.afftoapp4.new.11");return a},openAppMethod:function(){var l=this.$dRoot.attr("spm-b"),a=null!==this.entrance?this.entrance.toLowerCase():"";this.$dRoot.attr("trackingcode");window.__exposureBuryingPoint&&"afftoapp1"!==l&& "afftoapp2"!==l&&window.__exposureBuryingPoint.init({module:$(this.clickEl),moduleName:$(this.clickEl&&this.clickEl.currentTarget).attr("spm-c")||"topbanner",moduleIndex:$(this.clickEl&&this.clickEl.currentTarget).attr("spm-index")||"1",event_type:"click",event_code:$(this.clickEl&&this.clickEl.currentTarget).attr("event-code")||"",ab_version:$(this.clickEl&&this.clickEl.currentTarget).attr("ab-version")||"",scm:$(this.clickEl&&this.clickEl.currentTarget).attr("scm")||"",event_body:{event_data:{event_entity_info:{link_type:"", item_code:this.itemcode||$(this.clickEl&&this.clickEl.currentTarget).attr("resource")||"",other:$(this.clickEl&&this.clickEl.currentTarget).attr("other")||""}}}});try{var c=this.setAfTracks(a);l="https://dhgate.onelink.me/8Qdh?";var k=this.isDetail,f=$.trim(decodeURIComponent(g.cookie("ref_f"))),d=/^bm\|aff+/i.test(f)&&k?{af_ad_type:c.af_ad_type,af_dp:"dhgate://virtual?params="+encodeURI(encodeURI(JSON.stringify($.extend(!0,{},{d1code:""},{utm_source:""},{utm_medium:""},{utm_campaign:""},{utm_term:""}, {utm_content:""},{cst1:""},{cst2:""},c.tracksContent,this.paramsObj||{})))),deep_link_value:"dhgate://virtual?params="+encodeURI(encodeURI(JSON.stringify($.extend(!0,{},{d1code:""},{utm_source:""},{utm_medium:""},{utm_campaign:""},{utm_term:""},{utm_content:""},{cst1:""},{cst2:""},c.tracksContent,this.paramsObj||{})))),is_retargeting:"true",af_force_deeplink:!0}:{af_ad_type:c.af_ad_type,af_dp:"dhgate://virtual?params="+encodeURI(encodeURI(JSON.stringify($.extend(!0,{},{d1code:""},{utm_source:""}, {utm_medium:""},{utm_campaign:""},{utm_term:""},{utm_content:""},{cst1:""},{cst2:""},c.tracksContent,this.paramsObj||{})))),deep_link_value:"dhgate://virtual?params="+encodeURI(encodeURI(JSON.stringify($.extend(!0,{},{d1code:""},{utm_source:""},{utm_medium:""},{utm_campaign:""},{utm_term:""},{utm_content:""},{cst1:""},{cst2:""},c.tracksContent,this.paramsObj||{})))),is_retargeting:"true"};c=[];for(var e in d)c.push(e+"="+d[e]);l+=c.join("&");this.currentTarget[0]&&this.currentTarget.attr("href")? this.currentTarget.attr("href",l):window.location.href=l;return!0}catch(h){return this.startTime=Date.now(),this.configParam(),this.Deeplink.setup(this.config),this.directDowload(),this.Deeplink.open(this.schemeUrl),!1}},channelData:function(){return JSON.parse('{"social|Facebook|":"af_channel=[1]&Pid=[2]&c=[3]&af_adset=[4]&af_ad=[5]&af_sub1=[6]","social|Instagram|":"af_channel=[1]&Pid=[2]&c=[3]&af_adset=[4]&af_ad=[5]&af_sub1=[6]","social|Twitter|":"af_channel=[1]&Pid=[2]&c=[3]&af_adset=[4]&af_ad=[5]&af_sub1=[6]","social|Pinterest|":"af_channel=[1]&Pid=[2]&c=[3]&af_adset=[4]&af_ad=[5]&af_sub1=[6]","social|Tiktok|":"af_channel=[1]&Pid=[2]&c=[3]&af_adset=[4]&af_ad=[5]&af_sub1=[6]","social|Reddit|":"af_channel=[1]&Pid=[2]&c=[3]&af_adset=[4]&af_ad=[5]&af_sub1=[6]","bm|aarki|":"af_channel=[sns ads]&Pid=[2]","bm|fb|":"af_channel=[sns ads]&Pid=[2]&c=[3]","bm|fb|fb|":"af_channel=[sns ads]&Pid=[2]&c=[4]","bm|liftoff|":"af_channel=[sns ads]&Pid=[2]","bm|remerge|":"af_channel=[sns ads]&Pid=[2]","bm|revxapp|":"af_channel=[sns ads]&Pid=[2]","bm|youappiapp|":"af_channel=[sns ads]&Pid=[2]","bm|snapchat|":"af_channel=[sns ads]&Pid=[2]","bm|Bing|RMKT|":"af_channel=[ppc]&Pid=[2][3]&c=[4]","bm|Bing|Search|":"af_channel=[ppc]&Pid=[2][3]]&c=[4]","bm|Bing|PA|":"af_channel=[ppc]&Pid=[2][3]]&c=[4]","bm|144010013|":"af_channel=[ppc]&Pid=[4]","bm|Criteo|RMKT|":"af_channel=[ppc]&Pid=[2][3]&c=[4]","bm|GSN|Brand|":"af_channel=[ppc]&Pid[2][3]&c=[4]","bm|GSN|DSA|":"af_channel=[ppc]&Pid=[2][3]&c=[4]","GAAPP":"af_channel=[ppc]&Pid=[6]&c=[5]","bm|GMC|GoogleAPP|":"af_channel=[ppc]&Pid=[3]&c=[4]","bm|GSN|Platform|":"af_channel=[ppc]&Pid=[2][3]&c=[4]","bm|GSN|Products|":"af_channel=[ppc]&Pid=[2][3]&c=[4]","bm|GDN|Dyn|":"af_channel=[ppc]&Pid=[2][3]","bm|GMC|pla|":"af_channel=[ppc]&Pid=[2][3]&c=[4]","bm|011018005005|":"af_channel=[ppc]&Pid=[4]","bm|rtbhouse|RMKT|":"af_channel=[ppc]&Pid=[2][3]","bm|rtbhouse|UA|":"af_channel=[ppc]&Pid=[2][3]","bm|aff|admitad|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|impact|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|cf|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|yfaf|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|indoleads|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|lc|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|maxbounty|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|moonrover|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|netaff|":"af_channel=[affiliate]&Pid=[3]&c=[4]","bm|aff|refpay|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|toroad|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|vcommission|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|wguk|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]&c=[9]","bm|aff|wgfr|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]&c=[9]","bm|aff|ZT|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|flexoffers|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|inasia|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|arabclicks|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|adpump|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|epn|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|85324sas|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|cj|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bda|content|":"af_channel=[affiliate]&Pid=[4]&af_siteid=[3]","bm|aff|mainad|":"af_channel=[affiliate]&Pid=[3]","bm|aff|timeone|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|wg|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]&c=[9]","bm|aff|FRTT|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[5]&c=[4]","bm|aff|TT|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]&c=[9]","bm|aff|clickdealer|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|taboola|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|actionpay|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]","bm|aff|cityads|":"af_channel=[affiliate]&Pid=[3]&af_siteid=[4]"}')}, getChannelOnelink:function(){var l=this.channelData(),a=$.trim(decodeURIComponent(g.cookie("ref_f"))),c=a.split("|"),k=[],f={};$.each(l,function(d,e){var h=a.toLowerCase();d=d.toLowerCase();-1!==h.indexOf(d)&&(k=("bm|fb|"===d?l["bm|fb|"]:"bm|fb|fb|"===d?l["bm|fb|fb|"]:e).split("&"),$.each(k||[],function(t,u){t=u.split("=")[1];u=u.split("=")[0];if(/\[(\d+)\]/g.test(t)){var m=t.split(""),p="";$.each(m||[],function(v,w){$.isNumeric(w)&&(p=v===m.length-2?p+c[w-1]:p+(c[w-1]+" "))});f[u]=encodeURIComponent(p)}else t= t.split(""),t.pop(),t.shift(),f[u]=encodeURIComponent(t.join(""))}))});return f},evokeDirectly:function(l){setTimeout($.proxy(function(){var a=$.trim(decodeURIComponent(g.cookie("ref_f"))),c=location.pathname;"app"!==$("body").attr("data-pagetype")&&/^bm\|aff\|.+/i.test(a)&&(/^\/product\/.+\.html$/i.test(c)||/^\/$/.test(c)||/^\/store\/\d+$/i.test(c)||/^\/static\/flashDeals\.html$/i.test(c)||/^\/sales\/.+\.html$/i.test(c))&&(this.init({isEvokeDirectly:!0}),this.Deeplink.open(this.schemeUrl))},this), 500)}}}); define("common/appSpread","common/config tools/jquery.cookie tpl/appSpreadTpl common/appopen lib/underscore common/getAppOpenData common/recordClickMessage common/countdownNew".split(" "),function(g,n,q,l,a,c,k,f){return{init:function(d){this.setOptions(d);this.dRoot=this.options.dRoot;this.cHeaderWarp=this.options.cHeaderWarp;this.cDhApp=this.options.cDhApp;this.androidStore=this.options.androidStore;this.iosStore=this.options.iosStore;this.cHide=this.options.cHide;this.cOpenBtn=this.options.cOpenBtn;this.cCloseBtn= this.options.cCloseBtn;this.template=this.options.template;this.tpl=this.options.tpl;this.cookieName=this.options.cookieName;this.localName=this.options.localName;this.Appopen=this.options.Appopen;this.gaCallback=this.options.gaCallback;this.renderCallback=this.options.renderCallback;this.closeCallback=this.options.closeCallback;this.activityLogo=this.options.activityLogo;this.cHomeLoadIcon=this.options.cHomeLoadIcon;this.cHomeMessengerIcon=this.options.cHomeMessengerIcon;this.cHomeMenuWapToApp=this.options.cHomeMenuWapToApp; this.cHomeMenuWapToApp2=this.options.cHomeMenuWapToApp2;this.cDetailExclusiveWapToApp=this.options.cDetailExclusiveWapToApp;this.cDetailExclusiveWapToApp2=this.options.cDetailExclusiveWapToApp2;this.cLeadFluIframelayer=this.options.cLeadFluIframelayer;this.cLeadFlulayer=this.options.cLeadFlulayer;this.initElement();this.initEvent();c.init($.proxy(function(e){"en"===g.countryCur&&(e.data.appSumCouponAmount="$59");if(e.data){e.data.countDownTitle="en"===g.countryCur?$.lang["offer ends in:"]:$.lang["ends in"]; if(e.data.abVersion&&""!==e.data.abVersion){var h=e.data.abVersion.split("|");$.each(h,function(t,u){t=h[t];-1!=t.indexOf("580")&&(e.data.abVersion580=t)})}"580_1"===e.data.abVersion580?(this.$body.attr("data-pagetype"),e.data.isNew&&e.data.countdownNewUserTopBanner&&e.data.countdownNewUserTopBanner.bgImg&&"1"===e.data.countdownNewUserTopBanner.open&&e.data.appSumCouponAmount?(e.data.topImgUrl=e.data.countdownNewUserTopBanner.bgImg,e.data.guideText=e.data.countdownNewUserTopBanner.guideText,e.data.entrance= "WAP-Topnew"):e.data.countdownOldUserTopBanner&&e.data.countdownOldUserTopBanner.bgImg&&"1"===e.data.countdownOldUserTopBanner.open&&(e.data.topImgUrl=e.data.countdownOldUserTopBanner.bgImg,e.data.guideText=e.data.countdownOldUserTopBanner.guideText,e.data.entrance="WAP-Top")):(this.$body.attr("data-pagetype"),e.data.isNew&&e.data.newUserTopBanner&&e.data.newUserTopBanner[0]&&e.data.newUserTopBanner[0].img&&"1"===e.data.newUserTopBanner[0].open?(e.data.topImgUrl=e.data.newUserTopBanner[0].img,e.data.entrance= "WAP-Topnew"):!e.data.isNew&&e.data.oldUserTopBanner&&e.data.oldUserTopBanner[0]&&e.data.oldUserTopBanner[0].img&&"1"===e.data.oldUserTopBanner[0].open&&(e.data.topImgUrl=e.data.oldUserTopBanner[0].img,e.data.entrance="WAP-Top"));e.data.isNew||!e.data.oldUserDownload||"1"!==e.data.oldUserDownload.open||!e.data.oldUserDownload.img||"app"===this.pagetype||"y"!==g.cookie("__dh_bigGiftBagClose__")&&0!==$(".j-bigGift-bagcon").length||this.renderLeadFlu(e.data);"paySuccPage"===this.pagetype||"cartPage"=== this.pagetype?e.data.downLoadIsShow&&this.render(e.data):(this.render(e.data),e.data.menuRiverSplitFlow&&($(this.cHomeMenuWapToApp).removeClass(this.cHide),$(this.cHomeMenuWapToApp2).addClass(this.cHide)),e.data.exclusivePrice&&e.data.menuRiverIsOpen?($(this.cDetailExclusiveWapToApp2).removeClass(this.cHide),$(this.cDetailExclusiveWapToApp).addClass(this.cHide)):($(this.cDetailExclusiveWapToApp2).addClass(this.cHide),$(this.cDetailExclusiveWapToApp).removeClass(this.cHide)))}},this))},setOptions:function(d){this.options= {dRoot:"#J_appBanner",cHeaderWarp:".j-headerWarp",androidStore:"https://app.dhresource.com/mobile/dhgate_buyer.apk",iosStore:"https://itunes.apple.com/us/app/dhgate-shop-smart-shop-direct/id905869418?l=zh&ls=1&mt=8",cHide:"dhm-hide",cOpenBtn:".j-openApp",cCloseBtn:".j-closeApp",template:a.template,tpl:q,cookieName:"DHMAppSpreadBanner",localName:"DHMAppBannerNew",activityLogo:".j-activityLogo",cHomeLoadIcon:".j-homeLoadIcon",cHomeMessengerIcon:"#J_homeMessengerIcon",cHomeMenuWapToApp:".j-menu-waptoapp", cHomeMenuWapToApp2:".j-menu-waptoapp2",cDetailExclusiveWapToApp:".j-detail-exclusive",cDetailExclusiveWapToApp2:".j-detail-exclusive2",Appopen:l,gaCallback:$.noop,renderCallback:$.noop,closeCallback:$.noop,cLeadFluIframelayer:".j-lead-flu-iframelayer",cLeadFlulayer:".j-lead-flu-layer"};$.extend(this.options,d||{})},initElement:function(){this.$dRoot=$(this.dRoot);this.$cHeaderWarp=$(this.cHeaderWarp);this.$cCloseBtn=$(this.cCloseBtn);this.$cOpenBtn=$(this.cOpenBtn);this.$body=this.$body||$("body"); this.$activityLogo=$(this.activityLogo);this.$cHomeLoadIcon=$(this.cHomeLoadIcon);this.$cHomeMessengerIcon=$(this.cHomeMessengerIcon);this.pagetype=this.$body.attr("data-pagetype")},initEvent:function(){this.$cHeaderWarp[0]&&!this.$dRoot[0]&&(this.$body.prepend('
    '),this.$body.prepend('
    '),this.initElement());$("body").on("click",this.cOpenBtn,$.proxy(this.openApp,this));$(".j-lead-flu-box").on("click",this.cCloseBtn,$.proxy(this.closeTip, this));$(".j-lead-flu-box").on("click",".j-lead-flu-close",$.proxy(this.closeLeadFlu,this));this.utmParameter()},isIphoneOrAndroid:function(){var d=navigator.userAgent;return/(A|a)ndroid/i.test(d)?"android":/i(P|p)hone/i.test(d)?"iphone":/i(P|p)ad/i.test(d)?"ipad":!1},setCookie:function(d){g.cookie(this.cookieName,d,{path:"/"})},getCookie:function(){return g.cookie(this.cookieName)},setItem:function(d){g.isLocalStorageNameSupported()&&localStorage.setItem(this.localName,d)},getItem:function(){if(g.isLocalStorageNameSupported())return localStorage.getItem(this.localName)}, openApp:function(d){this.isIphoneOrAndroid();var e=$(d.currentTarget),h=void 0!==d?$(d.currentTarget).attr("data-entrance"):"";this.Appopen.init({entrance:h,currentTarget:e,clickEl:d});this.gaCallback&&this.gaCallback()},closeTip:function(){this.$dRoot.addClass(this.cHide);this.closeCallback&&this.closeCallback();this.setItem(1);g.preventClick()},closeLeadFlu:function(){$(this.cLeadFluIframelayer).addClass(this.cHide);$(this.cLeadFlulayer).addClass(this.cHide);$(this.cLeadFlulayer).css("background", "")},jump:function(d){window.location=d},getAccessTimes:function(){var d=this.getItem();d||(d=4,this.setItem("4"));this.getCookie()||(this.setItem(3>d?++d:4),this.setCookie("1"));return d},render:function(d){if("kol"!==this.$dRoot.attr("data-type")){var e=this.template(this.tpl.main.join(""))(d);if("y"!==g.cookie("__dh_pwa_a2hs__")&&this.isIphoneOrAndroid()&&!(4>this.getAccessTimes())){var h=window.location.href,t=/bm\|UnionpayInter\|/i,u=g.cookie("ref_f")||"";1===window.__DH_MSITE_fBmUnionpayinter? (this.$dRoot.html(e).addClass(this.cHide),this.$body.addClass("topdown")):t.test(h)||t.test(u)?(this.$dRoot.html(e).addClass(this.cHide),this.$body.addClass("topdown")):this.$dRoot.html(e).removeClass(this.cHide);d.topImgUrl&&this.renderCallback&&this.renderCallback();this.initElement();window.__exposureBuryingPoint&&window.__exposureBuryingPoint.init({module:$("#J_appBanner"),moduleName:"topbanner",moduleIndex:"1",event_type:"",ab_version:d.abVersion,event_body:{event_data:{event_entity_info:{link_type:""}}}}); "580_1"===d.abVersion580&&d.isNew&&d.appSumCouponAmount&&this.countDownFn();"en"!==g.countryCur&&this.$activityLogo.removeClass("activityLogo");"homePage"===this.$body.attr("data-pagetype")&&(!1===d.isNew&&g.cookie("b2b_b_t_v2")&&(this.$cHomeLoadIcon.find("span").html($.lang["Open App"]),this.$cHomeLoadIcon.removeClass(this.cHide)),d.myMessageIsOpen&&(d.myMessageIsShow?this.$cHomeMessengerIcon.removeClass(this.cHide).find("i").show():this.$cHomeMessengerIcon.removeClass(this.cHide).find("i").hide().removeClass(this.cHide)))}}}, countDownFn:function(){var d=(new Date).setMinutes((new Date).getMinutes()+30);d=(new Date(d)).getTime();var e=null,h=$(".j-topCountDwonWrap");f.init({endTime:d,runCallback:function(t){0===parseInt(t.groupHour)&&0===parseInt(t.minute)&&0===parseInt(t.second)?h.hide():e?(e.eq(0).attr("data-content-after",t.groupHour.toString()),e.eq(1).attr("data-content-after",t.minute.toString()),e.eq(2).attr("data-content-after",t.second.toString())):(h.html(['',':','',':',''].join("")),e=h.find("span.toptime-nub"))}})},renderLeadFlu:function(d){d=this.template(this.tpl.lead_flu.join(""))(d);0<$(this.cLeadFlulayer).length&&$(".j-lead-flu").remove();$(".j-lead-flu-box").html(d); $(this.cLeadFluIframelayer).removeClass(this.cHide);$(this.cLeadFlulayer).removeClass(this.cHide)},recordClickMessage:function(){k.get($.proxy(function(d){"0x0000"===d.state&&this.$cHomeMessengerIcon.find("i").hide()},this))},utmParameter:function(){var d=new Image,e=location.search;"app"===this.pagetype&&(e=e?e+"&clientextra=wapinapp":e+"?clientextra=wapinapp");d.onload=function(){};d.src=g.mrd_dhgate+"/prod/addCookieChannel.do"+e}}}); define("common/countdownNew",["common/config","common/serverTime","lib/underscore"],function(g,n,q){var l=function(a){this.setOptions(a);this.serverTime=1*this.options.serverTime;this.endTime=q.isFunction(this.options.endTime)?1*this.options.endTime():1*(new Date(this.options.endTime)).getTime();this.timeLeft=1*this.options.timeLeft;this.runCallback=this.options.runCallback;this.timer=null;this.initTime=0;window.requestAnimationFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame|| window.mozRequestAnimationFrame||function(c){window.setTimeout(c,1E3/60)};0<=this.timeLeft&&(this.__timeLeftFlag=!0);0c-a||!0===f&&0>k)return-1;m.day=10>e?"0"+e:""+e;m.groupHour=10>h?"0"+h:""+h;m.hour=10>t?"0"+t:""+t;m.minute=10>u?"0"+u:""+u;m.second=10>d?"0"+d:""+d;return m},countDown:function(a){var c=this,k=(new Date).getTime(),f=this.remainingTime();k-this.initTime>=a&&(!0!==this.__timeLeftFlag?this.serverTime+=a:this.timeLeft-= a,this.initTime=k,this.runCallback(f));0>f?this.runCallback(-1):requestAnimationFrame(function(){return c.countDown(a)})}});return l}); define("common/getPopularCountryList",["common/config"],function(g){return{get:function(){return[{whitherCountryId:"US",whitherCountryName:$.lang.unitedStates},{whitherCountryId:"BR",whitherCountryName:$.lang.brazil},{whitherCountryId:"AU",whitherCountryName:$.lang.australia},{whitherCountryId:"UK",whitherCountryName:$.lang.unitedKingdom},{whitherCountryId:"ES",whitherCountryName:$.lang.spain},{whitherCountryId:"FR",whitherCountryName:$.lang.france},{whitherCountryId:"CA",whitherCountryName:$.lang.canada}, {whitherCountryId:"PL",whitherCountryName:$.lang.poland},{whitherCountryId:"TR",whitherCountryName:$.lang.turkey},{whitherCountryId:"SE",whitherCountryName:$.lang.sweden},{whitherCountryId:"IL",whitherCountryName:$.lang.israel},{whitherCountryId:"IT",whitherCountryName:$.lang.italy},{whitherCountryId:"NZ",whitherCountryName:$.lang.newZealand},{whitherCountryId:"DE",whitherCountryName:$.lang.germany}]}}}); define("common/header/getCartSoldOutRemind",["common/config","tools/getSpecifyUrlParam","checkoutflow/dataErrorLog"],function(g,n,q){q=new q({flag:!0,url:"/mobileApiWeb/biz-FeedBack-log.do"});return{init:function(l){$.ajax({type:"GET",url:g.mall_dhgate+"/mshop/cart-Cart-getCartSoldOutRemind.do",data:{client:"wap"},async:!0,cache:!1,dataType:"json",xhrFields:{withCredentials:!0},context:this,success:function(a){l&&l()},error:function(){l&&l();try{throw"error(): request is wrong";}catch(a){q.events.trigger("save:dataErrorLog", {message:a,url:finalUrl,params:params,custom:{errorData:arguments}})}}})}}}); define("common/header/EDMConfirmEmail",["common/config","lib/backbone","checkoutflow/popupTip","tpl/header/topMenuInitTpl"],function(g,n,q,l){var a=n.Model.extend({defaults:function(){return{code:-1,data:""}},initialize:function(c,k){this.setOptions(k);this.ajaxOptions=this.options.ajaxOptions},setOptions:function(c){this.options={ajaxOptions:{url:"/mobileApiWeb/home-Common-sendConfirmEDMEmail.do",type:"GET",data:{version:1,language:g.countryCur,client:"wap"},dataType:"jsonp",async:!0,cache:!1,processData:!0}}; $.extend(!0,this.options,c||{})},urlRoot:function(){return g.app_dhgate+this.ajaxOptions.url},sync:function(c,k,f){this.__params=$.extend(!0,{},this.ajaxOptions,f||{});return n.sync.call(this,null,this,$.extend(!0,{},this.ajaxOptions,{url:this.url()},f))},parse:function(c){var k={};k.code="0x0000"===c.state?200:-1;-1!==k.code&&(k.result=c.data);return k}});return n.View.extend({el:"body",events:{},initialize:function(c){this.setOptions(c);this.cAutoLayer=this.options.cAutoLayer;this.cHide=this.options.cHide; this.model=this.options.model;this.template=this.options.template;this.tpl=this.options.tpl;this.initEvent();this.initElement()},setOptions:function(c){this.options={cAutoLayer:".j-auto-layer",cHide:"dhm-hide",model:new a,template:_.template,tpl:l};$.extend(!0,this.options,c||{})},initEvent:function(){this.listenTo(this.model,"sync",this.success);this.listenTo(this.model,"error",this.error);$(".j-categoryWarp").on("click",".j-confirmEmail a",$.proxy(this.sendConfirmEDMEmail,this))},initElement:function(){this.$body= this.$body||$("body");this.$cAutoLayer=$(this.cAutoLayer)},success:function(c,k,f){if(200===c.get("code"))this.render(c.attributes);else try{throw"success(): data is wrong";}catch(d){}},error:function(){try{throw"error(): request is wrong";}catch(c){}},messageTips:function(){var c=this;q.events.trigger("popupTip:autoTip",{callback:function(){c.$cAutoLayer.removeClass(c.cHide).animate({opacity:1},1200);setTimeout(function(){c.$cAutoLayer.animate({opacity:0},1200,function(){c.$cAutoLayer.addClass(c.cHide)})}, 3E3)}})},render:function(c){c=this.template(this.tpl.needEDMEmailConfirmTips.join(""))(c);this.$cAutoLayer[0]?this.$cAutoLayer.html(c):this.$body.append('
    '+c+"
    ");this.initElement();this.setAutoLayerStyle();this.messageTips()},setAutoLayerStyle:function(){this.$cAutoLayer.css({"margin-top":-parseInt(1*this.$cAutoLayer.outerHeight()/2)})},sendConfirmEDMEmail:function(){this.model.fetch()}})}); define("common/header/buyerUserInfo",["common/config","tools/jquery.cookie","lib/underscore","common/header/getCartSoldOutRemind"],function(g,n,q,l){n=function(a){this.setOptions(a);this.url=g.app_dhgate+this.options.api.url;this.param=this.options.api.param;this.successAfter=this.options.successAfter;this.failAfter=this.options.failAfter;this.fetch()};$.extend(n.prototype,{setOptions:function(a){this.options={api:{url:"/musr/logodata.do",param:{language:g.countryCur,client:"wap",yellowtip:this.getUrlParam("type")}}, successAfter:$.noop,failAfter:$.noop};$.extend(!0,this.options,a||{})},fetch:function(){$.ajax({type:"GET",url:this.url,async:!0,cache:!1,dataType:"json",data:$.extend({},this.param,{userType:g.userType}),context:this,xhrFields:{withCredentials:!0},success:function(a){var c=a.data;if(a&&"0x0000"===a.state&&a.data){a=window.__DH_MSITE_CONFIG__.sumPrice=c.sumPrice||0;var k=window.__DH_MSITE_sumPriceAbVersion__=c.sumPriceAbVersion||"",f=$(".j-newUserBigBag");0!==a&&(f.removeClass("dhm-hide"),$(".j-register-sendcoupon-innerBox").html($.lang.replaceTplVar("Head_signupNewUserCoupon", {val:c.sumPrice})),$(".j-register-sendcoupons-innerBox").html($.lang.replaceTplVar("Head_signupNewUserCoupon",{val:c.sumPrice})),$(".j-register-sendcoupon").removeClass("dhm-hide"),$(".j-register-sendcouponBox").removeClass("dhm-hide"),window.__exposureBuryingPoint&&f[0]&&window.__exposureBuryingPoint.init({module:f,moduleName:"newUserBigBag",moduleIndex:"1",event_type:"expose",event_code:"",ab_version:k,event_body:{event_data:{event_entity_info:{link_type:""}}}}),window.__exposureBuryingPoint&&$(".j-register-sendcoupon")[0]&& window.__exposureBuryingPoint.init({module:$(".j-register-sendcoupon"),moduleName:"registercoupon",moduleIndex:"1",event_type:"expose",event_code:"",event_body:{event_data:{event_entity_info:{other:"coupon_code:"+c.sellerCouponCode}}}}));this.setUserName(g.b2b_nick_n);this.setCartSum(c.cartnum);this.setMessageSum(c.msgnum);this.setConfirmEmail(c.needEDMEmailConfirm);this.setStoreMembership(c.showstoremembership);this.setMyDhgate(c.mydhgateview);this.setMobileVerification(c.personlizeview);this.successAfter(c); a=$("body").attr("spm-b");0"+$.lang.Head_not+" "+a+"? "+ $.lang.sign_out+"

    "):c+("

    "+a+" "+$.lang.Head_not+"? "+$.lang.sign_out+"

    "),k[0]&&k.html(c))},setConfirmEmail:function(a){var c=$(".j-confirmEmail");a&&c[0]&&c.removeClass("dhm-hide")},setStoreMembership:function(a){a&&"show"===a&&$(".j-menu-tip").removeClass("dhm-hide")},setHearCategoryBtnState:function(a, c){var k=$(".j-headCategoryBtn");if(!q.isNumber(1*a)||isNaN(1*a))a=0;if(!q.isNumber(1*c)||isNaN(1*c))c=0;(0")},setMyDhgate:function(a){a&&"show"===a&&$(".j-menuDhagte-tip").removeClass("dhm-hide")},setMobileVerification:function(a){a&&"show"===a&&$(".j-menuPersonalize-tip").removeClass("dhm-hide")}});return n}); define("common/header/hotKeyWord",["common/config","lib/backbone","tpl/header/hotKeyWordTpl","checkoutflow/dataErrorLog"],function(g,n,q,l){var a=n.Model.extend({defaults:function(){return{code:-1,list:[],wapLinkUrl:""}},initialize:function(c,k){this.setOptions(k);this.ajaxOptions=this.options.ajaxOptions},setOptions:function(c){this.options={ajaxOptions:{url:"/appsearch/hotKeyword.do",data:{client:"wap",language:g.countryCur,version:"1.0",count:30,channel:"dhgate",dispCurrency:$.__currentCurrency}, type:"GET",async:!0,cache:!1,dataType:"jsonp",processData:!0}};$.extend(!0,this.options,c||{})},urlRoot:function(){return g.mrd_dhgate+this.ajaxOptions.url},sync:function(c,k,f){this.__params=$.extend(!0,{},this.ajaxOptions,f||{});return n.sync.call(this,null,this,$.extend(!0,{},this.ajaxOptions,{url:this.url()},f))},parse:function(c){var k={};k.code="0x0000"===c.state?200:-1;k.list=[];k.wapLinkUrl="";if(c.data&&c.data.wordList&&0","").replace("",""):"";f.cid=d.cid;f.cateName=d.cateName;f.labelList=d.labelList;k.list.push(f)});c.data&&c.data.storeList&&$.each(c.data.storeList,function(f,d){f={};f.storeName=d.storeName;f.supplierSeq=d.supplierSeq;k.storeList.push(f)});c.data&&c.data.wapLinkUrl&&(k.wapLinkUrl=c.data.wapLinkUrl||"");void 0!==c.data.adResult&&(k.storeName=c.data.adResult.storeName,k.storeFeedback=c.data.adResult.storeFeedback, k.storeUrl=c.data.adResult.storeUrl,k.scmJson=c.data.adResult.scmJson,$.each(c.data.adResult.bitList||[],function(f,d){f={};f.imgUrl=d.imgUrl;f.promotionDetailUrl=d.promotionDetailUrl;f.scmJson=d.scmJson;k.bitList.push(f)}));return k}});return n.View.extend({el:".j-suggestList",events:{"click .j-searchlistClose":"close"},initialize:function(c){this.setOptions(c);this.cCloseBtn=this.options.cCloseBtn;this.cHide=this.options.cHide;this.cHot=this.options.cHot;this.dSearchInput=this.options.dSearchInput; this.template=this.options.template;this.model=this.options.model;this.dataErrorLog=this.options.dataErrorLog;this.cache={};this.initEvent();this.initElement();this.setKey()},initEvent:function(){this.on("render",this.load,this);this.listenTo(this.model,"sync",this.success);this.listenTo(this.model,"error",this.error)},initElement:function(){this.$body=this.body||$("body");this.$cCloseBtn=$(this.cCloseBtn);this.$dSearchInput=$(this.dSearchInput)},setOptions:function(c){this.options={cCloseBtn:".j-searchlistClose", cHide:"dhm-hide",cHot:"search-hot",dSearchInput:"#J_searchInput",template:_.template(q.join("")),model:new a,dataErrorLog:new l({flag:!1,url:"/mobileApiWeb/biz-FeedBack-log.do"})};$.extend(!0,this.options,c||{})},getParam:function(c){return $.param(c.data||c)},load:function(c){void 0===this.cache[this.getParam(c)]?this.model.fetch(c):this.render(null,this.getParam(c))},success:function(c,k,f){if(200===c.get("code"))this.render(this.tplRender(this.getParam(f.data)),null);else try{throw"success(): data is wrong"; }catch(d){this.dataErrorLog.events.trigger("save:dataErrorLog",{message:d,url:this.model.__params.url,params:this.model.__params.data,result:k})}},error:function(c,k,f){try{throw"error(): request is wrong";}catch(d){this.dataErrorLog.events.trigger("save:dataErrorLog",{message:d,url:this.model.__params.url,params:this.model.__params.data})}},tplRender:function(c){return this.cache[c]=this.template(this.model.attributes)},render:function(c,k){k=k?this.cache[k]:"";c||k?this.$el.html(c||k).removeClass(this.cHide): this.close();this.initElement()},close:function(){this.$el.addClass(this.cHide).html("")},getUrlParam:function(c){var k=location.href;k=k.substring(k.indexOf("?")+1,k.length).split("&");for(var f={},d=0,e;e=k[d];d++)f[e.substring(0,e.indexOf("=")).toLowerCase()]=e.substring(e.indexOf("=")+1,e.length);c=f[c.toLowerCase()];return"undefined"==typeof c?"":c.replace(/(.+)#.*/,"$1").replace(/\+/g," ")},setKey:function(){this.getUrlParam("key");var c=$.trim(this.$body.attr("data-keyword")||"");""!==c?(this.$dSearchInput.addClass("inputtext"), this.$dSearchInput.val(decodeURIComponent(c))):this.$dSearchInput.removeClass("inputtext")}})}); define("common/header/topSearch","common/config common/header/recentKeyWord common/header/hotKeyWord common/header/suggest common/getUserInfo tools/getSpecifyUrlParam common/header/petArea".split(" "),function(g,n,q,l,a,c,k){return Backbone.View.extend({el:"body",events:{},initialize:function(f){this.setOptions(f);this.recentKeyWord=this.options.recentKeyWord;this.hotKeyWord=this.options.hotKeyWord;this.petArea=this.options.petArea;this.suggest=this.options.suggest;this.cHtml=this.options.cHtml;this.cHeaderWarp= this.options.cHeaderWarp;this.cSearch=this.options.cSearch;this.cSectionActive=this.options.cSectionActive;this.cSearchWarp=this.options.cSearchWarp;this.dSearchInput=this.options.dSearchInput;this.cBigsearchcon=this.options.cBigsearchcon;this.cNormal=this.options.cNormal;this.cActive=this.options.cActive;this.cInputText=this.options.cInputText;this.dSearchList=this.options.dSearchList;this.cHide=this.options.cHide;this.downHide=this.options.downHide;this.cSearchfixedShadow=this.options.cSearchfixedShadow; this.cSearchKey=this.options.cSearchKey;this.dCloseBtn=this.options.dCloseBtn;this.dDeleteBtn=this.options.dDeleteBtn;this.dSearchBtn=this.options.dSearchBtn;this.cCateId=this.options.cCateId;this.cTagName=this.options.cTagName;this.cSchtypeId=this.options.cSchtypeId;this.dHistoryDefault=this.options.dHistoryDefault;this.dHistorylist=this.options.dHistorylist;this.dHotSearch=this.options.dHotSearch;this.dSuggestList=this.options.dSuggestList;this.cPetAreaWrap=this.options.cPetAreaWrap;this.timer= null;this.spmA=$("[name=spm-a]").attr("content")||"";this.spmB=$("body").attr("spm-b")||"";this.spmC="searchinner";this.spmD="1";this.initElement();this.initEvent()},setOptions:function(f){this.options={recentKeyWord:new n,hotKeyWord:new q,petArea:k.init(),suggest:new l,cHtml:"dhm-htmlOverflow",cHeaderWarp:".j-headerWarp",cSearch:"#J_search",cBigsearchcon:".j-head-bigsearchcon",cSectionActive:"section-active",cSearchWarp:".j-search-box",dSearchInput:"#J_searchInput",cNormal:"search-mar0",cActive:"search-mar", cInputText:"inputtext",dSearchList:"#J_searchList",cHide:"dhm-hide",downHide:"h-downhide",dCloseBtn:"#J_searchCl",dDeleteBtn:"#J_searchDel",dSearchBtn:"#J_searchBtn",cTagName:"#tagId",cSearchfixedShadow:".j-searchfixedShadow",cCateId:"#cateId",cSchtypeId:"#schtypeId",dSuggestList:".j-suggestList",dHistorylist:".j-historylist",dHotSearch:".j-hotSearch",dHistoryDefault:"history-default",cPetAreaWrap:".j-search-petArea"};$.extend(!0,this.options,f||{})},initElement:function(){this.$html=$("html");this.$window= $(window);this.$body=this.body||$("body");this.$cHeaderWarp=$(this.cHeaderWarp);this.$cSearch=$(this.cSearch);this.$cSearchWarp=$(this.cSearchWarp);this.$cSearchfixedShadow=$(this.cSearchfixedShadow);this.$dSearchInput=$(this.dSearchInput);this.$dSearchList=$(this.dSearchList);this.$dCloseBtn=$(this.dCloseBtn);this.$dDeleteBtn=$(this.dDeleteBtn);this.$dSearchBtn=$(this.dSearchBtn);this.$cCateId=$(this.cCateId);this.$cTagName=$(this.cTagName);this.$cSchtypeId=$(this.cSchtypeId);this.$dHistorylist= $(this.dHistorylist);this.$dHotSearch=$(this.dHotSearch);this.$dSuggestList=$(this.dSuggestList);this.$cBigsearchcon=$(this.cBigsearchcon);this.$cPetAreaWrap=$(this.cPetAreaWrap)},initEvent:function(){var f=this,d=this.timer;window.onpagehide=$.proxy(function(){this.$dCloseBtn.trigger("click")},this);this.$window.on("orientationchange",function(){d&&clearTimeout(d);d=setTimeout(function(){f.setSearchItemListStyle()},500)});this.setPlacehoder();this.$dSearchInput.attr("placeholder",$.lang.Head_shoppingFor); this.$cBigsearchcon[0]&&0');0)/ig.test(this.$dSearchInput.val())?(e=$.trim(this.$dSearchInput.val()).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),this.recentKeyWord.events.trigger("addItem",[e])):this.recentKeyWord.events.trigger("addItem",[$.trim(this.$dSearchInput.val())]);if(f&&"searchinner"=== $(f.currentTarget).attr("spm-c")&&u)return window.location.href=u,!1;if(f&&"cc"===$(f.currentTarget).parents("body").attr("spm-b")||f&&"ccsp"===$(f.currentTarget).parents("body").attr("spm-b"))return window.location.href="/static/couponCenterSearch.html?"+t,!1;if(f&&"searchLP"===$(f.currentTarget).parents("body").attr("spm-b"))return c({name:"key"})?window.location.href=window.location.href.replace(c({name:"key"}),d):window.location.href=window.location.href+"&"+t,!1;this.$cSearch.find("form").submit()}, selectSuggestKeyWord:function(f){var d=$(f.currentTarget),e=d.attr("data-key").replace(/<\/?[^>]*>/g,"");this.$dSearchInput.val(e);this.spmC=d.attr("spm-c")||"";this.spmD=d.attr("spm-index")||"";this.jumpSearch(f)},selectKeyWord:function(f){var d=$(f.currentTarget),e=d.closest("li").attr("data-key").replace(/<\/?[^>]*>/g,""),h=d.closest("li").find(".j-cateName");this.$cSearch.find("form").attr("action");var t=$(".j-hotSearch").find("li");this.spmC=d.closest("li").attr("spm-c")||"";this.spmD=d.closest("li").attr("spm-index")|| "";h.length?(this.$cCateId.val(h.attr("data-cid")),this.$cSchtypeId.val("ss2")):this.$cSchtypeId.val("ss1");this.$dSearchInput.val(e);e=0;for(t=t.length;e]*>/g,"");d=d.closest("li").find(".j-cateName");submitUrl=this.$cSearch.find("form").attr("action"); d.length?(this.$cCateId.val(d.attr("data-cid")),this.$cSchtypeId.val("ss2")):this.$cSchtypeId.val("ss1");this.$dSearchInput.val(f);this.$dSearchInput[0].blur()},historyClose:function(f){var d=$(f.target);f=this.cHide;d=d.closest(this.dHistorylist);this.recentKeyWord.events.trigger("delItem");d.addClass(f)},historyDown:function(f){var d=$(f.target);f=d.closest(".j-history-z");d=d.closest(".j-history-z").siblings(".j-history-default");var e=this.downHide;cHide=this.cHide;f.addClass(e);d.removeClass()}, selectAttr:function(f){var d=$(f.currentTarget),e=d.attr("data-attrName");d=d.closest("li").attr("data-key").replace(/<\/?[^>]*>/g,"");this.$cTagName.val(e);this.$cSchtypeId.val("ss3");this.$dSearchInput.val(d+" "+e);f.stopPropagation();this.jumpSearch(f)},setSearchStyle:function(f){f?(this.$html.addClass(this.cHtml),this.$cSearch.addClass(this.cSectionActive),this.$dCloseBtn.removeClass("dhm-hide"),this.$cSearchWarp.removeClass(this.cNormal).addClass(this.cActive)):(this.resetSearchList(),this.$dCloseBtn.addClass("dhm-hide"), this.$cSearchWarp.removeClass(this.cActive).addClass(this.cNormal),this.$html.removeClass(this.cHtml),this.$cSearch.removeClass(this.cSectionActive),""===$.trim(this.$dSearchInput.val())?this.$dSearchInput.removeClass(this.cInputText):!1,this.$dSearchInput[0].blur())},setDeleteStyle:function(f){f?this.$dDeleteBtn.removeClass(this.cHide):this.$dDeleteBtn.addClass(this.cHide)},setSearchItemListStyle:function(){var f=this.$dSearchList.find("ul"),d=1*this.$window.height(),e=0;if(f[0]){var h=f.siblings(); $.each(h,function(t,u){e+=1*$(u).outerHeight()});h=f.parent().siblings();$.each(h,function(t,u){e+=1*$(u).outerHeight()});f.css({height:d-e})}},resetSearchList:function(){var f=this.cHide,d=$(this.dSuggestList),e=$(this.dHotSearch),h=$(this.dHistorylist),t=$(this.cPetAreaWrap);d.addClass(this.cHide).html("");h.addClass(f).html("");e.addClass(f).html("");t.addClass(f).html("");this.petAreaIsOn=this.isOn=!1},defaultSuggest:function(f){var d=this.recentKeyWord,e=this.hotKeyWord,h=this.petArea,t=this.suggest, u=$(f.target);f=new taskManager(10);var m=[],p=this;m.push(function(){p.setSearchStyle(!0)});m.push(function(){p.addMaskLayyer();p.$cSearchfixedShadow.removeClass("dhm-hide")});m.push(function(){p.$dSearchInput.trigger("focus")});m.push(function(){""!==u.val()?p.setDeleteStyle(!0):p.setDeleteStyle(!1)});m.push(function(){var v=new taskManager(10),w=[];""===$.trim(u.val())?(w.push(function(){d.localValue&&d.events.trigger("render")}),w.push(function(){p.isOn||(e.trigger("render"),p.isOn=!0)}),w.push(function(){p.petAreaIsOn|| (h.fetch(),p.petAreaIsOn=!0)})):w.push(function(){t.trigger("render",p.getParam(u))});v.add(w).start(20)});m.push(function(){""!==$.trim(p.$dHotSearch.html())&&p.$dHotSearch.removeClass(p.cHide)});f.add(m).start(20)},addMaskLayyer:function(){this.$cSearchfixedShadow[0]||(this.$body.append('
    '),this.$cSearchfixedShadow=$(".j-searchfixedShadow"))},showSearchLayyer:function(f){function d(){e.$cSearch.removeClass("dhm-hide"); "homePage"===e.$body.attr("data-pagetype")?e.hpSetKey():"searchPage"===e.$body.attr("data-pagetype")?e.setKey():e.$dSearchInput.addClass("inputtext");e.$dSearchInput.trigger("click")}var e=this;"searchPage"!==e.$body.attr("data-pagetype")?setTimeout(function(){d()},1):d()},querySuggest:function(f){f=$(f.target);var d=this.cHide,e=this.recentKeyWord,h=this.petArea,t=this.hotKeyWord,u=$(this.dHotSearch),m=$(this.dHistorylist),p=$(this.cPetAreaWrap);""!==f.val()?this.setDeleteStyle(!0):this.setDeleteStyle(!1); this.suggest.trigger("render",this.getParam(f));""===f.val()?(this.$dSuggestList.addClass(d),""!==$.trim(this.$dHistorylist.html())?this.$dHistorylist.removeClass(this.cHide):e.localValue&&e.events.trigger("render"),""!==$.trim(this.$dHotSearch.html())?this.$dHotSearch.removeClass(this.cHide):this.isOn||(t.trigger("render"),this.isOn=!0),""!==$.trim(this.$cPetAreaWrap.html())?this.$cPetAreaWrap.removeClass(this.cHide):this.petAreaIsOn||(h.fetch(),this.petAreaIsOn=!0)):(this.$dSuggestList.removeClass(d), m.addClass(d),u.addClass(d),p.addClass(d))},getParam:function(f){return{data:{key:$.trim(f.val()),cid:"",client:"wap"}}},close:function(f){var d=this;setTimeout(function(){d.$cSearchfixedShadow.addClass("dhm-hide");d.setSearchStyle(!1);d.$dSearchBtn[0]&&d.$cSearch.addClass("dhm-hide").removeClass("fadeIn")},1)},deleteText:function(){var f=this.recentKeyWord,d=this.hotKeyWord,e=this.petArea,h=new taskManager(10),t=[],u=this;t.push(function(){u.$dSearchInput.val("")});t.push(function(){u.setDeleteStyle(!1)}); t.push(function(){u.$dSuggestList.addClass(u.cHide).html("")});t.push(function(){u.$dSearchInput[0].focus()});t.push(function(){""!==$.trim(u.$dHistorylist.html())?u.$dHistorylist.removeClass(u.cHide):f.localValue&&f.events.trigger("render")});t.push(function(){""!==$.trim(u.$dHotSearch.html())?u.$dHotSearch.removeClass(u.cHide):u.isOn||(d.trigger("render"),u.isOn=!0)});t.push(function(){""!==$.trim(u.$cPetAreaWrap.html())?u.$cPetAreaWrap.removeClass(u.cHide):u.petAreaIsOn||(e.fetch(),u.petAreaIsOn= !0)});h.add(t).start(20)},refreshHotKeyWord:function(){this.hotKeyWord.trigger("render")},toMydhgate:function(){var f="signin";/^bm\|aff\|(yfaf|my)\|.+\|myyshopbio/i.test(decodeURIComponent($.cookie("ref_f")))&&"en"===g.countryCur&&(f="register");a.init({type:f,fixedURL:"integrate_popup",isSetPageStyle:!0,loginSuccessCallback:$.proxy(function(){window.location.href="/vieworder.do"},this)})},setKey:function(){var f=$.trim(this.$body.attr("data-keyword")||"");""!==f?(this.$dSearchInput.addClass("inputtext"), this.$dSearchInput.val(decodeURIComponent(f))):this.$dSearchInput.removeClass("inputtext")},hpSetKey:function(){var f=$(".j-hdsearch-btn").eq(0).find("var").text();""!==f?(this.$dSearchInput.addClass("inputtext"),this.$dSearchInput.attr("placeholder",decodeURIComponent(f))):this.$dSearchInput.removeClass("inputtext")}})}); define("common/header/topMenuInit",["common/config","lib/backbone","tpl/header/topMenuInitTpl","tools/taskmanager"],function(g,n,q,l){var a=n.Model.extend({defaults:function(){return{code:200,list:{cartSum:0,messageSum:0,needEDMEmailConfirm:!1,nickName:g.b2b_nick_n,lang:g.countrys[g.countryCur].replace(/([^ ]+).*/,"$1"),spmA:$("[name=spm-a]").attr("content")||"",spmB:$("body").attr("spm-b")||"",spmE:$("#pvid").attr("value")||window.__randomString||""}}}});return n.View.extend({el:"body",events:{}, initialize:function(c){this.setOptions(c);this.cHtml=this.options.cHtml;this.cCategoryWarp=this.options.cCategoryWarp;this.cMenuInitScroll=this.options.cMenuInitScroll;this.cHide=this.options.cHide;this.cAnimateHide=this.options.cAnimateHide;this.cAnimateShow=this.options.cAnimateShow;this.cMenuOpenBtn=this.options.cMenuOpenBtn;this.cLanguageBtn=this.options.cLanguageBtn;this.cCategoryOneOpen=this.options.cCategoryOneOpen;this.cfixedShadow=this.options.cfixedShadow;this.cCategoryWarpBox=this.options.cCategoryWarpBox; this.cCategoryLayerBox=this.options.cCategoryLayerBox;this.cCategoryShop=this.options.cCategoryShop;this.cCategoryDown=this.options.cCategoryDown;this.cCategoryUp=this.options.cCategoryUp;this.cCategoryHeight=this.options.cCategoryHeight;this.cCategoryShopBtn=this.options.cCategoryShopBtn;this.cSubclassLayer=this.options.cSubclassLayer;this.cCategorySubclass=this.options.cCategorySubclass;this.cCategoryChildBox=this.options.cCategoryChildBox;this.cMainMenuTit=this.options.cMainMenuTit;this.cChildopen= this.options.cChildopen;this.cChildClose=this.options.cChildClose;this.cAllCategory=this.options.cAllCategory;this.model=this.options.model;this.template=this.options.template;this.tpl=this.options.tpl;this.timer=null;this.cHead2023Warp=this.options.cHead2023Warp;this.cHead2023Innder=this.options.cHead2023Innder;this.cHead2023Logo=this.options.cHead2023Logo;this.cSearchBtn=this.options.cSearchBtn;this.renderCateStatus=!1;this.initElement();this.initEvent();this.render();!0===g.isReptile&&(this.initElement(), $.cookie("b2b_nick_n")?this.categoryLayer2():this.categoryLayer())},setOptions:function(c){this.options={cHtml:"dhm-htmlOverflow",cCategoryWarp:".j-categoryWarp",cMenuInitScroll:".j-menuInitScroll",cHide:"dhm-hide",cAnimateHide:"categoryWarp-close",cAnimateShow:"categoryWarp-open",cMenuOpenBtn:".j-headCategoryBtn",cLanguageBtn:"#J_language",cCategoryOneOpen:".j-categoryOneOpen",cfixedShadow:".j-fixedShadow",cSubclassLayer:".j-category-SubclassLayer",cCategoryWarpBox:".j-category-WarpBox",cCategoryLayerBox:".j-category-layerBox", cCategoryShop:".j-category-shop",cCategoryShopBtn:".j-category-down",cCategoryDown:"category-down",cCategoryHeight:"hide-height-cate",cCategoryUp:"category-up",cCategorySubclass:"category-SubclassLayer",cCategoryChildBox:".category-child-box",cMainMenuTit:".j-main-menu-tit",cChildopen:"childopen",cChildClose:"childclose",cAllCategory:".j-category-all",model:new a,template:_.template,tpl:q,cHead2023Warp:".j-head2023Warp",cHead2023Innder:".j-head2023-innder",cHead2023Logo:".j-head2023Logo",cSearchBtn:".j-head-bigsearchcon"}; $.extend(this.options,c||{})},initElement:function(){this.$html=this.$html||$("html");this.$body=this.body||$("body");this.$window=this.$window||$(window);this.$cCategoryWarp=this.$cCategoryWarp||$(this.cCategoryWarp);this.$cMenuOpenBtn=this.$cMenuOpenBtn||$(this.cMenuOpenBtn);this.$cMenuInitScroll=$(this.cMenuInitScroll);this.$cLanguageBtn=$(this.cLanguageBtn);this.$cCategoryOneOpen=$(this.cCategoryOneOpen);this.$cfixedShadow=$(this.cfixedShadow);this.$cCategoryShop=$(this.cCategoryShop);this.$cCategoryShopBtn= $(this.cCategoryShopBtn);this.$cCategoryWarpBox=$(this.cCategoryWarpBox);this.$cCategoryLayerBox=$(this.cCategoryLayerBox);this.$cSubclassLayer=$(this.cSubclassLayer);this.$cMainMenuTit=$(this.cMainMenuTit);this.$cAllCategory=$(this.cAllCategory);this.$cHead2023Warp=$(this.cHead2023Warp);this.$cHead2023Innder=$(this.cHead2023Innder);this.$cHead2023Logo=$(this.cHead2023Logo);this.$cSearchBtn=$(this.cSearchBtn);this.pageType=this.$body.attr("data-pagetype")||""},initEvent:function(){var c=this,k=this.timer; this.listenTo(this.model,"change",this.render);0
    ');$(".j-category-layer-wrap")[0]||$("body").append('
    ');$(".j-headerWarp").on("click", ".j-headCategoryBtn",$.proxy(this.show,this));$(".j-fixedShadow-box").on("click",".j-fixedShadow",$.proxy(this.hide,this));$(".j-fixedShadow-box").on("touchmove",".j-fixedShadow",$.proxy(this.hide,this));$(".j-categoryWarp").on("click",".j-category-down",$.proxy(this.categoryDownUp,this));$(".j-categoryWarp").on("click",".j-category-WarpBox li",$.proxy(this.categoryClick,this));$(".j-category-layer-wrap").on("click",".j-category-SubclassLayer li",$.proxy(this.categoryClick,this));$(".j-category-layer-wrap").on("click", ".j-main-menu-tit",$.proxy(this.Childrenhide,this))},setNavFloat:function(){var c=new l(10),k=[],f=this;k.push(function(){setTimeout(function(){var d=f.$cHead2023Warp,e=f.$cHead2023Innder,h=f.$cHead2023Logo,t=f.$cSearchBtn,u=$(window).scrollTop(),m=f.navHeadTop;"homePage"===f.pageType&&(m=m+d.height()-16);u>m?(h.addClass("new-logoFixed"),e.addClass("new-headerFixed"),d.css({"padding-top":e.outerHeight(!0)}),t.addClass("fadeSearch")):(d.css({"padding-top":0}),h.removeClass("new-logoFixed"),e.removeClass("new-headerFixed"), t.removeClass("fadeSearch"))},10)});c.add(k).start(20)},setMenuInitStyle:function(){var c=this.$cMenuInitScroll,k=1*this.$window.height(),f=0;if(c[0]){var d=c.siblings();$.each(d,function(e,h){$(this).hasClass("dhm-hide")||(f+=1*$(h).outerHeight())});c.css({height:k-f})}},render:function(){var c=this.tpl,k=$.extend(!0,{},this.model.attributes,{list:{site:g.countryCur}}),f=this.template(c.warp.join(""))(k),d=this.template(c.notLogin.join(""))(k),e=this.template(c.isLogin.join(""))($.extend(!0,{},k, {lang:g.countryCur})),h=this.template(c.entranceOne.join(""))(k),t=this.template(c.entranceTwo.join(""))(k);k=this.template(c.entranceThree.join(""))($.extend(!0,{},k,{contactUsUrl:g.contactUsUrl[g.countryCur]}));c=c.fixedShadow.join("");f=f.replace(/\{\{notLogin\}\}/,d).replace(/\{\{isLogin\}\}/,e).replace(/\{\{entranceOne\}\}/,h).replace(/\{\{entranceTwo\}\}/,t).replace(/\{\{entranceThree\}\}/,k);this.$cCategoryWarp.html(f);$(".j-fixedShadow-box").html(c);this.initElement();window.__exposureBuryingPoint&& window.__exposureBuryingPoint.init({module:$(".j-menu-signin"),moduleName:"switch_accounts",moduleIndex:"",event_type:"expose",event_code:"rnN8NRsr9a1s",event_body:{event_data:{event_entity_info:{link_type:""}}}})},show:function(){var c=this.$cCategoryWarp,k=this.cHide,f=this.cAnimateHide,d=this.cAnimateShow,e=new l(10),h=[],t=this;h.push(function(){setTimeout(function(){t.$html.addClass(t.cHtml);c.removeClass(k);t.$cfixedShadow.removeClass(k);setTimeout(function(){c.removeClass(f).addClass(d)},10); t.setMenuInitStyle();t.renderCate();if(window.__exposureBuryingPoint){var u="";window.DHabversions&&(1===window.DHabversions["724"]?u="724_1":0===window.DHabversions["724"]&&(u="724_0"));window.__exposureBuryingPoint.init({module:$({}),moduleName:"abt",moduleIndex:"switch_accounts",event_type:"click",event_code:"xzRONRQuRJwe",ab_version:u,event_body:{event_data:{event_entity_info:{link_type:""}}}})}},10)});e.add(h).start(20)},hide:function(){var c=this.$cCategoryWarp,k=this.$cSubclassLayer,f=this.cHide, d=this.cAnimateHide,e=this.cAnimateShow;cChildopen=this.cChildopen;this.$html.removeClass(this.cHtml);this.$cfixedShadow.addClass(f);c.removeClass(e).addClass(d);k.removeClass(cChildopen).addClass(d);setTimeout(function(){c.addClass(f)},260)},asynchronousRenderCategory:function(){$.ajax({type:"GET",url:"/activities/promotion/navigation.html",data:{client:"wap",language:g.countryCur},async:!0,cache:!1,dataType:"html",context:this,success:function(c){c&&($(".j-category-layer-wrap").html(c),this.initElement(), $.cookie("b2b_nick_n")?this.categoryLayer2():this.categoryLayer())},error:function(){}})},categoryLayer:function(){var c=this.cHide;if(this.$cCategoryLayerBox.html()){var k=this.$cCategoryLayerBox.find(".one-level");this.$cCategoryWarpBox.append(k.clone()).removeClass(c);this.$cCategoryWarpBox.find("ul").removeClass(c);this.$cCategoryWarpBox.find(".j-category-down").removeClass(c)}},categoryLayer2:function(){var c=this.cHide;if(this.$cCategoryLayerBox.html()){var k=this.$cCategoryLayerBox.find(".one-level"); this.$cCategoryWarpBox.append(k.clone());this.$cCategoryWarpBox.find("ul").addClass(c);this.$cCategoryWarpBox.find(".j-category-down").addClass(c)}},categoryDownUp:function(c){var k=$(c.currentTarget);c=k.closest(".j-category-WarpBox").find("ul");var f=this.cCategoryDown,d=this.cCategoryUp;k=k.closest(".j-category-WarpBox").find(".j-category-down");var e=this.cCategoryHeight;c.hasClass(e)?(c.removeClass(e),k.removeClass(f).addClass(d)):(c.addClass(e),k.removeClass(d).addClass(f))},categoryClick:function(c){var k= $(c.currentTarget),f=k.attr("data-cateID");c=this.$cSubclassLayer;k=k.attr("data-want");var d=this;$.each(c,function(e,h){f===$(this).attr("data-cateID")&&d.Childrenshow($(this))});if("1"!==k)return!1},Childrenshow:function(c){var k=this.cHide,f=this.cAnimateHide,d=this.cChildopen,e=this.cChildClose;this.$html.addClass(this.cHtml);c.removeClass(f);c.removeClass(k).addClass(d);setTimeout(function(){c.removeClass(e).addClass(d)});this.setMenuInitStyle()},Childrenhide:function(c){var k=$(c.currentTarget).closest(this.cSubclassLayer), f=this.cHide;c=this.cChildClose;k.removeClass(this.cChildopen).addClass(c);setTimeout(function(){k.addClass(f)},260)},BlockClick:function(){},renderCate:function(){this.renderCateStatus||(this.renderCateStatus=!0,this.asynchronousRenderCategory())}})}); define("common/header/getMenuShiptoCountryList","common/config lib/backbone tpl/header/getMenuShiptoCountryListTpl checkoutflow/dataErrorLog checkoutflow/popupTip common/getPopularCountryList".split(" "),function(g,n,q,l,a,c){var k=n.Model.extend({defaults:function(){return{code:-1,popular:[{whitherCountryId:"",whitherCountryName:""}],all:{A:[{whitherCountryId:"",whitherCountryName:""}]},currentWhitherCountryId:""}},initialize:function(f,d){this.setOptions(d);this.ajaxOptions=this.options.ajaxOptions}, setOptions:function(f){this.options={ajaxOptions:{url:"/prod/ajax/getLetterCountryList.do",data:{client:"wap",language:g.countryCur,version:"0.1"},type:"GET",dataType:"json",xhrFields:{withCredentials:!0},async:!0,cache:!1,processData:!0}};$.extend(!0,this.options,f||{})},urlRoot:function(){return g.mrd_dhgate+this.ajaxOptions.url},sync:function(f,d,e){this.__params=$.extend(!0,{},this.ajaxOptions,e||{});return n.sync.call(this,null,this,$.extend(!0,{},this.ajaxOptions,{url:this.url()},e))},parse:function(f){var d= {};d.code="0x0000"===f.state?200:-1;d.popular=c.get();var e=this.getPopularWhitherCountryIdStr(d.popular);d.all={};-1!==d.code&&$.each(f.data,function(h,t){d.all[h]=[];$.each(t,function(u,m){u={};var p=new RegExp("\\b"+m.countryId+"\\b");$.cookie("b2b_ship_country")===m.countryId?(d.popular=_.filter(d.popular,function(v){if(v.whitherCountryId!==$.cookie("b2b_ship_country"))return!0}),d.popular.unshift({whitherCountryId:m.countryId,whitherCountryName:m.countryName})):p.test(e)||(u.whitherCountryId= m.countryId,u.whitherCountryName=m.countryName,d.all[h].push(u))})});return d},getPopularWhitherCountryIdStr:function(f){var d=[];$.each(f,function(e,h){d.push(h.whitherCountryId)});return d.join(";")}});return n.View.extend({el:"body",events:{},initialize:function(f){this.setOptions(f);this.cMenuShiptoCountryWarp=this.options.cMenuShiptoCountryWarp;this.cMenuShiptoCountryContent=this.options.cMenuShiptoCountryContent;this.cHide=this.options.cHide;this.cAnimateHide=this.options.cAnimateHide;this.cAnimateShow= this.options.cAnimateShow;this.template=this.options.template;this.tpl=this.options.tpl;this.model=this.options.model;this.bind_flag=!1;this.dataErrorLog=this.options.dataErrorLog;this.initElement();this.initEvent()},initElement:function(){this.$html=this.$html||$("html");this.$body=this.body||$("body");this.$window=this.$window||$(window);this.$cMenuShiptoCountryWarp=$(this.cMenuShiptoCountryWarp);this.$cMenuShiptoCountryContent=$(this.cMenuShiptoCountryContent)},initEvent:function(){var f=this, d=this.timer;this.listenTo(this.model,"sync",this.success);this.listenTo(this.model,"error",this.error);this.$window.on("orientationchange, resize",function(){d&&clearTimeout(d);d=setTimeout(function(){f.setMenuCountryStyle()},500)});$(".j-headerWarp").on("click",".j-changeShipTo",$.proxy(this.loadMenuCountryData,this));$(".j-categoryWarp").on("click",".j-changeShipTo",$.proxy(this.loadMenuCountryData,this));$(".j-filterLayercon").on("click",".j-changeshipto-search",$.proxy(this.loadMenuCountryData, this))},bindEvent:function(){this.bind_flag||($(".j-menu-shiptoCountryWarp").on("click",".j-menu-shiptoCountryClose",$.proxy(this.hideMenuShipToLayerLayer,this)),$(".j-menu-shiptoCountryWarp").on("click",".j-menu-shiptoCountryContent li[data-whithercountryid]",$.proxy(this.selectMenuShipToCountry,this)),this.bind_flag=!0)},setOptions:function(f){this.options={cMenuShiptoCountryWarp:".j-menu-shiptoCountryWarp",cMenuShiptoCountryContent:".j-menu-shiptoCountryContent",cHide:"dhm-hide",cAnimateHide:"close-menu-layer2", cAnimateShow:"open-menu-layer2",template:_.template,tpl:q,model:new k,dataErrorLog:new l({flag:!0,url:"/mobileApiWeb/biz-FeedBack-log.do"}),getDefaultShipCostAndWayInstance:null,getShipCostAndWayListInstance:null};$.extend(!0,this.options,f||{})},loadMenuCountryData:function(f){this.evt=f;-1===this.model.get("code")?(a.events.trigger("popupTip:loading",!0),this.model.fetch()):(this.adaptationAnimateClass(),this.showMenuShipToLayer())},success:function(f,d,e){if(200===f.get("code"))this.render(f.attributes), this.initElement(),a.events.trigger("popupTip:loading",!1),this.adaptationAnimateClass(),this.showMenuShipToLayer();else{a.events.trigger("popupTip:loading",!1);a.events.trigger("popupTip:dataErrorTip",{action:"close",message:d.message});try{throw"success(): data is wrong";}catch(h){this.dataErrorLog.events.trigger("save:dataErrorLog",{message:h,url:this.model.__params.url,params:this.model.__params.data,result:d})}}},error:function(){a.events.trigger("popupTip:loading",!1);a.events.trigger("popupTip:dataErrorTip", {action:"close",message:"Network anomaly."});try{throw"error(): request is wrong";}catch(f){this.dataErrorLog.events.trigger("save:dataErrorLog",{message:f,url:this.model.__params.url,params:this.model.__params.data})}},render:function(f){var d=this.template,e=this.tpl,h=d(e.main.join(""))(f);f=d(e.countryList.join(""))(f);h=h.replace(/\{\{main\}\}/,h).replace(/\{\{countryList\}\}/,f);this.$body.append(h);this.bindEvent()},adaptationAnimateClass:function(){var f=$($(".j-menu-shiptoCountryClose")[0]), d=$($(".j-menu-shiptoCountryClose")[1]);this.evt&&"shipto"===$(this.evt.currentTarget).attr("data-type")?(f.addClass("dhm-hide"),d.removeClass("dhm-hide"),this.$cMenuShiptoCountryWarp.removeClass("close-menu-layer2").addClass("layer-close"),this.cAnimateHide="layer-close",this.cAnimateShow="layer-open"):(f.removeClass("dhm-hide"),d.addClass("dhm-hide"),this.$cMenuShiptoCountryWarp.removeClass("layer-close").addClass("close-menu-layer2"),this.cAnimateHide="close-menu-layer2",this.cAnimateShow="open-menu-layer2")}, showMenuShipToLayer:function(){var f=this.$cMenuShiptoCountryWarp,d=this.cAnimateHide,e=this.cAnimateShow;f.removeClass(this.cHide);setTimeout(function(){f.removeClass(d).addClass(e)},10);this.setMenuCountryStyle()},hideMenuShipToLayerLayer:function(){var f=this.$cMenuShiptoCountryWarp,d=this.cHide,e=this.cAnimateHide;f.removeClass(this.cAnimateShow).addClass(e);setTimeout(function(){f.addClass(d)},260)},setMenuCountryStyle:function(){var f=this.$cMenuShiptoCountryContent,d=1*this.$window.height(), e=0;if(f[0]){var h=f.siblings();$.each(h,function(t,u){e+=1*$(u).outerHeight()});f.css({height:d-e})}},selectMenuShipToCountry:function(f){f=$(f.currentTarget);var d=f.attr("data-whithercountryid");f.parents("ul").siblings().find("span").remove();f.append("");$.cookie("b2b_ship_country",d,{domain:".dhgate.com",expires:365,path:"/"});$.cookie("last_choice","1",{domain:".dhgate.com",expires:365,path:"/"});setTimeout(function(){window.location.replace(location.pathname+location.search.replace())}, 10);this.hideMenuShipToLayerLayer()}})}); define("common/header/turnToLanguagesWebsite",["common/config","lib/underscore","tpl/header/turnToLanguagesWebsiteTpl"],function(g,n,q){return{init:function(l){this.setOptions(l);this.wwwURL=this.options.wwwURL;this.wwwPATHNAME=this.options.wwwPATHNAME;this.wwwHASH=this.options.wwwHASH;this.wwwSEARCH=this.options.wwwSEARCH;this.template=this.options.template;this.tpl=this.options.tpl;this.cHide=this.options.cHide;this.cAnimateHide=this.options.cAnimateHide;this.cAnimateShow=this.options.cAnimateShow; this.dRoot=this.options.dRoot;this.cLanguageWarp=this.options.cLanguageWarp;this.cLanguages=this.options.cLanguages;this.cLanguageBtn=this.options.cLanguageBtn;this.cLanguageCancel=this.options.cLanguageCancel;this.cLanguageShadow=this.options.cLanguageShadow;this.cCurrencyWarp=this.options.cCurrencyWarp;this.cCurrencys=this.options.cCurrencys;this.cCurrencyBtn=this.options.cCurrencyBtn;this.cCurrencyCancel=this.options.cCurrencyCancel;this.cCurrencyCode=this.options.cCurrencyCode;$("body").append('
    '); $("body").append('
    ');this.initElement();this.initEvent();this.render();this.fetchCurrencys()},setOptions:function(l){this.options={wwwURL:g.wwwURL,wwwPATHNAME:g.wwwPATHNAME,wwwHASH:g.wwwHASH,wwwSEARCH:g.wwwSEARCH,template:n.template,tpl:q,dRoot:"body",cHide:"dhm-hide",cAnimateHide:"languageWarp-close",cAnimateShow:"languageWarp-open",cLanguageShadow:"#J_shadow",cLanguageWarp:".j-languageWarp",cLanguages:"#J_languageCont ul li",cLanguageBtn:"#J_language", cLanguageCancel:".j-languageCancel",cCurrencyWarp:".j-currencyWarp",cCurrencys:".j-currencyInner ul li",cCurrencyBtn:".j-changeCurrency",cCurrencyCancel:".j-changeCurrencyCancel",cCurrencyCode:".j-curCurrency"};$.extend(this.options,l||{})},initElement:function(){this.$body=this.body||$("body");this.$dRoot=this.$dRoot||$(this.dRoot);this.$cLanguageWarp=this.$cLanguageWarp||$(this.cLanguageWarp);this.$cLanguageShadow=$(this.cLanguageShadow);this.$cLanguageCancel=$(this.cLanguageCancel);this.$cCurrencyWarp= $(this.cCurrencyWarp);this.$cCurrencyBtn=$(this.cCurrencyBtn);this.$cCurrencyCode=$(this.cCurrencyCode)},initEvent:function(){$(".j-categoryWarp").on("click",this.cLanguageBtn,$.proxy(this.show,this));$(".j-languageWarp").on("click",this.cLanguageCancel,$.proxy(this.hide,this));$(".j-languageWarp").on("click",this.cLanguages,$.proxy(this.setSelected,this));$(".j-categoryWarp").on("click",this.cCurrencyBtn,$.proxy(this.showCurrencyList,this));$(".j-currencyWarp").on("click",this.cCurrencyCancel,$.proxy(this.hideCurrencyList, this));$(".j-currencyWarp").on("click",this.cCurrencys,$.proxy(this.setCurrencySelected,this));$(".j-language-currency-shadow").on("click",this.cLanguageShadow,$.proxy(this.hide,this));$(".j-language-currency-shadow").on("click",this.cLanguageShadow,$.proxy(this.hideCurrencyList,this))},setDefaultItem:function(l){var a=new RegExp('
  • ");this.jump(l.find("a").attr("href"))},jump:function(l){location.href=l},fetchCurrencys:function(){$.ajax({type:"GET",url:g.mrd_dhgate+"/prod/ajax/currencyall.do",data:{client:"wap",language:g.countryCur},xhrFields:{withCredentials:!0}, async:!0,cache:!1,dataType:"json",context:this,success:function(l){"0x0000"===l.state&&l.data&&0");$.removeCookie("intl_currency",{path:"/"});$.cookie("intl_currency",l.attr("attr-currency").replace(/^([A-Z]+).*/, "$1"),{expires:365,path:"/",domain:".dhgate.com"});setTimeout(function(){window.location.replace(location.pathname+location.search.replace(/dispCurrency=[^&]+/i,"dispCurrency="))},10)}}}); define("common/header/getRecomWord",["common/config","lib/backbone"],function(g,n){var q=n.Model.extend({defaults:function(){return{code:-1,list:[]}},initialize:function(l,a){this.setOptions(a);this.ajaxOptions=this.options.ajaxOptions},setOptions:function(l){this.options={ajaxOptions:{url:"/appsearch/hidKeyword.do",data:{client:"wap",language:g.countryCur,version:"1.0"},type:"GET",async:!0,cache:!1,xhrFields:{withCredentials:!0},dataType:"json",processData:!0}};$.extend(!0,this.options,l||{})},urlRoot:function(){return g.mrd_dhgate+ this.ajaxOptions.url},sync:function(l,a,c){this.__params=$.extend(!0,{},this.ajaxOptions,c||{});return n.sync.call(this,null,this,$.extend(!0,{},this.ajaxOptions,{url:this.url()},c))},parse:function(l){var a={};a.code="0x0000"===l.state?200:-1;a.list=[];-1!==a.code&&l.data&&l.data.wordList&&0verify codeverify code.j-country").text();$(d.currentTarget);d=this.dataCode=$(".j-login-us").attr("data-callingcode");e=this.countryid=e.substr(0,e.indexOf("+"));this.countrycode=$(".j-login-us").attr("data-callingcode");var h=$(this.cJMobileNumber);h=this.val=$.trim(h.val());var t={};t.areaCode=d;t.number=h;t.countryid=e;return t},addMobileNumberSubmit:function(d){var e=$(d.currentTarget),h=$(this.cJMobileNumber),t=$(this.cJErrorTips),u=$(this.cJLoginTextfield),m=this.cHide;this.type=e.attr("data-type"); e=!1;!1===/^[0-9-()]*$/.test($.trim(h.val()))?(t.text($.lang.buyerSms_onlyAllowedNumber).removeClass(m),u.addClass("error"),e=!0):""===$.trim(h.val())&&(t.text($.lang.buyerSms_pleaseMobileNumber).removeClass(m),u.addClass("error"),e=!0);!0!==e&&(c.events.trigger("popupTip:loading",!0),this.model.fetch({data:this.getParams(d)}))},hideAddMobileNumberLayer:function(){var d=this.$cJPopupAddMobileNumber,e=$(this.cJPopupVerification),h=this.cHide,t=this.cAnimateHide,u=this.cAnimateShow;this.setPageStyle(!1); d.removeClass(u).addClass(t);e.removeClass(u).addClass(t);setTimeout(function(){d.addClass(h);e.addClass(h);d.removeClass("popup-verification")},260);g.preventClick()},setPageStyle:function(d){var e=this.$html,h=this.$body,t=this.cHtml;!0===d?(this.__scrollY=parseInt(this.$window.scrollTop()),e.addClass(t),h.css({"margin-top":-this.__scrollY})):(e.removeClass(t),h.attr({style:""}),window.scroll(0,this.__scrollY))},focusMobileNumber:function(){var d=$(this.cJErrorTips),e=$(this.cJLoginTextfield);d.addClass(this.cHide); e.removeClass("error")},getPersonalize:function(d){l.events.trigger("GetPersonalize:fetch",{successCallback:$.proxy(function(e){d.set({userAttention:$.extend(!0,{},d.get("userAttention"),e.userAttention)});this.data=e;this.personalize.trigger("personalizeView:render:render",e)},this)})}})}); define("common/login/addMobileNumber","common/config common/getUserInfo common/login/getPersonalize common/login/deleteMobileNumber lib/backbone checkoutflow/popupTip checkoutflow/dataErrorLog tpl/login/addMobileNumberTpl".split(" "),function(g,n,q,l,a,c,k,f){var d=a.Model.extend({defaults:function(){return{code:-1,countryList:[{name:"",callingcode:"",countryid:""}],countryid:"",countryCode:""}},initialize:function(e,h){this.setOptions(h);this.ajaxOptions=this.options.ajaxOptions},setOptions:function(e){this.options= {ajaxOptions:{url:"/musr/countryList.do",data:{version:1,client:"wap",language:g.countryCur},type:"GET",dataType:"json",async:!0,cache:!1,processData:!0}};$.extend(!0,this.options,e||{})},urlRoot:function(){return g.app_dhgate+this.ajaxOptions.url},sync:function(e,h,t){this.__params=$.extend(!0,{},this.ajaxOptions,t||{});return a.sync.call(this,null,this,$.extend(!0,{},this.ajaxOptions,{url:this.url()},t))},parse:function(e){var h={};h.code=e.state;h.countryList=[];h.code="0x0000"===e.state?200:"0x0002"=== e.state?201:-1;200===h.code&&(e=e.data,h.countryCode=e.countryCode,h.countryid=e.countryid,$.each(e.country||[],function(t,u){t={};t.name=u.name;t.countrycode=u.countrycode;t.countryid=u.countryid;t.callingcode=u.callingcode;h.countryList.push(t)}));return h}});return a.View.extend({el:"body",events:{"click .j-addMobileNumber-close,.j-notNow":"hideAddMobileLayer","click .j-login-us":"showCountryList","click .j-countryMasks":"hideCountryList","click .j-country-box li":"addMobileSelect","click .j-Delete":"renderDeleteMobileNumberPop", "click .j-delete-cancel,.j-masks":"deleteMobileNumberClose","click .j-delete-confirm":"deleteConfirm"},initialize:function(e,h){this.setOptions(e);this.cJPopupAddMobileNumber=this.options.cJPopupAddMobileNumber;this.cJPopupVerification=this.options.cJPopupVerification;this.cJLoginUs=this.options.cJLoginUs;this.cJCountry=this.options.cJCountry;this.cJCountryMasks=this.options.cJCountryMasks;this.cJCountryBox=this.options.cJCountryBox;this.cJCountryWrap=this.options.cJCountryWrap;this.cCountryClose= this.options.cCountryClose;this.cCountryOpen=this.options.cCountryOpen;this.personalize=h;this.cHtml=this.options.cHtml;this.cHide=this.options.cHide;this.cAnimateHide=this.options.cAnimateHide;this.cAnimateShow=this.options.cAnimateShow;this.model=this.options.model;this.template=this.options.template;this.tpl=this.options.tpl;this.successCallback=this.options.successCallback;this.dataErrorLog=this.options.dataErrorLog;this.initElement();this.initEvent()},initElement:function(){this.$html=this.$html|| $("html");this.$body=this.body||$("body");this.$window=this.$window||$(window);this.$cJPopupAddMobileNumber=$(this.cJPopupAddMobileNumber);this.$cJLoginUs=$(this.cJLoginUs);this.$cJCountryMasks=$(this.cJCountryMasks);this.$cJCountryBox=$(this.cJCountryBox);this.$cJCountryWrap=$(this.cJCountryWrap)},initEvent:function(){this.listenTo(this.model,"sync",this.success);this.listenTo(this.model,"error",this.error)},setOptions:function(e){this.options={cJPopupAddMobileNumber:".j-popup-addMobileNumber",cJPopupVerification:".j-popup-verification", cJLoginUs:".j-login-us",cJCountry:".j-country",cJCountryMasks:".j-countryMasks",cJCountryBox:".j-country-box",cJCountryWrap:".j-country-wrap",cCountryClose:"country-close",cCountryOpen:"country-open",cHtml:"dhm-htmlOverflow",cHide:"dhm-hide",cAnimateHide:"close-login-layer",cAnimateShow:"open-login-layer",successCallback:$.noop,personalize:$({}),model:new d,template:_.template,tpl:f,dataErrorLog:new k({flag:!0,url:"/mobileApiWeb/biz-FeedBack-log.do"})};$.extend(!0,this.options,e||{})},success:function(e, h,t){if(200===e.get("code"))c.events.trigger("popupTip:loading",!1),this.render(e.attributes),this.successCallback();else if(201===e.get("code"))n.init({fixedURL:"integrate_popup",loginSuccessCallback:$.proxy(function(){c.events.trigger("popupTip:loading",!1);this.model.fetch()},this)});else{c.events.trigger("popupTip:loading",!1);c.events.trigger("popupTip:autoTip",{message:h.message,timer:1E3});try{throw"success(): data is wrong";}catch(u){this.dataErrorLog.events.trigger("save:dataErrorLog",{message:u, url:this.model.__params.url,params:this.model.__params.data,result:h})}}},error:function(e,h,t){c.events.trigger("popupTip:loading",!1);c.events.trigger("popupTip:autoTip",{message:"Network anomaly.",timer:1E3});try{throw"error(): request is wrong";}catch(u){this.dataErrorLog.events.trigger("save:dataErrorLog",{message:u,url:this.model.__params.url,params:this.model.__params.data})}},fetchData:function(e,h){this.personalize=h;this.userAttention=void 0===e?"":e;c.events.trigger("popupTip:loading", !0);this.model.fetch()},render:function(e){e=$.extend({},e,{userAttention:this.userAttention});var h=this.template,t=this.tpl,u=h(t.main.join(""))(e),m=h(t.addMobileNumberTit.join(""))(e),p=h(t.addMobileNumberTextInfo.join(""))(e),v=h(t.countryMobileNumber.join(""))(e);e=h(t.submitAddMobileNumberBtn.join(""))(e);u=u.replace(/\{\{addMobileNumberTit\}\}/,m).replace(/\{\{addMobileNumberTextInfo\}\}/,p).replace(/\{\{countryMobileNumber\}\}/,v).replace(/\{\{submitAddMobileNumberBtn\}\}/,e);this.$cJPopupAddMobileNumber[0]? this.$cJPopupAddMobileNumber.html(u):this.$body.append(u);this.initElement();this.showAddMobileLayer()},renderDeleteMobileNumberPop:function(e){$.extend({},e,{userAttention:this.userAttention});e=this.template;e=e(this.tpl.deleteMobileNumberPop.join(""))();$(".j-deleteMobileNumberPop")[0]?$(".j-deleteMobileNumberPop").html(e):this.$body.append(e);$(".j-deleteMobileNumberPop").removeClass("dhm-hide")},showAddMobileLayer:function(){var e=this.$cJPopupAddMobileNumber,h=this.cHide,t=this.cAnimateHide, u=this.cAnimateShow;this.setPageStyle(!0);e.removeClass(h);setTimeout(function(){e.removeClass(t).addClass(u)},10);g.preventClick()},hideAddMobileLayer:function(){var e=this.$cJPopupAddMobileNumber,h=$(this.cJPopupVerification),t=this.cHide,u=this.cAnimateHide,m=this.cAnimateShow;this.setPageStyle(!1);e.removeClass(m).addClass(u);h.removeClass(m).addClass(u);setTimeout(function(){e.addClass(t);h.addClass(t);e.removeClass("popup-verification")},260);g.preventClick();window.location.reload()},setPageStyle:function(e){var h= this.$html,t=this.$body,u=this.cHtml;!0===e?(this.__scrollY=parseInt(this.$window.scrollTop()),h.addClass(u),t.css({"margin-top":-this.__scrollY})):(h.removeClass(u),t.attr({style:""}),window.scroll(0,this.__scrollY))},setCountryStyle:function(){var e=this.$cJCountryWrap,h=1*this.$window.height(),t=e.outerHeight()-e.height(),u=1*$(".j-addMobileNumberCont").height(),m=0;if(e[0]){var p=e.siblings();$.each(p,function(v,w){m+=1*$(w).outerHeight()});e.css({height:h-m-t-u})}},showCountryList:function(e){var h= this.$cJCountryBox;e=this.$cJCountryMasks;var t=this.cHide;cCountryOpen=this.cCountryOpen;cCountryClose=this.cCountryClose;h.removeClass(t);e.removeClass(t);this.setCountryStyle();setTimeout(function(){h.removeClass(cCountryClose).addClass(cCountryOpen)},10);g.preventClick()},hideCountryList:function(){var e=this.$cJCountryMasks,h=this.$cJCountryBox,t=this.cHide,u=this.cCountryClose;h.removeClass(this.cCountryOpen).addClass(u);setTimeout(function(){e.addClass(t);h.addClass(t)},260);g.preventClick()}, addMobileSelect:function(e){e=$(e.currentTarget);var h=this.$cJLoginUs,t=this.cJCountry,u=e.siblings('[data-flag="y"]'),m=e.attr("value"),p=e.attr("data-callingcode");h.find(t).text(m);h.attr("data-callingcode",p);u.find("span").remove();e.attr("data-flag","y").append("");this.hideCountryList()},deleteMobileNumberClose:function(){$(".j-deleteMobileNumberPop").addClass(this.cHide)},deleteConfirm:function(){l.get($.proxy(function(){this.deleteMobileNumberClose();this.hideAddMobileLayer(); this.getPersonalize&&this.getPersonalize(this.personalize.model)},this))},getPersonalize:function(e){q.events.trigger("GetPersonalize:fetch",{successCallback:$.proxy(function(h){e.set({userAttention:$.extend(!0,{},e.get("userAttention"),h.userAttention)});this.data=h;this.personalize.trigger("personalizeView:render:render",h)},this)})}})}); define("common/login/loginValidate",["common/config","common/login/loginThirdParty"],function(g,n){var q,l,a,c,k,f,d,e,h=/^\s+$/,t=/^([\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$/,u=/^([a-zA-Z0-9_\-])+(\.([a-zA-Z0-9_\-])+)*@((\[(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5]))\]))|((([a-zA-Z0-9])+(([\-])+([a-zA-Z0-9])+)*\.)+([a-zA-Z])+(([\-])+([a-zA-Z0-9])+)*))$/, m=/^\S{6,30}$/,p=/^(Reseller|Company Purchaser|Consumer)$/;return{init:function(v){this.setOptions(v);d=$.lang.LOGIN_emailRequired;e=$.lang.LOGIN_IncorrectEmailAddress;c=$.lang.LOGIN_passwordRequired;k=$.lang.LOGIN_6_30_characters;f=$.lang.LOGIN_passwordNotmatch;l=$.lang.LOGIN_chooseOption;a=$.lang.LOGIN_businessError;q=$.lang.LOGIN_verifyCodeError;this.$el=$(this.options.el);this.formItemWarp=this.options.formItemWarp;this.formItem=this.options.formItem;this.registerPwd=this.options.registerPwd; this.pageRegisterPwd=this.options.pageRegisterPwd;this.usertypeItem=this.options.usertypeItem;this.usertypeList=this.options.usertypeList;this.buyerTypeTab=this.options.buyerTypeTab;this.buyerWholesale=this.options.buyerWholesale;this.initEvent();return this},setOptions:function(v){this.options={el:"body",formItemWarp:".mdl-textfield",formItem:".j-login-item",usertypeItem:".j-register-usertype-item",usertypeList:".j-register-usertype-list",registerPwd:"#registerPassword",pageRegisterPwd:"#pageRegisterPassword", buyerTypeTab:".j-buyer-type-tab",buyerWholesale:".j-buyer-wholesale"};$.extend(!0,this.options,v||{})},initEvent:function(){$(".j-page-loginWarp").on("focus",".j-login-con .j-login-item",$.proxy(this.isFocus,this));$(".j-page-loginWarp").on("blur",".j-login-con .j-login-item",$.proxy(this.isBlur,this));$(".j-page-loginWarp").on("focus",".j-register-con .j-login-item",$.proxy(this.isFocusRegister,this));$(".j-page-loginWarp").on("blur",".j-register-con .j-login-item",$.proxy(this.isBlurRegister,this)); $(".j-page-loginWarp").on("keyup change",".j-login-item",$.proxy(this.isKeyup,this))},isFocus:function(v){v=$(v.currentTarget);v.closest(this.formItemWarp).addClass("is-focused");v.siblings(".mdl-textfield__label").addClass("dhm-hide")},isBlur:function(v){v=$(v.currentTarget);v.closest(this.formItemWarp).removeClass("is-focused");v.siblings(".mdl-textfield__label").removeClass("dhm-hide")},isFocusRegister:function(v){v=$(v.currentTarget);var w=v.closest(this.formItemWarp);v.siblings(".mdl-textfield__tip").removeClass("dhm-hide"); w.addClass("is-focused");v.siblings(".mdl-textfield__label").addClass("dhm-hide")},isBlurRegister:function(v){var w=$(v.currentTarget);v=w.closest(this.formItemWarp);var z=$(".j-error-tips-login");w.siblings(".mdl-textfield__label").removeClass("dhm-hide");v.removeClass("is-focused");var b=w.attr("data-validate");w=$.trim(w.val());var r=v.find(".mdl-textfield__error"),y=!1,x=!1,B=$(".j-error-tips-login");if("email1"===b)""===w||h.test(w)?y=B.html(d):t.test(w)||(y=B.html(e));else if("pwd"===b)""=== w||h.test(w)?y=B.html(c):m.test(w)||(y=B.html(k));else if("email2"===b)""===w||h.test(w)?(x=r.html(d),v.find(".mdl-textfield__tip").addClass("dhm-hide")):u.test(w)||(x=r.html(e));else if("pwd1"===b)""===w||h.test(w)?(x=r.html(c),v.find(".mdl-textfield__tip").addClass("dhm-hide")):m.test(w)||(x=r.html(k));else if("pwd2"===b)""===w||h.test(w)?(x=r.html(c),v.find(".mdl-textfield__tip").addClass("dhm-hide")):m.test(w)?w!==$.trim((this.$registerPwd=this.$registerPwd||$(this.registerPwd)).val())&&(x=r.html(f)): x=r.html(k);else if("pwd3"===b)""===w||h.test(w)?x=r.html(c):m.test(w)?w!==$.trim((this.$pageRegisterPwd=this.$pageRegisterPwd||$(this.pageRegisterPwd)).val())&&(x=r.html(f)):x=r.html(k);else if("verifyCode1"===b){if(""===w||h.test(w))y=B.html(q)}else"verifyCode2"!==b||""!==w&&!h.test(w)||(x=B.html(q),v.find(".mdl-textfield__tip").addClass("dhm-hide"));y?z.removeClass("dhm-hide"):z.addClass("dhm-hide");x?v.addClass("is-invalid"):v.removeClass("is-invalid")},isKeyup:function(v){v=$(v.currentTarget); var w=v.closest(this.formItemWarp);0
  • ');var x=void 0!==g.cookie("b2b_buyerid")?"signin":"register";$(".j-registrationBar-wrap-box-layer").on("click",".j-bottomRegister",{type:x,loginSuccessCallback:y},$.proxy(this.render,this));this.$cJCategoryWarp.on("click",".j-header-signin",{type:"signin",loginSuccessCallback:y},$.proxy(this.render,this));this.$cJCategoryWarp.on("click", ".j-header-register",{type:"register",isMenuRgister:"menuRegister",loginSuccessCallback:y},$.proxy(this.render,this));this.$cJLogined.on("click",".j-footer-signin",{type:"signin",isSetPageStyle:!0,loginSuccessCallback:y},$.proxy(this.render,this));this.$cJLogined.on("click",".j-footer-register",{type:"register",isSetPageStyle:!0,loginSuccessCallback:y},$.proxy(this.render,this));this.$cJCategoryWarp.on("click",".j-menu-signin",{type:"signin",bubbling:!0,loginSuccessCallback:y},$.proxy(this.render, this));this.$cPageLoginWarp.on("click",".j-myaccount-signin",{type:"signin",bubbling:!0,loginSuccessCallback:y},$.proxy(this.render,this));this.$cPageLoginWarp.on("click",".j-login-page-close",$.proxy(this.toFromURL,this));this.$cPageLoginWarp.on("click",".j-login-mail",$.proxy(this.openTraditionMail,this));this.$cPageLoginWarp.on("click",".j-page-login-tab li",$.proxy(this.pageTabSwitch,this));this.$cPageLoginWarp.on("click",".j-popup-signin-btn",$.proxy(this.websiteSignin,this));this.$cPageLoginWarp.on("click", ".j-popup-register-btn",$.proxy(this.websiteRegister,this));this.$cPageLoginWarp.on("click",".j-agree-policy-agree",$.proxy(this.agreeRegister,this));this.$cPageLoginWarp.on("click",".j-login-guest",$.proxy(this.websiteGuest,this));this.$cPageLoginWarp.on("click",".j-login-google",$.proxy(this.googleSignin,this));this.$cPageLoginWarp.on("click",".j-login-facebook",$.proxy(this.facebookSignin,this));this.$cPageLoginWarp.on("click",".j-login-apple",$.proxy(this.appleSignin,this));this.$cPageLoginWarp.on("click", ".j-login-tiktok",$.proxy(this.tiktokSignin,this));this.$cPageLoginWarp.on("click",".j-login-klarna",$.proxy(this.klarnaSignin,this));this.$cPageLoginWarp.on("click",".j-header-signout",function(){f.init();return!1});this.$cJCategoryWarp.on("click",".j-header-signout",function(){f.init();return!1});this.$cJLogined.on("click",".j-header-signout",function(){f.init();return!1});this.$cPageLoginWarp.on("click",".j-passwordShowBtn, .j-local-single-password-showBtn",$.proxy(this.tabPlaintext,this));this.$cPageLoginWarp.on("click", ".j-local-multiple li[data-buyerid]",$.proxy(this.pflLogin,this));this.$cPageLoginWarp.on("click",".j-local-account-switch",$.proxy(this.switchAccount,this));this.$cPageLoginWarp.on("click",".j-local-account-edit",$.proxy(this.editAccount,this));this.$cPageLoginWarp.on("click",".j-local-acount-done",$.proxy(this.doneAccount,this));this.$cPageLoginWarp.on("click",".j-local-multiple-list-delete",$.proxy(this.delAccountSure,this));this.$cPageLoginWarp.on("click",".j-local-sureDel-cancel",$.proxy(this.delAccountCancle, this));this.$cPageLoginWarp.on("click",".j-local-sureDel-confirm",$.proxy(this.delAccountConfirm,this));this.$cPageLoginWarp.on("click",".j-local-single-submit",$.proxy(this.localSingleSubmit,this));this.$cPageLoginWarp.on("keyup",".j-local-single-password-input",$.proxy(this.setDeleteStyle,this));this.$cPageLoginWarp.on("click",".j-local-single-password-closeBtn",$.proxy(this.deleteText,this));this.$cPageLoginWarp.on("focus",".j-local-single-password-input",$.proxy(this.focusInput,this));this.$cPageLoginWarp.on("blur", ".j-local-single-password-input",$.proxy(this.blurInput,this));this.$window.on("orientationchange, resize",function(){r&&clearTimeout(r);r=setTimeout(function(){b.setLoginStyle()},500)})},setLoginStyle:function(){var b=$(this.cLoginTabContent);this.$window.height();b.outerHeight();b.height();var r=0;b[0]&&(b=b.siblings(),$.each(b,function(y,x){r+=1*$(x).outerHeight()}))},setPageStyle:function(b){var r=this.$html,y=this.$body,x=this.cHtml;this.isSetPageStyle&&(!0===b?(this.__scrollY=parseInt(this.$window.scrollTop()), r.addClass(x),y.css({"margin-top":-this.__scrollY})):(r.removeClass(x),y.attr({style:""}),window.scroll(0,this.__scrollY)))},showLoginLayer:function(){var b=this.$cLoginWarp,r=this.cHide,y=this.cAnimateHide,x=this.cAnimateShow;this.setPageStyle(!0);b.removeClass(r);this.setLoginStyle();setTimeout(function(){b.removeClass(y).addClass(x)},10);g.preventClick()},hideLoginLayer:function(){var b=this.$cLoginWarp,r=this.cHide,y=this.cAnimateHide,x=this.cAnimateShow;this.setPageStyle(!1);b.removeClass(x).addClass(y); setTimeout(function(){b.addClass(r)},260);g.preventClick()},tabSwitch:function(b){var r=$(".j-error-tips-login"),y=$(".j-error-tips-register");if(b.currentTarget)var x=$(b.currentTarget);else{var B=this.$cLoginTab.find("li");x="signin"===b?$(B[0]):$(B[1])}x.siblings().removeClass("current");x.addClass("current");B=this.$cLoginTabContent.find('div[data-type="con"]');x=x.parent().find("li").index(x);$(B[x]).removeClass(this.cHide).siblings('div[data-type="con"]').addClass(this.cHide);0==x?(y.addClass("dhm-hide"), window.__exposureBuryingPoint&&window.__exposureBuryingPoint.init({module:$(b.currentTarget),moduleName:"regform",moduleIndex:"login",event_type:"click",event_body:{event_data:{event_entity_info:{link_type:""}}}})):1==x&&(r.addClass("dhm-hide"),window.__exposureBuryingPoint&&window.__exposureBuryingPoint.init({module:$(b.currentTarget),moduleName:"loginform",moduleIndex:"signup",event_type:"click",event_body:{event_data:{event_entity_info:{link_type:""}}}}))},pageTabSwitch:function(b){var r=$(".j-error-tips-login"), y=$(".j-error-tips-register");if(b.currentTarget)var x=$(b.currentTarget);else{var B=this.$cPageLoginTab.find("li");x="signin"===b?$(B[0]):$(B[1])}x.siblings().removeClass("current");x.addClass("current");B=this.$cPageLoginTabContent.find('div[data-type="con"]');x=x.parent().find("li").index(x);$(B[x]).removeClass(this.cHide).siblings('div[data-type="con"]').addClass(this.cHide);0==x?(y.addClass("dhm-hide"),window.__exposureBuryingPoint&&window.__exposureBuryingPoint.init({module:$(b.currentTarget), moduleName:"loginform",moduleIndex:"signin",event_type:"click",event_code:"qK2nXeIrdaAJ",event_body:{event_data:{event_entity_info:{link_type:""}}}})):1==x&&(r.addClass("dhm-hide"),window.__exposureBuryingPoint&&window.__exposureBuryingPoint.init({module:$(b.currentTarget),moduleName:"regform",moduleIndex:"signup",event_type:"click",event_code:"qK2nXeIrdaAJ",event_body:{event_data:{event_entity_info:{link_type:""}}}}))},controlGuestLogin:function(){!0===this.canVisitorSignin?($(".login-title-text").text($.lang.LOGIN_signin_to_checkout), $(".j-popup-signin-btn a").text($.lang.LOGIN_signin_to_checkout),$(".j-login-con .com-tab-btn label").text($.lang.LOGIN_signin_to_DHgate),this.$cLoginGuest[0]&&this.$cLoginGuest.removeClass(this.cHide)):($(".login-title-text").text($.lang.Head_signIn),$(".j-popup-signin-btn a").text($.lang.Head_signIn),$(".j-login-con .com-tab-btn label").text($.lang.Head_signIn),this.$cLoginGuest[0]&&this.$cLoginGuest.addClass(this.cHide))},logicalforwarding:function(b){var r=!0,y=window.location.pathname,x="";b&& (x=b.type&&"signin"!==b.type?"/register.do":b.bubbling||!0===window.DH_MY_ACCOUNT_PAGE?"/static/login/switchLoginAccounts.html":"/login.do",x+="?_opt="+JSON.stringify(b)+"&fromURL="+encodeURIComponent(location.href));/\/((login|register)\.do|switchLoginAccounts\.html)$/i.test(y)&&(r=!1);return{intercept:r,url:x}},render:function(b){n.events.trigger("popupTip:loading",!1);var r=v({name:"_opt"});r?(r=JSON.parse(decodeURIComponent(r)),r.loginSuccessCallback=b.loginSuccessCallback||$.noop,b=r):b.target&& b.data&&(b=b.data);b.guestReturnUrl&&(b.guestReturnUrl=encodeURIComponent(b.guestReturnUrl));b.returnURL&&(b.returnURL=encodeURIComponent(b.returnURL));this.isSetPageStyle=b.isSetPageStyle;this.canVisitorSignin=b.canVisitorSignin;this.guestReturnUrl=b.guestReturnUrl;this.returnURL=b.returnURL;this.loginSuccessCallback=b.loginSuccessCallback;this.isBuyItNow=b.isBuyItNow;this.isAutoBindNewBuyerCoupon=void 0===b.isAutoBindNewBuyerCoupon?!0:b.isAutoBindNewBuyerCoupon;this.isShowNewBuyerTip=void 0===b.isShowNewBuyerTip? !0:b.isShowNewBuyerTip;b.__DH_Login_Params__=window.__DH_Login_Params__;b.__DH_login_sellerCouponCode__=window.__DH_login_sellerCouponCode__;this.isMenuRgister=b.isMenuRgister;this.cpsTag=b.cpsTag||"";r=this.logicalforwarding(b);if(r.intercept&&r.url)return location.href=r.url,b&&b.bubbling?void 0:!1;if(!this.$cLoginWarp[0]){var y=this.template,x=this.tpl;r=y(x.main.join(""))({dataType:b.isMenuRgister});var B=y(x.container.join(""))({channelType:this.channelType}),D=y(x.loginTab.join(""))({lang:this.lang}), G=y(x.loginCloseBtn.join(""))(),F=y(x.websiteSignin.join(""))({lang:g.countryCur}),J=y(x.thirdSignin.join(""))({isAndroid:g.isAndroid,channelType:this.channelType}),N=y(x.errorTipsLogin.join(""))(),M=y(x.errorTipsRegister.join(""))();y=y(x.noAccount.join(""))();x=$.lang.LOGIN_signin_to_checkout;var K=$.lang.LOGIN_signin_to_DHgate;F=F.replace(/\{\{lang_Head_signIn\}\}/,x);B=B.replace(/\{\{loginCloseBtn\}\}/,G).replace(/\{\{websiteSignin\}\}/,F).replace(/\{\{noAccount\}\}/,y).replace(/\{\{errorTipsLogin\}\}/, N).replace(/\{\{errorTipsRegister\}\}/,M).replace(/\{\{lang_Head_signIn\}\}/,x).replace(/\{\{lang_LOGIN_signin_to_DHgate\}\}/,K).replace(/\{\{loginTab\}\}/,D).replace(/\{\{thirdSignin\}\}/g,J);this.$body.append(r);window.__asyncInvoking&&window.__asyncInvoking();$(".j-popup-loginWarp").append(B);this.registerPopupInstance.$event.trigger("registerPopup:render");this.renderSigninCode();this.initElement();this.googleInitBindSigin()}this.showLoginLayer();this.controlGuestLogin();this.tabSwitch(b.type|| "signin");this.isBuyItNow||"cartPage"===this.$body.attr("data-pagetype")?this.$cRegisterSendcoupon.addClass(this.cHide):this.$cRegisterSendcoupon.removeClass(this.cHide);return!1},nonePopupRender:function(b){n.events.trigger("popupTip:loading",!1);var r=v({name:"_opt"});r?(r=JSON.parse(decodeURIComponent(r)),r.loginSuccessCallback=b.loginSuccessCallback||$.noop,b=r):b.target&&b.data&&(b=b.data);var y=this.loginType="login";/\/register\.do$/i.test(window.location.pathname)&&(y=this.loginType="register"); b.guestReturnUrl&&(b.guestReturnUrl=encodeURIComponent(b.guestReturnUrl));b.returnURL&&(b.returnURL=encodeURIComponent(b.returnURL));this.canVisitorSignin=b.canVisitorSignin;this.guestReturnUrl=b.guestReturnUrl;this.returnURL=b.returnURL;this.loginSuccessCallback=b.loginSuccessCallback;this.isBuyItNow=b.isBuyItNow;this.cpsTag=b.cpsTag||"";this.isAutoBindNewBuyerCoupon=void 0===b.isAutoBindNewBuyerCoupon?!0:b.isAutoBindNewBuyerCoupon;this.isShowNewBuyerTip=void 0===b.isShowNewBuyerTip?!0:b.isShowNewBuyerTip; b.__DH_Login_Params__=window.__DH_Login_Params__;b.__DH_login_sellerCouponCode__=window.__DH_login_sellerCouponCode__;this.isMenuRgister=b.isMenuRgister;r=this.logicalforwarding(b);if(r.intercept&&r.url)return location.href=r.url,b&&b.bubbling?void 0:!1;var x="dhm-hide",B="dhm-hide";r=null;try{r=d.getPfl()}catch(M){console.error("\u83b7\u53d6pfls\u5931\u8d25")}r?B="":x="";var D=this.template,G=this.tpl;y=D(G.main1.join(""))({dataType:b.isMenuRgister,channelType:this.channelType,remoteShow:x,localShow:B, pfls:r,isSwitchLoginPage:this.isSwitchLoginPage,currentBuyerId:$.cookie("b2b_buyerid"),loginType:y});x=D(G.loginTab1.join(""))({lang:this.lang});B=D(G.websiteSignin.join(""))({lang:g.countryCur});var F=D(G.thirdSignin.join(""))({isAndroid:g.isAndroid,channelType:this.channelType}),J=D(G.errorTipsLogin.join(""))(),N=D(G.errorTipsRegister.join(""))();D=D(G.noAccount.join(""))();B=B.replace(/\{\{lang_Head_signIn\}\}/,b.canVisitorSignin?$.lang.LOGIN_signin_to_checkout:$.lang.Head_signIn);y=y.replace(/\{\{websiteSignin\}\}/, B).replace(/\{\{noAccount\}\}/,D).replace(/\{\{errorTipsLogin\}\}/,J).replace(/\{\{errorTipsRegister\}\}/,N).replace(/\{\{loginTab1\}\}/,x).replace(/\{\{thirdSignin\}\}/g,F);this.$cPageLoginWarp.html(y);this.registerPopupInstance.$event.trigger("registerPopup:nonePopupRender");this.renderSigninCode();this.initElement();r&&1===r.length&&!0!==this.isSwitchLoginPage&&this.renderLocalSingle(r[0].buyerid);this.googleInitBindSigin();this.controlGuestLogin();this.pageTabSwitch(b.type||"signin");this.isBuyItNow|| "cartPage"===this.$body.attr("data-pagetype")?this.$cRegisterSendcoupon.addClass(this.cHide):this.$cRegisterSendcoupon.removeClass(this.cHide);window.__exposureBuryingPoint&&window.__exposureBuryingPoint.init({module:$(".j-login-con"),moduleName:"loginform",moduleIndex:"1",event_type:"expose",event_code:"wjgVfYe0n8FG",event_body:{event_data:{event_entity_info:{}}}});window.__exposureBuryingPoint&&window.__exposureBuryingPoint.init({module:$(".j-page-register-content"),moduleName:"regform",moduleIndex:"1", event_type:"expose",event_code:"eThZFYNaUu5u",event_body:{event_data:{event_entity_info:{}}}});b=$(".j-login-googleinterface-warp");D=b.attr("spm-c");"google_other"===D?(D="google_other",eventcode="ajV9QM5PlRaM"):(D="googlelogin",eventcode="voG6Qk1ZLpfu");window.__exposureBuryingPoint&&b[0]&&window.__exposureBuryingPoint.init({module:b,moduleName:D,moduleIndex:"1",event_type:"expose",event_code:eventcode,event_body:{event_data:{event_entity_info:{}}}});if(r&&1>(-2*f&6)):0)e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(e);return t}function q(k){return decodeURIComponent(c(k).replace(/(.)/g,function(f,d){f=d.charCodeAt(0).toString(16).toUpperCase(); 2>f.length&&(f="0"+f);return"%"+f}))}function l(k){this.message=k}function a(k,f){if("string"!==typeof k)throw new l("Invalid token specified: must be a string");f=f||{};f=!0===f.header?0:1;k=k.split(".")[f];if("string"!==typeof k)throw new l("Invalid token specified: missing part #"+(f+1));try{var d=k.replace(/-/g,"+").replace(/_/g,"/");switch(d.length%4){case 0:break;case 2:d+="==";break;case 3:d+="=";break;default:throw Error("base64 string is not of the correct length");}try{var e=q(d)}catch(h){e= c(d)}}catch(h){throw new l("Invalid token specified: invalid base64 for part #"+(f+1)+" ("+h.message+")");}try{return JSON.parse(e)}catch(h){throw new l("Invalid token specified: invalid json for part #"+(f+1)+" ("+h.message+")");}}g.prototype=Error();g.prototype.name="InvalidCharacterError";var c="undefined"!==typeof window&&window.atob&&window.atob.bind(window)||n;l.prototype=Error();l.prototype.name="InvalidTokenError";window&&("function"==typeof window.define&&window.define.amd?window.define("tools/jwt_decode", [],function(){return a}):window&&(window.jwt_decode=a))}); (function(g,n){"object"===typeof exports&&"undefined"!==typeof module?module.exports=n():"function"===typeof define&&define.amd?define("tools/es6-promise.auto",["lib/jquery"],n):g.ES6Promise=n()})(this,function(){function g(A){return"function"===typeof A}function n(){return function(){return process.nextTick(k)}}function q(){return"undefined"!==typeof N?function(){N(k)}:c()}function l(){var A=0,C=new T(k),E=document.createTextNode("");C.observe(E,{characterData:!0});return function(){E.data=A=++A% 2}}function a(){var A=new MessageChannel;A.port1.onmessage=k;return function(){return A.port2.postMessage(0)}}function c(){var A=setTimeout;return function(){return A(k,1)}}function k(){for(var A=0;A');var x=void 0!==g.cookie("b2b_buyerid")?"signin":"register";$(".j-registrationBar-wrap-box-layer").on("click",".j-bottomRegister",{type:x,loginSuccessCallback:y},$.proxy(this.render,this));this.$cJCategoryWarp.on("click",".j-header-signin",{type:"signin",loginSuccessCallback:y},$.proxy(this.render,this));this.$cJCategoryWarp.on("click", ".j-header-register",{type:"register",isMenuRgister:"menuRegister",loginSuccessCallback:y},$.proxy(this.render,this));this.$cJLogined.on("click",".j-footer-signin",{type:"signin",isSetPageStyle:!0,loginSuccessCallback:y},$.proxy(this.render,this));this.$cJLogined.on("click",".j-footer-register",{type:"register",isSetPageStyle:!0,loginSuccessCallback:y},$.proxy(this.render,this));this.$cJCategoryWarp.on("click",".j-menu-signin",{type:"signin",bubbling:!0,loginSuccessCallback:y},$.proxy(this.render, this));this.$cPageLoginWarp.on("click",".j-myaccount-signin",{type:"signin",bubbling:!0,loginSuccessCallback:y},$.proxy(this.render,this));this.$cPageLoginWarp.on("click",".j-login-page-close",$.proxy(this.toFromURL,this));this.$cPageLoginWarp.on("click",".j-login-mail",$.proxy(this.openTraditionMail,this));this.$cPageLoginWarp.on("click",".j-page-login-tab li",$.proxy(this.pageTabSwitch,this));this.$cPageLoginWarp.on("click",".j-popup-signin-btn",$.proxy(this.websiteSignin,this));this.$cPageLoginWarp.on("click", ".j-popup-register-btn",$.proxy(this.websiteRegister,this));this.$cPageLoginWarp.on("click",".j-agree-policy-agree",$.proxy(this.agreeRegister,this));this.$cPageLoginWarp.on("click",".j-login-guest",$.proxy(this.websiteGuest,this));this.$cPageLoginWarp.on("click",".j-login-google",$.proxy(this.googleSignin,this));this.$cPageLoginWarp.on("click",".j-login-facebook",$.proxy(this.facebookSignin,this));this.$cPageLoginWarp.on("click",".j-login-apple",$.proxy(this.appleSignin,this));this.$cPageLoginWarp.on("click", ".j-login-tiktok",$.proxy(this.tiktokSignin,this));this.$cPageLoginWarp.on("click",".j-login-klarna",$.proxy(this.klarnaSignin,this));this.$cPageLoginWarp.on("click",".j-header-signout",function(){f.init();return!1});this.$cJCategoryWarp.on("click",".j-header-signout",function(){f.init();return!1});this.$cJLogined.on("click",".j-header-signout",function(){f.init();return!1});this.$cPageLoginWarp.on("click",".j-passwordShowBtn, .j-local-single-password-showBtn",$.proxy(this.tabPlaintext,this));this.$cPageLoginWarp.on("click", ".j-local-multiple li[data-buyerid]",$.proxy(this.pflLogin,this));this.$cPageLoginWarp.on("click",".j-local-account-switch",$.proxy(this.switchAccount,this));this.$cPageLoginWarp.on("click",".j-local-account-edit",$.proxy(this.editAccount,this));this.$cPageLoginWarp.on("click",".j-local-acount-done",$.proxy(this.doneAccount,this));this.$cPageLoginWarp.on("click",".j-local-multiple-list-delete",$.proxy(this.delAccountSure,this));this.$cPageLoginWarp.on("click",".j-local-sureDel-cancel",$.proxy(this.delAccountCancle, this));this.$cPageLoginWarp.on("click",".j-local-sureDel-confirm",$.proxy(this.delAccountConfirm,this));this.$cPageLoginWarp.on("click",".j-local-single-submit",$.proxy(this.localSingleSubmit,this));this.$cPageLoginWarp.on("keyup",".j-local-single-password-input",$.proxy(this.setDeleteStyle,this));this.$cPageLoginWarp.on("click",".j-local-single-password-closeBtn",$.proxy(this.deleteText,this));this.$cPageLoginWarp.on("focus",".j-local-single-password-input",$.proxy(this.focusInput,this));this.$cPageLoginWarp.on("blur", ".j-local-single-password-input",$.proxy(this.blurInput,this));this.$window.on("orientationchange, resize",function(){r&&clearTimeout(r);r=setTimeout(function(){b.setLoginStyle()},500)})},setLoginStyle:function(){var b=$(this.cLoginTabContent);this.$window.height();b.outerHeight();b.height();var r=0;b[0]&&(b=b.siblings(),$.each(b,function(y,x){r+=1*$(x).outerHeight()}))},setPageStyle:function(b){var r=this.$html,y=this.$body,x=this.cHtml;this.isSetPageStyle&&(!0===b?(this.__scrollY=parseInt(this.$window.scrollTop()), r.addClass(x),y.css({"margin-top":-this.__scrollY})):(r.removeClass(x),y.attr({style:""}),window.scroll(0,this.__scrollY)))},showLoginLayer:function(){var b=this.$cLoginWarp,r=this.cHide,y=this.cAnimateHide,x=this.cAnimateShow;this.setPageStyle(!0);b.removeClass(r);this.setLoginStyle();setTimeout(function(){b.removeClass(y).addClass(x)},10);g.preventClick()},hideLoginLayer:function(){var b=this.$cLoginWarp,r=this.cHide,y=this.cAnimateHide,x=this.cAnimateShow;this.setPageStyle(!1);b.removeClass(x).addClass(y); setTimeout(function(){b.addClass(r)},260);g.preventClick()},tabSwitch:function(b){var r=$(".j-error-tips-login"),y=$(".j-error-tips-register");if(b.currentTarget)var x=$(b.currentTarget);else{var B=this.$cLoginTab.find("li");x="signin"===b?$(B[0]):$(B[1])}x.siblings().removeClass("current");x.addClass("current");B=this.$cLoginTabContent.find('div[data-type="con"]');x=x.parent().find("li").index(x);$(B[x]).removeClass(this.cHide).siblings('div[data-type="con"]').addClass(this.cHide);0==x?(y.addClass("dhm-hide"), window.__exposureBuryingPoint&&window.__exposureBuryingPoint.init({module:$(b.currentTarget),moduleName:"regform",moduleIndex:"login",event_type:"click",event_body:{event_data:{event_entity_info:{link_type:""}}}})):1==x&&(r.addClass("dhm-hide"),window.__exposureBuryingPoint&&window.__exposureBuryingPoint.init({module:$(b.currentTarget),moduleName:"loginform",moduleIndex:"signup",event_type:"click",event_body:{event_data:{event_entity_info:{link_type:""}}}}))},pageTabSwitch:function(b){var r=$(".j-error-tips-login"), y=$(".j-error-tips-register");if(b.currentTarget)var x=$(b.currentTarget);else{var B=this.$cPageLoginTab.find("li");x="signin"===b?$(B[0]):$(B[1])}x.siblings().removeClass("current");x.addClass("current");B=this.$cPageLoginTabContent.find('div[data-type="con"]');x=x.parent().find("li").index(x);$(B[x]).removeClass(this.cHide).siblings('div[data-type="con"]').addClass(this.cHide);0==x?(y.addClass("dhm-hide"),window.__exposureBuryingPoint&&window.__exposureBuryingPoint.init({module:$(b.currentTarget), moduleName:"loginform",moduleIndex:"signin",event_type:"click",event_code:"qK2nXeIrdaAJ",event_body:{event_data:{event_entity_info:{link_type:""}}}})):1==x&&(r.addClass("dhm-hide"),window.__exposureBuryingPoint&&window.__exposureBuryingPoint.init({module:$(b.currentTarget),moduleName:"regform",moduleIndex:"signup",event_type:"click",event_code:"qK2nXeIrdaAJ",event_body:{event_data:{event_entity_info:{link_type:""}}}}))},controlGuestLogin:function(){!0===this.canVisitorSignin?($(".login-title-text").text($.lang.LOGIN_signin_to_checkout), $(".j-popup-signin-btn a").text($.lang.LOGIN_signin_to_checkout),$(".j-login-con .com-tab-btn label").text($.lang.LOGIN_signin_to_DHgate),this.$cLoginGuest[0]&&this.$cLoginGuest.removeClass(this.cHide)):($(".login-title-text").text($.lang.Head_signIn),$(".j-popup-signin-btn a").text($.lang.Head_signIn),$(".j-login-con .com-tab-btn label").text($.lang.Head_signIn),this.$cLoginGuest[0]&&this.$cLoginGuest.addClass(this.cHide))},logicalforwarding:function(b){var r=!0,y=window.location.pathname,x="";b&& (x=b.type&&"signin"!==b.type?"/register.do":b.bubbling||!0===window.DH_MY_ACCOUNT_PAGE?"/static/login/switchLoginAccounts.html":"/login.do",x+="?_opt="+JSON.stringify(b)+"&fromURL="+encodeURIComponent(location.href));/\/((login|register)\.do|switchLoginAccounts\.html)$/i.test(y)&&(r=!1);return{intercept:r,url:x}},render:function(b){n.events.trigger("popupTip:loading",!1);var r=v({name:"_opt"});r?(r=JSON.parse(decodeURIComponent(r)),r.loginSuccessCallback=b.loginSuccessCallback||$.noop,b=r):b.target&& b.data&&(b=b.data);b.guestReturnUrl&&(b.guestReturnUrl=encodeURIComponent(b.guestReturnUrl));b.returnURL&&(b.returnURL=encodeURIComponent(b.returnURL));this.isSetPageStyle=b.isSetPageStyle;this.canVisitorSignin=b.canVisitorSignin;this.guestReturnUrl=b.guestReturnUrl;this.returnURL=b.returnURL;this.loginSuccessCallback=b.loginSuccessCallback;this.isBuyItNow=b.isBuyItNow;this.isAutoBindNewBuyerCoupon=void 0===b.isAutoBindNewBuyerCoupon?!0:b.isAutoBindNewBuyerCoupon;this.isShowNewBuyerTip=void 0===b.isShowNewBuyerTip? !0:b.isShowNewBuyerTip;b.__DH_Login_Params__=window.__DH_Login_Params__;b.__DH_login_sellerCouponCode__=window.__DH_login_sellerCouponCode__;this.isMenuRgister=b.isMenuRgister;this.cpsTag=b.cpsTag||"";r=this.logicalforwarding(b);if(r.intercept&&r.url)return location.href=r.url,b&&b.bubbling?void 0:!1;if(!this.$cLoginWarp[0]){var y=this.template,x=this.tpl;r=y(x.main.join(""))({dataType:b.isMenuRgister});var B=y(x.container.join(""))({channelType:this.channelType}),D=y(x.loginTab.join(""))({lang:this.lang}), G=y(x.loginCloseBtn.join(""))(),F=y(x.websiteSignin.join(""))({lang:g.countryCur}),J=y(x.thirdSignin.join(""))({isAndroid:g.isAndroid,channelType:this.channelType}),N=y(x.errorTipsLogin.join(""))(),M=y(x.errorTipsRegister.join(""))();y=y(x.noAccount.join(""))();x=$.lang.LOGIN_signin_to_checkout;var K=$.lang.LOGIN_signin_to_DHgate;F=F.replace(/\{\{lang_Head_signIn\}\}/,x);B=B.replace(/\{\{loginCloseBtn\}\}/,G).replace(/\{\{websiteSignin\}\}/,F).replace(/\{\{noAccount\}\}/,y).replace(/\{\{errorTipsLogin\}\}/, N).replace(/\{\{errorTipsRegister\}\}/,M).replace(/\{\{lang_Head_signIn\}\}/,x).replace(/\{\{lang_LOGIN_signin_to_DHgate\}\}/,K).replace(/\{\{loginTab\}\}/,D).replace(/\{\{thirdSignin\}\}/g,J);this.$body.append(r);window.__asyncInvoking&&window.__asyncInvoking();$(".j-popup-loginWarp").append(B);this.registerPopupInstance.$event.trigger("registerPopup:render");this.renderSigninCode();this.initElement();this.googleInitBindSigin()}this.showLoginLayer();this.controlGuestLogin();this.tabSwitch(b.type|| "signin");this.isBuyItNow||"cartPage"===this.$body.attr("data-pagetype")?this.$cRegisterSendcoupon.addClass(this.cHide):this.$cRegisterSendcoupon.removeClass(this.cHide);return!1},nonePopupRender:function(b){n.events.trigger("popupTip:loading",!1);var r=v({name:"_opt"});r?(r=JSON.parse(decodeURIComponent(r)),r.loginSuccessCallback=b.loginSuccessCallback||$.noop,b=r):b.target&&b.data&&(b=b.data);var y=this.loginType="login";/\/register\.do$/i.test(window.location.pathname)&&(y=this.loginType="register"); b.guestReturnUrl&&(b.guestReturnUrl=encodeURIComponent(b.guestReturnUrl));b.returnURL&&(b.returnURL=encodeURIComponent(b.returnURL));this.canVisitorSignin=b.canVisitorSignin;this.guestReturnUrl=b.guestReturnUrl;this.returnURL=b.returnURL;this.loginSuccessCallback=b.loginSuccessCallback;this.isBuyItNow=b.isBuyItNow;this.cpsTag=b.cpsTag||"";this.isAutoBindNewBuyerCoupon=void 0===b.isAutoBindNewBuyerCoupon?!0:b.isAutoBindNewBuyerCoupon;this.isShowNewBuyerTip=void 0===b.isShowNewBuyerTip?!0:b.isShowNewBuyerTip; b.__DH_Login_Params__=window.__DH_Login_Params__;b.__DH_login_sellerCouponCode__=window.__DH_login_sellerCouponCode__;this.isMenuRgister=b.isMenuRgister;r=this.logicalforwarding(b);if(r.intercept&&r.url)return location.href=r.url,b&&b.bubbling?void 0:!1;var x="dhm-hide",B="dhm-hide";r=null;try{r=d.getPfl()}catch(M){console.error("\u83b7\u53d6pfls\u5931\u8d25")}r?B="":x="";var D=this.template,G=this.tpl;y=D(G.main1.join(""))({dataType:b.isMenuRgister,channelType:this.channelType,remoteShow:x,localShow:B, pfls:r,isSwitchLoginPage:this.isSwitchLoginPage,currentBuyerId:$.cookie("b2b_buyerid"),loginType:y});x=D(G.loginTab1.join(""))({lang:this.lang});B=D(G.websiteSignin.join(""))({lang:g.countryCur});var F=D(G.thirdSignin.join(""))({isAndroid:g.isAndroid,channelType:this.channelType}),J=D(G.errorTipsLogin.join(""))(),N=D(G.errorTipsRegister.join(""))();D=D(G.noAccount.join(""))();B=B.replace(/\{\{lang_Head_signIn\}\}/,b.canVisitorSignin?$.lang.LOGIN_signin_to_checkout:$.lang.Head_signIn);y=y.replace(/\{\{websiteSignin\}\}/, B).replace(/\{\{noAccount\}\}/,D).replace(/\{\{errorTipsLogin\}\}/,J).replace(/\{\{errorTipsRegister\}\}/,N).replace(/\{\{loginTab1\}\}/,x).replace(/\{\{thirdSignin\}\}/g,F);this.$cPageLoginWarp.html(y);this.registerPopupInstance.$event.trigger("registerPopup:nonePopupRender");this.renderSigninCode();this.initElement();r&&1===r.length&&!0!==this.isSwitchLoginPage&&this.renderLocalSingle(r[0].buyerid);this.googleInitBindSigin();this.controlGuestLogin();this.pageTabSwitch(b.type||"signin");this.isBuyItNow|| "cartPage"===this.$body.attr("data-pagetype")?this.$cRegisterSendcoupon.addClass(this.cHide):this.$cRegisterSendcoupon.removeClass(this.cHide);window.__exposureBuryingPoint&&window.__exposureBuryingPoint.init({module:$(".j-login-con"),moduleName:"loginform",moduleIndex:"1",event_type:"expose",event_code:"wjgVfYe0n8FG",event_body:{event_data:{event_entity_info:{}}}});window.__exposureBuryingPoint&&window.__exposureBuryingPoint.init({module:$(".j-page-register-content"),moduleName:"regform",moduleIndex:"1", event_type:"expose",event_code:"eThZFYNaUu5u",event_body:{event_data:{event_entity_info:{}}}});b=$(".j-login-googleinterface-warp");D=b.attr("spm-c");"google_other"===D?(D="google_other",eventcode="ajV9QM5PlRaM"):(D="googlelogin",eventcode="voG6Qk1ZLpfu");window.__exposureBuryingPoint&&b[0]&&window.__exposureBuryingPoint.init({module:b,moduleName:D,moduleIndex:"1",event_type:"expose",event_code:eventcode,event_body:{event_data:{event_entity_info:{}}}});if(r&&1v;v++){var w={};w.nickname=m.userList[v].nickname;w.thirdType=m.userList[v].thirdType;w.email=m.userList[v].email;w.email&&(w.mEmail=this.maskEmail(w.email));w.lastlogondate=m.userList[v].lastlogondate;0===v?p._lastlogondate=w.lastlogondate:w.lastlogondate>p._lastlogondate&&(p.lastlogonIndex=v);console.log(p.lastlogonIndex);w.registerTime=m.userList[v].registerTime;w.registerTime&&(w.registerTimeFormat=(new Date(w.registerTime)).toISOString().slice(0,10));w.orderCount=m.userList[v].orderCount; w.orderText=1span >img").attr("src"));""!=k&&void 0!=k&&encodeURIComponent(k);k=encodeURIComponent(c);q=encodeURIComponent(l||q);var f=encodeURIComponent(""),d=!0;if("email"== a){var e=document.createElement("a");e.setAttribute("href","mailto:?subject=Your friend recommends this product (via DHgate.com)&body="+l.replace(/&+|@+|'+|"+/g,"")+k);e.setAttribute("style","display:none;");e.innerHTML="email";document.body.appendChild(e);e.click()}else{var h="https://www.facebook.com/dhgate/";"fr"===g.countryCur?h="https://www.facebook.com/DHgateFRANCAIS/":"es"===g.countryCur&&(h="https://www.facebook.com/DhgateES");switch(a){case "facebook":e=h;break;case "instagram":e="https://www.instagram.com/dhgate_official/"; break;case "pinterest":e="https://www.pinterest.com/dhgate/pins/";break;case "twitter":e="https://twitter.com/dhgate";break;case "youtube":e="https://www.youtube.com/user/DHgate2004";break;case "vk":e="https://vk.com/dh.gate";break;case "del.icio.us":e="https://delicious.com/post?title="+q+"&url="+k;break;case "digg":e="http://digg.com/submit?phase=2&url="+k+"&title="+q+"&bodytext="+f+"&topic=tech_deals";break;case "reddit":e="http://reddit.com/submit?url="+k+"&title="+q;break;case "furl":e="http://www.furl.net/savedialog.jsp?t="+ q+"&u="+k;break;case "rawsugar":e="http://www.rawsugar.com/home/extensiontagit/?turl="+k+"&tttl="+q;break;case "stumbleupon":e="http://www.stumbleupon.com/submit?url="+k+"&title="+q;break;case "technorati":e="http://technorati.com/faves?sub=favthis&add="+k;break;case "spurl":e="http://www.spurl.net/spurl.php?v=3&title="+q+"&url="+k;break;case "simpy":e="http://www.simpy.com/simpy/LinkAdd.do?title="+q+"&href="+k;break;case "google":e="http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk="+ k+"&title="+q;break;case "netscape":e="http://www.netscape.com/submit/?U="+k+"&T="+q+"&C="+f;break;case "slashdot":e="http://slashdot.org/bookmark.pl?url="+c+"&title="+q;break;case "backflip":e="http://www.backflip.com/add_page_pop.ihtml?title="+q+"&url="+k;break;case "bluedot":e="http://bluedot.us/Authoring.aspx?u="+k+"&t="+q;break;case "kaboodle":e="http://www.kaboodle.com/za/selectpage?p_pop=false&pa=url&u="+k;break;case "squidoo":e="http://www.squidoo.com/lensmaster/bookmark?"+k;break;case "bluedot":e= "http://blinkbits.com/bookmarklets/save.php?v=1&source_url="+k+"&title="+q;break;case "blinkList":e="http://blinkbits.com/bookmarklets/save.php?v=1&source_url="+k+"&title="+q;break;case "linkedin":e="http://www.linkedin.com/cws/share?url="+k+"&title="+q;break;case "googleplus":e="https://plus.google.com/share?url="+k;break;case "browser":bookmarksite(l,c),d=!1}1==d&&window.open(e)}}var q=window.document.title;$(".j-foot-share")[0]&&$(".j-foot-share li").on("click",n)}); define("checkoutflow/popupTip",["common/config"],function(g){var n=function(){var q=this;this.setOptions();this.el=this.options.el;this.loadingWarp=this.options.loadingWarp;this.dataErrorTipWarp=this.options.dataErrorTipWarp;this.dataErrorTipLayerWarp=this.options.dataErrorTipLayerWarp;this.dataErrorTip=this.options.dataErrorTip;this.cOrderInfoWarp=this.options.cOrderInfoWarp;this.dataErrorSureBtn=this.options.dataErrorSureBtn;this.mask=this.options.mask;this.autoLayerWarp=this.options.autoLayerWarp; this.cHide=this.options.cHide;this.events=$({});this.init();n=function(){return q}};$.extend(n.prototype,{init:function(){this.initElement();this.initEvent()},setOptions:function(){this.options={el:document,loadingWarp:".j-loading-warp",dataErrorTipWarp:".j-popup-warp",dataErrorTipLayerWarp:".j-popup-layer-warp",dataErrorTip:".j-errorText",dataErrorSureBtn:"#errorSure",mask:".j-mask",autoLayerWarp:".j-auto-layer",cHide:"dhm-hide"}},initElement:function(){this.$el=$(this.el);this.$loadingWarp=$(this.loadingWarp); this.$dataErrorTipWarp=$(this.dataErrorTipWarp);this.$dataErrorTipLayerWarp=$(this.dataErrorTipLayerWarp);this.$dataErrorTip=$(this.dataErrorTip);this.$autoLayerWarp=$(this.autoLayerWarp)},initEvent:function(){this.events.on("popupTip:loading",$.proxy(this.controlLoadingLayer,this));this.events.on("popupTip:dataErrorTip",$.proxy(this.setDataErrorTip,this));this.events.on("popupTip:autoTip",$.proxy(this.setAutoTip,this));this.$dataErrorTipWarp.on("click",this.dataErrorSureBtn,$.proxy(this.hiddenDataErrorTip, this))},setMaskStyle:function(){this.$loadingWarp.find(this.mask).css({width:this.$el.width(),height:this.$el.height()});this.$dataErrorTipWarp.find(this.mask).css({width:this.$el.width(),height:this.$el.height()})},controlLoadingLayer:function(q,l){!0===l?(this.setMaskStyle(),this.$loadingWarp.removeClass(this.cHide)):this.$loadingWarp.addClass(this.cHide)},controlDataErrorTipLayer:function(q){!0===q?(this.setMaskStyle(),this.$dataErrorTipWarp.removeClass(this.cHide)):this.$dataErrorTipWarp.addClass(this.cHide)}, setDataErrorStyle:function(){this.$dataErrorTipLayerWarp.css({"margin-top":-parseInt(1*this.$dataErrorTipLayerWarp.outerHeight()/2)})},setDataErrorTip:function(q,l){this.$dataErrorTip.attr({action:l.action}).find("span").html(l.message);this.controlDataErrorTipLayer(!0);this.setDataErrorStyle()},hiddenDataErrorTip:function(){var q=this.$dataErrorTip.attr("action"),l=this.$dataErrorTip.attr("customUrl");"close"===q?this.controlDataErrorTipLayer(!1):"refresh"===q?location.reload():"gohome"===q?location.href= g.wwwURL:"custom"===q?location.href=l||"/":"gotodetail"===q&&(q=document.referrer,l=new RegExp((g.wwwPATHNAME+g.wwwSEARCH).replace(/\+/g,"\\+"),"i"),$.cookie("__DH_Detail__url")?window.location.href=$.cookie("__DH_Detail__url"):l.test(q)&&!/returnURL=/i.test(q)?window.location.href=g.wwwURL:/\/login\.do|\/register\.do/i.test(q)||/\/mydhgate\/downloadApp\.html/i.test(q)?window.history.go(-2):window.history.back())},controlAutoTipLayer:function(q){var l=q.timer;q=q.callback;var a=this.$autoLayerWarp, c=this.cHide;q?q():(a.removeClass(c).animate({opacity:1},500),setTimeout(function(){a.animate({opacity:0},500,function(){a.addClass(c)})},l))},setAutoLayerStyle:function(){this.$autoLayerWarp.css({"margin-top":-parseInt(1*this.$autoLayerWarp.outerHeight()/2)})},setAutoTip:function(q,l){this.$autoLayerWarp.html(l.message);this.controlAutoTipLayer({timer:l.timer||3E3,callback:l.callback});this.setAutoLayerStyle()}});return new n}); define("checkoutflow/dataErrorLog",["common/config"],function(g){var n=function(q){this.setOptions(q);this.setOptions(q);this.el=this.options.el;this.div=this.options.div;this.img=this.options.img;this.flag=this.options.flag;this.url=g.app_dhgate+this.options.url;this.events=$({});this.init()};$.extend(n.prototype,{init:function(){this.initElement();this.initEvent()},setOptions:function(q){this.options={el:"body",div:"
    ",img:"",flag:!1,url:""};$.extend(this.options,q||{})},initElement:function(){this.$el= this.$el||$(this.options.el);this.$div=$(this.div);this.$img=$(this.img)},initEvent:function(){this.events.on("save:dataErrorLog",$.proxy(this.save,this))},getReferrerUrl:function(){return document.referrer},getUrl:function(){return location.href},getLocalTime:function(){return(new Date).getTime()},getParams:function(q){var l={};l.message=q.message;l.url={};l.url.u1=this.getUrl();l.url.u2=this.getReferrerUrl()||"";l.url.u3=q.url;l.params=q.params&&$.extend(!0,{},q.params)||{};l.result=q.result&&$.extend(!0, {},q.result)||{};l.localTime=this.getLocalTime();l.custom=q.custom&&$.extend(!0,{},q.custom)||{};return l},save:function(q,l){this.flag&&""!==this.url&&(this.$div.css({display:"none"}),this.$img.css({width:1,height:1,borderStyle:"none"}).attr({src:this.url+"?client=wap&language="+g.countryCur+"&v="+encodeURIComponent(JSON.stringify(this.getParams(l)))}),this.$el.append(this.$div.append(this.$img)),this.initElement())}});return n}); requirejs.config({baseUrl:"//js.dhresource.com/mobile_v2/src/",paths:{lib:"common/base",tools:"common/tools",ui:"common/ui",tpl:"common/tpl",checkoutflow:"common/checkoutflow",appHeader:"header"},waitSeconds:0,shim:{"lib/backbone":{deps:["lib/underscore","lib/jquery"],exports:"Backbone"},"lib/underscore":{exports:"_"},"lib/jquery":{exports:"$"},"tools/jquery.cookie":{deps:["lib/jquery"],exports:"$cookie"}}});requirejs(["appHeader/main"]); define("appHeader/main","common/config common/langLoader common/appSpread ui/ripple ui/lazyload common/header/EDMConfirmEmail common/header/buyerUserInfo common/goBack common/closeNewUserVerifyMailbox common/emailModify common/isShowEmailTip common/header/topMenuInit common/header/turnToLanguagesWebsite common/header/topSearch common/header/getShiptoLayer common/header/getRecomWord common/login/signinPopup common/sharesns tools/taskmanager".split(" "),function(g,n,q,l,a,c,k,f,d,e,h,t,u,m,p,v,w,z, b){l=function(){var r=new b(5),y=[];y.push(function(){setTimeout(function(){$("#errorSure").html("OK")},1)});y.push(function(){setTimeout(function(){w.init()},1)});y.push(function(){setTimeout(function(){q.init()},1)});y.push(function(){setTimeout(function(){new t},1)});y.push(function(){setTimeout(function(){u.init()},1)});y.push(function(){setTimeout(function(){new k},1)});y.push(function(){setTimeout(function(){new m},1)});y.push(function(){setTimeout(function(){new c},1)});y.push(function(){window.__DH_MSITE_shipToLayer_1008= 0;window.DHabversions&&1===window.DHabversions["1008"]&&(window.__DH_MSITE_shipToLayer_1008=1);setTimeout(function(){new p($(".j-shipToLangBtn").parents("li").removeClass("dhm-hide"))},1)});y.push(function(){setTimeout(function(){new d;new e;h.init()},1)});y.push(function(){setTimeout(function(){new v},1)});y.push(function(){setTimeout(function(){/\/placeorder\/placeOrder\.html/i.test(g.wwwPATHNAME)||window.DHJSSDK&&DHJSSDK.Storage.setItem("__dh__placeorder_paymentTarget__",1,-1,function(x){});f.init({customReturnToUrl:function(){var x= document.referrer,B=new RegExp((g.wwwPATHNAME+g.wwwSEARCH).replace(/\+/g,"\\+"),"i"),D=window.DHJSSDK&&DHJSSDK.Storage.getItem("__dh_placeVisitorGoBack__"),G=window.DHJSSDK&&DHJSSDK.Storage.getItem("__dh_registerGoBack__");B.test(x)&&!/returnURL=/i.test(x)?window.location.href=g.wwwURL:/\/login\.do|\/register\.do/i.test(x)||/\/mydhgate\/downloadApp\.html/i.test(x)?window.history.go(-1):/\/placeorder\/placeOrder\.html/i.test(x)?(x=new URL(x),x=(new URLSearchParams(x.search)).get("page"),/\/static\/address\.html/i.test(g.wwwPATHNAME)? window.history.back():"V5"===x?"1"===D?(window.history.go(-6),window.DHJSSDK&&DHJSSDK.Storage.setItem("__dh_placeVisitorGoBack__","1",-1,function(F){})):"1"===G?(window.history.go(-5),window.DHJSSDK&&DHJSSDK.Storage.setItem("__dh_registerGoBack__","1",-1,function(F){})):window.history.go(-4):window.history.go(-1)):window.history.back()}})},1)});y.push(function(){setTimeout(function(){var x=$(".j-headerchangeShipToIcon");0