blue-chestnut-solar-expert 0.0.70 → 0.0.72
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/stencil-library/{decoder-CuK4bYyT.js → decoder-CPVEW_Ka.js} +5 -5
- package/dist/stencil-library/{decoder-CuK4bYyT.js.map → decoder-CPVEW_Ka.js.map} +1 -1
- package/dist/stencil-library/{decoder-DO85tL09.js → decoder-DUMy4-YU.js} +5 -5
- package/dist/stencil-library/{decoder-DO85tL09.js.map → decoder-DUMy4-YU.js.map} +1 -1
- package/dist/stencil-library/{deflate-B_19Wwe5.js → deflate-B57bxEA2.js} +5 -5
- package/dist/stencil-library/{deflate-B_19Wwe5.js.map → deflate-B57bxEA2.js.map} +1 -1
- package/dist/stencil-library/{deflate-BnZRAamW.js → deflate-BtBNkkuY.js} +5 -5
- package/dist/stencil-library/{deflate-BnZRAamW.js.map → deflate-BtBNkkuY.js.map} +1 -1
- package/dist/stencil-library/eraser-icon.entry.js +1 -1
- package/dist/stencil-library/house-icon.entry.js +1 -1
- package/dist/stencil-library/icon-selector.entry.js +1 -1
- package/dist/stencil-library/{index-ICfDNUMe.js → index-CtdQ2GTJ.js} +3 -3
- package/dist/stencil-library/{index-ICfDNUMe.js.map → index-CtdQ2GTJ.js.map} +1 -1
- package/dist/stencil-library/index-DzvFVH7F.js +4172 -0
- package/dist/stencil-library/index-DzvFVH7F.js.map +1 -0
- package/dist/stencil-library/{jpeg-BYwBjmYM.js → jpeg-CZDb06H8.js} +5 -5
- package/dist/stencil-library/{jpeg-BYwBjmYM.js.map → jpeg-CZDb06H8.js.map} +1 -1
- package/dist/stencil-library/{jpeg-Carqigwf.js → jpeg-CbHhI4Ax.js} +5 -5
- package/dist/stencil-library/{jpeg-Carqigwf.js.map → jpeg-CbHhI4Ax.js.map} +1 -1
- package/dist/stencil-library/{lerc-C23gVCZY.js → lerc-CnIv8e0A.js} +5 -5
- package/dist/stencil-library/{lerc-BrKFrpOl.js.map → lerc-CnIv8e0A.js.map} +1 -1
- package/dist/stencil-library/{lerc-BrKFrpOl.js → lerc-yI_Z-vIH.js} +5 -5
- package/dist/stencil-library/{lerc-C23gVCZY.js.map → lerc-yI_Z-vIH.js.map} +1 -1
- package/dist/stencil-library/loading-widget.entry.js +2 -2
- package/dist/stencil-library/{lzw-Cv4Jzqw8.js → lzw-By0Ly-Um.js} +5 -5
- package/dist/stencil-library/{lzw-Cv4Jzqw8.js.map → lzw-By0Ly-Um.js.map} +1 -1
- package/dist/stencil-library/{lzw-CyjveJk_.js → lzw-uwOJU9LC.js} +5 -5
- package/dist/stencil-library/{lzw-CyjveJk_.js.map → lzw-uwOJU9LC.js.map} +1 -1
- package/dist/stencil-library/{map-draw-I6HehGjN.js → map-draw-BJErx7pC.js} +21 -21
- package/dist/stencil-library/{map-draw-I6HehGjN.js.map → map-draw-BJErx7pC.js.map} +1 -1
- package/dist/stencil-library/{map-draw-s4wyOrpW.js → map-draw-CdjJ0lhL.js} +21 -22
- package/dist/stencil-library/{map-draw-s4wyOrpW.js.map → map-draw-CdjJ0lhL.js.map} +1 -1
- package/dist/stencil-library/map-draw.entry.js +3 -3
- package/dist/stencil-library/map-selector.entry.js +2 -2
- package/dist/stencil-library/marker-icon.entry.js +1 -1
- package/dist/stencil-library/move-icon.entry.js +1 -1
- package/dist/stencil-library/octagon-minus-icon.entry.js +1 -1
- package/dist/stencil-library/{packbits-DYI_WQMn.js → packbits-CAMElV0D.js} +5 -5
- package/dist/stencil-library/{packbits-DYI_WQMn.js.map → packbits-CAMElV0D.js.map} +1 -1
- package/dist/stencil-library/{packbits-DZ08I0fK.js → packbits-z_b-uE9I.js} +5 -5
- package/dist/stencil-library/{packbits-DZ08I0fK.js.map → packbits-z_b-uE9I.js.map} +1 -1
- package/dist/stencil-library/polygon-buttons.entry.js +2 -2
- package/dist/stencil-library/polygon-information.entry.js +2 -2
- package/dist/stencil-library/{raw-DmgLt5Xw.js → raw-Czhh0DXR.js} +5 -5
- package/dist/stencil-library/{raw-DmgLt5Xw.js.map → raw-Czhh0DXR.js.map} +1 -1
- package/dist/stencil-library/{raw-DxHWSwjD.js → raw-DWOUVxSa.js} +5 -5
- package/dist/stencil-library/{raw-DxHWSwjD.js.map → raw-DWOUVxSa.js.map} +1 -1
- package/dist/stencil-library/search-icon.entry.js +1 -1
- package/dist/stencil-library/settings-icon.entry.js +1 -1
- package/dist/stencil-library/settings-modal.entry.js +2 -2
- package/dist/stencil-library/solar-expert.entry.esm.js.map +1 -1
- package/dist/stencil-library/solar-expert.entry.js +4 -4
- package/dist/stencil-library/solar-expert.entry.js.map +1 -1
- package/dist/stencil-library/solar-system-form.entry.esm.js.map +1 -1
- package/dist/stencil-library/solar-system-form.entry.js +143 -209
- package/dist/stencil-library/solar-system-form.entry.js.map +1 -1
- package/dist/stencil-library/stencil-library.esm.js +3 -3
- package/dist/stencil-library/{store-CcqrFuBK.js → store-CAMVyEnv.js} +3 -3
- package/dist/stencil-library/{store-CcqrFuBK.js.map → store-CAMVyEnv.js.map} +1 -1
- package/dist/stencil-library/store-nKI4l4pt.js +758 -0
- package/dist/stencil-library/store-nKI4l4pt.js.map +1 -0
- package/dist/stencil-library/toast-notification.entry.js +1 -1
- package/dist/stencil-library/tool-box.entry.js +2 -2
- package/dist/stencil-library/tutorial-component.entry.js +2 -2
- package/dist/stencil-library/undo-icon.entry.js +1 -1
- package/dist/stencil-library/{webimage-DjTbF9dC.js → webimage-22q9OHrk.js} +5 -5
- package/dist/stencil-library/{webimage-DjTbF9dC.js.map → webimage-22q9OHrk.js.map} +1 -1
- package/dist/stencil-library/{webimage-DpQLhKY4.js → webimage-Dsu3knYw.js} +5 -5
- package/dist/stencil-library/{webimage-DpQLhKY4.js.map → webimage-Dsu3knYw.js.map} +1 -1
- package/dist/types/components/solar-system-form/solar-system-form.d.ts +10 -6
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
if (typeof global === "undefined") { var global = globalThis || window || self; }
|
|
3
|
-
import { r as registerInstance, h } from './index-
|
|
3
|
+
import { r as registerInstance, h } from './index-DzvFVH7F.js';
|
|
4
4
|
import { b as DEFAULT_SOLAR_PANEL_TYPE } from './config-CWfV1nKn.js';
|
|
5
|
-
import { g as getLanguageStrings, s as state } from './store-
|
|
5
|
+
import { g as getLanguageStrings, s as state } from './store-nKI4l4pt.js';
|
|
6
6
|
import { d as distExports, H as HEAT_PUMP_CONSUMPTION } from './constants-hboFofU4.js';
|
|
7
7
|
|
|
8
8
|
async function fetchSolarData(latitude, longitude, apiKey) {
|
|
@@ -111,7 +111,7 @@ const SolarSystemForm = class {
|
|
|
111
111
|
polygonCanvas;
|
|
112
112
|
pixelInMeters;
|
|
113
113
|
householdConsumption = 4500;
|
|
114
|
-
consumptionProfile =
|
|
114
|
+
consumptionProfile = 'mostly_at_home';
|
|
115
115
|
electricityPrice = 0.3;
|
|
116
116
|
compensationRate = 0.07;
|
|
117
117
|
annualPriceIncrease = 2;
|
|
@@ -119,14 +119,16 @@ const SolarSystemForm = class {
|
|
|
119
119
|
costSavings = 0;
|
|
120
120
|
numberOfPanels = 5;
|
|
121
121
|
panelPeakPower = 0.4; // kW per panel
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
122
|
+
firstname = '';
|
|
123
|
+
surname = '';
|
|
124
|
+
email = '';
|
|
125
|
+
phone = '';
|
|
126
|
+
firstnameError = '';
|
|
127
|
+
surnameError = '';
|
|
128
|
+
emailError = '';
|
|
129
|
+
phoneError = '';
|
|
128
130
|
electricCar = false;
|
|
129
|
-
electricCarChargingTime =
|
|
131
|
+
electricCarChargingTime = 'day';
|
|
130
132
|
heatPump = 0;
|
|
131
133
|
battery = 0;
|
|
132
134
|
batteryEnabled = false;
|
|
@@ -137,8 +139,10 @@ const SolarSystemForm = class {
|
|
|
137
139
|
totalEnergyConsumption = 4500;
|
|
138
140
|
totalEnergyProduction = 0;
|
|
139
141
|
isSubmitting = false;
|
|
140
|
-
submitMessage =
|
|
142
|
+
submitMessage = '';
|
|
141
143
|
submitSuccess = false;
|
|
144
|
+
privacyPolicyAccepted = false;
|
|
145
|
+
privacyPolicyError = '';
|
|
142
146
|
updateSystemConfigs() {
|
|
143
147
|
if (Object.keys(this.systemConfigs).length === 0) {
|
|
144
148
|
this.numberOfPanels = 0;
|
|
@@ -147,19 +151,16 @@ const SolarSystemForm = class {
|
|
|
147
151
|
}
|
|
148
152
|
this.numberOfPanels = Object.keys(this.systemConfigs).reduce((acc, curr) => acc + this.systemConfigs[curr].numberOfPanels, 0);
|
|
149
153
|
this.maxPanels = Object.keys(this.systemConfigs).reduce((acc, curr) => acc + this.systemConfigs[curr].numberOfPanels, 0);
|
|
150
|
-
this.panelPeakPower = Object.entries(this.systemConfigs)[0][1][0]
|
|
151
|
-
?.panel.kWattPeak ?? 0.44;
|
|
154
|
+
this.panelPeakPower = Object.entries(this.systemConfigs)[0][1][0]?.panel.kWattPeak ?? 0.44;
|
|
152
155
|
this.recalculate();
|
|
153
156
|
}
|
|
154
157
|
formatEuropeanNumber(num, decimals = 2) {
|
|
155
158
|
const fixed = num.toFixed(decimals);
|
|
156
|
-
const [integerPart, decimalPart] = fixed.split(
|
|
159
|
+
const [integerPart, decimalPart] = fixed.split('.');
|
|
157
160
|
// Add dots as thousands separators
|
|
158
|
-
const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g,
|
|
161
|
+
const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, '.');
|
|
159
162
|
// Join with comma as decimal separator
|
|
160
|
-
return decimalPart
|
|
161
|
-
? `${formattedInteger},${decimalPart}`
|
|
162
|
-
: formattedInteger;
|
|
163
|
+
return decimalPart ? `${formattedInteger},${decimalPart}` : formattedInteger;
|
|
163
164
|
}
|
|
164
165
|
recalculate() {
|
|
165
166
|
const currentSystemConfigs = {};
|
|
@@ -210,9 +211,7 @@ const SolarSystemForm = class {
|
|
|
210
211
|
averageKilometersPerDay: this.kmDrivenPerYear / 365,
|
|
211
212
|
consumptionkWhPer100km: 20,
|
|
212
213
|
batteryKWh: 80,
|
|
213
|
-
chargingHours: this.electricCarChargingTime ===
|
|
214
|
-
? distExports.generateElectricCarChargingHours(6, 18)
|
|
215
|
-
: distExports.generateElectricCarChargingHours(18, 6),
|
|
214
|
+
chargingHours: this.electricCarChargingTime === 'day' ? distExports.generateElectricCarChargingHours(6, 18) : distExports.generateElectricCarChargingHours(18, 6),
|
|
216
215
|
}
|
|
217
216
|
: undefined,
|
|
218
217
|
};
|
|
@@ -231,13 +230,21 @@ const SolarSystemForm = class {
|
|
|
231
230
|
validateForm() {
|
|
232
231
|
let isValid = true;
|
|
233
232
|
const t = getLanguageStrings(state.settings.language);
|
|
234
|
-
// Validate
|
|
235
|
-
if (!this.
|
|
236
|
-
this.
|
|
233
|
+
// Validate firstname
|
|
234
|
+
if (!this.firstname.trim()) {
|
|
235
|
+
this.firstnameError = t.solarSystemForm.nameError;
|
|
237
236
|
isValid = false;
|
|
238
237
|
}
|
|
239
238
|
else {
|
|
240
|
-
this.
|
|
239
|
+
this.firstnameError = '';
|
|
240
|
+
}
|
|
241
|
+
// Validate surname
|
|
242
|
+
if (!this.surname.trim()) {
|
|
243
|
+
this.surnameError = t.solarSystemForm.nameError;
|
|
244
|
+
isValid = false;
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
this.surnameError = '';
|
|
241
248
|
}
|
|
242
249
|
// Validate email
|
|
243
250
|
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
@@ -250,17 +257,19 @@ const SolarSystemForm = class {
|
|
|
250
257
|
isValid = false;
|
|
251
258
|
}
|
|
252
259
|
else {
|
|
253
|
-
this.emailError =
|
|
260
|
+
this.emailError = '';
|
|
254
261
|
}
|
|
255
262
|
// Validate phone (optional)
|
|
256
263
|
const phoneRegex = /^[\+]?[1-9][\d]{0,15}$/;
|
|
257
|
-
if (this.phone.trim() &&
|
|
258
|
-
!phoneRegex.test(this.phone.replace(/[\s\-\(\)]/g, ""))) {
|
|
264
|
+
if (this.phone.trim() && !phoneRegex.test(this.phone.replace(/[\s\-\(\)]/g, ''))) {
|
|
259
265
|
this.phoneError = t.solarSystemForm.phoneError;
|
|
260
266
|
isValid = false;
|
|
261
267
|
}
|
|
262
268
|
else {
|
|
263
|
-
this.phoneError =
|
|
269
|
+
this.phoneError = '';
|
|
270
|
+
}
|
|
271
|
+
if (!this.privacyPolicyAccepted) {
|
|
272
|
+
this.privacyPolicyError = 'Datenschutzerklärung muss akzeptiert werden';
|
|
264
273
|
}
|
|
265
274
|
return isValid;
|
|
266
275
|
}
|
|
@@ -268,9 +277,14 @@ const SolarSystemForm = class {
|
|
|
268
277
|
if (!this.validateForm()) {
|
|
269
278
|
return;
|
|
270
279
|
}
|
|
280
|
+
if (!this.privacyPolicyAccepted) {
|
|
281
|
+
this.privacyPolicyError = 'Datenschutzerklärung muss akzeptiert werden';
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
271
284
|
this.isSubmitting = true;
|
|
272
|
-
this.submitMessage =
|
|
285
|
+
this.submitMessage = '';
|
|
273
286
|
this.submitSuccess = false;
|
|
287
|
+
this.privacyPolicyError = '';
|
|
274
288
|
const t = getLanguageStrings(state.settings.language);
|
|
275
289
|
try {
|
|
276
290
|
const leadData = {
|
|
@@ -289,7 +303,7 @@ const SolarSystemForm = class {
|
|
|
289
303
|
annualPriceIncrease: this.annualPriceIncrease,
|
|
290
304
|
},
|
|
291
305
|
client: {
|
|
292
|
-
name: this.
|
|
306
|
+
name: `${this.surname}, ${this.firstname}`.trim(),
|
|
293
307
|
email: this.email,
|
|
294
308
|
phone: this.phone,
|
|
295
309
|
consumption: this.householdConsumption,
|
|
@@ -315,25 +329,23 @@ const SolarSystemForm = class {
|
|
|
315
329
|
totalEnergyConsumption: this.totalEnergyConsumption,
|
|
316
330
|
},
|
|
317
331
|
};
|
|
318
|
-
console.log(
|
|
332
|
+
console.log('leadData', leadData);
|
|
319
333
|
const result = await sendLeadToNexvoro(leadData);
|
|
320
334
|
this.submitSuccess = result.success;
|
|
321
335
|
if (result.success) {
|
|
322
|
-
console.log(
|
|
336
|
+
console.log('Lead successfully sent to Nexvoro', result);
|
|
323
337
|
this.submitMessage = t.solarSystemForm.leadSubmitted;
|
|
324
338
|
// Optionally reset form or show success message
|
|
325
339
|
}
|
|
326
340
|
else {
|
|
327
|
-
console.error(
|
|
341
|
+
console.error('Failed to send lead to Nexvoro:', result.message);
|
|
328
342
|
this.submitMessage = t.solarSystemForm.leadError;
|
|
329
343
|
}
|
|
330
344
|
}
|
|
331
345
|
catch (error) {
|
|
332
|
-
console.error(
|
|
346
|
+
console.error('Error in handleRequestOffer:', error);
|
|
333
347
|
this.submitSuccess = false;
|
|
334
|
-
this.submitMessage = error instanceof Error
|
|
335
|
-
? error.message
|
|
336
|
-
: "An unexpected error occurred";
|
|
348
|
+
this.submitMessage = error instanceof Error ? error.message : 'An unexpected error occurred';
|
|
337
349
|
}
|
|
338
350
|
finally {
|
|
339
351
|
this.isSubmitting = false;
|
|
@@ -345,203 +357,125 @@ const SolarSystemForm = class {
|
|
|
345
357
|
render() {
|
|
346
358
|
const t = getLanguageStrings(state.settings.language);
|
|
347
359
|
// Reusable style objects
|
|
348
|
-
const borderStyle = { border:
|
|
349
|
-
const errorBorderStyle = { border:
|
|
350
|
-
return (h("div", { key: '
|
|
360
|
+
const borderStyle = { border: '1px solid var(--color-border)' };
|
|
361
|
+
const errorBorderStyle = { border: '1px solid var(--color-error)' };
|
|
362
|
+
return (h("div", { key: 'a7ffb08a181b459b041dbd9d43b70348e5f65c62', class: "flex flex-col justify-center items-center w-full h-full pt-4" // style={{
|
|
351
363
|
,
|
|
352
364
|
// display: (Object.keys(this.systemConfigs).length === 0)
|
|
353
365
|
// ? "none"
|
|
354
366
|
// : "flex",
|
|
355
367
|
// }}
|
|
356
|
-
id: "solar-system-form" }, h("h1", { key: '
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
this.numberOfPanels =
|
|
365
|
-
value;
|
|
366
|
-
this.recalculate();
|
|
367
|
-
}
|
|
368
|
-
} }))), !this.isIOS() && (h("input", { key: 'f6a9238699dc890549f0ede77b63c050defc2ef3', 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-muted", value: this.numberOfPanels, onInput: (e) => {
|
|
369
|
-
this.numberOfPanels = parseInt(e.target
|
|
370
|
-
.value);
|
|
368
|
+
id: "solar-system-form" }, h("h1", { key: 'ca31ad6a4b9a50de94209b2b5cd012c4aec96e6b', class: "text-2xl font-bold text-secondary mb-4 w-full" }, t.solarSystemForm.title), h("div", { key: 'e414953eeecccf65d9708a36f6cdaa5b3982d247', class: "w-full bg-primary rounded-4xl space-y-6" }, h("div", { key: '0b587d0cd75012d706fe63150b9b3ff6ae0ad905', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: '319d73fa8fc4d5a231dc8144d5edb282cc3ca20e', class: "font-semibold text-secondary pb-2", style: { fontSize: '0.875rem' } }, t.solarSystemForm.systemInformation), h("div", { key: '88def11e367d1be97e2f76c71ff56c7fedde828d', class: "flex flex-col sm:flex-row gap-4" }, h("div", { key: 'b71914b02039829ad89f5b992d7aa12e61f4249c', class: "flex-1 bg-muted rounded-4xl p-4 space-y-3" }, h("div", { key: '8e59b663d61e324b70a628993a08d2d31175e5ae', class: "flex items-center justify-between" }, h("label", { key: 'db72d22e961fd52754973d27dc9a4188ebe19d97', class: "text-sm font-medium text-text-muted" }, t.solarSystemForm.numberOfPanels), !this.isIOS() ? (h("input", { type: "number", class: "w-20 px-3 py-1 rounded-full bg-muted text-muted-foreground text-right", value: this.numberOfPanels, readOnly: true })) : (h("input", { type: "number", min: "1", max: this.maxPanels, class: "w-20 px-3 py-1 rounded-full focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground text-center", style: borderStyle, value: this.numberOfPanels, onInput: e => {
|
|
369
|
+
const value = parseInt(e.target.value);
|
|
370
|
+
if (value >= 1 && value <= this.maxPanels) {
|
|
371
|
+
this.numberOfPanels = value;
|
|
372
|
+
this.recalculate();
|
|
373
|
+
}
|
|
374
|
+
} }))), !this.isIOS() && (h("input", { key: '9c36d86127c00b6aad5f010baeb9dcef5b860241', 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-muted", value: this.numberOfPanels, onInput: e => {
|
|
375
|
+
this.numberOfPanels = parseInt(e.target.value);
|
|
371
376
|
if (isNaN(this.numberOfPanels)) {
|
|
372
377
|
this.numberOfPanels = 0;
|
|
373
378
|
}
|
|
374
379
|
this.recalculate();
|
|
375
|
-
} }))), h("div", { key: '
|
|
376
|
-
|
|
377
|
-
this.householdConsumption = parseInt(e.target
|
|
378
|
-
.value);
|
|
380
|
+
} }))), h("div", { key: 'f946ab269e6a8652e01f76e688b5df458b260820', class: "flex-1 bg-muted rounded-4xl p-4" }, h("div", { key: '29225f9c586e1449210312cf48b3d640803bf6df', class: "flex items-center justify-between" }, h("label", { key: 'a9657e47669bfcbbb85b90d5ef0cdc67fc4966be', class: "text-sm font-medium text-text-muted" }, t.solarSystemForm.panelPeakPower), h("span", { key: '89d1fe374639358d4c1ccfe78f6d0db75960ea9e', class: "text-text-muted" }, this.panelPeakPower.toFixed(2), " kW")), h("div", { key: '4742b09835f4d44f39865c06b5d69b4f5d0d713a', class: "flex items-center justify-between mt-4" }, h("span", { key: '29884a0aab62728245ed239c02e0bd1cf7535177', class: "text-sm font-medium text-text-muted" }, t.solarSystemForm.totalSystemPeakPower), h("span", { key: 'c242a693c0849192a78e6b99909e2f7b334f774d', class: "font-bold text-text-muted" }, (DEFAULT_SOLAR_PANEL_TYPE.kWattPeak * this.numberOfPanels).toFixed(1), " kWp"))))), h("div", { key: '0cf7ba4440ed86987b9188794d022f08aa377afd', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: 'f0199376f89051d244737b874159380ac8eaa171', class: "font-semibold text-secondary pb-2", style: { fontSize: '0.875rem' } }, t.solarSystemForm.householdConsumptionTitle), h("div", { key: 'd522fcda1061b89a5286ce55300771679b70d227', class: "grid grid-rows-2 gap-0" }, h("div", { key: 'f6636d3d8f301aed8b56b6594ce7aef1169205b8', class: "grid grid-cols-2 gap-4" }, h("label", { key: '9e09ad03532658769a3ffe98cba818dc7b00efe3', class: "block text-sm font-medium text-text-muted" }, t.solarSystemForm.annualConsumption), h("label", { key: '2b1cd3df450aa39c1ba3d46f68ca022394be4ed2', class: "block text-sm font-medium text-text-muted" }, t.solarSystemForm.consumptionProfileTitle)), h("div", { key: '11f687baf05891b018f5d85e13210278bc079f17', class: "grid grid-cols-2 gap-4" }, h("input", { key: '9bba7ff00b232731237763840f9d563873a09eb8', type: "number", step: "100", min: "0", class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground", style: borderStyle, value: this.householdConsumption, onInput: e => {
|
|
381
|
+
this.householdConsumption = parseInt(e.target.value);
|
|
379
382
|
this.recalculate();
|
|
380
|
-
} }), h("select", { key: '
|
|
381
|
-
this.consumptionProfile =
|
|
382
|
-
e.target
|
|
383
|
-
.value;
|
|
383
|
+
} }), h("select", { key: '42e4686e1e5aeede70716f5cc04175ae3f9589a5', class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground", style: borderStyle, onChange: e => {
|
|
384
|
+
this.consumptionProfile = e.target.value;
|
|
384
385
|
this.recalculate();
|
|
385
|
-
} }, h("option", { key: '
|
|
386
|
-
|
|
387
|
-
.mostlyAtHome), h("option", { key: '1bc59b32b982d8b4ca07b0355be2b38eb78f934a', value: "mostly_away", selected: this.consumptionProfile ===
|
|
388
|
-
"mostly_away" }, t.solarSystemForm.consumptionProfiles
|
|
389
|
-
.mostlyAway))))), h("div", { key: '92f14d6351dcae424a930fc73dbbb2e42c28253f', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: '0f594895fa20f2ebd09be014ee512e73839f1bdb', class: "text-base font-semibold text-secondary pb-2" }, t.solarSystemForm.additionalComponents.title), h("div", { key: '278ccfe5580594a958066d4cd3c049ece3fd6746', class: "flex flex-col gap-4" }, h("div", { key: '6364622f0e2a30d06a518dea49c5758124d1ab38', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: '6c7de28591dda9ff0a91a6f50a491bcf26aac87b', class: "flex items-center justify-between" }, h("div", { key: '6e478a12416017fa3bb0ac401ce81ea5d9b5d25a', class: "flex items-center gap-2" }, h("input", { key: '8c56259cae81032fc20322cdef29a6e54f2b4706', type: "checkbox", id: "heatPump", class: "w-4 h-4 accent-tertiary border-border rounded-full focus:ring-tertiary focus:ring-offset-0 focus:ring-2", checked: this.heatPump > 0, onChange: (e) => {
|
|
390
|
-
this.heatPump =
|
|
391
|
-
e.target
|
|
392
|
-
.checked
|
|
393
|
-
? 100
|
|
394
|
-
: 0;
|
|
386
|
+
} }, h("option", { key: '8f62beb09564af8987574b7e8cd456973d47b224', value: "mostly_at_home", selected: this.consumptionProfile === 'mostly_at_home' }, t.solarSystemForm.consumptionProfiles.mostlyAtHome), h("option", { key: '918c4831bb2d203e2d27efe12e53aa055c38c94e', value: "mostly_away", selected: this.consumptionProfile === 'mostly_away' }, t.solarSystemForm.consumptionProfiles.mostlyAway))))), h("div", { key: '8bc3d42b79e94fcdf994fceda4316765fb877888', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: 'ed6d14d664260d28ca218c9787b271ad9b07c233', class: "font-semibold text-secondary pb-2", style: { fontSize: '0.875rem' } }, t.solarSystemForm.additionalComponents.title), h("div", { key: 'c21298a8caa25052e5f589a2c5c0aec70524dbb9', class: "flex flex-col gap-4" }, h("div", { key: '674101ebe224f75f214711077d4234fa0d6a7ac9', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: 'cc13ee98e9b1d2ca50b8e21c2b618536870012f5', class: "flex items-center justify-between" }, h("div", { key: '9970b3b46716579ec3444f39246f66b98957b531', class: "flex items-center gap-2" }, h("input", { key: '5c5d1286d6aec5d28d37f1f162ded42f13aef4b1', type: "checkbox", id: "heatPump", class: "w-4 h-4 accent-tertiary border-border rounded-full focus:ring-tertiary focus:ring-offset-0 focus:ring-2", checked: this.heatPump > 0, onChange: e => {
|
|
387
|
+
this.heatPump = e.target.checked ? 100 : 0;
|
|
395
388
|
this.recalculate();
|
|
396
|
-
} }), h("label", { key: '
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
value = 0;
|
|
404
|
-
}
|
|
405
|
-
if (value >= 0 &&
|
|
406
|
-
value <= 300) {
|
|
407
|
-
this.heatPump =
|
|
408
|
-
value;
|
|
409
|
-
this.recalculate();
|
|
410
|
-
}
|
|
411
|
-
} }), h("span", { class: "text-sm text-text-muted" }, "m\u00B2")))
|
|
412
|
-
: (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-muted", value: this.heatPump, onInput: (e) => {
|
|
413
|
-
this.heatPump =
|
|
414
|
-
parseInt(e.target
|
|
415
|
-
.value);
|
|
389
|
+
} }), h("label", { key: '074b5a0eebe4271f56ff861ac2bcb47075f4878c', htmlFor: "heatPump", class: "text-text-muted" }, t.solarSystemForm.additionalComponents.heatPump)), this.heatPump > 0 && !this.isIOS() && h("span", { key: '7a1f181d84c342488228bceb8b03810bc748ade3', class: "text-text-muted" }, this.heatPump, " m\u00B2")), this.heatPump > 0 && (h("div", { key: 'dcc9290d0c419a366e4ee2124f6ec85d871209b3', class: "flex flex-col gap-2" }, this.isIOS() ? (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 focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", style: borderStyle, value: this.heatPump, onInput: e => {
|
|
390
|
+
let value = parseInt(e.target.value);
|
|
391
|
+
if (isNaN(value)) {
|
|
392
|
+
value = 0;
|
|
393
|
+
}
|
|
394
|
+
if (value >= 0 && value <= 300) {
|
|
395
|
+
this.heatPump = value;
|
|
416
396
|
this.recalculate();
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
397
|
+
}
|
|
398
|
+
} }), h("span", { class: "text-sm text-text-muted" }, "m\u00B2"))) : (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-muted", value: this.heatPump, onInput: e => {
|
|
399
|
+
this.heatPump = parseInt(e.target.value);
|
|
400
|
+
this.recalculate();
|
|
401
|
+
} }))))), h("div", { key: '17cfb1cec131e7039040ad34eabef90d95f72c28', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: 'b4e8174713b79b7b05e2ac3bdeaea5431e02f5e8', class: "flex items-center justify-between" }, h("div", { key: '1f723137dd0eec5e9708d700417123fd7c096ae6', class: "flex items-center gap-2" }, h("input", { key: '24fd1307190f37d7cbb83a1d9e7df8bd187bba32', type: "checkbox", id: "electricCar", class: "w-4 h-4 accent-tertiary border-border rounded focus:ring-tertiary focus:ring-offset-0 focus:ring-2", checked: this.electricCar, onChange: e => {
|
|
402
|
+
this.electricCar = e.target.checked;
|
|
421
403
|
this.recalculate();
|
|
422
|
-
} }), h("label", { key: '
|
|
423
|
-
|
|
424
|
-
.electricCar))), this.electricCar && (h("div", { key: '6479240f52df3aba06da00015266b1401d02d252', class: "flex flex-col gap-2" }, h("div", { key: '1fca2933868e276d49580b94484835a7ab92c59b', class: "grid grid-cols-2 gap-4" }, h("label", { key: '3c7644adaaf4a00e58d7da0f79552d34b3422fe2', class: "text-sm text-text-muted" }, t.solarSystemForm
|
|
425
|
-
.additionalComponents
|
|
426
|
-
.chargingTime), h("label", { key: 'ea7097c56a4d11ee5e3fd6da19a2434e4738372e', class: "text-sm text-text-muted" }, t.solarSystemForm
|
|
427
|
-
.additionalComponents
|
|
428
|
-
.kilometersPerYear)), h("div", { key: 'e178562e103b7cc01da7b89a9d90454dfbf31ffc', class: "grid grid-cols-2 gap-4" }, h("select", { key: 'a556a9906ec0f8a994f4299c39f81146ce90c4c8', class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", onChange: (e) => {
|
|
429
|
-
this.electricCarChargingTime =
|
|
430
|
-
e.target
|
|
431
|
-
.value;
|
|
404
|
+
} }), h("label", { key: 'e3e1fa2590a72edcacd961f98effa48fa4a579a5', htmlFor: "electricCar", class: "text-text-muted" }, t.solarSystemForm.additionalComponents.electricCar))), this.electricCar && (h("div", { key: '3495908a3c2021a802bdf5cb9f28cebde93505cb', class: "flex flex-col gap-2" }, h("div", { key: '16f19671baa674a670f6590c8c1d1c97a6505315', class: "grid grid-cols-2 gap-4" }, h("label", { key: '93e14b4143733f6a92cbc852a161ddd28a3ab403', class: "text-sm text-text-muted" }, t.solarSystemForm.additionalComponents.chargingTime), h("label", { key: 'fe9adca7d3ab228915ffd31bc3d7005925803036', class: "text-sm text-text-muted" }, t.solarSystemForm.additionalComponents.kilometersPerYear)), h("div", { key: '0eac61b2458d1a7ce7f5f3da49e000ae10f11475', class: "grid grid-cols-2 gap-4" }, h("select", { key: '17a104378190f85f7fc6ab66dbd98286ed23f221', class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", onChange: e => {
|
|
405
|
+
this.electricCarChargingTime = e.target.value;
|
|
432
406
|
this.recalculate();
|
|
433
|
-
}, style: borderStyle }, h("option", { key: '
|
|
434
|
-
.
|
|
435
|
-
"day" }, t.solarSystemForm
|
|
436
|
-
.additionalComponents
|
|
437
|
-
.chargingTimeDay), h("option", { key: 'b96311244ac7efe0ed461d764f184a4af5cabf11', value: "night", selected: this
|
|
438
|
-
.electricCarChargingTime ===
|
|
439
|
-
"night" }, t.solarSystemForm
|
|
440
|
-
.additionalComponents
|
|
441
|
-
.chargingTimeNight)), h("input", { key: '1930b58f94b90615e2a7a79878cf168f369f67d1', type: "number", min: "1000", max: "100000", step: "1000", class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.kmDrivenPerYear, onInput: (e) => {
|
|
442
|
-
this.kmDrivenPerYear =
|
|
443
|
-
parseInt(e.target
|
|
444
|
-
.value);
|
|
407
|
+
}, style: borderStyle }, h("option", { key: 'cf1add9b03d6a072bf5d2be7b0ec1e36f0ab40b9', value: "day", selected: this.electricCarChargingTime === 'day' }, t.solarSystemForm.additionalComponents.chargingTimeDay), h("option", { key: '50e451bc44395c9c0e3f3a7b28e051d14d410f8a', value: "night", selected: this.electricCarChargingTime === 'night' }, t.solarSystemForm.additionalComponents.chargingTimeNight)), h("input", { key: '1a38ea9015f630b35de66d41dc035d28b0b0c996', type: "number", min: "1000", max: "100000", step: "1000", class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.kmDrivenPerYear, onInput: e => {
|
|
408
|
+
this.kmDrivenPerYear = parseInt(e.target.value);
|
|
445
409
|
if (isNaN(this.kmDrivenPerYear)) {
|
|
446
|
-
this.kmDrivenPerYear =
|
|
447
|
-
0;
|
|
410
|
+
this.kmDrivenPerYear = 0;
|
|
448
411
|
}
|
|
449
412
|
this.recalculate();
|
|
450
|
-
}, style: borderStyle }))))), h("div", { key: '
|
|
451
|
-
this.batteryEnabled =
|
|
452
|
-
|
|
453
|
-
.checked;
|
|
454
|
-
this.battery =
|
|
455
|
-
this.batteryEnabled
|
|
456
|
-
? 5
|
|
457
|
-
: 0;
|
|
413
|
+
}, style: borderStyle }))))), h("div", { key: 'bed54fb3f03d295bcefa4589bd75317f5416383d', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: '686264e19e103bdb09d00064b35d23160f26d86e', class: "flex items-center justify-between" }, h("div", { key: '19949dd3e1dbfdebc8334134a7e67d7c23f89685', class: "flex items-center gap-2" }, h("input", { key: '4a03da1c1c6ed52f00ba37f47be1c00f032a6264', type: "checkbox", id: "battery", class: "w-4 h-4 accent-tertiary border-border rounded-full focus:ring-tertiary focus:ring-offset-0 focus:ring-2", checked: this.batteryEnabled, onChange: e => {
|
|
414
|
+
this.batteryEnabled = e.target.checked;
|
|
415
|
+
this.battery = this.batteryEnabled ? 5 : 0;
|
|
458
416
|
this.recalculate();
|
|
459
|
-
} }), h("label", { key: '
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
if (isNaN(value)) {
|
|
466
|
-
value = 0;
|
|
467
|
-
}
|
|
468
|
-
if (value >= 0 &&
|
|
469
|
-
value <= 20) {
|
|
470
|
-
this.battery =
|
|
471
|
-
value;
|
|
472
|
-
}
|
|
473
|
-
else {
|
|
474
|
-
this.battery =
|
|
475
|
-
20;
|
|
476
|
-
}
|
|
477
|
-
this.recalculate();
|
|
478
|
-
}, style: borderStyle }), h("span", { class: "text-sm text-text-muted" }, "kWh")))
|
|
479
|
-
: (h("input", { type: "range", min: "1", 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-muted", value: this.battery, onInput: (e) => {
|
|
480
|
-
const value = parseInt(e.target
|
|
481
|
-
.value);
|
|
417
|
+
} }), h("label", { key: 'd36727143a924f66300add81e79853d07f821bfa', htmlFor: "battery", class: "text-text-muted" }, t.solarSystemForm.additionalComponents.battery)), this.batteryEnabled && !this.isIOS() && h("span", { key: '26d7bb3494bcfd0d25e3069d2a061c7edf28e532', class: "text-text-muted" }, this.battery, " kWh")), this.batteryEnabled && (h("div", { key: '5b5e24aa272cd017b7f5f047074b53025e25058c', class: "flex flex-col gap-2" }, this.isIOS() ? (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 focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.battery, onInput: e => {
|
|
418
|
+
let value = parseInt(e.target.value);
|
|
419
|
+
if (isNaN(value)) {
|
|
420
|
+
value = 0;
|
|
421
|
+
}
|
|
422
|
+
if (value >= 0 && value <= 20) {
|
|
482
423
|
this.battery = value;
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
this.
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
this.
|
|
492
|
-
|
|
424
|
+
}
|
|
425
|
+
else {
|
|
426
|
+
this.battery = 20;
|
|
427
|
+
}
|
|
428
|
+
this.recalculate();
|
|
429
|
+
}, style: borderStyle }), h("span", { class: "text-sm text-text-muted" }, "kWh"))) : (h("input", { type: "range", min: "1", 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-muted", value: this.battery, onInput: e => {
|
|
430
|
+
const value = parseInt(e.target.value);
|
|
431
|
+
this.battery = value;
|
|
432
|
+
this.batteryEnabled = value > 0;
|
|
433
|
+
this.recalculate();
|
|
434
|
+
} }))))))), h("div", { key: '519ead3be250bd617f695009c490332bf15f633d', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: '80b2f384aaa0dbc9f98cd193fc05f10e9b758b34', class: "font-semibold text-secondary pb-2", style: { fontSize: '0.875rem' } }, t.solarSystemForm.electricityCostsTitle), h("div", { key: '7ebd7931e79ddc3df7752deba0630e6168bc052b', style: {
|
|
435
|
+
display: 'grid',
|
|
436
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(100px, 1fr))',
|
|
437
|
+
gap: '1rem',
|
|
438
|
+
} }, h("div", { key: 'c569f8b07e40cf88126364cf1e074d1887802ea7' }, h("label", { key: '20b4a65b025ad1ec69d39bcf422fd91791120b38', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.electricityPrice), h("input", { key: 'af57c0b382fd3fb6f994c92e02f0fdeef53eb738', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", style: borderStyle, value: this.electricityPrice.toFixed(2), onInput: e => {
|
|
439
|
+
this.electricityPrice = parseFloat(e.target.value);
|
|
493
440
|
this.recalculate();
|
|
494
|
-
} })), h("div", { key: '
|
|
495
|
-
this.compensationRate = parseFloat(e.target
|
|
496
|
-
.value);
|
|
441
|
+
} })), h("div", { key: '9116f0fc5c598d69671b459cbc88aad171f91c31' }, h("label", { key: '6a42928c3b5e41cbf41072495b014d586bf1958d', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.compensationRate), h("input", { key: 'bb0236fb87cbc7620b6d51f296cac12072088572', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", style: borderStyle, value: this.compensationRate.toFixed(2), onInput: e => {
|
|
442
|
+
this.compensationRate = parseFloat(e.target.value);
|
|
497
443
|
this.recalculate();
|
|
498
|
-
} })), h("div", { key: '
|
|
499
|
-
this.annualPriceIncrease = parseFloat(e.target
|
|
500
|
-
.value);
|
|
444
|
+
} })), h("div", { key: '02e377732a46edd1fd4319554118935d904d2eca' }, h("label", { key: '189f2ad03fb1cb81d73dba35f6787452fa04f97f', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.annualPriceIncrease), h("input", { key: '59c4eee6711d03a769b1013805b9a8ea548c8852', type: "number", step: "0.1", class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", style: borderStyle, value: this.annualPriceIncrease.toFixed(1), onInput: e => {
|
|
445
|
+
this.annualPriceIncrease = parseFloat(e.target.value);
|
|
501
446
|
this.recalculate();
|
|
502
|
-
} })))), h("div", { key: '
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
gridTemplateColumns: "repeat(auto-fit, minmax(1 00px, 1fr))",
|
|
509
|
-
gap: "1rem",
|
|
510
|
-
} }, h("div", { key: '307814f0331f1b52c1b91f05649ea060e5d658db' }, h("label", { key: '4c7fc3536f565e4dcc881fc78e92edfa666676a3', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.name), h("input", { key: '80012536ac05b1e105157f4722d514e0f3ba3068', type: "text", class: `w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, style: this.nameError
|
|
511
|
-
? errorBorderStyle
|
|
512
|
-
: borderStyle, value: this.name, onInput: (e) => {
|
|
513
|
-
this.name =
|
|
514
|
-
e.target
|
|
515
|
-
.value;
|
|
447
|
+
} })))), h("div", { key: '08b3b69fbed1c083c4e06c59dbfa0aaf068ecae0', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: 'dc39280e19412aaf31a7116c86c98144856dd008', class: "font-semibold text-secondary pb-2", style: { fontSize: '0.875rem' } }, t.solarSystemForm.resultsTitle), h("div", { key: '79065f7b4514cb2b75e3aa9538724f05205f04f4', class: "bg-muted rounded-4xl p-4" }, h("div", { key: 'dc9d2a431fbc5955fb415b7bcb6f45458fe1a4a7', class: "flex flex-col sm:flex-row sm:items-center justify-between" }, h("span", { key: 'fc2b38917b180da09e62b1cdec9669c99169822a', class: "text-text-muted" }, t.solarSystemForm.autonomy), h("span", { key: 'd475336b71af22fd0b96748eb991ae96b05cf7c8', class: "text-xl font-bold text-secondary mt-1 sm:mt-0" }, this.autonomy > 100 ? '100' : this.formatEuropeanNumber(this.autonomy, 1), "%")), h("div", { key: 'df30607e9c81081d8c4e1d80c49ff274bd4b3f5e', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("span", { key: '4bd052bd5f69a54870c42ad4f22d2e3d3634d039', class: "text-text-muted" }, t.solarSystemForm.totalEnergyConsumption), h("span", { key: 'dd2b0fee26e9509710d96586f1c5b170e6fbd07d', class: "text-xl font-bold text-secondary mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.totalEnergyConsumption, 0), " kWh/", t.solarSystemForm.year)), h("div", { key: '6c04216d3fe72204aefce68535288dbbfa6e44c5', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("span", { key: '5c78f49ba3e934faa4aa472e63d3a3ab206f67d2', class: "text-text-muted" }, t.solarSystemForm.totalEnergyProduction), h("span", { key: 'c02f76952d88fcf7e6ecd263d0d9578a1215dbed', class: "text-xl font-bold text-secondary mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.totalEnergyProduction, 0), " kWh/", t.solarSystemForm.year)), h("div", { key: '6ba80b408040b8d62d69265c51c5a002acf6b67a', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("div", { key: 'd9bb888ce7532dd4fc474542080209b9af635eed', class: "flex items-center gap-2" }, h("span", { key: '201c812e5483381142cc0ff7eb3c5cb5115e6c15', class: "text-text-muted" }, t.solarSystemForm.costSavings)), h("span", { key: '0b28125004d41ab64bd1e3dc606dff933d3eebdd', class: "text-xl font-bold text-success mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.costSavings), " \u20AC/", t.solarSystemForm.year)), h("div", { key: 'f02f99d261699507e0bc0723f597d7b251155970', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("div", { key: 'c1f4e9b042007975282c903874366f4d9034fc96', class: "flex items-center gap-2" }, h("span", { key: 'f26ed0dc1f949f6725151ee8954abd466c68772e', class: "text-text-muted" }, t.solarSystemForm.compensation20Years)), h("span", { key: '15e683d1e75198885bb9d496188547dd504c0d27', class: "text-xl font-bold text-success mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.compensation20Years), " \u20AC")), h("div", { key: 'f24b46f3fc8c79ed94fca2c020217b6d4842e23a', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("div", { key: 'a5b4dac0b0fb85c3f0770f18c5d05d409926272f', class: "flex items-center gap-2" }, h("span", { key: 'b740f914a8ef3330abdf49d1400342c51191dda7', class: "text-text-muted" }, t.solarSystemForm.monetaryBenefit20Years)), h("span", { key: '7c80902f5be078747c5e816545e9f3f4aee9e503', class: "text-xl font-bold text-success mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.savedCosts20Years), " \u20AC")))), h("div", { key: 'e6a9eeb5131d96057306fc9a1fc726b4f4cccb24', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: '98ad05d4e17019ddb8f381a67bbb474fb698de20', class: "font-semibold text-secondary pb-2", style: { fontSize: '0.875rem' } }, t.solarSystemForm.requestOffer), h("div", { key: 'b197d99170100da8e3d675efd455e2896d255590', style: {
|
|
448
|
+
display: 'grid',
|
|
449
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(1 00px, 1fr))',
|
|
450
|
+
gap: '1rem',
|
|
451
|
+
} }, h("div", { key: 'c31d8c5c281c56f0c39f7cc7eb4e7f166e0748cf' }, h("label", { key: 'b167ef34198aa39e42f6ecff1641d25f96717fc2', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.firstname || 'Vorname'), h("input", { key: 'c1bbc72daa5592c57e1dd21f2ab07b5f8cf5bbc4', type: "text", class: `w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, style: this.firstnameError ? errorBorderStyle : borderStyle, value: this.firstname, onInput: e => {
|
|
452
|
+
this.firstname = e.target.value;
|
|
516
453
|
this.validateForm();
|
|
517
|
-
}, placeholder: "Vorname
|
|
518
|
-
|
|
519
|
-
: borderStyle, value: this.email, onInput: (e) => {
|
|
520
|
-
this.email =
|
|
521
|
-
e.target
|
|
522
|
-
.value;
|
|
454
|
+
}, placeholder: "Vorname" }), this.firstnameError && h("p", { key: '3699fec0ffa8d86ddc94b944a05fec0236d3ee81', class: "text-error text-sm mt-1" }, this.firstnameError)), h("div", { key: 'a4e4e4534a1f8f2bae40ac1f963b9223ee2f9b37' }, h("label", { key: 'e5c1bea609107bee7ec34f731e3377e889782639', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.surname || 'Nachname'), h("input", { key: '8328e6a816a57e060aa923874ed4f47aef49afb3', type: "text", class: `w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, style: this.surnameError ? errorBorderStyle : borderStyle, value: this.surname, onInput: e => {
|
|
455
|
+
this.surname = e.target.value;
|
|
523
456
|
this.validateForm();
|
|
524
|
-
}, placeholder: "
|
|
525
|
-
|
|
526
|
-
: borderStyle, value: this.phone, onInput: (e) => {
|
|
527
|
-
this.phone =
|
|
528
|
-
e.target
|
|
529
|
-
.value;
|
|
457
|
+
}, placeholder: "Nachname" }), this.surnameError && h("p", { key: 'b8d64f11413b2e85b00d40d8cd9e3659e5d2d021', class: "text-error text-sm mt-1" }, this.surnameError)), h("div", { key: '1ad8bfec39fb23ba2e5bd881433d1dd610661831' }, h("label", { key: '1a4feeff8cc89468b1e40d38ce0bfa39d3f328f4', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.email), h("input", { key: '2883917a2f205d936a2395437302de7a6264dd59', type: "email", class: `w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, style: this.emailError ? errorBorderStyle : borderStyle, value: this.email, onInput: e => {
|
|
458
|
+
this.email = e.target.value;
|
|
530
459
|
this.validateForm();
|
|
531
|
-
}, placeholder: "
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
460
|
+
}, placeholder: "mail@beispiel.com" }), this.emailError && h("p", { key: '16859663d861a3dec99118f0e1294f713e24d93f', class: "text-error text-sm mt-1" }, this.emailError)), h("div", { key: '679697b5dbc28e373cd12c48336ad98e915f1ec4' }, h("label", { key: '4373dc825cf47fc5868985c2ace8fa94320fde04', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.phone), h("input", { key: 'b0d0e344f1ee3007777e1939bb7bf4cc348cf3d7', type: "tel", class: `w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, style: this.phoneError ? errorBorderStyle : borderStyle, value: this.phone, onInput: e => {
|
|
461
|
+
this.phone = e.target.value;
|
|
462
|
+
this.validateForm();
|
|
463
|
+
}, placeholder: "0171 23456789" }), this.phoneError && h("p", { key: '4878784f9c1be0256ef35e766571dcb8a6ec9d7c', class: "text-error text-sm mt-1" }, this.phoneError))), h("div", { key: 'a694ad161086fa7face542ddddf265624eefa064', class: "flex flex-col items-center gap-4" }, h("div", { key: '3e386a353487534ee55704b32379e59fb0be8f4f', class: "flex flex-col items-start w-full" }, h("div", { key: 'e013dc9b240db0ed3e240ab2151e6143fc20c450', class: "flex items-center gap-2" }, h("input", { key: '3f29e926b21cd2bb673bde3460b82bfd79fa0f2a', type: "checkbox", id: "privacyPolicy", class: "w-4 h-4 accent-tertiary border-border rounded focus:ring-tertiary focus:ring-offset-0 focus:ring-2", checked: this.privacyPolicyAccepted, onChange: e => {
|
|
464
|
+
this.privacyPolicyAccepted = e.target.checked;
|
|
465
|
+
if (e.target.checked) {
|
|
466
|
+
this.privacyPolicyError = '';
|
|
467
|
+
}
|
|
468
|
+
} }), h("label", { key: 'c67e6bef4d099262bc1a6f9e0fb820992b520784', htmlFor: "privacyPolicy", class: "text-sm text-text-muted" }, "Ich stimme der", ' ', h("a", { key: '1425b344e4f4bfff6b0b001ae9c60d707be343d6', href: "https://www.solaravatar.com/rechtliches/datenschutz", target: "_blank", rel: "noopener noreferrer", class: "text-secondary hover:underline" }, "Datenschutzerkl\u00E4rung"), ' ', "zu.")), this.privacyPolicyError && h("p", { key: '180c318dc31d5e841ea94007c773a2d96b157d76', class: "text-error text-sm mt-1 ml-6" }, this.privacyPolicyError)), h("button", { key: '15b93198b3a01feb4125303f08a40a35edadbeaf', onClick: () => this.handleRequestOffer(), disabled: !this.firstname.trim() ||
|
|
469
|
+
!this.surname.trim() ||
|
|
470
|
+
!this.email.trim() ||
|
|
471
|
+
!!this.firstnameError ||
|
|
472
|
+
!!this.surnameError ||
|
|
473
|
+
!!this.emailError ||
|
|
474
|
+
!!this.phoneError ||
|
|
475
|
+
!this.privacyPolicyAccepted ||
|
|
476
|
+
this.isSubmitting, class: `px-6 py-3 rounded-4xl transition-colors duration-200 flex items-center gap-2 ${this.isSubmitting ? 'bg-muted text-text-muted cursor-not-allowed' : 'bg-secondary hover:bg-tertiary'}`, style: {
|
|
477
|
+
color: this.isSubmitting ? 'var(--color-text-muted)' : '#ffffff',
|
|
478
|
+
} }, this.isSubmitting && h("div", { key: 'c9ea77de7dd7ac58e3beebeb626311f8faf85877', class: "w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin" }), this.isSubmitting ? t.solarSystemForm.sending : t.solarSystemForm.requestOfferButton), this.submitMessage && (h("div", { key: '7d7bf6386e236c76f289164ee74eedd735f1c834', class: `text-sm px-4 py-2 rounded-4xl ${this.submitSuccess ? 'bg-success/10 text-success border border-success/20' : 'bg-error/10 text-error border border-error/20'}` }, this.submitMessage)))))));
|
|
545
479
|
}
|
|
546
480
|
static get watchers() { return {
|
|
547
481
|
"systemConfigs": ["updateSystemConfigs"]
|