define("alimama-minisite/views/pages/home/platform-carousel/mobile",["magix","../../../../view","../../utils"],function(x,v,K){"use strict";var I=this&&this.__awaiter||function(P,a,b,i){function r(g){return g instanceof b?g:new b(function(d){d(g)})}return new(b||(b=Promise))(function(g,d){function s(E){try{e(i.next(E))}catch(c){d(c)}}function L(E){try{e(i.throw(E))}catch(c){d(c)}}function e(E){E.done?g(E.value):r(E.value).then(s,L)}e((i=i.apply(P,a||[])).next())})},V=this&&this.__generator||function(P,a){var b={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},i,r,g,d;return d={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function s(e){return function(E){return L([e,E])}}function L(e){if(i)throw new TypeError("Generator is already executing.");for(;d&&(d=0,e[0]&&(b=0)),b;)try{if(i=1,r&&(g=e[0]&2?r.return:e[0]?r.throw||((g=r.return)&&g.call(r),0):r.next)&&!(g=g.call(r,e[1])).done)return g;switch(r=0,g&&(e=[e[0]&2,g.value]),e[0]){case 0:case 1:g=e;break;case 4:return b.label++,{value:e[1],done:!1};case 5:b.label++,r=e[1],e=[0];continue;case 7:e=b.ops.pop(),b.trys.pop();continue;default:if(g=b.trys,!(g=g.length>0&&g[g.length-1])&&(e[0]===6||e[0]===2)){b=0;continue}if(e[0]===3&&(!g||e[1]>g[0]&&e[1]<g[3])){b.label=e[1];break}if(e[0]===6&&b.label<g[1]){b.label=g[1],g=e;break}if(g&&b.label<g[2]){b.label=g[2],b.ops.push(e);break}g[2]&&b.ops.pop(),b.trys.pop();continue}e=a.call(P,b)}catch(E){e=[6,E],r=0}finally{i=g=0}if(e[0]&5)throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}};v.__esModule=!0;var u=x("magix"),z=x("../../../../view"),W=x("../../utils");u.default.applyStyle("bwERbPgcG",'@media screen and (max-width:768px){body .bwERbPgLO{width:100%}body .bwERbPgLO .bwERbPgLP{height:568px;margin:0 auto;width:100%}body .bwERbPgLO .bwERbPgLP .bwERbPgLQ{height:568px;position:relative}body .bwERbPgLO .bwERbPgLP .bwERbPgLQ.bwERbPgLR{justify-content:center}body .bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgLT{left:0;width:100%}body .bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgLU{height:568px}body .bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgLU img{height:568px;width:375px}body .bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV{height:165px;padding-left:0;position:absolute;top:45px;width:284px}body .bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV .bwERbPgLW .bwERbPgLX{font-size:20px;line-height:24px;margin-bottom:24px;margin-top:16px}body .bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV .bwERbPgLW .bwERbPgLY{font-size:12px;margin-left:118px}body .bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV .bwERbPgLW .bwERbPgLZ{font-size:12px}}.bwERbPgLO{box-sizing:border-box;margin:0 auto;max-width:1120px}.bwERbPgLO .bwERbPgM_{color:#333;font-size:34px;line-height:56px;margin-bottom:20px;text-align:center}.bwERbPgLO .bwERbPgMa{text-align:center}.bwERbPgLO .bwERbPgMa .bwERbPgMb{display:inline-block;position:relative}.bwERbPgLO .bwERbPgMa .bwERbPgMb .bwERbPgMc{border:1px solid transparent;border-radius:4px;color:#777;cursor:pointer;display:inline-block;height:40px;line-height:40px;padding:0 22px;position:relative;vertical-align:middle;z-index:2}.bwERbPgLO .bwERbPgMa .bwERbPgMb .bwERbPgMc:first-child{border-bottom-left-radius:4px;border-top-left-radius:4px}.bwERbPgLO .bwERbPgMa .bwERbPgMb .bwERbPgMc:last-child{border-bottom-right-radius:4px;border-top-right-radius:4px}.bwERbPgLO .bwERbPgMa .bwERbPgMb .bwERbPgMc.bwERbPgLR{background:#fff3eb;border:1px solid #ff822e;color:#000}.bwERbPgLO .bwERbPgMa .bwERbPgMb:after{border:1px solid #bdc0c7;border-radius:4px;content:" ";height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}.bwERbPgLO .bwERbPgLP{margin:0 10px}.bwERbPgLO .bwERbPgLP .bwERbPgLQ{border-radius:4px;display:none;height:468px;overflow:hidden}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS{max-width:100%;overflow:hidden;position:relative}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgLU{overflow:hidden;transition:transform .5s;width:80%}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgLU img{display:inline-block;height:430px;max-width:100%;vertical-align:middle}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgLT{bottom:44px;color:#fff;left:10%;position:absolute;width:80%}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgLT img{border-radius:100%;display:inline-block;height:64px;margin-right:16px;opacity:.6;vertical-align:middle;width:64px}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgLT img.bwERbPgLR{opacity:1}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgLT div{align-items:center;color:#fff;display:flex;font-family:PingFangSC-Thin;font-size:14px;justify-content:space-around;line-height:16px;width:100%}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgLT div .bwERbPgMd{background:#979797;bottom:4px;height:1px;position:absolute;width:calc(80% - 32px)}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgLT div .bwERbPgMe{background:#979797;border-radius:50%;height:8px;margin-top:10px;width:8px;z-index:0}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgLT div .bwERbPgMe.bwERbPgLR{background:var(--color-brand);box-shadow:0 0 0 3px rgba(103,62,255,.3);height:9px;width:9px}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgLT div .bwERbPgMe:first-child:after{width:0}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgLT div:first-child:before{background-color:var(--color-brand)}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgLT div.bwERbPgLR{color:#fff;font-family:PingFangSC-Medium;font-size:16px;line-height:16px}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgLT div:hover{cursor:pointer}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgMf{display:none;height:72px;position:absolute;width:72px}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgMf.bwERbPgLR{display:block}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgMf .bwERbPgMg{height:72px;overflow:hidden;position:absolute;top:0;width:36px}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgMf .bwERbPgMh{right:0}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgMf .bwERbPgMi{left:0}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgMf .bwERbPgMj{border:4px solid transparent;border-radius:50%;height:72px;position:absolute;top:0;-webkit-transform:rotate(45deg);width:72px}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgMf .bwERbPgMk{border-right:4px solid #ff822e;border-top:4px solid #ff822e;right:0;transition:transform .5s}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgMf .bwERbPgMl{border-bottom:4px solid #ff822e;border-left:4px solid #ff822e;left:0;transition:transform .5s}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgMm{bottom:20px;left:20px}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgMn{bottom:20px;left:100px;position:absolute}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgMo{bottom:20px;left:180px;position:absolute}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgMp{bottom:20px;left:260px;position:absolute}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLS .bwERbPgMq{bottom:20px;left:340px;position:absolute}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV{align-items:center;display:flex;max-width:600px;padding-left:20px;width:40%}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV .bwERbPgLW{display:none}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV .bwERbPgLW.bwERbPgLR{display:block}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV .bwERbPgLY{border-bottom:3px solid #6d44ff;color:#fff;display:inline-block;font-size:16px;line-height:22px;padding-bottom:12px}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV .bwERbPgLX{color:#fff;font-size:34px;line-height:48px;margin-top:12px}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV .bwERbPgLZ{color:#fff;font-size:12px;line-height:20px;margin-top:24px;text-align:center}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV .bwERbPgMr{margin-top:48px}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV .bwERbPgMr .bwERbPgMs{display:inline-block;margin-right:72px;vertical-align:middle}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV .bwERbPgMr .bwERbPgMt{color:#ff822e}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV .bwERbPgMr .bwERbPgMu{color:#ff822e;display:inline-block;font-size:32px;font-weight:700;line-height:45px;vertical-align:baseline}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV .bwERbPgMr .bwERbPgMv{display:inline-block;font-size:28px;font-weight:700;line-height:45px;vertical-align:bottom}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV .bwERbPgMr .bwERbPgMw{font-size:20px;line-height:28px;margin-left:4px;vertical-align:baseline}.bwERbPgLO .bwERbPgLP .bwERbPgLQ .bwERbPgLV .bwERbPgMr .bwERbPgMx{color:#999;font-size:12px;line-height:26px}.bwERbPgLO .bwERbPgLP .bwERbPgLQ.bwERbPgLR{display:flex}.bwERbPgLU{overflow:hidden;transition:transform .8s;width:80%}.bwERbPgLU img{display:inline-block;height:430px;max-width:100%;vertical-align:middle}'),v.default=z.default.extend({tmpl:function(P,a,b,i,r,g,d,s){if(b||(b=P),!r){var L={"&":"amp","<":"lt",">":"gt",'"':"#34","'":"#39","`":"#96"},e=/[&<>"'`]/g,E=function(o){return"&".concat(L[o],";")};r=function(o){return""+(o==null?"":o)},i=function(o){return r(o).replace(e,E)}}if(!g){var c={"!":"%21","'":"%27","(":"%28",")":"%29","*":"%2A"},Y=function(o){return c[o]},_=/[!')(*]/g;g=function(o){return encodeURIComponent(r(o)).replace(_,Y)}}if(!s){var U=/[\\'"]/g;s=function(o){return r(o).replace(U,"\\$&")}}var q="",j,t="",X=P.data,C=P.curTab,Z=P.hybrid,p=P.windowWidth,l=P.curImgIndex,h=P.width;t+='<div mxa="bwERbPgbY:_" class="bwERbPgLO"><div mxa="bwERbPgbY:a" class="bwERbPgLP">';for(var f=0,m=X.tabList,A=m.length;f<A;f++){var n=m[f];if(t+='<div class="bwERbPgLQ ',C==f&&(t+="bwERbPgLR"),t+='">',Z){t+='<div class="bwERbPgLS" style="width:'+i(p)+'px"><div class="bwERbPgLU" style="transform:translate3d(-'+i(l*p)+"px,0,0);width:"+i(p*n.cardList.length)+'px">';for(var w=0,O=n.cardList,D=O.length;w<D;w++){var R=O[w];t+='<a href="'+i(R.link)+'" data-spm-click="gostr=/alimama_bp.4.1;locaid=d3aace88d"><img src="'+i(R.bigImg)+'" class="',l==w&&(t+="bwERbPgLR"),t+='" style="width: '+i(p)+'px"/></a>'}if(t+="</div>",n.cardList&&n.cardList.length>1){t+='<div mxa="bwERbPgbY:b" class="bwERbPgLT"><div>';for(var w=0,y=n.cardList,F=y.length;w<F;w++){var R=y[w];t+='<div class="',l==w&&(t+="bwERbPgLR"),t+='" mx-click="'+a+"switchImg({index: "+i(w)+'})" data-spm-click="gostr=/alimama_bp.4.1;locaid=d63406546">'+i(R.class)+"</div>"}t+='</div><div mxs="bwERbPgbY:_"><div class="bwERbPgMd"></div></div><div mxa="bwERbPgbY:c" class="dot">';for(var w=0,M=n.cardList,G=M.length;w<G;w++){var R=M[w];t+='<div class="bwERbPgMe ',l==w&&(t+="bwERbPgLR"),t+='" mx-click="'+a+"switchImg({index: "+i(w)+'})" data-spm-click="gostr=/alimama_bp.4.1;locaid=d7f790860"></div>'}t+="</div></div>"}t+="</div>"}else{t+='<div class="bwERbPgLS" style="width:'+i(h)+'px"><div class="bwERbPgLU" style="width:'+i(h)+"px;transform:translate3d(-"+i(l*h)+"px,0,0);width:"+i(h*n.cardList.length)+'px">';for(var w=0,Q=n.cardList,H=Q.length;w<H;w++){var R=Q[w];t+='<a href="'+i(R.link)+'" data-spm-click="gostr=/alimama_bp.4.1;locaid=dedbda63c"><div class="',l==w&&(t+="bwERbPgLR"),t+='" style="display: inline-block;max-width:100%"><video width="'+i(h)+'" height="430" loop="loop" src="'+i(R.video)+'" autoplay preload="true"></video></div></a>'}if(t+="</div>",n.cardList&&n.cardList.length>1){t+='<div mxa="bwERbPgbY:d" class="bwERbPgLT"><div>';for(var w=0,S=n.cardList,N=S.length;w<N;w++){var R=S[w];t+='<div class="',l==w&&(t+="bwERbPgLR"),t+='" mx-click="'+a+"switchImg({index: "+i(w)+'})" data-spm-click="gostr=/alimama_bp.4.1;locaid=d0df9c413">'+i(R.class)+"</div>"}t+='</div><div mxs="bwERbPgbY:_"><div class="bwERbPgMd"></div></div><div mxa="bwERbPgbY:e" class="dot">';for(var w=0,k=n.cardList,B=k.length;w<B;w++){var R=k[w];t+='<div class="bwERbPgMe ',l==w&&(t+="bwERbPgLR"),t+='" mx-click="'+a+"switchImg({index: "+i(w)+'})" data-spm-click="gostr=/alimama_bp.4.1;locaid=da96e9438"></div>'}t+="</div></div>"}t+="</div>"}t+='<div mxa="bwERbPgbY:f" class="bwERbPgLV">';for(var w=0,T=n.cardList,J=T.length;w<J;w++){var R=T[w];t+='<div class="bwERbPgLW ',w==0&&(t+="bwERbPgLR"),t+='"><div mxs="bwERbPgbY:a"></div><div mxa="bwERbPgbY:g" class="bwERbPgLY">'+i(R.cardPreTitle||n.tabName)+'</div><div mxa="bwERbPgbY:h" class="bwERbPgLX">'+i(R.cardTitle)+'</div><div mxa="bwERbPgbY:i" class="bwERbPgLZ">'+i(R.cardDescription)+"</div></div>"}t+="</div></div>"}return t+="</div></div>",t},init:function(P){},render:function(){return I(this,void 0,void 0,function(){var P,a,b;return V(this,function(i){switch(i.label){case 0:return[4,(0,W.getAlpData)(this,"alimamamain_alimama_home_special_carousel_get")];case 1:return P=i.sent().list,a=[{cardList:P||[]}],b=$(window).width(),this.updater.set({curTab:0,curImgIndex:0,sliderProgress:0,width:b*.4>598?598:b*.4,windowWidth:b,data:{title:"",tabList:a}}),this.slider(),[2]}})})},"$win<resize>":function(P){var a=u.default.config("screenWidth"),b=$(window).width();this.updater.digest({width:b*.4>598?598:b*.4,hybrid:b<=a,windowWidth:b})},slider:function(){var P=this,a=this,b=this.updater.get("data"),i=b.tabList,r=this.updater.get("curTab"),g=u.default.config("screenWidth"),d=$(window).width();a.updater.digest({hybrid:d<=g}),this.interval=setInterval(function(){var s=P.updater.get("curImgIndex"),L=i[r].cardList.length;a.updater.digest({curImgIndex:(s+1)%L})},3e3)},"$win<touchstart>":function(P){this.isHybrid()&&this.updater.set({startX:P.originalEvent.changedTouches[0].pageX})},"$win<touchend>":function(P){if(this.isHybrid()){var a=this.updater.get(),b=a.startX,i=a.curTab,r=a.curImgIndex,g=a.sliderProgress,d=P.originalEvent.changedTouches[0].pageX,s=d<b;s?this.updater.digest({curImgIndex:r===0?3:r-1}):this.updater.digest({curImgIndex:r===3?0:r+1})}},"switchTab<click>":function(P){var a=P.params.index,b=this.updater.get("curTab"),i=this.updater.get("data");b!=a&&(this.updater.set({curTab:a,curImgIndex:0,sliderProgress:0}).digest(),clearInterval(this.interval),i.tabList[a].cardList&&i.tabList[a].cardList.length>0&&this.slider())},"switchImg<click>":function(P){var a=P.params.index,b=this.updater.get("curImgIndex");b!=a&&this.updater.set({curImgIndex:a,sliderProgress:0}).digest()}})});

//# sourceMappingURL=https://sourcemap.def.alibaba-inc.com/sourcemap/mm/alimama-minisite/20230327.152531.297/alimama-minisite/views/pages/home/platform-carousel/mobile.js.map
