1(function(){var __sections__={};(function(){for(var i=0,s=document.getElementById("sections-script").getAttribute("data-sections").split(",");i<s.length;i++)__sections__[s[i]]=!0})(),(function(){if(!(!__sections__["dixa-chat"]&&!Shopify.designMode))try{let installDixaApiReadyLayoutSync2=function(){window.__dixaApiReadyLayoutSyncInstalled||!window._dixa_||typeof window._dixa_.addListener!="function"||(window.__dixaApiReadyLayoutSyncInstalled=!0,window._dixa_.addListener("on-api-ready",()=>{window.__dixaWidgetState=window.__dixaWidgetState||{},window.__dixaWidgetState.apiReady=!0,document.querySelectorAll("dixa-chat-section").forEach(node=>{typeof node.applyWidgetLayoutFromDataset=="function"&&node.applyWidgetLayoutFromDataset()})}))};var installDixaApiReadyLayoutSync=installDixaApiReadyLayoutSync2;class DixaChatSection extends HTMLElement{static get observedAttributes(){return["data-position","data-horizontal-padding","data-vertical-padding"]}connectedCallback(){this.customTrigger=this.querySelector("[data-dixa-custom-trigger]"),this.handleTriggerClick=this.handleTriggerClick.bind(this),this.customTrigger&&this.customTrigger.addEventListener("click",this.handleTriggerClick),queueMicrotask(()=>this.initializeWidget())}disconnectedCallback(){this.customTrigger&&this.customTrigger.removeEventListener("click",this.handleTriggerClick)}attributeChangedCallback(name,oldValue,newValue){oldValue!==newValue&&(!window.__dixaWidgetState||!window.__dixaWidgetState.apiReady||this.dataset.messengerToken&&(this.ensureDixaApi(),installDixaApiReadyLayoutSync2(),this.loadBootstrap().then(()=>{this.applyWidgetLayoutFromDataset()}).catch(()=>{window.__dixaBootstrapPromise=null})))}handleTriggerClick(){!window._dixa_||typeof window._dixa_.invoke!="function"||window._dixa_.invoke("setWidgetOpen",!0)}initializeWidget(){this.dataset.messengerToken&&(this.ensureDixaApi(),installDixaApiReadyLayoutSync2(),this.loadBootstrap().then(()=>{const payload=this.getInitPayload(),state=window.__dixaWidgetState||{};if(!state.initInvoked){window._dixa_.invoke("init",payload),window.__dixaWidgetState={...state,initInvoked:!0},window.__dixaLayoutFallbackTimer||(window.__dixaLayoutFallbackTimer=window.setTimeout(()=>{window.__dixaLayoutFallbackTimer=null,window.__dixaWidgetState=window.__dixaWidgetState||{},window.__dixaWidgetState.apiReady=!0,document.querySelectorAll("dixa-chat-section").forEach(node=>{typeof node.applyWidgetLayoutFromDataset=="function"&&node.applyWidgetLayoutFromDataset()})},750));return}state.apiReady&&this.applyWidgetLayoutFromDataset()}).catch(()=>{window.__dixaBootstrapPromise=null}))}applyWidgetLayoutFromDataset(){this.applyWidgetLayout(this.getPositionPayload())}getPositionPayload(){const horizontalRaw=Number(this.dataset.horizontalPadding||0),verticalRaw=Number(this.dataset.verticalPadding||0);return{position:this.dataset.position||"bottomRight",horizontalPadding:Number.isFinite(horizontalRaw)?Math.max(0,Math.round(horizontalRaw)):0,verticalPadding:Number.isFinite(verticalRaw)?Math.max(0,Math.round(verticalRaw)):0}}applyWidgetLayout(layout){!window._dixa_||typeof window._dixa_.invoke!="function"||(window._dixa_.invoke("setPosition",layout),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{window._dixa_.invoke("setPosition",layout)})}))}ensureDixaApi(){if(window._dixa_){installDixaApiReadyLayoutSync2();return}window._dixa_={invoke(method,payload){window._dixa_.pendingCalls=window._dixa_.pendingCalls||[],window._dixa_.pendingCalls.push([method,payload])},addListener(eventName,listener){window._dixa_.pendingAddListenerCalls=window._dixa_.pendingAddListenerCalls||[],window._dixa_.pendingAddListenerCalls.push([eventName,listener])}},installDixaApiReadyLayoutSync2()}loadBootstrap(){return window.__dixaBootstrapPromise||(window.__dixaBootstrapPromise=new Promise((resolve,reject)=>{if(document.head.querySelector("script[data-dixa-bootstrap]")){resolve();return}const script=document.createElement("script");script.type="text/javascript",script.async=!0,script.src="https://messenger.dixa.io/bootstrap.js",script.setAttribute("charset","utf-8"),script.setAttribute("data-dixa-bootstrap","true"),script.addEventListener("load",()=>resolve()),script.addEventListener("error",()=>reject(new Error("Dixa bootstrap failed to load"))),document.head.appendChild(script)})),window.__dixaBootstrapPromise}getInitPayload(){const layout=this.getPositionPayload(),hideToggler=this.dataset.hideToggler==="true",showWidgetCloseButton=this.dataset.showWidgetCloseButton==="true";return{messengerToken:this.dataset.messengerToken,hideToggler,showWidgetCloseButton,position:layout.position,horizontalPadding:layout.horizontalPadding,verticalPadding:layout.verticalPadding}}}customElements.get("dixa-chat-section")||customElements.define("dixa-chat-section",DixaChatSection)}catch(e){console.error(e)}})()})(); 2//# sourceMappingURL=/cdn/shop/t/15/compiled_assets/scripts.js.map?v=129125936791215299221778576537
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.