ie)for(;B<=$;)ce(C[B],N,V,!0),B++;else{const se=B,ge=B,Ae=new Map;for(B=ge;B<=ie;B++){const Ot=m[B]=G?Zn(m[B]):yn(m[B]);Ot.key!=null&&Ae.set(Ot.key,B)}let we,We=0;const jt=ie-ge+1;let oi=!1,Ef=0;const as=new Array(jt);for(B=0;B {const{el:V,type:W,transition:K,children:G,shapeFlag:B}=C;if(B&6){ae(C.component.subTree,m,p,A);return}if(B&128){C.suspense.move(m,p,A);return}if(B&64){W.move(C,m,p,me);return}if(W===ke){r(V,m,p);for(let $=0;$ ie)for(;B<=R;)ce(C[B],N,V,!0),B++;else{const se=B,ge=B,Ae=new Map;for(B=ge;B<=ie;B++){const Ot=m[B]=G?Zn(m[B]):yn(m[B]);Ot.key!=null&&Ae.set(Ot.key,B)}let we,We=0;const jt=ie-ge+1;let oi=!1,Ef=0;const as=new Array(jt);for(B=0;B {const{el:V,type:W,transition:K,children:G,shapeFlag:B}=C;if(B&6){ae(C.component.subTree,m,p,A);return}if(B&128){C.suspense.move(m,p,A);return}if(B&64){W.move(C,m,p,me);return}if(W===ke){r(V,m,p);for(let R=0;Rqi(c,a))?r.push(a):n.push(a));const l=t.matched[o];l&&(e.matched.find(c=>qi(c,l))||i.push(l))}return[n,r,i]}if(!document.querySelector("style[data-shopicon]")){const t=document.createElement("style");t.setAttribute("data-shopicon",!0),t.innerHTML=`
+ */const _i=typeof window<"u";function QC(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const Me=Object.assign;function Cl(t,e){const n={};for(const r in e){const i=e[r];n[r]=hn(i)?i.map(t):t(i)}return n}const xs=()=>{},hn=Array.isArray,JC=/\/$/,ZC=t=>t.replace(JC,"");function Sl(t,e,n="/"){let r,i={},s="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return aqi(c,a))?r.push(a):n.push(a));const l=t.matched[o];l&&(e.matched.find(c=>qi(c,l))||i.push(l))}return[n,r,i]}if(!document.querySelector("style[data-shopicon]")){const t=document.createElement("style");t.setAttribute("data-shopicon",!0),t.innerHTML=`
[data-shopicon] { display: block; width: 24px; aspect-ratio: 1; }
[data-shopicon][size=m] { width: 32px; }
[data-shopicon][size=l] { width: 48px; }
@@ -38,23 +38,23 @@ var Rv=Object.defineProperty;var Fv=(t,e,n)=>e in t?Rv(t,e,{enumerable:!0,config
[data-shopicon] path:not([fill]),
[data-shopicon] polygon:not([fill]),
[data-shopicon] rect:not([fill]) { fill: currentColor; }
- `,document.head.appendChild(t)}var tA='';class nA extends HTMLElement{connectedCallback(){this.setAttribute("data-shopicon",!0),this.innerHTML=tA}}window.customElements.define("shopicon-regular-arrowup",nA);var rA='';class iA extends HTMLElement{connectedCallback(){this.setAttribute("data-shopicon",!0),this.innerHTML=rA}}window.customElements.define("shopicon-regular-menu",iA);var sA='';class oA extends HTMLElement{connectedCallback(){this.setAttribute("data-shopicon",!0),this.innerHTML=sA}}window.customElements.define("shopicon-regular-newtab",oA);var W_={exports:{}},Ju={exports:{}},z_=function(e,n){return function(){for(var i=new Array(arguments.length),s=0;s$1
").trim()}const RP={name:"TelemetrySettings",props:{sponsor:String},data(){return{enabled:!1,error:null}},async mounted(){await this.update()},methods:{async change(t){try{this.error=null;const e=await ot.post(`settings/telemetry/${t.target.checked}`);this.enabled=e.data.result}catch(e){e.response&&(this.error=$P("**Error:** "+e.response.data.error),this.enabled=!1)}},async update(){try{const t=await ot.get("settings/telemetry");this.enabled=t.data.result}catch(t){console.error(t)}}}},FP={class:"form-check form-switch my-3"},VP=["disabled"],HP={class:"form-check-label"},BP={for:"telemetryEnabled"},UP={href:"https://docs.evcc.io/docs/guides/setup/#telemetry--community-daten",target:"_blank"},jP={key:1},WP=["innerHTML"];function zP(t,e,n,r,i,s){const o=ue("i18n-t");return I(),H("div",FP,[qt(y("input",{id:"telemetryEnabled","onUpdate:modelValue":e[0]||(e[0]=a=>i.enabled=a),class:"form-check-input",type:"checkbox",role:"switch",disabled:!n.sponsor,onChange:e[1]||(e[1]=(...a)=>s.change&&s.change(...a))},null,40,VP),[[s2,i.enabled]]),y("div",HP,[y("label",BP,[Le(F(t.$t("footer.telemetry.optIn"))+" ",1),n.sponsor?(I(),Te(o,{key:0,tag:"span",keypath:"footer.telemetry.optInMoreDetails"},{default:Ze(()=>[y("a",UP,F(t.$t("footer.telemetry.optInMoreDetailsLink")),1)]),_:1})):(I(),H("span",jP,F(t.$t("footer.telemetry.optInSponsorship")),1))]),i.error?(I(),H("div",{key:0,class:"errorMessage my-1 text-danger",innerHTML:i.error},null,8,WP)):_e("",!0)])])}const KP=Ee(RP,[["render",zP],["__scopeId","data-v-af252ca6"]]),YP={name:"Savings",components:{Sponsor:lP,SavingsTile:mv,LiveCommunity:DP,TelemetrySettings:KP},mixins:[Nt],props:{selfConsumptionPercent:Number,since:{type:Number,default:0},sponsor:String,amount:{type:Number,default:0},effectivePrice:{type:Number,default:0},totalCharged:{type:Number,default:0},gridCharged:{type:Number,default:0},selfConsumptionCharged:{type:Number,default:0},gridPrice:{type:Number},feedInPrice:{type:Number},currency:String},data(){return{communityView:!1,telemetryEnabled:!1}},computed:{percent(){return Math.round(this.selfConsumptionPercent)||0},effectivePriceFormatted(){const[t,e]=this.fmtPricePerKWh(this.effectivePrice,this.currency).split(" ");return{value:t,unit:e}},startDate(){return new Date(this.since*1e3)}},methods:{showCommunity(){this.communityView=!0},showMyData(){this.communityView=!1}}},qP={class:"btn btn-link pe-0 text-decoration-none evcc-default-text text-nowrap d-flex align-items-end","data-bs-toggle":"modal","data-bs-target":"#savingsModal"},GP={class:"d-inline d-sm-none"},XP={class:"d-none d-sm-inline"},QP=y("shopicon-regular-sun",{class:"ms-2 text-evcc"},null,-1),JP={id:"savingsModal",ref:"modal",class:"modal fade text-dark","data-bs-backdrop":"true",tabindex:"-1",role:"dialog","aria-hidden":"true"},ZP={class:"modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable",role:"document"},e3={class:"modal-content"},t3={class:"modal-header"},n3={class:"modal-title"},r3=y("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),i3={class:"modal-body"},s3={class:"nav nav-tabs"},o3={class:"nav-item"},a3={class:"nav-item"},l3={key:0,class:"my-4"},c3={class:"d-block d-lg-flex mb-2 justify-content-between"},u3={class:"my-3 lh-2"},f3={key:1,class:"my-4"};function d3(t,e,n,r,i,s){const o=ue("SavingsTile"),a=ue("LiveCommunity"),l=ue("TelemetrySettings"),c=ue("Sponsor");return I(),H("div",null,[y("button",qP,[y("span",GP,F(t.$t("footer.savings.footerShort",{percent:s.percent})),1),y("span",XP,F(t.$t("footer.savings.footerLong",{percent:s.percent})),1),QP]),(I(),Te(io,{to:"body"},[y("div",JP,[y("div",ZP,[y("div",e3,[y("div",t3,[y("h5",n3,F(t.$t("footer.savings.modalTitle")),1),r3]),y("div",i3,[y("ul",s3,[y("li",o3,[y("a",{class:Ie(["nav-link",{active:!i.communityView}]),href:"#",onClick:e[0]||(e[0]=Us((...u)=>s.showMyData&&s.showMyData(...u),["prevent"]))},F(t.$t("footer.savings.tabTitle")),3)]),y("li",a3,[y("a",{class:Ie(["nav-link",{active:i.communityView}]),href:"#",onClick:e[1]||(e[1]=Us((...u)=>s.showCommunity&&s.showCommunity(...u),["prevent"]))},F(t.$t("footer.community.tabTitle")),3)])]),i.communityView?(I(),H("div",f3,[re(a),re(l,{sponsor:n.sponsor},null,8,["sponsor"])])):(I(),H("div",l3,[y("div",c3,[re(o,{class:"text-accent1",icon:"sun",title:t.$t("footer.savings.percentTitle"),value:s.percent,unit:"%",sub1:t.$t("footer.savings.percentSelf",{self:t.fmtKw(n.selfConsumptionCharged*1e3,!0,!1)}),sub2:t.$t("footer.savings.percentGrid",{grid:t.fmtKw(n.gridCharged*1e3,!0,!1)})},null,8,["title","value","sub1","sub2"]),re(o,{class:"text-accent2",icon:"receivepayment",title:t.$t("footer.savings.priceTitle"),value:s.effectivePriceFormatted.value,unit:s.effectivePriceFormatted.unit,sub1:t.$t("footer.savings.priceFeedIn",{feedInPrice:t.fmtPricePerKWh(n.feedInPrice,n.currency)}),sub2:t.$t("footer.savings.priceGrid",{gridPrice:t.fmtPricePerKWh(n.gridPrice,n.currency)})},null,8,["title","value","unit","sub1","sub2"]),re(o,{class:"text-accent3",icon:"coinjar",title:t.$t("footer.savings.savingsTitle"),value:t.fmtMoney(n.amount,n.currency),unit:t.fmtCurrencySymbol(n.currency),sub1:t.$t("footer.savings.savingsComparedToGrid"),sub2:t.$t("footer.savings.savingsTotalEnergy",{total:t.fmtKw(n.totalCharged*1e3,!0,!1)})},null,8,["title","value","unit","sub1","sub2"])]),y("p",u3,[y("small",null,F(t.$t("footer.savings.since",{since:t.fmtDayMonthYear(s.startDate)})),1)])])),re(c,{sponsor:n.sponsor},null,8,["sponsor"])])])])],512)]))])}const h3=Ee(YP,[["render",d3]]),m3={name:"Footer",components:{Version:HO,Savings:h3},props:{version:Object,sponsor:String,savings:Object},methods:{toggleHiddenFeatures(){const t=`\u{1F9EA} Experimentelle UI-Elemente ${this.$hiddenFeatures?"deaktivieren":"aktivieren"}`;window.confirm(t)&&(window.localStorage.hidden_features=!this.$hiddenFeatures,window.location.reload())}}},p3={class:"footer"},g3={class:"container py-2"},_3={class:"d-flex justify-content-between"};function v3(t,e,n,r,i,s){const o=ue("Version"),a=ue("Savings");return I(),H("footer",p3,[y("div",g3,[y("div",_3,[re(o,an(Yt(n.version)),null,16),re(a,Dt(n.savings,{sponsor:n.sponsor}),null,16,["sponsor"])])])])}const b3=Ee(m3,[["render",v3]]),y3={name:"Site",components:{Loadpoints:B8,Energyflow:zh,Footer:b3,Notifications:t4,TopNavigation:fv,Vehicles:X8},mixins:[Nt,Ba],props:{loadpoints:Array,notifications:Array,offline:Boolean,gridConfigured:Boolean,gridPower:Number,homePower:Number,pvConfigured:Boolean,pvPower:Number,batteryConfigured:Boolean,batteryPower:Number,batterySoC:Number,gridCurrents:Array,prioritySoC:Number,siteTitle:String,vehicles:Array,auth:Object,currency:String,savingsAmount:Number,savingsEffectivePrice:Number,savingsGridCharged:Number,savingsSelfConsumptionCharged:Number,savingsSelfConsumptionPercent:Number,savingsSince:Number,savingsTotalCharged:Number,tariffFeedIn:Number,tariffGrid:Number,availableVersion:String,releaseNotes:String,hasUpdater:Boolean,uploadMessage:String,uploadProgress:Number,sponsor:String},computed:{energyflow:function(){return this.collectProps(zh)},activeLoadpointsCount:function(){return this.loadpoints.filter(t=>t.chargePower>0).length},loadpointsPower:function(){return this.loadpoints.reduce((t,e)=>(t+=e.chargePower||0,t),0)},topNavigation:function(){return{vehicleLogins:this.auth?this.auth.vehicles:{}}},showParkingLot:function(){return!1},footer:function(){return{version:{installed:window.evcc.version,commit:window.evcc.commit,available:this.availableVersion,releaseNotes:this.releaseNotes,hasUpdater:this.hasUpdater,uploadMessage:this.uploadMessage,uploadProgress:this.uploadProgress},sponsor:this.sponsor,savings:{since:this.savingsSince,totalCharged:this.savingsTotalCharged,gridCharged:this.savingsGridCharged,selfConsumptionCharged:this.savingsSelfConsumptionCharged,amount:this.savingsAmount,effectivePrice:this.savingsEffectivePrice,selfConsumptionPercent:this.savingsSelfConsumptionPercent,gridPrice:this.tariffGrid,feedInPrice:this.tariffFeedIn,currency:this.currency}}}}},E3={class:"d-flex flex-column site"},w3={class:"container px-4 top-area"},T3={class:"d-flex justify-content-between align-items-center my-3"},C3={class:"d-block my-0"},S3={class:"d-flex"},A3={class:"d-flex flex-column justify-content-between content-area"};function k3(t,e,n,r,i,s){const o=ue("Notifications"),a=ue("TopNavigation"),l=ue("Energyflow"),c=ue("Loadpoints"),u=ue("Vehicles"),d=ue("Footer");return I(),H("div",E3,[y("div",w3,[y("div",T3,[y("h1",C3,F(n.siteTitle||"evcc"),1),y("div",S3,[re(o,{notifications:n.notifications,class:"me-2"},null,8,["notifications"]),re(a,an(Yt(s.topNavigation)),null,16)])]),re(l,an(Yt(s.energyflow)),null,16)]),y("div",A3,[re(c,{class:"mt-1 mt-sm-2 flex-grow-1",loadpoints:n.loadpoints,vehicles:n.vehicles},null,8,["loadpoints","vehicles"]),s.showParkingLot?(I(),Te(u,{key:0})):_e("",!0),re(d,an(Yt(s.footer)),null,16)])])}const x3=Ee(y3,[["render",k3],["__scopeId","data-v-48374674"]]);var L3='';class N3 extends HTMLElement{connectedCallback(){this.setAttribute("data-shopicon",!0),this.innerHTML=L3}}window.customElements.define("shopicon-regular-car1",N3);const O3={name:"StartupError",mixins:[Ba],props:{fatal:Array,config:String,file:String,line:Number,offline:Boolean},computed:{errors(){return this.fatal||[]}},methods:{shutdown(){ot.post("shutdown")},scrollTo(t){const e=t.currentTarget.getAttribute("href").substring(1),n=document.getElementById(e);console.log({id:e,el:n}),n&&n.scrollIntoView({behavior:"smooth",block:"center"})}}},gv=t=>(bt("data-v-34002e97"),t=t(),yt(),t),P3={class:"container px-4"},M3={class:"d-flex justify-content-between align-items-center my-3"},I3={class:"d-block mt-0 d-flex"},D3=gv(()=>y("shopicon-regular-car1",{size:"m",class:"ms-2 icon"},null,-1)),$3={class:"row mb-4"},R3={class:"fs-6 mb-3"},F3={href:"https://github.com/evcc-io/evcc/discussions"},V3={class:"row mb-4"},H3={class:"mb-3"},B3={class:"d-md-flex justify-content-between"},U3={class:"me-md-4"},j3={class:"d-block"},W3=["href"],z3=["disabled"],K3={key:0},Y3=gv(()=>y("div",{class:"my-2"},null,-1)),q3={class:"py-2 text-muted config"},G3=["id"];function X3(t,e,n,r,i,s){const o=ue("i18n-t");return I(),H("div",P3,[y("div",M3,[y("h1",I3,[Le(F(t.$t("startupError.title"))+" ",1),D3])]),y("div",$3,[y("code",R3,[(I(!0),H(ke,null,Qe(s.errors,(a,l)=>(I(),H("div",{key:l},F(a),1))),128))]),re(o,{tag:"p",keypath:"startupError.description"},{default:Ze(()=>[y("a",F3,F(t.$t("startupError.discussions")),1)]),_:1}),y("p",null,[y("em",null,F(t.$t("startupError.hint")),1)])]),y("div",V3,[y("h5",H3,F(t.$t("startupError.configuration")),1),y("div",B3,[y("p",U3,[y("span",j3,[Le(F(t.$t("startupError.configFile"))+" ",1),y("code",null,F(n.file),1)]),n.line?(I(),Te(o,{key:0,tag:"span",keypath:"startupError.lineError"},{default:Ze(()=>[y("a",{href:`#line${n.line}`,onClick:e[0]||(e[0]=Us((...a)=>s.scrollTo&&s.scrollTo(...a),["prevent"]))},F(t.$t("startupError.lineErrorLink",[n.line])),9,W3)]),_:1})):_e("",!0),Le(" "+F(t.$t("startupError.fixAndRestart")),1)]),y("p",null,[y("button",{class:"btn btn-primary text-nowrap",type:"button",disabled:n.offline,onClick:e[1]||(e[1]=(...a)=>s.shutdown&&s.shutdown(...a))},F(t.$t("startupError.restartButton")),9,z3)])]),n.config?(I(),H("code",K3,[Y3,y("div",q3,[(I(!0),H(ke,null,Qe(n.config.split(`
-`),(a,l)=>(I(),H("div",{id:`line${l+1}`,key:l,class:Ie(["m-0 px-2",{highlighted:n.line===l+1}])},F(a)+"\xA0 ",11,G3))),128))])])):_e("",!0)])])}const Q3=Ee(O3,[["render",X3],["__scopeId","data-v-34002e97"]]);var J3='';class Z3 extends HTMLElement{connectedCallback(){this.setAttribute("data-shopicon",!0),this.innerHTML=J3}}window.customElements.define("shopicon-regular-cloud",Z3);const eM={name:"OfflineIndicator",methods:{reload(){window.location.reload()}}},tM={class:"fixed-bottom alert alert-secondary d-flex justify-content-center align-items-center mb-0 rounded-0",role:"alert"},nM=y("shopicon-regular-cloud",{class:"me-2"},null,-1);function rM(t,e,n,r,i,s){return I(),H("div",tM,[nM,Le(" "+F(t.$t("offline.message"))+" ",1),y("button",{class:"btn btn-sm btn-link text-dark",onClick:e[0]||(e[0]=(...o)=>s.reload&&s.reload(...o))},F(t.$t("offline.reload")),1)])}const iM=Ee(eM,[["render",rM]]),sM={name:"Main",components:{Site:x3,StartupError:Q3,OfflineIndicator:iM},props:{notifications:Array,offline:Boolean},data:function(){return uc},computed:{startupErrors:function(){var t;return((t=this.state.fatal)==null?void 0:t.length)>0}}};function oM(t,e,n,r,i,s){const o=ue("OfflineIndicator"),a=ue("StartupError"),l=ue("Site");return I(),H("div",null,[n.offline?(I(),Te(o,{key:0})):_e("",!0),s.startupErrors?(I(),Te(a,Dt({key:1},t.state,{offline:n.offline}),null,16,["offline"])):(I(),Te(l,Dt({key:2,notifications:n.notifications},t.state),null,16,["notifications"]))])}const aM=Ee(sM,[["render",oM]]);var lM='';class cM extends HTMLElement{connectedCallback(){this.setAttribute("data-shopicon",!0),this.innerHTML=lM}}window.customElements.define("shopicon-bold-arrowback",cM);const uM={name:"ChargingSessions",components:{TopNavigation:fv},mixins:[Nt],props:{notifications:Array},data(){return{sessions:[]}},computed:{sessionsByMonthAndLoadpoint(){const t=this.sessions.map(n=>{const r=n.loadpoint||this.$t("main.loadpoint.fallbackName"),i=n.vehicle||this.$t("main.vehicle.unknown");return{...n,loadpoint:r,vehicle:i}}),e=this.groupByMonth(t);return Object.entries(e).map(([n,r])=>{const i=Object.entries(this.groupByLoadpoint(r)).map(([s,o])=>{const a=this.totalKWh(o);return{name:s,total:a,sessions:o}});return{month:n,loadpoints:i}})}},mounted(){this.loadSessions()},methods:{async loadSessions(){var e;const t=await ot.get("sessions");this.sessions=(e=t.data)==null?void 0:e.result},groupByMonth(t){return t.reduce((e,n)=>{const r=new Date(n.finished),i=`${r.getFullYear()}.${r.getMonth()}`;return e[i]||(e[i]=[]),e[i].push(n),e},{})},groupByLoadpoint(t){return t.reduce((e,n)=>{const r=n.loadpoint;return e[r]||(e[r]=[]),e[r].push(n),e},{})},totalKWh(t){return t.reduce((e,n)=>e+n.chargedEnergy,0)*1e3},groupedKWh(t,e){const n=e.reduce((i,s)=>{const o=s[t];return i[o]||(i[o]=0),i[o]+=s.chargedEnergy*1e3,i},{}),r=Object.entries(n).map(([i,s])=>({name:i,energy:s}));return r.length>=2?r:[]},formatGroupHeadline(t){const e=new Date,[n,r]=t.split(".");return e.setMonth(r),e.setFullYear(n),this.fmtMonthYear(e)}}},df=t=>(bt("data-v-c2d84bb6"),t=t(),yt(),t),fM={class:"container px-4"},dM={class:"d-flex justify-content-between align-items-center py-3"},hM={class:"mb-1 pt-1 d-flex text-nowrap"},mM=df(()=>y("shopicon-bold-arrowback",{size:"s",class:"back"},null,-1)),pM={class:"row"},gM={class:"col-12"},_M={class:"mb-4"},vM={class:"btn btn-outline-secondary text-nowrap my-2",href:"./api/sessions?format=csv",download:"sessions.csv"},bM={class:"mx-2"},yM={class:"d-flex align-items-baseline my-5"},EM={class:"me-4 mb-0"},wM={class:"d-flex align-items-baseline mb-3"},TM={class:"me-4 mb-0"},CM={class:"large"},SM={class:"breakdown text-gray d-sm-flex flex-sm-wrap ps-0 mb-2"},AM={class:"table-responsive my-3"},kM={class:"table"},xM={scope:"col"},LM={scope:"col",class:"text-end ps-sm-4 pe-md-5"},NM={scope:"col",class:"ps-3 ps-md-4 ps-md-5"},OM={class:"text-nowrap text-end ps-sm-4 pe-md-5"},PM={class:"text-nowrap ps-3 ps-md-4 ps-md-5"},MM={class:"d-block d-sm-none"},IM=df(()=>y("br",null,null,-1)),DM={class:"d-none d-sm-block"},$M=df(()=>y("br",null,null,-1));function RM(t,e,n,r,i,s){const o=ue("router-link"),a=ue("TopNavigation");return I(),H("div",fM,[y("header",dM,[y("h1",hM,[re(o,{class:"dropdown-item mx-2 me-2",to:"/"},{default:Ze(()=>[mM]),_:1}),Le(" "+F(t.$t("sessions.title")),1)]),re(a)]),y("div",pM,[y("main",gM,[y("div",_M,[y("a",vM,F(t.$t("sessions.downloadCsv")),1)]),(I(!0),H(ke,null,Qe(s.sessionsByMonthAndLoadpoint,l=>(I(),H("div",{key:l.month},[y("div",bM,[y("div",yM,[y("h2",EM,F(s.formatGroupHeadline(l.month)),1)]),(I(!0),H(ke,null,Qe(l.loadpoints,c=>(I(),H("div",{key:c.name},[y("div",wM,[y("h3",TM,F(c.name),1),y("div",CM,F(t.fmtKWh(c.total)),1)]),y("ul",SM,[(I(!0),H(ke,null,Qe(s.groupedKWh("vehicle",c.sessions),(u,d)=>(I(),H("li",{key:d,class:"breakdown-item"},F(u.name)+": "+F(t.fmtKWh(u.energy)),1))),128))]),y("div",AM,[y("table",kM,[y("thead",null,[y("tr",null,[y("th",xM,F(t.$t("sessions.vehicle")),1),y("th",LM,F(t.$t("sessions.energy")),1),y("th",NM,F(t.$t("sessions.date")),1)])]),y("tbody",null,[(I(!0),H(ke,null,Qe(c.sessions,(u,d)=>(I(),H("tr",{key:d},[y("td",null,F(u.vehicle),1),y("td",OM,F(t.fmtKWh(u.chargedEnergy*1e3)),1),y("td",PM,[y("span",MM,[Le(F(t.fmtFullDateTime(new Date(u.created),!0))+" ",1),IM,Le(" "+F(t.fmtFullDateTime(new Date(u.finished),!0)),1)]),y("span",DM,[Le(F(t.fmtFullDateTime(new Date(u.created),!1))+" ",1),$M,Le(" "+F(t.fmtFullDateTime(new Date(u.finished),!1)),1)])])]))),128))])])])]))),128))])]))),128))])])])}const FM=Ee(uM,[["render",RM],["__scopeId","data-v-c2d84bb6"]]),VM=ZS({history:pS(),routes:[{path:"/",component:aM,props:!0},{path:"/sessions",component:FM,props:!0}]});/*!
+ ${t.fmtShortDurationUnit(i.chargeDurationInterpolated)}`,align:"end"},null,8,["label","value"]))]),L8,re(d,Dt(s.vehicle,{onTargetSocUpdated:s.setTargetSoC,onTargetEnergyUpdated:s.setTargetEnergy,onTargetTimeUpdated:s.setTargetTime,onTargetTimeRemoved:s.removeTargetTime,onChangeVehicle:s.changeVehicle,onRemoveVehicle:s.removeVehicle}),null,16,["onTargetSocUpdated","onTargetEnergyUpdated","onTargetTimeUpdated","onTargetTimeRemoved","onChangeVehicle","onRemoveVehicle"])])}const O8=Ee(y8,[["render",N8],["__scopeId","data-v-ea58e76c"]]),P8={name:"Site",components:{Loadpoint:O8},props:{loadpoints:Array,vehicles:Array},data(){return{selectedIndex:0,snapTimeout:null}},mounted(){this.$refs.carousel.addEventListener("scroll",this.handleCarouselScroll,!1)},unmounted(){this.$refs.carousel&&this.$refs.carousel.removeEventListener("scroll",this.handleCarouselScroll)},methods:{handleCarouselScroll(){const{scrollLeft:t}=this.$refs.carousel,{offsetWidth:e}=this.$refs.carousel.children[0];this.selectedIndex=Math.round((t-7.5)/e)},selected(t){return this.selectedIndex===t},scrollTo(t){if(this.selectedIndex===t)return;this.selectedIndex=t;const e=this.$refs.carousel,n=e.children[0].offsetWidth;e.style.scrollSnapType="none",e.scrollTo({top:0,left:7.5+n*t,behavior:"smooth"}),clearTimeout(this.snapTimeout),this.snapTimeout=setTimeout(()=>{this.$refs.carousel.style.scrollSnapType="x mandatory"},1e3)}}},M8=t=>(bt("data-v-024a6ae6"),t=t(),yt(),t),I8={class:"container container--loadpoint px-0 mb-md-2 d-flex flex-column justify-content-center"},D8={ref:"carousel",class:"carousel d-lg-flex flex-wrap"},R8={key:0,class:"d-flex d-lg-none justify-content-center"},$8=["onClick"],F8=M8(()=>y("shopicon-filled-circle",{class:"indicator-icon"},null,-1)),V8=[F8];function H8(t,e,n,r,i,s){const o=ue("Loadpoint");return I(),H("div",I8,[y("div",D8,[(I(!0),H(ke,null,Qe(n.loadpoints,(a,l)=>(I(),H("div",{key:l,class:"flex-grow-1 mb-3 m-lg-0 p-lg-0"},[re(o,Dt(a,{id:l,vehicles:n.vehicles,class:["h-100",{"loadpoint-unselected":!s.selected(l)}],onClick:c=>s.scrollTo(l)}),null,16,["id","vehicles","class","onClick"])]))),128))],512),n.loadpoints.length>1?(I(),H("div",R8,[(I(!0),H(ke,null,Qe(n.loadpoints,(a,l)=>(I(),H("button",{key:l,class:Ie(["btn btn-sm btn-link p-0 mx-1 indicator d-flex justify-content-center align-items-center evcc-default-text",{"indicator--selected":s.selected(l)}]),onClick:c=>s.scrollTo(l)},V8,10,$8))),128))])):_e("",!0)])}const B8=Ee(P8,[["render",H8],["__scopeId","data-v-024a6ae6"]]),U8={name:"Vehicles",components:{Vehicle:Mc},data(){return{refreshing:!1,vehicles:[{vehiclePresent:!0,vehicleTitle:"Ford Mustang Mach-E",vehicleSoC:46,vehicleRange:182,targetSoC:100},{vehiclePresent:!0,vehicleTitle:"Renault Twingo Electric",vehicleSoC:77,vehicleRange:98,targetSoC:90},{vehiclePresent:!0,vehicleTitle:"Blauer VW ID.4",vehicleSoC:16,vehicleRange:52,minSoC:35,targetSoC:60}]}},methods:{refresh(){this.refreshing=!0,window.setTimeout(()=>{this.refreshing=!1},5e3)}}},j8=t=>(bt("data-v-7430d6bb"),t=t(),yt(),t),W8={class:"container px-4 mb-3 mb-sm-4 d-flex justify-content-start align-items-center"},z8={class:"m-0"},K8=["disabled"],Y8=j8(()=>y("shopicon-regular-refresh",{class:"refresh-icon"},null,-1)),q8=[Y8];function G8(t,e,n,r,i,s){const o=ue("Vehicle");return I(),H("div",null,[y("div",W8,[y("h2",z8,F(t.$t("main.vehicles")),1),y("button",{class:Ie(["btn btn-link d-flex evcc-default-text p-2 ms-1 refresh",{"refresh--in-progress":i.refreshing}]),disabled:i.refreshing,onClick:e[0]||(e[0]=(...a)=>s.refresh&&s.refresh(...a))},q8,10,K8)]),y("div",{class:Ie(["container vehicles px-0 mb-5",`vehicles-${i.vehicles.length}`])},[(I(!0),H(ke,null,Qe(i.vehicles,(a,l)=>(I(),Te(o,Dt(a,{id:`vehicle_${l}`,key:l,class:"vehicle",parked:""}),null,16,["id"]))),128))],2)])}const X8=Ee(U8,[["render",G8],["__scopeId","data-v-7430d6bb"]]);var Q8='';class J8 extends HTMLElement{connectedCallback(){this.setAttribute("data-shopicon",!0),this.innerHTML=Q8}}window.customElements.define("shopicon-filled-testtube",J8);const Z8={name:"Logo"},uf=t=>(bt("data-v-9d6237eb"),t=t(),yt(),t),eO={viewBox:"0 0 122 35",xmlns:"http://www.w3.org/2000/svg","fill-rule":"evenodd","clip-rule":"evenodd","stroke-linejoin":"round","stroke-miterlimit":"2"},tO=uf(()=>y("path",{d:"M13.082 29.071a12.384 12.384 0 01-9-3.42 12.192 12.192 0 01-3.54-9.12v-.64a15.394 15.394 0 011.47-6.83 10.825 10.825 0 014.17-4.64 11.64 11.64 0 016.15-1.63 10.45 10.45 0 018.21 3.26c2 2.194 3 5.297 3 9.31v2.76H7.382a6.348 6.348 0 002 4 5.997 5.997 0 004.16 1.49 7.305 7.305 0 006.1-2.84l3.31 3.73a10 10 0 01-4.13 3.39 13.309 13.309 0 01-5.74 1.18zm-.77-20.84a4.216 4.216 0 00-3.26 1.37 7.141 7.141 0 00-1.6 3.91h9.39v-.55a5.005 5.005 0 00-1.22-3.49 4.304 4.304 0 00-3.31-1.24zM36.452 20.331l4.7-17.09h7l-8.48 25.36h-6.44l-8.52-25.36h7l4.74 17.09zM85.542 23.611a4.444 4.444 0 003-1 3.638 3.638 0 001.22-2.75h6.32a8.668 8.668 0 01-1.4 4.73 9.145 9.145 0 01-3.79 3.3 11.736 11.736 0 01-5.29 1.19 10.912 10.912 0 01-8.54-3.46c-2.087-2.3-3.13-5.483-3.13-9.55v-.45c0-3.9 1.033-7.016 3.1-9.35a10.868 10.868 0 018.51-3.5c2.791-.134 5.524.84 7.6 2.71a9.626 9.626 0 012.9 7.21h-6.3a4.663 4.663 0 00-1.2-3.22 4.005 4.005 0 00-3.08-1.24 4.068 4.068 0 00-3.56 1.73c-.8 1.15-1.2 3-1.2 5.6v.7c0 2.61.39 4.49 1.19 5.63a4.092 4.092 0 003.65 1.72zM110.422 23.611a4.454 4.454 0 003-1 3.63 3.63 0 001.21-2.75h6.33a8.668 8.668 0 01-1.4 4.73 9.143 9.143 0 01-3.73 3.3 11.76 11.76 0 01-5.29 1.18 10.912 10.912 0 01-8.54-3.46c-2.087-2.3-3.13-5.483-3.13-9.55v-.45c0-3.9 1.033-7.016 3.1-9.35a10.85 10.85 0 018.57-3.49 10.575 10.575 0 017.6 2.71 9.598 9.598 0 012.91 7.21h-6.33a4.651 4.651 0 00-1.21-3.22 4.492 4.492 0 00-6.64.49c-.8 1.15-1.21 3-1.21 5.6v.7c0 2.607.4 4.484 1.2 5.63a4.09 4.09 0 003.56 1.72z",fill:"#fff",class:"letter","fill-rule":"nonzero"},null,-1)),nO=uf(()=>y("path",{d:"M58.462.751h9.22l-6.14 12.3h6.15l-11.53 21.51 2.3-15.36h-7.68l7.68-18.45z",fill:"#0fdd42","fill-rule":"nonzero"},null,-1)),rO=uf(()=>y("path",{fill:"none",d:"M-24.458-22.109h170v76h-170z"},null,-1)),iO=[tO,nO,rO];function sO(t,e,n,r,i,s){return I(),H("svg",eO,iO)}const oO=Ee(Z8,[["render",sO],["__scopeId","data-v-9d6237eb"]]);var aO='';class lO extends HTMLElement{connectedCallback(){this.setAttribute("data-shopicon",!0),this.innerHTML=aO}}window.customElements.define("shopicon-regular-gift",lO);var cO='';class uO extends HTMLElement{connectedCallback(){this.setAttribute("data-shopicon",!0),this.innerHTML=cO}}window.customElements.define("shopicon-regular-moonstars",uO);const fO={name:"Version",components:{Logo:oO},props:{installed:String,available:String,releaseNotes:String,commit:String,hasUpdater:Boolean,uploadMessage:String,uploadProgress:Number},data:function(){return{updateStarted:!1,updateStatus:""}},computed:{githubHashUrl:function(){return`https://github.com/evcc-io/evcc/commit/${this.commit}`},newVersionAvailable:function(){return this.available&&this.installed!="[[.Version]]"&&this.installed!="0.0.1-alpha"&&this.available!=this.installed}},methods:{update:async function(){try{await ot.post("update"),this.updateStatus=this.$t("footer.version.modalUpdateStatusStart"),this.updateStarted=!0}catch(t){this.updateStatus=this.$t("footer.version.modalUpdateStatusStart")+t}},releaseNotesUrl:function(t){return`https://github.com/evcc-io/evcc/releases/tag/${t}`}}},Ua=t=>(bt("data-v-66915926"),t=t(),yt(),t),dO=["href"],hO=Ua(()=>y("shopicon-regular-moonstars",{class:"ms-2 text-gray-light"},null,-1)),mO={key:1,href:"#","data-bs-toggle":"modal","data-bs-target":"#updateModal",class:"btn btn-link ps-0 text-decoration-none evcc-default-text text-nowrap d-flex align-items-end"},pO=Ua(()=>y("shopicon-regular-gift",{class:"me-2"},null,-1)),gO={class:"ms-2 d-none d-xs-block d-sm-none text-decoration-underline"},_O={class:"ms-2 d-none d-sm-block text-gray-medium text-decoration-underline"},vO=["href"],bO={id:"updateModal",class:"modal fade text-dark",tabindex:"-1",role:"dialog","aria-hidden":"true"},yO={class:"modal-dialog modal-dialog-centered modal-dialog-scrollable",role:"document"},EO={class:"modal-content"},wO={class:"modal-header"},TO={class:"modal-title"},CO=Ua(()=>y("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1)),SO={class:"modal-body"},AO={key:0},kO={class:"progress my-3"},xO={key:1},LO=["innerHTML"],NO={key:1},OO=["href"],PO={class:"modal-footer d-flex justify-content-between"},MO=["disabled"],IO=["disabled"],DO={key:0},RO=Ua(()=>y("span",{class:"spinner-border spinner-border-sm",role:"status","aria-hidden":"true"},null,-1)),$O={key:1},FO=["href"];function VO(t,e,n,r,i,s){const o=ue("Logo");return I(),H("div",null,[n.commit?(I(),H("a",{key:0,href:s.githubHashUrl,target:"_blank",class:"btn btn-link ps-0 text-decoration-none evcc-default-text text-nowrap d-flex align-items-end"},[re(o,{class:"logo me-2"}),Le(" v"+F(n.installed)+" ",1),hO],8,dO)):s.newVersionAvailable?(I(),H("button",mO,[pO,Le(" v"+F(n.installed)+" ",1),y("span",gO,F(t.$t("footer.version.availableShort")),1),y("span",_O,F(t.$t("footer.version.availableLong")),1)])):(I(),H("a",{key:2,href:s.releaseNotesUrl(n.installed),target:"_blank",class:"btn btn-link evcc-default-text ps-0 text-decoration-none text-nowrap d-flex align-items-end"},[re(o,{class:"logo me-2"}),Le(" v"+F(n.installed),1)],8,vO)),(I(),Te(io,{to:"body"},[y("div",bO,[y("div",yO,[y("div",EO,[y("div",wO,[y("h5",TO,F(t.$t("footer.version.modalTitle")),1),CO]),y("div",SO,[t.updateStarted?(I(),H("div",AO,[y("p",null,F(t.$t("footer.version.modalUpdateStarted")),1),y("div",kO,[y("div",{class:"progress-bar progress-bar-striped progress-bar-animated",role:"progressbar",style:Ct({width:n.uploadProgress+"%"})},null,4)]),y("p",null,F(t.updateStatus)+F(n.uploadMessage),1)])):(I(),H("div",xO,[y("p",null,[y("small",null,F(t.$t("footer.version.modalInstalledVersion"))+": "+F(n.installed),1)]),n.releaseNotes?(I(),H("div",{key:0,innerHTML:n.releaseNotes},null,8,LO)):(I(),H("p",NO,[Le(F(t.$t("footer.version.modalNoReleaseNotes"))+" ",1),y("a",{href:s.releaseNotesUrl(n.available)},"GitHub",8,OO),Le(". ")]))]))]),y("div",PO,[y("button",{type:"button",class:"btn btn-outline-secondary",disabled:t.updateStarted,"data-bs-dismiss":"modal"},F(t.$t("footer.version.modalCancel")),9,MO),y("div",null,[n.hasUpdater?(I(),H("button",{key:0,type:"button",class:"btn btn-primary",disabled:t.updateStarted,onClick:e[0]||(e[0]=(...a)=>s.update&&s.update(...a))},[t.updateStarted?(I(),H("span",DO,[RO,Le(" "+F(t.$t("footer.version.modalUpdate")),1)])):(I(),H("span",$O,F(t.$t("footer.version.modalUpdateNow")),1))],8,IO)):(I(),H("a",{key:1,href:s.releaseNotesUrl(n.available),class:"btn btn-primary"},F(t.$t("footer.version.modalDownload")),9,FO))])])])])])]))])}const HO=Ee(fO,[["render",VO],["__scopeId","data-v-66915926"]]);var co={};(function t(e,n,r,i){var s=!!(e.Worker&&e.Blob&&e.Promise&&e.OffscreenCanvas&&e.OffscreenCanvasRenderingContext2D&&e.HTMLCanvasElement&&e.HTMLCanvasElement.prototype.transferControlToOffscreen&&e.URL&&e.URL.createObjectURL);function o(){}function a(D){var L=n.exports.Promise,Y=L!==void 0?L:e.Promise;return typeof Y=="function"?new Y(D):(D(o,o),null)}var l=function(){var D=Math.floor(16.666666666666668),L,Y,z={},J=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(L=function(oe){var le=Math.random();return z[le]=requestAnimationFrame(function ae(ce){J===ce||J+D-1$1
").trim()}const $P={name:"TelemetrySettings",props:{sponsor:String},data(){return{enabled:!1,error:null}},async mounted(){await this.update()},methods:{async change(t){try{this.error=null;const e=await ot.post(`settings/telemetry/${t.target.checked}`);this.enabled=e.data.result}catch(e){e.response&&(this.error=RP("**Error:** "+e.response.data.error),this.enabled=!1)}},async update(){try{const t=await ot.get("settings/telemetry");this.enabled=t.data.result}catch(t){console.error(t)}}}},FP={class:"form-check form-switch my-3"},VP=["disabled"],HP={class:"form-check-label"},BP={for:"telemetryEnabled"},UP={href:"https://docs.evcc.io/docs/guides/setup/#telemetry--community-daten",target:"_blank"},jP={key:1},WP=["innerHTML"];function zP(t,e,n,r,i,s){const o=ue("i18n-t");return I(),H("div",FP,[qt(y("input",{id:"telemetryEnabled","onUpdate:modelValue":e[0]||(e[0]=a=>i.enabled=a),class:"form-check-input",type:"checkbox",role:"switch",disabled:!n.sponsor,onChange:e[1]||(e[1]=(...a)=>s.change&&s.change(...a))},null,40,VP),[[s2,i.enabled]]),y("div",HP,[y("label",BP,[Le(F(t.$t("footer.telemetry.optIn"))+" ",1),n.sponsor?(I(),Te(o,{key:0,tag:"span",keypath:"footer.telemetry.optInMoreDetails"},{default:Ze(()=>[y("a",UP,F(t.$t("footer.telemetry.optInMoreDetailsLink")),1)]),_:1})):(I(),H("span",jP,F(t.$t("footer.telemetry.optInSponsorship")),1))]),i.error?(I(),H("div",{key:0,class:"errorMessage my-1 text-danger",innerHTML:i.error},null,8,WP)):_e("",!0)])])}const KP=Ee($P,[["render",zP],["__scopeId","data-v-af252ca6"]]),YP={name:"Savings",components:{Sponsor:lP,SavingsTile:mv,LiveCommunity:DP,TelemetrySettings:KP},mixins:[Nt],props:{selfConsumptionPercent:Number,since:{type:Number,default:0},sponsor:String,amount:{type:Number,default:0},effectivePrice:{type:Number,default:0},totalCharged:{type:Number,default:0},gridCharged:{type:Number,default:0},selfConsumptionCharged:{type:Number,default:0},gridPrice:{type:Number},feedInPrice:{type:Number},currency:String},data(){return{communityView:!1,telemetryEnabled:!1}},computed:{percent(){return Math.round(this.selfConsumptionPercent)||0},effectivePriceFormatted(){const[t,e]=this.fmtPricePerKWh(this.effectivePrice,this.currency).split(" ");return{value:t,unit:e}},startDate(){return new Date(this.since*1e3)}},methods:{showCommunity(){this.communityView=!0},showMyData(){this.communityView=!1}}},qP={class:"btn btn-link pe-0 text-decoration-none evcc-default-text text-nowrap d-flex align-items-end","data-bs-toggle":"modal","data-bs-target":"#savingsModal"},GP={class:"d-inline d-sm-none"},XP={class:"d-none d-sm-inline"},QP=y("shopicon-regular-sun",{class:"ms-2 text-evcc"},null,-1),JP={id:"savingsModal",ref:"modal",class:"modal fade text-dark","data-bs-backdrop":"true",tabindex:"-1",role:"dialog","aria-hidden":"true"},ZP={class:"modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable",role:"document"},e3={class:"modal-content"},t3={class:"modal-header"},n3={class:"modal-title"},r3=y("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1),i3={class:"modal-body"},s3={class:"nav nav-tabs"},o3={class:"nav-item"},a3={class:"nav-item"},l3={key:0,class:"my-4"},c3={class:"d-block d-lg-flex mb-2 justify-content-between"},u3={class:"my-3 lh-2"},f3={key:1,class:"my-4"};function d3(t,e,n,r,i,s){const o=ue("SavingsTile"),a=ue("LiveCommunity"),l=ue("TelemetrySettings"),c=ue("Sponsor");return I(),H("div",null,[y("button",qP,[y("span",GP,F(t.$t("footer.savings.footerShort",{percent:s.percent})),1),y("span",XP,F(t.$t("footer.savings.footerLong",{percent:s.percent})),1),QP]),(I(),Te(io,{to:"body"},[y("div",JP,[y("div",ZP,[y("div",e3,[y("div",t3,[y("h5",n3,F(t.$t("footer.savings.modalTitle")),1),r3]),y("div",i3,[y("ul",s3,[y("li",o3,[y("a",{class:Ie(["nav-link",{active:!i.communityView}]),href:"#",onClick:e[0]||(e[0]=Us((...u)=>s.showMyData&&s.showMyData(...u),["prevent"]))},F(t.$t("footer.savings.tabTitle")),3)]),y("li",a3,[y("a",{class:Ie(["nav-link",{active:i.communityView}]),href:"#",onClick:e[1]||(e[1]=Us((...u)=>s.showCommunity&&s.showCommunity(...u),["prevent"]))},F(t.$t("footer.community.tabTitle")),3)])]),i.communityView?(I(),H("div",f3,[re(a),re(l,{sponsor:n.sponsor},null,8,["sponsor"])])):(I(),H("div",l3,[y("div",c3,[re(o,{class:"text-accent1",icon:"sun",title:t.$t("footer.savings.percentTitle"),value:s.percent,unit:"%",sub1:t.$t("footer.savings.percentSelf",{self:t.fmtKw(n.selfConsumptionCharged*1e3,!0,!1)}),sub2:t.$t("footer.savings.percentGrid",{grid:t.fmtKw(n.gridCharged*1e3,!0,!1)})},null,8,["title","value","sub1","sub2"]),re(o,{class:"text-accent2",icon:"receivepayment",title:t.$t("footer.savings.priceTitle"),value:s.effectivePriceFormatted.value,unit:s.effectivePriceFormatted.unit,sub1:t.$t("footer.savings.priceFeedIn",{feedInPrice:t.fmtPricePerKWh(n.feedInPrice,n.currency)}),sub2:t.$t("footer.savings.priceGrid",{gridPrice:t.fmtPricePerKWh(n.gridPrice,n.currency)})},null,8,["title","value","unit","sub1","sub2"]),re(o,{class:"text-accent3",icon:"coinjar",title:t.$t("footer.savings.savingsTitle"),value:t.fmtMoney(n.amount,n.currency),unit:t.fmtCurrencySymbol(n.currency),sub1:t.$t("footer.savings.savingsComparedToGrid"),sub2:t.$t("footer.savings.savingsTotalEnergy",{total:t.fmtKw(n.totalCharged*1e3,!0,!1)})},null,8,["title","value","unit","sub1","sub2"])]),y("p",u3,[y("small",null,F(t.$t("footer.savings.since",{since:t.fmtDayMonthYear(s.startDate)})),1)])])),re(c,{sponsor:n.sponsor},null,8,["sponsor"])])])])],512)]))])}const h3=Ee(YP,[["render",d3]]),m3={name:"Footer",components:{Version:HO,Savings:h3},props:{version:Object,sponsor:String,savings:Object},methods:{toggleHiddenFeatures(){const t=`\u{1F9EA} Experimentelle UI-Elemente ${this.$hiddenFeatures?"deaktivieren":"aktivieren"}`;window.confirm(t)&&(window.localStorage.hidden_features=!this.$hiddenFeatures,window.location.reload())}}},p3={class:"footer"},g3={class:"container py-2"},_3={class:"d-flex justify-content-between"};function v3(t,e,n,r,i,s){const o=ue("Version"),a=ue("Savings");return I(),H("footer",p3,[y("div",g3,[y("div",_3,[re(o,an(Yt(n.version)),null,16),re(a,Dt(n.savings,{sponsor:n.sponsor}),null,16,["sponsor"])])])])}const b3=Ee(m3,[["render",v3]]),y3={name:"Site",components:{Loadpoints:B8,Energyflow:zh,Footer:b3,Notifications:t4,TopNavigation:fv,Vehicles:X8},mixins:[Nt,Ba],props:{loadpoints:Array,notifications:Array,offline:Boolean,gridConfigured:Boolean,gridPower:Number,homePower:Number,pvConfigured:Boolean,pvPower:Number,batteryConfigured:Boolean,batteryPower:Number,batterySoC:Number,gridCurrents:Array,prioritySoC:Number,siteTitle:String,vehicles:Array,auth:Object,currency:String,savingsAmount:Number,savingsEffectivePrice:Number,savingsGridCharged:Number,savingsSelfConsumptionCharged:Number,savingsSelfConsumptionPercent:Number,savingsSince:Number,savingsTotalCharged:Number,tariffFeedIn:Number,tariffGrid:Number,availableVersion:String,releaseNotes:String,hasUpdater:Boolean,uploadMessage:String,uploadProgress:Number,sponsor:String},computed:{energyflow:function(){return this.collectProps(zh)},activeLoadpointsCount:function(){return this.loadpoints.filter(t=>t.chargePower>0).length},loadpointsPower:function(){return this.loadpoints.reduce((t,e)=>(t+=e.chargePower||0,t),0)},topNavigation:function(){return{vehicleLogins:this.auth?this.auth.vehicles:{}}},showParkingLot:function(){return!1},footer:function(){return{version:{installed:window.evcc.version,commit:window.evcc.commit,available:this.availableVersion,releaseNotes:this.releaseNotes,hasUpdater:this.hasUpdater,uploadMessage:this.uploadMessage,uploadProgress:this.uploadProgress},sponsor:this.sponsor,savings:{since:this.savingsSince,totalCharged:this.savingsTotalCharged,gridCharged:this.savingsGridCharged,selfConsumptionCharged:this.savingsSelfConsumptionCharged,amount:this.savingsAmount,effectivePrice:this.savingsEffectivePrice,selfConsumptionPercent:this.savingsSelfConsumptionPercent,gridPrice:this.tariffGrid,feedInPrice:this.tariffFeedIn,currency:this.currency}}}}},E3={class:"d-flex flex-column site"},w3={class:"container px-4 top-area"},T3={class:"d-flex justify-content-between align-items-center my-3"},C3={class:"d-block my-0"},S3={class:"d-flex"},A3={class:"d-flex flex-column justify-content-between content-area"};function k3(t,e,n,r,i,s){const o=ue("Notifications"),a=ue("TopNavigation"),l=ue("Energyflow"),c=ue("Loadpoints"),u=ue("Vehicles"),d=ue("Footer");return I(),H("div",E3,[y("div",w3,[y("div",T3,[y("h1",C3,F(n.siteTitle||"evcc"),1),y("div",S3,[re(o,{notifications:n.notifications,class:"me-2"},null,8,["notifications"]),re(a,an(Yt(s.topNavigation)),null,16)])]),re(l,an(Yt(s.energyflow)),null,16)]),y("div",A3,[re(c,{class:"mt-1 mt-sm-2 flex-grow-1",loadpoints:n.loadpoints,vehicles:n.vehicles},null,8,["loadpoints","vehicles"]),s.showParkingLot?(I(),Te(u,{key:0})):_e("",!0),re(d,an(Yt(s.footer)),null,16)])])}const x3=Ee(y3,[["render",k3],["__scopeId","data-v-48374674"]]);var L3='';class N3 extends HTMLElement{connectedCallback(){this.setAttribute("data-shopicon",!0),this.innerHTML=L3}}window.customElements.define("shopicon-regular-car1",N3);const O3={name:"StartupError",mixins:[Ba],props:{fatal:Array,config:String,file:String,line:Number,offline:Boolean},computed:{errors(){return this.fatal||[]}},methods:{shutdown(){ot.post("shutdown")},scrollTo(t){const e=t.currentTarget.getAttribute("href").substring(1),n=document.getElementById(e);console.log({id:e,el:n}),n&&n.scrollIntoView({behavior:"smooth",block:"center"})}}},gv=t=>(bt("data-v-34002e97"),t=t(),yt(),t),P3={class:"container px-4"},M3={class:"d-flex justify-content-between align-items-center my-3"},I3={class:"d-block mt-0 d-flex"},D3=gv(()=>y("shopicon-regular-car1",{size:"m",class:"ms-2 icon"},null,-1)),R3={class:"row mb-4"},$3={class:"fs-6 mb-3"},F3={href:"https://github.com/evcc-io/evcc/discussions"},V3={class:"row mb-4"},H3={class:"mb-3"},B3={class:"d-md-flex justify-content-between"},U3={class:"me-md-4"},j3={class:"d-block"},W3=["href"],z3=["disabled"],K3={key:0},Y3=gv(()=>y("div",{class:"my-2"},null,-1)),q3={class:"py-2 text-muted config"},G3=["id"];function X3(t,e,n,r,i,s){const o=ue("i18n-t");return I(),H("div",P3,[y("div",M3,[y("h1",I3,[Le(F(t.$t("startupError.title"))+" ",1),D3])]),y("div",R3,[y("code",$3,[(I(!0),H(ke,null,Qe(s.errors,(a,l)=>(I(),H("div",{key:l},F(a),1))),128))]),re(o,{tag:"p",keypath:"startupError.description"},{default:Ze(()=>[y("a",F3,F(t.$t("startupError.discussions")),1)]),_:1}),y("p",null,[y("em",null,F(t.$t("startupError.hint")),1)])]),y("div",V3,[y("h5",H3,F(t.$t("startupError.configuration")),1),y("div",B3,[y("p",U3,[y("span",j3,[Le(F(t.$t("startupError.configFile"))+" ",1),y("code",null,F(n.file),1)]),n.line?(I(),Te(o,{key:0,tag:"span",keypath:"startupError.lineError"},{default:Ze(()=>[y("a",{href:`#line${n.line}`,onClick:e[0]||(e[0]=Us((...a)=>s.scrollTo&&s.scrollTo(...a),["prevent"]))},F(t.$t("startupError.lineErrorLink",[n.line])),9,W3)]),_:1})):_e("",!0),Le(" "+F(t.$t("startupError.fixAndRestart")),1)]),y("p",null,[y("button",{class:"btn btn-primary text-nowrap",type:"button",disabled:n.offline,onClick:e[1]||(e[1]=(...a)=>s.shutdown&&s.shutdown(...a))},F(t.$t("startupError.restartButton")),9,z3)])]),n.config?(I(),H("code",K3,[Y3,y("div",q3,[(I(!0),H(ke,null,Qe(n.config.split(`
+`),(a,l)=>(I(),H("div",{id:`line${l+1}`,key:l,class:Ie(["m-0 px-2",{highlighted:n.line===l+1}])},F(a)+"\xA0 ",11,G3))),128))])])):_e("",!0)])])}const Q3=Ee(O3,[["render",X3],["__scopeId","data-v-34002e97"]]);var J3='';class Z3 extends HTMLElement{connectedCallback(){this.setAttribute("data-shopicon",!0),this.innerHTML=J3}}window.customElements.define("shopicon-regular-cloud",Z3);const eM={name:"OfflineIndicator",methods:{reload(){window.location.reload()}}},tM={class:"fixed-bottom alert alert-secondary d-flex justify-content-center align-items-center mb-0 rounded-0",role:"alert"},nM=y("shopicon-regular-cloud",{class:"me-2"},null,-1);function rM(t,e,n,r,i,s){return I(),H("div",tM,[nM,Le(" "+F(t.$t("offline.message"))+" ",1),y("button",{class:"btn btn-sm btn-link text-dark",onClick:e[0]||(e[0]=(...o)=>s.reload&&s.reload(...o))},F(t.$t("offline.reload")),1)])}const iM=Ee(eM,[["render",rM]]),sM={name:"Main",components:{Site:x3,StartupError:Q3,OfflineIndicator:iM},props:{notifications:Array,offline:Boolean},data:function(){return uc},computed:{startupErrors:function(){var t;return((t=this.state.fatal)==null?void 0:t.length)>0}}};function oM(t,e,n,r,i,s){const o=ue("OfflineIndicator"),a=ue("StartupError"),l=ue("Site");return I(),H("div",null,[n.offline?(I(),Te(o,{key:0})):_e("",!0),s.startupErrors?(I(),Te(a,Dt({key:1},t.state,{offline:n.offline}),null,16,["offline"])):(I(),Te(l,Dt({key:2,notifications:n.notifications},t.state),null,16,["notifications"]))])}const aM=Ee(sM,[["render",oM]]);var lM='';class cM extends HTMLElement{connectedCallback(){this.setAttribute("data-shopicon",!0),this.innerHTML=lM}}window.customElements.define("shopicon-bold-arrowback",cM);const uM={name:"ChargingSessions",components:{TopNavigation:fv},mixins:[Nt],props:{notifications:Array},data(){return{sessions:[]}},computed:{sessionsByMonthAndLoadpoint(){const t=this.sessions.map(n=>{const r=n.loadpoint||this.$t("main.loadpoint.fallbackName"),i=n.vehicle||this.$t("main.vehicle.unknown");return{...n,loadpoint:r,vehicle:i}}),e=this.groupByMonth(t);return Object.entries(e).map(([n,r])=>{const i=Object.entries(this.groupByLoadpoint(r)).map(([s,o])=>{const a=this.totalKWh(o);return{name:s,total:a,sessions:o}});return{month:n,loadpoints:i}})}},mounted(){this.loadSessions()},methods:{async loadSessions(){var e;const t=await ot.get("sessions");this.sessions=(e=t.data)==null?void 0:e.result},groupByMonth(t){return t.reduce((e,n)=>{const r=new Date(n.finished),i=`${r.getFullYear()}.${r.getMonth()}`;return e[i]||(e[i]=[]),e[i].push(n),e},{})},groupByLoadpoint(t){return t.reduce((e,n)=>{const r=n.loadpoint;return e[r]||(e[r]=[]),e[r].push(n),e},{})},totalKWh(t){return t.reduce((e,n)=>e+n.chargedEnergy,0)*1e3},groupedKWh(t,e){const n=e.reduce((i,s)=>{const o=s[t];return i[o]||(i[o]=0),i[o]+=s.chargedEnergy*1e3,i},{}),r=Object.entries(n).map(([i,s])=>({name:i,energy:s}));return r.length>=2?r:[]},formatGroupHeadline(t){const e=new Date,[n,r]=t.split(".");return e.setMonth(r),e.setFullYear(n),this.fmtMonthYear(e)}}},df=t=>(bt("data-v-c2d84bb6"),t=t(),yt(),t),fM={class:"container px-4"},dM={class:"d-flex justify-content-between align-items-center py-3"},hM={class:"mb-1 pt-1 d-flex text-nowrap"},mM=df(()=>y("shopicon-bold-arrowback",{size:"s",class:"back"},null,-1)),pM={class:"row"},gM={class:"col-12"},_M={class:"mb-4"},vM={class:"btn btn-outline-secondary text-nowrap my-2",href:"./api/sessions?format=csv",download:"sessions.csv"},bM={class:"mx-2"},yM={class:"d-flex align-items-baseline my-5"},EM={class:"me-4 mb-0"},wM={class:"d-flex align-items-baseline mb-3"},TM={class:"me-4 mb-0"},CM={class:"large"},SM={class:"breakdown text-gray d-sm-flex flex-sm-wrap ps-0 mb-2"},AM={class:"table-responsive my-3"},kM={class:"table"},xM={scope:"col"},LM={scope:"col",class:"text-end ps-sm-4 pe-md-5"},NM={scope:"col",class:"ps-3 ps-md-4 ps-md-5"},OM={class:"text-nowrap text-end ps-sm-4 pe-md-5"},PM={class:"text-nowrap ps-3 ps-md-4 ps-md-5"},MM={class:"d-block d-sm-none"},IM=df(()=>y("br",null,null,-1)),DM={class:"d-none d-sm-block"},RM=df(()=>y("br",null,null,-1));function $M(t,e,n,r,i,s){const o=ue("router-link"),a=ue("TopNavigation");return I(),H("div",fM,[y("header",dM,[y("h1",hM,[re(o,{class:"dropdown-item mx-2 me-2",to:"/"},{default:Ze(()=>[mM]),_:1}),Le(" "+F(t.$t("sessions.title")),1)]),re(a)]),y("div",pM,[y("main",gM,[y("div",_M,[y("a",vM,F(t.$t("sessions.downloadCsv")),1)]),(I(!0),H(ke,null,Qe(s.sessionsByMonthAndLoadpoint,l=>(I(),H("div",{key:l.month},[y("div",bM,[y("div",yM,[y("h2",EM,F(s.formatGroupHeadline(l.month)),1)]),(I(!0),H(ke,null,Qe(l.loadpoints,c=>(I(),H("div",{key:c.name},[y("div",wM,[y("h3",TM,F(c.name),1),y("div",CM,F(t.fmtKWh(c.total)),1)]),y("ul",SM,[(I(!0),H(ke,null,Qe(s.groupedKWh("vehicle",c.sessions),(u,d)=>(I(),H("li",{key:d,class:"breakdown-item"},F(u.name)+": "+F(t.fmtKWh(u.energy)),1))),128))]),y("div",AM,[y("table",kM,[y("thead",null,[y("tr",null,[y("th",xM,F(t.$t("sessions.vehicle")),1),y("th",LM,F(t.$t("sessions.energy")),1),y("th",NM,F(t.$t("sessions.date")),1)])]),y("tbody",null,[(I(!0),H(ke,null,Qe(c.sessions,(u,d)=>(I(),H("tr",{key:d},[y("td",null,F(u.vehicle),1),y("td",OM,F(t.fmtKWh(u.chargedEnergy*1e3)),1),y("td",PM,[y("span",MM,[Le(F(t.fmtFullDateTime(new Date(u.created),!0))+" ",1),IM,Le(" "+F(t.fmtFullDateTime(new Date(u.finished),!0)),1)]),y("span",DM,[Le(F(t.fmtFullDateTime(new Date(u.created),!1))+" ",1),RM,Le(" "+F(t.fmtFullDateTime(new Date(u.finished),!1)),1)])])]))),128))])])])]))),128))])]))),128))])])])}const FM=Ee(uM,[["render",$M],["__scopeId","data-v-c2d84bb6"]]),VM=ZS({history:pS(),routes:[{path:"/",component:aM,props:!0},{path:"/sessions",component:FM,props:!0}]});/*!
* shared v9.2.2
* (c) 2022 kazuya kawaguchi
* Released under the MIT License.
- */const Ic=typeof window<"u",HM=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",Sr=t=>HM?Symbol(t):t,BM=(t,e,n)=>UM({l:t,k:e,s:n}),UM=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),et=t=>typeof t=="number"&&isFinite(t),jM=t=>mf(t)==="[object Date]",vr=t=>mf(t)==="[object RegExp]",ja=t=>pe(t)&&Object.keys(t).length===0;function WM(t,e){typeof console<"u"&&(console.warn("[intlify] "+t),e&&console.warn(e.stack))}const it=Object.assign;let tm;const Os=()=>tm||(tm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function nm(t){return t.replace(/