1"use strict";(globalThis.webpackChunkwips_components_scripts||=[]).push([[2284],{bb115f5155f4e2f0(e,t,n){n.r(t),n.d(t,{default:()=>i});var o=n("b641633d6c906d19");const r={class:"lead-connector-block",role:"presentation"};n("1519ef9f27f54b60"),n("07a8db537f1fb869");var s=n("2c955294755a99bf");const a={props:{publishId:Number,showOnceEveryMinutes:Number,externalFormId:String,attributes:{type:Object,default:()=>({})}},data:()=>({consentGiven:!1,uniqueId:"leadconnector-form-widget-iframe-"+Math.floor(1e4*Math.random()),elementLoaded:!1}),computed:{localStorageLastShownKey(){return"leadconnector-form-widget-iframe-"+this.publishId},lastShownTimestamp:{get(){const e=localStorage.getItem(this.localStorageLastShownKey);return e?parseInt(e):null},set(e){localStorage.setItem(this.localStorageLastShownKey,""+e)}},isHiddenByLastShownTimestamp(){const e=this.lastShownTimestamp;return!!e&&(!(this.showOnceEveryMinutes<=0)&&Math.floor(Date.now()/1e3)<e+60*this.showOnceEveryMinutes)},filteredAttributes(){return Object.fromEntries(Object.entries({...this.attributes,src:null,style:null,"data-form-id":this.externalFormId,"data-layout-iframe-id":"popup-"+this.externalFormId,id:"popup-"+this.externalFormId}).filter(([,e])=>null!==e))},iframeSrc(){return this.externalFormId?.length?"https://api.leadconnectorhq.com/widget/form/"+encodeURIComponent(this.externalFormId):null}},watch:{consentGiven:{immediate:!0,handler(){this.consentGiven&&this.addElement(),this.consentGiven||this.removeElement()}}},async mounted(){s.default.addChangeListener((e,t)=>{"lead-connector-form-widget"==e&&(this.consentGiven=t)}),this.consentGiven=await s.default.awaitConsent("lead-connector-form-widget")},beforeUnmount(){this.removeElement()},methods:{removeElement(){try{document.querySelectorAll("div#"+this.uniqueId).forEach(e=>e.remove())}finally{this.elementLoaded=!1}},addElement(){if(!this.isHiddenByLastShownTimestamp)if(this.iframeSrc?.length){this.elementLoaded&&this.removeElement();try{const e=document.createElement("iframe"),t=document.createElement("script");e.src=this.iframeSrc,Object.entries(this.filteredAttributes).forEach(([t,n])=>{const o=document.createAttribute(t);o.value=""+(n??""),e.setAttributeNode(o)}),e.style.display="none",t.src="https://link.msgsndr.com/js/form_embed.js",t.async=!0;const n=document.createElement("div");n.classList.add("leadconnector-form-widget-iframe-wrapper"),n.id=this.uniqueId,n.appendChild(e),n.appendChild(t),document.querySelector("body")?.appendChild(n)}finally{this.lastShownTimestamp=Math.floor(Date.now()/1e3),this.elementLoaded=!0}}else this.removeElement()}}},i=(0,n("461bee8a7784aa7f").A)(a,[["render",function(e,t,n,s,a,i){return(0,o.uX)(),(0,o.CE)("div",r)}],["__scopeId","data-v-e3816992"]])}}]);
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.