blue-chestnut-solar-expert 0.0.20 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.cjs.js.map +1 -1
- package/dist/cjs/eraser-icon_16.cjs.entry.js +92 -55
- package/dist/cjs/eraser-icon_16.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loading-widget.cjs.entry.js +1 -1
- package/dist/cjs/stencil-library.cjs.js +1 -1
- package/dist/collection/components/map-draw/polygon-buttons.js +2 -3
- package/dist/collection/components/map-draw/polygon-buttons.js.map +1 -1
- package/dist/collection/components/solar-expert/solar-expert.js +3 -16
- package/dist/collection/components/solar-expert/solar-expert.js.map +1 -1
- package/dist/collection/components/solar-system-form/solar-system-form.js +85 -37
- package/dist/collection/components/solar-system-form/solar-system-form.js.map +1 -1
- package/dist/collection/components/widgets/loading-widget.js +1 -1
- package/dist/collection/store.js +1 -0
- package/dist/collection/store.js.map +1 -1
- package/dist/collection/types/lang.js.map +1 -1
- package/dist/collection/utils/geometry/fitting.js +0 -228
- package/dist/collection/utils/geometry/fitting.js.map +1 -1
- package/dist/collection/utils/lang/english.js +1 -0
- package/dist/collection/utils/lang/english.js.map +1 -1
- package/dist/collection/utils/lang/german.js +1 -0
- package/dist/collection/utils/lang/german.js.map +1 -1
- package/dist/collection/utils/lang/spanish.js +1 -0
- package/dist/collection/utils/lang/spanish.js.map +1 -1
- package/dist/components/loading-widget.js +1 -1
- package/dist/components/map-draw.js +1 -1
- package/dist/components/map-selector.js +1 -1
- package/dist/components/{p-CmFUQbz_.js → p-CTYaeZhp.js} +88 -40
- package/dist/components/p-CTYaeZhp.js.map +1 -0
- package/dist/components/{p-CPLDlLfb.js → p-CaedRXrz.js} +8 -8
- package/dist/components/p-CaedRXrz.js.map +1 -0
- package/dist/components/{p-DPfpDV5e.js → p-CvYS8YPD.js} +3 -3
- package/dist/components/{p-DPfpDV5e.js.map → p-CvYS8YPD.js.map} +1 -1
- package/dist/components/{p-CwVUc6Hq.js → p-DlAht76f.js} +6 -2
- package/dist/components/p-DlAht76f.js.map +1 -0
- package/dist/components/{p-CRnyqUKc.js → p-DufgH4Gd.js} +5 -6
- package/dist/components/p-DufgH4Gd.js.map +1 -0
- package/dist/components/{p-BxEeUA4s.js → p-G74Ln5vx.js} +3 -3
- package/dist/components/{p-BxEeUA4s.js.map → p-G74Ln5vx.js.map} +1 -1
- package/dist/components/{p-C-_6TJs5.js → p-bu76_2XI.js} +3 -3
- package/dist/components/{p-C-_6TJs5.js.map → p-bu76_2XI.js.map} +1 -1
- package/dist/components/{p-Bq1PVegq.js → p-oY2qkchz.js} +3 -3
- package/dist/components/{p-Bq1PVegq.js.map → p-oY2qkchz.js.map} +1 -1
- package/dist/components/polygon-buttons.js +1 -1
- package/dist/components/polygon-information.js +1 -1
- package/dist/components/settings-modal.js +1 -1
- package/dist/components/solar-expert.js +11 -24
- package/dist/components/solar-expert.js.map +1 -1
- package/dist/components/solar-system-form.js +1 -1
- package/dist/components/tool-box.js +1 -1
- package/dist/esm/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.js.map +1 -1
- package/dist/esm/eraser-icon_16.entry.js +92 -55
- package/dist/esm/eraser-icon_16.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-widget.entry.js +1 -1
- package/dist/esm/stencil-library.js +1 -1
- package/dist/stencil-library/api-E7GpMOpJ.js.map +1 -0
- package/dist/stencil-library/app-globals-DQuL1Twl.js.map +1 -0
- package/dist/stencil-library/config-BV_PiZGS.js.map +1 -0
- package/dist/stencil-library/decoder-DSavpK4g.js.map +1 -0
- package/dist/stencil-library/deflate-BNIZ2wXt.js.map +1 -0
- package/dist/stencil-library/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.esm.js.map +1 -1
- package/dist/stencil-library/index-DZjEuBrX.js.map +1 -0
- package/dist/stencil-library/index-DimvNaNS.js.map +1 -0
- package/dist/stencil-library/index.esm.js.map +1 -1
- package/dist/stencil-library/jpeg-B79KZkPY.js.map +1 -0
- package/dist/stencil-library/lerc-B-ZLzzvM.js.map +1 -0
- package/dist/stencil-library/lzw-1xg7uPVo.js.map +1 -0
- package/dist/stencil-library/p-62debd50.entry.js +2 -0
- package/dist/stencil-library/p-62debd50.entry.js.map +1 -0
- package/dist/stencil-library/{p-56f8bd65.entry.js → p-c4c3bbee.entry.js} +2 -2
- package/dist/stencil-library/packbits-0MTMkUGE.js.map +1 -0
- package/dist/stencil-library/pako.esm-BdkEMvj8.js.map +1 -0
- package/dist/stencil-library/raw-W8mxtLfl.js.map +1 -0
- package/dist/stencil-library/solar-expert.entry.esm.js.map +1 -0
- package/dist/stencil-library/solar-expert.entry.js +92 -0
- package/dist/{components/p-CRnyqUKc.js.map → stencil-library/solar-expert.entry.js.map} +1 -1
- package/dist/stencil-library/stencil-library.esm.js +1 -1
- package/dist/stencil-library/stencil-library.esm.js.map +1 -1
- package/dist/stencil-library/store-DUpvKmRV.js.map +1 -0
- package/dist/stencil-library/tools-DU7Muwzb.js.map +1 -0
- package/dist/stencil-library/utils-CTW6J-87.js.map +1 -0
- package/dist/stencil-library/webimage-CLeW6JHT.js.map +1 -0
- package/dist/types/components/solar-expert/solar-expert.d.ts +0 -1
- package/dist/types/components/solar-system-form/solar-system-form.d.ts +2 -0
- package/dist/types/store.d.ts +1 -0
- package/dist/types/types/lang.d.ts +1 -0
- package/dist/types/utils/geometry/fitting.d.ts +0 -23
- package/package.json +1 -1
- package/dist/components/p-CPLDlLfb.js.map +0 -1
- package/dist/components/p-CmFUQbz_.js.map +0 -1
- package/dist/components/p-CwVUc6Hq.js.map +0 -1
- package/dist/stencil-library/p-1e2ddc82.entry.js +0 -2
- package/dist/stencil-library/p-1e2ddc82.entry.js.map +0 -1
- /package/dist/stencil-library/{p-56f8bd65.entry.js.map → p-c4c3bbee.entry.js.map} +0 -0
|
@@ -1084,6 +1084,7 @@ const en = {
|
|
|
1084
1084
|
chargingTime: "Charging Time",
|
|
1085
1085
|
chargingTimeDay: "Day (06:00 - 18:00)",
|
|
1086
1086
|
chargingTimeNight: "Night (18:00 - 06:00)",
|
|
1087
|
+
kilometersPerYear: "Kilometers per Year",
|
|
1087
1088
|
},
|
|
1088
1089
|
annualPriceIncrease: "Annual Price Increase (%)",
|
|
1089
1090
|
costSavings25Years: "25-Year Savings",
|
|
@@ -1199,6 +1200,7 @@ const de = {
|
|
|
1199
1200
|
chargingTime: "Zeitpunkt der Ladung",
|
|
1200
1201
|
chargingTimeDay: "Tag (06:00 - 18:00)",
|
|
1201
1202
|
chargingTimeNight: "Nacht (18:00 - 06:00)",
|
|
1203
|
+
kilometersPerYear: "Kilometer pro Jahr",
|
|
1202
1204
|
},
|
|
1203
1205
|
annualPriceIncrease: "Jährliche Preissteigerung (%) ",
|
|
1204
1206
|
costSavings25Years: "25-Jährige Einsparungen",
|
|
@@ -1314,6 +1316,7 @@ const es = {
|
|
|
1314
1316
|
chargingTime: "Hora de carga",
|
|
1315
1317
|
chargingTimeDay: "Día (06:00 - 18:00)",
|
|
1316
1318
|
chargingTimeNight: "Noche (18:00 - 06:00)",
|
|
1319
|
+
kilometersPerYear: "Kilómetros por año",
|
|
1317
1320
|
},
|
|
1318
1321
|
annualPriceIncrease: "Aumento anual del precio (%)",
|
|
1319
1322
|
costSavings25Years: "Ahorro en 25 años",
|
|
@@ -1599,6 +1602,7 @@ const { state, onChange } = createStore({
|
|
|
1599
1602
|
},
|
|
1600
1603
|
settingsVersion: 1,
|
|
1601
1604
|
isMobile: false,
|
|
1605
|
+
isIOS: false,
|
|
1602
1606
|
});
|
|
1603
1607
|
onChange("latitude", (value) => {
|
|
1604
1608
|
state.latitude = value;
|
|
@@ -2429,12 +2433,11 @@ const PolygonButtons = class {
|
|
|
2429
2433
|
currentTool;
|
|
2430
2434
|
render() {
|
|
2431
2435
|
const t = getLanguageStrings(state.settings.language);
|
|
2432
|
-
|
|
2433
|
-
return (h("div", { key: '0395148df27fa4749435da350c48b48f48631b9e', class: "flex w-full gap-2 justify-end" }, h("button", { key: '8e1c15c7ebfca7970c240c02f1280834100fea59', class: `px-4 py-2 rounded-4xl hover:bg-[#0000003c] text-[#271200] transition-colors duration-200 text-xs ${this.currentTool === "markRoofEdge"
|
|
2436
|
+
return (h("div", { key: 'bfd9f90e4d9102dd46b27a74e53d8f6f58af9361', class: "flex w-full gap-2 justify-end" }, h("button", { key: '3b0866d091627579b479b3009800f12b27d13d5e', class: `px-4 py-2 rounded-4xl hover:bg-[#0000003c] text-[#271200] transition-colors duration-200 text-xs ${this.currentTool === "markRoofEdge"
|
|
2434
2437
|
? "bg-[#00000056]"
|
|
2435
2438
|
: "bg-white"}`,
|
|
2436
2439
|
// style={edgeSelectedStyle}
|
|
2437
|
-
onClick: () => this.selectEdgeTool() }, t.mapDraw.markRoofEdge), h("button", { key: '
|
|
2440
|
+
onClick: () => this.selectEdgeTool() }, t.mapDraw.markRoofEdge), h("button", { key: '12f39460c0a87249a639d2834f923f7abd0e592d', class: "px-4 py-2 rounded-4xl hover:bg-[#0000003c] text-[#271200] transition-colors duration-200 text-xs bg-[#ffffff]", onClick: () => this.calculateSolarPanels() }, t.mapDraw.calculateSolarPanels)));
|
|
2438
2441
|
}
|
|
2439
2442
|
};
|
|
2440
2443
|
PolygonButtons.style = outputCss$8;
|
|
@@ -2598,17 +2601,6 @@ const SolarExpert = class {
|
|
|
2598
2601
|
place = null;
|
|
2599
2602
|
showMapSelector = false;
|
|
2600
2603
|
inputElement;
|
|
2601
|
-
iosPolyfill(slider, e) {
|
|
2602
|
-
var val = (e.pageX - slider.getBoundingClientRect().left) /
|
|
2603
|
-
(slider.getBoundingClientRect().right -
|
|
2604
|
-
slider.getBoundingClientRect().left), max = parseInt(slider.getAttribute("max") || "0", 10), segment = 1 / (max - 1), segmentArr = [];
|
|
2605
|
-
max++;
|
|
2606
|
-
for (var i = 0; i < max; i++) {
|
|
2607
|
-
segmentArr.push(segment * i);
|
|
2608
|
-
}
|
|
2609
|
-
var segCopy = segmentArr.slice(), ind = segmentArr.sort((a, b) => Math.abs(val - a) - Math.abs(val - b))[0];
|
|
2610
|
-
slider.value = String(segCopy.indexOf(ind) + 1);
|
|
2611
|
-
}
|
|
2612
2604
|
componentWillLoad() {
|
|
2613
2605
|
state.isMobile =
|
|
2614
2606
|
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i
|
|
@@ -2621,10 +2613,8 @@ const SolarExpert = class {
|
|
|
2621
2613
|
}
|
|
2622
2614
|
});
|
|
2623
2615
|
state.settings.language = this.language;
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
slider.addEventListener("touchend", (e) => this.iosPolyfill(slider, e), { passive: true });
|
|
2627
|
-
});
|
|
2616
|
+
state.isIOS = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
|
2617
|
+
console.log(state.isIOS);
|
|
2628
2618
|
}
|
|
2629
2619
|
async loadGoogleMapsScript() {
|
|
2630
2620
|
try {
|
|
@@ -2672,7 +2662,7 @@ const SolarExpert = class {
|
|
|
2672
2662
|
}
|
|
2673
2663
|
render() {
|
|
2674
2664
|
const t = getLanguageStrings(this.language);
|
|
2675
|
-
return (h("div", { key: '
|
|
2665
|
+
return (h("div", { key: 'f084aa6d49f5c3ee21168d322d58de159b9ad7b9', class: "flex flex-col w-full h-full p-3 m-auto", id: "solar-calculator" }, this.showMapSelector
|
|
2676
2666
|
? (h("map-selector", { "api-key": this.apiKey, language: this.language }))
|
|
2677
2667
|
: (h(h.Fragment, null, h("div", { class: "pb-3 flex flex-row gap-4 items-stretch w-full" }, h("div", { class: "relative flex-3" }, h("div", { class: "absolute left-3 top-1/2 transform -translate-y-1/2" }, h("search-icon", null)), h("input", { ref: (el) => this.inputElement = el, type: "text", placeholder: t.solarExpert
|
|
2678
2668
|
.searchPlaceholder, class: "w-full pl-10 pr-4 py-2 border border-gray-300 rounded-4xl focus:ring-[#271200] bg-white h-full" })), h("button", { onClick: () => this.handleChooseOnMap(), class: "flex-1 pl-4 pr-4 py-2 border border-gray-300 bg-white rounded-4xl focus:ring-[#271200] hover:bg-[#271200] hover:text-white" }, t.mapSelector.chooseOnMap)), h("map-draw", { apiKey: this.apiKey })))));
|
|
@@ -2847,6 +2837,7 @@ const SolarSystemForm = class {
|
|
|
2847
2837
|
compensation25Years = 0;
|
|
2848
2838
|
savedCosts25Years = 0;
|
|
2849
2839
|
maxPanels = 5;
|
|
2840
|
+
kmDrivenPerYear = 10000;
|
|
2850
2841
|
updateSystemConfigs() {
|
|
2851
2842
|
if (Object.keys(this.systemConfigs).length === 0) {
|
|
2852
2843
|
this.numberOfPanels = 0;
|
|
@@ -2891,7 +2882,7 @@ const SolarSystemForm = class {
|
|
|
2891
2882
|
},
|
|
2892
2883
|
electricCar: this.electricCar
|
|
2893
2884
|
? {
|
|
2894
|
-
averageKilometersPerDay:
|
|
2885
|
+
averageKilometersPerDay: this.kmDrivenPerYear / 365,
|
|
2895
2886
|
consumptionkWhPer100km: 17,
|
|
2896
2887
|
batteryKWh: 20,
|
|
2897
2888
|
chargingHours: this.electricCarChargingTime === "day"
|
|
@@ -2951,103 +2942,149 @@ const SolarSystemForm = class {
|
|
|
2951
2942
|
obstructionPolygons: this.obstructionPolygons,
|
|
2952
2943
|
});
|
|
2953
2944
|
}
|
|
2945
|
+
isIOS() {
|
|
2946
|
+
return state.isIOS;
|
|
2947
|
+
}
|
|
2954
2948
|
render() {
|
|
2955
2949
|
const t = getLanguageStrings(state.settings.language);
|
|
2956
|
-
return (h("div", { key: '
|
|
2950
|
+
return (h("div", { key: '2dba1a7d4b79678b3361a902cde4f01b1a60723c', class: "flex flex-col justify-center items-center w-full h-full pt-4" // style={{
|
|
2957
2951
|
,
|
|
2958
2952
|
// display: (Object.keys(this.systemConfigs).length === 0)
|
|
2959
2953
|
// ? "none"
|
|
2960
2954
|
// : "flex",
|
|
2961
2955
|
// }}
|
|
2962
|
-
id: "solar-system-form" }, h("h1", { key: '
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2956
|
+
id: "solar-system-form" }, h("h1", { key: '0972b02752b45df6c041612092d464e92452b98a', class: "text-2xl font-bold text-[#271200] mb-4 w-full" }, t.solarSystemForm.title), h("div", { key: 'd66e6215be092ffed8fa69f876e2184ce734f9dc', class: "w-full bg-[#f3ebda] rounded-4xl p-6 space-y-6" }, h("div", { key: '5036c23117c8fdb9497746ad8eba7c0b4cf509e3', class: "space-y-4" }, h("h2", { key: 'f0342a639b9c11f6d30693da91001d01ea758de4', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.systemInformation), h("div", { key: 'bf6748d062b9e3d3505f77b3a3862be7f4b2d8af', class: "grid grid-rows-3 gap-0" }, h("div", { key: '21e6341bc4dadc41cfe755312ed6bf7ff24febbc', class: "grid grid-cols-2 gap-4" }, h("label", { key: 'ad9b6d44fa4a0feedcb67f9c697963af10ae3e5f', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.numberOfPanels), h("label", { key: '48045b48436b408c29e21f005fde2ace05d75703', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.panelPeakPower)), h("div", { key: '13c5228111f38d156672b74486804bfe34d28ad7', class: "grid grid-cols-2 gap-4" }, !this.isIOS()
|
|
2957
|
+
? (h("input", { type: "number", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.numberOfPanels, readOnly: true }))
|
|
2958
|
+
: (h("input", { type: "number", min: "1", max: this.maxPanels, class: "flex-1 px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.numberOfPanels, onInput: (e) => {
|
|
2959
|
+
const value = parseInt(e.target
|
|
2960
|
+
.value);
|
|
2961
|
+
if (value >= 1 &&
|
|
2962
|
+
value <=
|
|
2963
|
+
this.maxPanels) {
|
|
2964
|
+
this.numberOfPanels = value;
|
|
2965
|
+
this.recalculate();
|
|
2966
|
+
}
|
|
2967
|
+
} })), h("input", { key: '53d8ea2e917661f9151ddf9b185af5d6756bf632', type: "number", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.panelPeakPower, readonly: true })), h("div", { key: '17477ccb77a6f5953cf9976d743f3ba7009781af', class: "grid grid-cols-2 gap-4" }, h("div", { key: '85b218da4a521d88740d6f3921fb25cfbeaf7dbe', class: "w-full pt-2" }, !this.isIOS() &&
|
|
2968
|
+
(h("input", { key: '52e835a0cb277b040a36af6a06e312e9a573fe0f', type: "range", min: "1", max: this.maxPanels, step: "1", class: "input-slider w-full custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white", value: this.numberOfPanels, onInput: (e) => {
|
|
2969
|
+
this.numberOfPanels =
|
|
2970
|
+
parseInt(e.target
|
|
2971
|
+
.value);
|
|
2972
|
+
this.recalculate();
|
|
2973
|
+
} }))))), h("div", { key: 'afe5465d0eeb4de5f8cacb1defd003ebf67a8308', class: "bg-white rounded-4xl p-4" }, h("div", { key: 'caf3fa20ee512be50c0ee47dd446325589c708cb', class: "flex items-center justify-between" }, h("span", { key: '4478560c195bd1fb0c2a37b409fc94b437d89576', class: "text-gray-600" }, t.solarSystemForm.totalSystemPeakPower), h("span", { key: '955d70d3c451a120e939dd6812f6d5a56b93b91c', class: "text-xl font-bold text-[#271200]" }, (DEFAULT_SOLAR_PANEL_TYPE.kWattPeak *
|
|
2974
|
+
this.numberOfPanels).toFixed(1), " kW")))), h("div", { key: '7be99868bcb573b69940ae0eed1dd339c276182a', class: "space-y-4" }, h("h2", { key: '4c707b1f87c2f1ee48f21523910876298c1d50cc', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.householdConsumptionTitle), h("div", { key: '91275b282cd1deef545ccc09971c6e8f501c27a2', class: "grid grid-rows-2 gap-0" }, h("div", { key: 'a64d9f3934d296ee3efe68796d1dba323797d67d', class: "grid grid-cols-2 gap-4" }, h("label", { key: '63772879247a7c9a099fabcd3bcec1b0e1ab4ee8', class: "block text-sm font-medium text-gray-600" }, t.solarSystemForm.annualConsumption), h("label", { key: '6a5754992670dbe36b25f6bc0e39f4bab847dca0', class: "block text-sm font-medium text-gray-600" }, t.solarSystemForm.consumptionProfileTitle)), h("div", { key: 'cf7ff437e16df324a0f193e3b98828ec44d0c46f', class: "grid grid-cols-2 gap-4" }, h("input", { key: 'b4b67d847c8f8f9fae7a1a7d51d95cb50b8a258b', type: "number", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.householdConsumption, onInput: (e) => {
|
|
2968
2975
|
this.householdConsumption = parseInt(e.target
|
|
2969
2976
|
.value);
|
|
2970
2977
|
this.recalculate();
|
|
2971
|
-
} }), h("select", { key: '
|
|
2978
|
+
} }), h("select", { key: '6673bebb683bf19abe42f519f1cb04b422c6b364', class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", onChange: (e) => {
|
|
2972
2979
|
this.consumptionProfile =
|
|
2973
2980
|
e.target
|
|
2974
2981
|
.value;
|
|
2975
2982
|
this.recalculate();
|
|
2976
|
-
} }, h("option", { key: '
|
|
2983
|
+
} }, h("option", { key: 'b2d9dd9c783e5f245cc0b2543334e3be9ae5bd69', value: "mostly_at_home", selected: this.consumptionProfile ===
|
|
2977
2984
|
"mostly_at_home" }, t.solarSystemForm.consumptionProfiles
|
|
2978
|
-
.mostlyAtHome), h("option", { key: '
|
|
2985
|
+
.mostlyAtHome), h("option", { key: 'eb3e39a87362b3d39ca11c00449456ec677cbfc8', value: "mostly_away", selected: this.consumptionProfile ===
|
|
2979
2986
|
"mostly_away" }, t.solarSystemForm.consumptionProfiles
|
|
2980
|
-
.mostlyAway))))), h("div", { key: '
|
|
2987
|
+
.mostlyAway))))), h("div", { key: '1e5da3eb5db4fcb7c48d667e0a2cd5fa7a54faed', class: "space-y-4" }, h("h2", { key: 'f9b05e006eee674279060a15f1f1dbb9d6c10d50', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.additionalComponents.title), h("div", { key: '0b9489a8e1ce2adcdce15f3223ac88601173a801', class: "flex flex-col gap-4" }, h("div", { key: 'c89bb7cc403c428bbd443ca87e8992e91785fde4', class: "flex flex-col bg-white rounded-4xl p-4 gap-4" }, h("div", { key: '273475b46f1486f1e7231f44349322a91c3c301b', class: "flex items-center justify-between" }, h("div", { key: '4bbf86342e38d59b24c3a7417374452a3c73b8ed', class: "flex items-center gap-2" }, h("input", { key: '124da317438aa1e19c3d5ac68af68266cd1e3564', type: "checkbox", id: "heatPump", class: "w-4 h-4 accent-[#964500] border-gray-300 rounded-full focus:ring-[#964500] focus:ring-offset-0 focus:ring-2", checked: this.heatPump > 0, onChange: (e) => {
|
|
2981
2988
|
this.heatPump =
|
|
2982
2989
|
e.target
|
|
2983
2990
|
.checked
|
|
2984
2991
|
? 100
|
|
2985
2992
|
: 0;
|
|
2986
2993
|
this.recalculate();
|
|
2987
|
-
} }), h("label", { key: '
|
|
2994
|
+
} }), h("label", { key: '7845fc7124ea276e780ee5f0e53b0795f254e31f', htmlFor: "heatPump", class: "text-gray-600" }, t.solarSystemForm
|
|
2988
2995
|
.additionalComponents
|
|
2989
|
-
.heatPump)), this.heatPump > 0 && (h("span", { key: '
|
|
2990
|
-
|
|
2991
|
-
.
|
|
2992
|
-
|
|
2993
|
-
|
|
2996
|
+
.heatPump)), (this.heatPump > 0 && !this.isIOS()) && (h("span", { key: '0eda4b5459b14430bc9be00ef740e216df7cd15c', class: "text-gray-600" }, this.heatPump, " m\u00B2"))), this.heatPump > 0 && (h("div", { key: '91f8bf5247aa936892ed10e3987f8201f078cd92', class: "flex flex-col gap-2" }, this.isIOS()
|
|
2997
|
+
? (h("div", { class: "flex items-center gap-2" }, h("input", { type: "number", min: "10", max: "300", step: "10", class: "flex-1 px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.heatPump, onInput: (e) => {
|
|
2998
|
+
const value = parseInt(e.target
|
|
2999
|
+
.value);
|
|
3000
|
+
if (value >= 10 &&
|
|
3001
|
+
value <= 300) {
|
|
3002
|
+
this.heatPump =
|
|
3003
|
+
value;
|
|
3004
|
+
this.recalculate();
|
|
3005
|
+
}
|
|
3006
|
+
} }), h("span", { class: "text-sm text-gray-600" }, "m\u00B2")))
|
|
3007
|
+
: (h("input", { type: "range", min: "10", max: "300", step: "10", class: "input-slider custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white", value: this.heatPump, onInput: (e) => {
|
|
3008
|
+
this.heatPump =
|
|
3009
|
+
parseInt(e.target
|
|
3010
|
+
.value);
|
|
3011
|
+
this.recalculate();
|
|
3012
|
+
} }))))), h("div", { key: 'dde5da644a165acb42ae0c23c8a129851728fb40', class: "flex flex-col bg-white rounded-4xl p-4 gap-4" }, h("div", { key: '657c3e78f58d54e26305071d60948a334a06e68c', class: "flex items-center justify-between" }, h("div", { key: '88718f9d326fc4824d77f5ee1ad120684f42c5c7', class: "flex items-center gap-2" }, h("input", { key: 'e2f3c3f9978d11471aea4736745169aa61a90206', type: "checkbox", id: "electricCar", class: "w-4 h-4 accent-[#964500] border-gray-300 rounded focus:ring-[#964500] focus:ring-offset-0 focus:ring-2", checked: this.electricCar, onChange: (e) => {
|
|
2994
3013
|
this.electricCar =
|
|
2995
3014
|
e.target
|
|
2996
3015
|
.checked;
|
|
2997
3016
|
this.recalculate();
|
|
2998
|
-
} }), h("label", { key: '
|
|
3017
|
+
} }), h("label", { key: '6df782a0b807a3c4463686804e71a65360c651ac', htmlFor: "electricCar", class: "text-gray-600" }, t.solarSystemForm
|
|
2999
3018
|
.additionalComponents
|
|
3000
|
-
.electricCar))), this.electricCar && (h("div", { key: '
|
|
3019
|
+
.electricCar))), this.electricCar && (h("div", { key: 'f3d23a7c239c4a32bd838825fc5c2bdb018c0922', class: "flex flex-col gap-2" }, h("div", { key: 'bf5b72bdad1771baace0b191d698c2f083d50e19', class: "grid grid-cols-2 gap-4" }, h("label", { key: '6df23bf10da5d23735c3c5cfab6301a35d9575ec', class: "text-sm text-gray-600" }, t.solarSystemForm
|
|
3001
3020
|
.additionalComponents
|
|
3002
|
-
.chargingTime), h("
|
|
3021
|
+
.chargingTime), h("label", { key: 'c33783c4485f9076190f0c47992e1594a8cc3548', class: "text-sm text-gray-600" }, t.solarSystemForm
|
|
3022
|
+
.additionalComponents
|
|
3023
|
+
.kilometersPerYear)), h("div", { key: '5722c0e3fca87593f93bb22168a776dc7d12a51f', class: "grid grid-cols-2 gap-4" }, h("select", { key: '0f38ea2f92d1bbb1aa24dca501a46ef510c3de9d', class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", onChange: (e) => {
|
|
3003
3024
|
this.electricCarChargingTime =
|
|
3004
3025
|
e.target
|
|
3005
3026
|
.value;
|
|
3006
3027
|
this.recalculate();
|
|
3007
|
-
} }, h("option", { key: '
|
|
3028
|
+
} }, h("option", { key: 'b25ca2e4796760fb657905e3840c073696c9ced9', value: "day", selected: this
|
|
3008
3029
|
.electricCarChargingTime ===
|
|
3009
3030
|
"day" }, t.solarSystemForm
|
|
3010
3031
|
.additionalComponents
|
|
3011
|
-
.chargingTimeDay), h("option", { key: '
|
|
3032
|
+
.chargingTimeDay), h("option", { key: '8569ac468010bf4aa8017b04855a2c3eb929f9c3', value: "night", selected: this
|
|
3012
3033
|
.electricCarChargingTime ===
|
|
3013
3034
|
"night" }, t.solarSystemForm
|
|
3014
3035
|
.additionalComponents
|
|
3015
|
-
.chargingTimeNight))
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3036
|
+
.chargingTimeNight)), h("input", { key: '234a97ea1a54194dd5213debeafdcee3d18472af', type: "number", min: "1000", max: "50000", step: "1000", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.kmDrivenPerYear, onInput: (e) => {
|
|
3037
|
+
this.kmDrivenPerYear =
|
|
3038
|
+
parseInt(e.target
|
|
3039
|
+
.value);
|
|
3019
3040
|
this.recalculate();
|
|
3020
|
-
} }))))), h("div", { key: '
|
|
3041
|
+
} }))))), h("div", { key: '2b9ec6f3abefbc9a12a0c412376a117201d9cbf7', class: "flex flex-col bg-white rounded-4xl p-4 gap-4" }, h("div", { key: 'b8007674c3f2fcaa9b1120f452804737c2e60b61', class: "flex items-center justify-between" }, h("label", { key: 'b10b40d2079c8a6643e0e5c7078170c8ec1fd07a', class: "text-gray-600" }, t.solarSystemForm.additionalComponents
|
|
3042
|
+
.battery), !this.isIOS() && (h("span", { key: '8abfc38292626294d96cd46134ae6c9efcd45caf', class: "text-gray-600" }, this.battery, " kWh"))), h("div", { key: '89dd22648545df7ea017a704793aeab8cf193437', class: "flex flex-col gap-2" }, this.isIOS()
|
|
3043
|
+
? (h("div", { class: "flex items-center gap-2" }, h("input", { type: "number", min: "0", max: "20", step: "1", class: "flex-1 px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.battery, onInput: (e) => {
|
|
3044
|
+
const value = parseInt(e.target
|
|
3045
|
+
.value);
|
|
3046
|
+
if (value >= 0 &&
|
|
3047
|
+
value <= 20) {
|
|
3048
|
+
this.battery =
|
|
3049
|
+
value;
|
|
3050
|
+
this.recalculate();
|
|
3051
|
+
}
|
|
3052
|
+
}, placeholder: "Battery capacity" }), h("span", { class: "text-sm text-gray-600" }, "kWh")))
|
|
3053
|
+
: (h("input", { type: "range", min: "0", max: "20", step: "1", class: "input-slider w-full custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white", value: this.battery, onInput: (e) => {
|
|
3054
|
+
this.battery = parseInt(e.target
|
|
3055
|
+
.value);
|
|
3056
|
+
this.recalculate();
|
|
3057
|
+
} })))))), h("div", { key: '8729a38d3c447d702dbd962ce732cb835683cc40', class: "space-y-4" }, h("h2", { key: '1baeb07b6e4d9b80d8d5238730c5f24679fd8056', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.electricityCostsTitle), h("div", { key: '55af89837e9c511c6e38d13e8b43edb3a3188831', class: "grid grid-rows-2 gap-0" }, h("div", { key: '7810a1fcfa5e3bd3bae3ae8860b5f3b88cffc7fd', class: "grid grid-cols-3 gap-4" }, h("label", { key: '93f0fdcad9d8a0293686630b5bd7c1de1f2ce6f3', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.electricityPrice), h("label", { key: '4a90ddf97d30c14e7dadc0668bd99b67b67fbe10', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.compensationRate), h("label", { key: '51d4537d803746c154a0beead97fc1385c5ce3ff', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.annualPriceIncrease)), h("div", { key: 'ffe8e05a5d0cb78ce9521e45bf1432f8cf071535', class: "grid grid-cols-3 gap-4" }, h("input", { key: '589327000adc4bf5611dbfeab5146cd9dbfcd117', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.electricityPrice.toFixed(2), onInput: (e) => {
|
|
3021
3058
|
this.electricityPrice = parseFloat(e.target
|
|
3022
3059
|
.value);
|
|
3023
3060
|
this.recalculate();
|
|
3024
|
-
} }), h("input", { key: '
|
|
3061
|
+
} }), h("input", { key: '385e5e85ecde6812807e02c6fb5e45f64d41bb97', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.compensationRate.toFixed(2), onInput: (e) => {
|
|
3025
3062
|
this.compensationRate = parseFloat(e.target
|
|
3026
3063
|
.value);
|
|
3027
3064
|
this.recalculate();
|
|
3028
|
-
} }), h("input", { key: '
|
|
3065
|
+
} }), h("input", { key: 'f71a1b7236c0ff45b24f1c012e4e6c5fb05f512c', type: "number", step: "0.1", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white", value: this.annualPriceIncrease.toFixed(1), onInput: (e) => {
|
|
3029
3066
|
this.annualPriceIncrease = parseFloat(e.target
|
|
3030
3067
|
.value);
|
|
3031
3068
|
this.recalculate();
|
|
3032
|
-
} })))), h("div", { key: '
|
|
3069
|
+
} })))), h("div", { key: 'ec6d113a5645a3e3de006a51ed2eb022f5545b2f', class: "space-y-4 pt-4 border-t border-gray-200" }, h("h2", { key: 'b1f8e2e61ef2e0155867bde9ca7b72ccc409bcca', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.resultsTitle), h("div", { key: 'f6f6baef1de50a71e400a86c7cf0af838430d759', class: "bg-white rounded-4xl p-4" }, h("div", { key: '21bd3865da59dfa154c371b1f0df48e94fbe2ebe', class: "flex items-center justify-between" }, h("span", { key: '8fedb2c918d3aa1d3fadb0d07aaabccb2d78281f', class: "text-gray-600" }, t.solarSystemForm.autonomy), h("span", { key: '14600dda39b1cbee3281145836b03087bfaf99e7', class: "text-xl font-bold text-[#271200]" }, this.autonomy > 100
|
|
3033
3070
|
? "100"
|
|
3034
|
-
: this.autonomy.toFixed(1), "%")), h("div", { key: '
|
|
3035
|
-
.savingsDisclaimer))), h("span", { key: '
|
|
3036
|
-
.solarSystemForm.year)), h("div", { key: '
|
|
3071
|
+
: this.autonomy.toFixed(1), "%")), h("div", { key: '8be640248569dfcae408ca9b9552d23147129203', class: "flex items-center justify-between mt-4" }, h("div", { key: 'dbfc7ce335696180abfe84e5b976cdd4e820267e', class: "flex items-center gap-2" }, h("span", { key: 'b81ab0aca1d04a307a88160215188c986da9e14e', class: "text-gray-600" }, t.solarSystemForm.costSavings), h("div", { key: 'd188d4ebfc268417cafc92513ab60dda64ee4a2c', class: "relative group" }, h("svg", { key: '432b93be3b94a02afd9594183ea7aad458851cb8', xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-gray-400 cursor-help", viewBox: "0 0 20 20", fill: "currentColor" }, h("path", { key: '85c79119ab2e4986dd80ebc615067881be8aef47', "fill-rule": "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z", "clip-rule": "evenodd" })), h("div", { key: '97d984d70cc4e468c96d1efa407fbb5d907f878f', class: "absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 w-64 p-2 bg-gray-800 text-white text-sm rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none" }, t.solarSystemForm
|
|
3072
|
+
.savingsDisclaimer))), h("span", { key: '2ebf755861a392d0334051bc74dba3ecf3da54c8', class: "text-xl font-bold text-green-600" }, this.costSavings.toFixed(2), "\u20AC/", t
|
|
3073
|
+
.solarSystemForm.year)), h("div", { key: 'e8d6aed4a3090691a8e099033e10fd7402101bd0', class: "flex items-center justify-between mt-4" }, h("div", { key: '8620e5ee6cc66670ee8edc67e31ad47f5e2e7cfc', class: "flex items-center gap-2" }, h("span", { key: '7eeb068aa83f5f022f4ae89ef101239370717fb8', class: "text-gray-600" }, "Einspeiseverg\u00FCtung 25 Jahre")), h("span", { key: '2cf06969e5e77e70059e1e9394f2d8524301929c', class: "text-xl font-bold text-green-600" }, this.compensation25Years.toFixed(2), "\u20AC")), h("div", { key: '36601f46327e20a1208647b83d58bd4dbf74d27f', class: "flex items-center justify-between mt-4" }, h("div", { key: 'a14b9f951cf78e264836c2324ca67200b00d19ca', class: "flex items-center gap-2" }, h("span", { key: 'b10ccfdd861677e499c0ca6932359aed155c77fb', class: "text-gray-600" }, "Geldwerter Vorteil 25 Jahre")), h("span", { key: '4d76e1c00dc6faf30a136d4b87a9e48b10295c21', class: "text-xl font-bold text-green-600" }, this.savedCosts25Years.toFixed(2), "\u20AC")))), h("div", { key: '86702fecf5d88cffad85540fd0a6bdf85a7d2819', class: "space-y-4 pt-4 border-t border-gray-200" }, h("h2", { key: 'e5a175e49d3005cf3550870ea701f9f2a9c01563', class: "text-lg font-semibold text-[#271200]" }, t.solarSystemForm.requestOffer), h("div", { key: '90835fc6003c9c3aac3599b0a84c17a4db8fb234', class: "grid grid-rows-2 gap-0" }, h("div", { key: 'e06697367b1c321538d930de33135d24bc924c25', class: "grid grid-cols-2 gap-4" }, h("label", { key: '99dd59c35f123f57b8ebfc78d0c4f7dc204fb515', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.name), h("label", { key: '0a47717b2397f4cae1540992a43bf167b2f6a9a0', class: "block text-sm font-medium text-gray-600 mb-1" }, t.solarSystemForm.email)), h("div", { key: 'f23dba91b9af821b44119e71cc5649f61ce3e8cb', class: "grid grid-cols-2 gap-4" }, h("input", { key: '91bfb8d4c0ec6f9bc92ae3c8b96ab8cb22338c6f', type: "text", class: `w-full px-4 py-2 rounded-4xl border ${this.nameError
|
|
3037
3074
|
? "border-red-500"
|
|
3038
3075
|
: "border-gray-300"} focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white`, value: this.name, onInput: (e) => {
|
|
3039
3076
|
this.name =
|
|
3040
3077
|
e.target
|
|
3041
3078
|
.value;
|
|
3042
3079
|
this.validateForm();
|
|
3043
|
-
}, placeholder: "Your name" }), this.nameError && (h("p", { key: '
|
|
3080
|
+
}, placeholder: "Your name" }), this.nameError && (h("p", { key: '393b5f1217e7f130d03ef1ce33f2c80d0ece5287', class: "text-red-500 text-sm mt-1" }, this.nameError)), h("input", { key: '3dad5518450c61625c301028e2ccac01ed3c1068', type: "email", class: `w-full px-4 py-2 rounded-4xl border ${this.emailError
|
|
3044
3081
|
? "border-red-500"
|
|
3045
3082
|
: "border-gray-300"} focus:ring-2 focus:ring-[#964500] focus:border-transparent bg-white`, value: this.email, onInput: (e) => {
|
|
3046
3083
|
this.email =
|
|
3047
3084
|
e.target
|
|
3048
3085
|
.value;
|
|
3049
3086
|
this.validateForm();
|
|
3050
|
-
}, placeholder: "your.email@example.com" }), this.emailError && (h("p", { key: '
|
|
3087
|
+
}, placeholder: "your.email@example.com" }), this.emailError && (h("p", { key: 'ab9abb1cf9d94af195ab1e0db0e4ae3bfa1f9dac', class: "text-red-500 text-sm mt-1" }, this.emailError)))), h("div", { key: '30e9097ad6a2ac886da307dc199ef19f3a685e4a', class: "flex justify-center" }, h("button", { key: '6a27417c30b6dc43685e03b30593a97a70c8caa0', onClick: () => this.handleRequestOffer(), disabled: !this.name.trim() ||
|
|
3051
3088
|
!this.email.trim() || !!this.nameError ||
|
|
3052
3089
|
!!this.emailError, class: "px-4 py-2 bg-[#271200] rounded-4xl hover:bg-[#964500] transition-colors duration-200", style: { color: "white" } }, t.solarSystemForm.requestOfferButton))))));
|
|
3053
3090
|
}
|