"].join("");t.one("body").append(n);var i=m.viewportWidth(),l=m.viewportHeight();t.one(".mui-mbar-animate-mask-bg")&&t.one(".mui-mbar-animate-mask-bg").css({width:i+"px",height:l+"px"});e._catAnimateIE()})}},_catAnimate:function(){var t=this;var a=0;var e=setInterval(function(){if(a<6){n.clearRect(0,0,300,600);n.beginPath();n.drawImage(t.config.picBox[18].Dom,15,566,284,35);n.drawImage(t.config.picBox[a].Dom,50,0,250,300)}else{setTimeout(function(){n.clearRect(0,0,300,600);n.beginPath();n.drawImage(t.config.picBox[18].Dom,15,566,284,35);setTimeout(function(){t._catPole(a)},0)},500);clearInterval(e)}a++},150)},_catPole:function(t){var a=this;var e=setInterval(function(){if(t<11){n.clearRect(0,0,300,600);n.beginPath();n.drawImage(a.config.picBox[18].Dom,15,566,284,35);n.drawImage(a.config.picBox[t].Dom,50,0,250,300)}else{clearInterval(e);a._pushLineAnimate()}t++},100)},_pushLineAnimate:function(){var a=this,e=0,m,i,l,o,r;n.lineWidth=1;m=a.config.AnimateTimeLine[e].startLine;i=a.config.AnimateTimeLine[e+1].startLine;o=a.config.AnimateTimeLine[e].animateTime;TweenLite.to(m,o,t.merge(i,{onUpdate:function(){n.clearRect(0,0,300,600);n.beginPath();n.moveTo(m.X,m.Y);n.bezierCurveTo(m.Cx1,m.Cy1,m.Cx2,m.Cy2,m.X2,m.Y2);n.stroke();n.drawImage(a.config.picBox[18].Dom,15,566,284,35);n.drawImage(a.config.picBox[11].Dom,50,0,250,300)},onComplete:function(){l=a.config.AnimateTimeLine[e+2].startLine;r=e+1;a._lineStraightenAnimate(i,l,r)}}))},_lineStraightenAnimate:function(a,e,m){var l=this,o=l.config.AnimateTimeLine[m].animateTime;TweenLite.to(a,o,t.merge(e,{onUpdate:function(){n.clearRect(0,0,300,600);n.beginPath();n.moveTo(a.X,a.Y);n.bezierCurveTo(a.Cx1,a.Cy1,a.Cx2,a.Cy2,a.X2,a.Y2);n.stroke();n.drawImage(l.config.picBox[18].Dom,15,566,284,35);n.drawImage(l.config.picBox[12].Dom,50,0,250,300)},onComplete:function(){var t=0;i=false;m+=1;var a=setInterval(function(){t++;if(t>5&&i==true){clearInterval(a);setTimeout(function(){l._upAnimate(m)},300)}else{var n=l.config.AnimateTimeLine[m+1].startLine;l._shakeAnimate(e,n,m)}},200)}}))},_shakeAnimate:function(a,e,m){var l=this,o=l.config.AnimateTimeLine[m].animateTime;TweenLite.to(a,o,t.merge(e,{onUpdate:function(){n.clearRect(0,0,300,600);n.beginPath();n.moveTo(a.X,a.Y);n.bezierCurveTo(a.X,a.Y,a.X2,a.Y2,a.X2,a.Y2);n.stroke();n.drawImage(l.config.picBox[14].Dom,50,0,250,300);n.save();n.rotate(1.5*Math.PI/180);n.drawImage(l.config.picBox[18].Dom,30,559,284,35);n.restore()},onComplete:function(){TweenLite.to(e,o,t.merge(a,{onUpdate:function(){n.clearRect(0,0,300,600);n.beginPath();n.moveTo(a.X,a.Y);n.bezierCurveTo(a.X,a.Y,a.X2,a.Y2,a.X2,a.Y2);n.stroke();n.drawImage(l.config.picBox[12].Dom,50,0,250,300);n.save();n.rotate(Math.PI/180);n.drawImage(l.config.picBox[18].Dom,24,562,284,35);n.restore()},onComplete:function(){i=true}}))}}))},_upAnimate:function(a){var e=this,m=e.config.AnimateTimeLine[a+1].startLine,i=e.config.AnimateTimeLine[a+2].startLine,l=e.config.AnimateTimeLine[a+1].animateTime;TweenLite.to(m,l,t.merge(i,{onUpdate:function(){n.clearRect(0,0,300,600);n.beginPath();n.moveTo(m.X,m.Y);n.bezierCurveTo(m.Cx1,m.Cy1,m.Cx2,m.Cy2,157,113);n.stroke();n.drawImage(e.config.picBox[15].Dom,50,0,250,300);n.save();n.translate(m.X,m.Y);n.rotate(m.M*Math.PI/180);n.drawImage(e.config.picBox[18].Dom,-81,0,284,35);n.restore()},onComplete:function(){a+=2;e._throwAnimate(a)}}))},_throwAnimate:function(a){var e=this,i=e.config.AnimateTimeLine[a].startLine,l=e.config.AnimateTimeLine[a].endLine,o=e.config.AnimateTimeLine[a].animateTime;TweenLite.to(i,o,t.merge(l,{onUpdate:function(){n.clearRect(0,0,300,600);n.beginPath();n.moveTo(i.X,i.Y);n.bezierCurveTo(i.Cx1,i.Cy1,i.Cx2,i.Cy2,324,24);n.stroke();if(i.X5>90){n.drawImage(e.config.picBox[16].Dom,i.X5,0,250,300)}else{n.drawImage(e.config.picBox[17].Dom,i.X5,0,250,300)}n.save();n.translate(i.X,i.Y);n.rotate(i.M*Math.PI/180);n.drawImage(e.config.picBox[18].Dom,-81,0,284,35);n.restore()},onComplete:function(){n.clearRect(0,0,300,600);m.remove(".mui-mbar-animate-mask-bg");m.remove(".mui-mbar-animate-canvas");if(t.isFunction(e.config.callback)){e.config.callback()}}}))},_catAnimateIE:function(){var a=this,e=0;l=t.one(".mui-mbar-animate-cat");var m=setInterval(function(){if(e<6){l.attr("src",a.config.picBox[e].src)}else{setTimeout(function(){a._buyAnimateIE()},500);clearInterval(m)}e++},150)},_buyAnimateIE:function(){var a=this,e=t.one(".mui-mbar-animate-buy");l.attr("src",a.config.picBoxIE[8].src);e.stop().animate({width:"34px",height:"34px",right:"100px"},.5,"elasticBoth",function(){l.attr("src",a.config.picBoxIE[7].src);e.stop().animate({bottom:"334px",right:"110px"},1,"elasticIn",function(){l.attr("src",a.config.picBoxIE[8].src);setTimeout(function(){var m=setInterval(function(){if(parseInt(e.css("right"))>-250){var n=10;e.css("right",parseInt(e.css("right"))-n);l.css("right",parseInt(l.css("right"))-n)}else{clearInterval(m);t.one(".mui-mbar-animate-mask-bg")&&t.one(".mui-mbar-animate-mask-bg").remove();t.one(".mui-mbar-animate-box")&&t.one(".mui-mbar-animate-box").remove();t.isFunction(a.config.callback)&&a.config.callback()}},10)},500)})})},_imagesLoad:function(t,a,e){var m=this;e=e||0;if(t[e]){m._imgLoad(t[e],function(){m._imagesLoad(t,a,e+1)})}else{a(e)}},_imgLoad:function(t,a){var e=new Image;e.src=t;if(e.complete){t.Dom=e;a();return}e.onload=function(){t.Dom=e;a()};e.src=t.src}};window.catAnimate=o;return o},{requires:["node","event","dom","mui/mallbar/mallbar-guide.css"]});KISSY.add("mui/mallbar/plugin/prof",function(a,e,t,i,r,n,o,s,m,l,u,c){var b=new u(['
','
','
\u25c6
'].join(""));var d=['
','
',"
",'
','
',' {{#if iconUrl}}

{{else}}','
{{/if}}','
',"
",'{{#if level>0}}
T{{level}}{{/if}}',"
",'
","{0}",'
','
","
","
",'
\u25c6
'].join("");var p="";var f=['
"].join("");var v=['
"].join("");var h="mui-mbarp-prof-tip";var g=160;var _=0;var T=2;var I=false;var A=function(a){var e=this;A.superclass.constructor.call(e,a);e.init()};a.extend(A,t,{rightConfig:[{bizId:"vip",isDefault:true,name:"\u4f1a\u5458\u6743\u76ca"}],init:function(){var e=this;var t=e.mallbarItem=e.get(s.K.MALLBAR_ITEM);var r=t.get(s.K.MALLBAR);var n=r.get(s.K.ROOT);var l=t.get(s.K.TAB);var c=a.all('
').appendTo(n);var f=t.getUserInfo();this.prof=c;var v=l.one(".mui-mbar-tab-tip");function T(){if(f.isLogin){var e=t.getUid();if(e){var i=m.fm(s.AVATAR,e,g);var r=new Image;r.onload=function(e){l.one(".mui-mbar-tab-logo-prof-def").hide();a.one(m.fm('
',i)).insertBefore(v)};a.one(m.fm('
')).insertBefore(v);r.src=i}}}if(f.isLogin){e._initT0User()}T();a.one(document).on("click",function(a){c.hide();if(_!=3&&f.isLogin){e._updateRedDot()}});var I=false;l.on("mouseenter",function(t){m.log("prof tab mouseenter");I=true;a.later(function(){if(I){e.fire(s.E.PROF_CHANGE,{pid:s.P.PROF});v.hide()}},400)});l.on("mouseleave",function(t){I=false;var r=a.one(t.toElement||t.relatedTarget);if(r){if(!i.hasClass(r,"mui-mbar-tabs-shadow")){if(!r.parent(".mui-mbarp-prof")){c.hide();if(_!=3&&f.isLogin){e._updateRedDot()}}}}});l.on("click",function(){if(f.isLogin){c.css("display")==="none"&&m.sendLog(s.ARR.PROF);c.show();if(_czc){_czc.push(["_trackEvent","\u6211","\u9f20\u6807\u70b9\u51fb","\u5df2\u767b\u5f55"])}}});var A=document.createElement("script");A.src="http://w.cnzz.com/c.php?id=1000279581&async=1";A.type="text/javascript";A.async=true;A.charset="utf-8";var C=document.getElementsByTagName("body")[0];C.appendChild(A);var E=document.createElement("script");E.text='var _czc=_czc || []; _czc.push(["_setAccount","1000279581"]);';document.body.appendChild(E);e.on(s.E.PROF_HIDE,function(){c.hide()});e.on(s.E.RIGHT_TAB_ITEM_CLICK,function(e){var t=a.one(".mui-mbarp-prof-right-hd-tab-item-"+e.bizId)||"";!!t&&t.fire("click")});this._initMarketMods(function(){e._initRightData();var l=true;e.on(s.E.PROF_CHANGE,function(v){if(f.isLogin){if(l){l=false;var I=t.getUid();var A={DEGRADE:s.DEGRADE,nick:f.nick,loginUrl:s.DEBUG?"http://login.daily.taobao.net/member/logout.jhtml":"http://login.taobao.com/member/logout.jhtml",curl:encodeURIComponent(location.href),level:f.memberInfo.activeStatus,iconUrl:I?m.fm(s.AVATAR,I,g):"",vip:"http://vip.tmall.com?scm="+s.SCM.PROF};m.log("me.profDo",e.profDo);p=m.fm(d,e.profDo);c.html(new u(p).render(A));e._initRight();var C=c.one(".mui-mbarp-prof-icon-edit");var E=c.one(".mui-mbarp-prof-icon-edit-mask");c.one(".mui-mbarp-prof-icon-bd").on("mouseenter",function(){C.show();E.show()});c.on("mouseleave",function(){C.hide();E.hide()});c.one(".mui-mbarp-prof-tip").on("mouseleave",function(t){var r=a.one(t.toElement||t.relatedTarget);if(i.hasClass(r,"mui-mbar-tabs-shadow")||i.hasClass(r,"mui-mbarp-prof-arr")){c.show()}else{c.hide();if(_!=3&&f.isLogin){e._updateRedDot()}}})}}var A=n.one(".mui-mbar-tab-logo-"+v.pid);var B=a.DOM.height(A);var L=parseFloat(A.parent().offset().top-i.scrollTop())+B/3.8;var R=a.DOM.viewportHeight();if(R-L<272){L=L-272+B+1;c.addClass("mui-mbarp-prof-bottom-arrow")}else{c.removeClass("mui-mbarp-prof-bottom-arrow")}if(A){c.css({top:L});if(s.P.CART===v.pid&&s.S.MINI===r.get(s.K.STATUS)){c.css({left:-A.parent().width()+"px"})}else{c.css({left:0})}}if(v.toLogin||!f.isLogin){c.html(b.render());var S=c.one(".mui-mbarp-prof-login-close");c.one(".mui-mbarp-prof-tip").on("mouseleave",function(e){var t=a.one(e.toElement||e.relatedTarget);if(t){if(!i.hasClass(t,"mui-mbar-tabs-shadow")){if(!t.parent(".mui-mbarp-prof")){c.hide()}}}});S.on("click",function(a){c.hide()});o.show(function(){c.hide();TB.Global.loginStatusReady(function(a){TB.Global.memberInfoReady(function(a){m.log("minilogin memberInfoReady",a);f=m.deepMerge(f,a);f.isLogin=true;t.setUserInfo(f);e._initT0User();v.success&&v.success();r.broadcast(s.E.LOGIN_SUCCESS);T();if(s.P.PROF===v.pid){e.fire(s.E.PROF_CHANGE,{pid:s.P.PROF})}else{f.isLogin&&r.expand({type:v.pid})}})})},{insert:"."+h,needRedirect:false});m.sendLog(s.ARR.PROF_LOGIN);if(_czc){_czc.push(["_trackEvent","\u6211","\u9f20\u6807\u79fb\u8fc7","\u672a\u767b\u5f55"])}c.show()}else{c.css("display")==="none"&&m.sendLog(s.ARR.PROF);if(_czc){_czc.push(["_trackEvent","\u6211","\u9f20\u6807\u79fb\u8fc7","\u5df2\u767b\u5f55"])}c.show()}})})},_initRight:function(){if(!this.rightConfig){return}this._initRightCont()},_initRightCont:function(){var e=this;var t=this.prof;var i=t.one(".mui-mbarp-prof-right-hd");var r=t.one(".mui-mbarp-prof-right-bd");var n='
{name}';var o='
{content}
';var s='
';var m="";a.each(this.rightConfig,function(e){s=s+a.substitute(n,e);m=m+a.substitute(o,e)});s=s+"
";i.html(s);r.html(m);a.each(this.rightConfig,function(t){if(!t.isDefault){e[t.bizId].fire("bindRightDetail");e[t.bizId].on("rightChange",function(e){a.one(".mui-mbarp-prof-right-hd-tab-cont-"+t.bizId).html(e.rightDetail)})}});this._bindRightTab();this._initMemberRight();a.one(".mui-mbarp-prof-right-hd-tab-item-vip").fire("click");if(this.rightList){a.each(this.rightList,function(a){e[a.bizId].fire("rightTabClick")})}},_initMemberRight:function(){var e=[{rightImg:"http://gtms02.alicdn.com/tps/i2/TB1ogEVFVXXXXXaXXXXgBrbGpXX-36-36.png",rightUrl:"http://vip.tmall.com/privilege/returned?scm=1048.1.2.13",rightName:"\u9000\u8d27\u4fdd\u969c"},{rightImg:"http://gtms03.alicdn.com/tps/i3/TB1T9ZlFVXXXXb5XFXXgBrbGpXX-36-36.png",rightUrl:"http://vip.tmall.com/privilege/brand?scm=1048.1.2.14",rightName:"\u54c1\u724c\u4e13\u4eab"},{rightImg:"http://gtms03.alicdn.com/tps/i3/TB1K_MPFVXXXXaxXpXXgBrbGpXX-36-36.png",rightUrl:"http://vip.tmall.com/privilege/ftry?scm=1048.1.2.15",rightName:"\u5148\u8bd5\u540e\u4e70"},{rightImg:"http://gtms01.alicdn.com/tps/i1/TB1DTZRFVXXXXXiXpXXgBrbGpXX-36-36.png",rightUrl:"http://vip.tmall.com/privilege/speedReturned?scm=1048.1.2.17",rightName:"\u6781\u901f\u9000\u6b3e"},{rightImg:"http://gtms04.alicdn.com/tps/i4/TB1z.7PFVXXXXaiXpXXgBrbGpXX-36-36.png",rightUrl:"http://vip.tmall.com/privilege/birthday?scm=1048.1.2.18",rightName:"\u53cc\u500d\u79ef\u5206"}];var t=a.one(".mui-mbarp-prof-right-hd-tab-cont-vip");var i='
';var r='
';a.each(e,function(e,t){r=r+a.substitute(i,e)});r=r+'
';t.html(r);setTimeout(function(){var e=new c(a.one(".mui-mbarp-prof-vip-right-slide"),{effect:"hSlide",autoSlide:false,contentClass:"mui-mbarp-prof-vip-right-slide-cont",pannelClass:"mui-mbarp-prof-vip-right-item",carousel:true,colspan:3,speed:500});a.one(".mui-mbarp-prof-vip-right-slide-prev").on("click",function(){e.next()});a.one(".mui-mbarp-prof-vip-right-slide-next").on("click",function(){e.previous()})},0)},_bindRightTab:function(){var e=a.one(".mui-mbarp-prof-right-cont");e.delegate("click",".mui-mbarp-prof-right-hd-tab-item",function(t){var i=a.one(t.currentTarget);var r=i.attr("data-type");var n=e.one(".mui-mbarp-prof-right-hd-tab-cont-"+r);i.siblings().removeClass("sellected");i.addClass("sellected");n.siblings().hide();n.show()})},_initRightData:function(){var e=this;a.each(this.rightList,function(a){e.rightConfig.push(a)});a.each(this.rightConfig,function(a){if(!a.isDefault){var t=e[a.bizId].getRightDetail();a.content=t.html||"";a.isVisible=t.isVisible||""}})},_initMarketMods:function(e){var t=this;var i=this.get(s.K.MALLBAR_ITEM);var r=i.get(s.K.MALLBAR);m.getStaticConf({cb:function(i){var n=i.marketMods;if(n&&n.length>0){t.rightList=n;var o=n.length;var s=0;a.each(n,function(i){if(a.Env.mods[i.moduleName]){a.use(i.moduleName,function(a,n){t[i.bizId]=new n({mallbar:r,Util:m,Store:l,rightDetailContCls:"mui-mbarp-prof-right-hd-tab-cont-"+i.bizId});s=s+1;if(o==s){e&&e()}})}else{n=[];e&&e()}})}else{n=[];e&&e()}}})},_initT0User:function(){var a='
\u25c6
Hi\uff0c{0}
\u606d\u559c\u60a8\u6210\u4e3a T{1}\u5929\u732b\u8fbe\u4eba!
\u624b\u673a\u5929\u732b\u5ba2\u6237\u7aef\u626b\u7801
\u62a2188\u5143\u65b0\u4eba\u7ea2\u5305
';var e=this;e.profDo=f;var t=e.get(s.K.MALLBAR_ITEM);var i=t.get(s.K.MALLBAR);var r=this.prof;var n=t.getUserInfo();if(!n.isLogin){return}m.getStaticConf({cb:function(n){if(n.profT0QueryClose){I=true;return}!!n.profT0queryInterval&&(T=n.profT0queryInterval);if(_==3){e.profDo=f;return}l.get({k:"mui/mallbar/prof/isNotQueryT0/"+t.getUid(),success:function(n){var o=0;if(n){var l=(new Date).getTime();var u=n.time||"";o=!!(l-u<1e3*3600*T)}if(o){_=3;e.profDo=f}else{m.ajax({url:s.URL.GET_PLUGIN_PROF_QUERY_T0_USER,dataType:"jsonp",data:{_tb_token_:i.get("token")||""},timeout:4,success:function(n){if(!n){return}if(n.status!=200){m.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.pro.queryT0User.get.failure-bad-status-"+n.status,"\u67e5\u8be2T0\u7528\u6237\u6fc0\u6d3b\u63a5\u53e3\u72b6\u6001\u5f02\u5e38");return}var o=n.data;if(o&&o.length){var l=o[0].step||3;_=l;if(l==1){if(r.one(".mui-mbarp-prof-ci-bd")){r.one(".mui-mbarp-prof-ci-bd").html('
\u9886\u65b0\u4eba\u7ea2\u5305>')}else{e.profDo=v}var u=t.getUserInfo();m.log("userInfo",u);var c=u.nick,b=u.memberInfo.activeStatus;if(b<0){b=0}var d="http://gqrcode.alicdn.com/img?type=hv&w=100&h=100&el=h&text=http%3A%2F%2Fm.tmall.com%2Fqr%2F2014xrlb1";var p=m.fm(a,c,b,d);i.bubble({show:true,flag:.9,content:p,customContentType:3,bubbleType:1,height:130,tab:"PROF",showed:function(){m.sendLog(s.ARR.PROF_BUB_T0_SHOW);var a=e.mallbarItem.get(s.K.BUBBLE);var t=a.one(".mui-mbar-bubble-close");if(t){t.on("click",function(a){a.stopPropagation();m.sendLog(s.ARR.PROF_BUB_T0_CLICK);m.ajax({url:s.URL.GET_PLUGIN_PROF_SET_T0_USER,dataType:"jsonp",data:{_tb_token_:i.get("token")||"",bizType:1,bizStep:2},timeout:4,success:function(a){},error:function(){}});e.fire(s.E.BUBBLE_CHANGE,{show:false});e._updateRedDot()})}},clicked:function(){m.sendLog(s.ARR.PROF_BUB_T0_CLICK);m.ajax({url:s.URL.GET_PLUGIN_PROF_SET_T0_USER,dataType:"jsonp",data:{_tb_token_:i.get("token")||"",bizType:1,bizStep:2},timeout:4,success:function(a){},error:function(){}});e.mallbarItem.fire(s.E.BUBBLE_CHANGE,{show:false});e._updateRedDot();var a="http://vip.tmall.com/act/gift/newgift?scm=1048.1.2.11";window.open(a)}})}else if(l==2){if(r.one(".mui-mbarp-prof-ci-bd")){r.one(".mui-mbarp-prof-ci-bd").html('
\u9886\u65b0\u4eba\u7ea2\u5305>')}else{e.profDo=v}var f=t.get(s.K.TAB);var h=f.one(".mui-mbar-tab-sup");h.html('
');h.show()}else{e._setT0queryStorage()}}else{e._setT0queryStorage()}},error:function(){m.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.pro.queryT0User.get.failure","\u67e5\u8be2T0\u7528\u6237\u6fc0\u6d3b\u63a5\u53e3\u5931\u8d25")}})}}})}})},_updateRedDot:function(){var a=['
\u7b7e\u5230\uff1a
',"
\u8d62\u79ef\u5206","
\u9886\u70b9\u5238"].join("");var e=this;var t=e.get(s.K.MALLBAR_ITEM);var i=t.get(s.K.MALLBAR);var r=this.prof;if(I){return}var n=t.getUserInfo();if(!n.isLogin){return}m.ajax({url:s.URL.GET_PLUGIN_PROF_QUERY_T0_USER,dataType:"jsonp",data:{_tb_token_:i.get("token")||""},timeout:4,success:function(i){if(i.status!=200){m.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.pro.queryT0User.get.failure-bad-status-"+i.status,"\u67e5\u8be2T0\u7528\u6237\u6fc0\u6d3b\u63a5\u53e3\u72b6\u6001\u5f02\u5e38");return}var n=i.data;if(n&&n.length){var o=n[0].step||3;var l=_;_=o;var u=t.get(s.K.TAB);var c=u.one(".mui-mbar-tab-sup");if(o==1||o==2){c.html('
');c.show();if(l!=o){if(r.one(".mui-mbarp-prof-ci-bd")){r.one(".mui-mbarp-prof-ci-bd").html('
\u9886\u65b0\u4eba\u7ea2\u5305>')}else{e.profDo=v}}}else if(o==3){c.hide();if(l!=o){if(r.one(".mui-mbarp-prof-ci-bd")){r.one(".mui-mbarp-prof-ci-bd").html(a)}else{e.profDo=f}}e._setT0queryStorage()}}else{e._setT0queryStorage()}},error:function(){}})},_setT0queryStorage:function(){var a=this;var e=a.mallbarItem;var t=(new Date).getTime();l.set({k:"mui/mallbar/prof/isNotQueryT0/"+e.getUid(),v:{s:1,time:t}});_=3;a.profDo=f}});return A},{requires:["cookie","base","dom","node","event","mui/minilogin","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/store","xtemplate","gallery/slide/1.3/","sizzle","mui/mallbar/plugin-prof.css"]});KISSY.add("mui/mallbar/plugin/asset",function(a,e,t,i,s,n,r,o,l){var m=function(a){var e=this;m.superclass.constructor.call(e,a);e.init()};a.extend(m,e,{init:function(){var e=this;var t=e.mallbarItem=e.get(n.K.MALLBAR_ITEM);var i=e.userInfo=t.getUserInfo();e.token="";var s=r.getSysId();e.isList=s=="list";e.isDetail=s=="detail";e.isShop=s=="shop";e.bubbled=false;var o=t.get(n.K.MALLBAR);e.itemId=o.get("itemId")||"";e.sellerId=o.get("sellerId")||"";e.shopId=o.get("shopId")||"";if(i.isLogin){var l=a.unparam(window.location.search.substr(1));var m=l&&Number(l.gap)||36e5;b()}e.set("isDataChange",true);e.on(n.E.VISIBILITY_CHANGE,function(a){if(a.visible&&e.get("isDataChange")){e._getAssetData()}});t.on(n.E.LOGIN_SUCCESS,function(a){r.log(a.type);b()});e.on(n.E.DATA_CHANGE,function(a){e.set("isDataChange",true);if(t.get(n.K.EXPAND)){e._getAssetData()}});var u=e.get("mallbarItem").get("tab");var c=a.one(".mui-mbar");u.on("click",function(){if(c.hasClass("mui-mbar-status-expand")){r.sendLog(n.ARR.ASSETS_TAB_CLICK)}});function b(){if(!e.bubbled){e.bubbled=true;e.getPluginAssetTip()}}},_getCouldCoupon:function(){var e=this;var t=e.mallbarItem;var l=a.one("#mbarCouponAnchorCouldCoupon");if(l){l.hide();r.ajax({url:n.URL.GET_PLUGIN_ASSET_OBTAIN_COUPON_LIST,dataType:"jsonp",data:{sellerId:e.sellerId,itemId:e.itemId},timeout:5,success:function(t){if(t.s!==200){r.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.asset.obtainCoupon.failure.bad-status-"+t.s,"\u83b7\u53d6\u53ef\u9886\u4f18\u60e0\u5238\u5f02\u5e38");return}if(!t.oci){return}e.token=t.t;var m=t.oci.c;if(m.length=="0"){return}l.html("\u5f53\u524d\u5e97\u94fa\u6709\u53ef\u9886\u4f18\u60e0\u5238\u54e6").show();var u=new o(['
',"\u5f53\u524d\u5e97\u94fa\u53ef\u7528\u4f18\u60e0\u5238","
"].join(""));var c=['
",'','','
',' {{n}}',"
",'
','
",'
','
','\uffe5',"{{d}}","
",'
\u6ee1{{c}}\u4f7f\u7528{{#if i===1}}(\u90e8\u5206\u5546\u54c1){{/if}}
',"
","
","
",'','','
','
\u7acb\u5373\u9886\u53d6','
',"
",'",'",""];var b=new o(['
',"{{#each c}}",c.join(""),"{{/each}}","
"].join(""));r.log("::\u53ef\u9886\u53d6\u7684\u4f18\u60e0\u5238::",m);if(m&&m.length>0){if(!m[0].s){return}if(a.one(".mui-mbar-asset-no-coupon")){a.one(".mui-mbar-asset-no-coupon").css("visibility","hidden")}a.each(m,function(a){var e=/^\d{2}/;a.s=a.s.replace(e,"");a.l=a.l.replace(e,"")});if(a.one("#mbarCouponAnchorCouldCoupon")){a.DOM.insertAfter(a.DOM.create(b.render(t.oci)),a.one("#mbarCouponAnchorCouldCoupon"));a.one("#mbarCouponAnchorCouldCoupon").show()}s.delegate(".j_mui-mbarp-asset-could-coupon","mouseenter",".mui-mbarp-asset-coupon-item",function(e){var t=a.one(e.currentTarget);if(t.attr("data-stretch")=="1"){i(t.one(".j_couldPullBd"),{right:"-183px"},.1,n.EASE).run();i(t.one(".mui-mbarp-asset-coupon-could-act"),{right:"8px"},.1,n.EASE).run()}});s.delegate(".j_mui-mbarp-asset-could-coupon","mouseleave",".mui-mbarp-asset-coupon-item",function(e){var t=a.one(e.currentTarget);if(t.attr("data-stretch")=="1"){i(t.one(".j_couldPullBd"),{right:"-190px"},.1,n.EASE).run();i(t.one(".mui-mbarp-asset-coupon-could-act"),{right:"0px"},.1,n.EASE).run()}});s.delegate(".j_mui-mbarp-asset-could-coupon","click",".mui-mbarp-asset-coupon-item",function(a){a.halt();p(a)});s.delegate(".mui-mbarp-asset-wrap","click",".j_couldPull",function(a){a.halt();p(a)});s.delegate(".j_mui-mbarp-asset-could-coupon","click",".j_couldCouponFail",function(e){var t=a.one(e.currentTarget).parent(".mui-mbarp-asset-coupon-item");t.slideUp(.5);e.halt()});function p(t){var s;if(a.one(t.currentTarget).hasClass(".mui-mbarp-asset-coupon-item")){s=a.one(t.currentTarget)}else{s=a.one(t.target).parent(".mui-mbarp-asset-coupon-item")}var o=.5,l=.5,m=n.EASE;r.ajax({url:n.URL.GET_PLUGIN_ASSET_OBTAIN_COUPON,data:{sellerId:e.sellerId,spreadId:s.attr("data-activeId"),_tb_token_:e.token},success:function(t){if(t.s=="-2"){r.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.asset.counpon.get.failure","\u7528\u6237\u4f18\u60e0\u5238\u9886\u53d6\u5931\u8d25");return}if(t.s=="-1"){s.attr("data-stretch","0");if(t.m.length<12){s.one(".j_couldCouponFailMsg").css("line-height","48px")}else{s.one(".j_couldCouponFailMsg").css("padding-top","9px")}s.one(".j_couldCouponFailMsg").html(t.m);i(s.one(".j_couldCouponFail"),{right:"0px"},l,m,function(){s.one(".j_couldPullBd").one(".mui-mbarp-asset-coupon-now-area-bg").hide();s.one(".j_couldPullBd").one(".mui-mbarp-asset-coupon-fail-area-bg").css("width","198px")}).run();i(s.one(".j_couldPullBd"),{right:"0px"},l,m).run();i(s.one(".j_couldPullAct"),{right:"187px"},l-6e-5,m).run()}else if(t.s=="1"){s.one(".mui-mbarp-asset-coupon-could-act").css("top","18px");s.one(".j_couldActIcon").html("").show();s.one(".j_couldActVal").next().hide();s.one(".j_couldActVal").html("\u5df2\u9886").css("margin-top","0px");i(s,{height:"0px"},o,m,function(){s.hide();b();var t={};t.d=s.attr("data-d");t.u=s.attr("data-u");t.s="20"+s.attr("data-s");t.l="20"+s.attr("data-l");t.t=s.attr("data-t");t.n=s.attr("data-n");t.c=s.attr("data-c");var n=e._couponTemp.render(t);a.one(n).prependTo(a.one(".j_mui-mbarp-asset-cur-coupon"));if(!a.one("#mbarCouponAnchorAbleCoupon")){a.all(u.render()).insertBefore(a.one(".j_mui-mbarp-asset-cur-coupon"));i(a.one("#mbarCouponAnchorAbleCoupon"),{height:"18px"},.1,m,function(){c()}).run()}else{c()}}).run()}}});function c(){a.one(".j_mui-mbarp-asset-cur-coupon").all(".mui-mbarp-asset-coupon-item").each(function(t,s){if(s==0){if(a.one(".j_pushShopItems")){if(!e.isDetail){i(a.one(".j_pushShopItems"),{height:"0px"},o,m,function(){a.one(".j_pushShopItems").css("overflow","hidden").insertAfter(a.one(t));i(a.one(t),{height:"90px"},o,m,function(){d();p()}).run()}).run()}else{i(a.one(t),{height:"90px"},o,m,function(){p()}).run()}}else{i(a.one(t),{height:"90px"},o,m,function(){if(!e.isDetail){a.one('
').appendTo(a.one(".j_mui-mbarp-asset-cur-coupon"));e._getPullItems();d();b()}p()}).run()}return false}})}function b(){var t=a.one("#mbarCouponAnchorAbleCoupon");var s=e.get(n.K.CONTAINER);if(t){var r=a.all(t).getDOMNode().offsetTop;i(s,{scrollTop:r},.5).run();e.set(n.K.COUPON_ANCHOR,"")}}function p(){var e=false;a.one(".j_mui-mbarp-asset-could-coupon").all("a").each(function(t){if(parseInt(a.one(t).css("height"))!=0){e=true}});if(e){a.one("#mbarCouponAnchorCouldCoupon").show()}else{a.one("#mbarCouponAnchorCouldCoupon").hide()}}function d(){i(a.one(".j_pushShopItems"),{height:"265px"},2,m,function(){a.one(".j_pushShopItems").css("overflow","visible")}).run()}}}},error:function(){r.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.asset.obtainCoupon.get.failure","\u83b7\u53d6\u53ef\u9886\u4f18\u60e0\u5238\u5931\u8d25")}})}},_getPullItems:function(){var e=this;var t=e.mallbarItem;var l=a.one("#mbarCouponAnchorAbleCoupon");if(!e.isDetail){if(l){l.html("\u5f53\u524d\u5e97\u94fa\u53ef\u7528\u4f18\u60e0\u5238:");r.ajax({url:n.URL.GEI_PUSH_ITEMS,dataType:"jsonp",data:{appId:n.RECOMMEND_APPID,shopId:e.shopId},timeout:5,success:function(t){var l=new o(['

\u63a8\u8350\u4ee5\u4e0b\u4eba\u6c14\u5b9d\u8d1d\u4eab\u7528\u4f18\u60e0\u5238\uff1a
',"
","{{#each d}}",'- ','','
',' {{title}}',' \uffe5{{price}}',' \u5df2\u552e\u51fa{{sales}}\u4ef6',"
",' ',' ','
',""," ","{{/each}}","
",'
'].join(""));if(t.d&&t.d.length>0){if(a.one(".j_pushShopItems")){a.DOM.append(a.DOM.create(l.render(t)),a.one(".j_pushShopItems"))}a.all(".mui-mbarp-asset-shop-push-item").each(function(e){s.delegate(document,"mouseover",".mui-mbarp-asset-shop-push-60pic",function(e){var t=a.one(e.target).prev(),i=a.one(e.target).parent().one(".mui-mbarp-asset-shop-push-166pic-arr");t.css({display:"block"});i.css({display:"block"})});s.delegate(document,"mouseout",".mui-mbarp-asset-shop-push-60pic",function(e){var t=a.one(e.target).prev(),i=a.one(e.target).parent().one(".mui-mbarp-asset-shop-push-166pic-arr");t.css({display:"none"});i.css({display:"none"})});a.one(e).one("div.mui-mbarp-asset-hide").on("mouseout",function(e){var t=a.one(e.target).parent().one(".mui-mbarp-asset-shop-push-166pic-arr");a.one(e.target).css({display:"none"});t.css({display:"none"})})});s.delegate(".j_mui-mbarp-asset-cur-coupon","click",".mui-mbarp-asset-coupon-item",function(t){if(!e.isDetail){var s=a.one(".j_pushShopItems"),o=a.one(t.target).parent(".mui-mbarp-asset-coupon-item").next();if(o&&o.hasClass("j_pushShopItems")){return}i(s,{height:"0px"},.5,n.EASE,function(){r.log("i try clone");s.css("height","0px").insertAfter(a.one(t.target).parent(".mui-mbarp-asset-coupon-item"));i(s,{height:"265px"},2,n.EASE,function(){s.css("overflow","visible")}).run()}).run()}});a.one(".mui-mbarp-asset-shop-push-items").show()}else{a.one(".j_pushShopItems").hide()}},error:function(){a.one(".mui-mbarp-asset-shop-push-items").hide();r.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.asset.pushShopItems.get.failure","\u62c9\u53d6\u63a8\u8350\u5546\u54c1\u5931\u8d25")}})}}else{if(a.one(".j_pushShopItems")){a.one(".j_pushShopItems").css("height","0px")}}},_getAssetData:function(){var a=this;var e=a.mallbarItem;var t=e.get(n.K.MALLBAR);r.ajax({url:n.URL.GET_PLUGIN_ASSET,data:{sellerId:a.sellerId,itemId:a.itemId},timeout:4,jsonpCallback:"__mallbarGetMyAssets",success:function(t){r.log(t);if(t.s==401){e.fire(n.E.LOGIN,{success:function(){a.set("isDataChange",true);if(e.get(n.K.EXPAND)){a._getAssetData()}}});return}if(t.s!==200){e.fire(n.E.ERROR);r.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.asset.myAssets.failure.bad-status-"+t.s,"\u83b7\u53d6\u6211\u7684\u8d44\u4ea7\u5f02\u5e38");return}if(t){a._render(t)}a._getCouldCoupon();a._getPullItems();a.set("isDataChange",false)},error:function(){e.fire(n.E.ERROR);r.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.asset.myAssets.get.failure","\u83b7\u53d6\u6211\u7684\u8d44\u4ea7\u5931\u8d25")}})},renderCouldCoupon:function(a){var e=this,t;var i=e.mallbarItem;var s=i.get(n.K.MALLBAR);t=e._assetCouponBubbleTPL('
');e.token=a.t;s.bubble({show:true,content:new o(t).render(),customContentType:3,isNotTabFire:false,bubbleType:0,tab:"ASSET",dismiss:function(){e.handleAbleBonusBubble()},showed:function(){r.sendLog(n.ARR.COUPON_COULD_SHOW)},clicked:function(){e.set(n.K.COUPON_ANCHOR,"mbarCouponAnchorCouldCoupon");r.sendLog(n.ARR.COUPON_COULD_CLICK)}})},renderExpCoupon:function(e){var t=this,i="",s=t.handleExpCoupon(e),l=false,m={};if(s.n==1){var u=s.d[0];if(!u.isShow){l=true}else if(u.lastDay&&u.lastShow==false){l=true}var c=new Date(s.d[0].t);s.deadline=t.dateFormat(c,"yyyy-MM-dd");i='
';m.height="120px"}else{i='
';m.height="100px"}a.each(s.d,function(a){if(!a.isShow){l=true;return false}else if(a.lastDay&&a.lastShow==false){l=true;return false}});if(!l){t.getPluginAssetTip();return}t.mallbarItem.fire(n.E.BUBBLE_CHANGE,a.mix(m,{show:true,html:new o(i).render(s),dismiss:function(){t.getPluginAssetTip()},showed:function(){r.sendLog(n.ARR.COUPON_7_SHOW)},clicked:function(){t.set(n.K.COUPON_ANCHOR,"mbarCouponAnchorExpCoupon");r.sendLog(n.ARR.COUPON_7_CLICK)}}))},dateFormat:function(a,e){var t={"M+":a.getMonth()+1,"d+":a.getDate(),"h+":a.getHours(),"m+":a.getMinutes(),"s+":a.getSeconds(),"q+":Math.floor((a.getMonth()+3)/3),S:a.getMilliseconds()};if(/(y+)/.test(e)){e=e.replace(RegExp.$1,(a.getFullYear()+"").substr(4-RegExp.$1.length))}for(var i in t){if(new RegExp("("+i+")").test(e)){e=e.replace(RegExp.$1,RegExp.$1.length==1?t[i]:("00"+t[i]).substr((""+t[i]).length))}}return e},handleExpCoupon:function(a){var e=this,t={},i=e.mallbarItem;if(a.isServer)a["server"]["serverSince"]=new Date*1;e.handleExpServiceData(a,t);l.set({k:"mui/mallbar/asset/"+i.getUid(),v:a.isServer?a["server"]:a["local"],success:function(a){}});return t},handleExpServiceData:function(e,t){var i=this;var s=new Date*1,n=e["server"],r=e["local"];if(r&&r.d){r.d=a.filter(r.d,function(e){if(n&&n.d){var t=false;a.each(n.d,function(a){if(a.i==e.i){t=true;return false}});return t}return true})}if(n){a.each(n.d,function(e){if(r){a.each(r.d,function(t){if(t.i==e.i){a.mix(e,t)}})}});a.mix(t,a.clone(n))}else{if(r){a.mix(t,a.clone(r))}}var o=n?n:r;a.each(o.d,function(a,e){if(i.dateFormat(new Date(a.t),"yyyy-MM-dd")==i.dateFormat(new Date(s),"yyyy-MM-dd")){t.d[e].lastDay=true;a.isShow=true;a.lastShow=true}else{a.isShow=true}})},getPluginAssetTip:function(){var a=this;var e=a.mallbarItem;var t=e.get(n.K.MALLBAR);t.getCueMsgInfo(function(e){if(e.s!=200){r.codeTracker.sendTrack(n.T.NUMLEV,"mallbar.asset.cueAssetMsg.failure.bad-status-"+e.s,"\u83b7\u53d6\u6211\u7684\u8d44\u4ea7\u6c14\u6ce1\u63d0\u9192\u5f02\u5e38");return false}a.token=e.t;if(e.b&&e.b.c>0&&e.b.a!=="0.0"){a.handleAbleBonusBubble(e);return}else if(e.m&&e.m.t){if(e.m.p&&e.m.p!=2){a.handleMemberCouponBubble(e)}return}else if(e.uci&&e.uci.d&&e.uci.d.length>0){a.handleAbleCouponBubble(e);return}else if(e.oci&&e.oci.c&&e.oci.c.length>0){a.renderCouldCoupon(e)}})},handleAbleBonusBubble:function(a){var e=this;var t=e.mallbarItem;var i=t.get(n.K.MALLBAR);if(!a){return}l.get({k:"mui/mallbar/asset/ableBonus/"+t.getUid(),success:function(s){if(s&&s.isShow){if(a.m&&a.m.t){if(a.m.p&&a.m.p!=2){e.handleMemberCouponBubble(a)}return}else if(a.uci&&a.uci.d&&a.uci.d.length>0){e.handleAbleCouponBubble(a);return}else if(a.oci&&a.oci.d&&a.oci.d.length>0){e.renderCouldCoupon(a)}}else{var m=["
","\u60a8\u5171\u6709{{c}}\u4e2a\u7ea2\u5305\u53ef\u7528","
","
","\u603b\u91d1\u989d{{a}}\u5143","
"].join("");var u=new o(m).render(a.b);i.bubble({show:true,content:u,customContentType:1,isNotTabFire:false,bubbleType:0,tab:"ASSET",showed:function(){r.sendLog(n.ARR.BONUS_AVAILABLE_BUB_SHOW)},dismiss:function(){e.handleAbleCouponBubble(a)},clicked:function(){r.sendLog(n.ARR.BONUS_AVAILABLE_BUB_CLICK)}});l.set({k:"mui/mallbar/asset/ableBonus/"+t.getUid(),v:{isShow:true}})}}})},handleAbleCouponBubble:function(e){var t=this;var i=t.mallbarItem;var s=i.get(n.K.MALLBAR);var l=["red","yellow","blue"];var m=["mui-mbarp-asset-ableCouponBubble-title-red","mui-mbarp-asset-ableCouponBubble-title-yellow","mui-mbarp-asset-ableCouponBubble-title-blue"];if(a.isUndefined(e.uci)){return}if(e.uci.d&&e.uci.d.length==0){return}var u=function(e){var t=e[0]?e[0]:e.data;var i=t.d;if(i.length==0){return}var s="";var n='
';n+='
\u25c6
';n+='
';a.each(i,function(a,e){var t=a.d;var r="mui-mbarp-asset-ableCouponBubble-title-denomination";if(e===0){n+='
";return}});n+='
';n+="
";return n};var c=new o(u).render(e.uci);s.bubble({show:true,content:c,customContentType:3,bubbleType:n.B.FOREVER,isNotTabFire:false,tab:"ASSET",showed:function(){r.sendLog(n.ARR.COUPON_AVAILABLE_SHOW)},clicked:function(){t.set(n.K.COUPON_ANCHOR,"mbarCouponAnchorAbleCoupon");r.sendLog(n.ARR.COUPON_AVAILABLE_CLICK)}})},handleMemberCouponBubble:function(e){var t=this;var i=t.mallbarItem;var s=i.get(n.K.MALLBAR);if(a.isUndefined(e.m)){return}var l="";var m='
'+'
\u25c6
'+'
'+'
'+'
'+"{{#if v}}"+''+"{{/if}}"+"{{t}}
"+'
'+"{{#if rt===2}}"+'\uffe5'+'{{m}}\u73b0\u91d1\u5238
'+"{{/if}}"+"{{#if rt===1}}"+"{{b}}\u6298\u6263"+"{{/if}}"+"{{#if rt===3}}"+"{{b}}\u8bd5\u7528"+"{{/if}}";m+='
{{a}}
'+'
'+"
";l=m;var u=new o(l).render(e.m);s.bubble({show:true,content:u,customContentType:3,bubbleType:n.B.FOREVER,isNotTabFire:false,tab:"ASSET",showed:function(){r.sendLog(n.ARR.COUPON_MEMBER_BUBBLE_A_SHOW)},clicked:function(){t.set(n.K.COUPON_ANCHOR,"mbarCouponAnchorAbleCoupon");r.sendLog(n.ARR.COUPON_MEMBER_BUBBLE_A_CLICK)}})},_render:function(e){var t=this;var i=t.get(n.K.CONTAINER);var s=e.d;s.alipayId=e.alipayId?e.alipayId:"";o.addCommand("formatInteral",function(a,e){return t._formatInteral(e.fn(a))});var l=['
','
','','
',t.getIntegral(),"
",'
\u5929\u732b\u79ef\u5206
',"
","",'
','','
',"{{#with c}}{{a}}{{/with}}","
",'
\u4f18\u60e0\u5238
',"
","",'
','','
',"{{#with b}}",'¥',"{{#if d}}{{d}}{{/if}}","{{^if d}}0{{/if}}","{{/with}}","
",'
\u7ea2\u5305({{#with b}}{{a}}{{/with}})
',"
","","
","{{#with p}}{{#if e}}",'
',"{{#formatInteral}}{{e}}{{/formatInteral}}\u5929\u732b\u79ef\u5206\u4e8e{{d}}\u8fc7\u671f",'\u25c6',"
","{{/if}}{{/with}}"];var m=['
',"{{#with b}}","{{#if b_l_len}}",'
','
',"\u6211\u7684\u7ea2\u5305","
","{{/if}}","{{#each l}}","{{#if xindex<3}}",'
','','
','
¥{{d}}
','
\u5269\u4f59\uff1a¥{{sp}}
',"
",'
',"
\u6709\u6548\u671f
","
{{s}}
","
- {{l}}
","
","
","","{{/if}}","{{/each}}","{{/with}}","{{#with b}}","{{#if a>0}}",'
',"\u67e5\u770b\u66f4\u591a","","{{/if}}","{{/with}}","
"];var u=['
','','','
','','{{#if t==="\u5373\u5c06\u8fc7\u671f"}}',"","{{diffDay}}\u5929\u540e\u8fc7\u671f","{{else}}","{{t}}{{/if}}","",' {{n}}',"
",'
','
','{{#if t==="\u5373\u5c06\u8fc7\u671f"}}'," ","{{else}}","
{{s}}
","
- {{l}}
","{{/if}}","
",'
','
','\uffe5{{d}}','{{#if a>1}} x {{a}}\u5f20{{/if}}',"
",'
\u6ee1{{c}}\u4f7f\u7528{{#if i===1}}(\u90e8\u5206\u5546\u54c1\u53ef\u7528){{/if}}
',"
","
","
",'',""];var c=['
','{{n}}
','',"{{#if v}}",'',"{{/if}}","{{r}}
",'\uffe5 {{cm}}\u73b0\u91d1\u5238
','\u6d3b\u52a8\u65f6\u95f4:{{t}}
',"",'
',"
"].join("");var b="";if(s.c.l.length==0&&s.c.j.length==0&&s.c.o.length==0&&s.c.m==0){b=['
',l.join(""),m.join(""),'
',"
",'
',"
",'
\u55b5\uff01\u4f60\u8fd8\u6ca1\u9886\u53d6\u8fc7\u5929\u732b\u4f18\u60e0\u5238\uff01
\u5feb\u53bb\u9886\u53d6\u5427\uff01
',"
"]}else{function p(a,e){if(!a){return}if(a.indexOf("?")==-1){a+="?scm="+e}else{a+="&scm="+e}return a}a.each(s.c.l,function(a){a.u=p(a.u,"1048.1.3.2");a.curCoupon=true;a.diffDay=t._getDiffDay(a.l)});a.each(s.c.j,function(a){a.u=p(a.u,"1048.1.3.5");a.diffDay=t._getDiffDay(a.l)});a.each(s.c.o,function(a){a.u=p(a.u,"1048.1.3.3");a.diffDay=t._getDiffDay(a.l)});a.each(s.c.g,function(a){a.u=p(a.u,"1048.1.3.6");a.diffDay=t._getDiffDay(a.l)});a.each(s.c.m,function(a){a.u=p(a.u,"1048.1.3.6");a.diffDay=t._getDiffDay(a.l)});function d(a,e){var t="";t+=['
',l.join(""),m.join(""),'
',"{{#with c}}"].join("");if(e||a){t+=['
','
',"\u53ef\u7528\u4f18\u60e0\u5238","
",'
'].join("");if(a){t+=["{{#each m}}",c,"{{/each}}"].join("")}if(e){t+=["{{#each l}}",u.join(""),"{{/each}}"].join("")}t+='
'}else{t+='
'}t+=["
",'
',"
","{{#if j_len}}",'
',"\u5373\u5c06\u8fc7\u671f","
","{{/if}}",'
","{{#if o_len}}",'
',"\u6211\u9886\u53d6\u7684\u4f18\u60e0\u5238","
","{{/if}}",'
',"{{#each o}}","{{#if xindex<10}}",u.join(""),"{{/if}}","{{/each}}","{{#if o_len}}",'
',"\u67e5\u770b\u66f4\u591a","","{{/if}}","
","{{#if g_len}}",'
',"\u5546\u5bb6\u8d60\u9001\u7684\u4f18\u60e0\u5238","
","{{/if}}",'
',"{{#each g}}","{{#if xindex<3}}",u.join(""),"{{/if}}","{{/each}}","{{#if g_len}}",'
',"\u67e5\u770b\u66f4\u591a","","{{/if}}","
","{{/with}}","
","
"].join("");return t}var f=!!s.c.m?s.c.m.length:0;var h=!!s.c.l?s.c.l.length:0;b=d(f,h)}if(s.b){s.b_l_len=0;a.each(s.b,function(a,e){if(typeof a!=="number"){if(e=="l"){s.b_l_len=a.length}}})}if(s.c){s.j_len=0;s.o_len=0;s.l_len=0;s.g_len=0;s.m_len=0;s.ableShow=0;a.each(s.c,function(a,e){if(typeof a!=="number"){switch(e){case"j":s.j_len=a.length;break;case"l":s.l_len=a.length;break;case"o":s.o_len=a.length;break;case"g":s.g_len=a.length;break;case"m":s.m_len=a.length;break}}})}r.log(b);if(a.isArray(b)){b=b.join("")}var g=new o(b).render(s);i.html(g);var v=a.one("#"+t.get(n.K.COUPON_ANCHOR));if(v){var _=v.offset().top-v.height()-10-a.one(window).scrollTop();i.scrollTop(_);t.set(n.K.COUPON_ANCHOR,"")}var A=i.one(".mui-mbar-asset-no-coupon");if(A){r.getStaticConf({cb:function(a){if(a.showZeroCoupon){A.html(r.fm('{0}
\u7acb\u5373\u9886\u53d6',a.zeroCouponTxt,a.zeroCouponUrl))}}})}},cutStr:function(a,e){if(!a){return""}a=a.replace(/
]*?>([\w\W]+)<\/a>/gi,"$1");if(a.length<=e){return a}return a.substr(0,e)+"..."},getIntegral:function(){var e=this;var t=e.get(n.K.MALLBAR_ITEM);var i=t.getUserInfo();var s=i.memberInfo.availablePoints;s=a.isNumber(s)?s:n.DEGRADE;if(s==n.DEGRADE){return"-"}return e._formatInteral(s)},now:function(){var a=this;return a.get(n.K.MALLBAR_ITEM).getServerTime()},_getDiffDay:function(a){if(!a){return}var e,t,i,s,n=this;e=a.replace(/\./g,"/");t=new Date(e);i=new Date(n.dateFormat(n.now(),"yyyy/MM/dd"));s=parseInt(Math.abs(t-i)/1e3/60/60/24);return s+1},_formatInteral:function(a){a=Number(a);if("NaN"==typeof a){throw Error("\u53c2\u6570\u7c7b\u578b\u9519\u8bef\uff0c\u8bf7\u4f20\u5165\u6570\u503c\u7c7b\u578b\u7684\u53c2\u6570")}if(a>=1e6){return parseInt(a/1e6,10)+"00\u4e07+"}else if(a>=1e7){return parseInt(a/1e7,10)+"000\u4e07+"}return a},_couponTemp:new o(['','','','
','',"{{t}}",' {{n}}',"
",'
','
",'
','
','\uffe5{{d}}','{{#if a>1}} x {{a}}\u5f20{{/if}}',"
",'
\u6ee1{{c}}\u4f7f\u7528{{#if i===1}}(\u90e8\u5206\u5546\u54c1\u53ef\u7528){{/if}}
',"
","
","
",'',""].join("")),_assetCouponBubbleTPL:function(a){var e;
e='
';e+='
\u25c6
';e+='
';e+='
';e+=a;e+='
';e+="
";return e}});return m},{requires:["base","node","anim","event","mui/mallbar/conf","mui/mallbar/util","xtemplate","mui/mallbar/store","mui/mallbar/plugin-asset.css"]});KISSY.add("mui/mallbar/plugin/brand",function(a,e,t,i,r,s){var n=function(a){var e=this;e.showCoupon=false;n.superclass.constructor.call(e,a);e.init()};a.extend(n,e,{init:function(){var e=this;e.isAjaxMemberRight=false;var s=e.get(i.K.CONTAINER);var n=e.mallbarItem=e.get(i.K.MALLBAR_ITEM);var o=r.getSysId();e.isList=o=="list";e.isAjaxMemberRight=e.isList;var l=n.get(i.K.MALLBAR);e.brandId=l.get("brandId")||"";var m={noBrands:'
\u55b5\uff01\u4f60\u8fd8\u6ca1\u6709\u5173\u6ce8\u8fc7\u54c1\u724c\uff01
\u770b\u770b\u4e0b\u9762\u7684\u63a8\u8350\u54c1\u724c\u5427\uff01
',myBrands:'
',aldBrands:'
\u63a8\u8350\u54c1\u724c
',moreURL:'
\u67e5\u770b\u66f4\u591a'};function u(){var a=n.get(i.K.DATA);if(a.i1){r.ajax({url:i.URL.GET_PLUGIN_GET_BRAND,data:{},timeout:4,success:function(a){if(a.s!==200){r.codeTracker.sendTrack(i.T.NUMLEV,"mallbar.brand.brandContent.failure.bad-status-"+a.s,"\u83b7\u53d6\u6211\u5173\u6ce8\u7684\u54c1\u724c\u5185\u5bb9\u5f02\u5e38");return n.fire(i.E.ERROR)}var e='
{{#if m&&m.length}} '+m.myBrands+"{{else}} "+m.noBrands+" {{/if}} {{#if a&&a.length}} "+m.aldBrands+"{{/if}} {{#if u}} "+m.moreURL+"{{/if}}
";s.html(new t(e).render(a.m));if(a.mai){r.sendLog(a.mai)}b=false},jsonpCallback:"__mallbarBrand",error:function(){n.fire(i.E.ERROR);r.codeTracker.sendTrack(i.T.NUMLEV,"mallbar.brand.brandContent.get.failure","\u83b7\u53d6\u6211\u5173\u6ce8\u7684\u54c1\u724c\u5185\u5bb9\u5931\u8d25")}})}}var c=e.userInfo=n.getUserInfo();e.token="";e.bubbled=false;if(e.isList&&e.brandId){if(c.isLogin){p()}else{n.on(i.E.LOGIN_SUCCESS,function(a){r.log(a.type);p()})}}var b=true;e.on(i.E.VISIBILITY_CHANGE,function(a){if(e.showCoupon){e.showMemberCoupon();e.showCoupon=false}else{if(a.visible&&b){n.fire(i.E.SUPTIP_CHANGE,{show:false});u()}}});e.on(i.E.DATA_CHANGE,function(a){b=true;if(n.get(i.K.EXPAND)){u()}});function p(){var t=n.get(i.K.MALLBAR);t.getCueMsgInfo(function(t){a.log(t);if(t.s!=200){r.codeTracker.sendTrack(i.T.NUMLEV,"mallbar.brand.cueAssetMsg.failure.bad-status-"+t.s,"\u83b7\u53d6\u6211\u5173\u6ce8\u7684\u54c1\u724c\u7684\u4f18\u60e0\u5238\u6c14\u6ce1\u63d0\u9192\u5f02\u5e38");return false}e.token=t.t;if(t.m&&t.m.p==2){e.memberRightType=!!t.m.rt?t.m.rt:0;e.handBrandBubble(t)}})}},handBrandBubble:function(e){var s=this;var n=s.mallbarItem;var o=n.get(i.K.MALLBAR);var l=e.m;if(a.isUndefined(l)){return}var m="";var u='
'+'
\u25c6
'+'
'+'
'+'
'+"{{#if v}}"+''+"{{/if}}"+"{{t}}
"+'
'+"{{#if rt===2}}"+'\uffe5'+'{{m}}\u73b0\u91d1\u5238
'+"{{/if}}"+"{{#if rt===1}}"+'{{bt}}
\u6298\u6263
'+"{{/if}}"+"{{#if rt===3}}"+'{{bt}}
\u8bd5\u7528
'+"{{/if}}";u+='
{{a}}
'+'
'+"
";m=u;if(l.rt!=2){if(l.b){l.bt=c(l.b,15)}}function c(a,e){var t=/[^\x00-\xff]/g;if(a.replace(t,"mm").length<=e)return a;e=e-3;var i=Math.floor(e/2);for(var r=i;r
=e){return a.substr(0,r)+"..."}}return a}var b=new t(m).render(l);o.bubble({show:true,content:b,customContentType:3,bubbleType:i.B.FOREVER,isNotTabFire:false,tab:"BRAND",showed:function(){r.sendLog(i.ARR.COUPON_MEMBER_BUBBLE_B_SHOW)},clicked:function(){s.showCoupon=true;r.sendLog(i.ARR.COUPON_MEMBER_BUBBLE_B_CLICK)}})},showMemberCoupon:function(){var e=this;var s=['','
','{{n}}
','',"{{#if v}}"+'',"{{/if}}","{{r}}
",'\uffe5 {{cm}}\u73b0\u91d1\u5238
','{{a}}
','\u6d3b\u52a8\u65f6\u95f4:{{t}}
',"","
"].join("");var n=['"].join("");var o=['","{{#if dit}}",'','
\u25c6
','
\u4ee5\u4e0b\u5546\u54c1\u4e13\u4eab\u6298\u6263\u4ef7:
',"{{/if}}","
","{{#each dit}}","- ",'','
','','
{{din}}
','
T{{dil}}\u4e13\u4eab{{did}}\u6298
',"
",""," ","{{/each}}","
","
","{{#if dit}}",'',"\u67e5\u770b\u66f4\u591a","","{{/if}}"].join("");var l=!!e.brandId?e.brandId:"";var m=!!e.memberRightType?e.memberRightType:0;if(e.isAjaxMemberRight){r.ajax({url:i.URL.GET_PLUGIN_MEMBER_RIGHT,data:{brandId:l,type:m},timeout:4,jsonpCallback:"__mallbarMemberRight",success:function(l){if(l.s!=200){e.mallbarItem.fire(i.E.ERROR);r.codeTracker.sendTrack(i.T.NUMLEV,"mallbar.brand.memberRight.failure.bad-status-"+l.s,"\u6211\u5173\u6ce8\u7684\u54c1\u724c\u83b7\u53d6\u4f1a\u5458\u6743\u76ca\u5238\u5f02\u5e38")}e.token=l.t;if(l.c&&l.c.length){var m=l.c,u=l.c.length,c="";for(var b=0;b\u5f53\u524d\u54c1\u724c\u53ef\u7528\u4f18\u60e0\u5238';a.each(d,function(a){!!a&&(a.u="http://brand.tmall.com/brandInfo.htm?&brandId="+e.brandId);!!a.u&&(a.u=r.addSCM(a.u,"1048.1.99.1"))});for(var f=0;f\u5f53\u524d\u54c1\u724c\u4e13\u4eab\u54c1\u724cVIP\u6298\u6263\u4ef7';a.each(d,function(t){!!t&&(t.u="http://brand.tmall.com/brandInfo.htm?&brandId="+e.brandId);!!t.u&&(t.u=r.addSCM(t.u,"1048.1.4.18"));if(!!t.dit){a.each(t.dit,function(a){!!a.diu&&(a.diu=r.addSCM("http://detail.tmall.com/item.htm?id="+a.diu,"1048.1.99.2"));!!a.did&&(a.did=a.did/100)})}});for(var f=0;f\u5f53\u524d\u54c1\u724c\u53ef\u7528\u8bd5\u7528\u4ea7\u54c1';a.each(d,function(a){!!a.u&&(a.u=r.addSCM("http://shiyong.tmall.com/try/payTryItem.htm?id="+a.u,"1048.1.99.3"))});for(var f=0;f';var h=e.get(i.K.CONTAINER);h.html(c)}},error:function(){e.mallbarItem.fire(i.E.ERROR);r.codeTracker.sendTrack(i.T.NUMLEV,"mallbar.brand.memberRight.get.failure","\u6211\u5173\u6ce8\u7684\u54c1\u724c\u83b7\u53d6\u4f1a\u5458\u6743\u76ca\u5238\u5931\u8d25")}})}}});return n},{requires:["base","xtemplate","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/store","mui/mallbar/plugin-brand.css"]});KISSY.add("mui/mallbar/plugin/live",function(a,e,t,i,r,n,s,o,m){var l=function(a){var e=this;l.superclass.constructor.call(e,a);e.init()};var u=new r(['
','
','
\u67e5\u770b\u66f4\u591a
','
\u55b5\uff0c\u5df2\u7ecf\u662f\u6700\u540e\u7684\u6d88\u606f\u54af\uff01\uff01
'].join(""));var c="mui/mallbar/live/show";var b="";var d=new r(["{{#each msgs}}",'
','
'," {{#if src}}",' {{#if link}}
{{/if}}','
'," {{#if link}}{{/if}}"," {{/if}}",'
','
{{title}} ',' {{#if content}}
{{{content}}}
{{/if}}',"
",'
','
{{date}}
','
',"
","{{/each}}"].join(""));var p="\u53cc11";var f=new r(['
"].join(""));a.extend(l,e,{init:function(){var e=this;o.getStaticConf({cb:function(t){var i=e.get(s.K.CONTAINER);var r=e.get(s.K.MALLBAR_ITEM);var n=r.get(s.K.MALLBAR);i.html(u.render());i.one(".mui-mbarp-live-more").on("click",function(){e._getLiveData();o.sendLog(s.ARR.FOOT_MORE_CLICK)});var l=r.getUserInfo();var b=r.get(s.K.DATA);if(!l.isLogin||l.isLogin&&b.m>0){o.ajax({url:s.URL.GET_PLUGIN_LIVE_TIP,timeout:4,jsonpCallback:"__mallbarGetActiveMessage",success:function(i){if(i.s!==1||!i.t||!i.id){o.log("\u8bf7\u6c42\u6c14\u6ce1\u65f6\u670d\u52a1\u5668\u8fd4\u56de\u6709\u95ee\u9898");o.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.live.activeMessage.failure.bad-status-"+i.s,"\u83b7\u53d6\u76f4\u64ad\u95f4\u6d3b\u52a8\u4fe1\u606f\u72b6\u6001\u5f02\u5e38");return}var l=i.id+"";m.get({k:c,success:function(u){var b=false;var d=t.liveBubMax;a.each(u,function(a,e){if(e===l&&a>=d){b=true;return false}});if(b){return}u=u||{};u[l]=u[l]||0;u[l]+=1;m.set({k:c,v:u});i.d11=t.isLiveD11;i.title=e.toStr(i.t,10);i.u=i.u?o.addSCM(i.u,s.SCM.LIVE_BUB_LINK):"";n.bubble({show:true,content:f.render(i),customContentType:3,bubbleType:0,isNotTabFire:false,tab:"LIVE",hideDelay:t.liveBubDur?t.liveBubDur*1e3:s.BUBBLE_HIDE_DELAY,showed:function(e){e.one(".mui-mbarp-live-close").on("click",function(a){a.stopPropagation();r.fire(s.E.BUBBLE_CHANGE,{show:false})});a.each(e.all("a"),function(e){a.one(e).on("click",function(a){o.sendLog(s.ARR.LIVE_BUB_LINK_CLICK);a.stopPropagation()})});o.sendLog(s.ARR.LIVE_SHOW)},clicked:function(){o.sendLog(s.ARR.LIVE_CLICK)},dismiss:function(){}})}})},error:function(){o.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.live.activeMessage.get.failure","\u83b7\u53d6\u76f4\u64ad\u95f4\u6d3b\u52a8\u4fe1\u606f\u5931\u8d25");o.log("\u8bf7\u6c42\u6c14\u6ce1\u65f6\u670d\u52a1\u5668\u8d85\u65f6\u6216\u9519\u8bef")}})}var d=true;e.on(s.E.VISIBILITY_CHANGE,function(a){if(a.visible&&d){r.fire(s.E.SUPTIP_CHANGE,{show:false});e._getLiveData();d=false}});e.on(s.E.DATA_CHANGE,function(a){d=true;if(r.get(s.K.EXPAND)){e._getLiveData()}})}})},_getLiveData:function(){var e=this;var t=e.get(s.K.CONTAINER);var i=t.one(".mui-mbarp-live-msgs");var r=t.one(".mui-mbarp-live-more");var n=t.one(".mui-mbarp-live-more-nomsg");var m=t.one(".mui-mbarp-live-load");var l=e.get(s.K.MALLBAR_ITEM);r.hide();m.show();o.ajax({url:s.URL.GET_PLUGIN_LIVE,data:{pageSize:10,lastId:b},timeout:4,jsonpCallback:"__mallbarReadRadiateMsg",success:function(u){m.hide();r.show();o.log("lastId",b);if(u.errorCode=="E01"){l.fire(s.E.LOGIN);return}if(u.errorCode!="E00"&&!b){l.fire(s.E.ERROR);return}if(!u.msgs||!u.msgs.length){!b&&t.html('
\u55b5\uff01\u60a8\u6ca1\u6709\u65b0\u6d88\u606f\u54e6\uff01
');if(b){r.hide();n.show()}return}o.getStaticConf({cb:function(t){b=u.msgs[u.msgs.length-1].id;a.each(u.msgs,function(a,i){a.d11=t.isLiveD11;var r=o.parseDate(a.date);a.date=o.fm("{0}\u6708{1}\u65e5\u7ed3\u675f",r.getMonth()+1,r.getDate());a.t=a.title;a.title=e.toStr(a.t,10);a.link="";a.src="";a.desc="";if(a.extras.pics.length>0){var n=a.extras.pics[0];a.link=n.link?o.addSCM(n.link,s.SCM.LIVE):"";a.src=n.src;a.desc=n.desc||n.t}});i.append(d.render(u));e.fixArrow(i)}})},error:function(){o.log("\u76f4\u64ad\u95f4\u6570\u636e\u8bf7\u6c42\u8d85\u65f6\u6216\u9519\u8bef");m.hide();r.show();if(!b){l.fire(s.E.ERROR)}}})},fixArrow:function(e){if(!e){return}if(n.ie&&n.ie<=8){a.each(e.all(".mui-mbarp-live-bg"),function(e){e=a.one(e);e.css("width","14px");e.css("bottom","-3px")})}},toStr:function(a,e){e=e||Number.MAX_VALUE;if(!a){return""}a=a.replace(/
]*?>([\w\W]+)<\/a>/gi,"");if(a.length<=e){return a}return a.substr(0,e)}});return l},{requires:["base","node","event","xtemplate","ua","mui/mallbar/conf","mui/mallbar/util","mui/mallbar/store","mui/mallbar/plugin-live.css"]});KISSY.add("mui/mallbar/plugin/foot",function(a,e,t,i,r,n,o,s,m,l){var u=function(a){var e=this;u.superclass.constructor.call(e,a);e.init()};var c="\u55b5\uff01\u770b\u8fc7\u7684\u60a8\u53ef\u80fd\u9519\u8fc7\u4e86\uff01\u8fd9\u91cc\u5e2e\u60a8\u8bb0\u5f55\u60a8\u67e5\u770b\u8fc7\u7684\u5b9d\u8d1d\u3002\u8fd9\u6b21\u522b\u518d\u9519\u8fc7\u4e86\u54e6\uff01";a.extend(u,e,{init:function(){var e=this;var t=o.ie==6||o.ie==7;var n=e.get(s.K.CONTAINER);var u=e.get(s.K.MALLBAR_ITEM);var b=u.getUserInfo();var d=s.IS_DAILY?/http:\/\/.*\.daily\.tmall\.net.*itemId=.*/:/http:\/\/detail\.tmall\.com.*(\?|\&)id=.*/;var p=10;var f=30;var v=0;var h=false;var g;var _=[];var T=false;var A=false;var I=false;var C=false;var E=7;var B=7;var L=20;var S=18;var R=96;var O=120;var N=105;var M=120;var w=["\u4eca\u5929","1\u5929\u524d","2\u5929\u524d","1\u5468\u524d"];var b=u.getUserInfo();var y=b.isLogin;var U=false;var k;var P=a.one(' ');var D=a.one(' ');var x=a.one(' ');var K=a.one(' ');var G=a.one(' ');F();H();e.on(s.E.VISIBILITY_CHANGE,function(e){if(e.visible){A=true;setTimeout(function(){A=false},100);j()}if(e.first){var t=u.get(s.K.MALLBAR);n.delegate("click",".mui-mbarp-foot-favor-cancel",function(e){var i=a.one(e.currentTarget).parent(".mui-mbar-foot-hsitem");var r=i.attr("data-itemId");t._addFavor(r,e);m.sendLog(s.ARR.FOOT_ADD_FAVOR);e.halt()})}});e.on(s.E.DATA_CHANGE,function(a){m.log("Plugin",a.type);var e=u.get(s.K.EXPAND);if(e){j()}});e.on(s.E.PAGE_VISIBILITY_CHANGE,function(a){if(C){return}var e=u.get(s.K.EXPAND);if(e&&a.pageVisible&&!A){j()}});u.on(s.E.LOGIN_SUCCESS,function(){I=true});function F(){r.delegate(n,"click",".j_mui-mbar-foot-pfbtn",J)}function H(){l.get({k:"mui/mallbar/foot/historynum",success:function(a){var e;var t=window.location.href;e=a?a:[];var i=e.length;if(i>=f){return}var r;if(window.g_config&&window.g_config.itemId){r=window.g_config.itemId}if(r){var n=false;for(var o=0;o');a.one("#J_MuiMbarHistoryBd").parent(".mui-mbar-plugin-bd").css({overflow:"hidden",width:"235px"});m.noScroll(a.one("#J_MuiMbarHistoryBd"));m.log("Foot Visible");l.get({k:"mui/mallbar/foot/blacklist",success:function(a){if(a){_=a}V()}})}function X(){var e=a.one("#J_MuiMbarHistoryBd");var t=e.parent(".mui-mbar-plugin-bd").height();var i=a.one("#J_MuiMbarPinBd").height();e.height(t-i)}function V(){v=0;b=u.getUserInfo();m.log("updateContent",+new Date);new i({url:s.URL.GET_PLUGIN_FOOT_ITEMS,dataType:"jsonp",scriptCharset:"gbk",jsonpCallback:"__mallbarFootGetHistory",data:{type:1,t:+new Date},timeout:5,success:Z,error:function(){m.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.foot.footGetHistory.get.failure","\u83b7\u53d6\u6211\u7684\u8db3\u8ff9\u5386\u53f2\u5931\u8d25");u.fire(s.E.ERROR)}});new i({dataType:"jsonp",scriptCharset:"gbk",url:s.URL.GET_PLUGIN_FOOT_ITEMS2,jsonpCallback:"__mallbarFootGetPins",data:{type:2,t:+new Date},timeout:5,success:z,error:function(){m.codeTracker.sendTrack(s.T.NUMLEV,"mallbar.foot.footGetPins.get.failure","\u83b7\u53d6\u6211\u7684\u8db3\u8ff9Pins\u5931\u8d25");u.fire(s.E.ERROR)}})}function Y(){var e=''+'";a.one("#J_MuiMbarPinBd").html(e);var i=a.one(".mui-mbar-foot-hsitem");if(!(i&&i.length>0)){if(!t){a.one("#J_MuiMbarPinBd").css({height:0});T=true}}a.one(".mui-mbar-foot-plbtn").on("click",function(a){a.preventDefault();return u.fire(s.E.LOGIN,{success:function(){j()}})})}function W(){l.get({k:"mui/mallbar/foot/first",success:function(a){if(a){return}else{$(4)}}})}function z(e){m.log("::foot refreshPins::",e,+new Date);if(e.s&&e.s==-2){y=false;Y();X();return}y=true;var i=e["l"];var r=e["c"]?e["c"]:0;var n=''+'";pinHintHtml='';n+=l+pinHintHtml+"
";a.one("#J_MuiMbarPinBd").append(n);a.all(".j_mui-mbar-foot-ppin").on("click",q)}else{W();var l='';pinHintHtml='';n+=l+pinHintHtml+"
";a.one("#J_MuiMbarPinBd").append(n);if(!t){a.one("#J_MuiMbarPinBd").css({height:0});T=true}a.one(".mui-mbar-foot-pstatn").html("0");a.one(".mui-mbar-foot-pslist").css({height:0})}X();m.noScroll(a.one(".mui-mbar-foot-pins"))}function J(e){e.preventDefault();if(I){C=true;I=false}else{C=false}m.log("Unfold Pins");m.log(e);var i=a.one(e.target);var r=a.one(e.target).parent(".mui-mbar-plugin-bd").height();var n=a.one(".mui-mbar-foot-pins").height();var o=a.one(".mui-mbar-foot-phead").height();var s=a.one("#J_MuiMbarHistoryBd");if(i.hasClass("mui-mbar-foot-pfold")){var l=n>156?156:n;var u=T?r:r-o-19-l;s.height(u);i.removeClass("mui-mbar-foot-pfold");i.addClass("mui-mbar-foot-punfold");if(T){a.one("#J_MuiMbarPinBd").animate({height:0},.3,"easeOut",function(){X()})}else{a.one("#J_MuiMbarPinBd").removeAttr("style");a.one(".mui-mbar-foot-pins").animate({height:l},.3,"easeOut",function(){X()});s.one(".mui-mbar-foot-hmask").css({height:0,display:"none"});a.one(".mui-mbar-foot-hisbd").css({overflow:"auto"})}if(t){var c=a.one(".mui-mbar-foot-pslist");c.css({height:116})}}else{i.removeClass("mui-mbar-foot-punfold");i.addClass("mui-mbar-foot-pfold");var b=r-134;if(T){a.one("#J_MuiMbarPinBd").animate({height:156},.3,"easeOut",function(){X()})}else{a.one("#J_MuiMbarPinBd").removeAttr("style");a.one(".mui-mbar-foot-pins").animate({height:b},.3,"easeOut",function(){X()});if(t){var c=a.one(".mui-mbar-foot-pslist");var d=c.all(".mui-mbar-foot-psitem").length;var p=Math.ceil(d/2);var f=p*M;var v=b-94;f=f