1!function(){"use strict";var e,t,s,i={762:function(e,t,s){var i={};s.r(i),s.d(i,{AcademyVideo:function(){return u},Accordion:function(){return m},BlogOverview:function(){return f},Color:function(){return $e},CommentSection:function(){return S},ContentMatrix:function(){return y},CountryLanguage:function(){return _},CountryLanguageFooter:function(){return w},CropsOverviewFilter:function(){return A},DealerLocatorWithBaidu:function(){return P},DealerLocatorWithGoogle:function(){return T},DlwSiteSuggestion:function(){return Ye},Dlw_LightGallery:function(){return je},Dlw_Swiper:function(){return b},ExpandCollapseComponent:function(){return I},Feed:function(){return Oe},FloatingButtons:function(){return O},FormContainer:function(){return B},GatedContentModal:function(){return D},GenericListing:function(){return q},Graph:function(){return U},HeaderNewComponent:function(){return Y},HotSpot:function(){return Z},InlinePdf:function(){return Q},JobFilter:function(){return X},Lifecycle:function(){return ee},MethodViewModel:function(){return Ie},MoreLink:function(){return l},NewsOverview:function(){return ke},NtfAuthorCarousel:function(){return C},NtfGridCarousel:function(){return F},NtfImageTabs:function(){return se},NtfMediaCarousel:function(){return be},NtfProductDetail:function(){return te},NtfVerticalMediaCarousel:function(){return Ae},OfficeLocatorComponent:function(){return Ce},OnThisPage:function(){return ye},Overlay:function(){return k},PopUp:function(){return ne},PopUpFrame:function(){return c},ProductFamilyQuickLink:function(){return ie},ProductRefiner:function(){return re},ROICalculator:function(){return Re},ROIViewModel:function(){return Pe},SearchComponent:function(){return oe},SecondarySelection:function(){return N},ShopifyProducts:function(){return ce},Sidebar:function(){return z},SiteSuggestion:function(){return de},SuccesStoryFilter:function(){return ue},SuccessStoriesOverview:function(){return he},SystemConfiguratorGetStarter:function(){return pe},SystemConfiguratorParameters:function(){return ge},Tabing:function(){return Se},Toast:function(){return Ee},Tooltip:function(){return M},VideoComponent:function(){return we},Weather:function(){return Le},YouTubeScriptInitialization:function(){return h}});var a={initializeComponents(e){Array.from(document.querySelectorAll("[data-component-class]")).forEach(t=>{let s=t.getAttribute("data-component-class");for(const a of s.split(/[ ]+/)){var i=e[a];if(!i)return;new i(t)}})},isHidden(e){var t=window.getComputedStyle(e);return"none"===t.display||"hidden"===t.visibility}};class r{constructor(e){this.element=e,null!=this.element&&this.preInit()}preInit(){}}class n extends r{constructor(e){super(e),this.CLASS_PARENT="js-expand-collapse",this.SELECTOR_PARENT="."+this.CLASS_PARENT,this.CLASS_TRIGGER="js-trigger-expand",this.SELECTOR_TRIGGER="."+this.CLASS_TRIGGER,this.CLASS_ACTIVE="is-collapsed",this.SELECTOR_ACTIVE="."+this.CLASS_ACTIVE,this.init()}init(){this.triggerElements=this.element.querySelectorAll(this.SELECTOR_TRIGGER),this.parentElement=this.element.querySelector(this.SELECTOR_PARENT),this.triggerElements&&this.triggerElements.forEach(e=>e.addEventListener("click",t=>{t.preventDefault(),null!=e&&e.classList.contains(this.CLASS_TRIGGER)&&(this.parentElement=e.closest(this.SELECTOR_PARENT),this.parentElement.classList.contains(this.CLASS_ACTIVE)?this.parentElement.classList.remove(this.CLASS_ACTIVE):this.parentElement.classList.add(this.CLASS_ACTIVE))}))}}class l extends r{constructor(e){super(e),this.init()}init(){this.expandCollapse=new n(this.element)}}class o extends r{constructor(e){super(e)}preInit(){this.parm=this.getClientData()}getClientData(){var e=this.element.attributes[o.CLIENT_DATA_ATTRIBUTE],t=null;if(e)try{t=JSON.parse(e.value)}catch(s){t=e}return t}}o.CLIENT_DATA_ATTRIBUTE="data-component-parm";class c extends o{constructor(e){super(e),this.init()}init(){window.$$epiforms;document.addEventListener("callbackFormSubmit",e=>{var t=new CustomEvent("callbackFormSubmit",{detail:e.detail.toString()});window.parent.document.dispatchEvent(t)})}}class d extends r{constructor(e){super(e),this.CLASS_WRAPPER="js-modal",this.SELECTOR_WRAPPER="."+this.CLASS_WRAPPER,this.CLASS_TRIGGER="js-toggle-modal",this.SELECTOR_TRIGGER="."+this.CLASS_TRIGGER,this.CLASS_ACTIVE="is-active",this.SELECTOR_ACTIVE="."+this.CLASS_ACTIVE,this.init()}init(){this.triggerElement=this.element.querySelectorAll(this.SELECTOR_TRIGGER),this.wrapperElement=this.element.querySelector(this.SELECTOR_WRAPPER),this.triggerElement&&this.triggerElement.forEach(e
1=>e.addEventListener("click",t=>{t.preventDefault(),null!=e&&e.classList.contains(this.CLASS_TRIGGER)&&(this.wrapperElement.classList.contains(this.CLASS_ACTIVE)?(this.wrapperElement.classList.remove(this.CLASS_ACTIVE),this.wrapperElement.removeAttribute("open"),e.setAttribute("aria-expanded",(!1).toString()),document.querySelector("body").classList.remove("no-scroll")):(e.setAttribute("aria-expanded",(!0).toString()),this.wrapperElement.setAttribute("open",""),this.wrapperElement.classList.add(this.CLASS_ACTIVE),document.querySelector("body").classList.add("no-scroll")))}))}}class h{constructor(){this.init()}init(){if(0===$('script[src="https://www.youtube.com/iframe_api"]').length){var e=document.createElement("script");e.src="https://www.youtube.com/iframe_api";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)}window.onYouTubeIframeAPIReady=()=>{var e=document.createEvent("CustomEvent");e.initCustomEvent("YouTubeIframeAPIReady",!1,!1,null),document.dispatchEvent(e)}}}class u extends o{constructor(e){super(e),this.init()}init(){this.modal=new d(this.element),this.youtubeScriptInitialization=new h,document.addEventListener("YouTubeIframeAPIReady",e=>{var t=this.element,s=new YT.Player(this.parm.playerId,{height:"390",width:"640",videoId:this.parm.initialVideoId,playerVars:{playsinline:1,origin:this.parm.originUrl},events:{onReady:function(e){},onStateChange:function(e){if(e.data===YT.PlayerState.ENDED){var a=s.getVideoUrl().split("&v=")[1],r=$(t).find("[data-video-src='"+a+"']").parents("[data-js-video-play-target]").next().find("[data-video-src]").attr("data-video-src");null!=r&&i(r)}}}});var i=e=>{var t=$(this.element).find("[data-video-src='"+e+"']").attr("data-video-name");$(this.element).find("[data-video-popup-name]").html(t),s.loadVideoById(e),s.playVideo()};$(this.element).on("click","[data-js-video-play-target]",e=>{var t=$(e.currentTarget).find("[data-video-src]").attr("data-video-src");i(t)}),$(this.element).on("click",".o-modal__close-btn",e=>{s.stopVideo()})})}}class p extends r{constructor(e){super(e),this.CLASS_WRAPPER="js-collapse-group",this.SELECTOR_WRAPPER="."+this.CLASS_WRAPPER,this.CLASS_PARENT="js-collapse",this.SELECTOR_PARENT="."+this.CLASS_PARENT,this.CLASS_TRIGGER="js-collapse__trigger",this.SELECTOR_TRIGGER="."+this.CLASS_TRIGGER,this.CLASS_PANEL="js-collapse__panel",this.SELECTOR_PANEL="."+this.CLASS_PANEL,this.CLASS_ACTIVE="is-active",this.SELECTOR_ACTIVE="."+this.CLASS_ACTIVE,this.init()}init(){this.wrapperElement=this.element.querySelector(this.SELECTOR_WRAPPER),this.triggerElements=this.wrapperElement.querySelectorAll(this.SELECTOR_TRIGGER),this.triggerElements.forEach(e=>e.addEventListener("click",t=>{t.preventDefault(),null!=e&&e.classList.contains(this.CLASS_TRIGGER)&&(this.parentElement=e.closest(this.SELECTOR_PARENT),this.panelElement=this.parentElement.querySelector(this.SELECTOR_PANEL),this.parentElement.classList.contains(this.CLASS_ACTIVE)?(this.parentElement.classList.remove(this.CLASS_ACTIVE),this.parentElement.setAttribute("aria-expanded",(!1).toString()),this.panelElement.setAttribute("aria-hidden",(!0).toString())):(this.wrapperElement.classList.contains("js-collapse-group--muli")||(this.activeFaqs=this.wrapperElement.querySelectorAll(this.SELECTOR_ACTIVE),this.activeFaqs.forEach(function(e){e.classList.remove("is-active"),e.setAttribute("aria-expanded",(!1).toString()),e.setAttribute("aria-hidden",(!0).toString())})),this.parentElement.setAttribute("aria-expanded",(!0).toString()),this.panelElement.setAttribute("aria-hidden",(!1).toString()),this.parentElement.classList.add(this.CLASS_ACTIVE)))}))}}class m extends r{constructor(e){super(e),this.init()}init(){this.collapse=new p(this.element)}}class g{static send(e,t,s,i){let a=new XMLHttpRequest;var r=document.querySelector("html").attributes.getNamedItem("lang").value;if(r){var n=t.split("?"),l=null!=n[1]?n[1]:"",o=new URLSearchParams(l);o.append("epslanguage",r),o.append("ts",(new Date).getTime().toString());var c=o.toString();t=n[0]+"?"+decodeURIComponent(c)}"POST"===e?(a.open(e,t,!0),a.setRequestHeader("Content-Type","application/json"),a.send(JSON.stringify(s))):(a.open(e,t,!0),a.send()),a.onreadystatechange=function(){200===this.status&&4===this.readyState&&i(this.response)}}}class f extends o{constructor(e){super(e),this.hasFetchedUserSite=!1,this.init()}init(){this.bindEvents()}bindEvents(){$(this.element).on("click","[data-js='load-more']",e=>{const t=$(e.currentTarget).data("page-number");this.GetMoreArticles(t,this.parm.categoryId)})}GetMoreArticles(e,t){$(this.element).find("[data-js='load-more']").addClass("c-btn--load");var s={pageNumber:e,categoryId:t};g.send("POST",this.parm.loadMoreUrl,s,e=>{null!==e&&($(this.element).find("[data-js='load-more']").remove(),$("[data-js='blog-article-list']").append(e))})}}class S extends o{constructor(e){super(e),this.getComments=e=>{var t={pageid:this.parm.pageId,language:this.parm.language,pageNumber:e};g.send("POST",this.parm.getCommentsUrl,t,e=>{null!==e&&$(this.element).find("[data-js='comments-result']").append(e)})},this.init()}init(){this.expandCollapse=new n(this.element),this.getComments(0),$(this.element).on("click","[data-js='load-more-comments']",e=>{var t=$(e.target).data("js-load-page");$(e.target).remove(),this.getComments(t)}),$(this.element).on("click","[data-js='submit-new-comment']",e=>{e.preventDefault();var t=$(e.target).parent("form"),s=t.find("[data-js='comment-name']").val(),i=t.find("[data-js='comment-mail']").val(),a=t.find("[data-js='comment-text']").val(),r=t.find("[data-js='edit-comment-id']").val(),n=t.find("[data-js='reply-comment-id']").val(),l={name:s,mail:i,message:a,pageid:this.parm.pageId,pageLanguage:this.parm.language,commentId:r,parentCommentId:n,blogOverviewPageId:this.parm.blogPageId};g.send("POST",this.parm.commentUrl,l,e=>{null!==e&&($(e).find("form")?$(this.element).find("[data-js='comment-form']").html(e):(t.hide(),$(this.element).find("[data-js='submit-new-comment-success']").removeClass("u-hide"),$(this.element).find("[data-js='comments-result']").prepend(e)))})}),$(this.element).on("click","[data-js='reply-new-comment']",e=>{var t=$(e.target).parents("[data-js-comment-id]"),s=t.data("js-comment-id"),i=$(this.element).find("[data-js='comment-form']");i.find("[data-js='reply-comment-id']").val(s),i.find("[data-js='reply-comment']").removeClass("u-hide"),t.css("background-color","LightGreen")}),$(this.element).on("click","[data-js='delete-comment']",e=>{var t=$(e.target).parents("[data-js-comment-id]"),s={commentId:t.data("js-comment-id")};g.send("POST",this.parm.deleteCommentUrl,s,e=>{t.remove()})}),$(this.element).on("click","[data-js='edit-comment']",e=>{var t=$(e.target).parents("[data-js-comment-id]"),s=t.data("js-comment-id"),i=$(this.element).find("[data-js='comment-form']");i.find("[data-js='edit-comment-id']").val(s),i.find("[data-js='edit-comment']").removeClass("u-hide"),t.css("background-color","LightGreen");const a=t.find("[data-js='comment-name']").html();i.find("[data-js='comment-name']").val(a);const r=t.find("[data-js='comment-text']").html();i.find("[data-js='comment-text']").val(r)})}}class v extends HTMLElement{constructor(){super()}connectedCallback(){if("lazy"==this.getAttributeValue("loading")){new IntersectionObserver(e=>
1{e.forEach(e=>{e.isIntersecting&&this._init()})}).observe(this)}else this._init()}_init(){}getAttributeValue(e,t=!1){let s=this.getAttribute(e);return void 0===s||""===s||(s||t)}getBooleanAttributeValue(e){let t=this.getAttribute(e);return void 0===t||""===t||"true"===t}attributeChangedCallback(e,t,s){if(t===s)return;const i=e.replace(/(-[a-z])/,e=>e.replace("-","").toUpperCase());this[i]=s,this.onAttributeChangedCallback&&this.onAttributeChangedCallback(i)}static registerWebComponent(e){"undefined"!=typeof window&&"customElements"in window&&window.customElements.define(e,this)}}function E(e,t){if(!e)return null;if(t&&!0===t)return{matches:!0};if(t&&t.startsWith("--")){let s=window.getComputedStyle(e).getPropertyValue(t);return window.matchMedia(s)}return t&&"matchMedia"in window?window.matchMedia(t):void 0}class b extends v{constructor(){super(),this.modulesIncluded=!1,this.swiperInstance=null,this._prefix="dlw-swiper",this.thumbsReadyEvent=`${this._prefix}.thumbs.ready`,this.mainReadyEvent=`${this._prefix}.main.ready`,this.isClassRegex=new RegExp(/^\.[a-zA-Z]{3,}$/),this.slideWrapperTag=`${this._prefix}-wrapper`,this.slideTag=`${this._prefix}-item`,this.swiperWrapperClass="swiper-wrapper",this.swiperSlideClass="swiper-slide",this.swiperPreloaderClass="swiper-lazy-preloader",this.swiperScrollbarClass="swiper-scrollbar",this.swiperBtnNextClass="swiper-button-next",this.swiperBtnPrevClass="swiper-button-prev",this.swiperPaginationClass="swiper-pagination"}_init(){this._setAttributes(),this._toggleItemsVisibility(),this.width=document.body.clientWidth,this._observeToToggleSwiper(),this.attrs.observeDestroy&&E(this,this.attrs.observeDestroy).matches?this._toggleItemsVisibility(!0):(document.addEventListener(this.thumbsReadyEvent,e=>{this.thumbsReady=!0,this._connectThumbs(e)}),document.addEventListener(this.mainReadyEvent,e=>{this.mainReady=!0,this._connectThumbs(e)}),this._buildSwiper(),window.addEventListener("load",()=>{this.swiperInstance.update()}))}disconnectedCallback(){this.resizeObserver&&this.resizeObserver.unobserve(this)}_observeToToggleSwiper(){this.attrs.observeDestroy&&(this.resizeObserver=new ResizeObserver(e=>{for(const t of e){const{width:e,height:s}=t.contentRect;if(e===this.width)return;if(E(this,this.attrs.observeDestroy).matches){if(!this.swiperInstance)return;this._destroyInstance()}else{if(null!=this.swiperInstance&&this.modulesIncluded)return;this._buildSwiper()}}}),this.resizeObserver.observe(document.body))}_destroyInstance(){this.swiperInstance.destroy(),this.swiperInstance=null,this.modulesIncluded=null,this.includeNavigation=null,this.includePagination=null,this.includeScrollbar=null}_setAttributes(){this.attrs={pagination:super.getAttributeValue("pagination").length?super.getAttributeValue("pagination"):1==super.getAttributeValue("pagination")?"bullets":null,navigationNone:super.getAttributeValue("no-navigation"),navigationOutside:super.getAttributeValue("navigation-outside"),paginationOutside:super.getAttributeValue("pagination-outside"),scrollbarOutside:super.getAttributeValue("scrollbar-outside"),loop:super.getAttributeValue("loop"),slidesPerView:super.getAttributeValue("slides-per-view"),spaceBetween:super.getAttributeValue("space-between"),centerInsufficientSlides:super.getAttributeValue("center-less-slides"),centered:super.getAttributeValue("centered"),centeredBounds:super.getAttributeValue("centered-bounds"),isVertical:super.getAttributeValue("vertical"),initialSlide:super.getAttributeValue("initial-slide"),forceWidth:super.getAttributeValue("force-width")?super.getAttributeValue("force-width"):null,scrollbar:super.getAttributeValue("scrollbar")?super.getAttributeValue("scrollbar"):null,mousewheel:super.getAttributeValue("mousewheel"),autoplay:super.getAttributeValue("autoplay"),virtualSlides:super.getAttributeValue("virtual"),breakpoints:super.getAttributeValue("breakpoints"),thumbs:super.getAttributeValue("thumbs"),thumbsSlider:super.getAttributeValue("thumbs-slider"),customParameters:super.getAttributeValue("parameters"),observeDestroy:super.getAttributeValue("destroy"),alignArrows:super.getAttributeValue("align-arrows")}}_alignArrowsToMedia(e){if(!e)return;const t=e.querySelectorAll("img , video");if(!t&&0==t.length)return;const s=e.offsetHeight-t[0].offsetHeight;this.attrs.navigationNone||(this.parentElement.style.setProperty("--swiper-navigation-top-offset",`calc(50% - ${s/2}px - (var(--swiper-nav--height, 0px) / 2) - var(--pagination-height, 0px))`),this.parentElement.style.setProperty(`--${this.swiperPreloaderClass}--top-offset`,`calc(50% - ${s/2}px - var(--pagination-height, 0px))`))}_connectThumbs(e){if(this.mainReady&&this.thumbsReady){if(!e.detail.id)return;const t=document.querySelector(`#${e.detail.id}`),s=document.querySelector(`[thumbs="${e.detail.id}"]`);s.swiper.params.thumbs.swiper=t&&t.swiper?t.swiper:t.defaultSetting,s.swiper.thumbs.init()}}_setMobileAutoplaySettings(e){let t=Object.keys(this.breakpoints[e]).filter(function(e){return e.includes("autoplay")});this.includeAutoplay||(this.includeAutoplay=!!t)}_setMobileScrollbarSettings(e){let t=Object.keys(this.breakpoints[e]).filter(function(e){return e.includes("scrollbar")});var s=this.defaultSettings.breakpoints[e].scrollbar;t.length>0&&(this.defaultSettings.breakpoints[e].scrollbar=this.scrollbarSettings,this.defaultSettings.breakpoints[e].scrollbar={...this.defaultSettings.breakpoints[e].scrollbar,enabled:s}),this.includeScrollbar||(this.includeScrollbar=!!s)}_setMobileNavigationSettings(e){let t=Object.keys(this.breakpoints[e]).filter(function(e){return e.includes("navigation")});var s=this.defaultSettings.breakpoints[e].navigation;t.length>0&&(this.defaultSettings.breakpoints[e].navigation=this.navigationSettings,this.defaultSettings.breakpoints[e].navigation={...this.defaultSettings.breakpoints[e].navigation,enabled:s}),this.includeNavigation||(this.includeNavigation=!!s)}_setMobilePaginationSettings(e){let t=Object.keys(this.breakpoints[e]).filter(function(e){return e.includes("pagination")});var s=this.defaultSettings.breakpoints[e].pagination;t.length>0&&(this.defaultSettings.breakpoints[e].pagination=this.paginationSettings,this.defaultSettings.breakpoints[e].pagination={...this.defaultSettings.breakpoints[e].pagination,enabled:s},this.includePagination||(this.includePagination=!!s))}_initEventListener(){this.attrs.thumbs&&document.dispatchEvent(new CustomEvent(this.mainReadyEvent,{detail:{id:this.attrs.thumbs},bubbles:!0})),this.attrs.thumbsSlider&&document.dispatchEvent(new CustomEvent(this.thumbsReadyEvent,{detail:{id:this.id},bubbles:!0}))}_setSettings(){this.defaultSettings={lazy:!0,a11y:!0,keyboard:{enabled:!0},watchSlideProgress:!0,on:{init:()=>{this._initEventListener()}}},this.attrs.initialSlide&&(this.defaultSettings={...this.defaultSettings,initialSlide:parseInt(super.getAttributeValue("initial-slide"))}),this.attrs.isVertical&&(this.defaultSettings={...this.defaultSettings,direction:"vertical"}),this.attrs.slidesPerView&&(this.attrs.slidesPerView.toLowerCase(),this.defaultSettings={...this.defaultSettings,slidesPerView:"auto"===this.attrs.slidesPerView.toLowerCase()?"auto":parseInt(this.attrs.slidesPerView)}),this.attrs.spaceBetween&&(this.defaultSettings={...this.defaultSettings,spaceBetween:parseInt(this.attrs.spaceBetween)}),this.attrs.centered&&(this.defaultSettings={...this.defaultSettings,centeredSlides:!0}),this.attrs.centeredBounds&&(this.defaultSettings={...this.defaultSettings,centeredSlidesB
1ounds:!0}),this.attrs.centerInsufficientSlides&&(this.defaultSettings={...this.defaultSettings,centerInsufficientSlides:!0}),this.attrs.loop&&(this.defaultSettings={...this.defaultSettings,loop:!0}),this.scrollbarSettings={el:this.scrollbarElement,draggable:!0,snapOnRelease:!0,hide:!0},this.navigationSettings={nextEl:this.nextNavElement,prevEl:this.prevNavElement},this.paginationSettings={el:this.paginationElement,type:this.attrs.pagination,clickable:!0},this.attrs.forceWidth&&(this.defaultSettings={...this.defaultSettings,width:this.attrs.forceWidth}),this.attrs.thumbs&&(this.defaultSettings={...this.defaultSettings}),this.attrs.thumbsSlider&&(this.defaultSettings={...this.defaultSettings}),this.attrs.mousewheel&&(this.defaultSettings={...this.defaultSettings,mousewheel:!0}),this.attrs.autoplay&&(this.defaultSettings={...this.defaultSettings,autoplay:{delay:6e3}}),this.attrs.scrollbar&&(this.defaultSettings={...this.defaultSettings,scrollbar:this.scrollbarSettings}),this.attrs.navigationNone?this.defaultSettings={...this.defaultSettings,navigation:!1}:this.defaultSettings={...this.defaultSettings,navigation:this.navigationSettings},this.attrs.pagination?this.defaultSettings={...this.defaultSettings,pagination:this.paginationSettings}:this.defaultSettings={...this.defaultSettings,pagination:{enabled:!1}},this.attrs.virtualSlides&&(this.defaultSettings={...this.defaultSettings,virtual:!JSON.parse(this.attrs.virtualSlides)||JSON.parse(this.attrs.virtualSlides)}),this.attrs.breakpoints&&(this.breakpoints=JSON.parse(this.attrs.breakpoints),this.defaultSettings={...this.defaultSettings,breakpoints:this.breakpoints},this.breakpointsKeys=Object.keys(this.breakpoints),this.breakpointsKeys&&this.breakpointsKeys.forEach((e,t)=>{this._setMobileAutoplaySettings(e),this._setMobileNavigationSettings(e),this._setMobileScrollbarSettings(e),this._setMobilePaginationSettings(e)})),this.attrs.customParameters&&(this.defaultSettings={...this.defaultSettings,...JSON.parse(this.attrs.customParameters)?JSON.parse(this.attrs.customParameters):{}})}_addSwiperClasses(){this.classList.add("swiper"),this.wrapper=this.querySelector(this.slideWrapperTag),this.wrapper&&this.wrapper.classList.add(this.swiperWrapperClass),this._addLoadingicon()}_addLoadingicon(){this.slides=this.querySelectorAll(this.slideTag),this.slides&&this.slides.forEach(e=>{e.classList.add(this.swiperSlideClass);const t=e.querySelector("img");"lazy"!=t?.getAttribute("loading")||e.classList.contains(this.swiperPreloaderClass)||e.insertAdjacentHTML("beforeend",`<div class="${this.swiperPreloaderClass}"></div>`)})}_getElement(e,t=!1){return"string"==typeof t&&isClassRegex.test(t)?document.querySelector(t).querySelector(e):t?this.parentElement.querySelector(e):this.querySelector(e)}_checkIfElementExist(e,t=!1){return!!this._getElement(e,t)}_getTextDirection(){const e=document.querySelector("html");if(!e)return;return new Intl.Locale(e.lang||"en").getTextInfo().direction}_toggleItemsVisibility(e=!1){this.querySelectorAll(this.slideTag).forEach((t,s)=>{0!=s&&(t.style.display=e?"":"none")})}async _includeModules(){const{Keyboard:e,A11y:t}=await s.e(141).then(s.bind(s,141));if(this.modules=[e,t],this.attrs.mousewheel){const{Mousewheel:e}=await s.e(141).then(s.bind(s,141));this.modules.push(e)}if(this.attrs.thumbs){const{Thumbs:e}=await s.e(141).then(s.bind(s,141));await Promise.all([s.e(78),s.e(311)]).then(s.bind(s,311)),this.modules.push(e)}if(this.attrs.autoplay||this.includeAutoplay){const{Autoplay:e}=await s.e(141).then(s.bind(s,141));this.modules.push(e)}if(this.attrs.scrollbar||this.includeScrollbar){const e=`<div class="${this.swiperScrollbarClass} ${this.swiperScrollbarClass}-drag"></div>`;if(!this._checkIfElementExist(`.${this.swiperScrollbarClass}`,this.attrs.scrollbarOutside))if("string"==typeof this.attrs.scrollbarOutside&&isClassRegex.test(this.attrs.scrollbarOutside)){document.querySelector(this.attrs.scrollbarOutside).insertAdjacentHTML("beforeend",navigationHTML)}else{const t=this.attrs.scrollbarOutside?"afterend":"beforeend";this.insertAdjacentHTML(t,e)}this.scrollbarElement=this._getElement(`.${this.swiperScrollbarClass}`,this.attrs.scrollbarOutside);const{Scrollbar:t}=await s.e(141).then(s.bind(s,141));await s.e(84).then(s.bind(s,84)),this.modules.push(t)}if(!this.attrs.navigationNone||this.includeNavigation){const e=`<div class="${this.swiperBtnNextClass}"></div><div class="${this.swiperBtnPrevClass}"></div>`;if(!this._checkIfElementExist(`.${this.swiperBtnNextClass}`,this.attrs.navigationOutside))if("string"==typeof this.attrs.navigationOutside&&isClassRegex.test(this.attrs.navigationOutside)){document.querySelector(this.attrs.navigationOutside).insertAdjacentHTML("beforeend",e)}else{const t=this.attrs.navigationOutside?"afterend":"beforeend";this.insertAdjacentHTML(t,e)}this.nextNavElement=this._getElement(`.${this.swiperBtnNextClass}`,this.attrs.navigationOutside),this.prevNavElement=this._getElement(`.${this.swiperBtnPrevClass}`,this.attrs.navigationOutside);const{Navigation:t}=await s.e(141).then(s.bind(s,141));await s.e(746).then(s.bind(s,746)),this.modules.push(t)}if(this.attrs.pagination||this.includePagination){const e=`<div class="${this.swiperPaginationClass}"></div>`;if(!this._checkIfElementExist(`.${this.swiperPaginationClass}`,this.attrs.paginationOutside))if("string"==typeof this.attrs.paginationOutside&&isClassRegex.test(this.attrs.paginationOutside)){document.querySelector(this.attrs.paginationOutside).insertAdjacentHTML("beforeend",e)}else{const t=this.attrs.paginationOutside?"afterend":"beforeend";this.insertAdjacentHTML(t,e)}this.paginationElement=this._getElement(`.${this.swiperPaginationClass}`,this.attrs.paginationOutside);const{Pagination:t}=await s.e(141).then(s.bind(s,141));await s.e(748).then(s.bind(s,748)),this.modules.push(t)}if(this.attrs.virtualSlides){const{Virtual:e}=await s.e(141).then(s.bind(s,141));await s.e(563).then(s.bind(s,563)),this.modules.push(e)}this.modulesIncluded=!0}
1async _buildSwiper(){if(!this.swiperInstance||!this.modulesIncluded){this._addSwiperClasses();var e=await s.e(979).then(s.bind(s,483));if(await this._includeModules(),await s.e(830).then(s.bind(s,830)),await s.e(884).then(s.bind(s,884)),await Promise.all([s.e(346),s.e(67)]).then(s.bind(s,448)),await Promise.all([s.e(93),s.e(706)]).then(s.bind(s,706)),this._setSettings(),this._toggleItemsVisibility(!0),this.swiperInstance=new e.default(this,{...this.defaultSettings,modules:this.modules}),this.swiperInstance.changeLanguageDirection(this._getTextDirection),this.attrs.alignArrows){if(this._alignArrowsToMedia(this.slides[this.swiperInstance.activeIndex]),1!=this.defaultSettings.autoHeight)return;this.swiperInstance.on("slideChange",e=>{this._alignArrowsToMedia(e.slides[e.activeIndex])})}}}}b.registerWebComponent("dlw-swiper");class C extends b{constructor(){super()}_setAttributes(){super._setAttributes(),this.attrs.breakpoints='{\n "300":{"slidesPerView":2},\n "740":{"slidesPerView":4},\n "1024":{"slidesPerView":5}\n }'}}C.registerWebComponent("ntf-author-carousel");class y extends o{constructor(e){super(e),this.criteria=new Map,this.currentPage=1,this.init()}init(){this.search(),$("[data-js-criteria]",this.element).on("change",e=>{var t=$(e.target).attr("data-js-criteria"),s=$(e.target).val();this.criteria.set(t,s),this.currentPage=1,this.search()}),$("[data-js-load-more]",this.element).on("click",e=>{this.currentPage+=1,this.search(!0)})}search(e=!1){var t={blockId:this.parm.blockId,blockRoot:this.parm.blockRoot,page:this.currentPage,criteriaValues:this.GetSelectedCriteria()};g.send("POST",this.parm.searchUrl,t,t=>{if(null!==t){var s=$(t);if(e){var i=s.find("[data-js-result-items]");$("[data-js-result-items]",this.element).append(i.html())}else $("[data-js-results]",this.element).html(t);var a=+s.find("[data-js-total-found]").attr("data-js-total-found");this.currentPage*this.parm.pageSize>=a?$("[data-js-load-more]",this.element).addClass("u-hide"):$("[data-js-load-more]",this.element).removeClass("u-hide")}})}GetSelectedCriteria(){var e=Array();return this.criteria.forEach((t,s)=>{"-1"!=t&&e.push(t)}),e}}class A extends o{constructor(e){super(e),this.checkedCategories=[],this.init()}init(){this.registerEvents(),this.fetchData()}registerEvents(){var e=this;$("[data-view]",this.element).on("click",e=>{$("[data-js-crop-results]",this.element).removeClass("grid-view list-view");var t=$(e.currentTarget).data("view");$("[data-js-crop-results]",this.element).addClass(t)}),$(this.element).on("click","[data-js-load-more-button]",t=>{var s=$(t.currentTarget).data("js-page");e.fetchData(s)}),$("[data-js-crop-search]",this.element).keyup(function(t){if(13==t.which){e.fetchData(0)}}),$("[data-js-crop-category]",this.element).click(function(t){e.fetchData(0)})}fetchData(e=1){var t=this.getQueryParameters(e);g.send("POST",this.parm.searchUrl,t,t=>{if(null!==t){var s=$(this.element).find("[data-js-load-more-crops]");s.empty();var i=$(this.element).find("[data-js-crop-results]");0===e&&i.empty(),i.append(t);var a=i.find("[data-js-load-more]");s.append(a)}})}getQueryParameters(e){return this.checkedCategories=[],$("[data-js-crop-category]",this.element).each((e,t)=>{t.checked&&this.checkedCategories.push($(t).attr("data-js-crop-category"))}),{keyword:$("[data-js-crop-search]",this.element).val(),categories:this.checkedCategories,blockId:this.parm.blockId,page:e}}}class _ extends o{constructor(e){super(e),this.hasFetchedContent=!1,this.init()}init(){this.modal=new d(this.element),$("[data-popup-id='country-language']").on("click",()=>{if(!this.hasFetchedContent){this.hasFetchedContent=!0;g.send("POST",this.parm.getSitesUrl,{},e=>{null!==e&&$("#country-language").find(".o-modal__body").html(e)})}})}}class w extends r{constructor(e){super(e),this.init()}init(){$(this.element).on("click",()=>{$("[data-popup-id='country-language']").click()})}}class L{constructor(e){this.apiKey=e,this.init()}init(){if(window.onGoogleMapsAPIReady=()=>{var e=document.createEvent("CustomEvent");e.initCustomEvent("GoogleMapsAPIReady",!1,!1,null),document.dispatchEvent(e)}
1,this.hasScriptStartingWith("https://maps.googleapis.com/maps/api/js"))window.onGoogleMapsAPIReady();else{var e=document.createElement("script");e.src="https://cdn.jsdelivr.net/gh/googlemaps/v3-utility-library@07f15d84/markerclustererplus/src/markerclusterer.js";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t);var s=document.createElement("script");s.src=`https://maps.googleapis.com/maps/api/js?v=3&key=${this.apiKey}&callback=onGoogleMapsAPIReady&libraries=places`,t.parentNode.insertBefore(s,t)}}hasScriptStartingWith(e){const t=document.getElementsByTagName("script[src]");for(let s=t.length;s--;)if(t[s].attributes.src.includes(e))return!0;return!1}}class T extends o{constructor(e){super(e),this.markers=new Array,this.IMG_PATH="/netafim/corporate/assets/icons/svg-symbols.svg",this.isInit=!0,this.expandedDealerGroupIds=new Array,this.dataLayer=window.dataLayer,this.query={blockId:this.parm.blockId},this.init()}init(){var e=new IntersectionObserver(t=>{!0===t[0].isIntersecting&&(this.initComponent(),e.unobserve(t[0].target))},{threshold:[0]});e.observe(document.querySelector("[data-dealer-locator]"))}initComponent(){this.googleMapsScriptInitialization=new L(this.parm.mapsApiKey),document.addEventListener("GoogleMapsAPIReady",e=>{this.createGoogleMaps(),this.loadDealers(),this.registerEvents()})}createGoogleMaps(){var e={center:{lat:this.parm.initialLat,lng:this.parm.initialLng},clickableIcons:!0,keyboardShortcuts:!1,fullscreenControlOptions:!1,zoom:13,minZoom:3,maxZoom:13,streetViewControl:!1,disableDefaultUI:!0,mapTypeControl:!1,scaleControl:!1,zoomControl:!0,draggable:!0,scrollwheel:!1};this.map=new google.maps.Map(document.getElementById("ntfm-dealer-map"),e),this.markerClustrer=new Mar
1kerClusterer(this.map,this.markers,{imagePath:"/images/dealerLocator/m"}),this.map.addListener("dragend",()=>this.onDragEnd(this.map))}onDragEnd(e){var t=this.getWrappedMapCenter();this.query.latitude=t.lat(),this.query.longitude=t.lng(),this.loadDealers(!1)}getWrappedMapCenter(){var e=this.map.getCenter();return new google.maps.LatLng(e.lat(),e.lng())}loadDealers(e=!0){var t=this.query;t.searchTextName=$("#search-dealer-name",this.element).val(),t.searchText=$("#search-dealer",this.element).val(),t.radiusSearch=$("#search-dealer-radius").length?+$("#search-dealer-radius").val():0,this.dataLayer&&this.dataLayer.push({event:"dealerSearch",dealerName:t.searchTextName,dealerLocation:t.searchText}),g.send("POST",this.parm.searchDealersUrl,t,t=>{var s=$(t).find("script"),i=JSON.parse($(s)[0].innerHTML);$("[data-js='dealer-tiles']").html(t),new p(this.element),this.ApplyCollapseState(this.element),this.addDealers(i,e)})}addDealers(e,t=!0){this.removeMarkers();for(var s=0,i=e.length;s<i;s++)for(var a=e[s],r=0;r<a.dealers.length;r++){var n=a.dealers[r];this.addSingleDealer(n,a)}if(this.markerClustrer.addMarkers(this.markers),t){var l=new google.maps.LatLngBounds;for(s=0;s<this.markers.length;s++)l.extend(this.markers[s].getPosition());if(this.map.fitBounds(l),this.isInit){var o=new google.maps.LatLng(parseFloat(this.parm.initialLat.toString()),parseFloat(this.parm.initialLng.toString()));this.map.setCenter(o),this.isInit=!1}}}addSingleDealer(e,t){var s=e.latitude,i=e.longitude,a={position:new google.maps.LatLng(parseFloat(s),parseFloat(i)),map:this.map,icon:t.pin,title:e.name},r=new google.maps.Marker(a);this.markers.push(r);let n=new google.maps.InfoWindow({maxWidth:500}),l=this.infoBox(t.type,e.logo,e.name,e.email,e.address,e.tel,t.color);google.maps.event.addListener(r,"click",((e,t,s,i,a)=>(s&&s.close(),()=>{s.setContent(t),null!=this.prevInfoWindow&&this.prevInfoWindow.close(),s.open(this.map,e),this.prevInfoWindow=s,google.maps.event.addListener(this.map,"click",()=>{s&&s.close()}),a&&google.maps.event.addListener(s,"domready",()=>{document.querySelectorAll(".m-info-window__tel").forEach(e=>e.addEventListener("click",function(){a.push({event:"dealerClickTel",dealerName:i.name,dealerType:i.category})}))})}))(r,l,n,e,this.dataLayer))}removeMarkers(){for(let e=0;e<this.markers.length;e++)this.markers[e].setMap(null);this.markers=[],this.markerClustrer.clearMarkers()}infoBox(e,t,s,i,a,r,n){var l="<div class='m-info-window'>{type}<h3>{name}</h3><div class='m-info-window__body'><div class='m-info-window__column'><div class='c-rich-text'>{address}{tel}</div></div></div></div></div>";return l=this.hasContent(e)?l.replace("{type}","<div class='m-info-window__category u-bg-color-primary'>"+e+"</div>"):l.replace("{type}",""),l=this.hasContent(s)?l.replace("{name}",s):l.replace("{name}",""),l=this.hasContent(a)?l.replace("{address}","<p>"+a+"</p>"):l.replace("{address}",""),l=this.hasContent(r)?l.replace("{tel}",'<p><span class="m-info-window__label">tel </span><a href="tel:'+r+'" class="m-info-window__tel">'+r+"</a></p>"):l.replace("{tel}",""),l=this.hasContent(i)?l.replace("{mail}","<div class='m-info-window__link'><svg class='a-svg' width='15' height='17' focusable='false'><use xlink:href='"+this.IMG_PATH+"#globe'></use></svg> <a href='mailto:"+i+"'>"+i+"</a></div>"):l.replace("{mail}","")}hasContent(e){return""!=e&&null!=e&&null!=e}registerEvents(){var e=document.getElementById("search-dealer"),t=new google.maps.places.SearchBox(e);t.addListener("places_changed",()=>{var e=t.getPlaces();e&&e.length>0?(this.query.latitude=e[0].geometry.location.lat(),this.query.longitude=e[0].geometry.location.lng()):this.query.latitude=this.query.longitude=null}),$("[data-js-current-location]",this.element).on("click",()=>{"geolocation"in navigator&&navigator.geolocation.getCurrentPosition(t=>{this.query.latitude=t.coords.latitude,this.query.longitude=t.coords.longitude;var s=new google.maps.Geocoder,i=new google.maps.LatLng(t.coords.latitude,t.coords.longitude);s.geocode({latLng:i},function(t,s){if(s==google.maps.GeocoderStatus.OK&&t[1]){var i=t[0].formatted_address;$(e).val(i)}})})}),$("#search-dealer",this.element).on("keyup",e=>{13===e.keyCode&&this.selectFirstLocationWhenNoLocationIsSelected(()=>this.loadDealers())}),$("#search-dealer-name",this.element).on("keyup",e=>{13===e.keyCode&&this.loadDealers()}),$("[data-js-search-submit]",this.element).on("click",e=>{e.preventDefault(),this.selectFirstLocationWhenNoLocationIsSelected(()=>this.loadDealers())}),$(".js-collapse__trigger",this.element).on("click",e=>{this.SaveCollapseState(e.originalEvent)}),document.querySelector("[data-js='dealer-tiles']").addEventListener("click",e=>{const t=e.target.closest(".c-dealer-locator__card");if(t){var s=+t.getAttribute("data-dealer-lat").replace(",","."),i=+t.getAttribute("data-dealer-lng").replace(",","."),a=new google.maps.LatLng(s,i);this.map.setCenter(a);var r=new google.maps.LatLngBounds(a);if(this.map.fitBounds(r),this.dataLayer){var n=e.target.getAttribute("data-event");n&&this.dataLayer.push({event:n,dealerName:t.querySelector(".o-card__title").innerText,dealerType:t.getAttribute("data-dealer-cat")})}}})}SaveCollapseState(e){var t=e.target.closest(".c-collapse--dealer-locator");if(t){var s=t.classList.contains("is-active"),i=t.getAttribute("data-dealer-group-id");s?this.expandedDealerGroupIds.push(i):this.expandedDealerGroupIds=this.expandedDealerGroupIds.filter(e=>e!=i)}}ApplyCollapseState(e){for(var t in this.expandedDealerGroupIds){return e.querySelector('[data-dealer-group-id="'+this.expandedDealerGroupIds[t]+'"]').classList.add("is-active"),e}}selectFirstLocationWhenNoLocationIsSelected(e){let t=this;if(null==t.query.latitude&&null==t.query.longitude){var s=$(".pac-container .pac-item:first").text();(new google.maps.Geocoder).geocode({address:s},(s,i)=>{if(i==google.maps.GeocoderStatus.OK){var a=s[0].geometry.location.lat(),r=s[0].geometry.location.lng(),n=s[0].address_components[0].long_name;t.query.latitude=a,t.query.longitude=r,t.query.searchText=n}e()})}else e()}}class R{constructor(e){this.apiKey=e,this.init()}init(){if(window.onBaiduMapsAPIReady=()=>{var e=document.createEvent("CustomEvent");e.initCustomEvent("BaiduMapsAPIReady",!1,!1,null),document.dispatchEvent(e)},this.hasScriptStartingWith("https://api.map.baidu.com/api"))window.onBaiduMapsAPIReady();else{var e=document.createElement("script");e.src=`https://api.map.baidu.com/api?v=2.0&ak=${this.apiKey}&callback=onBaiduMapsAPIReady`;var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t);var s=document.createElement("script");s.src="/Scripts/Baidu/map.baidu.infobox.js";var i=document.getElementsByTagName("script")[1];i.parentNode.insertBefore(s,i)}}hasScriptStartingWith(e){const t=document.getElementsByTagName("script[src]");for(let s=t.length;s--;)if(t[s].attributes.src.includes(e))return!0;return!1}}class P extends o{constructor(e,t){super(e),this.defaultLat=10,this.defaultLng=10,this.ICON_BASE_URL_BAIDU_MAPS="/netafim/corporate/assets/icons/",this.isInit=!0,this.IMG_PATH="/netafim/corporate/assets/icons/svg-symbols.svg",this.query={blockId:this.parm.blockId},this.init()}init(){var e=new IntersectionObserver(t=>{!0===t[0].isIntersecting&&(this.initComponent(),e.unobserve(t[0].target))},{threshold:[0]});e.observe(document.querySelector("[data-dealer-locator]"))}initComponent(){this.baiduMapsScriptInitialization=new R(this.parm.mapsApiKey),document.addEventListener("BaiduMapsAPIReady",e=>{this.createBaiduMaps(),this.loadDealers(),this.registerEvents()})}createBaiduMaps(){this.map=new BMap.Map("ntfm-dealer-map"),this.map.centerAndZoom(new BMap.Point(this.defaultLat,this.defaultLng),6),this.map.disable3DBuilding(),this.map.setMapStyle({features:[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#dde6e8"},{visibility:"on"}]}],style:""}),this.map.enableKeyboard(),this.map.addControl(new BMap.NavigationControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,type:BMAP_NAVIGATION_CONTROL_ZOOM}))}loadDealers(){var e=this.query;e.searchTextName=$("#search-dealer-name",this.element).val(),e.searchText=$("#search-dealer",this.element).val(),e.radiusSearch=$("#search-dealer-radius").length?+$("#search-dealer-radius").val():0,g.send("POST",this.parm.searchDealersUrl,e,e=>{var t=$(e).find("script"),s=JSON.parse($(t)[0].innerHTML);$("[data-js='dealer-tiles']").html(e),new p(this.element),this.addDealers(s)})}addDealers(e){this.map.clearOverlays();for(var t=Array(),s=0,i=e.length;s<i;s++)for(var a=e[s],r=0;r<a.dealers.length;r++){var n=a.dealers[r];t.push(this.addSingleDealer(n,a))}
1this.map.setViewport(t),this.populateViewsBaiduMaps(e)}addSingleDealer(e,t){var s=new BMap.Point(parseFloat(e.lng),parseFloat(e.lat)+22e-5);let i,a;i=t.category_pin?new BMap.Icon(t.category_pin,new BMap.Size(28,35)):new BMap.Icon(this.ICON_BASE_URL_BAIDU_MAPS+"icon-pin.svg",new BMap.Size(28,35)),a=new BMap.Marker(s,{icon:i}),this.map.addOverlay(a),a.setAnimation(BMAP_ANIMATION_DROP);new google.maps.InfoWindow({maxWidth:500});let r=this.infoBox(t.type,e.logo,e.name,e.email,e.address,e.tel,t.color);return this.addBaiduMarkerPopUpHandler(r,a,this.map),s}addBaiduMarkerPopUpHandler(e,t,s){t.addEventListener("click",function(t){var i=t.target,a=new BMap.Point(i.getPosition().lng,i.getPosition().lat),r=new BMap.InfoWindow(e);s.openInfoWindow(r,a)})}infoBox(e,t,s,i,a,r,n){var l="<div class='m-info-window'>{type}<h3>{name}</h3><div class='m-info-window__body'><div class='m-info-window__column'><div class='c-rich-text'>{address}{tel}</div></div></div></div></div>";return l=this.hasContent(e)?l.replace("{type}","<div class='m-info-window__category u-bg-color-primary'>"+e+"</div>"):l.replace("{type}",""),l=this.hasContent(s)?l.replace("{name}",s):l.replace("{name}",""),l=this.hasContent(a)?l.replace("{address}","<p>"+a+"</p>"):l.replace("{address}",""),l=this.hasContent(r)?l.replace("{tel}","<p><span class='m-info-window__label'>tel</span> "+r+"</p>"):l.replace("{tel}",""),l=this.hasContent(i)?l.replace("{mail}","<div class='m-info-window__link'><svg class='a-svg' width='15' height='17' focusable='false'><use xlink:href='"+this.IMG_PATH+"#globe'></use></svg> <a href='mailto:"+i+"'>"+i+"</a></div>"):l.replace("{mail}","")}hasContent(e){return""!=e&&null!=e&&null!=e}populateViewsBaiduMaps(e){$(".dealer-accordion").html(this.generateAccordionDataBaiduMaps(e)),$(".dealer-accordion .accordion-container .accordion-item .accordion-item-title").on("click",function(){$(this).parent().hasClass("accordion-active")?$(this).parent().removeClass("accordion-active"):($(this).parents(".accordion-container").find(".accordion-active").removeClass("accordion-active"),$(this).parent().addClass("accordion-active"))}),""!==$("#search-dealer",this.element).val()&&1===e.length&&($(".dealer-accordion .accordion-item").first().hasClass("accordion-active")||$(".dealer-accordion .accordion-item").first().addClass("accordion-active")),$(".accordion-item-content-dealer").each(function(){for(var e=$(this).find(".dealer-wrapper").length,t=$(this).find(".dealer-wrapper"),s=0;s<e;s+=3)t.slice(s,s+3).wrapAll('<div class="dealer-row"></div>')})}generateAccordionDataBaiduMaps(e){var t="",s=0;if(t+='<div class="container"><div class="row"><div class="col-xs-12"><div class="component-inner"><div class="accordion-container has-shadow-desktop"><div class="accordion-inner"><ul>',e.length>0)for(var i=0;i<e.length;i++){t+='<li class="accordion-item '+(!0===e[i].category_is_expanded?"accordion-active":"")+'"><div class="accordion-item-title"><p><img alt="'+e[i].category_name+'" src="'+e[i].category_icon+'">'+e[i].category_name+" ("+e[i].dealers.length+')</p></div><div class="accordion-item-content"><div class="accordion-item-content-dealer">';for(var a=0;a<e[i].dealers.length;a++)t+=this.generateDealerItemBaiduMaps(e[i].category_type,e[i].dealers[a].logo,e[i].dealers[a].name,e[i].dealers[a].email,e[i].dealers[a].address,e[i].dealers[a].tel,e[i].category_color,e[i].dealers[a].website,e[i].dealers[a].direction),s++;t+="</div></div></li>"}else t+="";return t+="</ul></div></div></div></div></div></div>",this.generateSummaryBaiduMaps(s,this.query.searchText,this.query.radiusSearch),t}generateSummaryBaiduMaps(e,t,s){if(!this.isInit){var i="";i=(i=(i=s>0?(i=(i=this.parm.labelResultsRadius).replace("{radius}",`<b>${s}</b>`)).replace("{distanceUnit}",`<b>${this.parm.labelDistanceUnit}</b>`):this.parm.labelResults).replace("{numberOfResults}",`<b>${e}</b>`)).replace("{searchTerm}",`<b>${t}</b>`),$('[data-js="search-results-title"]',this.element).html(i)}this.isInit=!1}generateDealerItemBaiduMaps(e,t,s,i,a,r,n,l,o){var c="";return c='<div class="dealer-wrapper '+n+'" data-dealer-type="'+e+'">',this.hasContent(t)&&(c+='<img class="dealer-logo" alt= "'+s+'" src= "'+t+'" >'),this.hasContent(s)&&(c+="<h5>"+s+" </h5>"),this.hasContent(a)&&(c+='<div class="dealer-address"><p>'+a+"</p></div>"),this.hasContent(r)&&(c+='<div class="dealer-phone"><a href="tel:'+r+'">'+r+"</a></div>"),c+='<div class="dealer-accessibility">
1',c+="</div></div>"}registerEvents(){let e=this;var t=document.getElementById("search-dealer");$(".use-current-location a",e.element).on("click",function(){"geolocation"in navigator&&navigator.geolocation.getCurrentPosition(function(t){e.query.latitude=t.coords.latitude,e.query.longitude=t.coords.longitude,(new BMap.Geocoder).getLocation(new BMap.Point(t.coords.latitude,t.coords.longitude),function(e){var t=e?e.address:"";e&&$("#search-dealer").val(t)})})}),$(".toggle-dealer-map",e.element).on("click",function(){$(this).toggleClass("map-on"),$(this).hasClass("map-on")?$(this).find("span").text($(this).data("text-hide")):$(this).find("span").text($(this).data("text-show")),$(".map-wrapper").toggleClass("hide-map")}),new BMap.Autocomplete({input:"search-dealer"}).onconfirm=t=>{let s=t.item.value.province+t.item.value.city+t.item.value.district+t.item.value.street+t.item.value.business;e.setPlace(e,s)},$("#btnSearchDealer",e.element).on("click",function(){$(this).addClass("searching"),e.loadDealers()}),$(t).on("change",function(t){e.query.latitude=e.query.longitude=null})}setPlace(e,t){var s;(s=new BMap.LocalSearch(e.map,{onSearchComplete:function(){let t=s.getResults().getPoi(0).point;e.query.latitude=t.lat,e.query.longitude=t.lng}})).search(t)}}class I extends r{constructor(e){super(e),this.init()}init(){this.expandCollapse=new n(this.element)}}class k extends r{constructor(e){super(e),this.init()}init(){this.modal=new d(this.element)}}class O extends r{constructor(e){super(e),this.dataLayer=window.dataLayer,this.init()}init(){this.collapse=new n(this.element),this.overlay=new k(this.element),void 0!==this.dataLayer&&$("[data-gtm-btn-type]",this.element).on("click",e=>{var t=$(e.delegateTarget).attr("data-gtm-btn-type");this.dataLayer.push({event:"floatingButtonClick",buttonType:t})})}}class j{constructor(e,t,s,i){this.mutationCallback=e=>{for(let t of e)if("attributes"===t.type&&"class"===t.attributeName){let e=t.target.classList.contains(this.classToWatch);this.lastClassState!==e&&(this.lastClassState=e,e?this.classAddedCallback(t.target):this.classRemovedCallback(t.target))}},this.targetNode=e,this.classToWatch=t,this.classAddedCallback=s,this.classRemovedCallback=i,this.observer=null,this.lastClassState=e.classList.contains(this.classToWatch),this.init()}init(){this.observer=new MutationObserver(this.mutationCallback),this.observe()}observe(){this.observer.observe(this.targetNode,{attributes:!0})}disconnect(){this.observer.disconnect()}}class x extends r{constructor(e){super(e),this.CLASS_FIELDSET="js-form-fieldset",this.SELECTOR_FIELDSET="."+this.CLASS_FIELDSET,this.CLASS_TRIGGER="js-form-steps-btn",this.SELECTOR_TRIGGER="."+this.CLASS_TRIGGER,this.CLASS_ACTIVE="is-active",this.SELECTOR_ACTIVE="."+this.CLASS_ACTIVE,this.init()}init(){this.triggerElement=this.element.querySelectorAll(this.SELECTOR_TRIGGER),this.triggerElement&&this.triggerElement.forEach(e=>e.addEventListener("click",t=>{if(t.preventDefault(),null==e)return;if(!e.classList.contains(this.CLASS_TRIGGER))return;this.element.querySelector(this.SELECTOR_FIELDSET+this.SELECTOR_ACTIVE).classList.remove(this.CLASS_ACTIVE);let s=e.getAttribute("data-target"),i=this.element.querySelector(s);i.classList.add(this.CLASS_ACTIVE),i.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})}))}}s(298);class M extends r{constructor(e){super(e),this.options={content:this.element.dataset.tooltipContent,allowHTML:!0,arrow:!1,hideOnClick:!0,interactive:!0,maxWidth:350,offset:[0,3],placement:"bottom-start",role:"tooltip",touch:!0,theme:"light"},this.init()}
1async init(){if(null!=this.element&&null!=this.options.content)try{const e=await s.e(753).then(s.bind(s,753));(0,e.default)(this.element,this.options)}catch(e){}}}class V{static createCookie(e,t,s){if(s){var i=new Date;i.setTime(i.getTime()+24*s*60*60*1e3);var a="; expires="+i.toUTCString()}else a="";document.cookie=e+"="+t+a+"; path=/; SameSite=Lax"}static readCookie(e){for(var t=e+"=",s=document.cookie.split(";"),i=0;i<s.length;i++){for(var a=s[i];" "==a.charAt(0);)a=a.substring(1,a.length);if(0==a.indexOf(t))return a.substring(t.length,a.length)}return null}}class G{static prefillForm(e){const t=G.readCookie();if(!t)return;e.querySelectorAll("[data-name]:not([type='hidden']):not([type='submit']):not([type='checkbox']):not([type='radio'])").forEach(e=>{const s=(e.getAttribute("data-name")??"").trim().toLowerCase().replace("-","");if(!s)return;const i=t[s];if(i&&!e.getAttribute("data-prefill-source"))if("SELECT"===e.tagName)G.prefillSelect(e,i);else{const t=e;if(""!==t.value.trim())return;t.value=i}})}static prefillSelect(e,t){for(let s=0;s<e.options.length;s++)if(e.options[s].value===t)return e.selectedIndex=s,void e.dispatchEvent(new Event("change",{bubbles:!0}))}static readCookie(){const e=V.readCookie("ntfm_visitor_data");if(!e)return null;try{return JSON.parse(decodeURIComponent(e))}catch{return null}}}class B extends o{constructor(e){super(e),this.init()}init(){this.formSteps=new x(this.element);var e=this.element.querySelector("form"),t=window.$$epiforms,s=window.dataLayer;e.classList.add("m-form"),this.parm.formClass&&e.classList.add(this.parm.formClass);var i=e.parentElement;i?.classList?.add("c-epi-form"),e.querySelectorAll(".Form__Element__Caption").forEach(e=>e.classList.add("m-form-field__label")),e.querySelectorAll(".FormTextbox").forEach(e=>e.classList.add("m-form-field","m-form-field--text")),e.querySelectorAll(".FormTextbox--Textarea").forEach(e=>e.classList.add("m-form-field","m-form-field--textarea")),e.querySelectorAll(".FormSelection").forEach(e=>e.classList.add("m-form-field","m-form-field--select")),e.querySelectorAll("select").forEach(e=>e.classList.add("m-form-field__select")),e.querySelectorAll(".FormRange").forEach(e=>e.classList.add("m-form-field","m-form-field--range")),e.querySelectorAll(".FormFileUpload").forEach(e=>e.classList.add("m-form-field","m-form-field--file")),e.querySelectorAll(".choice-checkbox").forEach(e=>e.classList.add("m-form-field","m-form-field--checkbox")),e.querySelectorAll(".choice-radio").forEach(e=>e.classList.add("m-form-field","m-form-field--radio")),e.querySelectorAll(".FormChoice__Input--Radio").forEach(e=>e.classList.add("m-form-field__input"));var a=e.querySelectorAll("legend.Form__Element__Caption");a.forEach(e=>e.classList.remove("m-form-field__label")),a.forEach(e=>e.classList.add("Form__Element__Caption","m-form-field__caption")),e.querySelectorAll(".FormSubmitButton").forEach(e=>e.classList.add("c-btn","c-btn--primary","m-form__button")),e.querySelectorAll(".Form__NavigationBar").forEach(e=>e.classList.add("m-nav-flow"));var r=e.querySelectorAll(".Form__NavigationBar__Action.btnPrev"),n=e.querySelectorAll(".Form__NavigationBar__Action.btnNext");this.parm.isNewForms?n.forEach(e=>e.classList.add("c-btn","c-btn--primary","c-btn--next")):n.forEach(e=>e.classList.add("c-btn","c-btn--secondary","c-btn--next")),r.forEach(e=>e.classList.add("c-btn","c-btn--secondary","c-btn--back")),void 0!==t&&t(document).ready(()=>{this.element.querySelectorAll(".EPiServerForms .result").forEach(e=>e.style.display="none"),G.prefillForm(this.element),t(".EPiServerForms").on("formsSubmitted",(e,t,s)=>{if("formsSubmitted"===e.type&&e.isFinalizedSubmission){document.querySelector(".EPiServerForms .Form__Status").scrollIntoView(),l();var i=new CustomEvent("callbackFormSubmit",{detail:this.parm.callbackBlockId});document.dispatchEvent(i)}})});var l=()=>{void 0!==s&&"None"!==this.parm.gtmFormCategory&&s.push({event:"formSubmission",formCategory:this.parm.gtmFormCategory})};this.element.querySelectorAll(".js-form-steps").length>=1&&this.element.querySelectorAll("input").forEach(e=>{e.addEventListener("change",t=>{var s=e.closest("[data-f-stepindex]"),i=parseInt(s.getAttribute("data-f-stepindex"));i>1&&this.element.querySelector(`[data-f-stepindex='${i-1}']`).querySelector("[data-f-navigation-next]").click()})});function o(e){e.style.display="none"}function c(e){e.style.display="grid"}this.element.querySelectorAll(".Form__Element:not(.FormStep)").forEach(e
1=>{new j(e,"hide",o,c)});this.element.querySelectorAll(".Form__Element.hide:not(.FormStep)").forEach(e=>e.style.display="none");this.element.querySelectorAll("input[title],select[title],textarea[title],div[title]").forEach(e=>{e.dataset.tooltipContent=e.getAttribute("title"),e.removeAttribute("title"),new M(e)})}}class N extends r{constructor(e){super(e),this.init()}init(){$(".EPiServerForms .FormSecondarySelection").each(function(){var e=$(this).find("select"),t=$("#"+e.data("dependent-on"));e.val(""),t.change(function(){e.is(":disabled")&&e.prop("disabled",!1);var t=$(this).val();e.find("option").hide(),e.find('option[data-relevant-to="'+t+'"]').show(),e.val("")})})}}class D extends o{constructor(e){super(e),this.performDownload=e=>{!e.startsWith("http://")&&e.startsWith("https://")&&(e=window.location.origin+e),window.open(e,"_blank")},this.init()}init(){new d(this.element);this.parm.isDirectDownload||this.element.querySelectorAll(`[data-popup-id='gated-download-${this.parm.blockId}']`).forEach(e=>{var t=e.getAttribute("data-document-url");e.addEventListener("click",()=>{"true"==this.getCookie(`gated_download_${this.parm.blockId}`)&&(this.performDownload(t),this.closePopUp())}),document.addEventListener("callbackFormSubmit",e=>{e.detail?.toString()===this.parm.blockId.toString()&&(this.performDownload(t),this.persistCookie(),this.closePopUp())})})}persistCookie(){this.setCookie(`gated_download_${this.parm.blockId}`,"true",365)}closePopUp(){var e=this.element.querySelector(`#gated-download-${this.parm.blockId}`);e&&(e.remove(),document.querySelector("body").classList.remove("no-scroll"))}setCookie(e,t,s){var i="";if(s){var a=new Date;a.setTime(a.getTime()+24*s*60*60*1e3),i="; expires="+a.toUTCString()}document.cookie=e+"="+(t||"")+i+"; path=/"}getCookie(e){for(var t=e+"=",s=document.cookie.split(";"),i=0;i<s.length;i++){for(var a=s[i];" "==a.charAt(0);)a=a.substring(1,a.length);if(0==a.indexOf(t))return a.substring(t.length,a.length)}return null}}class q extends o{constructor(e){super(e),this.init()}init(){this.registerEvents()}registerEvents(){$("[data-view]",this.element).on("click",e=>{$("[data-js-crop-results]",this.element).removeClass("grid-view list-view");var t=$(e.currentTarget).data("view");$("[data-js-crop-results]",this.element).addClass(t)})}}class F extends b{constructor(){super()}_setAttributes(){super._setAttributes(),this.attrs.breakpoints=`{\n "300":{"slidesPerView": ${this.getAttribute("slides-per-view-mobile")||2}, "navigation": false, "pagination": false},\n "740":{"slidesPerView": ${this.getAttribute("slides-per-view-tablet")||2}, "spaceBetween": ${this.attrs.spaceBetween||40}, "navigation": false, "pagination": true},\n "1024":{"slidesPerView": ${this.attrs.slidesPerView}, "navigation": true, "spaceBetween": ${this.attrs.spaceBetween||60}, "pagination": false}\n }`}}
1F.registerWebComponent("ntf-grid-carousel");class W extends r{constructor(e){super(e),this.init()}init(){window.addEventListener("resize",this.changeDetailsState)}changeDetailsState(e){document.querySelectorAll(".js-graph__item").forEach(e=>{$(window).width()>1100?e.setAttribute("open",""):e.removeAttribute("open")})}}class U extends r{constructor(e){super(e),this.init()}init(){this.graphComponent=new W(this.element),$(window).width()>1260&&document.querySelectorAll(".js-graph__item").forEach(e=>{$(e).attr("open","")})}}class H extends r{constructor(e){super(e),this.CLASS_WRAPPER="js-floating-nav",this.SELECTOR_WRAPPER="."+this.CLASS_WRAPPER,this.CLASS_TRIGGER="js-toggle-floating-nav",this.SELECTOR_TRIGGER="."+this.CLASS_TRIGGER,this.CLASS_ACTIVE="is-open",this.SELECTOR_ACTIVE="."+this.CLASS_ACTIVE,this.init()}init(){this.triggerElement=this.element.querySelectorAll(this.SELECTOR_TRIGGER),this.wrapperElement=this.element,this.triggerElement&&this.triggerElement.forEach(e=>e.addEventListener("click",t=>{t.preventDefault(),null!=e&&e.classList.contains(this.CLASS_TRIGGER)&&(this.wrapperElement.classList.contains(this.CLASS_ACTIVE)?(this.wrapperElement.classList.remove(this.CLASS_ACTIVE),e.setAttribute("aria-expanded",(!1).toString())):(e.setAttribute("aria-expanded",(!0).toString()),this.wrapperElement.classList.add(this.CLASS_ACTIVE)))}))}}class z extends r{constructor(e){super(e),this.init()}init(){new H(this.element)}}class K extends r{constructor(e){super(e),this.CLASS_WRAPPER="js-nav-wrapper",this.SELECTOR_WRAPPER="."+this.CLASS_WRAPPER,this.CLASS_TRIGGER="js-toggle-nav",this.SELECTOR_TRIGGER="."+this.CLASS_TRIGGER,this.CLASS_WRAPPER_SEARCH="js-search",this.SELECTOR_WRAPPER_SEARCH="."+this.CLASS_WRAPPER_SEARCH,this.CLASS_TRIGGER_SEARCH="js-toggle-search",this.SELECTOR_TRIGGER_SEARCH="."+this.CLASS_TRIGGER_SEARCH,this.CLASS_WRAPPER_DOORMAT="js-doormat",this.SELECTOR_WRAPPER_DOORMAT="."+this.CLASS_WRAPPER_DOORMAT,this.CLASS_TRIGGER_DOORMAT="js-toggle-doormat",this.SELECTOR_TRIGGER_DOORMAT="."+this.CLASS_TRIGGER_DOORMAT,this.CLASS_WRAPPER_SUBNAV="js-subnav",this.SELECTOR_WRAPPER_SUBNAV="."+this.CLASS_WRAPPER_SUBNAV,this.CLASS_TRIGGER_SUBNAV="js-toggle-subnav",this.SELECTOR_TRIGGER_SUBNAV="."+this.CLASS_TRIGGER_SUBNAV,this.CLASS_SUBBRAND="js-header-subbrand",this.SELECTOR_SUBBRAND="."+this.CLASS_SUBBRAND,this.CLASS_WRAPPER_TAB="js-doormat-tab",this.SELECTOR_WRAPPER_TAB="."+this.CLASS_WRAPPER_TAB,this.CLASS_TRIGGER_TAB="js-toggle-doormat-tab",this.SELECTOR_TRIGGER_TAB="."+this.CLASS_TRIGGER_TAB,this.CLASS_WRAPPER_POPUP="js-popup",this.SELECTOR_WRAPPER_POPUP="."+this.CLASS_WRAPPER_POPUP,this.CLASS_TRIGGER_POPUP="js-toggle-popup",this.SELECTOR_TRIGGER_POPUP="."+this.CLASS_TRIGGER_POPUP,this.CLASS_ACTIVE="is-active",this.SELECTOR_ACTIVE="."+this.CLASS_ACTIVE,this.CLASS_OPEN="is-open",this.SELECTOR_OPEN="."+this.CLASS_OPEN,this.CLASS_SCROLLED="is-scrolled",this.SELECTOR_SCROLLED="."+this.CLASS_SCROLLED,this.init()}init(){this.headerElement=this.element,this.triggerElement=this.element.querySelector(this.SELECTOR_TRIGGER),this.wrapperElement=this.element.querySelector(this.SELECTOR_WRAPPER),this.triggerSearchElement=this.element.querySelectorAll(this.SELECTOR_TRIGGER_SEARCH),this.wrapperSearchElement=this.element.querySelector(this.SELECTOR_WRAPPER_SEARCH),this.triggerDoormatElement=this.element.querySelectorAll(this.SELECTOR_TRIGGER_DOORMAT),this.triggerSubnavElement=this.element.querySelectorAll(this.SELECTOR_TRIGGER_SUBNAV),this.triggerTabElement=this.element.querySelectorAll(this.SELECTOR_TRIGGER_TAB),this.triggerPopupElement=this.element.querySelectorAll(this.SELECTOR_TRIGGER_POPUP);const e=this.element.querySelector(this.SELECTOR_WRAPPER_SUBNAV+this.SELECTOR_ACTIVE),t=this.element.querySelector(this.SELECTOR_SUBBRAND);if(null!==e){var s=e.offsetHeight;if(null!==t){var i=t.offsetHeight;s-=i+5}}else s=0;function a(e,t=0){document.documentElement.style.setProperty("--brand__main-offset--padding-top",parseFloat(e+t)+"px")}function r(e){e.triggerElement.classList.contains(e.CLASS_ACTIVE)&&e.triggerElement.classList.remove(e.CLASS_ACTIVE),e.wrapperElement.classList.contains(e.CLASS_ACTIVE)&&e.wrapperElement.classList.remove(e.CLASS_ACTIVE),e.triggerSearchElement.forEach(t=>{t.classList.contains(e.CLASS_ACTIVE)&&t.classList.remove(e.CLASS_ACTIVE)}),e.wrapperSearchElement&&e.wrapperSearchElement.classList.contains(e.CLASS_ACTIVE)&&e.wrapperSearchElement.classList.remove(e.CLASS_ACTIVE),e.triggerSearchElement.forEach(t=>{t.classList.contains(e.CLASS_ACTIVE)&&t.classList.remove(e.CLASS_ACTIVE)}),e.activeDoormat=e.element.querySelectorAll(e.SELECTOR_WRAPPER_DOORMAT+e.SELECTOR_OPEN),e.activeDoormat.forEach(function(e){e.classList.remove("is-open"),e.classList.remove("is-active")})}a(this.headerElement.offsetHeight,s),window.addEventListener("header:recalc",()=>{a(this.headerElement.offsetHeight,s)}),this.triggerElement.addEventListener("click",e=>{e.preventDefault();var t=e.currentTarget;null!=t&&t.classList.contains(this.CLASS_TRIGGER)&&(this.wrapperElement.classList.contains(this.CLASS_ACTIVE)?(r(this),t.classList.remove(this.CLASS_ACTIVE),this.wrapperElement.classList.remove(this.CLASS_ACTIVE)):(r(this),t.classList.add(this.CLASS_ACTIVE),this.wrapperElement.classList.add(this.CLASS_ACTIVE)))}
1),this.triggerDoormatElement.forEach(e=>e.addEventListener("click",t=>{t.preventDefault(),this.wrapperDoormatElement=e.closest(this.SELECTOR_WRAPPER_DOORMAT),null!=e&&e.classList.contains(this.CLASS_TRIGGER_DOORMAT)&&(this.wrapperDoormatElement.classList.contains(this.CLASS_OPEN)?this.wrapperDoormatElement.classList.remove(this.CLASS_OPEN):this.wrapperDoormatElement.classList.add(this.CLASS_OPEN))})),this.triggerSubnavElement.forEach(e=>e.addEventListener("click",t=>{t.preventDefault(),this.wrapperSubnavElement=e.closest(this.SELECTOR_WRAPPER_SUBNAV),null!=e&&e.classList.contains(this.CLASS_TRIGGER_SUBNAV)&&(this.wrapperSubnavElement.classList.contains(this.CLASS_OPEN)?this.wrapperSubnavElement.classList.remove(this.CLASS_OPEN):(this.activeSubnav=this.element.querySelectorAll(this.SELECTOR_WRAPPER_SUBNAV+this.SELECTOR_OPEN),this.activeSubnav.forEach(function(e){e.classList.remove("is-open")}),this.wrapperSubnavElement.classList.add(this.CLASS_OPEN)))})),this.triggerSearchElement.forEach(e=>e.addEventListener("click",t=>{t.preventDefault(),null!=e&&e.classList.contains(this.CLASS_TRIGGER_SEARCH)&&this.wrapperSearchElement&&(this.wrapperSearchElement.classList.contains(this.CLASS_ACTIVE)?(this.wrapperSearchElement.classList.remove(this.CLASS_ACTIVE),e.classList.remove(this.CLASS_ACTIVE)):(r(this),this.wrapperSearchElement.classList.add(this.CLASS_ACTIVE),e.classList.add(this.CLASS_ACTIVE),this.wrapperSearchElement.querySelector(".js-input").focus()))})),window.outerWidth<=1199?this.triggerTabElement.forEach(e=>e.addEventListener("click",t=>{t.preventDefault(),this.wrapperTabElement=e.closest(this.SELECTOR_WRAPPER_TAB),null!=e&&e.classList.contains(this.CLASS_TRIGGER_TAB)&&(this.wrapperTabElement.classList.contains(this.CLASS_ACTIVE)?this.wrapperTabElement.classList.remove(this.CLASS_ACTIVE):(this.activeTab=this.element.querySelectorAll(this.SELECTOR_WRAPPER_TAB+this.SELECTOR_ACTIVE),this.activeTab.forEach(function(e){e.classList.remove("is-active")}),this.wrapperTabElement.classList.add(this.CLASS_ACTIVE)))})):this.triggerTabElement.forEach(e=>e.addEventListener("mouseenter",t=>{t.preventDefault(),this.wrapperTabElement=e.closest(this.SELECTOR_WRAPPER_TAB),null!=e&&e.classList.contains(this.CLASS_TRIGGER_TAB)&&(this.activeTab=this.element.querySelectorAll(this.SELECTOR_WRAPPER_TAB+this.SELECTOR_ACTIVE),this.activeTab.forEach(function(e){e.classList.remove("is-active")}),this.wrapperTabElement.classList.add(this.CLASS_ACTIVE))})),this.triggerPopupElement.forEach(e=>e.addEventListener("click",t=>{t.preventDefault(),this.wrapperPopupElement=e.closest(this.SELECTOR_WRAPPER_POPUP),null!=e&&e.classList.contains(this.CLASS_TRIGGER_POPUP)&&(this.wrapperPopupElement.classList.contains(this.CLASS_ACTIVE)?this.wrapperPopupElement.classList.remove(this.CLASS_ACTIVE):(this.activePopup=this.element.querySelectorAll(this.SELECTOR_WRAPPER_POPUP+this.SELECTOR_ACTIVE),this.activePopup.forEach(function(e){e.classList.remove("is-active")}),this.wrapperPopupElement.classList.add(this.CLASS_ACTIVE)))})),window.outerWidth>=1200&&window.addEventListener("scroll",e=>{window.scrollY>=50?this.headerElement.classList.add(this.CLASS_SCROLLED):this.headerElement.classList.remove(this.CLASS_SCROLLED)}),new ResizeObserver(()=>{a(this.headerElement.offsetHeight,s)}).observe(this.headerElement)}}class Y extends o{constructor(e){super(e),this.init()}init(){new K(this.element);$(".c-nav__link").on("click",e=>{const t=$(".js-toggle-nav").hasClass("is-active"),s=$(e.currentTarget).attr("target");if(!t){if("_blank"===s)return;const t=$(e.currentTarget).attr("href");void 0!==t&&""!==t&&"#"!==t&&(window.location.href=t)}}),$('[data-js="input-header-search"]').on("change keydown paste input",e=>{var t=$(e.currentTarget).val(),s=$("[data-js='search-suggest']");if(t.length<3)s.empty();else{var i={query:t};g.send("POST",this.parm.searchAutoCompleteUrl,i,e=>{null!==e&&(s.empty(),s.html(e))})}}),$("[data-js-header-search-btn]").on("click keydown",e=>{e.preventDefault();var t=$(this.element).find('[data-js="input-header-search"]').val(),s=this.parm.searchPageUrl+"?searchText="+t;window.location.href=s})}}class J extends r{constructor(e){super(e),this.CLASS_WRAPPER="js-hotspot",this.SELECTOR_WRAPPER="."+this.CLASS_WRAPPER,this.CLASS_PARENT="js-hotspot-item",this.SELECTOR_PARENT="."+this.CLASS_PARENT,this.CLASS_TRIGGER="js-hotspot-trigger",this.SELECTOR_TRIGGER="."+this.CLASS_TRIGGER,this.CLASS_ACTIVE="is-active",this.SELECTOR_ACTIVE="."+this.CLASS_ACTIVE,this.init()}init(){if("rtl"==(null!=document.dir?document.dir:document.getElementsByTagName("html")[0].getAttribute("dir")))var e=!0;else e=!1;this.triggerElements=this.element.querySelectorAll(this.SELECTOR_TRIGGER),this.parentElements=this.element.querySelectorAll(this.SELECTOR_PARENT),this.wrapperElement=this.element,this.triggerElements&&(this.parentElements.forEac
1h(function(t){const s=t.getAttribute("data-y"),i=t.getAttribute("data-x");t.style.cssText="--hotspot-item--y:"+s+"%;--hotspot-item--x:"+i+"%";const a=t.querySelector(".js-hotspot-popup");a&&(parseFloat(s)>=30?a.classList.add("align-bottom"):a.classList.add("align-top"),parseFloat(i)>=60?!0===e?a.classList.add("align-left"):a.classList.add("align-right"):!0===e?a.classList.add("align-right"):a.classList.add("align-left"))}),this.triggerElements.forEach(e=>e.addEventListener("click",t=>{t.preventDefault(),null!=e&&e.classList.contains(this.CLASS_TRIGGER)&&(this.parentElement=e.closest(this.SELECTOR_PARENT),this.parentElement.classList.contains(this.CLASS_ACTIVE)?this.parentElement.classList.remove(this.CLASS_ACTIVE):(this.activeHotspots=this.wrapperElement.querySelectorAll(this.SELECTOR_ACTIVE),this.activeHotspots.forEach(function(e){e.classList.remove("is-active")}),this.parentElement.classList.add(this.CLASS_ACTIVE)))})))}}class Z extends r{constructor(e){super(e),this.init()}init(){this.hotSpot=new J(this.element)}}class Q extends o{constructor(e){super(e),this.querystringKey="file",this.iframe=$(this.element).find("#"+this.parm.iframeId).get(0),this.init()}init(){this.collapse=new p(this.element),$(this.element).on("click","[data-js-pdf-url]",t=>{var s=$(t.currentTarget).attr("data-js-pdf-url"),i=$(t.currentTarget).attr("data-js-pdf-id");this.setParameter(this.querystringKey,i),e(s)}),$(this.element).on("click","a[target='pdf-renderer']",t=>{var s=$(t.currentTarget).attr("data-js-pdf-id");this.setParameter(this.querystringKey,s);var i=$(t.currentTarget).prop("href").split("#"),a=i[0],r=2===i.length?i[1]:"";e(a,r)});var e=(e,t)=>{this.loadedPdf===e&&(e=e+"?update="+(new Date).getTime()+"#"+t),this.iframe.contentWindow.location.href=e,this.loadedPdf=e}}setParameter(e,t){var s=new URLSearchParams(window.location.search);s.set(e,t),history.replaceState(null,null,"?"+s.toString())}getParameter(e){return new URLSearchParams(window.location.search).get(e)}}class X extends o{constructor(e){super(e),this.init()}init(){this.searchJobs(),$("select",this.element).on("change",()=>{this.searchJobs()})}getLocation(e){var t=$("[data-js-location]",this.element).val();return t||""}getDepartment(e){var t=$("[data-js-department]",this.element).val();return t||""}searchJobs(){var e={department:this.getDepartment(this.element),location:this.getLocation(this.element),blockId:this.parm.blockId};g.send("POST",this.parm.searchUrl,e,e=>{$("[data-js-job-results]",this.element).html(e)})}}class ee extends r{constructor(e){super(e),this.init()}init(){this.ExpandCollapse=new n(this.element)}}class te extends b{constructor(){super()}_setAttributes(){super._setAttributes(),this.attrs.customParameters='{"autoHeight": true}'}}te.registerWebComponent("ntf-product-detail");class se extends b{constructor(){super()}_setAttributes(){super._setAttributes(),this.attrs.customParameters='{"autoHeight": true}'}}se.registerWebComponent("ntf-img-tabs");class ie extends r{constructor(e){super(e),this.init()}init(){$("select",this.element).on("change",()=>{this.goToFamilyDetailsPage(this.element)})}goToFamilyDetailsPage(e){var t=$("select",e).val();""!==t&&(window.location.href=t)}}class ae extends r{constructor(e){super(e),this.CLASS_PARENT="js-facets",this.SELECTOR_PARENT="."+this.CLASS_PARENT,this.CLASS_TRIGGER="js-facets__trigger",this.SELECTOR_TRIGGER="."+this.CLASS_TRIGGER,this.CLASS_ACTIVE="is-active",this.SELECTOR_ACTIVE="."+this.CLASS_ACTIVE,this.init()}init(){this.triggerElements=this.element.querySelectorAll(this.SELECTOR_TRIGGER),this.parentElement=this.element.querySelector(this.SELECTOR_PARENT),this.triggerElements.forEach(e=>e.addEventListener("click",t=>{t.preventDefault(),null!=e&&e.classList.contains(this.CLASS_TRIGGER)&&(this.parentElement=e.closest(this.SELECTOR_PARENT),this.parentElement.classList.contains(this.CLASS_ACTIVE)?this.parentElement.classList.remove(this.CLASS_ACTIVE):this.parentElement.classList.add(this.CLASS_ACTIVE))}))}}class re extends o{constructor(e){super(e),this.refreshView=(e,t,s)=>{var i={blockId:$("#refiner-block").val(),currentQuery:$("#facet-query").val(),facet:e,facetValue:t,selectFacetValue:s};g.send("POST",this.parm.updateUrl,i,e=>{if(null!=e){this.mobileFacetSectionIsCollapsed?this.postponedData=e:($("#product-refiner-section").html(e),this.collapse=new p(this.element),this.facets=new ae(this.element),this.collapseFacets());var t=$(e).find("#query-update").val();this.setUrlParameter(t)}})},this.loadMoreProducts=()=>{var e={blockId:$("#refiner-block").val(),currentQuery:$("#facet-query").val(),pageNumber:+this.getParameterFromCurrentQuery("page")+1};g.send("POST",this.parm.loadMoreUrl,e,e=>{null!=e&&(this.removeQueryStateFields(),$("[data-js-refiner-products]").append(e),this.updateCurrentQuery(),this.setUrlParameter($("#facet-query").val()))})},this.getDefaultCollapsedFacets=()=>{var e=new Array;return $("[data-js-initial-collapse='True']").each(function(){e.push($(this).data("js-facet-name"))}),e},this.collapseFacets=()=>{var e=this.collapsedFacets;for(let t=0;t<e.length;t++){const s=`[data-js-facet-name='${e[t]}']`,i=document.querySelector(s);null!==i&&(i.classList.add("is-active"),i.setAttribute("aria-expanded","true"))}},null!==sessionStorage.getItem("collapsedFacets")?this.collapsedFacets=JSON.parse(sessionStorage.getItem("collapsedFacets")):this.collapsedFacets=this.getDefaultCollapsedFacets(),null!==sessionStorage.getItem("collapsedFacetOptions")?this.collapsedFacetOptions=JSON.parse(sessionStorage.getItem("collapsedFacetOptions")):this.collapsedFacetOptions=new Array,this.init()}init(){this.collapse=new p(this.element),this.facets=new ae(this.element),this.collapseFacets(),$(this.element).on("click",".js-collapse__trigger",e=>{var t=$(e.currentTarget)[0],s=$(t).parent(".js-collapse").hasClass("is-active"),i=$(t).parent(".js-collapse").data("js-facet-name");s?this.collapsedFacets.push(i):this.collapsedFacets=this.collapsedFacets.filter(e=>e!==i),sessionStorage.setItem("collapsedFacets",JSON.stringify(this.collapsedFacets))}),$(this.element).on("click","[data-js='open-facets-mobile']",()=>{this.mobileFacetSectionIsCollapsed=!0}),$(this.element).on("click","[data-js='update-facets-mobile']",()=>{this.mobileFacetSectionIsCollapsed=!1,$("#product-refiner-section").html(this.postponedData),this.collapse=new p(this.element),this.facets=new ae(this.element),this.collapseFacets()}),$(this.element).on("click","[data-js-facet-option-link]",e=>{var t=e.currentTarget;if(!t.classList.contains("disabled")){const s=!t.classList.contains("active"),i=$(e.currentTarget).data("js-facet"),a=$(e.currentTarget).data("js-facet-option");this.refreshView(i,a,s)}}),$(this.element).on("click","[data-js-facet-option-checkbox]",e=>{var t=e.currentTarget;if(!t.disabled){const s=t.checked,i=$(e.currentTarget).data("js-facet"),a=$(e.currentTarget).data("js-facet-option");this.refreshView(i,a,s)}}),$(this.element).on("click","[data-js-facet-option-close]",e=>{var t=$(e.currentTarget).data("js-facet"),s=$(e.currentTarget).data("js-facet-option");
1this.refreshView(t,s,!1)}),$(this.element).on("click","[data-js-load-more]",e=>{this.loadMoreProducts()}),$(this.element).on("click",".js-facets__trigger",e=>{})}setUrlParameter(e){const t=`?${e}`;window.history.pushState(null,null,t)}getParameterFromCurrentQuery(e){const t=$("#facet-query").val().split("&");for(let s=0;s<t.length;s++){const i=t[s].split("=");if(i.find(t=>t===e))return i[1]}}updateCurrentQuery(){"True"==$("#query-is-last-page").val()&&$("[data-js-load-more]").remove();const e=+$("#query-list-count").val()+ +$("#load-more-count").text(),t=$("#query-update").val();$("#load-more-count").text(e),$("#facet-query").val(t)}removeQueryStateFields(){$("#query-update").remove(),$("#query-is-last-page").remove(),$("#query-list-count").remove()}}class ne extends r{constructor(e){super(e),this.init()}init(){$("body").find("[data-popup-trigger]").click(e=>{e.preventDefault();var t=$(e.target),s=t.data("popup-trigger"),i=$("body").find(`#${s}`);t.attr("aria-expanded","true"),i.addClass("is-active"),i.attr("open",""),$("body").addClass("no-scroll"),i.find(".js-toggle-modal").click(()=>{t.attr("aria-expanded","false"),i.removeClass("is-active"),i.removeAttr("open"),$("body").removeClass("no-scroll")})})}}class le extends r{constructor(e){super(e),this.CLASS_PARENT="js-input-wrapper",this.SELECTOR_PARENT="."+this.CLASS_PARENT,this.CLASS_INPUT="js-input",this.SELECTOR_INPUT="."+this.CLASS_INPUT,this.CLASS_PANEL="js-auto-suggest",this.SELECTOR_PANEL="."+this.CLASS_PANEL,this.CLASS_TRIGGER="js-clear-input",this.SELECTOR_TRIGGER="."+this.CLASS_TRIGGER,this.CLASS_ACTIVE="is-active",this.SELECTOR_ACTIVE="."+this.CLASS_ACTIVE,this.init()}init(){this.trigger=this.element.querySelector(this.SELECTOR_TRIGGER),this.input=this.element.querySelector(this.SELECTOR_INPUT),this.panel=this.element.querySelector(this.SELECTOR_PANEL),this.parentElement=this.element,this.trigger&&(this.input.addEventListener("keyup",e=>{this.panel.classList.add(this.CLASS_ACTIVE)}),this.trigger.addEventListener("click",e=>{this.input.value="",this.panel.classList.remove(this.CLASS_ACTIVE)}))}}class oe extends o{constructor(e,t){super(e),this.init()}init(){new le(this.element);this.bindEvents($(this.element))}bindEvents(e){$('[data-js="btn-search"]',e).on("click",t=>{t.preventDefault();var s=e.find('[data-js="input-search"]').val();this.loadSearchResultsPage(s,null,null)}),$(".js-search-input").on("keypress",t=>{if(13==t.keyCode){t.preventDefault();var s=e.find('[data-js="input-search"]').val();this.loadSearchResultsPage(s,null,null)}}),$('[data-js="btn-page-back"]:not(disabled)',e).on("click",e=>{e.preventDefault();var t=this.parm.currentPage-1;this.loadSearchResultsPage(this.parm.currentText,t,this.parm.currentFacet)}),$('[data-js="btn-page-next"]:not(disabled)',e).on("click",e=>{e.preventDefault();var t=this.parm.currentPage+1;this.loadSearchResultsPage(this.parm.currentText,t,this.parm.currentFacet)}),$("[data-js-page]",e).on("click",e=>{e.preventDefault();var t=+$(e.target).attr("data-js-page");this.loadSearchResultsPage(this.parm.currentText,t,this.parm.currentFacet)}),$("[data-js-facet]",e).on("click",e=>{e.preventDefault();var t=$(e.target).attr("data-js-facet");this.loadSearchResultsPage(this.parm.currentText,0,t)}),$("[data-js-facet-clear]",e).on("click",e=>{e.preventDefault(),this.loadSearchResultsPage(this.parm.currentText,0,"")})}loadSearchResultsPage(e,t,s){var i=this.parm.searchUrl+"?searchText="+e;t&&(i=i+"&page="+t),s&&(i=i+"&facet="+s),window.location.href=i}}class ce extends o{constructor(e,t="/netafim/corporate/assets/icons/svg-symbols.svg"){super(e),this.scriptURL="https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js",this.shopifyBuyInit=()=>{var e=window.ShopifyBuy.buildClient({domain:"netafimitaly.myshopify.com",storefrontAccessToken:this.parm.storeFrontAccessToken}),t=this.parm.isProduct?"product":"collection";window.ShopifyBuy.UI.onReady(e).then(e=>{e.createComponent(t,{id:this.parm.collectionId,node:document.getElementById(this.parm.divId),moneyFormat:"%E2%82%AC%7B%7Bamount_with_comma_separator%7D%7D",options:{product:{contents:{button:!1,buttonWithQuantity:!0},text:{button:this.parm.labelAddToCart},googleFonts:["Roboto"]},productSet:{iframe:!1,styles:{products:{"@media (min-width: 601px)":{"margin-left":"-20px"}}}},modalProduct:{contents:{img:!1,imgWithCarousel:!0,button:!1,buttonWithQuantity:!0},googleFonts:["Roboto"],text:{button:this.parm.labelAddToCart}},option:{googleFonts:["Roboto"]}
1,cart:{text:{title:this.parm.labelShoppingCart,total:this.parm.labelTotal,empty:this.parm.labelEmptyCart,notice:"",button:this.parm.labelCheckOut},googleFonts:["Roboto"]},toggle:{googleFonts:["Roboto"]}}})})},this.loadScript=()=>{var e=document.createElement("script");e.async=!0,e.src=this.scriptURL,(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(e),e.onload=this.shopifyBuyInit},this.checkShopifyInitialized=()=>!!document.querySelector(".shopify-buy__collection-products"),this.svgPath=t,this.init()}init(){window.ShopifyBuy&&window.ShopifyBuy.UI?this.shopifyBuyInit():this.loadScript();var e=setInterval(()=>{this.checkShopifyInitialized()&&clearInterval(e)},1e3);window.dispatchEvent(new Event("resize"))}}class de extends o{constructor(e){super(e),this.dataLayer=window.dataLayer,this.localSiteUrl="",this.init()}init(){var e=V.readCookie(this.parm.declinedSuggestionCookieName);if(!(null!=e&&"true"===e)){var t={currentPageId:this.parm.currentPageId};g.send("POST",this.parm.fetchPopUpUrl,t,e=>{null!==e&&(""!==e&&($("[data-js='user-site-suggestion']",this.element).html(e),this.localSiteUrl=$(this.element).find("[data-js='local-site']").attr("href"),this.dataLayer&&this.dataLayer.push({event:"regionalSitePopupShown",regionalSiteUrl:this.localSiteUrl})),this.modal=new d(this.element),$(this.element).on("click",".o-modal__close-btn",e=>{V.createCookie(this.parm.declinedSuggestionCookieName,!0,30),this.dataLayer&&this.dataLayer.push({event:"regionalSitePopupIgnored",regionalSiteUrl:this.localSiteUrl})}),$(this.element).on("click","[data-js='local-site']",e=>{this.dataLayer&&this.dataLayer.push({event:"regionalSitePopupClicked",regionalSiteUrl:this.localSiteUrl})}))})}}}class he extends o{constructor(e){super(e),this.criteria=new Map,this.currentPage=1,this.init()}init(){this.search(),$("[data-js-criteria]",this.element).on("change",e=>{var t=$(e.target).attr("data-js-criteria"),s=$(e.target).val();this.criteria.set(t,s),this.currentPage=1,this.search()}),$("[data-js-criteria-projects]",this.element).on("change",e=>{this.currentPage=1,this.search()}),$("[data-js-load-more]",this.element).on("click",e=>{this.currentPage+=1,this.search(!0)})}search(e=!1){var t={blockId:this.parm.blockId,blockRoot:this.parm.blockId,page:this.currentPage,criteriaValues:this.GetSelectedCriteria(),criteriumProjects:this.GetCriteriumProjects()};g.send("POST",this.parm.searchUrl,t,t=>{if(null!==t){var s=$(t);if(e){var i=s.find("[data-js-result-items]");$("[data-js-result-items]",this.element).append(i.html())}else $("[data-js-results]",this.element).html(t);var a=+s.find("[data-js-total-found]").attr("data-js-total-found");this.currentPage*this.parm.pageSize>=a?$("[data-js-load-more]",this.element).addClass("u-hide"):$("[data-js-load-more]",this.element).removeClass("u-hide")}})}GetSelectedCriteria(){var e=Array();return this.criteria.forEach((t,s)=>{"-1"!=t&&e.push(t)}),e}GetCriteriumProjects(){var e=this.element.querySelector("[data-js-criteria-projects]");return e?.checked??!1}}class ue extends o{constructor(e){super(e),this.dataFilter={CropId:0,Country:"",BigProject:!1,BlockId:this.parm.blockId,CurrentPage:1},this.init()}init(){this.doInitFilter(),this.registerEvents()}registerEvents(){$("[data-js-country-picker]",this.element).change(e=>{var t=$(e.currentTarget).val();this.dataFilter.Country=t,this.doUpdateFilter()}),$("[data-js-crop-picker]",this.element).change(e=>{var t=$(e.currentTarget).val();this.dataFilter.CropId=t,this.doUpdateFilter()}),$("[data-js-project-only]",this.element).change(e=>{var t=$(e.currentTarget).prop("checked");this.dataFilter.BigProject=t,this.doUpdateFilter()}),$("[data-js-load-more]",this.element).on("click",e=>{$(e.currentTarget).addClass("c-btn--load"),this.dataFilter.CurrentPage=this.dataFilter.CurrentPage+1,this.doLoadMore()})}doInitFilter(){this.doAjax(e=>{this.replaceCallback(!1,e)})}doUpdateFilter(){this.dataFilter.CurrentPage=1,this.doAjax(e=>{this.replaceCallback(!0,e)})}doLoadMore(){this.doAjax(e=>{this.appendCallback(e)})}doAjax(e){var t={blockId:this.parm.blockId,cropId:this.dataFilter.CropId,country:this.dataFilter.Country,bigProject:this.dataFilter.BigProject,currentPage:this.dataFilter.CurrentPage};g.send("POST",this.parm.searchUrl,t,t=>{null!=t&&e(t)})}replaceCallback(e,t){var s=$(t),i=s.find("[data-js-results-fetched]");$("[data-js-story-grid]",this.element).html(i.html());var a=s.find("[data-total-pages]").attr("data-total-pages");this.setLoadMoreState(this.dataFilter.CurrentPage,a)}appendCallback(e){var t=$(e),s=t.find("[data-js-results-fetched]");$(s).appendTo($("[data-js-story-grid]",this.element));var i=t.find("[data-total-pages]").attr("data-total-pages");this.setLoadMoreState(this.dataFilter.CurrentPage,i),$("[data-js-load-more]",this.element).removeClass("c-btn--load")}setLoadMoreState(e,t){var s=$("[data-js-load-more]",this.element);e==t||0===t?s.hide():s.removeClass("u-hide")}}class pe extends r{constructor(e){super(e),this.init()}init(){$('[data-js="system-start-form"]',this.element).on("submit",e=>{this.validateForm()||e.preventDefault()})}validateForm(){var e=!0,t=!0,s=!0,i=$('[data-js="client-name"]',this.element).val(),a=$('[data-js="client-mail"]',this.element).val(),r=$('[data-js="client-privacy"]',this.element).is(":checked");return i?($('[data-js="client-name"]',this.element).next(".js-error-message").hide(),e=!0):($('[data-js="client-name"]',this.element).next(".js-error-message").show(),e=!1),a?($('[data-js="client-mail"]',this.element).next(".js-error-message").hide(),this.isEmail(a)?($('[data-js="client-mail"]',this.element).siblings(".js-error-message").hide(),t=!0):($('[data-js="client-mail"]',this.element).siblings(".js-error-message-invalid").show(),t=!1)):($('[data-js="client-mail"]',this.element).siblings(".js-error-message").hide(),$('[data-js="client-mail"]',this.element).next(".js-error-message").show(),t=!1),r?($('[data-js="client-privacy"]',this.element).siblings(".js-error-message").hide(),s=!0):($('[data-js="client-privacy"]',this.element).siblings(".js-error-message").show(),s=!1),!!(e&&t&&s)}isEmail(e){return new RegExp(/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/).test(e)}}class me extends r{constructor(e){super(e),this.init()}init(){var e=1;function t(){$(".js-form-step.is-active").removeClass("is-active"),$("#step-"+e).addClass("is-active"),$(".m-progress-bar__step.form-step-"+e).addClass("is-active")}function s(e){var t=!0;return"all"!=e?($(".c-system-configurator-form__step.is-active").find("select").each(function(){null==$(this).val()?($(this).parent().next(".js-error-message").show(),1==t&&(t=!1)):$(this).parent().next(".js-error-message").hide()}),$(".c-system-configurator-form__step.is-active").find('input[type="number"]').each(function(){$(this).val()?$(this).parent().next(".js-error-message").hide():($(this).parent().next(".js-error-message").show(),1==t&&(t=!1))})):($("c-system-configurator-form__form").find("select").each(function(){null==$(this).val()?($(this).parent().next(".js-error-message").show(),1==t&&(t=!1)):$(this).parent().next(".js-error-message").hide()}),$(".c-system-configurator-form__form").find('input[type="number"]').each(function(){$(this).val()?$(this).parent().next(".js-error-message").hide():($(this).parent().next(".js-error-message").show(),1==t&&(t=!1))})),!!t}
1t(),$(".js-form-number-field").each(function(){var e=$(this).find(".js-form-number-field-plus"),t=$(this).find(".js-form-number-field-min");$(e).on("click",function(){$(this);let e=$(this).closest(".js-form-number-field").find(".m-form-field__input").val()[0];""!=e&&null!=e||(e=0);var t=parseFloat(e)+1;$(this).closest(".js-form-number-field").find(".m-form-field__input").val(t)}),$(t).on("click",function(){$(this);let e=$(this).closest(".js-form-number-field").find(".m-form-field__input").val()[0];if(e>0)var t=parseFloat(e)-1;else t=0;$(this).closest(".js-form-number-field").find(".m-form-field__input").val(t)})}),$(".js-next-fieldset").on("click",function(){s("abc")&&(e+=1),t()}),$(".js-prev-fieldset").on("click",function(){$(".m-progress-bar__step.form-step-"+e).removeClass("is-active"),e-=1,t()}),$(".js-submit").on("click",function(e){s("all")&&$(".js-system-configurator-form").submit()})}}class ge extends o{constructor(e){super(e),this.init()}init(){var e=1;this.systemConfigurator=new me(this.element),$(".js-form-number-field").each(function(){var e=$
1(this).find(".js-form-number-field-plus"),t=$(this).find(".js-form-number-field-min");$(e).on("click",function(){$(this);let e=$(this).closest(".js-form-number-field").find(".m-form-field__input").val()[0];""!=e&&null!=e||(e=0);var t=parseFloat(e)+1;$(this).closest(".js-form-number-field").find(".m-form-field__input").val(t)}),$(t).on("click",function(){$(this);let e=$(this).closest(".js-form-number-field").find(".m-form-field__input").val()[0];if(e>0)var t=parseFloat(e)-1;else t=0;$(this).closest(".js-form-number-field").find(".m-form-field__input").val(t)})}),$(".js-next-fieldset").on("click",()=>{this.validateStepConfig("abc")&&(e+=1),this.checkStepOnMobile()}),$(".js-prev-fieldset").on("click",()=>{$(".m-progress-bar__step.form-step-"+e).removeClass("is-active"),e-=1,this.checkStepOnMobile()}),$(".js-submit",this.element).on("click",e=>{if(e.preventDefault(),this.validateStepConfig("all")){var t=this;$.ajax({url:this.parm.actionVerifyUrl,data:JSON.stringify({data:{RegionId:parseInt($("select[name='Region']").val()),CropId:parseInt($("select[name='Crop']").val()),PlotArea:parseInt($("input[name='PlotSize']").val()),RowSpacing:parseFloat($("input[name='RowSpacing']").val()),MaxAllowedIrrigationTimePerDay:parseInt($("input[name='MaxIrrigation']").val()),WeeklyIrrigationInterval:parseInt($("input[name='IrrigationCycle']").val()),FiltrationTypeId:parseInt($("input[name='Filtration']").val()),WaterSourceId:parseInt($("input[name='WaterSource']").val())}}),contentType:"application/json; charset=utf-8",traditional:!0,method:"POST",success:e=>{"Success"===e.status?$(t).closest("form").submit():$(".system-configurator .notification",this.element).text(e.message)}})}})}validateStepConfig(e){var t=!0;return"all"!=e?($(".c-system-configurator-form__step.is-active").find("select").each(function(){null==$(this).val()?($(this).parent().next(".js-error-message").show(),1==t&&(t=!1)):$(this).parent().next(".js-error-message").hide()}),$(".c-system-configurator-form__step.is-active").find('input[type="number"]').each(function(){$(this).val()?$(this).parent().next(".js-error-message").hide():($(this).parent().next(".js-error-message").show(),1==t&&(t=!1))})):($("c-system-configurator-form__form").find("select").each(function(){null==$(this).val()?($(this).parent().next(".js-error-message").show(),1==t&&(t=!1)):$(this).parent().next(".js-error-message").hide()}),$(".c-system-configurator-form__form").find('input[type="number"]').each(function(){$(this).val()?$(this).parent().next(".js-error-message").hide():($(this).parent().next(".js-error-message").show(),1==t&&(t=!1))})),!!t}checkStepOnMobile(){$(".js-form-step.is-active").removeClass("is-active"),$("#step-"+this.currentStep).addClass("is-active"),$(".m-progress-bar__step.form-step-"+this.currentStep).addClass("is-active")}}class fe extends r{constructor(e){super(e),this.CLASS_WRAPPER="js-tab-wrapper",this.SELECTOR_WRAPPER="."+this.CLASS_WRAPPER,this.CLASS_TRIGGER="js-tab",this.SELECTOR_TRIGGER="."+this.CLASS_TRIGGER,this.CLASS_PANEL="js-tab-panel",this.SELECTOR_PANEL="."+this.CLASS_PANEL,this.CLASS_ACTIVE="is-active",this.SELECTOR_ACTIVE="."+this.CLASS_ACTIVE,this.init()}init(){this.triggerElements=this.element.querySelectorAll(this.SELECTOR_TRIGGER),this.panelElement=this.element.querySelector(this.SELECTOR_PANEL),this.wrapperElement=this.element,this.triggerElements&&this.triggerElements.forEach(e=>e.addEventListener("click",e=>{e.preventDefault();var t=e.currentTarget;null!=t&&t.classList.contains(this.CLASS_TRIGGER)&&(t.classList.contains(this.CLASS_ACTIVE)?(t.classList.remove(this.CLASS_ACTIVE),t.setAttribute("aria-expanded",(!1).toString())):(this.activeTabs=this.wrapperElement.querySelectorAll(this.SELECTOR_ACTIVE),this.activeTabs.forEach(function(e){e.classList.remove("is-active"),e.setAttribute("aria-expanded",(!1).toString()),document.getElementById(e.getAttribute("data-target")).classList.remove("is-active")}),t.classList.add(this.CLASS_ACTIVE),t.setAttribute("aria-expanded",(!0).toString()),document.getElementById(t.getAttribute("data-target")).classList.add("is-active")))}))}}class Se extends r{constructor(e){super(e),this.init()}init(){this.tabs=new fe(this.element)}}class ve extends r{constructor(e,t,s){super(e),this.CLASS_TRIGGER="js-close",this.SELECTOR_TRIGGER="."+this.CLASS_TRIGGER,this.COOKIE_NAME="hide-toast-message",this.COOKIE_EXPIRY_DAYS=365,this.hideOnClose=t,this.contentReferenceId=s,this.init()}init(){this.triggerElement=this.element.querySelector(this.SELECTOR_TRIGGER),this.triggerElement&&this.triggerElement.addEventListener("click",e=>{e.preventDefault();var t=e.currentTarget;null!=t&&t.classList.contains(this.CLASS_TRIGGER)&&(this.hideOnClose&&this.setToastClosedCookie(),this.element.classList.remove("is-active"))})}setToastClosedCookie(){V.createCookie(`${this.COOKIE_NAME}-${this.contentReferenceId}`,"true",this.COOKIE_EXPIRY_DAYS)}}class Ee extends o{constructor(e){super(e),this.init()}init(){new ve(this.element,this.parm.hideOnClose,this.parm.contentReferenceId)}}class be extends b{constructor(){super()}_setAttributes(){super._setAttributes(),this.attrs.breakpoints='{\n "0": {\n "slidesPerView": 1,\n "space-between": 0,\n "navigation": false\n },\n "980": {\n "navigation": true\n }\n }'}_setSettings(){super._setSettings(),this.defaultSettings={...this.defaultSettings,on:{slideChange:()=>this.pauseVideo()}}}pauseVideo(){const e=this.querySelectorAll(".js-video");
1e&&e.forEach(e=>{if(e.classList.contains("is-youtube")){const t=e.querySelector("iframe").contentWindow;if(null==t)return;t.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}else e.hasAttribute("autoplay")||e.pause()})}}be.registerWebComponent("ntf-media-carousel");class Ce extends o{constructor(e,t){super(e),this.ICON_BASE_URL="/netafim/corporate/assets/icons/",this.IMG_PATH="/netafim/corporate/assets/icons/svg-symbols.svg",this.icon_email=this.ICON_BASE_URL+"mail.svg",this.icon_website=this.ICON_BASE_URL+"globe.svg",this.icon_direction=this.ICON_BASE_URL+"directions.svg",this.init()}init(){var e=new IntersectionObserver(t=>{!0===t[0].isIntersecting&&(this.initMap(),e.unobserve(t[0].target))},{threshold:[0]});e.observe(document.querySelector('[data-component-class="OfficeLocatorComponent"]'))}initMap(){this.parm.isGoogleMaps?(this.googleMapsScriptInitialization=new L(this.parm.mapsApiKey),document.addEventListener("GoogleMapsAPIReady",e=>{this.initMapGoogleMaps(),this.registerEventsGoogleMaps(),this.loadOffices({})})):(this.baiduMapsScriptInitialization=new R(this.parm.mapsApiKey),document.addEventListener("BaiduMapsAPIReady",e=>{this.initMapBaiduMaps(),this.loadOffices({})}))}initMapGoogleMaps(e,t){var s={center:{lat:e=e||59.325,lng:t=t||18.07},clickableIcons:!0,keyboardShortcuts:!1,fullscreenControlOptions:!1,zoom:13,minZoom:3,maxZoom:13,streetViewControl:!1,disableDefaultUI:!0,mapTypeControl:!1,scaleControl:!1,zoomControl:!0,draggable:!0,scrollwheel:!1,styles:[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#dde6e8"},{visibility:"on"}]}]};return new google.maps.Map(document.getElementById("ntfm-map"),s)}initMapBaiduMaps(e,t){e=e||39.9387488,t=t||116.3687133;let s=new BMap.Map("ntfm-map");return s.centerAndZoom(new BMap.Point(e,t),6),s.disable3DBuilding(),s.setMapStyle({features:[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#444444"}]},{featureType:"landscape",elementType:"all",stylers:[{color:"#f2f2f2"}]},{featureType:"poi",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"all",stylers:[{saturation:-100},{lightness:45}]},{featureType:"road.highway",elementType:"all",stylers:[{visibility:"simplified"}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#ffffff"}]},{featureType:"road.arterial",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#dde6e8"},{visibility:"on"}]}],style:""}),s.enableKeyboard(),s.addControl(new BMap.NavigationControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,type:BMAP_NAVIGATION_CONTROL_ZOOM})),s}registerEventsGoogleMaps(){let e=this;var t=document.getElementById("js-search-location"),s=new google.maps.places.SearchBox(t);s.addListener("places_changed",function(){var t=s.getPlaces();if(t&&t.length>0){var i={Latitude:t[0].geometry.location.lat(),Longitude:t[0].geometry.location.lng()};e.parseCountryAndLoadOffice(i)}}),$(".js-clear-input").on("click",function(){e.loadOffices({}),$(".js-clear-input").val("")})}registerEventsBaiduMaps(){let e=this;new BMap.Autocomplete({input:"search-location"}).onconfirm=t=>{let s=t.item.value.province+t.item.value.city+t.item.value.district+t.item.value.street+t.item.value.business;e.setPlaceBaiduMaps(s)}}setPlaceBaiduMaps(e){var t;let s=this;let i=this.initMapBaiduMaps();(t=new BMap.LocalSearch(i,{onSearchComplete:function(){let e=t.getResults().getPoi(0).point,i={Country:"CN",Latitude:e.lat,Longitude:e.lng};s.loadOffices(i),s.setControlState(!0),s.gtmTracking(t.getResults().keyword)}})).search(e)}setControlState(e){e?$("#btn-clear-search").show():($("#btn-clear-search").hide(),$("#search-location").val(""))}gtmTracking(e){var t=window.dataLayer;t&&t.push({event:"locationSearch",searchQuery:e})}loadOffices(e){var t=this;
1null!=e.BlockId&&0!=e.BlockId||(e.BlockId=this.parm.blockId),g.send("POST",this.parm.searchOfficesUrl,e,s=>{var i=JSON.parse(s);t.parm.isGoogleMaps?t.populateOfficesGoogleMaps(i,e.Latitude,e.Longitude):t.populateOfficesBaiduMaps(i,e.Latitude,e.Longitude)})}parseCountryAndLoadOffice(e){var t=new google.maps.LatLng(e.Latitude,e.Longitude),s=this;(new google.maps.Geocoder).geocode({latLng:t},function(t,i){if(i==google.maps.GeocoderStatus.OK&&t[1]){for(var a=null,r=0,n=t.length;r<n;r+=1){var l=t[r];if(!a&&"country"===l.types[0]){a=l.address_components[0].short_name;break}}if(a){var o={Country:a,Latitude:e.Latitude,Longitude:e.Longitude};s.loadOffices(o)}}})}populateOfficesGoogleMaps(e,t,s){var i=$.parseJSON(e);let a=this.initMapGoogleMaps(t,s),r=new google.maps.LatLngBounds;for(var n=0,l=i.length;n<l;n++){var o=i[n];this.createMaker(o,a,r)}if(i.length<=0){var c=new google.maps.LatLng(32.109333,34.855499);r.extend(c)}a.fitBounds(r),i.length<=1&&a.setZoom(5)}populateOfficesBaiduMaps(e,t,s){let i=this.initMapBaiduMaps();i.clearOverlays();var a=$.parseJSON(e);let r=new BMap.Icon(this.ICON_BASE_URL+"icon-pin.svg",new BMap.Size(28,35));this.ICON_BASE_URL,new BMap.Size(-75,35);for(var n=[],l=0,o=a.length;l<o;l++){var c=a[l];let e=this.infoBox(c.officeName,c.address,c.phone,c.fax,c.email,c.website,c.direction);var d=new BMap.Point(parseFloat(c.longitude),parseFloat(c.latitude)+22e-5);n.push(d);var h=new BMap.Marker(d,{icon:r});i.addOverlay(h),h.setAnimation(BMAP_ANIMATION_DROP),this.addBaiduMarkerPopUpHandler(e,h,i)}i.setViewport(n)}addBaiduMarkerPopUpHandler(e,t,s){t.addEventListener("click",function(t){var i=t.target,a=new BMap.Point(i.getPosition().lng,i.getPosition().lat),r=new BMap.InfoWindow(e);s.openInfoWindow(r,a)})}resultBoxBaiduMaps(e,t,s,i,a,r,n){var l='<div class="address-box">';(this.hasContent(e)&&(l+="<h3>"+e+"</h3>"),l+='<div class="address-content">',this.hasContent(t)&&(l+="<p>"+t+"</p>"),this.hasContent(s)&&(l+='<p><span class="blue-text">Tel</span><a href="tel:'+s+'">'+s+"</a></p>"),this.hasContent(i)&&(l+='<p><span class="blue-text">Fax</span>'+i+"</p>"),this.hasContent(a)&&(l+='<p><a href="mailto:'+a+'"><img alt="'+a+'" src="'+this.icon_email+'">'+a+"</a></p>"),this.hasContent(r))&&(this.extractHostname(r)===location.hostname.replace("www.","")?l+='<p><a href="'+r+'"><img alt="'+r+'" src="'+this.icon_website+'">'+r+"</a></p>":l+='<p><a target="_blank" href="'+r+'"><img alt="'+r+'" src="'+this.icon_website+'">'+r+"</a></p>");return this.hasContent(n)&&(l+='<p><a href="'+n+'" target="_blank"><img alt="Direction" src="'+this.icon_direction+'">Direction</a></p>'),l+="</div></div>"}createMaker(e,t,s){var i=new google.maps.LatLng(e.latitude,e.longitude),a={position:i,map:t,icon:this.ICON_BASE_URL+"icon-pin.svg",animation:google.maps.Animation.DROP,title:e.title};let r=new google.maps.InfoWindow({maxWidth:500});var n=new google.maps.Marker(a);s.extend(i);let l=this.infoBox(e.officeName,e.address,e.phone,e.fax,e.email,e.website,e.direction);google.maps.event.addListener(n,"click",((e,s,i)=>(i&&i.close(),()=>{i.setContent(s),null!=this.prevInfoWindow&&this.prevInfoWindow.close(),i.open(t,e),this.prevInfoWindow=i,google.maps.event.addListener(t,"click",()=>{i&&i.close()})}))(n,l,r))}infoBox(e,t,s,i,a,r,n){var l="<div class='m-info-window has-columns'><h3>{title}</h3><div class='m-info-window__body'><div class='m-info-window__column'><div class='c-rich-text'><p>{address}</p><p>{phone}<br />{fax}</p></div></div><div class='m-info-window__column'><div class='c-rich-text'>{website}{directionButton}{contactButton}</div></div></div></div>";return l=this.hasContent(e)?l.replace("{title}",e):l.replace("{title}",""),l=this.hasContent(t)?l.replace("{address}",t):l.replace("{address}",""),l=this.hasContent(s)?l.replace("{phone}","<span class='m-info-window__label'>tel</span> "+s):l.replace("{phone}",""),l=this.hasContent(i)?l.replace("{fax}","<span class='m-info-window__label'>fax</span> "+i):l.replace("{fax}",""),l=this.hasContent(r)?l.replace("{website}","<div class='m-info-window__link'><svg class='a-svg' width='15' height='17' focusable='false'><use xlink:href='"+this.IMG_PATH+"#globe'></use></svg> <a href='"+r+"'>"+r+"</a></div>"):l.replace("{website}",""),l=this.hasContent(n)?l.replace("{directionButton}","<div class='m-info-window__link'><svg class='a-svg' width='15' height='17' focusable='false'><use xlink:href='"+this.IMG_PATH+"#directions'></use></svg> <a href='"+n+"'>Direction</a></div>"):l.replace("{directionButton}",""),l=this.hasContent(a)?l.replace("{contactButton}","<a href='mailto:"+a+"' class='c-btn c-btn--primary'>"+this.parm.contactButtonText+"</a>"):l.replace("{contactButton}","")}hasContent(e){return""!==e&&null!=e}extractHostname(e){let t;return t=e.indexOf("://")>-1?e.split("/")[2]:e.split("/")[0],t=t.split(":")[0],t=t.split("?")[0],t}}class ye extends r{constructor(e){super(e),this.init()}init(){window.addEventListener("DOMContentLoaded",()=>{const e=new IntersectionObserver(e=>
1{e.forEach(e=>{const t=e.target.getAttribute("id");e.intersectionRatio>0?document.querySelector(`.c-in-page-navigation__link[href="#${t}"]`)?.parentElement?.classList?.add("is-active"):document.querySelector(`.c-in-page-navigation__link[href="#${t}"]`)?.parentElement?.classList?.remove("is-active")})});document.querySelectorAll("main [id]").forEach(t=>{e.observe(t)})})}}class Ae extends b{constructor(){super()}_setSettings(){super._setSettings(),this.defaultSettings={...this.defaultSettings,pagination:{el:".swiper-pagination",clickable:!0,renderBullet:function(e,t){return`<div class="${t}"><span class="c-media-carousel__bullet"></span> <span class="c-media-carousel__label">${this.slides[e].id}</span></div>`}},breakpoints:{739:{direction:"horizontal"},740:{direction:"vertical"}}}}}Ae.registerWebComponent("ntf-vertical-media-carousel");class _e extends r{constructor(e){super(e),this.CLASS_WRAPPER="js-video-wrapper",this.SELECTOR_WRAPPER="."+this.CLASS_WRAPPER,this.CLASS_PARENT="js-video",this.SELECTOR_PARENT="."+this.CLASS_PARENT,this.CLASS_TRIGGER="js-btn-play",this.SELECTOR_TRIGGER="."+this.CLASS_TRIGGER,this.CLASS_ACTIVE="is-playing",this.SELECTOR_ACTIVE="."+this.CLASS_ACTIVE,this.init()}init(){this.triggerElement=this.element.querySelector(this.SELECTOR_TRIGGER),this.wrapperElement=this.element,this.parentElement=this.wrapperElement.querySelector(this.SELECTOR_PARENT),this.triggerElement&&this.triggerElement.addEventListener("click",e=>{e.preventDefault();var t=e.currentTarget;null!=t&&t.classList.contains(this.CLASS_TRIGGER)&&(this.parentElement.classList.contains("is-youtube")?this.parentElement.querySelector("iframe").src=this.parentElement.querySelector("iframe").getAttribute("data-src"):this.parentElement.play(),this.wrapperElement.classList.add(this.CLASS_ACTIVE),window.innerWidth>=1024&&this.parentElement.closest(".js-hero-banner")&&this.parentElement.closest(".js-hero-banner").classList.add(this.CLASS_ACTIVE))})}}class we extends r{constructor(e){super(e),this.init()}init(){this.video=new _e(this.element)}}class Le extends o{constructor(e){super(e),this.init()}init(){var e=new IntersectionObserver(t=>{!0===t[0].isIntersecting&&(this.fetchWeather(),e.unobserve(t[0].target))},{threshold:[0]});e.observe(this.element)}fetchWeather(){var e={blockId:this.parm.blockId};g.send("POST",this.parm.weatherFetchUrl,e,e=>{if(null!==e){var t=$(jQuery.parseHTML(e)),s=t.find("[data-js='weather-info']");$('[data-js="weather-placeholder"]',this.element).html(s.html());var i=$('[data-js="location-name"]',t).html();$("[data-js='location-placeholder']",this.element).html(i)}})}}var Te=new Array;class Re extends o{constructor(e){super(e),this.init()}init(){this.applyBindings(this.element)}applyBindings(e){this.roiViewModel=new Pe(this.parm.irrigationMethods,-1!==this.parm.defaultIndex?this.parm.defaultIndex:0,this.parm.highestProductionCost,this.parm.yieldText),$(e).find(".js-nav-calc").find("button").on("click",e=>{Te.forEach(e=>{clearTimeout(e)}),Te=new Array,this.roiViewModel=new Pe(this.parm.irrigationMethods,+$(e.currentTarget).attr("data-js-active"),this.parm.highestProductionCost,this.parm.yieldText),$(e.currentTarget).closest(".js-nav-calc").find(".is-active").removeClass("is-active"),$(e.currentTarget).addClass("is-active")})}}class Pe{constructor(e,t,s,i){this.irrigationMethods=e,this.methodViewModel=e[t],this.highestProductionCost=s,this.yieldText=i,this.methodViewModel.averageYieldPercentage>100&&(this.methodViewModel.averageYieldPercentage=100),$(()=>{if(Ie.reloadSlider(".js-calc-slider-1",this.methodViewModel.averageYieldPercentage,this.methodViewModel.averageYieldPercentage),Ie.reloadSlider(".js-calc-slider-2",this.methodViewModel.productionCost/this.highestProductionCost*100,this.methodViewModel.productionCost),Ie.clearDataPoints(".js-calc-yield-datapoints"),null!==this.methodViewModel.averageYieldDataPoints)for(var e=0;e<this.methodViewModel.averageYieldDataPoints.length;e++)Ie.addDataPoint(".js-calc-yield-datapoints",this.methodViewModel.averageYieldDataPoints[e].percentage,this.methodViewModel.averageYieldDataPoints[e].label,this.methodViewModel.averageYieldDataPoints[e].position);if(Ie.clearDataPoints(".js-calc-cost-datapoints"),null!==this.methodViewModel.productionCostDataPoints)for(e=0;e<this.methodViewModel.productionCostDataPoints.length;e++)Ie.addDataPoint(".js-calc-cost-datapoints",this.methodViewModel.productionCostDataPoints[e].percentage,this.methodViewModel.productionCostDataPoints[e].label,this.methodViewModel.productionCostDataPoints[e].position);Ie.changeHtml(".js-calc-payback",this.methodViewModel.paybackTime),Ie.changeHtml(".js-calc-cycles",this.methodViewModel.cycles),Ie.changeHtml(".js-calc-average-yield",this.methodViewModel.averageYield+" "+this.yieldText)})}}class Ie{constructor(e,t,s,i,a,r,n){this.averageYieldPercentage=e,this.averageYieldDataPoints=t,this.averageYield=s,this.productionCost=i,this.productionCostDataPoints=a,this.paybackTime=r,this.cycles=n}static reloadSlider(e,t,s){this.animateValue(e+"-number",0,s,2e3),$(e).addClass("notransition").attr("style","bottom: calc(0% + 7px)");var i=new $e(112,221,0),a=new $e(247,107,28);if(".js-calc-slider-1"===e)i=new $e(247,107,28),a=new $e(112,221,0);var r=function(e,t,s){var i=new $e(0,0,0);function a(e,t){return e+Math.round(s/100*(t-e))}function r(e){e=Math.min(e,255);var t=(e=Math.max(e,0)).toString(16);return t.length<2&&(t="0"+t),t}return i.r=a(e.r,t.r),i.g=a(e.g,t.g),i.b=a(e.b,t.b),i.cssColor="#"+r(i.r)+r(i.g)+r(i.b),i.cssColor}(i,a,t);let n=$(e).closest(".c-roi-calculator__section").find(".m-calculator-bar");n.attr("style","--calculator-bar--value: "+t+"%"),n.css("color",r)}static animateValue(e,t,s,i){var a=s-t,r=$(e);
1if(a>0)var n=t,l=s>t?1:-1,o=Math.abs(Math.floor(i/a)),c=setInterval(()=>{n+=l,r.text(n),n===s&&clearInterval(c)},o);else r.text("0")}static addDataPoint(e,t,s,i){var a="",r="RIGHT"===i.toUpperCase()?"align-right":"";a=100===t?'<span class="m-calculator-bar__data-point '+r+'"" style="--data-point--top: 0%">'+s+"</span>":'<span class="m-calculator-bar__data-point '+r+'" style="--data-point--top: '+(100-t)+'%">'+s+"</span>",$(e).append(a)}static clearDataPoints(e){$(e).empty()}static changeHtml(e,t){$(e).html(t.toString())}}class $e{constructor(e,t,s){this.r=e,this.g=t,this.b=s}}class ke extends o{constructor(e){super(e),this.search=e=>{var t={blockId:this.parm.blockId,year:e};g.send("POST",this.parm.loadYearUrl,t,t=>{null!==t&&$(this.element).find(`[data-result='${e}']`).html(t)})},this.init()}init(){this.collapse=new p(this.element),this.search(this.parm.latestYear),$(this.element).on("click",".js-collapse__trigger",e=>{var t=$(e.currentTarget).data("js-year");$(e.currentTarget).parent().find(".o-grid-template").length>0||this.search(t)})}}class Oe extends o{constructor(e){super(e),this.init()}init(){g.send("POST",this.parm.fetchUrl,{},e=>{null!=e&&(e.includes("article")?$(this.element).find("[data-js='feed-items']").html(e):this.element.remove())})}}class je extends v{constructor(){super(),this.key="14ec5f4a-5aa6-4aa5-b1f2-149cf9824030"}_init(){new MutationObserver(()=>{this._buildLightGallery()}).observe(this,{attributeFilter:["zoom","medium-zoom","video","thumbnail","custom-class","params","vimeo-player-params","youtube-player-params"],attributeOldValue:!0,subtree:!0}),this._setChildAttribute(),this._buildLightGallery()}_setChildAttribute(){this.querySelectorAll("[dlw-lightgallery-child]").forEach(e=>{e.hasAttribute("disabled")&&e.setAttribute("tabindex","-1"),"A"!==e.tagName&&"BUTTON"!==e.tagName&&(e.setAttribute("role","button"),e.setAttribute("tabindex","0")),e.setAttribute("aria-haspopup","true")})}async _buildLightGallery(){if(this.plugins=new Array,this.attrs={lgZoom:super.getAttributeValue("zoom"),lgMediumZoom:super.getAttributeValue("medium-zoom"),lgVideo:super.getAttributeValue("video"),lgThumbnail:super.getAttributeValue("thumbnail"),customClass:super.getAttributeValue("custom-class"),params:super.getAttributeValue("params"),vimeoPlayerParams:super.getAttributeValue("vimeo-player-params"),vimeoPlayerParams:super.getAttributeValue("youtube-player-params")},this.defaultSettings={licenseKey:this.key,plugins:this.plugins,selector:this.querySelectorAll("[dlw-lightgallery-child]:not([disabled])"),download:!1,hideScrollbar:!0},this.attrs.lgThumbnail&&!this.lgThumbnail&&Promise.all([s.e(517).then(s.bind(s,105)),s.e(696).then(s.bind(s,696))]).then(([e])=>{this.plugins.push(e.default),this.defaultSettings={...this.defaultSettings,thumbnail:!0}}),this.attrs.lgZoom&&!this.lgZoom&&Promise.all([s.e(153).then(s.bind(s,864)),s.e(575).then(s.bind(s,575))]).then(([e])=>{this.plugins.push(e.default),this.defaultSettings={...this.defaultSettings,zoom:!0}}),this.attrs.lgVideo&&!this.lgVideo&&(Promise.all([s.e(534).then(s.bind(s,336)),s.e(180).then(s.bind(s,867)),s.e(173).then(s.bind(s,173))]).then(([e,t])=>{this.plugins.push(t.default),this.defaultSettings={...this.defaultSettings,videojs:!0,vimeoPlayerParams:this.attrs.vimeoPlayerParams?JSON.parse(this.attrs.vimeoPlayerParams):{},youTubePlayerParams:this.attrs.youTubePlayerParams?JSON.parse(this.attrs.vimeoPlayerParams):{}}}),this.attrs.lgThumbnail&&(this.vimeoThumbnail=await s.e(163).then(s.bind(s,736)),this.plugins.push(this.vimeoThumbnail.default))),this.attrs.lgMediumZoom&&!this.lgMediumZoom&&Promise.all([s.e(207).then(s.bind(s,960)),s.e(791).then(s.bind(s,791))]).then(([e])=>{this.plugins.push(e.default)}),"string"==typeof this.attrs.params){var e=JSON.parse(this.attrs.params);this.defaultSettings={...this.defaultSettings,...this.attrs.params?e:{}}}this.attrs.customClass&&(this.defaultSettings={...this.defaultSettings,addClass:this.attrs.customClass?this.attrs.customClass:""}),this.lightgalleryInstance&&this.lightgalleryInstance.destroy(),Promise.all([s.e(897).then(s.bind(s,91)),s.e(550).then(s.bind(s,550))]).then(([e])=>{this.lightgalleryInstance=new e.default(this,this.defaultSettings)})}}je.registerWebComponent("dlw-lightgallery");var xe,Me,Ve,Ge,Be,Ne,De,qe,Fe,We,Ue,He,ze=function(e,t,s,i,a){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?a.call(e,s):a?a.value=s:t.set(e,s),s},Ke=function(e,t,s,i){if("a"===s&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===s?i:"a"===s?i.call(e):i?i.value:t.get(e)};class Ye extends v{constructor(){super(),xe.add(this),Be.set(this,void 0),Ne.set(this,void 0),De.set(this,void 0)}
1_init(){ze(this,Ne,this.getAttributeValue("fetch-url"),"f"),ze(this,De,this.getAttributeValue("dismiss-url"),"f"),Ke(this,Ne,"f")&&(ze(this,Be,new AbortController,"f"),Ke(this,xe,"m",qe).call(this))}disconnectedCallback(){super.disconnectedCallback?.(),Ke(this,Be,"f")?.abort()}}Me=Ye,Be=new WeakMap,Ne=new WeakMap,De=new WeakMap,xe=new WeakSet,qe=async function(){try{const e=await fetch(Ke(this,Ne,"f"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPageId:Number(this.getAttributeValue("current-page-id"))||0}),signal:Ke(this,Be,"f")?.signal});if(!e.ok)return;const t=(await e.text()).trim();t&&Ke(this,xe,"m",Fe).call(this,t)}catch(e){e.name}},Fe=function(e){this.setHTML?.(e)??(this.innerHTML=e),Ke(this,xe,"m",We).call(this),this.classList.add(Ke(Me,Me,"f",Ve)),document.dispatchEvent(new CustomEvent("header:recalc"))},We=function(){Ke(this,Be,"f")?.abort(),ze(this,Be,new AbortController,"f");const{signal:e}=Ke(this,Be,"f");this.querySelectorAll(Ke(Me,Me,"f",Ge)).forEach(t=>{t.addEventListener("click",e=>Ke(this,xe,"m",Ue).call(this,e),{signal:e})})},Ue=function(e){"A"===e.currentTarget.tagName&&e.preventDefault(),Ke(this,De,"f")&&fetch(Ke(this,De,"f"),{method:"POST"}).catch(()=>{}),Ke(this,xe,"m",He).call(this),document.dispatchEvent(new CustomEvent("header:recalc"))},He=function(){Ke(this,Be,"f")?.abort(),this.classList.remove(Ke(Me,Me,"f",Ve))},Ve={value:"is-ready"},Ge={value:"[data-js='site-suggestion-dismiss']"},Ye.registerWebComponent("dlw-site-suggestion");s.p,s.p,s.p,s.p,s.p,s.p,s.p,s.p,s.p,s.p,s.p,s.p,s.p,s.p,s.p;document.addEventListener("DOMContentLoaded",()=>{a.initializeComponents(i)})}},a={};function r(e){var t=a[e];if(void 0!==t)return t.exports;var s=a[e]={exports:{}};return i[e](s,s.exports,r),s.exports}r.m=i,e=[],r.O=function(t,s,i,a){if(!s){var n=1/0;for(d=0;d<e.length;d++){s=e[d][0],i=e[d][1],a=e[d][2];for(var l=!0,o=0;o<s.length;o++)(!1&a||n>=a)&&Object.keys(r.O).every(function(e){return r.O[e](s[o])})?s.splice(o--,1):(l=!1,a<n&&(n=a));if(l){e.splice(d--,1);var c=i();void 0!==c&&(t=c)}}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[s,i,a]},r.d=function(e,t){for(var s in t)r.o(t,s)&&!r.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},r.f={},r.e=function(e){return Promise.all(Object.keys(r.f).reduce(function(t,s){return r.f[s](e,t),t},[]))},r.u=function(e){return"js/"+({153:"zoom",163:"vimeoThumbnail",180:"video",207:"mediumZoom",517:"thumbnail",534:"VimeoPlayer",897:"lightgallery",979:"swiper"}[e]||e)+"."+{67:"9e1f29cab040dbcec1ad",84:"78d9c121bddadb422e87",141:"e5d6176d4988feea0d97",153:"0ede97c03ed97963354d",163:"40d65df53867e042d033",173:"250a77ee27de85647712",180:"1b2e0161c94456150a02",207:"d606f2e65c4936cc530a",311:"a382f87259da0786df98",517:"4b4cc96e6df6796eed27",534:"bf0230ef41c795c4d61a",550:"52766c2c7fdd7b0d6509",563:"762ddfb79430e02229b5",575:"41c7e1379c32303e3dbd",696:"5671863ccca7bb500c10",706:"4150f6ffcc779831f808",746:"9c2fb73dde29917f4682",748:"d90ab85ae7a8f7939cf8",753:"081e167bf2826bda4924",791:"d0efaf3533e37b23e009",830:"21d0ede427031694b5d0",884:"52ca9ac3b97e61f5eee4",897:"1635847fcef2ba450624",979:"8db71f5dfd0d898e29cd"}[e]+".mjs"},r.miniCssF=function(e){return"css/"+e+"."+{78:"8c5b220bf6f482881a90",84:"ceb16244305179f7304f",93:"8c5b220bf6f482881a90",173:"e2ba4550a43108499788",346:"8c5b220bf6f482881a90",550:"965f24f470dc96345caf",563:"2d20a9c5b74df268312b",575:"5bddcce0a5561935e4cb",696:"735a2994fab7a82f6c72",746:"672ec770a093822e5a33",748:"2d54b2c7a2ef63151d68",791:"97c411a4baf7b778169e",830:"2d5887827e7fdfcf672d",884:"0c5f7378a8ffd89219a2"}[e]+".chunk.css"},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t={},s="webpack:",r.l=function(e,i,a,n){if(t[e])t[e].push(i);else{var l,o;if(void 0!==a)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var h=c[d];if(h.getAttribute("src")==e||h.getAttribute("data-webpack")==s+a){l=h;break}}l||(o=!0,(l=document.createElement("script")).charset="utf-8",l.timeout=120,r.nc&&l.setAttribute("nonce",r.nc),l.setAttribute("data-webpack",s+a),l.src=e),t[e]=[i];var u=function(s,i){l.onerror=l.onload=null,clearTimeout(p);var a=t[e];if(delete t[e],l.parentNode&&l.parentNode.removeChild(l),a&&a.forEach(function(e){return e(i)}),s)return s(i)},p=setTimeout(u.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=u.bind(null,l.onerror),l.onload=u.bind(null,l.onload),o&&document.head.appendChild(l)}},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
1),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/netafim/corporate/assets/",function(){if("undefined"!=typeof document){var e=function(e){return new Promise(function(t,s){var i=r.miniCssF(e),a=r.p+i;if(function(e,t){for(var s=document.getElementsByTagName("link"),i=0;i<s.length;i++){var a=(n=s[i]).getAttribute("data-href")||n.getAttribute("href");if("stylesheet"===n.rel&&(a===e||a===t))return n}var r=document.getElementsByTagName("style");for(i=0;i<r.length;i++){var n;if((a=(n=r[i]).getAttribute("data-href"))===e||a===t)return n}}(i,a))return t();!function(e,t,s,i,a){var n=document.createElement("link");n.rel="stylesheet",n.type="text/css",r.nc&&(n.nonce=r.nc),n.onerror=n.onload=function(s){if(n.onerror=n.onload=null,"load"===s.type)i();else{var r=s&&s.type,l=s&&s.target&&s.target.href||t,o=new Error("Loading CSS chunk "+e+" failed.\n("+r+": "+l+")");o.name="ChunkLoadError",o.code="CSS_CHUNK_LOAD_FAILED",o.type=r,o.request=l,n.parentNode&&n.parentNode.removeChild(n),a(o)}},n.href=t,s?s.parentNode.insertBefore(n,s.nextSibling):document.head.appendChild(n)}(e,a,null,t,s)})},t={792:0};r.f.miniCss=function(s,i){t[s]?i.push(t[s]):0!==t[s]&&{78:1,84:1,93:1,173:1,346:1,550:1,563:1,575:1,696:1,746:1,748:1,791:1,830:1,884:1}[s]&&i.push(t[s]=e(s).then(function(){t[s]=0},function(e){throw delete t[s],e}))}}}(),function(){var e={792:0};r.f.j=function(t,s){var i=r.o(e,t)?e[t]:void 0;if(0!==i)if(i)s.push(i[2]);else if(/^(346|78|93)$/.test(t))e[t]=0;else{var a=new Promise(function(s,a){i=e[t]=[s,a]});s.push(i[2]=a);var n=r.p+r.u(t),l=new Error;r.l(n,function(s){if(r.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var a=s&&("load"===s.type?"missing":s.type),n=s&&s.target&&s.target.src;l.message="Loading chunk "+t+" failed.\n("+a+": "+n+")",l.name="ChunkLoadError",l.type=a,l.request=n,i[1](l)}},"chunk-"+t,t)}},r.O.j=function(t){return 0===e[t]};var t=function(t,s){var i,a,n=s[0],l=s[1],o=s[2],c=0;if(n.some(function(t){return 0!==e[t]})){for(i in l)r.o(l,i)&&(r.m[i]=l[i]);if(o)var d=o(r)}for(t&&t(s);c<n.length;c++)a=n[c],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(d)},s=self.webpackChunkwebpack=self.webpackChunkwebpack||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))}();var n=r.O(void 0,[121],function(){return r(762)});n=r.O(n)}();
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.