1class Contact{init(){if(!this.initProperties()) 2return false;this.initEvents();return true;} 3initProperties(){this.$contact_section=$('.contact_section');if(this.$contact_section.length===0) 4return false;this.context_data_json=window.context_data_json;this.$contact_switcher=this.$contact_section.find('#switcher-1');this.$contact_switcher_toogler=this.$contact_switcher.find('.contact_switcher_item');this.$contact_switcher_2=this.$contact_section.find('#switcher-2');this.$contact_switcher_toogler_2=this.$contact_switcher_2.find('.contact_switcher_item');this.$contact_item=this.$contact_section.find('.contact_item');this.$contact_content=this.$contact_section.find('.contact_content');this.$contact_c=this.$contact_section.find('.contact_c');this.context=window.contact_context;this.subcontext=window.contact_subcontext;this.observeContentResize();this.contact_freshdesk=new Contact_Freshdesk();this.contact_freshdesk.init();this.contact_pipedrive=new Contact_Pipedrive();this.contact_pipedrive.init();window.history.replaceState({context:this.context},'');return true;} 5initEvents(){this.$contact_switcher_toogler.on('click',(e)=>this.onContactSwitcherTooglerClick(e));this.$contact_switcher_toogler_2.on('click',(e)=>this.onContactSwitcherTooglerClick(e,true));window.addEventListener('popstate',(e)=>this.onContactPopState(e));} 6onContactSwitcherTooglerClick(e,subSwitcher=false){const $toogler=$(e.currentTarget);if(!subSwitcher)this.toogleContactContext($toogler.attr('data-toogle'));else this.toogleContactSubcontext($toogler.attr('data-toogle'));} 7onContactPopState(e){if(!e.state||typeof e.state['context']=='undefined') 8return true;const context=e.state['context'];if(!context) 9return true;this.toogleContactContext(context,true);} 10getContactItemActive(context,subcontext){const container=context==='b2c'||subcontext==='order'?'.contact_form_freshdesk':'.contact_form_pipedrive';return this.$contact_item.filter(container);} 11toogleContactContext(context,popstate){if(context==this.context) 12return false;this.context=context;this.$contact_content.removeClassPrefix('contact_active_').addClass('contact_active_'+context);this.$contact_switcher_toogler.removeClass('active');this.$contact_switcher_toogler.filter('.contact_switcher_'+context).addClass('active');document.title=this.context_data_json[context]['meta_title'];if(popstate=='undefined'||!popstate) 13window.history.pushState({context:context},'',this.context_data_json[context]['url']);this.$contact_item.removeClass('active');const $contactItemActive=this.getContactItemActive(context,this.subcontext);$contactItemActive.addClass('active');this.updateContentHeight();} 14toogleContactSubcontext(subcontext,popstate){if(subcontext==this.subcontext) 15return false;this.subcontext=subcontext;this.$contact_c.removeClassPrefix('contact_active_').addClass('contact_active_'+subcontext);this.$contact_switcher_toogler_2.removeClass('active');this.$contact_switcher_toogler_2.filter('.contact_switcher_'+subcontext).addClass('active');if(popstate=='undefined'||!popstate) 16window.history.pushState({subcontext:subcontext},'',this.context_data_json[this.context]['url']);this.$contact_item.removeClass('active');const $contactItemActive=this.getContactItemActive(this.context,subcontext);$contactItemActive.addClass('active');this.updateContentHeight();} 17observeContentResize(){const resizeObserver=new ResizeObserver((entries)=>{for(const entry of entries){let width=0;let height=0;if(entry.contentBoxSize){const contentBoxSize=Array.isArray(entry.contentBoxSize)?entry.contentBoxSize[0]:entry.contentBoxSize;width=contentBoxSize.inlineSize;height=contentBoxSize.blockSize;}else{width=entry.contentRect.width;height=entry.contentRect.height;} 18if(height){this.updateContentHeight();}}});this.$contact_item.each((index,item)=>{resizeObserver.observe(item);});} 19updateContentHeight(){const $contactItemActive=this.getContactItemActive(this.context,this.subcontext);this.$contact_c.height(Math.floor($contactItemActive.height()+1));}} 20$(document).ready(function(){window.pop_contact=new Contact();window.pop_contact.init();});;class Contact_Freshdesk{init(){if(!this.initProperties()) 21return false;return true;} 22initProperties(){this.$container=$('.contact_form_freshdesk');if(this.$container.length==0) 23return false;this.initFreshDesk();return true;} 24initFreshDesk(){this.$freshdeskContainer=this.$container.find('.freshdesk_c');if(this.$freshdeskContainer.length==0) 25return false;const mutationObserver=new MutationObserver((mutationList,mutationObserver)=>{for(const mutation of mutationList){if(mutation.type==='childList'){for(let node of mutation.addedNodes){if(!(node instanceof HTMLElement))continue;if(node.id==='launcher-frame'){this.freshdeskScriptLoad();mutationObserver.disconnect();}}}}});mutationObserver.observe(document.body,{childList:true,subtree:true});const mutationObserverFreshworksContainer=new MutationObserver((mutationList,mutationObserver)=>{for(const mutation of mutationList){if(mutation.type==='childList'){for(let node of mutation.addedNodes){if(!(node instanceof HTMLElement))continue;if(node.id==='freshworks-container'){$('#freshworks-container').detach().appendTo(this.$freshdeskContainer);mutationObserver.disconnect();}}}}});mutationObserverFreshworksContainer.observe(document.body,{childList:true,subtree:true});this.freshdeskScript=document.createElement('script');this.freshdeskScript.type='text/javascript';this.freshdeskScript.async=true;this.freshdeskScript.src='https://widget.freshworks.com/widgets/4000000563.js';document.body.appendChild(this.freshdeskScript);window.fwSettings={'widget_id':4000000563,};window.FreshworksWidget||function(){if("function"!=typeof window.FreshworksWidget){let n=function(){n['q'].push(arguments)};n['q']=[],window.FreshworksWidget=n}}();} 26freshdeskScriptLoad(){const mutationObserver=new MutationObserver((mutationList,mutationObs
26)=>{for(const mutation of mutationList){if(mutation.type==='childList'){for(let node of mutation.addedNodes){if(!(node instanceof HTMLElement))continue;if(node.id==='freshworks-frame-wrapper'){this.freshdeskFrameCreated();mutationObs.disconnect();}}}}});mutationObserver.observe(document.body,{childList:true,subtree:true});FreshworksWidget('open','ticketForm');} 27freshdeskFrameCreated(){this.$freshdeskFrame=document.querySelector('#widget-frame');const body=this.$freshdeskFrame.contentWindow.document.body;let opened=false;const mutationObserver=new MutationObserver((mutationList,mutationObs)=>{let addedOne=false;for(const mutation of mutationList){if(mutation.type==='childList'){for(let node of mutation.addedNodes){addedOne=true;if($(node).find('.button-wrapper').length&&!opened){this.freshdeskOpen();opened=true;}}}} 28if(addedOne){this.freshdeskUpdate();}});mutationObserver.observe(body,{childList:true,subtree:true});const $elementWrapper=$(body).find('button-wrapper');if($elementWrapper.length>0){this.freshdeskOpen();}} 29getfreshdeskFrameElementBySelector(selector){const body=this.$freshdeskFrame.contentWindow.document.body;return $(body).find(selector);} 30getfreshdeskFrameElementByClassName(className){return this.getfreshdeskFrameElementBySelector(`[class*='${className}']`)} 31freshdeskOpen(){this.freshdeskResize();this.freshdeskInjectStyle();this.freshdeskInjectStyle();$('#freshworks-container').addClass('loaded');} 32freshdeskResize(){const resizeObserver=new ResizeObserver((entries)=>{for(const entry of entries){let width=0;let height=0;if(entry.contentBoxSize){const contentBoxSize=Array.isArray(entry.contentBoxSize)?entry.contentBoxSize[0]:entry.contentBoxSize;width=contentBoxSize.inlineSize;height=contentBoxSize.blockSize;}else{width=entry.contentRect.width;height=entry.contentRect.height;} 33if(height){$(this.$freshdeskFrame).css('height',Math.floor(height+1)+'px');}}});const body=this.$freshdeskFrame.contentWindow.document.body;resizeObserver.observe(body);} 34freshdeskInjectStyle(){const frameDocument=this.$freshdeskFrame.contentWindow.document;const body=frameDocument.body;$(body).css('margin','0');const $elementWrapper=this.getfreshdeskFrameElementByClassName('elements__Wrapper');$elementWrapper.css('position','relative');$elementWrapper.css('box-shadow','none');$elementWrapper.css('transition','none');this.getfreshdeskFrameElementByClassName('elements__WidgetHome').css('position','relative');this.getfreshdeskFrameElementByClassName('WidgetHeader__Wrapper').hide();const $elements__WidgetHomeBody=this.getfreshdeskFrameElementByClassName('elements__WidgetHomeBody');$elements__WidgetHomeBody.css('padding','0 1px');$elements__WidgetHomeBody.css('transition','none');this.getfreshdeskFrameElementByClassName('PageWrapper__SubTitle').css('font-size','20px');const $PageWrapper__Wrapper=this.getfreshdeskFrameElementByClassName('PageWrapper__Wrapper');$PageWrapper__Wrapper.css('padding','0');$PageWrapper__Wrapper.css('box-shadow','none');$PageWrapper__Wrapper.css('overflow','visible');$PageWrapper__Wrapper.css('transition','none');const $Button__StyledButton=this.getfreshdeskFrameElementByClassName('Button__StyledButton');$Button__StyledButton.css('max-width','320px');$Button__StyledButton.css('transform','none');$Button__StyledButton.css('border-radius','70px');$Button__StyledButton.css('box-shadow','none');$Button__StyledButton.css('padding','12px');$Button__StyledButton.css('margin','auto');$Button__StyledButton.css('display','block');this.getfreshdeskFrameElementByClassName('elements__WidgetFooter').hide();this.getfreshdeskFrameElementByClassName('Scrim__ContentScrim').css('height','auto');this.getfreshdeskFrameElementByClassName('DownShift__SelectWrapper').css('font-weight','normal');const $inputName=this.getfreshdeskFrameElementBySelector('#name');const $inputNameContainer=$inputName.parents("[class*='Shared__InputWrapper']");$inputNameContainer.hide();const style=frameDocument.createElement('style');let styleTxt='#thankyou-button {display: none;}';styleTxt+='input, textarea{font-weight:normal !important;font-size:16px !important;}';style.innerHTML=styleTxt;frameDocument.head.appendChild(style);} 35freshdeskUpdate(){const $elements__CardWrapper=this.getfreshdeskFrameElementByClassName('elements__CardWrapper');if($elements__CardWrapper.hasClass('page')){$elements__CardWrapper.css('position','relative');$elements__CardWrapper.css('box-shadow','none');$elements__CardWrapper.css('transition','none');$elements__CardWrapper.css('height','auto');$elements__CardWrapper.css('left','auto');$elements__CardWrapper.css('right','auto');} 36const $elements__Wrapper=this.getfreshdeskFrameElementByClassName('elements__Wrapper');$elements__CardWrapper.css('box-shadow','none');$elements__CardWrapper.css('min-height','0');$elements__CardWrapper.css('border-radius','0');}};class Contact_Pipedrive{init(){if(!this.initProperties()) 37return false;return true;} 38initProperties(){this.$container=$('.contact_form_pipedrive');if(this.$container.length===0) 39return false;this.initPipeDrive();return true;} 40initPipeDrive(){this.$pipedriveContainer=this.$container.find('.pipedriveWebForms');if(this.$pipedriveContainer.length===0) 41return false;this.pipedriveScript=document.createElement('script');this.pipedriveScript.type='text/javascript';this.pipedriveScript.async=true;this.pipedriveScript.src='https://webforms.pipedrive.com/f/loader';this.$pipedriveContainer[0].appendChild(this.pipedriveScript);}}
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.