1"use strict";function _typeof(obj){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(obj2){return typeof obj2}:_typeof=function(obj2){return obj2&&typeof Symbol=="function"&&obj2.constructor===Symbol&&obj2!==Symbol.prototype?"symbol":typeof obj2},_typeof(obj)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}function _get(target,property,receiver){return typeof Reflect!="undefined"&&Reflect.get?_get=Reflect.get:_get=function(target2,property2,receiver2){var base=_superPropBase(target2,property2);if(base){var desc=Object.getOwnPropertyDescriptor(base,property2);return desc.get?desc.get.call(receiver2):desc.value}},_get(target,property,receiver||target)}function _superPropBase(object,property){for(;!Object.prototype.hasOwnProperty.call(object,property)&&(object=_getPrototypeOf(object),object!==null););return object}function _inherits(subClass,superClass){if(typeof superClass!="function"&&superClass!==null)throw new TypeError("Super expression must either be null or a function");subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:!0,configurable:!0}}),superClass&&_setPrototypeOf(subClass,superClass)}function _setPrototypeOf(o,p){return _setPrototypeOf=Object.setPrototypeOf||function(o2,p2){return o2.__proto__=p2,o2},_setPrototypeOf(o,p)}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget)}else result=Super.apply(this,arguments);return _possibleConstructorReturn(this,result)}}function _possibleConstructorReturn(self,call){return call&&(_typeof(call)==="object"||typeof call=="function")?call:_assertThisInitialized(self)}function _assertThisInitialized(self){if(self===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return self}function _isNativeReflectConstruct(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf(o){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(o2){return o2.__proto__||Object.getPrototypeOf(o2)},_getPrototypeOf(o)}(function(window2){var SiteHeader=(function(_window$AbstractEleme){_inherits(SiteHeader2,_window$AbstractEleme);var _super=_createSuper(SiteHeader2);function SiteHeader2(id,options){var _this;_classCallCheck(this,SiteHeader2);var OPTIONS_MANDATORY={watchResize:!0};return options=$.extend(!0,_.clone(options),OPTIONS_MANDATORY),_this=_super.call(this,id,options),_this.$mainBar=_this.$domElement.find(".site-header__mainbar"),_this.$mainBarMenu=_this.$mainBar.find(".site-header__menu.navbar-nav"),_this.$mainBarInnerMenu=_this.$domElement.find(".site-header__innermenu"),_this.$mainBarInnerMenuContent=_this.$mainBarInnerMenu.find(".site-header__innermenu-content"),_this.$mainBarInnerMenuCard=_this.$mainBarInnerMenuContent.find(".card.site-header__innermenu-card"),_this.$navLinks=_this.$domElement.find(".site-header__mainbar *[data-quickmenu-target], .site-header__extrabar *[data-quickmenu-target]"),_this.$hamburgerBtn=_this.$mainBar.find(".hamburger-btn"),_this.$searchBtns=_this.$domElement.find(".search-btn, #site-header__innermenu-search-card-header"),_this.$quickCartBtn=_this.$domElement.find(".quick-chart-btn"),_this.$accountBtn=_this.$domElement.find(".account-btn"),_this.$ticker=_this.$domElement.find(".site-header__ticker"),_this.$asideLogoSvg=_this.$domElement.find("#site-header__logo-aside-svg"),_this.$topLogoSvg=_this.$domElement.find("#site-header__logo-top-svg"),_this.currentScrollTop=_this.savedScrolldownPosition=$(window2).scrollTop(),_this.scrolltopPositionOnMenuHide=null,_this.logoLoopTL=null,_this.$refHtmlBody=$("html, body"),_this}return _createClass(SiteHeader2,[{key:"init",value:function(){var _this2=this;
1this.$domElement.find(".it-lang-btn").on("click",this.options.changeLanguageCallback),this.$domElement.find(".en-lang-btn").on("click",this.options.changeLanguageCallback),this.$domElement.find(".es-lang-btn").on("click",this.options.changeLanguageCallback),this.$mainBarInnerMenuCard.on("shown.bs.collapse."+this.id,function(event){event.stopPropagation(),TweenMax.to(_this2.$mainBarInnerMenu,.65,{scrollTo:event.delegateTarget,ease:Expo.easeInOut})}),this.$ticker.cycle({slides:"> .ticker-item",speed:250,timeout:1e4}),this.$navLinks.on("pointerenter",function(event){if(_this2.$mainBarInnerMenuCard.removeClass("force-visibility"),!$("html").hasClass("user-logged")&&$(event.delegateTarget).attr("id")=="account-btn")event.preventDefault(),event.stopPropagation(),event.stopImmediatePropagation();else if(window2.Breakpoints.matches(window2.Breakpoints.MIN_WIDTH,window2.Breakpoints.LG)&&$(event.delegateTarget).attr("data-quickmenu-target")!=""){var ID=$(event.delegateTarget).attr("data-quickmenu-target");ID&&ID!=""&&($(ID).addClass("force-visibility"),_this2.$domElement.off("pointerleave").one("pointerleave",function(event2){_this2.$mainBarInnerMenuCard.removeClass("force-visibility")}))}}),this.$searchBtns.on("click",function(event){event.stopPropagation(),_this2.close(),_this2.options.showSearchModalCallback()}),this.$hamburgerBtn.on("click",function(event){Detectizr.os.name.match("ios")&&($("html").hasClass("minimized-menu-visible")||$("html").attr("last-scroll-position",$(window2).scrollTop())),$("html").toggleClass("minimized-menu-visible"),Detectizr.os.name.match("ios")&&($("html").hasClass("minimized-menu-visible")||(window2.TweenMax.set(window2,{scrollTo:{y:$("html").attr("last-scroll-position")}}),$("html").removeAttr("last-scroll-position"))),window2.TweenMax.set(_this2.$mainBarInnerMenu,{scrollTo:{y:0,autoKill:!1}}),_this2.$mainBarInnerMenuCard.find(".site-header__innermenu-body-wrapper").collapse("hide")}),this.$accountBtn.on("click",function(event){$("html").hasClass("user-logged")&&(event.preventDefault(),event.stopPropagation(),event.stopImmediatePropagation())}),Globals.IS_QUICK_PRODUCT_AUTHORIZED_DEVICE_TYPE&&($(window2).on("scroll."+this.id,_.throttle(this._mobileScrollHandler.bind(this),100,[])),this._mobileScrollHandler()),_get(_getPrototypeOf(SiteHeader2.prototype),"init",this).call(this),$(".site-header__menu a").on("click",function(event){event.preventDefault(),event.stopPropagation(),event.stopImmediatePropagation(),window2.pageVisitRequest={url:$(event.delegateTarget).attr("href"),needsPreventDefault:!0},Turbolinks.visit(window2.pageVisitRequest.url)})}},{key:"close",value:function(){this.$domElement.off("pointerleave"),this.$mainBarInnerMenuCard.removeClass("force-visibility"),$("html").removeClass("minimized-menu-visible"),this.$mainBarInnerMenuCard.find(".site-header__innermenu-body-wrapper[data-parent]").collapse("hide"),window2.TweenMax.set(this.$mainBarInnerMenu,{scrollTo:{y:0,autoKill:!1}})}},{key:"turbolinksLoad",value:function(){$("body").hasClass("template-cart")?this._disableQuickCartBtn():this._enableQuickCartBtn(),Globals.IS_QUICK_PRODUCT_AUTHORIZED_DEVICE_TYPE?this.show():$("body").hasClass("template-index")?($(window2).on("scroll."+this.id,_.throttle(this._scrollHandler.bind(this),100,[])),this._scrollHandler()):($(window2).off("scroll."+this.id),this._hideExpandedMenu(!1))}},{key:"_loopLogoAnimation",value:function(){var isLogoVisible=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this._killLoopLogoAnimation(),this.isVisible){var $target=!this.isExpanded&&window2.Breakpoints.matches(window2.Breakpoints.MIN_WIDTH,window2.Breakpoints.XL)?this.$asideLogoSvg:this.$topLogoSvg,$chars=$target.find("g[char]"),charsArray=[],subcharsArray=[];$chars.each(function(i2,el){charsArray[i2]=$(el),subcharsArray[i2]=[],$(el).find("> *").each(function(index,element){subcharsArray[i2].push($(element))})}),this.logoLoopTL=new window2.TimelineMax({repeat:-1}),this.logoLoopTL.set(charsArray,{visibility:"hidden",x:0,opacity:1,scale:1,transformOrigin:"left center"}),this.logoLoopTL.addLabel("draw_start","+=0.5"),this.logoLoopTL.set(charsArray,{visibility:"visible"},"draw_start");for(var i=0,len=subcharsArray.length;i<len;i++)this.logoLoopTL.staggerFromTo(subcharsArray[i],.7,{drawSVG:"0%"},{drawSVG:"100%",ease:window2.Cubic.easeOut},.15,"draw_start+="+(.15*i).toString());this.logoLoopTL.addLabel("draw_complete"),this.logoLoopTL.addLabel("undraw_start","+=45");for(var _i=0,_len=charsArray.length;_i<_len;_i++)this.logoLoopTL.to(charsArray[_i],.75+.012*_i,{force3D:"auto",scale:1-.025*_i,x:-35,opacity:0,ease:window2.Expo.easeInOut},"undraw_start+="+.025*_i);this.logoLoopTL.addLabel("undraw_complete"),isLogoVisible&&this.logoLoopTL.seek("draw_complete")}}},{key:"_killLoopLogoAnimation",value:function(){this.logoLoopTL&&(this.logoLoopTL.kill(),this.logoLoopTL=null)}},{key:"_enableQuickCartBtn",value:function(){var _this3=this;this.$quickCartBtn.prop("disabled",!1),this.$quickCartBtn.off("click").on("click",function(event){event.preventDefault(),Globals.checkCookieBeforeUsingCart()&&(_this3.close(),_this3.options.showQuickCartCallback(),_this3.pushViewCartDataLayer())})}},{key:"pushViewCartDataLayer",value:function(){console.log("-----> pushViewCartDataLayer"),this.killAJAXRequest(),this.AJAXrequest=$.ajax({dataType:"json",url:"/cart.js",success:function(data){for(var products=[],k=0,len=data.items.length;k<len;k++){var inventory_quantity=data.items[k].quantity,temp_pr={item_id:data.items[k].product_id.toString(),item_name:data.items[k].product_title,currency:Shopify.currency.active,item_brand:data.items[k].vendor,item_category:"Apparel",item_category2:data.items[k].variant_options[1],item_category3:void 0,item_category4:void 0,price:Number(slate.Currency.formatMoney(data.items[k].price,Globals.moneyFormat).toString().replace("\u20AC","").replace(".","").replace(",",".")),available_quantity:inventory_quantity,quantity:1,item_variant:data.items[k].variant_id.toString()};products.push(temp_pr)}
1dataLayer.push({ecommerce:null}),dataLayer.push({event:"view_cart",ecommerce:{items:products}}),Globals.CART_ITEMS=products},error:function(err){console.log(err)}})}},{key:"killAJAXRequest",value:function(){this.AJAXrequest&&(this.AJAXrequest.abort(),this.AJAXrequest=null)}},{key:"_disableQuickCartBtn",value:function(){this.$quickCartBtn.off("click"),this.$quickCartBtn.prop("disabled",!0)}},{key:"_scrollHandler",value:function(){var event=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;this.savedScrolldownPosition=this.currentScrollTop,this.currentScrollTop=$(window2).scrollTop(),$("body").hasClass("template-index")&&(window2.Breakpoints.matches(window2.Breakpoints.MIN_WIDTH,window2.Breakpoints.XL)&&$(window2).scrollTop()<=180?$("html").hasClass("expanded-header")||(this.$domElement.off("pointerleave"),this.$mainBarInnerMenuCard.removeClass("force-visibility"),$("html").addClass("expanded-header"),window2.TweenMax.killTweensOf(this.$domElement),window2.TweenMax.set(this.$domElement,{clearProps:"all"}),this._loopLogoAnimation()):this._hideExpandedMenu())}},{key:"_mobileScrollHandler",value:function(){var event=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;this.$refHtmlBody.hasClass("disable-native-scrolling")||window2.TweenMax.isTweening(window2)||(this.savedScrolldownPosition=this.currentScrollTop,this.currentScrollTop=$(window2).scrollTop(),this.currentScrollTop<=window2.ViewportUtils.$window.height()/3?this.show():this.currentScrollTop>this.savedScrolldownPosition?this.hide():this.scrolltopPositionOnMenuHide&&this.currentScrollTop<this.scrolltopPositionOnMenuHide-60&&this.show())}},{key:"_hideExpandedMenu",value:function(){var isAnimated=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;$("html").hasClass("expanded-header")&&(this.$domElement.off("pointerleave"),this.$mainBarInnerMenuCard.removeClass("force-visibility"),window2.TweenMax.killTweensOf(this.$domElement),window2.TweenMax.set(this.$domElement,{visibility:"hidden"}),$("html").removeClass("expanded-header"),window2.TweenMax.fromTo(this.$domElement,isAnimated?.15:0,{visibility:"hidden",y:-200},{delay:.15,force3D:"auto",visibility:"visible",y:0,clearProps:"all",ease:window2.Sine.easeOut}),this._loopLogoAnimation())}},{key:"resizeHandler",value:function(){var event=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;this.close(),Globals.IS_QUICK_PRODUCT_AUTHORIZED_DEVICE_TYPE?this._mobileScrollHandler():$("body").hasClass("template-index")&&($("html").removeClass("expanded-header"),this._scrollHandler()),this._loopLogoAnimation()}},{key:"show",value:function(){$("html").hasClass("site-header-hidden")&&($("html.site-header-hidden").removeClass("site-header-hidden"),this.$ticker.cycle("resume"),this._loopLogoAnimation(!0),this.scrolltopPositionOnMenuHide=null,_get(_getPrototypeOf(SiteHeader2.prototype),"show",this).call(this))}},{key:"hide",value:function(){this.scrolltopPositionOnMenuHide=this.currentScrollTop,!$("html").hasClass("site-header-hidden")&&($("html").addClass("site-header-hidden"),this.$ticker.cycle("pause"),this._killLoopLogoAnimation(),_get(_getPrototypeOf(SiteHeader2.prototype),"hide",this).call(this))}},{key:"dispose",value:function(){this._killLoopLogoAnimation(),this.$ticker.cycle("destroy"),this.$domElement.find(".it-lang-btn").off("click"),this.$domElement.find(".en-lang-btn").off("click"),this.$domElement.find(".es-lang-btn").off("click"),this.$searchBtns.off("click"),this.$hamburgerBtn.off("click"),this.$quickCartBtn.off("click"),this.$navLinks.off("pointerenter"),$(window2).off("scroll."+this.id),this.$mainBarInnerMenuCard.off("shown.bs.collapse."+this.id),_get(_getPrototypeOf(SiteHeader2.prototype),"dispose",this).call(this)}},{key:"currentHeight",get:function(){return this.$domElement.outerHeight()}},{key:"isVisible",get:function(){return!$("html").hasClass("site-header-hidden")}},{key:"isHidden",get:function(){return $("html").hasClass("site-header-hidden")}},{key:"isExpanded",get:function(){return $("html").hasClass("expanded-header")}},{key:"cartQuantity",set:function(quantity){this.$quickCartBtn.attr("data-quantity",quantity||"0")}}]),SiteHeader2})(window2.AbstractElement);window2.SiteHeader=SiteHeader})(window); 2//# sourceMappingURL=/cdn/shop/t/36/assets/SiteHeader.ta.js.map?v=158987191371599542811734084511
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.