(this["webpackJsonp6th-street"]=this["webpackJsonp6th-street"]||[]).push([[170,56],{1518:function(t,e,i){"use strict";(function(t,n){var o=i(0),r=i(476),s=i(122),a=i(75),l=i(7),c=i(15),h=i(9),d=i(12),p=i(1729),m=i(868),u=i(649),g=i(660),b=i(1176),f=(i(1730),i(942)),_=i(870),v=i(11).checkBEMProps;class k extends o.PureComponent{constructor(e){super(e),this.state={isMobile:c.a.any()||c.a.tablet(),impressionSent:!1,isHideWidget:!0,profileComplete:null},this.timerStartRef=Object(o.createRef)(),this.timerEndRef=Object(o.createRef)(),this.showWidgetPostRender=()=>{const t=(new Date).toUTCString(),{end_time:e,start_time:i}=this.props,n=e,o=Date.parse(n)-Date.parse(t),r=Date.parse(i)-Date.parse(t);r>0&&(this.timerStartRef.current=setTimeout(()=>{this.setState({isHideWidget:!1})},r),this.timerEndRef.current=setTimeout(()=>{this.setState({isHideWidget:!0})},o)),o<=0?this.setState({isHideWidget:!0}):Date.parse(i)<Date.parse(t)&&Date.parse(t)<Date.parse(n)&&(this.setState({isHideWidget:!1}),this.timerEndRef.current=setTimeout(()=>{this.setState({isHideWidget:!0})},o))},this.handleIntersect=(t,e)=>{const{impressionSent:i}=this.state;i||t.forEach(t=>{t.isIntersecting&&this.sendImpressions()})},this.onclick=t=>{const{toggleMobileMenuSideBar:e,index:i}=this.props;e&&e(),setTimeout(()=>{});let n={banner_type:(null===t||void 0===t?void 0:t.has_video)?"video":"image",link:t.link,promotion_name:t.promotion_name};l.hj.dispatch(l.xb,n),this.sendBannerClickImpression(t),Object(g.e)(this.props.moengage_experience_keys,{audienceNames:null===t||void 0===t?void 0:t.audience_names,bannerName:null===t||void 0===t?void 0:t.promotion_name,widgetName:this.props.widget_name}),this.props.setLastTapItemOnHome("DynamicContentBanner".concat(i))},this.renderImage=(e,i)=>{const{index:n,type:o,edge_to_edge:r=!1,is_non_clickable:l}=this.props,{url:m,image_url:u,height:g="",width:f="",promotion_name:k,description:x,button_label:D,has_video:w=!1,video_url:P=""}=e,T=Object(p.b)(this.props.tag,this.state.profileComplete,e.link),y=e.is_external_link&&T===e.link;const j=f/g||1;let C=c.a.any()?{width:"100%",objectFit:"cover"}:{width:"100%",height:"auto",objectFit:"cover"};const I=c.a.any()&&!r?{margin:"0 10px",width:"calc(100% - 20px)"}:null;return T?v(t,a.default,Object.assign({to:"xhr_nonclickable_banner"===(null===e||void 0===e?void 0:e.tag)?"":y?Object(h.h)(T):Object(h.c)(T),key:i,"data-banner-type":o||"banner","data-promotion-name":e.promotion_name?e.promotion_name:"","data-tag":e.tag?e.tag:"",title:e.promotion_name||e.title||""},Object(h.g)(y),{onClick:t=>{Object(_.a)(t,l||(null===e||void 0===e?void 0:e.is_non_clickable)),this.onclick(e)},style:{alignItems:Object(d.h)()?"flex-end":"flex-start",cursor:l||(null===e||void 0===e?void 0:e.is_non_clickable)?"default":"pointer"}}),this.props.start_time&&this.props.end_time&&("timer_banner"==o||"timer_edge_to_edge_banner"==o)&&this.renderTimer(),w&&P?v(t,b.a,{src:P,width:f||void 0,height:g||void 0,style:C,containerStyle:I}):v(t,s.default,{lazyLoad:21!==n&&35!==n,src:m||u,block:"Image",intrinsicWidth:f||void 0,intrinsicHeight:g||void 0,style:c.a.any()&&f&&g?{width:"".concat(r?window.innerWidth:window.innerWidth-20,"px"),height:"".concat((r?window.innerWidth:window.innerWidth-40)/j,"px")}:r?{width:"100%",height:"auto",objectFit:"cover"}:{maxWidth:void 0,height:void 0,objectFit:"unset"},alt:e.promotion_name?e.promotion_name:"DynamicContentBannerImage"}),this.renderButton(),this.renderDescription(x,D)):v(t,t.Fragment,null,w&&P?v(t,b.a,{src:P,width:f||void 0,height:g||void 0,style:C,containerStyle:I}):v(t,s.default,{lazyLoad:21!==n&&35!==n,key:i,src:m||u,ratio:"custom",height:void 0,width:void 0,intrinsicWidth:f||void 0,intrinsicHeight:g||void 0,style:r?{width:"100%",height:"auto",objectFit:"cover"}:void 0,alt:k||"DynamicContentBannerImage"}),this.renderButton(),this.renderDescription(x,D))},this.renderTimer=()=>{const{start_time:e="",end_time:i="",text_alignment:n="",title:o="",alignment:r=""}=this.props;return v(t,f.a,{start:e,end:i,alignment:r,textAlignment:n,infoText:o})},this.onclick=this.onclick.bind(this)}componentDidMount(){const{doNotTrackImpression:t}=this.props;t||this.registerViewPortEvent(),this.showWidgetPostRender(),this.resolveProfileComplete(),Object(g.f)(this.props.moengage_experience_keys,this.props.items,this.props.widget_name)}componentDidUpdate(t){Object(p.c)(this.props.tag)&&t.isLoggedIn!==this.props.isLoggedIn&&Object(p.a)().then(t=>{this.setState({profileComplete:t})})}resolveProfileComplete(){Object(p.c)(this.props.tag)&&Object(p.a)().then(t=>{this.setState({profileComplete:t})})}componentWillUnmount(){this.timerStartRef.current&&clearTimeout(this.timerStartRef.current),this.timerEndRef.current&&clearTimeout(this.timerEndRef.current)}registerViewPortEvent(){if(!this.viewElement)return;let t;t=new IntersectionObserver(this.handleIntersect,{root:null,rootMargin:"0px",threshold:.5}),t.observe(this.viewElement)}sendImpressions(){var t,e,i;const{items:n=[]}=this.props,o=(null===(t=this.props)||void 0===t?void 0:t.promotion_name)?null===(e=this.props)||void 0===e?void 0:e.promotion_name:"",s=(null===(i=this.props)||void 0===i?void 0:i.index)?this.props.index:"";n.forEach((t,e)=>{Object.assign(t,{store_code:o,indexValue:e+1,default_Index:s})}),l.hj.dispatch(r.b,n),this.setState({impressionSent:!0})}sendBannerClickImpression(t){l.hj.dispatch(r.a,[t])}renderDescription(e,i){const{isMobile:n}=this.state;return v(t,t.Fragment,null,n&&e&&v(t,"h4",{block:"BannerDesc"},e),n&&i&&v(t,"button",{block:"BannerButton"},i))}renderButton(){const{isMobile:e}=this.state,{isMenu:i}=this.props;return e||!i?null:v(t,"button",null,n("\u062a\u0633\u0648\u0642\u0648\u0627 \u0627\u0644\u0622\u0646"))}renderImages(){const{items:t=[],type:e=""}=this.props;return["edge_to_edge_banner","banner"].includes(e)?this.renderImage(t[0],0):t.map(this.renderImage)}render(){let e=t=>{this.viewElement=t};const{index:i,start_time:n,end_time:o,edge_to_edge:r=!1}=this.props,s={edgeToEdge:r};return Object(p.d)(this.props.tag,this.state.profileComplete,this.props.isLoggedIn)?null:n&&o&&this.state.isHideWidget?v(t,"div",{ref:e}):v(t,"div",{ref:e,block:"DynamicContentBanner",mods:s,id:"DynamicContentBanner".concat(i)},this.props.header&&v(t,u.default,{header:this.props.header}),this.renderImages(),this.props.footer&&v(t,m.a,{footer:this.props.footer}))}}k.defaultProps={isMenu:!1},e.a=k}).call(this,i(0),i(29))},1730:function(t,e,i){},548:function(t,e,i){"use strict";i.r(e),function(t){var n=i(0),o=i.n(n),r=(i(15),i(12)),s=i(788),a=i.n(s),l=(i(789),i(11).checkBEMProps);e.default=function(e){const[i,s]=Object(n.useState)("00"),[c,h]=Object(n.useState)("00"),[d,p]=Object(n.useState)("00"),[m,u]=Object(n.useState)("00"),g=e.end;Object(n.useEffect)(()=>{const t=setInterval(()=>(()=>{const t=(new Date).toUTCString(),e=null===g||void 0===g?void 0:g.toLocaleString(),i=Date.parse(e)-Date.parse(t),n=Math.floor(i/864e5)>9?Math.floor(i/864e5):"0"+Math.floor(i/864e5),o=Math.floor(i/36e5%24+24*n)>9?Math.floor(i/36e5%24+24*n):"0"+Math.floor(i/36e5%24),r=Math.floor(i/1e3/60%60)>9?Math.floor(i/1e3/60%60):"0"+Math.floor(i/1e3/60%60),a=Math.floor(i/1e3%60)>9?Math.floor(i/1e3%60):"0"+Math.floor(i/1e3%60);s(n),h(o),p(r),u(a)})(),1e3);return()=>clearInterval(t)},[]);const{start:b,end:f,containerStyle:_}=e,v=Date.parse((new Date).toUTCString()),k=Date.parse(b),x=Date.parse(f);return x>=k&&v<=x&&!(k>=v)?l(o.a,"div",{block:"DynamicContentCountDownTimer",id:"DynamicContentCountDownTimer",style:_},(()=>{const{newtimerIcon:i=a.a,infoText:n="",alignment:s="",textAlignment:h="",isPLPOrPDP:p,hideInfoText:u=!1}=e,g="string"===typeof n?n.trim():n,b=!u&&Boolean(g),f=Object(r.h)();return l(o.a,"h3",{block:"left"===s?"TimerTitle AlignLeft":"right"===s?"TimerTitle AlignRight":p?"TimerTitle AlignCenter PDPPLPMarginZero":"TimerTitle AlignCenter",mods:{isArabicStore:f}},b&&l(o.a,"span",{block:"right_to_the_timer"===h?"InfoText AlignTextRight":"left_to_the_timer"===h?"InfoText AlignTextLeft":"InfoText AlignTextCenter",mods:{isArabicStore:f}},g),l(o.a,"span",{block:p?"timer PLPOrPDPTimer":"timer"},p&&l(o.a,"span",{block:"clock"}," ",l(o.a,"img",{src:i,alt:"countDown"})),l(o.a,"span",{block:p?"Box isPLPorPDPBox":"Box"},l(o.a,"b",null,c),t(" \u0633")),l(o.a,"span",{block:"separator"},":"),l(o.a,"span",{block:p?"Box isPLPorPDPBox":"Box"},l(o.a,"b",null,d),t(" \u062f")),l(o.a,"span",{block:"separator"},":"),l(o.a,"span",{block:p?"Box isPLPorPDPBox":"Box"},l(o.a,"b",null,m),t(" \u062b"))))})()):null}}.call(this,i(29))},788:function(t,e,i){t.exports=i.p+"static/media/clockIcon.ecac74c0.svg"},789:function(t,e,i){},868:function(t,e,i){"use strict";(function(t){var n=i(0),o=(i(869),i(11).checkBEMProps);class r extends n.PureComponent{render(){if(this.props.footer.title_color){this.props.footer.title_color}return o(t,"div",{block:"DynamicContentFooter"},this.props.footer.title&&o(t,"p",{block:"DynamicContentFooter-Title"},this.props.footer.title),this.props.footer.subtitle&&o(t,"p",{block:"DynamicContentFooter-SubTitle"},this.props.footer.subtitle),this.props.footer.button_label&&o(t,"a",{href:this.props.footer.button_link,block:"DynamicContentFooter-Button",title:this.props.footer.button_label},this.props.footer.button_label))}}e.a=r}).call(this,i(0))},869:function(t,e,i){},890:function(t,e,i){"use strict";i.r(e);var n=i(1518);i.d(e,"default",(function(){return n.a}))},942:function(t,e,i){"use strict";var n=i(548);i.d(e,"a",(function(){return n.default}))}}]);