PageSourceSearch

https://www.velux.be/dist/velux-marketing/client/BlLttZmo.js

js velux.be collected 2026-10-05 05:39:46 UTC 5,313 bytes, 2 lines download raw bytes

1/*! @license Third-party license notices: /THIRD_PARTY_NOTICES.txt */
2import{o as e}from"./MKS-4bfa.js";import{K as t,Lr as n,Qn as r,U as i,W as a}from"./DGdVYqCg.js";import{t as o}from"./Dj_YB3_Q.js";import{n as s}from"./D9S7Ma3P.js";import{t as c}from"./Br8i4Mhr.js";import{t as l}from"./xVBeuQU8.js";var u=i(),d=()=>{let e={},{trackDataLayer:t}=l(),n=v().getUserInputs(),r={City__c:`city`,Email__c:`email`,FirstName__c:`firstName`,LastName__c:`lastname`,PostalCode__c:`postalCode`,Phone__c:`phoneNumber`};Object.keys(r).forEach(t=>{let i=r[t],a=n[t];a!=null&&(e[i]=(0,u.sha512_256)(String(a)))});let i=n.Street__c,a=n.StreetNumber__c;e.address=`${(0,u.sha512_256)(String(i??``))} ${(0,u.sha512_256)(String(a??``))}`,e.project_value=``,e.form_category=`new pro form`,t(`generate_lead`,!1,e)},f=e=>{e.activeTemplate===`success`&&d()},p=e=>{let t=document.querySelector(`#small-mega-menu`);t&&t.scrollIntoView({behavior:`smooth`}),e.activeTemplate===`success`&&d()},m=o(`[DEPRECATED] useLogger`),h=()=>({info:e=>{m.info(e)},warning:e=>{m.warn(e)},error:e=>{m.error(`Error:`,{error:e})}}),g=e(a()),_=null,v=n(`InstallerStore`,{state:()=>({data:{},activeTemplate:``,activeStep:``,activeFlow:null,activeFlowType:``,previousStep:``,previousTemplate:``,selectedTileIndex:0,currentActiveIndex:0,userInputs:{},formPageNumber:1,fileName:``,isLoading:!1,isInitialising:!0,formattedAddress:``,trackingTriggered:{formStart:!1}}),actions:{getFormData(){return typeof FormData<`u`&&!_&&(_=new FormData),_},isValidTextOnly(e){return!e||typeof e!=`string`?!1:/^[\p{L}\p{N}\s\-'.,()/]+$/u.test(e.trim())},sanitizeString(e){return!e||typeof e!=`string`?``:(0,g.default)(e,{allowedTags:[]}).replace(/(drop|select|insert|update|delete|union|exec|script)/gi,``).replace(/(https?:\/\/[^\s]+|javascript:|data:|vbscript:)/gi,``).replace(/[^\p{L}\p{N}\s\-'.,()/]/gu,``).trim()},isValidAddressType(e){return!e||typeof e!=`string`?!1:[`street_number`,`route`,`locality`,`postal_code`,`postal_town`,`sublocality`,`country`].includes(e)},validateGooglePlaceResponse(e){let{warning:t}=h(),{address_components:n,formatted_address:r}=e;if(!r||!this.isValidTextOnly(r))return t(`Invalid formatted_address detected`),null;if(!n||!Array.isArray(n))return t(`Invalid address_components detected`),null;let i=[];return n.forEach(e=>{let{long_name:t,short_name:n,types:r}=e;if(!t||t.trim()===``||!this.isValidTextOnly(t)||!n||n.trim()===``||!this.isValidTextOnly(n)||!r||!Array.isArray(r)||r.length===0)return;let a=r.filter(e=>this.isValidAddressType(e));a.length!==0&&i.push({long_name:this.sanitizeString(t),short_name:this.sanitizeString(n),types:a})}),{address_components:i,formatted_address:this.sanitizeString(r)}},setData(e){this.data=e},setTrackingTriggerData(e){Object.assign(this.trackingTriggered,e)},setActiveTemplate(e){f(this),this.previousTemplate=this.activeTemplate,this.activeTemplate=e},setActiveStepName(e){this.previousStep=this.activeStep,this.activeStep=e},setActiveFlow(e){this.activeFlow=e},setActiveFlowType(e){this.activeFlowType=e,p(this)},setSelectedTileIndex(e){this.selectedTileIndex=e},updateAddressField(e){this.formattedAddress=e},updateUserInput(e){this.userInputs={...this.userInputs,...e}},updateActiveStep(e){this.activeStep=e},updateFormPageNumber(e){this.formPageNumber>=1&&(this.formPageNumber+=e)},nextStep(){if(f(this),this.previousStep=this.activeStep,this.activeStep===this.data.firstStep)this.activeStep=this.data.secondStep;else{if(!this.activeFlow)return;let e=this.data.flows[this.activeFlow].length;this.currentActiveIndex++,this.currentActiveIndex>e&&(this.currentActiveIndex=e),this.activeStep=this.data.flows[this.activeFlow][this.currentActiveIndex]}this.previousTemplate=this.activeTemplate,this.activeTemplate=this.data.steps[this.activeStep].stepType,p(this)},prevStep(){this.currentActiveIndex===0?this.activeStep=this.activeStep==this.data.secondStep?this.data.firstStep:this.data.secondStep:(this.currentActiveIndex--,this.currentActiveIndex<0&&(this.currentActiveIndex=0),this.activeStep=this.activeFlow?this.data.flows[this.activeFlow][this.currentActiveIndex]:``),this.activeTemplate=this.data.steps[this.activeStep]?.stepType??``},resetFormData(){typeof FormData<`u`&&(_=new FormData)},appendToFormData({name:e,data:t}){this.getFormData()?.append(e,t)}
2,setLoading(e){this.isLoading=e},setIsInitialising(e){this.isInitialising=e},adjustFileNames(){let e=typeof FormData<`u`?new FormData:null,t=this.getFormData();if(!(!t||!e)){for(let n of t.values())e.append(`files`,n);_=e}},async salesForceIntegration(){f(this),this.setLoading(!0);let e=t(),n={SourceFormUrl__c:(e?.value?.origin??``)+(e?.value?.pathname??``),...this.userInputs},{id:i,language:a}=this.data;this.adjustFileNames(),this.appendToFormData({name:`ComponentId`,data:i}),this.appendToFormData({name:`language`,data:a}),this.appendToFormData({name:`jsonDictionary`,data:JSON.stringify(n)});let o=`${c().apiHost}/api/velux/ProForm/SubmitData`,{data:l}=await s(o,this.getFormData(),{"Content-Type":`multipart/form-data`}),u=r(l,`Data`,{message:`Request failed`,statusCode:500});return u&&u.statusCode===200?(this.setLoading(!1),this.resetFormData(),!0):(alert(`Techical error: `+u.message+` | `+u.statusCode),this.setLoading(!1),this.resetFormData(),!1)}},getters:{getUserInputs:e=>()=>e.userInputs}});export{h as n,v as t};

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.