(function(u,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(u=typeof globalThis<"u"?globalThis:u||self,e(u["ibb-kliq"]={},u.Vue))})(this,function(u,e){"use strict";var to=Object.defineProperty;var so=(u,e,V)=>e in u?to(u,e,{enumerable:!0,configurable:!0,writable:!0,value:V}):u[e]=V;var k=(u,e,V)=>so(u,typeof e!="symbol"?e+"":e,V);class V{constructor(s){k(this,"BASE_URL");k(this,"request",async(s,a={})=>{try{const n=await fetch(`${this.BASE_URL}/${s}`,{headers:{"Content-Type":"application/json",...a.headers},...a});if(!n.ok)throw new Error(`Error: ${n.status} - ${n.statusText}`);return await n.json()}catch(n){return console.error("Fetch error:",n),n}});this.BASE_URL=s}get(s,a={}){return this.request(s,{method:"GET",headers:a})}post(s,a,n={}){return a instanceof FormData?delete n["Content-Type"]:(n["Content-Type"]="application/json",a=JSON.stringify(a)),this.request(s,{method:"POST",body:a,headers:n})}put(s,a,n={}){return this.request(s,{method:"PUT",body:JSON.stringify(a),headers:n})}delete(s,a={}){return this.request(s,{method:"DELETE",headers:a})}}class z extends V{constructor(){super("https://api.kliq.stage.etrex-it.ch/api")}async sendTest(s){const a=await this.post("objects",s);return console.log(a),!0}async getCompanies(){return(await this.get("companies/partners")).result}async getHeatingOptions(){return(await this.get("heatingSystems/options")).result}async getTeamMembers(){return(await this.get("Team/members")).result}async getClusters(){return(await this.get("heatingSystems/clusters/remote")).result}async submitSupplierInquiry(s){return(await this.post("inquiries/supplier-inquiry",s)).result}async submitHeatingSystemInquiry(s){return(await this.post("inquiries/heating-system-inquiry",s)).result}}const N=new z,b={landingView:{name:"landingView"},targetCustomerView:{name:"targetCustomerView"},nonTargetCustomerView:{name:"nonTargetCustomerView"},inquiryFormSentView:{name:"inquiryFormSentView"},addressDataNotAvailableView:{name:"addressDataNotAvailableView"}},T=[5242,5225,5200,5505,5077,5412,5245,5212,5113,5242,5506,5235,5246,5116,5300,5417,5234,5213,5210,5222],F={oil:.85,gas:.95,wood:.9,groundPump:1,waterPump:1,airPump:1},$={oil:.85,gas:.95,wood:.9,groundPump:1,waterPump:1,airPump:1},I={oil:263.2,gas:201.6,wood:0,groundPump:0,waterPump:0,airPump:0},P={oil:["ab CHF 15’000.-","ab CHF 15’000.-","ab CHF 20’000.-","ab CHF 30’000.-","ab CHF 40’000.-","Auf Anfrage"],gas:["ab CHF 15’000.-","ab CHF 15’000.-","ab CHF 20’000.-","ab CHF 30’000.-","ab CHF 40’000.-","Auf Anfrage"],wood:["ab CHF 20’000.-","ab CHF 20’000.-","ab CHF 30’000.-","ab CHF 40’000.-","ab CHF 45’000.-","Auf Anfrage"],groundPump:["ab CHF 55’000.-","ab CHF 60’000.-","ab CHF 65’000.-","ab CHF 70’000.-","ab CHF 75’000.-","Auf Anfrage"],waterPump:["ab CHF 60’000.-","ab CHF 65’000.-","ab CHF 70’000.-","ab CHF 75’000.-","ab CHF 80’000.-","Auf Anfrage"],airPump:["ab CHF 35’000.-","ab CHF 40’000.-","ab CHF 45’000.-","ab CHF 50’000.-","ab CHF 55’000.-","Auf Anfrage"]},A=[{id:7530,energySource:"Gas",heatingOptionName:"Gasheizung",availabilityKey:"gasanschluss",dataKey:"gas"},{id:7520,energySource:"Holz (Pellets)",heatingOptionName:"Holzheizung",availabilityKey:"holzheizung",dataKey:"wood"},{id:7542,energySource:"Heizöl",heatingOptionName:"Ölheizung",availabilityKey:"ölheizung",dataKey:"oil"},{id:7543,energySource:"Holz (Schnitzel)",heatingOptionName:"Holzheizung",availabilityKey:"holzheizung",dataKey:"wood"},{id:7560,energySource:"Elektrizität",heatingOptionName:"",availabilityKey:"",dataKey:""},{id:7501,energySource:"Luft (Wärmepumpe Luft/Wasser)",heatingOptionName:"Wärmepumpe Luft",availabilityKey:"luftWasserWärmepumpe",dataKey:"airPump"},{id:7410,energySource:"Wärmepumpe für ein Gebäude",heatingOptionName:"Wärmepumpe Erdsonde",availabilityKey:"erdsonde",dataKey:"groundPump"},{id:7411,energySource:"Wärmepumpe für mehrere Gebäude",heatingOptionName:"Wärmepumpe Erdsonde",availabilityKey:"erdsonde",dataKey:"groundPump"},{id:7510,energySource:"Erdwärme (generisch)",heatingOptionName:"Wärmepumpe Erdsonde",availabilityKey:"erdsonde",dataKey:"groundPump"},{id:7511,energySource:"Erdwärmesonde",heatingOptionName:"Wärmepumpe Erdsonde",availabilityKey:"erdsonde",dataKey:"groundPump"},{id:7512,energySource:"Erdregister",heatingOptionName:"Wärmepumpe Erdsonde",availabilityKey:"erdsonde",dataKey:"groundPump"},{id:7513,energySource:"Wasser (Grundwasser, Oberflächenwasser, Abwasser)",heatingOptionName:"Wärmepumpe Grundwasser",availabilityKey:"grundwasserWärmepumpe",dataKey:"waterPump"},{id:7540,energySource:"Holz (generisch)",heatingOptionName:"Holzheizung",availabilityKey:"holzheizung",dataKey:"wood"},{id:7541,energySource:"Holz (Stückholz)",heatingOptionName:"Holzheizung",availabilityKey:"holzheizung",dataKey:"wood"},{id:7550,energySource:"Abwärme (innerhalb des Gebäudes)",heatingOptionName:"",availabilityKey:"",dataKey:""},{id:7570,energySource:"Sonne (thermisch)",heatingOptionName:"",availabilityKey:"",dataKey:""},{id:7580,energySource:"Fernwärme (generisch)",heatingOptionName:"",availabilityKey:"",dataKey:""},{id:7581,energySource:"Fernwärme (Hochtemperatur)",heatingOptionName:"",availabilityKey:"",dataKey:""},{id:7582,energySource:"Fernwärme (Niedertemperatur)",heatingOptionName:"",availabilityKey:"",dataKey:""},{id:7598,energySource:"Unbestimmt",heatingOptionName:"",availabilityKey:"",dataKey:""},{id:7599,energySource:"Andere",heatingOptionName:"",availabilityKey:"",dataKey:""},{id:7500,energySource:"Keine",heatingOptionName:"",availabilityKey:"",dataKey:""}],L=e.defineComponent({name:"AddressDetails",data(){return{addressValue:""}},props:{mapData:{type:Object,required:!1},translations:{type:Object,required:!0},addressData:{type:Object,required:!0}},emits:[],methods:{}}),f=(t,s)=>{const a=t.__vccOpts||t;for(const[n,r]of s)a[n]=r;return a},M={class:"row-fluid-wrapper"},R={class:"etx-container"},W={class:"etx-center"},j={class:"etx-flex Flex gv-0"},Z={class:"etx-flex__item Flex__item mob-l:c-10 tab-m:c-8 mob-l:ml-1"},Y=e.createElementVNode("div",{class:"etx-text Text"},[e.createElementVNode("h2",null,"Kennzahlen zu Ihrer Adresse"),e.createElementVNode("p",{class:"font-size-large"},"Die folgenden Kennzahlen* können sie als ungefähre Richtwerte für Ihre aktuelle Heizlösung nutzen:")],-1),J=e.createElementVNode("div",{class:"etx-spacer Spacer h-50"},null,-1),U={class:"etx-text Text"},K={class:"stats"},G=e.createElementVNode("span",null,"Fernwärme Cluster",-1),X={class:"InfoButton"},Q=e.createElementVNode("div",{class:"InfoButton__icon"},[e.createElementVNode("i",{class:"fal fa-info-circle"})],-1),v={class:"InfoButton__content"},ee=e.createElementVNode("td",null,"Baujahr Heizung",-1),te=e.createElementVNode("span",null,"Heizleistung",-1),se={class:"InfoButton"},ae=e.createElementVNode("div",{class:"InfoButton__icon"},[e.createElementVNode("i",{class:"fal fa-info-circle"})],-1),ne={class:"InfoButton__content"},ie=e.createElementVNode("span",null,"Energieverbrauch",-1),oe={class:"InfoButton"},re=e.createElementVNode("div",{class:"InfoButton__icon"},[e.createElementVNode("i",{class:"fal fa-info-circle"})],-1),le={class:"InfoButton__content"},de=e.createElementVNode("td",null,"Energieträger",-1),ce=e.createElementVNode("span",null,[e.createTextVNode("CO"),e.createElementVNode("sup",null,"2"),e.createTextVNode(" Emissionen")],-1),me={class:"InfoButton"},pe=e.createElementVNode("div",{class:"InfoButton__icon"},[e.createElementVNode("i",{class:"fal fa-info-circle"})],-1),he={class:"InfoButton__content"},_e=e.createElementVNode("div",{class:"etx-spacer Spacer h-25"},null,-1),ue=e.createElementVNode("div",{class:"etx-text Text"},[e.createElementVNode("p",{class:"font-size-smaller font-color-light"},"* Quelle Daten: Gebäude- und Wohnstatistik ")],-1);function fe(t,s,a,n,r,d){var o,i,c,l,p,m,_,y,E,h,O,H,q;return e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",R,[e.createElementVNode("div",W,[e.createElementVNode("div",j,[e.createElementVNode("div",Z,[Y,J,e.createElementVNode("div",U,[e.createElementVNode("table",K,[e.createElementVNode("tbody",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",null,[G,e.createElementVNode("div",X,[Q,e.createElementVNode("div",v,[e.createElementVNode("p",null,e.toDisplayString((o=t.translations)==null?void 0:o.info_text_cluster),1)])])]),e.createElementVNode("td",null,e.toDisplayString((i=t.mapData)==null?void 0:i.decision_tree.perimeter),1)]),e.createElementVNode("tr",null,[ee,e.createElementVNode("td",null,e.toDisplayString(new Date((c=t.mapData)==null?void 0:c.decision_tree.aktualisierungsdatumHeizung).getFullYear()),1)]),e.createElementVNode("tr",null,[e.createElementVNode("td",null,[te,e.createElementVNode("div",se,[ae,e.createElementVNode("div",ne,[e.createElementVNode("p",null,e.toDisplayString((l=t.translations)==null?void 0:l.info_text_heating),1)])])]),e.createElementVNode("td",null,e.toDisplayString((p=t.addressData)!=null&&p.heatingPower?((m=t.addressData)==null?void 0:m.heatingPower)+"kW":"Unbekannt"),1)]),e.createElementVNode("tr",null,[e.createElementVNode("td",null,[ie,e.createElementVNode("div",oe,[re,e.createElementVNode("div",le,[e.createElementVNode("p",null,e.toDisplayString((_=t.translations)==null?void 0:_.info_text_energy_consumption),1)])])]),e.createElementVNode("td",null,e.toDisplayString((y=t.addressData)!=null&&y.energyConsumption?((E=t.addressData)==null?void 0:E.energyConsumption)+"kWh":"Unbekannt"),1)]),e.createElementVNode("tr",null,[de,e.createElementVNode("td",null,e.toDisplayString(((h=t.addressData)==null?void 0:h.energySource)??"Unbekannt"),1)]),e.createElementVNode("tr",null,[e.createElementVNode("td",null,[ce,e.createElementVNode("div",me,[pe,e.createElementVNode("div",he,[e.createElementVNode("p",null,e.toDisplayString((O=t.translations)==null?void 0:O.info_text_co2_emissions),1)])])]),e.createElementVNode("td",null,e.toDisplayString((H=t.addressData)!=null&&H.co2Emissions?((q=t.addressData)==null?void 0:q.co2Emissions)+" Tonnen":"Unbekannt"),1)])])])]),_e,ue])])])])])}const ge=f(L,[["render",fe]]);function g(t){return!t||t.trim().length===0}function x(t){return new RegExp("^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+\\.)+([a-zA-Z0-9]{2,4})+$").test(t)}function C(t){return/^\+(?:[0-9] ?){6,14}[0-9]$/.test(t)}function D(t,s){const a=A.find(n=>n[s]===t);if(a===void 0)throw new Error(`Data for heating system ${t} is not available`);return a}const be=e.defineComponent({name:"ConsultationBySupplierInquiry",data(){return{dropdownOpen:!1,randomPartner:null,heatingPartners:[],selectedSupplier:null,validation:{errors:{}}}},props:{inquiryForm:{type:Object,required:!0,default:()=>({company:"",firstName:"",lastName:"",email:"",phone:""})},supplierForm:{type:Object,required:!0,default:()=>({randomSupplier:null,manualSuppliers:[],randomSupplierSelected:!1})},loaderIsRunning:{type:Boolean,required:!0},selectedHeatingIds:{type:Object,required:!0},requestError:{type:Boolean,required:!0}},emits:["update:inquiryForm","formValidatedAndSubmitted","supplierSelected","update:supplierForm","loaderSet"],methods:{init(){this.heatingPartners=this.apiData.suppliers,this.randomizeSupplier()},updateInquiryField(t,s){this.$emit("update:inquiryForm",{...this.inquiryForm,[t]:s})},updateSupplier(t,s){const a=this.heatingPartners.find(n=>n.name===s);if(t==="manualSupplier"){if(a!==void 0&&this.supplierForm.manualSuppliers.length>=3&&this.supplierForm.manualSuppliers.includes(a)===!1)return;let n=this.supplierForm.manualSuppliers.map(r=>r);n.find(r=>r.name===s)!==void 0?n=n.filter(r=>r.name!==s):a!==void 0&&n.push(a),this.$emit("update:supplierForm",{...this.supplierForm,manualSuppliers:n})}else t==="randomSupplier"&&this.$emit("update:supplierForm",{...this.supplierForm,[t]:a})},updateSupplierSelection(t){this.$emit("update:supplierForm",{...this.supplierForm,randomSupplierSelected:t})},randomizeSupplier(){if(this.heatingPartners.length===1)this.randomPartner=this.heatingPartners[0];else{let t;do{const s=Math.floor(Math.random()*this.heatingPartners.length);t=this.heatingPartners[s]}while(t===this.randomPartner);this.randomPartner=t}this.updateSupplier("randomSupplier",this.randomPartner.name)},validate(){this.validation.errors={};let t=!0;return this.selectedHeatingIds.length===0&&(this.validation.errors.options="Es muss mindestens eine Heizungsoption ausgewählt werden.",t=!1),g(this.inquiryForm.firstName)===!0&&(this.validation.errors.firstName="Eingabe benötigt",t=!1),g(this.inquiryForm.lastName)===!0&&(this.validation.errors.lastName="Eingabe benötigt",t=!1),g(this.inquiryForm.email)===!0?(this.validation.errors.email="Eingabe benötigt",t=!1):x(this.inquiryForm.email)===!1&&(this.validation.errors.email="Gültige Eingabe benötigt",t=!1),g(this.inquiryForm.phone)===!0?(this.validation.errors.phone="Eingabe benötigt",t=!1):C(this.inquiryForm.phone)===!1&&(this.validation.errors.phone="Gültige Eingabe benötigt",t=!1),t},submit(){if(this.$emit("loaderSet",{value:!0}),this.validate()===!1){this.$emit("loaderSet",{value:!1});return}else this.$emit("formValidatedAndSubmitted",{formType:"supplierInquiry"})},handleClickOutside(t){const s=this.$refs.dropdown;s&&!s.contains(t.target)&&this.closeDropdown()},closeDropdown(){this.dropdownOpen=!1}},setup(){const t=e.inject("apiData");if(!t)throw new Error("apiData is not provided");return{apiData:t}},mounted(){document.addEventListener("click",this.handleClickOutside)},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)},created(){this.init()}}),ye={class:"row-fluid-wrapper"},Ee={class:"etx-container"},Ve={class:"etx-center"},Ne=e.createStaticVNode('

Kostenlose Beratung

Geben Sie Ihre Angaben an, damit wir Sie kontaktieren können für eine unverbindliche Beratung zu Ihrem Fernwärmeanschluss und den damit verbunden Möglichkeiten für Sie.

',2),we={class:"etx-flex Flex"},Se={class:"etx-flex__item Flex__item mob-l:c-10 tab-m:c-8 tab-l:ml-1"},ke={class:"etx-flex Flex"},Fe={key:0,class:"etx-flex__item Flex__item"},$e={class:"etx-flex Flex c-auto nowrap gh-50"},Ie={class:"etx-flex__item Flex__item shrink-0 grow-0"},xe={class:"CardSelect__input"},Ce={key:0,class:"fas fa-square-check"},De={key:1,class:"fal fa-square"},Be={class:"etx-flex__item Flex__item grow-1"},Oe={class:"etx-text Text"},He=e.createElementVNode("p",{class:"font-h3"},"Empfohlener Anbieter",-1),qe=["innerHTML"],ze={class:"etx-flex__item Flex__item shrink-0 grow-0"},Te={class:"CardSelect__media bg-white-2"},Pe=["src","alt"],Ae={class:"etx-card__item Card__item ph-0 pv-0"},Le=[e.createElementVNode("span",{class:"etx-button__text"},[e.createTextVNode("Neuer zufälliger Anbieter  "),e.createElementVNode("i",{class:"far fa-sync"})],-1)],Me={class:"etx-card__item Card__item"},Re={class:"etx-flex Flex c-auto nowrap gh-50"},We=e.createElementVNode("div",{class:"etx-flex__item Flex__item shrink-0 grow-0"},[e.createElementVNode("div",{class:"CardSelect__input"},[e.createElementVNode("i",{class:"fas fa-square-check"}),e.createElementVNode("i",{class:"fal fa-square"})])],-1),je={class:"etx-flex__item Flex__item grow-1"},Ze=e.createElementVNode("div",{class:"etx-text Text"},[e.createElementVNode("p",{class:"font-h3"},"Anbieter manuell wählen"),e.createElementVNode("p",null,"Wählen Sie bis zu drei Anbieter")],-1),Ye=e.createElementVNode("br",null,null,-1),Je={class:"HubspotForm"},Ue={class:"hs-form-field hs-fieldtype-select"},Ke={class:"input"},Ge={class:"Multiselect",ref:"dropdown"},Xe={key:0},Qe={key:1},ve={key:0,class:"Multiselect__dropdown"},et=["value","disabled","checked","onChange"],tt=e.createElementVNode("div",{class:"etx-spacer Spacer h-75"},null,-1),st={class:"etx-flex Flex gv-0"},at={class:"etx-flex__item Flex__item mob-l:c-10 tab-m:c-8 mob-l:ml-1"},nt={class:"HubspotForm"},it={class:"hs-form-field hs-fieldtype-text"},ot=e.createElementVNode("label",null,"Firma",-1),rt={class:"input"},lt=["value"],dt={class:"hs-form-field hs-fieldtype-text"},ct=e.createElementVNode("label",null,"Vorname*",-1),mt={class:"input"},pt=["value"],ht={key:0,class:"no-list hs-error-msgs inputs-list",role:"alert"},_t={class:"hs-error-msg hs-main-font-element"},ut={class:"hs-form-field hs-fieldtype-text"},ft=e.createElementVNode("label",null,"Nachname*",-1),gt={class:"input"},bt=["value"],yt={key:0,class:"no-list hs-error-msgs inputs-list",role:"alert"},Et={class:"hs-error-msg hs-main-font-element"},Vt={class:"hs-form-field hs-fieldtype-text"},Nt=e.createElementVNode("label",null,"E-Mail*",-1),wt={class:"input"},St=["value"],kt={key:0,class:"no-list hs-error-msgs inputs-list",role:"alert"},Ft={class:"hs-error-msg hs-main-font-element"},$t={class:"hs-form-field hs-fieldtype-text"},It=e.createElementVNode("label",null,"Telefon*",-1),xt={class:"input"},Ct=["value"],Dt={key:0,class:"no-list hs-error-msgs inputs-list",role:"alert"},Bt={class:"hs-error-msg hs-main-font-element"},Ot={class:"hs-form-field hs-fieldtype-text"},Ht={class:"input"},qt={key:0,class:"no-list hs-error-msgs inputs-list",role:"alert"},zt={class:"hs-error-msg hs-main-font-element"},Tt={class:"hs-form-field hs-fieldtype-text"},Pt={class:"input"},At={key:0,class:"no-list hs-error-msgs inputs-list",role:"alert"},Lt=[e.createElementVNode("li",null,[e.createElementVNode("label",{class:"hs-error-msg hs-main-font-element"},"Etwas ist beim Senden der Anfrage schief gegangen, bitte versuchen Sie es erneut.")],-1)],Mt={class:"hs-submit"},Rt={class:"actions"},Wt=["disabled"],jt={key:0},Zt={key:1},Yt=[e.createElementVNode("i",{class:"fa-sharp-duotone fa-solid fa-spinner loader"},null,-1)];function Jt(t,s,a,n,r,d){var o,i,c;return e.openBlock(),e.createElementBlock("div",ye,[e.createElementVNode("div",Ee,[e.createElementVNode("div",Ve,[Ne,e.createElementVNode("div",we,[e.createElementVNode("div",Se,[e.createElementVNode("div",ke,[t.randomPartner!==null?(e.openBlock(),e.createElementBlock("div",Fe,[e.createElementVNode("div",{class:e.normalizeClass(["etx-card","Card","CardSelect","border-radius","shadow","move-up",{selected:t.supplierForm.randomSupplierSelected}])},[e.createElementVNode("div",{class:"etx-card__item Card__item",onClick:s[0]||(s[0]=l=>t.updateSupplierSelection(!0))},[e.createElementVNode("div",$e,[e.createElementVNode("div",Ie,[e.createElementVNode("div",xe,[t.supplierForm.randomSupplierSelected===!0?(e.openBlock(),e.createElementBlock("i",Ce)):(e.openBlock(),e.createElementBlock("i",De))])]),e.createElementVNode("div",Be,[e.createElementVNode("div",Oe,[He,e.createElementVNode("p",null,e.toDisplayString(t.randomPartner.name),1),e.createElementVNode("p",{innerHTML:(o=t.randomPartner)==null?void 0:o.address},null,8,qe)])]),e.createElementVNode("div",ze,[e.createElementVNode("div",Te,[e.createElementVNode("img",{src:(i=t.randomPartner)==null?void 0:i.logo.url,alt:((c=t.randomPartner)==null?void 0:c.logo.altText)||"Default description"},null,8,Pe)])])])]),e.createElementVNode("div",Ae,[e.createElementVNode("button",{class:"etx-button Button noradius light fullwidth",href:"",title:"Neuer zufälliger Anbieter",onClick:s[1]||(s[1]=l=>t.randomizeSupplier())},Le)])],2)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"etx-flex__item Flex__item",onClick:s[3]||(s[3]=l=>t.updateSupplierSelection(!1))},[e.createElementVNode("div",{class:e.normalizeClass(["etx-card","Card","CardSelect","has-custom-multiselect","border-radus","overflow-visible","shadow",{selected:t.supplierForm.randomSupplierSelected===!1}])},[e.createElementVNode("div",Me,[e.createElementVNode("div",Re,[We,e.createElementVNode("div",je,[Ze,Ye,e.createElementVNode("div",Je,[e.createElementVNode("form",null,[e.createElementVNode("div",Ue,[e.createElementVNode("div",Ke,[e.createElementVNode("div",Ge,[e.createElementVNode("div",{onClick:s[2]||(s[2]=l=>t.dropdownOpen=!t.dropdownOpen),class:"Multiselect__field"},[t.supplierForm.manualSuppliers.length===0?(e.openBlock(),e.createElementBlock("span",Xe,"Bitte Anbieter auswählen")):(e.openBlock(),e.createElementBlock("span",Qe,e.toDisplayString(t.supplierForm.manualSuppliers.map(l=>l.name).join(", ")),1))]),t.dropdownOpen?(e.openBlock(),e.createElementBlock("div",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.heatingPartners,l=>(e.openBlock(),e.createElementBlock("label",{key:l.name},[e.createElementVNode("input",{type:"checkbox",value:l.name,disabled:t.supplierForm.manualSuppliers.length>=3&&t.supplierForm.manualSuppliers.includes(l)===!1,checked:t.supplierForm.manualSuppliers.includes(l),onChange:p=>t.updateSupplier("manualSupplier",l.name)},null,40,et),e.createTextVNode(" "+e.toDisplayString(l.name),1)]))),128))])):e.createCommentVNode("",!0)],512)])])])])])])])],2)])])])]),tt,e.createElementVNode("div",st,[e.createElementVNode("div",at,[e.createElementVNode("div",nt,[e.createElementVNode("form",{onSubmit:s[9]||(s[9]=e.withModifiers((...l)=>t.submit&&t.submit(...l),["prevent"]))},[e.createElementVNode("div",it,[ot,e.createElementVNode("div",rt,[e.createElementVNode("input",{type:"text",class:"hs-input",value:t.inquiryForm.company,onInput:s[4]||(s[4]=l=>t.updateInquiryField("company",l.target.value))},null,40,lt)])]),e.createElementVNode("div",dt,[ct,e.createElementVNode("div",mt,[e.createElementVNode("input",{type:"text",class:"hs-input",value:t.inquiryForm.firstName,onInput:s[5]||(s[5]=l=>t.updateInquiryField("firstName",l.target.value))},null,40,pt),t.validation.errors.firstName!==void 0?(e.openBlock(),e.createElementBlock("ul",ht,[e.createElementVNode("li",null,[e.createElementVNode("label",_t,e.toDisplayString(t.validation.errors.firstName),1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",ut,[ft,e.createElementVNode("div",gt,[e.createElementVNode("input",{type:"text",class:"hs-input",value:t.inquiryForm.lastName,onInput:s[6]||(s[6]=l=>t.updateInquiryField("lastName",l.target.value))},null,40,bt),t.validation.errors.lastName!==void 0?(e.openBlock(),e.createElementBlock("ul",yt,[e.createElementVNode("li",null,[e.createElementVNode("label",Et,e.toDisplayString(t.validation.errors.lastName),1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Vt,[Nt,e.createElementVNode("div",wt,[e.createElementVNode("input",{type:"text",class:"hs-input",value:t.inquiryForm.email,onInput:s[7]||(s[7]=l=>t.updateInquiryField("email",l.target.value))},null,40,St),t.validation.errors.email!==void 0?(e.openBlock(),e.createElementBlock("ul",kt,[e.createElementVNode("li",null,[e.createElementVNode("label",Ft,e.toDisplayString(t.validation.errors.email),1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",$t,[It,e.createElementVNode("div",xt,[e.createElementVNode("input",{type:"text",class:"hs-input",value:t.inquiryForm.phone,onInput:s[8]||(s[8]=l=>t.updateInquiryField("phone",l.target.value))},null,40,Ct),t.validation.errors.phone!==void 0?(e.openBlock(),e.createElementBlock("ul",Dt,[e.createElementVNode("li",null,[e.createElementVNode("label",Bt,e.toDisplayString(t.validation.errors.phone),1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Ot,[e.createElementVNode("div",Ht,[t.validation.errors.options!==void 0?(e.openBlock(),e.createElementBlock("ul",qt,[e.createElementVNode("li",null,[e.createElementVNode("label",zt,e.toDisplayString(t.validation.errors.options),1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Tt,[e.createElementVNode("div",Pt,[t.requestError?(e.openBlock(),e.createElementBlock("ul",At,Lt)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Mt,[e.createElementVNode("div",Rt,[e.createElementVNode("button",{type:"submit",class:"hs-button",disabled:t.loaderIsRunning},[t.loaderIsRunning===!1?(e.openBlock(),e.createElementBlock("span",jt," Anfrage starten ")):e.createCommentVNode("",!0),t.loaderIsRunning===!0?(e.openBlock(),e.createElementBlock("span",Zt,Yt)):e.createCommentVNode("",!0)],8,Wt)])])],32)])])])])])])}const Ut=f(be,[["render",Jt]]),Kt=e.defineComponent({name:"ConsultationInquiry",data(){return{contactPerson:null,validation:{errors:{}}}},props:{modelValue:{type:Object,required:!0,default:()=>({company:"",firstName:"",lastName:"",email:"",phone:""})},mapData:{type:Object,required:!0,default:()=>null},loaderIsRunning:{type:Boolean,required:!0},requestError:{type:Boolean,required:!0}},watch:{mapData:{deep:!0,handler(){this.init()}}},emits:["update:modelValue","formValidatedAndSubmitted","contactPersonSelected","loaderSet","requestErrorSet"],methods:{init(){const t=this.apiData.teamMembers,a=this.apiData.clusters.find(d=>{var o;return d.name===((o=this.mapData)==null?void 0:o.decision_tree.perimeter)});if(a===void 0)return;const n=(a==null?void 0:a.teamEmployees.length)>0?a==null?void 0:a.teamEmployees.map(d=>d.id):[],r=t.filter(d=>n.includes(d.id));this.contactPerson=r[0],this.$emit("contactPersonSelected",{contactPerson:this.contactPerson})},getPlaceHolderImage(t){t.portrait.url="PLACEHOLDER IMAGE"},updateField(t,s){this.$emit("update:modelValue",{...this.modelValue,[t]:s})},validate(){this.validation.errors={};let t=!0;return g(this.modelValue.company)===!0&&(this.validation.errors.company="Eingabe benötigt",t=!1),g(this.modelValue.firstName)===!0&&(this.validation.errors.firstName="Eingabe benötigt",t=!1),g(this.modelValue.lastName)===!0&&(this.validation.errors.lastName="Eingabe benötigt",t=!1),g(this.modelValue.email)===!0?(this.validation.errors.email="Eingabe benötigt",t=!1):x(this.modelValue.email)===!1&&(this.validation.errors.email="Gültige Eingabe benötigt",t=!1),g(this.modelValue.phone)===!0?(this.validation.errors.phone="Eingabe benötigt",t=!1):C(this.modelValue.phone)===!1&&(this.validation.errors.phone="Gültige Eingabe benötigt",t=!1),t},submit(){if(this.$emit("loaderSet",{value:!0}),this.$emit("requestErrorSet",{value:!1}),this.validate()===!1){this.$emit("loaderSet",{value:!1});return}else this.$emit("formValidatedAndSubmitted",{formType:"heatingSystemInquiry"})}},setup(){const t=e.inject("apiData");if(!t)throw new Error("apiData is not provided");return{apiData:t}},created(){this.init()}}),Gt={class:"row-fluid-wrapper"},Xt={class:"etx-container pt-0"},Qt={class:"etx-center"},vt={class:"etx-flex Flex"},es={class:"etx-flex__item Flex__item mob-l:c-10 tab-m:c-8 desk-s:c-7 mob-l:ml-1"},ts=e.createElementVNode("div",{class:"etx-text Text"},[e.createElementVNode("h2",null,"Kostenlose Beratung"),e.createElementVNode("p",{class:"font-size-large"},"Geben Sie Ihre Angaben an, damit wir Sie kontaktieren können für eine unverbindliche Beratung zu Ihrem Fernwärmeanschluss und den damit verbunden Möglichkeiten für Sie.")],-1),ss=e.createElementVNode("div",{class:"etx-spacer Spacer h-50"},null,-1),as={class:"HubspotForm"},ns={class:"hs-form-field hs-fieldtype-text"},is=e.createElementVNode("label",null,"Firma*",-1),os={class:"input"},rs=["value"],ls={key:0,class:"no-list hs-error-msgs inputs-list",role:"alert"},ds={class:"hs-error-msg hs-main-font-element"},cs={class:"hs-form-field hs-fieldtype-text"},ms=e.createElementVNode("label",null,"Vorname*",-1),ps={class:"input"},hs=["value"],_s={key:0,class:"no-list hs-error-msgs inputs-list",role:"alert"},us={class:"hs-error-msg hs-main-font-element"},fs={class:"hs-form-field hs-fieldtype-text"},gs=e.createElementVNode("label",null,"Nachname*",-1),bs={class:"input"},ys=["value"],Es={key:0,class:"no-list hs-error-msgs inputs-list",role:"alert"},Vs={class:"hs-error-msg hs-main-font-element"},Ns={class:"hs-form-field hs-fieldtype-text"},ws=e.createElementVNode("label",null,"E-Mail*",-1),Ss={class:"input"},ks=["value"],Fs={key:0,class:"no-list hs-error-msgs inputs-list",role:"alert"},$s={class:"hs-error-msg hs-main-font-element"},Is={class:"hs-form-field hs-fieldtype-text"},xs=e.createElementVNode("label",null,"Telefon*",-1),Cs={class:"input"},Ds=["value"],Bs={key:0,class:"no-list hs-error-msgs inputs-list",role:"alert"},Os={class:"hs-error-msg hs-main-font-element"},Hs={class:"hs-form-field hs-fieldtype-text"},qs={class:"input"},zs={key:0,class:"no-list hs-error-msgs inputs-list",role:"alert"},Ts=[e.createElementVNode("li",null,[e.createElementVNode("label",{class:"hs-error-msg hs-main-font-element"},"Etwas ist beim Senden der Anfrage schief gegangen, bitte versuchen Sie es erneut.")],-1)],Ps={class:"hs-submit"},As={class:"actions"},Ls=["disabled"],Ms={key:0},Rs={key:1},Ws=[e.createElementVNode("i",{class:"fa-sharp-duotone fa-solid fa-spinner"},null,-1)],js={class:"etx-flex__item Flex__item mob-l:c-6 tab-m:c-4 desk-s:c-3 mob-l:ml-1"},Zs={class:"etx-card Card bg-white-1 border-radius shadow"},Ys={class:"etx-card__item ph-0 pv-0"},Js=["src","alt"],Us={class:"etx-card__item grow-1"},Ks={class:"etx-text Text a-center"},Gs=e.createElementVNode("p",{class:"font-size-small font-color-light font-weight-regular"},"Bei Fragen zum Angebot",-1),Xs={class:"font-h4"},Qs=e.createElementVNode("div",{class:"etx-card__item ph-0 pv-0"},[e.createElementVNode("a",{class:"etx-button Button noradius light fullwidth",href:"mailto:{{ contactPerson.email_1 }}",title:"Email von {{ contactPerson?.firstName }} {{ contactPerson.lastName }}"},[e.createElementVNode("span",{class:"etx-button__text"},"E-Mail")])],-1);function vs(t,s,a,n,r,d){var o,i,c,l,p;return e.openBlock(),e.createElementBlock("div",Gt,[e.createElementVNode("div",Xt,[e.createElementVNode("div",Qt,[e.createElementVNode("div",vt,[e.createElementVNode("div",es,[ts,ss,e.createElementVNode("div",as,[e.createElementVNode("form",{onSubmit:s[5]||(s[5]=e.withModifiers((...m)=>t.submit&&t.submit(...m),["prevent"]))},[e.createElementVNode("div",ns,[is,e.createElementVNode("div",os,[e.createElementVNode("input",{type:"text",class:"hs-input",value:t.modelValue.company,onInput:s[0]||(s[0]=m=>t.updateField("company",m.target.value))},null,40,rs),t.validation.errors.company!==void 0?(e.openBlock(),e.createElementBlock("ul",ls,[e.createElementVNode("li",null,[e.createElementVNode("label",ds,e.toDisplayString(t.validation.errors.company),1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",cs,[ms,e.createElementVNode("div",ps,[e.createElementVNode("input",{type:"text",class:"hs-input",value:t.modelValue.firstName,onInput:s[1]||(s[1]=m=>t.updateField("firstName",m.target.value))},null,40,hs),t.validation.errors.firstName!==void 0?(e.openBlock(),e.createElementBlock("ul",_s,[e.createElementVNode("li",null,[e.createElementVNode("label",us,e.toDisplayString(t.validation.errors.firstName),1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",fs,[gs,e.createElementVNode("div",bs,[e.createElementVNode("input",{type:"text",class:"hs-input",value:t.modelValue.lastName,onInput:s[2]||(s[2]=m=>t.updateField("lastName",m.target.value))},null,40,ys),t.validation.errors.lastName!==void 0?(e.openBlock(),e.createElementBlock("ul",Es,[e.createElementVNode("li",null,[e.createElementVNode("label",Vs,e.toDisplayString(t.validation.errors.lastName),1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Ns,[ws,e.createElementVNode("div",Ss,[e.createElementVNode("input",{type:"text",class:"hs-input",value:t.modelValue.email,onInput:s[3]||(s[3]=m=>t.updateField("email",m.target.value))},null,40,ks),t.validation.errors.email!==void 0?(e.openBlock(),e.createElementBlock("ul",Fs,[e.createElementVNode("li",null,[e.createElementVNode("label",$s,e.toDisplayString(t.validation.errors.email),1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Is,[xs,e.createElementVNode("div",Cs,[e.createElementVNode("input",{type:"text",class:"hs-input",value:t.modelValue.phone,onInput:s[4]||(s[4]=m=>t.updateField("phone",m.target.value))},null,40,Ds),t.validation.errors.phone!==void 0?(e.openBlock(),e.createElementBlock("ul",Bs,[e.createElementVNode("li",null,[e.createElementVNode("label",Os,e.toDisplayString(t.validation.errors.phone),1)])])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Hs,[e.createElementVNode("div",qs,[t.requestError?(e.openBlock(),e.createElementBlock("ul",zs,Ts)):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Ps,[e.createElementVNode("div",As,[e.createElementVNode("button",{type:"submit",class:"hs-button",disabled:t.loaderIsRunning},[t.loaderIsRunning===!1?(e.openBlock(),e.createElementBlock("span",Ms," Anfrage starten ")):e.createCommentVNode("",!0),t.loaderIsRunning===!0?(e.openBlock(),e.createElementBlock("span",Rs,Ws)):e.createCommentVNode("",!0)],8,Ls)])])],32)])]),e.createElementVNode("div",js,[e.createElementVNode("div",Zs,[e.createElementVNode("div",Ys,[e.createElementVNode("img",{src:(o=t.contactPerson)==null?void 0:o.portrait.url,alt:((i=t.contactPerson)==null?void 0:i.portrait.altText)||"Default description",width:500,onError:s[6]||(s[6]=m=>t.getPlaceHolderImage(t.contactPerson))},null,40,Js)]),e.createElementVNode("div",Us,[e.createElementVNode("div",Ks,[Gs,e.createElementVNode("p",Xs,e.toDisplayString((c=t.contactPerson)==null?void 0:c.firstName)+" "+e.toDisplayString((l=t.contactPerson)==null?void 0:l.lastName),1),e.createElementVNode("p",null,e.toDisplayString((p=t.contactPerson)==null?void 0:p.position),1)])]),Qs])])])])])])}const ea=f(Kt,[["render",vs]]),ta=e.defineComponent({name:"UsageForm",props:{modelValue:{type:Number,required:!1,default:0}},emits:["update:modelValue","formSubmitted"],methods:{handleSubmit(){this.$emit("formSubmitted")}},setup(t,{emit:s}){const a=e.computed(()=>`${t.modelValue} kWh`);let n;return{displayValue:a,onInput:o=>{clearTimeout(n);const c=o.target.value;n=setTimeout(()=>{const l=parseFloat(c.replace(/\D/g,"")||"0");s("update:modelValue",l)},500)},onFocus:o=>{o.target.select()}}}}),sa={class:"row-fluid-wrapper"},aa={class:"etx-container"},na={class:"etx-center"},ia=e.createElementVNode("div",{class:"etx-flex Flex gv-0"},[e.createElementVNode("div",{class:"etx-flex__item Flex__item mob-l:c-10 tab-m:c-8 mob-l:ml-1"},[e.createElementVNode("div",{class:"etx-text Text"},[e.createElementVNode("h2",null,"Kennzahlen zu Ihrer Adresse"),e.createElementVNode("p",{class:"font-size-large"}," Die folgenden Kennzahlen* können Sie als ungefähre Richtwerte für Ihre aktuelle Heizlösung nutzen: ")])])],-1),oa={class:"etx-flex Flex gv-0"},ra={class:"etx-flex__item Flex__item mob-l:c-10 tab-m:c-8 desk-s:c-6 mob-l:ml-1"},la=e.createElementVNode("div",{class:"etx-spacer Spacer h-50"},null,-1),da={class:"HubspotForm"},ca={class:"hs-form-field hs-fieldtype-text"},ma=e.createElementVNode("label",null,[e.createElementVNode("span",null,"Ihre Nutzenergie (kWh)"),e.createElementVNode("div",{class:"InfoButton"},[e.createElementVNode("div",{class:"InfoButton__icon"},[e.createElementVNode("i",{class:"fal fa-info-circle"})]),e.createElementVNode("div",{class:"InfoButton__content"},[e.createElementVNode("p",null,"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ")])])],-1),pa={class:"input"},ha=["value"];function _a(t,s,a,n,r,d){return e.openBlock(),e.createElementBlock("div",sa,[e.createElementVNode("div",aa,[e.createElementVNode("div",na,[ia,e.createElementVNode("div",oa,[e.createElementVNode("div",ra,[la,e.createElementVNode("div",da,[e.createElementVNode("form",{onSubmit:s[2]||(s[2]=e.withModifiers((...o)=>t.handleSubmit&&t.handleSubmit(...o),["prevent"]))},[e.createElementVNode("div",ca,[ma,e.createElementVNode("div",pa,[e.createElementVNode("input",{type:"text",class:"hs-input",value:t.displayValue,onInput:s[0]||(s[0]=(...o)=>t.onInput&&t.onInput(...o)),onFocus:s[1]||(s[1]=(...o)=>t.onFocus&&t.onFocus(...o))},null,40,ha)])])],32)])])])])])])}const ua=f(ta,[["render",_a]]),fa=e.defineComponent({name:"HeatingOptionTiles",data(){return{expandedOptions:[],heatingOptions:[],usageFormValue:0}},props:{mapData:{type:Object,required:!0,default:()=>null},translations:{type:Object,required:!0}},watch:{mapData:{deep:!0,handler(){this.init()}}},components:{UsageForm:ua},emits:["heatingOptionSelected"],methods:{init(){this.mapData!==null&&(this.heatingOptions=this.mapHeatingOptions(this.apiData.heatingSystems,this.mapData))},handleHeatingSelection(t){const s=this.heatingOptions.find(a=>a.heatingOption.id===t);s===void 0||(s==null?void 0:s.availability)==="no"||(s.selected=!(s!=null&&s.selected),this.$emit("heatingOptionSelected",t))},handleAccordionClick(t,s){t.stopPropagation();const a=this.heatingOptions.find(n=>n.heatingOption.name===s);a===void 0||(a==null?void 0:a.availability)==="no"||(a.collapsed=!a.collapsed)},calculateHeatingOptionDetails(t,s){const a=s.dataKey;let n,r,d,o,i,c,l,p;n=parseInt(t.decision_tree.bedarfheizleistung),d=F[a],i=$[a],c=I[a];const m=(t.decision_tree.bedarfheizung??0)+(t.decision_tree.bedarfwarmwasser??0);o=m!==0?m/i:0,r=o/d,l=r*c/1e6,this.usageFormValue===0&&(this.usageFormValue=parseFloat(o.toFixed(2)));let _=0;return n<=15?_=0:n>15&&n<=25?_=1:n>25&&n<=35?_=2:n>35&&n<=45?_=3:n>45&&n<=55?_=4:_=5,p=P[a][_],{heatingPower:parseFloat(n.toFixed(0)),finalEnergyInput:parseFloat(r.toFixed(2)),oldEfficiency:d,newEfficiency:i,co2EmissionFactor:parseFloat(c.toFixed(2)),co2Emissions:parseFloat(l.toFixed(3)),energyConsumption:parseFloat(o.toFixed(0)),price:p}},mapHeatingOptions(t,s){return t.map(n=>{const r=D(n.name,"heatingOptionName");let d;if(n.name==="Ölheizung")d="yes";else switch(s.decision_tree[r.availabilityKey]){case"Ja":d="yes";break;case"Nein":case null:d="no";break;default:d="needs_checking";break}const o=this.calculateHeatingOptionDetails(s,r);return{heatingOption:n,availability:d,calculationDetails:o,selected:!1,collapsed:!0}})}},setup(){const t=e.inject("apiData");if(!t)throw new Error("apiData is not provided");return{apiData:t}},onMounted(){this.init()}}),ga={class:"row-fluid-wrapper"},ba={class:"etx-container pt-0"},ya={class:"etx-center"},Ea={class:"etx-flex Flex"},Va={class:"etx-flex__item Flex__item tab-l:c-10 tab-l:ml-1"},Na={class:"etx-flex Flex tab-m:c-2"},wa=["onClick"],Sa={class:"etx-card__item Card__item"},ka={class:"etx-flex Flex c-auto nowrap gh-50"},Fa=e.createElementVNode("div",{class:"etx-flex__item Flex__item shrink-0 grow-0"},[e.createElementVNode("div",{class:"CardSelect__input"},[e.createElementVNode("i",{class:"fas fa-square-check"}),e.createElementVNode("i",{class:"fal fa-square"})])],-1),$a={class:"etx-flex__item Flex__item grow-1"},Ia={class:"etx-text Text"},xa={class:"font-h3"},Ca={key:0,class:"font-size-small"},Da={class:"font-size-large font-color-primary"},Ba={class:"etx-flex__item Flex__item shrink-0 grow-0"},Oa={class:"Media CardSelect__media"},Ha=["src"],qa={class:"etx-card__item Card__item ph-0 pv-0"},za={class:"etx-accordion Accordion"},Ta={class:"etx-flex Flex c-auto nowrap a-center av-center"},Pa={class:"etx-flex__item Flex__item grow-1"},Aa={class:"etx-text Text a-center"},La={class:"font-weight-bold"},Ma=e.createElementVNode("br",null,null,-1),Ra=e.createElementVNode("span",{class:"font-size-smaller font-weight-bold font-color-light"},"Energiezufuhr",-1),Wa=e.createElementVNode("div",{class:"etx-flex__item Flex__item shrink-0 grow-0"},[e.createElementVNode("div",{class:"etx-text Text font-size-larger"},[e.createElementVNode("i",{class:"fat fa-angle-right"})])],-1),ja={class:"etx-flex__item Flex__item grow-1"},Za={class:"etx-text Text a-center"},Ya={class:"font-weight-bold"},Ja=e.createElementVNode("br",null,null,-1),Ua=e.createElementVNode("span",{class:"font-size-smaller font-weight-bold font-color-light"},"Energieverbrauch",-1),Ka=e.createElementVNode("div",{class:"etx-spacer Spacer h-50"},null,-1),Ga={class:"etx-text Text"},Xa={class:"stats"},Qa=e.createElementVNode("span",null,"Heizleistung",-1),va={class:"InfoButton"},en=e.createElementVNode("div",{class:"InfoButton__icon"},[e.createElementVNode("i",{class:"fal fa-info-circle"})],-1),tn={class:"InfoButton__content"},sn=e.createElementVNode("span",null,[e.createTextVNode("CO"),e.createElementVNode("sup",null,"2"),e.createTextVNode(" Emissionen")],-1),an={class:"InfoButton"},nn=e.createElementVNode("div",{class:"InfoButton__icon"},[e.createElementVNode("i",{class:"fal fa-info-circle"})],-1),on={class:"InfoButton__content"},rn=["onClick"],ln=[e.createElementVNode("div",{class:"etx-accordion__header__title Accordion__header__title","data-accordion-clickable":""},[e.createElementVNode("p",null,[e.createTextVNode("Berechnungsdetails"),e.createElementVNode("i",{class:"far fa-angle-down"})])],-1)];function dn(t,s,a,n,r,d){const o=e.resolveComponent("UsageForm");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(o,{modelValue:t.usageFormValue,"onUpdate:modelValue":s[0]||(s[0]=i=>t.usageFormValue=i),onFormSubmitted:s[1]||(s[1]=i=>t.init())},null,8,["modelValue"]),e.createElementVNode("div",ga,[e.createElementVNode("div",ba,[e.createElementVNode("div",ya,[e.createElementVNode("div",Ea,[e.createElementVNode("div",Va,[e.createElementVNode("div",Na,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.heatingOptions,i=>{var c,l,p,m,_,y,E;return e.openBlock(),e.createElementBlock("div",{key:i.heatingOption.name,class:"etx-flex__item Flex__item"},[e.createElementVNode("div",{class:e.normalizeClass(["etx-card","Card","CardSelect","border-radius","shadow","move-up",{selected:i.selected===!0,inactive:i.availability==="no"}]),onClick:h=>t.handleHeatingSelection(i.heatingOption.id)},[e.createElementVNode("div",Sa,[e.createElementVNode("div",ka,[Fa,e.createElementVNode("div",$a,[e.createElementVNode("div",Ia,[e.createElementVNode("p",xa,e.toDisplayString(i.heatingOption.name),1),i.availability==="needs_checking"?(e.openBlock(),e.createElementBlock("p",Ca,"Verfügbarkeitsprüfung nötig")):e.createCommentVNode("",!0),e.createElementVNode("p",Da,e.toDisplayString((c=i.calculationDetails)==null?void 0:c.price),1)])]),e.createElementVNode("div",Ba,[e.createElementVNode("div",Oa,[e.createElementVNode("img",{src:i.heatingOption.illustration.url},null,8,Ha)])])])]),e.createElementVNode("div",qa,[e.createElementVNode("div",za,[e.createElementVNode("div",{class:e.normalizeClass(["etx-accordion__content","Accordion__content",{collapsed:i.collapsed}])},[e.createElementVNode("div",Ta,[e.createElementVNode("div",Pa,[e.createElementVNode("div",Aa,[e.createElementVNode("p",null,[e.createElementVNode("span",La,e.toDisplayString((l=i.calculationDetails)==null?void 0:l.finalEnergyInput)+"kW",1),Ma,Ra])])]),Wa,e.createElementVNode("div",ja,[e.createElementVNode("div",Za,[e.createElementVNode("p",null,[e.createElementVNode("span",Ya,e.toDisplayString((p=i.calculationDetails)==null?void 0:p.energyConsumption)+"kWh",1),Ja,Ua])])])]),Ka,e.createElementVNode("div",Ga,[e.createElementVNode("table",Xa,[e.createElementVNode("tbody",null,[e.createElementVNode("tr",null,[e.createElementVNode("td",null,[Qa,e.createElementVNode("div",va,[en,e.createElementVNode("div",tn,[e.createElementVNode("p",null,e.toDisplayString((m=t.translations)==null?void 0:m.input),1)])])]),e.createElementVNode("td",null,e.toDisplayString((_=i.calculationDetails)==null?void 0:_.heatingPower)+"kWh ",1)]),e.createElementVNode("tr",null,[e.createElementVNode("td",null,[sn,e.createElementVNode("div",an,[nn,e.createElementVNode("div",on,[e.createElementVNode("p",null,e.toDisplayString((y=t.translations)==null?void 0:y.co2Emissions),1)])])]),e.createElementVNode("td",null,e.toDisplayString((E=i.calculationDetails)==null?void 0:E.co2Emissions)+" Tonnen ",1)])])])])],2),e.createElementVNode("div",{class:"etx-accordion__header Accordion__header",onClick:h=>t.handleAccordionClick(h,i.heatingOption.name)},ln,8,rn)])])],10,wa)])}),128))])])])])])])],64)}const cn=f(fa,[["render",dn]]),mn=e.defineComponent({name:"InquirySentNotification",data(){return{}},emits:["backToOverview"],methods:{backToOverview(){this.$emit("backToOverview",{target:b.landingView})}}}),pn={class:"row-fluid-wrapper"},hn={class:"etx-container"},_n={class:"etx-center"},un={class:"etx-flex Flex"},fn={class:"etx-flex__item Flex__item mob-l:c-10 tab-m:c-8 mob-l:ml-1"},gn=e.createElementVNode("div",{class:"etx-text Text"},[e.createElementVNode("p",{class:"font-eyebrow font-color-light"},"Vielen Dank"),e.createElementVNode("h1",null,"Anfrage erfolgreich versendet"),e.createElementVNode("p",{class:"font-size-large"},"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.")],-1),bn={class:"etx-button-list ButtonList"},yn=e.createElementVNode("a",{class:"etx-button Button"},[e.createElementVNode("span",{class:"etx-button__text"},"PDF herunterladen")],-1),En=[e.createElementVNode("span",{class:"etx-button__text"},"Zurück zur Übersicht",-1)];function Vn(t,s,a,n,r,d){return e.openBlock(),e.createElementBlock("div",pn,[e.createElementVNode("div",hn,[e.createElementVNode("div",_n,[e.createElementVNode("div",un,[e.createElementVNode("div",fn,[gn,e.createElementVNode("div",bn,[yn,e.createElementVNode("a",{class:"etx-button Button light",onClick:s[0]||(s[0]=(...o)=>t.backToOverview&&t.backToOverview(...o))},En)])])])])])])}const Nn=f(mn,[["render",Vn]]);class wn extends V{constructor(){super("https://development.services.swissenergyplanning.ch/api/")}async searchAdresses(s){const a=new FormData;a.append("searchtext",s.searchtext);const n={Authorization:"Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJpYmJfcHVibGljIiwibmJmIjoiMTY5NzYxODY0OSIsImp0aSI6ImU1ODgyOTY3LTllYTEtNDI5OC1hNjY1LWExNGJlMDMxZDZlYyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL25hbWVpZGVudGlmaWVyIjoiOWFkMmY0YzMtMmFlNi00NWM0LWFlNTQtYmM0MzVjZTcxOWEzIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiUHVibGljIiwiTWFuZGFudCI6ImliYiIsIkF1dGhvcml6ZWRSZXNvdXJjZXMiOiIqL2FwaS9zZXJ2aWNlcHJveHktY2FsbC1zZXF1ZW5jZS9EZWNpc2lvblRyZWUqOkdFVHwqL2FwaS9tYXJrZXRzZW5zZSo6R0VUfCovYXBpL3NlYXJjaGFkZHJlc3MqOlBPU1R8KmZlYXR1cmVjb2xsZWN0aW9uKjpHRVR8KmFwaS9jYW1wYWlnbmRhdGEqOlBVVHwqL2FwaS9hZGRyZXNzcG9pbnRzLW5lYXJlc3QtYnktY29vcmRpbmF0ZXMqOkdFVHwqL2FwaS9yb29mLXN0YXRpc3RpY3MtYnktYWRkcmVzc2lkKjpHRVQiLCJBdXRob3JpemVkUmVjb3JkcyI6ImFsbCIsIkV4Y2x1ZGVkRmllbGRzIjoibm9uZSIsIkZvcmJpZGRlbkZpbHRlcnMiOiJub25lIiwiZXhwIjoyMDEzMjM3ODQ5LCJpc3MiOiJDd0tBeTVqSW1ZU0pPUVFuaGxBd3J2S09JNUVrZjBTaSIsImF1ZCI6ImVuZXJneWFwcHMuY2gifQ.kp7EpOuKu9Npc8useSPhVPVaDIC12rj9b80s-BkwDR5Tl9oO3z3WBksCBxQjh9tgvGa_JmlxqPHDFPVE6USXFqYRbLK8QqcugOCJSQTHZPDcjIlQSx3YtPB9kBEBF44KBFEASnp_OFV3xQm_F_t6HSUAWQX3cuIPLY5Vh8yCm9NpSNoTv3YfLUWrP-QXJWuIwlJQbk9CWKtZtMv3pUpzSGa7U9WAhwjDe_DE4PwlJU7XRvxOY8DIU24Z1KwaL7UC-t3bAHF_kloXRtSjPaeeBm1yR3Zfkb6VpzWJsj-yaxq52UPYclSIZ05kmBbGLTFHHVw7lhcGpc1g--Z27nj9Dw","Content-Type":"multipart/form-data"};return await this.post("searchaddress",a,n)}async getAdressData(s){const a={Authorization:"Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJpYmJfcHVibGljIiwibmJmIjoiMTY5NzYxODY0OSIsImp0aSI6ImU1ODgyOTY3LTllYTEtNDI5OC1hNjY1LWExNGJlMDMxZDZlYyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL25hbWVpZGVudGlmaWVyIjoiOWFkMmY0YzMtMmFlNi00NWM0LWFlNTQtYmM0MzVjZTcxOWEzIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiUHVibGljIiwiTWFuZGFudCI6ImliYiIsIkF1dGhvcml6ZWRSZXNvdXJjZXMiOiIqL2FwaS9zZXJ2aWNlcHJveHktY2FsbC1zZXF1ZW5jZS9EZWNpc2lvblRyZWUqOkdFVHwqL2FwaS9tYXJrZXRzZW5zZSo6R0VUfCovYXBpL3NlYXJjaGFkZHJlc3MqOlBPU1R8KmZlYXR1cmVjb2xsZWN0aW9uKjpHRVR8KmFwaS9jYW1wYWlnbmRhdGEqOlBVVHwqL2FwaS9hZGRyZXNzcG9pbnRzLW5lYXJlc3QtYnktY29vcmRpbmF0ZXMqOkdFVHwqL2FwaS9yb29mLXN0YXRpc3RpY3MtYnktYWRkcmVzc2lkKjpHRVQiLCJBdXRob3JpemVkUmVjb3JkcyI6ImFsbCIsIkV4Y2x1ZGVkRmllbGRzIjoibm9uZSIsIkZvcmJpZGRlbkZpbHRlcnMiOiJub25lIiwiZXhwIjoyMDEzMjM3ODQ5LCJpc3MiOiJDd0tBeTVqSW1ZU0pPUVFuaGxBd3J2S09JNUVrZjBTaSIsImF1ZCI6ImVuZXJneWFwcHMuY2gifQ.kp7EpOuKu9Npc8useSPhVPVaDIC12rj9b80s-BkwDR5Tl9oO3z3WBksCBxQjh9tgvGa_JmlxqPHDFPVE6USXFqYRbLK8QqcugOCJSQTHZPDcjIlQSx3YtPB9kBEBF44KBFEASnp_OFV3xQm_F_t6HSUAWQX3cuIPLY5Vh8yCm9NpSNoTv3YfLUWrP-QXJWuIwlJQbk9CWKtZtMv3pUpzSGa7U9WAhwjDe_DE4PwlJU7XRvxOY8DIU24Z1KwaL7UC-t3bAHF_kloXRtSjPaeeBm1yR3Zfkb6VpzWJsj-yaxq52UPYclSIZ05kmBbGLTFHHVw7lhcGpc1g--Z27nj9Dw","Content-Type":"application/json"};return(await this.get(`marketsense/addresspoint-by-addressid/${s}`,a))[0]}}const S=new wn,w="sep-event",Sn="external-react-app",kn="sep-core",Fn=e.defineComponent({name:"SeppMap",methods:{},props:{adressData:{type:Object,required:!1}},setup(t,{emit:s}){const a=e.ref(!1),n=e.ref(null),r=()=>{const o=document.getElementById("someportalid");if(o){const i=new Event("input",{bubbles:!0});o.dispatchEvent(i)}else console.error("React input element not found")},d=o=>{o.detail.action==="loaded-marketsense"&&window.dispatchEvent(new CustomEvent(w,{detail:{action:"init-sep-map",payload:{mapContainerId:"sep-map"}}})),o.detail.action==="loaded-sep-contact-form"&&window.dispatchEvent(new CustomEvent(w,{detail:{action:"init-sep-contact-form",payload:{objectDisplayContainerId:"sep-contact-form"}}}))};return window.OMSConfig||(window.OMSConfig={env:"development",scriptId:kn,sepEventName:w,v:Date.now(),token:"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJpYmJfcHVibGljIiwibmJmIjoiMTY5NzYxODY0OSIsImp0aSI6ImU1ODgyOTY3LTllYTEtNDI5OC1hNjY1LWExNGJlMDMxZDZlYyIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL25hbWVpZGVudGlmaWVyIjoiOWFkMmY0YzMtMmFlNi00NWM0LWFlNTQtYmM0MzVjZTcxOWEzIiwiaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93cy8yMDA4LzA2L2lkZW50aXR5L2NsYWltcy9yb2xlIjoiUHVibGljIiwiTWFuZGFudCI6ImliYiIsIkF1dGhvcml6ZWRSZXNvdXJjZXMiOiIqL2FwaS9zZXJ2aWNlcHJveHktY2FsbC1zZXF1ZW5jZS9EZWNpc2lvblRyZWUqOkdFVHwqL2FwaS9tYXJrZXRzZW5zZSo6R0VUfCovYXBpL3NlYXJjaGFkZHJlc3MqOlBPU1R8KmZlYXR1cmVjb2xsZWN0aW9uKjpHRVR8KmFwaS9jYW1wYWlnbmRhdGEqOlBVVHwqL2FwaS9hZGRyZXNzcG9pbnRzLW5lYXJlc3QtYnktY29vcmRpbmF0ZXMqOkdFVHwqL2FwaS9yb29mLXN0YXRpc3RpY3MtYnktYWRkcmVzc2lkKjpHRVQiLCJBdXRob3JpemVkUmVjb3JkcyI6ImFsbCIsIkV4Y2x1ZGVkRmllbGRzIjoibm9uZSIsIkZvcmJpZGRlbkZpbHRlcnMiOiJub25lIiwiZXhwIjoyMDEzMjM3ODQ5LCJpc3MiOiJDd0tBeTVqSW1ZU0pPUVFuaGxBd3J2S09JNUVrZjBTaSIsImF1ZCI6ImVuZXJneWFwcHMuY2gifQ.kp7EpOuKu9Npc8useSPhVPVaDIC12rj9b80s-BkwDR5Tl9oO3z3WBksCBxQjh9tgvGa_JmlxqPHDFPVE6USXFqYRbLK8QqcugOCJSQTHZPDcjIlQSx3YtPB9kBEBF44KBFEASnp_OFV3xQm_F_t6HSUAWQX3cuIPLY5Vh8yCm9NpSNoTv3YfLUWrP-QXJWuIwlJQbk9CWKtZtMv3pUpzSGa7U9WAhwjDe_DE4PwlJU7XRvxOY8DIU24Z1KwaL7UC-t3bAHF_kloXRtSjPaeeBm1yR3Zfkb6VpzWJsj-yaxq52UPYclSIZ05kmBbGLTFHHVw7lhcGpc1g--Z27nj9Dw",overview:null,lang:"de-CH",endpoints:[{name:"a_by_a",url:"/api/marketsense/addresspoint-by-addressid/{addressid:int}"},{name:"ha_by_a",url:"/api/marketsense/heating-addresspoint-by-addressid/{addressid:int}"},{name:"e_by_a",url:"/api/marketsense/egidfeatures-by-addressid/{addressid:int}"},{name:"p_by_a",url:"/api/marketsense/parcelfeatures-by-addressid/{addressid:int}"},{name:"p_by_p",url:"/api/marketsense/parcelfeatures-by-parcelid/{parcelid:int}"},{name:"d_by_a",url:"/api/marketsense/districtfeatures-by-addressid/{addressid:int}"},{name:"pb_by_a",url:"/api/marketsense/parcelbuildfeatures-by-addressid/{addressid:int}"},{name:"pb_statp_by_p",url:"/api/marketsense/parcelbuildfeatures-statistics-by-parcel-by-addressid/{addressid:int}"},{name:"a_state_by_a",url:"/api/marketsense/addresspoints-statistics-by-egid-by-addressid/{addressid:int}"},{name:"a_statp_by_a",url:"/api/marketsense/addresspoints-statistics-by-parcel-by-addressid/{addressid:int}"},{name:"gwr_statp_by_a",url:"/api/marketsense/gwrdetails-statistics-by-parcel-by-addressid/{addressid:int}"},{name:"roof_statb_by_a",url:"/api/marketsense/roof-statistics-by-building-by-addressid/{addressid:int}"},{name:"roof_statp_by_a",url:"/api/marketsense/roof-statistics-by-parcel-by-addressid/{addressid:int}?flaecheintersection=[ge]10&belegungsgrad=0.75"},{name:"zef_state_by_a",url:"/api/marketsense/zefix-statistics-by-egid-by-addressid/{addressid:int}"},{name:"zef_statp_by_a",url:"/api/marketsense/zefix-statistics-by-parcel-by-addressid/{addressid:int}"},{name:"zef_statp_by_a",url:"/api/marketsense/zefix-statistics-by-parcel-by-addressid/{addressid:int}"},{name:"facade_stats_b",url:"/api/marketsense/facade-statistics-by-building-by-addressid/{addressid:int}?jwt={jwt:string}&flaeche=[ge]10&belegungsgrad=0.8&klasse=[ge]1"},{name:"facade_by_building",url:"/api/marketsense/geometries/facadefeatures-by-building-by-addressid/{addressid:int}"},{name:"facade_feat_parcelbuilding_by_a",url:"/api/marketsense/geometries/facadefeatures-by-parcelbuilding-by-addressid/{addressid:int}?belegungsgrad=0.3&klasse=[ge]3"},{name:"roof_statpb_by_a",url:"/api/marketsense/roof-statistics-by-parcelbuilding-by-addressid/{addressid:int}?flaecheintersection=[ge]10&belegungsgrad=0.75"},{name:"roof_feat_by_b_by_a",url:"/api/marketsense/geometries/rooffeatures-by-building-by-addressid/{addressid:int}"},{name:"roof_feat_by_p_by_a",url:"/api/marketsense/geometries/rooffeatures-by-parcel-by-addressid/{addressid:int}"},{name:"parcel_feat_by_a",url:"/api/marketsense/geometries/parcelfeatures-by-addressid/{addressid:int}"},{name:"decision_tree",customUrls:{development:"https://nodered.services.swissenergyplanning.ch/decisiontree/landingpage/{addressid:int}",staging:"https://nodered-staging.services.swissenergyplanning.ch/decisiontree/landingpage/{addressid:int}",production:"https://nodered.services.swissenergyplanning.ch/decisiontree/landingpage/{addressid:int}"}}],components:[{name:"sep-map",enabled:!0},{name:"sep-contact-form",enabled:!0}],drawConfig:{displayParcelGeometry:!0,displayBuildingRoofsGeometry:!1,displayParcelRoofsGeometry:!0,displayBuildingFacadeGeometry:!1,displayMarker:!0},mapConfig:{initialMapBounds:{_southWest:{lat:47.4521209935024,lng:8.136241479991028},_northEast:{lat:47.51012820180064,lng:8.286445184825011}},addressSearchZoom:18,mapLayer:"MAP_SWISSTOPO_SATELLITE"},heatmapOptions:{minOpacity:.8,radius:10,max:.1,gradient:{0:"blue",1:"blue"},blur:1},theme:{palette:{primary:{main:"#008b31"},secondary:{main:"#3D9BE9"}}},contactForm:{mode:"single",campaignNames:[{label:"PV-Contracting",preselect:!0,id:"pv_contracting"}],formComponents:[{name:"object-address",required:!1,portalId:"someportalid"}],objectAddress:{},postSubmitMessage:"Danke für Ihre Anfrage, wir melden uns gerne bei Ihnen."},initialClick:t.adressData,onUpdate:o=>{if(r(),["marketsense-data-changed_loading-end"].includes(o.type)){let i=document.getElementById("data-displayer"),l=o.data.payload.addressData.map(p=>({name:p.config.extra.name,data:p.data})).reduce((p,m)=>(p[m.name]=m.data,p),{});s("addressDataMapLoaded",l),i.innerHTML=` `}},data:{}}),e.onMounted(()=>{if(typeof window<"u"){window.removeEventListener(w,d),window.addEventListener(w,d);const o=document.getElementById("someportalid");if(o&&(o.style.display="none"),!document.getElementById("external-react-app")){const i=document.createElement("script");i.id="external-react-app",i.src=`https://services.swissenergyplanning.ch/open-marketsense/7.5.1/main.bundle.js?v=${Date.now()}&href=${window.location.href}`,i.onload=()=>{},n.value.appendChild(i)}}}),e.onBeforeUnmount(()=>{window.removeEventListener(w,d);const o=document.getElementById(Sn);o&&o.remove();const i=document.getElementById("sep-core");i&&(i.innerHTML="");const c=document.getElementById("sep-contact-form");c&&(c.innerHTML="")}),{elemContent:n,active:a}},data(){return{}}}),$n={class:"content",ref:"elemContent"},In=[e.createStaticVNode('
',1)];function xn(t,s,a,n,r,d){return e.openBlock(),e.createElementBlock("div",$n,In,512)}const Cn=f(Fn,[["render",xn]]),Dn=e.defineComponent({name:"SearchHeader",setup(){return{apiData:e.inject("apiData")}},data(){return{addressValue:"",display_map:!1,filteredOptions:[],showDropdown:!1,availabilityType:null}},props:{mapData:{type:Object,required:!1},availability:{type:Object,required:!0,default:null},redirectionUrl:{type:String,required:!0},receiveAddress:{type:Boolean,required:!1},addressJson:{type:Object,required:!1}},watch:{addressJson:{deep:!0,handler(){this.toggleDisplayMap()}},availability:{deep:!0,handler(){this.handleAvailabilityType()}}},components:{SeppMap:Cn},emits:["hero-search-submit","mapDataLaoded"],methods:{toggleDisplayMap(){this.addressJson&&(this.display_map=!0)},async filterOptions(){const t=await S.searchAdresses({searchtext:this.addressValue});this.filteredOptions=t.rows.filter(s=>T.some(a=>s.fields.address.includes(a.toString()))).slice(0,5)},async selectOption(t){const s=await S.getAdressData(t.fields.id),a={latlng:{lat:s.lat,lng:s.long},fillAddressForm:!0,address:{row:{fields:{address:t.fields.address,id:t.fields.id}},title:t.fields.address}},n=encodeURIComponent(JSON.stringify(a)),r=new URL(this.redirectionUrl);r.searchParams.set("address",n),window.location.href=r.toString()},hideDropdown(){setTimeout(()=>{this.showDropdown=!1},200)},handleMapDataLoad(t){this.$emit("mapDataLaoded",t)},handleAvailabilityType(){var r,d,o,i,c;((r=this.availability)==null?void 0:r.from)===void 0&&((d=this.availability)==null?void 0:d.to)===void 0&&(this.availabilityType="warning");const t=((o=this.mapData)==null?void 0:o.decision_tree.grosskunde)===!0,s=new Date().getFullYear(),a=new Date((i=this.availability)==null?void 0:i.from).getFullYear(),n=new Date((c=this.availability)==null?void 0:c.to).getFullYear();if(a&&a>s){this.availabilityType=t?"success":"warning";return}if(a&&n&&a<=s&&st?`Sie haben erst ab ${s} Fernwärmeanschluss`:s&&st?`Sie haben einen Fernwärmeanschluss ab ${s}`:"Leider haben wir keine Daten für Ihre Adresse"}},created(){var t;this.addressJson&&(this.addressValue=(t=this.addressJson)==null?void 0:t.address.row.fields.address,this.display_map=!0)}}),Bn=e.createStaticVNode('
ALT TEXT
',1),On={id:"app",class:"row-fluid-wrapper",style:{"margin-top":"100px"}},Hn={class:"etx-container pv-0 HeroSearchWrapper"},qn={class:"etx-center"},zn={class:"etx-flex Flex gv-0"},Tn={class:"etx-flex__item Flex__item tab-s:c-10 tab-m:c-9 tab-l:c-8 ml-1 tab-s:ml-2"},Pn={class:"HeroSearch shadow bottom"},An={class:"HeroSearch__content"},Ln={class:"etx-card Card"},Mn=e.createElementVNode("div",{class:"etx-card__item Card__item tab-s:ph-200 pt-75 tab-s:pt-100 pb-50"},[e.createElementVNode("div",{class:"etx-text Text"},[e.createElementVNode("p",{class:"font-weight-bold font-color-primary"},"Prüfen Sie Ihren Anschluss ans Fernwärmenetz:")])],-1),Rn={class:"etx-card__item Card__item tab-s:ph-200 pt-0 pb-75 tab-s:pb-100"},Wn={class:"SuggestionInput"},jn={key:0,class:"etx-card Card HeroSearch__content__suggestions bg-white-1 shadow"},Zn=["onMousedown"],Yn={class:"etx-item-list ItemList"},Jn={class:"etx-item Item"},Un=e.createElementVNode("div",{class:"etx-item__icon Item__icon"},[e.createElementVNode("i",{class:"fal fa-map-marker-alt"})],-1),Kn={class:"etx-item__text Item__text"},Gn=e.createElementVNode("div",{class:"HeroSearch__button"},[e.createElementVNode("button",{class:"etx-button Button light font-size-larger"},[e.createElementVNode("i",{class:"fal fa-arrow-right"})])],-1),Xn={id:"app",class:"row-fluid-wrapper",style:{"margin-top":"100px"}},Qn={class:"etx-container pv-0 HeroSearchWrapper"},vn={class:"etx-center"},ei={class:"etx-flex Flex gv-0"},ti={class:"etx-flex__item Flex__item tab-s:c-10 tab-m:c-9 tab-l:c-8 ml-1 tab-s:ml-2"},si={class:"HeroSearch shadow bottom"},ai={class:"HeroSearch__content"},ni={class:"etx-card Card"},ii=e.createElementVNode("div",{class:"etx-card__item Card__item tab-s:ph-200 pt-75 tab-s:pt-100 pb-50"},[e.createElementVNode("div",{class:"etx-text Text"},[e.createElementVNode("p",{class:"font-weight-bold font-color-primary"},"Prüfen Sie Ihren Anschluss ans Fernwärmenetz:")])],-1),oi={class:"etx-card__item Card__item tab-s:ph-200 pt-0 pb-75 tab-s:pb-100"},ri={class:"SuggestionInput"},li={key:0,class:"etx-card Card HeroSearch__content__suggestions bg-white-1 shadow"},di=["onMousedown"],ci={class:"etx-item-list ItemList"},mi={class:"etx-item Item"},pi=e.createElementVNode("div",{class:"etx-item__icon Item__icon"},[e.createElementVNode("i",{class:"fal fa-map-marker-alt"})],-1),hi={class:"etx-item__text Item__text"},_i=e.createElementVNode("div",{class:"HeroSearch__button"},[e.createElementVNode("button",{class:"etx-button Button light font-size-larger"},[e.createElementVNode("i",{class:"fal fa-arrow-right"})])],-1),ui={class:"row-fluid-wrapper",style:{"margin-top":"-72px"}},fi={class:"etx-container pv-0"},gi={class:"HeroMap border-radius-bottom-left"},bi={id:"map",class:"Map__inner","data-lat":"47.4842542","data-lng":"8.2118754"},yi={key:0,class:"row-fluid-wrapper"},Ei={class:"etx-container pv-0 HeroSearchWrapper"},Vi={class:"etx-center"},Ni={class:"etx-flex Flex gv-0"},wi={class:"etx-flex__item Flex__item tab-s:c-10 tab-m:c-9 tab-l:c-8 ml-1 tab-s:ml-2"},Si={class:"etx-card Card"},ki={class:"etx-card__item Card__item tab-s:ph-200 pv-75 tab-s:pv-100"},Fi={class:"etx-flex Flex c-auto nowrap gh-50"},$i=e.createElementVNode("div",{class:"etx-flex__item Flex__item shrink-0"},[e.createElementVNode("div",{class:"Icon"},[e.createElementVNode("i",{class:"fa-thin fa-check-circle"})])],-1),Ii={class:"etx-flex__item Flex__item"},xi={class:"etx-text Text"},Ci={key:0},Di=e.createElementVNode("br",null,null,-1),Bi={class:"font-weight-bold font-size-larger"},Oi={key:1},Hi=e.createElementVNode("br",null,null,-1),qi={class:"font-weight-bold font-size-larger"},zi=e.createElementVNode("div",{class:"etx-spacer Spacer"},null,-1);function Ti(t,s,a,n,r,d){const o=e.resolveComponent("SeppMap");return e.openBlock(),e.createElementBlock("div",null,[t.display_map===!1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[Bn,e.createElementVNode("div",On,[e.createElementVNode("div",Hn,[e.createElementVNode("div",qn,[e.createElementVNode("div",zn,[e.createElementVNode("div",Tn,[e.createElementVNode("div",Pn,[e.createElementVNode("div",An,[e.createElementVNode("div",Ln,[Mn,e.createElementVNode("div",Rn,[e.createElementVNode("div",Wn,[e.withDirectives(e.createElementVNode("input",{type:"text",placeholder:"Geben Sie Ihre Adresse ein","onUpdate:modelValue":s[0]||(s[0]=i=>t.addressValue=i),onInput:s[1]||(s[1]=(...i)=>t.filterOptions&&t.filterOptions(...i)),onFocus:s[2]||(s[2]=i=>t.showDropdown=!0),onBlur:s[3]||(s[3]=(...i)=>t.hideDropdown&&t.hideDropdown(...i))},null,544),[[e.vModelText,t.addressValue]]),t.filteredOptions.length&&t.showDropdown?(e.openBlock(),e.createElementBlock("div",jn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.filteredOptions,i=>(e.openBlock(),e.createElementBlock("div",{key:i.id,onMousedown:e.withModifiers(c=>t.selectOption(i),["prevent"]),class:"etx-card__item Card__item tab-s:ph-200 pv-25 tab-s:pv-50"},[e.createElementVNode("div",Yn,[e.createElementVNode("div",Jn,[Un,e.createElementVNode("div",Kn,[e.createElementVNode("p",null,e.toDisplayString(i.fields.address),1)])])])],40,Zn))),128))])):e.createCommentVNode("",!0)])])])]),Gn])])])])])])],64)):e.createCommentVNode("",!0),t.display_map===!0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Xn,[e.createElementVNode("div",Qn,[e.createElementVNode("div",vn,[e.createElementVNode("div",ei,[e.createElementVNode("div",ti,[e.createElementVNode("div",si,[e.createElementVNode("div",ai,[e.createElementVNode("div",ni,[ii,e.createElementVNode("div",oi,[e.createElementVNode("div",ri,[e.withDirectives(e.createElementVNode("input",{type:"text",placeholder:"Geben Sie Ihre Adresse ein","onUpdate:modelValue":s[4]||(s[4]=i=>t.addressValue=i),onInput:s[5]||(s[5]=(...i)=>t.filterOptions&&t.filterOptions(...i)),onFocus:s[6]||(s[6]=i=>t.showDropdown=!0),onBlur:s[7]||(s[7]=(...i)=>t.hideDropdown&&t.hideDropdown(...i))},null,544),[[e.vModelText,t.addressValue]]),t.filteredOptions.length&&t.showDropdown?(e.openBlock(),e.createElementBlock("div",li,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.filteredOptions,i=>(e.openBlock(),e.createElementBlock("div",{key:i.id,onMousedown:e.withModifiers(c=>t.selectOption(i),["prevent"]),class:"etx-card__item Card__item tab-s:ph-200 pv-25 tab-s:pv-50"},[e.createElementVNode("div",ci,[e.createElementVNode("div",mi,[pi,e.createElementVNode("div",hi,[e.createElementVNode("p",null,e.toDisplayString(i.fields.address),1)])])])],40,di))),128))])):e.createCommentVNode("",!0)])])])]),_i])])])])])]),e.createElementVNode("div",ui,[e.createElementVNode("div",fi,[e.createElementVNode("div",gi,[e.createElementVNode("div",bi,[e.createVNode(o,{onAddressDataMapLoaded:t.handleMapDataLoad,adressData:t.addressJson},null,8,["onAddressDataMapLoaded","adressData"])])])])]),t.availabilityType!==null?(e.openBlock(),e.createElementBlock("div",yi,[e.createElementVNode("div",Ei,[e.createElementVNode("div",Vi,[e.createElementVNode("div",Ni,[e.createElementVNode("div",wi,[e.createElementVNode("div",{class:e.normalizeClass(["HeroNotification","bottom",{primary:t.availabilityType==="success",secondary:t.availabilityType==="warning"}])},[e.createElementVNode("div",Si,[e.createElementVNode("div",ki,[e.createElementVNode("div",Fi,[$i,e.createElementVNode("div",Ii,[e.createElementVNode("div",xi,[t.availabilityType==="success"?(e.openBlock(),e.createElementBlock("p",Ci,[e.createTextVNode("Gute Nachricht!"),Di,e.createElementVNode("span",Bi,e.toDisplayString(t.availabilityMessage),1)])):e.createCommentVNode("",!0),t.availabilityType==="warning"?(e.openBlock(),e.createElementBlock("p",Oi,[e.createTextVNode("Es tut uns leid …"),Hi,e.createElementVNode("span",qi,e.toDisplayString(t.availabilityMessage),1)])):e.createCommentVNode("",!0)])])])])])],2)])])])])])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),zi])}const B=f(Dn,[["render",Ti]]),Pi=e.defineComponent({name:"NoDataAvailableView",data(){return{}},emits:["backToOverview"],methods:{backToOverview(){this.$emit("backToOverview",{target:b.landingView})}}}),Ai={class:"row-fluid-wrapper"},Li={class:"etx-container"},Mi={class:"etx-center"},Ri={class:"etx-flex Flex"},Wi={class:"etx-flex__item Flex__item mob-l:c-10 tab-m:c-8 mob-l:ml-1"},ji=e.createElementVNode("div",{class:"etx-text Text"},[e.createElementVNode("h1",null,"Versuchen Sie es mit einer anderen Adresse"),e.createElementVNode("p",{class:"font-size-large"},"An der aktuellen Adresse können wir Ihnen leider noch keinen Fernwärmeanschluss bieten. Gerne können Sie noch weitere Adressen auf einen möglichen Anschluss testen.")],-1),Zi={class:"etx-button-list ButtonList"},Yi=[e.createElementVNode("span",{class:"etx-button__text"},"Zurück zur Übersicht",-1)];function Ji(t,s,a,n,r,d){return e.openBlock(),e.createElementBlock("div",Ai,[e.createElementVNode("div",Li,[e.createElementVNode("div",Mi,[e.createElementVNode("div",Ri,[e.createElementVNode("div",Wi,[ji,e.createElementVNode("div",Zi,[e.createElementVNode("a",{class:"etx-button Button light",onClick:s[0]||(s[0]=(...o)=>t.backToOverview&&t.backToOverview(...o))},Yi)])])])])])])}const Ui=f(Pi,[["render",Ji]]),Ki=e.defineComponent({name:"KliqApp",data(){return{display_map:!1,loaderIsRunning:!1,activePage:null,initialAddress:null,selectedHeatingIds:[],selectedSupplier:null,redirectionUrl:"",contactPerson:null,inquiryForm:{company:"",firstName:"",lastName:"",email:"",phone:""},supplierForm:{randomSupplier:null,manualSuppliers:[],randomSupplierSelected:!0},mapData:null,availability:{from:void 0,to:void 0},requestError:!1,addressData:{energySource:"",heatingPower:0,finalEnergyInput:0,oldEfficiency:0,newEfficiency:0,energyConsumption:0,co2EmissionFactor:0,co2Emissions:0}}},props:{input:{type:Object,required:!0}},components:{SearchHeader:B,AddressDetails:ge,HeatingOptionTiles:cn,NoDataAvailableView:Ui,InquirySentNotification:Nn,ConsultationBySupplierInquiry:Ut,ConsultationInquiry:ea},methods:{init(){const t=new URL(window.location.href),s=t.origin+t.pathname;this.redirectionUrl=s,this.initialAddress=this.getAddressFromQueryParams(),this.initialAddress===null&&this.changePageState(b.addressDataNotAvailableView)},getAddressFromQueryParams(){const s=new URL(window.location.href).searchParams.get("address");if(s)try{return JSON.parse(decodeURIComponent(s))}catch(a){console.error("Failed to decode address data:",a)}return null},async handleFormSubmission(t){var d,o,i,c,l;let s;const a={companyName:this.inquiryForm.company,firstName:this.inquiryForm.firstName,lastName:this.inquiryForm.lastName,email:this.inquiryForm.email,phone:this.inquiryForm.phone},n=this.apiData.clusters.find(p=>{var m;return p.name===((m=this.mapData)==null?void 0:m.decision_tree.perimeter)}),r={street:((d=this.mapData)==null?void 0:d.a_by_a[0].street)??"",houseNumber:((o=this.mapData)==null?void 0:o.a_by_a[0].houseNumber)??"",zipCode:((i=this.mapData)==null?void 0:i.a_by_a[0].swissZipCode)??"",city:((c=this.mapData)==null?void 0:c.a_by_a[0].town)??"",cluster:(n==null?void 0:n.name)??"",energySource:this.addressData.energySource,energySourceConstructionDate:((l=this.mapData)==null?void 0:l.decision_tree.aktualisierungsdatumHeizung)??"",heatingPower:this.addressData.heatingPower,energyConsumption:this.addressData.energyConsumption??0,co2Emissions:this.addressData.co2Emissions};switch(t){case"supplierInquiry":{const p={hubSpotContactId:(n==null?void 0:n.hubSpotEmployeeId)??"",hubSpotProductIds:this.apiData.heatingSystems.filter(_=>this.selectedHeatingIds.includes(_.id)).map(_=>_.hubSpotProductId),suppliers:this.supplierForm.randomSupplierSelected&&this.supplierForm.randomSupplier!==null?[this.supplierForm.randomSupplier.name]:this.supplierForm.manualSuppliers.map(_=>_.name)},m={contact:a,address:r,options:p};s=await N.submitSupplierInquiry(m),s?(this.activePage=b.inquiryFormSentView,window.scrollTo({top:0,behavior:"smooth"})):this.setRequestError(!0);break}case"heatingSystemInquiry":{const p={hubSpotContactId:(n==null?void 0:n.hubSpotEmployeeId)??"",suppliers:["IBB"]},m={contact:a,address:r,options:p};s=await N.submitHeatingSystemInquiry(m),s?(this.activePage=b.inquiryFormSentView,window.scrollTo({top:0,behavior:"smooth"})):this.setRequestError(!0);break}default:console.error("unkown form type");break}this.setLoader(!1)},handleContactSelect(t){this.contactPerson=t},handleMapDataLoad(t){if(t.decision_tree.perimeter===null||t.decision_tree.bedarfheizleistung===null){this.changePageState(b.addressDataNotAvailableView);return}t.decision_tree.grosskunde===!1?this.changePageState(b.nonTargetCustomerView):this.changePageState(b.targetCustomerView);const s=this.apiData.clusters.find(a=>a.name===t.decision_tree.perimeter);s!==void 0&&(this.availability.from=s.from,this.availability.to=s.to),this.mapData=t,this.addressData=this.calculateData(t)},handleHeatingSelection(t){this.selectedHeatingIds.includes(t)?this.selectedHeatingIds=this.selectedHeatingIds.filter(s=>s!==t):this.selectedHeatingIds.push(t)},calculateData(t){const s=D(t==null?void 0:t.ha_by_a[0].waermequelleHeizung1,"id"),a=s.energySource,n=s.dataKey;if(n==="")throw new Error(`No calculations for Heation typ ${s.energySource} possible`);let r,d,o,i,c,l,p;r=parseInt(t.decision_tree.bedarfheizleistung),o=F[n],c=$[n],l=I[n];const m=(t.decision_tree.bedarfheizung??0)+(t.decision_tree.bedarfwarmwasser??0);return i=m!==0?m/c:0,d=i/o,p=d*l/1e6,{energySource:a,heatingPower:parseFloat(r.toFixed(0)),finalEnergyInput:parseFloat(d.toFixed(2)),oldEfficiency:o,newEfficiency:c,energyConsumption:parseFloat(i.toFixed(2)),co2EmissionFactor:parseFloat(l.toFixed(2)),co2Emissions:parseFloat(p.toFixed(1))}},resetPage(){const t=new URL(this.input.url);window.location.href=t.toString()},setLoader(t){this.loaderIsRunning=t},setRequestError(t){this.requestError=t},changePageState(t){this.activePage=t},isTargetCustomerView(){var t;return((t=this.activePage)==null?void 0:t.name)==="targetCustomerView"},isNonTargetCustomerView(){var t;return((t=this.activePage)==null?void 0:t.name)==="nonTargetCustomerView"},isInquiryFormSentView(){var t;return((t=this.activePage)==null?void 0:t.name)==="inquiryFormSentView"},isAddressDataNotAvailable(){var t;return((t=this.activePage)==null?void 0:t.name)==="addressDataNotAvailableView"}},setup(){const t=e.ref({clusters:[],teamMembers:[],suppliers:[],heatingSystems:[]});return e.provide("apiData",t),(async()=>{try{const a={clusters:[],teamMembers:[],suppliers:[],heatingSystems:[]};a.clusters=await N.getClusters(),a.teamMembers=await N.getTeamMembers(),a.suppliers=await N.getCompanies(),a.heatingSystems=await N.getHeatingOptions(),a.heatingSystems=a.heatingSystems.sort((n,r)=>r.prio-n.prio),t.value={...t.value,...a}}catch(a){console.error("Failed to fetch data:",a)}})(),{apiData:t}},created(){this.init()}});function Gi(t,s,a,n,r,d){var y,E;const o=e.resolveComponent("SearchHeader"),i=e.resolveComponent("AddressDetails"),c=e.resolveComponent("ConsultationInquiry"),l=e.resolveComponent("HeatingOptionTiles"),p=e.resolveComponent("ConsultationBySupplierInquiry"),m=e.resolveComponent("NoDataAvailableView"),_=e.resolveComponent("InquirySentNotification");return e.openBlock(),e.createElementBlock(e.Fragment,null,[t.isInquiryFormSentView()===!1?(e.openBlock(),e.createBlock(o,{key:0,onMapDataLaoded:t.handleMapDataLoad,mapData:t.mapData,redirectionUrl:t.redirectionUrl,availability:t.availability,receiveAddress:!0,addressJson:t.initialAddress},null,8,["onMapDataLaoded","mapData","redirectionUrl","availability","addressJson"])):e.createCommentVNode("",!0),t.isTargetCustomerView()?(e.openBlock(),e.createBlock(i,{key:1,mapData:t.mapData,translations:(y=t.input)==null?void 0:y.translations.addressDetails,addressData:t.addressData},null,8,["mapData","translations","addressData"])):e.createCommentVNode("",!0),t.isTargetCustomerView()?(e.openBlock(),e.createBlock(c,{key:2,modelValue:t.inquiryForm,"onUpdate:modelValue":s[0]||(s[0]=h=>t.inquiryForm=h),onFormValidatedAndSubmitted:s[1]||(s[1]=h=>t.handleFormSubmission(h.formType)),onContactPersonSelected:s[2]||(s[2]=h=>t.handleContactSelect(h.contactPerson)),onLoaderSet:s[3]||(s[3]=h=>t.setLoader(h.value)),loaderIsRunning:t.loaderIsRunning,requestError:t.requestError,onRequestErrorSet:s[4]||(s[4]=h=>t.setRequestError(h.value)),mapData:t.mapData},null,8,["modelValue","loaderIsRunning","requestError","mapData"])):e.createCommentVNode("",!0),t.isNonTargetCustomerView()?(e.openBlock(),e.createBlock(l,{key:3,onHeatingOptionSelected:t.handleHeatingSelection,mapData:t.mapData,translations:(E=t.input)==null?void 0:E.translations.heatingOptions},null,8,["onHeatingOptionSelected","mapData","translations"])):e.createCommentVNode("",!0),t.isNonTargetCustomerView()?(e.openBlock(),e.createBlock(p,{key:4,supplierForm:t.supplierForm,"onUpdate:supplierForm":s[5]||(s[5]=h=>t.supplierForm=h),"inquiry-form":t.inquiryForm,"onUpdate:inquiryForm":s[6]||(s[6]=h=>t.inquiryForm=h),onLoaderSet:s[7]||(s[7]=h=>t.setLoader(h.value)),loaderIsRunning:t.loaderIsRunning,onFormValidatedAndSubmitted:s[8]||(s[8]=h=>t.handleFormSubmission(h.formType)),selectedHeatingIds:t.selectedHeatingIds,requestError:t.requestError,onRequestErrorSet:s[9]||(s[9]=h=>t.setRequestError(h.value))},null,8,["supplierForm","inquiry-form","loaderIsRunning","selectedHeatingIds","requestError"])):e.createCommentVNode("",!0),t.isAddressDataNotAvailable()?(e.openBlock(),e.createBlock(m,{key:5,onBackToOverview:s[10]||(s[10]=h=>t.resetPage())})):e.createCommentVNode("",!0),t.isInquiryFormSentView()?(e.openBlock(),e.createBlock(_,{key:6,onBackToOverview:s[11]||(s[11]=h=>t.resetPage())})):e.createCommentVNode("",!0)],64)}const Xi=f(Ki,[["render",Gi]]),Qi=e.defineComponent({name:"KliqSearch",data(){return{}},components:{SearchHeader:B},props:{input:{type:Object,required:!0}},methods:{init(){},async selectOption(t){const s=await S.getAdressData(t.fields.id),a={latlng:{lat:s.lat,lng:s.long},fillAddressForm:!0,address:{row:{fields:{address:t.fields.address,id:t.fields.id}},title:t.fields.address}},n=encodeURIComponent(JSON.stringify(a)),r=new URL(this.input.url);r.searchParams.set("address",n),window.location.href=r.toString()}},created(){this.init()}});function vi(t,s,a,n,r,d){const o=e.resolveComponent("SearchHeader");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(o,{onHeroSearchSubmit:s[0]||(s[0]=i=>t.selectOption(i)),redirectionUrl:t.input.url},null,8,["redirectionUrl"])])}const eo=f(Qi,[["render",vi]]);u.KliqApp=Xi,u.KliqSearch=eo,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})});