const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./vendor-vue3-html2pdf-DBfPfU4j.css","./default-Dy-u68a0.css","./dots-BHKtFRcU.css","./lazyDots-CPLDdB3Y.css","./segment-DrUyOzkH.css","./spinner-Dr9QTjKa.css","./submitSkeleton-CIc8N8q4.css","./skeletonCalculator-07tfVbI5.css","./ProBadge-Bh7l2BmQ.css","./Button-nVDREZcB.css","./Popup-D_SeLUeJ.css","./ThankYouPage-CUYYzeot.css","./index-COFY5ciX.css"])))=>i.map(i=>d[i]);
import{d as R}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{_ as s,c as N}from"./convert-case-to-camel-case.utils-CK5dBN7n.js";import{u as B}from"./appStore-CFAkQG2b.js";import{u as v}from"./appearanceStore-Cp-euDX2.js";import{u as F}from"./settingsStore-8bwiLMEn.js";import{u as x,a as $,b as q,c as M,d as W,h as j,g as z}from"./fieldsStore-CNpVuoPu.js";import{u as Y}from"./translationsStore-D6vLzgNA.js";import{d as T,e as y,$ as i,f as A,i as u,k as p,v as b,C as G,a as H,b as K,m as g,j as Q,x as U,a0 as J}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{d as C,c as X}from"./vendor-pinia-BSPefQhS.js";import{u as Z}from"./pageBreakerStore-Bkj6mcUr.js";import"./vendor-vueform-slider-CCH9_7pb.js";import{r as I,u as tt}from"./vendor-vue-reactivity-CheHbvBM.js";import"./vendor-vue-shared-DrzsEcag.js";import"./vendor-moment-Cv92BTSA.js";import"./vendor-bootstrap-CCU-90um.js";import"./vendor-jspdf-UFhKzYHA.js";import"./vendor-php-date-formatter-DSpPwBF8.js";import"./callbackStore-BhxBUA6V.js";const et={class:"ccb-loader"},ot=T({__name:"Loader",props:{type:{}},setup(o){const t=v(),n=y(()=>{if(Number(t.getAppearanceLoaderType)===0)return i(()=>s(()=>import("./default-BxgBCu3j.js"),__vite__mapDeps([0,1]),import.meta.url));if(Number(t.getAppearanceLoaderType)===1)return i(()=>s(()=>import("./dots-DPlKQS0n.js"),__vite__mapDeps([0,2]),import.meta.url));if(Number(t.getAppearanceLoaderType)===2)return i(()=>s(()=>import("./lazyDots-BKai18pw.js"),__vite__mapDeps([0,3]),import.meta.url));if(Number(t.getAppearanceLoaderType)===3)return i(()=>s(()=>import("./segment-C846i5cC.js"),__vite__mapDeps([0,4]),import.meta.url));if(Number(t.getAppearanceLoaderType)===4)return i(()=>s(()=>import("./spinner-D3rUS3fZ.js"),__vite__mapDeps([0,5]),import.meta.url));if(Number(t.getAppearanceLoaderType)===5)return o.type==="submit"?i(()=>s(()=>import("./submitSkeleton-DcUx_IGU.js"),__vite__mapDeps([0,6]),import.meta.url)):i(()=>s(()=>import("./skeletonCalculator-BaohDd0v.js"),__vite__mapDeps([7]),import.meta.url))});return(r,c)=>(u(),A("div",et,[(u(),p(b(n.value)))]))}}),at=C("main_store",{state:()=>({calcId:null}),getters:{getCalcId:o=>o.calcId},actions:{setCalcId(o){this.calcId=o}}}),rt=C("total_summary_store",{state:()=>({totalSummary:null}),getters:{getTotalSummary:o=>o.totalSummary},actions:{initTotalSummary(o={}){const t=N(o);this.totalSummary=t}}}),st={class:"ccb-app-container"},it=["data-calc-id"],nt=T({__name:"App",setup(o){const t=B(),n=v(),r=F(),c=x(),_=$(),L=q(),h=M(),P=Z(),E=Y(),S=W(),D=at(),w=rt(),m=G("calc_id"),k=`calc_data_${m}`,e=window[k],d=I(m);"settings"in e&&(D.setCalcId(+m),t.setProStatus(e.pro_active),t.setCalcId(+m),t.setCalcId(e.settings.calc_id),t.setDateFormat(e.dateFormat),t.setCalcTitle(e.settings.title),r.initSettingsStore(e.settings),n.initAppearanceStore(e.appearance),h.initOrderForm(e.form_fields),r.initGeolocationSettingsStore(e.geolocation),r.initPdfSettings(e.pdf_settings),r.initQuoteSettings(e.quote_settings),w.initTotalSummary(e.total_summary),E.initTranslations(e.translations),t.setCustomThankYouPage(e.is_custom_thank_you_page),S.setOrderId(e.order_id),S.setOrderData(e.order_data));const O=y(()=>t.isThankYouPage?i(()=>s(()=>import("./index-C8cszr53.js"),__vite__mapDeps([8,9,0,10,11]),import.meta.url)):i(()=>s(()=>import("./index-D2j7l29-.js").then(a=>a.i),__vite__mapDeps([0,8,9,10,11,12]),import.meta.url))),l=()=>{t.updateMobileStatus(window.innerWidth<=640)};return H(()=>{l(),window.addEventListener("resize",l),t.checkIfLive(),_.initConditions(e.conditions),r.initLang(e.language),_.initWooProductsConditions(),c.initFields(e.fields),c.initPageBreaker(e.fields),L.initDiscounts(e.discounts),P.initPageConditions(),window.addEventListener("load",()=>{setTimeout(()=>{t.updateAppLoader(!1),setTimeout(()=>{var f;const a=document.querySelector(`.ccb-app-container [data-calc-id="${d.value}"]`);a&&!!(a!=null&&a.offsetWidth||a!=null&&a.offsetHeight||(f=a==null?void 0:a.getClientRects())!=null&&f.length)&&j({action:"ccb_calc_views",nonce:z("ccb_calc_views"),data:{calc_id:d.value}})},1e3)},0)})}),K(()=>{window.removeEventListener("resize",l)}),(a,V)=>(u(),A("div",st,[(u(),p(J,null,{default:g(()=>[U("div",{"data-calc-id":d.value},[(u(),p(b(O.value)))],8,it)]),fallback:g(()=>[Q(tt(ot))]),_:1}))]))}}),ct=document.querySelectorAll(".ccb-main-widget");ct.forEach(o=>{const t=I(null),n=o.getAttribute("data-calc-id"),r=R(nt).provide("calc_id",n);t.value=r;const c=X();r.use(c),r.mount(o)});export{ot as _,at as a,rt as u};
//# sourceMappingURL=widget-RmM7xAIR.js.map
