blue-chestnut-solar-expert 0.0.67 → 0.0.68
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/assets/tutorial4.mp4 +0 -0
- package/dist/{collection/config.js → stencil-library/config-CWfV1nKn.js} +10 -4
- package/dist/stencil-library/config-CWfV1nKn.js.map +1 -0
- package/dist/stencil-library/constants-hboFofU4.js +1522 -0
- package/dist/stencil-library/constants-hboFofU4.js.map +1 -0
- package/dist/stencil-library/decoder-DNOvLSaS.js +39 -0
- package/dist/stencil-library/decoder-DNOvLSaS.js.map +1 -0
- package/dist/stencil-library/deflate-0Vdd6-55.js +21 -0
- package/dist/{esm/deflate-DHgPf9CO.js.map → stencil-library/deflate-0Vdd6-55.js.map} +1 -1
- package/dist/stencil-library/eraser-icon.entry.esm.js.map +1 -0
- package/dist/{components/p-CL74Q4VR.js → stencil-library/eraser-icon.entry.js} +9 -27
- package/dist/stencil-library/eraser-icon.entry.js.map +1 -0
- package/dist/stencil-library/house-icon.entry.esm.js.map +1 -0
- package/dist/{components/p-D8w3bTPO.js → stencil-library/house-icon.entry.js} +9 -27
- package/dist/stencil-library/house-icon.entry.js.map +1 -0
- package/dist/{components/loading-widget.js → stencil-library/icon-selector.entry.esm.js.map} +1 -38
- package/dist/stencil-library/icon-selector.entry.js +47 -0
- package/dist/stencil-library/icon-selector.entry.js.map +1 -0
- package/dist/stencil-library/index-CChkgM3J.js +414 -0
- package/dist/stencil-library/index-CChkgM3J.js.map +1 -0
- package/dist/stencil-library/index-ICfDNUMe.js +4172 -0
- package/dist/stencil-library/index-ICfDNUMe.js.map +1 -0
- package/dist/stencil-library/index.esm.js +13 -1
- package/dist/stencil-library/index.esm.js.map +1 -1
- package/dist/{esm/jpeg-CJLm1GkA.js → stencil-library/jpeg-Dd5nnHR5.js} +11 -3
- package/dist/stencil-library/jpeg-Dd5nnHR5.js.map +1 -0
- package/dist/{components/p-BcVa4_YP.js → stencil-library/lerc-7W4E8EBs.js} +27 -1981
- package/dist/stencil-library/lerc-7W4E8EBs.js.map +1 -0
- package/dist/{esm → stencil-library}/loading-widget.entry.js +3 -3
- package/dist/{components/p-P28NBglk.js.map → stencil-library/loading-widget.entry.js.map} +1 -1
- package/dist/{esm/lzw-DaOzWJUD.js → stencil-library/lzw--P4c0ZHH.js} +10 -4
- package/dist/stencil-library/lzw--P4c0ZHH.js.map +1 -0
- package/dist/stencil-library/map-draw-Cx9WZoKH.js +25567 -0
- package/dist/stencil-library/map-draw-Cx9WZoKH.js.map +1 -0
- package/dist/stencil-library/map-draw.entry.esm.js.map +1 -0
- package/dist/stencil-library/map-draw.entry.js +12 -0
- package/dist/stencil-library/map-draw.entry.js.map +1 -0
- package/dist/stencil-library/map-selector.entry.esm.js.map +1 -0
- package/dist/{components/p-C5QieOat.js → stencil-library/map-selector.entry.js} +164 -96
- package/dist/stencil-library/map-selector.entry.js.map +1 -0
- package/dist/{components/loading-widget.js.map → stencil-library/marker-icon.entry.esm.js.map} +1 -1
- package/dist/{components/p-Umz6nJIv.js → stencil-library/marker-icon.entry.js} +9 -27
- package/dist/stencil-library/marker-icon.entry.js.map +1 -0
- package/dist/stencil-library/move-icon.entry.esm.js.map +1 -0
- package/dist/{components/p-FdEV2qPo.js → stencil-library/move-icon.entry.js} +9 -27
- package/dist/stencil-library/move-icon.entry.js.map +1 -0
- package/dist/{components/p-DTXeHbuh.js.map → stencil-library/octagon-minus-icon.entry.esm.js.map} +1 -1
- package/dist/{components/p-BJLO76Yi.js → stencil-library/octagon-minus-icon.entry.js} +9 -27
- package/dist/stencil-library/octagon-minus-icon.entry.js.map +1 -0
- package/dist/{components/p-ByX6QP-E.js → stencil-library/packbits-X3R_utTs.js} +9 -3
- package/dist/stencil-library/packbits-X3R_utTs.js.map +1 -0
- package/dist/stencil-library/pako.esm-CPorU236.js +6881 -0
- package/dist/{esm/pako.esm-B5WTRCh8.js.map → stencil-library/pako.esm-CPorU236.js.map} +1 -1
- package/dist/{components/p-B4X-RCW0.js.map → stencil-library/polygon-buttons.entry.esm.js.map} +1 -1
- package/dist/{cjs/loading-widget.cjs.entry.js → stencil-library/polygon-buttons.entry.js} +16 -10
- package/dist/stencil-library/polygon-buttons.entry.js.map +1 -0
- package/dist/{cjs/loading-widget.cjs.entry.js.map → stencil-library/polygon-information.entry.esm.js.map} +1 -1
- package/dist/{components/p-BFJHTJPM.js → stencil-library/polygon-information.entry.js} +13 -70
- package/dist/stencil-library/polygon-information.entry.js.map +1 -0
- package/dist/stencil-library/raw-BxukYehy.js +20 -0
- package/dist/stencil-library/raw-BxukYehy.js.map +1 -0
- package/dist/stencil-library/search-icon.entry.esm.js.map +1 -0
- package/dist/{components/p-DBwr8xSB.js → stencil-library/search-icon.entry.js} +9 -27
- package/dist/stencil-library/{p-ab0f2031.entry.js → search-icon.entry.js.map} +1 -2
- package/dist/stencil-library/settings-icon.entry.esm.js.map +1 -0
- package/dist/{components/p-DTXeHbuh.js → stencil-library/settings-icon.entry.js} +9 -27
- package/dist/stencil-library/settings-icon.entry.js.map +1 -0
- package/dist/stencil-library/settings-modal.entry.esm.js.map +1 -0
- package/dist/{components/p-B4X-RCW0.js → stencil-library/settings-modal.entry.js} +20 -38
- package/dist/stencil-library/settings-modal.entry.js.map +1 -0
- package/dist/stencil-library/solar-expert.entry.esm.js.map +1 -0
- package/dist/{components/solar-expert.js → stencil-library/solar-expert.entry.js} +14 -150
- package/dist/{components/p-i1uLweD0.js.map → stencil-library/solar-expert.entry.js.map} +1 -1
- package/dist/stencil-library/solar-system-form.entry.esm.js.map +1 -0
- package/dist/stencil-library/solar-system-form.entry.js +553 -0
- package/dist/stencil-library/solar-system-form.entry.js.map +1 -0
- package/dist/stencil-library/stencil-library.esm.js +52 -1
- package/dist/stencil-library/stencil-library.esm.js.map +1 -1
- package/dist/{components/p-eDwaXClX.js → stencil-library/store-CcqrFuBK.js} +24 -3
- package/dist/stencil-library/store-CcqrFuBK.js.map +1 -0
- package/dist/stencil-library/toast-notification.entry.esm.js.map +1 -0
- package/dist/{components/p-P28NBglk.js → stencil-library/toast-notification.entry.js} +9 -30
- package/dist/stencil-library/toast-notification.entry.js.map +1 -0
- package/dist/stencil-library/tool-box.entry.esm.js.map +1 -0
- package/dist/{components/p-i1uLweD0.js → stencil-library/tool-box.entry.js} +27 -35
- package/dist/stencil-library/tool-box.entry.js.map +1 -0
- package/dist/{collection/utils/render/tools.js → stencil-library/tools-BNYKV5H5.js} +14 -8
- package/dist/stencil-library/tools-BNYKV5H5.js.map +1 -0
- package/dist/stencil-library/tutorial-component.entry.esm.js.map +1 -0
- package/dist/{components/p-Dzl6kfPI.js → stencil-library/tutorial-component.entry.js} +42 -35
- package/dist/stencil-library/tutorial-component.entry.js.map +1 -0
- package/dist/stencil-library/undo-icon.entry.esm.js.map +1 -0
- package/dist/{components/p-waOPoUcA.js → stencil-library/undo-icon.entry.js} +9 -27
- package/dist/stencil-library/undo-icon.entry.js.map +1 -0
- package/dist/{collection/utils/utils.js → stencil-library/utils-BCUZxI9u.js} +9 -3
- package/dist/stencil-library/utils-BCUZxI9u.js.map +1 -0
- package/dist/{esm/webimage-BiHardhv.js → stencil-library/webimage-CBrfoxHM.js} +9 -3
- package/dist/{esm/webimage-BiHardhv.js.map → stencil-library/webimage-CBrfoxHM.js.map} +1 -1
- package/dist/types/components/map-draw/map-draw.d.ts +5 -0
- package/dist/types/components/map-draw/tutorial-component.d.ts +7 -0
- package/dist/types/components.d.ts +4 -0
- package/dist/types/types/lang.d.ts +7 -0
- package/package.json +1 -1
- package/dist/cjs/app-globals-I24yU8do.js +0 -10
- package/dist/cjs/app-globals-I24yU8do.js.map +0 -1
- package/dist/cjs/basedecoder-CQuzfSgz.js +0 -116
- package/dist/cjs/basedecoder-CQuzfSgz.js.map +0 -1
- package/dist/cjs/deflate-AzGzQSW2.js +0 -17
- package/dist/cjs/deflate-AzGzQSW2.js.map +0 -1
- package/dist/cjs/eraser-icon_19.cjs.entry.js +0 -31
- package/dist/cjs/eraser-icon_19.cjs.entry.js.map +0 -1
- package/dist/cjs/index-HgRXF6kp.js +0 -1470
- package/dist/cjs/index-HgRXF6kp.js.map +0 -1
- package/dist/cjs/index.cjs.js +0 -7
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/jpeg-Bx3bTm32.js +0 -904
- package/dist/cjs/jpeg-Bx3bTm32.js.map +0 -1
- package/dist/cjs/lerc-v64rYVDy.js +0 -4427
- package/dist/cjs/lerc-v64rYVDy.js.map +0 -1
- package/dist/cjs/loader.cjs.js +0 -18
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/loading-widget.entry.cjs.js.map +0 -1
- package/dist/cjs/lzw-BmFug486.js +0 -140
- package/dist/cjs/lzw-BmFug486.js.map +0 -1
- package/dist/cjs/packbits-CYx9fB0v.js +0 -35
- package/dist/cjs/packbits-CYx9fB0v.js.map +0 -1
- package/dist/cjs/pako.esm-0mKI6Jik.js +0 -3243
- package/dist/cjs/pako.esm-0mKI6Jik.js.map +0 -1
- package/dist/cjs/raw-DC82yoyr.js +0 -16
- package/dist/cjs/raw-DC82yoyr.js.map +0 -1
- package/dist/cjs/stencil-library.cjs.js +0 -30
- package/dist/cjs/stencil-library.cjs.js.map +0 -1
- package/dist/cjs/webimage-Dc0t2xAB.js +0 -49
- package/dist/cjs/webimage-Dc0t2xAB.js.map +0 -1
- package/dist/collection/collection-manifest.json +0 -31
- package/dist/collection/components/icons/eraser.js +0 -64
- package/dist/collection/components/icons/eraser.js.map +0 -1
- package/dist/collection/components/icons/house.js +0 -64
- package/dist/collection/components/icons/house.js.map +0 -1
- package/dist/collection/components/icons/icon.js +0 -108
- package/dist/collection/components/icons/icon.js.map +0 -1
- package/dist/collection/components/icons/marker.js +0 -64
- package/dist/collection/components/icons/marker.js.map +0 -1
- package/dist/collection/components/icons/move.js +0 -64
- package/dist/collection/components/icons/move.js.map +0 -1
- package/dist/collection/components/icons/octagonMinus.js +0 -64
- package/dist/collection/components/icons/octagonMinus.js.map +0 -1
- package/dist/collection/components/icons/search.js +0 -64
- package/dist/collection/components/icons/search.js.map +0 -1
- package/dist/collection/components/icons/settings.js +0 -64
- package/dist/collection/components/icons/settings.js.map +0 -1
- package/dist/collection/components/icons/undo.js +0 -64
- package/dist/collection/components/icons/undo.js.map +0 -1
- package/dist/collection/components/map-draw/map-draw.js +0 -795
- package/dist/collection/components/map-draw/map-draw.js.map +0 -1
- package/dist/collection/components/map-draw/map-selector.js +0 -246
- package/dist/collection/components/map-draw/map-selector.js.map +0 -1
- package/dist/collection/components/map-draw/polygon-buttons.js +0 -86
- package/dist/collection/components/map-draw/polygon-buttons.js.map +0 -1
- package/dist/collection/components/map-draw/polygon-information.js +0 -211
- package/dist/collection/components/map-draw/polygon-information.js.map +0 -1
- package/dist/collection/components/map-draw/tool-box.js +0 -108
- package/dist/collection/components/map-draw/tool-box.js.map +0 -1
- package/dist/collection/components/map-draw/tutorial-component.js +0 -151
- package/dist/collection/components/map-draw/tutorial-component.js.map +0 -1
- package/dist/collection/components/settings/settings.js +0 -127
- package/dist/collection/components/settings/settings.js.map +0 -1
- package/dist/collection/components/solar-expert/solar-expert.js +0 -241
- package/dist/collection/components/solar-expert/solar-expert.js.map +0 -1
- package/dist/collection/components/solar-system-form/solar-system-form.js +0 -596
- package/dist/collection/components/solar-system-form/solar-system-form.js.map +0 -1
- package/dist/collection/components/widgets/loading-widget.js +0 -18
- package/dist/collection/components/widgets/loading-widget.js.map +0 -1
- package/dist/collection/components/widgets/toast-notification.js +0 -133
- package/dist/collection/components/widgets/toast-notification.js.map +0 -1
- package/dist/collection/config.js.map +0 -1
- package/dist/collection/constants.js +0 -90
- package/dist/collection/constants.js.map +0 -1
- package/dist/collection/index.js +0 -2
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/output.css +0 -1126
- package/dist/collection/store.js +0 -43
- package/dist/collection/store.js.map +0 -1
- package/dist/collection/types/lang.js +0 -2
- package/dist/collection/types/lang.js.map +0 -1
- package/dist/collection/types/shapes.js +0 -2
- package/dist/collection/types/shapes.js.map +0 -1
- package/dist/collection/utils/api.js +0 -93
- package/dist/collection/utils/api.js.map +0 -1
- package/dist/collection/utils/images.js +0 -2
- package/dist/collection/utils/images.js.map +0 -1
- package/dist/collection/utils/lang/english.js +0 -157
- package/dist/collection/utils/lang/english.js.map +0 -1
- package/dist/collection/utils/lang/general.js +0 -30
- package/dist/collection/utils/lang/general.js.map +0 -1
- package/dist/collection/utils/lang/german.js +0 -157
- package/dist/collection/utils/lang/german.js.map +0 -1
- package/dist/collection/utils/lang/spanish.js +0 -157
- package/dist/collection/utils/lang/spanish.js.map +0 -1
- package/dist/collection/utils/render/tools.js.map +0 -1
- package/dist/collection/utils/solar.js +0 -136
- package/dist/collection/utils/solar.js.map +0 -1
- package/dist/collection/utils/theme.js +0 -97
- package/dist/collection/utils/theme.js.map +0 -1
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/eraser-icon.js +0 -11
- package/dist/components/eraser-icon.js.map +0 -1
- package/dist/components/house-icon.js +0 -11
- package/dist/components/house-icon.js.map +0 -1
- package/dist/components/icon-selector.js +0 -11
- package/dist/components/icon-selector.js.map +0 -1
- package/dist/components/index.js +0 -1269
- package/dist/components/index.js.map +0 -1
- package/dist/components/map-draw.js +0 -11
- package/dist/components/map-draw.js.map +0 -1
- package/dist/components/map-selector.js +0 -11
- package/dist/components/map-selector.js.map +0 -1
- package/dist/components/marker-icon.js +0 -11
- package/dist/components/marker-icon.js.map +0 -1
- package/dist/components/move-icon.js +0 -11
- package/dist/components/move-icon.js.map +0 -1
- package/dist/components/octagon-minus-icon.js +0 -11
- package/dist/components/octagon-minus-icon.js.map +0 -1
- package/dist/components/p-B54Ul0nf.js +0 -15
- package/dist/components/p-B54Ul0nf.js.map +0 -1
- package/dist/components/p-B5WTRCh8.js +0 -3241
- package/dist/components/p-B5WTRCh8.js.map +0 -1
- package/dist/components/p-BFJHTJPM.js.map +0 -1
- package/dist/components/p-BGoSj_DR.js +0 -902
- package/dist/components/p-BGoSj_DR.js.map +0 -1
- package/dist/components/p-BJLO76Yi.js.map +0 -1
- package/dist/components/p-BcVa4_YP.js.map +0 -1
- package/dist/components/p-Bopprtc7.js +0 -623
- package/dist/components/p-Bopprtc7.js.map +0 -1
- package/dist/components/p-ByX6QP-E.js.map +0 -1
- package/dist/components/p-C5QieOat.js.map +0 -1
- package/dist/components/p-CL74Q4VR.js.map +0 -1
- package/dist/components/p-Cgchl6bA.js +0 -47
- package/dist/components/p-Cgchl6bA.js.map +0 -1
- package/dist/components/p-D8w3bTPO.js.map +0 -1
- package/dist/components/p-DBwr8xSB.js.map +0 -1
- package/dist/components/p-DWirjxpO.js +0 -163
- package/dist/components/p-DWirjxpO.js.map +0 -1
- package/dist/components/p-DlNHVTGB.js +0 -15949
- package/dist/components/p-DlNHVTGB.js.map +0 -1
- package/dist/components/p-Dzl6kfPI.js.map +0 -1
- package/dist/components/p-FdEV2qPo.js.map +0 -1
- package/dist/components/p-PkMjF2if.js +0 -1985
- package/dist/components/p-PkMjF2if.js.map +0 -1
- package/dist/components/p-Umz6nJIv.js.map +0 -1
- package/dist/components/p-WmcSqXD8.js +0 -14
- package/dist/components/p-WmcSqXD8.js.map +0 -1
- package/dist/components/p-eDwaXClX.js.map +0 -1
- package/dist/components/p-j-vOrhhh.js +0 -114
- package/dist/components/p-j-vOrhhh.js.map +0 -1
- package/dist/components/p-q8auDIJ2.js +0 -138
- package/dist/components/p-q8auDIJ2.js.map +0 -1
- package/dist/components/p-waOPoUcA.js.map +0 -1
- package/dist/components/polygon-buttons.js +0 -11
- package/dist/components/polygon-buttons.js.map +0 -1
- package/dist/components/polygon-information.js +0 -11
- package/dist/components/polygon-information.js.map +0 -1
- package/dist/components/search-icon.js +0 -11
- package/dist/components/search-icon.js.map +0 -1
- package/dist/components/settings-icon.js +0 -11
- package/dist/components/settings-icon.js.map +0 -1
- package/dist/components/settings-modal.js +0 -11
- package/dist/components/settings-modal.js.map +0 -1
- package/dist/components/solar-expert.js.map +0 -1
- package/dist/components/solar-system-form.js +0 -11
- package/dist/components/solar-system-form.js.map +0 -1
- package/dist/components/toast-notification.js +0 -11
- package/dist/components/toast-notification.js.map +0 -1
- package/dist/components/tool-box.js +0 -11
- package/dist/components/tool-box.js.map +0 -1
- package/dist/components/tutorial-component.js +0 -11
- package/dist/components/tutorial-component.js.map +0 -1
- package/dist/components/undo-icon.js +0 -11
- package/dist/components/undo-icon.js.map +0 -1
- package/dist/esm/basedecoder-j-vOrhhh.js +0 -114
- package/dist/esm/basedecoder-j-vOrhhh.js.map +0 -1
- package/dist/esm/deflate-DHgPf9CO.js +0 -15
- package/dist/esm/eraser-icon_19.entry.js +0 -7
- package/dist/esm/eraser-icon_19.entry.js.map +0 -1
- package/dist/esm/index-C2JRBB5c.js +0 -1458
- package/dist/esm/index-C2JRBB5c.js.map +0 -1
- package/dist/esm/index.js +0 -5
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/jpeg-CJLm1GkA.js.map +0 -1
- package/dist/esm/lerc-CAiDQjTu.js +0 -4424
- package/dist/esm/lerc-CAiDQjTu.js.map +0 -1
- package/dist/esm/loader.js +0 -16
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/loading-widget.entry.js.map +0 -1
- package/dist/esm/lzw-DaOzWJUD.js.map +0 -1
- package/dist/esm/packbits-CZPyx9kx.js +0 -33
- package/dist/esm/packbits-CZPyx9kx.js.map +0 -1
- package/dist/esm/pako.esm-B5WTRCh8.js +0 -3241
- package/dist/esm/raw-pqeeWc2_.js +0 -14
- package/dist/esm/raw-pqeeWc2_.js.map +0 -1
- package/dist/esm/stencil-library.js +0 -26
- package/dist/esm/stencil-library.js.map +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/stencil-library/p-B54Ul0nf.js +0 -2
- package/dist/stencil-library/p-B54Ul0nf.js.map +0 -1
- package/dist/stencil-library/p-B5WTRCh8.js +0 -2
- package/dist/stencil-library/p-B5WTRCh8.js.map +0 -1
- package/dist/stencil-library/p-BBtmpSUK.js +0 -2
- package/dist/stencil-library/p-BBtmpSUK.js.map +0 -1
- package/dist/stencil-library/p-BGoSj_DR.js +0 -2
- package/dist/stencil-library/p-BGoSj_DR.js.map +0 -1
- package/dist/stencil-library/p-ByX6QP-E.js +0 -2
- package/dist/stencil-library/p-ByX6QP-E.js.map +0 -1
- package/dist/stencil-library/p-C2JRBB5c.js +0 -3
- package/dist/stencil-library/p-C2JRBB5c.js.map +0 -1
- package/dist/stencil-library/p-CX8V3eiN.js +0 -2
- package/dist/stencil-library/p-CX8V3eiN.js.map +0 -1
- package/dist/stencil-library/p-Cgchl6bA.js +0 -2
- package/dist/stencil-library/p-Cgchl6bA.js.map +0 -1
- package/dist/stencil-library/p-WmcSqXD8.js +0 -2
- package/dist/stencil-library/p-WmcSqXD8.js.map +0 -1
- package/dist/stencil-library/p-ab0f2031.entry.js.map +0 -1
- package/dist/stencil-library/p-cAuhy_jT.js +0 -10
- package/dist/stencil-library/p-cAuhy_jT.js.map +0 -1
- package/dist/stencil-library/p-e7b94dbb.entry.js +0 -2
- package/dist/stencil-library/p-e7b94dbb.entry.js.map +0 -1
- package/dist/stencil-library/p-j-vOrhhh.js +0 -2
- package/dist/stencil-library/p-j-vOrhhh.js.map +0 -1
- package/dist/stencil-library/p-q8auDIJ2.js +0 -2
- package/dist/stencil-library/p-q8auDIJ2.js.map +0 -1
- /package/dist/{esm → stencil-library}/app-globals-CX8V3eiN.js +0 -0
- /package/dist/{esm → stencil-library}/app-globals-CX8V3eiN.js.map +0 -0
|
@@ -0,0 +1,553 @@
|
|
|
1
|
+
|
|
2
|
+
if (typeof global === "undefined") { var global = globalThis || window || self; }
|
|
3
|
+
import { r as registerInstance, h } from './index-ICfDNUMe.js';
|
|
4
|
+
import { b as DEFAULT_SOLAR_PANEL_TYPE } from './config-CWfV1nKn.js';
|
|
5
|
+
import { g as getLanguageStrings, s as state } from './store-CcqrFuBK.js';
|
|
6
|
+
import { d as distExports, H as HEAT_PUMP_CONSUMPTION } from './constants-hboFofU4.js';
|
|
7
|
+
|
|
8
|
+
async function fetchSolarData(latitude, longitude, apiKey) {
|
|
9
|
+
if (latitude === 0 || longitude === 0) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
try {
|
|
13
|
+
const args = {
|
|
14
|
+
"location.latitude": latitude.toFixed(5),
|
|
15
|
+
"location.longitude": longitude.toFixed(5),
|
|
16
|
+
};
|
|
17
|
+
const params = new URLSearchParams({
|
|
18
|
+
...args,
|
|
19
|
+
key: apiKey,
|
|
20
|
+
});
|
|
21
|
+
const response = await fetch(`https://solar.googleapis.com/v1/buildingInsights:findClosest?${params}`);
|
|
22
|
+
if (!response.ok) {
|
|
23
|
+
const errorText = await response.text();
|
|
24
|
+
throw new Error(`HTTP error! status: ${response.status}, body: ${errorText}`);
|
|
25
|
+
}
|
|
26
|
+
const contentType = response.headers.get("content-type");
|
|
27
|
+
if (!contentType || !contentType.includes("application/json")) {
|
|
28
|
+
const text = await response.text();
|
|
29
|
+
console.error("Unexpected content type:", contentType, "Response:", text);
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
const rawData = await response.json();
|
|
33
|
+
return rawData;
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
console.error("Error fetching solar data:", error);
|
|
37
|
+
if (error instanceof TypeError &&
|
|
38
|
+
error.message === "Failed to fetch") {
|
|
39
|
+
throw new Error("Unable to connect to the solar data API.");
|
|
40
|
+
}
|
|
41
|
+
throw error;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
async function sendLeadToNexvoro(leadData) {
|
|
45
|
+
try {
|
|
46
|
+
const extradata = {
|
|
47
|
+
leadtype: "A-lead",
|
|
48
|
+
phase: "10 Anbahnung",
|
|
49
|
+
title: `${leadData.client.name}/solarExpert`,
|
|
50
|
+
extradata: leadData,
|
|
51
|
+
};
|
|
52
|
+
const formData = new FormData();
|
|
53
|
+
formData.append("md", "81.87.84.81.84.");
|
|
54
|
+
formData.append("token", "estwtayazyrwtddwsstqatw");
|
|
55
|
+
formData.append("NewsletterID", "20404");
|
|
56
|
+
formData.append("type", "new");
|
|
57
|
+
formData.append("data", "lead");
|
|
58
|
+
formData.append("values", JSON.stringify(extradata));
|
|
59
|
+
// Build the URL
|
|
60
|
+
const baseUrl = "https://workspace.nexvoro.cloud/exchange/extevent";
|
|
61
|
+
const url = baseUrl;
|
|
62
|
+
// Send the request with FormData to avoid CORS preflight
|
|
63
|
+
const response = await fetch(url, {
|
|
64
|
+
method: "POST",
|
|
65
|
+
body: formData,
|
|
66
|
+
// No custom headers to avoid preflight request
|
|
67
|
+
});
|
|
68
|
+
if (!response.ok) {
|
|
69
|
+
const errorText = await response.text();
|
|
70
|
+
console.error("Error sending lead to Nexvoro:", response.status, errorText);
|
|
71
|
+
throw new Error(`HTTP error! status: ${response.status}, body: ${errorText}`);
|
|
72
|
+
}
|
|
73
|
+
const result = await response.text();
|
|
74
|
+
console.log("result", result);
|
|
75
|
+
// Check if the response contains a lead ID (successful creation)
|
|
76
|
+
if (result.includes("ERROR")) {
|
|
77
|
+
return {
|
|
78
|
+
success: false,
|
|
79
|
+
message: "Lead not created",
|
|
80
|
+
leadId: result,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
return {
|
|
85
|
+
success: true,
|
|
86
|
+
message: "Lead submitted successfully",
|
|
87
|
+
leadId: undefined,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
console.error("Error sending lead to Nexvoro:", error);
|
|
93
|
+
return {
|
|
94
|
+
success: false,
|
|
95
|
+
message: error instanceof Error
|
|
96
|
+
? error.message
|
|
97
|
+
: "Unknown error occurred",
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const outputCss = "/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\",\n \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\",\n \"Courier New\", monospace;\n --color-red-100: oklch(93.6% 0.032 17.717);\n --color-red-300: oklch(80.8% 0.114 19.571);\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-red-700: oklch(50.5% 0.213 27.518);\n --color-black: #000;\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-md: 28rem;\n --container-2xl: 42rem;\n --text-xs: 0.75rem;\n --text-xs--line-height: calc(1 / 0.75);\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-4xl: 2rem;\n --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n --color-primary: hsl(41 51% 90%);\n --color-primary-foreground: hsl(0 0% 0%);\n --color-secondary: hsl(28 100% 8%);\n --color-secondary-foreground: hsl(0 0% 100%);\n --color-tertiary: hsl(28 100% 29%);\n --color-tertiary-foreground: hsl(0 0% 100%);\n --color-muted: hsl(0 0% 100%);\n --color-muted-foreground: hsl(0 0% 0%);\n --color-error: hsl(0 100% 50%);\n --color-error-foreground: hsl(0 0% 100%);\n --color-surface: hsl(0 0% 88%);\n --color-surface-hover: hsl(0 0% 82%);\n --color-surface-active: hsl(0 0% 64%);\n --color-text-muted: hsl(0 0% 45%);\n --color-text-secondary: hsl(0 0% 55%);\n --color-text-placeholder: hsl(0 0% 73%);\n --color-border: hsl(0 0% 82%);\n --color-border-light: hsl(0 0% 93%);\n --color-success: hsl(142 76% 36%);\n --color-info: hsl(221 83% 53%);\n --color-hover: hsl(0 0% 88%);\n --color-hover-dark: hsl(28 100% 8%);\n --color-overlay: rgba(0, 0, 0, 0.24);\n --color-tooltip: hsl(0 0% 13%);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type=\"button\"], [type=\"reset\"], [type=\"submit\"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=\"until-found\"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .bottom-4 {\n bottom: calc(var(--spacing) * 4);\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .z-50 {\n z-index: 50;\n }\n .container {\n width: 100%;\n @media (width >= 40rem) {\n max-width: 40rem;\n }\n @media (width >= 48rem) {\n max-width: 48rem;\n }\n @media (width >= 64rem) {\n max-width: 64rem;\n }\n @media (width >= 80rem) {\n max-width: 80rem;\n }\n @media (width >= 96rem) {\n max-width: 96rem;\n }\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mt-6 {\n margin-top: calc(var(--spacing) * 6);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .mb-6 {\n margin-bottom: calc(var(--spacing) * 6);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .inline {\n display: inline;\n }\n .inline-block {\n display: inline-block;\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-64 {\n height: calc(var(--spacing) * 64);\n }\n .h-\\[400px\\] {\n height: 400px;\n }\n .h-full {\n height: 100%;\n }\n .max-h-full {\n max-height: 100%;\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-20 {\n width: calc(var(--spacing) * 20);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-2xl {\n max-width: var(--container-2xl);\n }\n .max-w-md {\n max-width: var(--container-md);\n }\n .flex-1 {\n flex: 1;\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .translate-y-0 {\n --tw-translate-y: calc(var(--spacing) * 0);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .translate-y-2 {\n --tw-translate-y: calc(var(--spacing) * 2);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .scale-95 {\n --tw-scale-x: 95%;\n --tw-scale-y: 95%;\n --tw-scale-z: 95%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n }\n .scale-100 {\n --tw-scale-x: 100%;\n --tw-scale-y: 100%;\n --tw-scale-z: 100%;\n scale: var(--tw-scale-x) var(--tw-scale-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-not-allowed {\n cursor: not-allowed;\n }\n .resize {\n resize: both;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-1 {\n grid-template-columns: repeat(1, minmax(0, 1fr));\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .grid-rows-2 {\n grid-template-rows: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .flex-wrap {\n flex-wrap: wrap;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .items-stretch {\n align-items: stretch;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-0 {\n gap: calc(var(--spacing) * 0);\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-3 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .overflow-hidden {\n overflow: hidden;\n }\n .overflow-y-auto {\n overflow-y: auto;\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-2 {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-border {\n border-color: var(--color-border);\n }\n .border-current {\n border-color: currentcolor;\n }\n .border-error\\/20 {\n border-color: color-mix(in srgb, hsl(0 100% 50%) 20%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--color-error) 20%, transparent);\n }\n }\n .border-info\\/20 {\n border-color: color-mix(in srgb, hsl(221 83% 53%) 20%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--color-info) 20%, transparent);\n }\n }\n .border-red-300 {\n border-color: var(--color-red-300);\n }\n .border-secondary {\n border-color: var(--color-secondary);\n }\n .border-success\\/20 {\n border-color: color-mix(in srgb, hsl(142 76% 36%) 20%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n border-color: color-mix(in oklab, var(--color-success) 20%, transparent);\n }\n }\n .border-t-transparent {\n border-top-color: transparent;\n }\n .bg-black {\n background-color: var(--color-black);\n }\n .bg-error\\/10 {\n background-color: color-mix(in srgb, hsl(0 100% 50%) 10%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-error) 10%, transparent);\n }\n }\n .bg-error\\/90 {\n background-color: color-mix(in srgb, hsl(0 100% 50%) 90%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-error) 90%, transparent);\n }\n }\n .bg-info\\/90 {\n background-color: color-mix(in srgb, hsl(221 83% 53%) 90%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-info) 90%, transparent);\n }\n }\n .bg-muted {\n background-color: var(--color-muted);\n }\n .bg-overlay {\n background-color: var(--color-overlay);\n }\n .bg-primary {\n background-color: var(--color-primary);\n }\n .bg-red-100 {\n background-color: var(--color-red-100);\n }\n .bg-secondary {\n background-color: var(--color-secondary);\n }\n .bg-success\\/10 {\n background-color: color-mix(in srgb, hsl(142 76% 36%) 10%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-success) 10%, transparent);\n }\n }\n .bg-success\\/90 {\n background-color: color-mix(in srgb, hsl(142 76% 36%) 90%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-success) 90%, transparent);\n }\n }\n .bg-surface {\n background-color: var(--color-surface);\n }\n .bg-tertiary {\n background-color: var(--color-tertiary);\n }\n .bg-transparent {\n background-color: transparent;\n }\n .object-contain {\n object-fit: contain;\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-3 {\n padding-inline: calc(var(--spacing) * 3);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .px-6 {\n padding-inline: calc(var(--spacing) * 6);\n }\n .py-1 {\n padding-block: calc(var(--spacing) * 1);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .py-3 {\n padding-block: calc(var(--spacing) * 3);\n }\n .pt-3 {\n padding-top: calc(var(--spacing) * 3);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-3 {\n padding-right: calc(var(--spacing) * 3);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-2 {\n padding-bottom: calc(var(--spacing) * 2);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pb-4 {\n padding-bottom: calc(var(--spacing) * 4);\n }\n .pl-3 {\n padding-left: calc(var(--spacing) * 3);\n }\n .pl-4 {\n padding-left: calc(var(--spacing) * 4);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-right {\n text-align: right;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .text-xs {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-error {\n color: var(--color-error);\n }\n .text-error-foreground {\n color: var(--color-error-foreground);\n }\n .text-muted {\n color: var(--color-muted);\n }\n .text-muted-foreground {\n color: var(--color-muted-foreground);\n }\n .text-primary-foreground {\n color: var(--color-primary-foreground);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-red-700 {\n color: var(--color-red-700);\n }\n .text-secondary {\n color: var(--color-secondary);\n }\n .text-success {\n color: var(--color-success);\n }\n .text-text-muted {\n color: var(--color-text-muted);\n }\n .text-text-secondary {\n color: var(--color-text-secondary);\n }\n .text-white {\n color: var(--color-white);\n }\n .accent-tertiary {\n accent-color: var(--color-tertiary);\n }\n .opacity-0 {\n opacity: 0%;\n }\n .opacity-100 {\n opacity: 100%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .shadow-lg {\n --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .transition {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, visibility, content-visibility, overlay, pointer-events;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-all {\n transition-property: all;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .duration-300 {\n --tw-duration: 300ms;\n transition-duration: 300ms;\n }\n .ease-in-out {\n --tw-ease: var(--ease-in-out);\n transition-timing-function: var(--ease-in-out);\n }\n .hover\\:bg-hover {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-hover);\n }\n }\n }\n .hover\\:bg-muted {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-muted);\n }\n }\n }\n .hover\\:bg-overlay {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-overlay);\n }\n }\n }\n .hover\\:bg-secondary\\/80 {\n &:hover {\n @media (hover: hover) {\n background-color: color-mix(in srgb, hsl(28 100% 8%) 80%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-secondary) 80%, transparent);\n }\n }\n }\n }\n .hover\\:bg-surface-hover {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-surface-hover);\n }\n }\n }\n .hover\\:bg-tertiary {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-tertiary);\n }\n }\n }\n .hover\\:bg-tertiary\\/80 {\n &:hover {\n @media (hover: hover) {\n background-color: color-mix(in srgb, hsl(28 100% 29%) 80%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-tertiary) 80%, transparent);\n }\n }\n }\n }\n .hover\\:bg-text-secondary {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-text-secondary);\n }\n }\n }\n .focus\\:border-2 {\n &:focus {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n }\n .focus\\:border-secondary {\n &:focus {\n border-color: var(--color-secondary);\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-secondary {\n &:focus {\n --tw-ring-color: var(--color-secondary);\n }\n }\n .focus\\:ring-tertiary {\n &:focus {\n --tw-ring-color: var(--color-tertiary);\n }\n }\n .focus\\:ring-offset-0 {\n &:focus {\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .sm\\:mt-0 {\n @media (width >= 40rem) {\n margin-top: calc(var(--spacing) * 0);\n }\n }\n .sm\\:flex-3 {\n @media (width >= 40rem) {\n flex: 3;\n }\n }\n .sm\\:flex-row {\n @media (width >= 40rem) {\n flex-direction: row;\n }\n }\n .sm\\:items-center {\n @media (width >= 40rem) {\n align-items: center;\n }\n }\n .sm\\:gap-4 {\n @media (width >= 40rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n .md\\:grid-cols-2 {\n @media (width >= 48rem) {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n }\n .md\\:pl-2 {\n @media (width >= 48rem) {\n padding-left: calc(var(--spacing) * 2);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:rounded-full {\n &::-webkit-slider-runnable-track {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:bg-black\\/25 {\n &::-webkit-slider-runnable-track {\n background-color: color-mix(in srgb, #000 25%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-black) 25%, transparent);\n }\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:h-\\[10px\\] {\n &::-webkit-slider-thumb {\n height: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:w-\\[10px\\] {\n &::-webkit-slider-thumb {\n width: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:appearance-none {\n &::-webkit-slider-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:rounded-full {\n &::-webkit-slider-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:bg-muted {\n &::-webkit-slider-thumb {\n background-color: var(--color-muted);\n }\n }\n}\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-scale-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-scale-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-scale-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 1;\n}\n@property --tw-rotate-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-duration {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ease {\n syntax: \"*\";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-scale-z: 1;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-duration: initial;\n --tw-ease: initial;\n }\n }\n}\n";
|
|
103
|
+
|
|
104
|
+
const SolarSystemForm = class {
|
|
105
|
+
constructor(hostRef) {
|
|
106
|
+
registerInstance(this, hostRef);
|
|
107
|
+
}
|
|
108
|
+
systemConfigs = {};
|
|
109
|
+
polygons = [];
|
|
110
|
+
roofCanvas;
|
|
111
|
+
polygonCanvas;
|
|
112
|
+
householdConsumption = 4500;
|
|
113
|
+
consumptionProfile = "mostly_at_home";
|
|
114
|
+
electricityPrice = 0.3;
|
|
115
|
+
compensationRate = 0.07;
|
|
116
|
+
annualPriceIncrease = 2;
|
|
117
|
+
autonomy = 0;
|
|
118
|
+
costSavings = 0;
|
|
119
|
+
numberOfPanels = 5;
|
|
120
|
+
panelPeakPower = 0.4; // kW per panel
|
|
121
|
+
name = "";
|
|
122
|
+
email = "";
|
|
123
|
+
phone = "";
|
|
124
|
+
nameError = "";
|
|
125
|
+
emailError = "";
|
|
126
|
+
phoneError = "";
|
|
127
|
+
electricCar = false;
|
|
128
|
+
electricCarChargingTime = "day";
|
|
129
|
+
heatPump = 0;
|
|
130
|
+
battery = 0;
|
|
131
|
+
batteryEnabled = false;
|
|
132
|
+
compensation20Years = 0;
|
|
133
|
+
savedCosts20Years = 0;
|
|
134
|
+
maxPanels = 5;
|
|
135
|
+
kmDrivenPerYear = 10000;
|
|
136
|
+
totalEnergyConsumption = 4500;
|
|
137
|
+
totalEnergyProduction = 0;
|
|
138
|
+
isSubmitting = false;
|
|
139
|
+
submitMessage = "";
|
|
140
|
+
submitSuccess = false;
|
|
141
|
+
updateSystemConfigs() {
|
|
142
|
+
if (Object.keys(this.systemConfigs).length === 0) {
|
|
143
|
+
this.numberOfPanels = 0;
|
|
144
|
+
this.maxPanels = 0;
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
this.numberOfPanels = Object.keys(this.systemConfigs).reduce((acc, curr) => acc + this.systemConfigs[curr].numberOfPanels, 0);
|
|
148
|
+
this.maxPanels = Object.keys(this.systemConfigs).reduce((acc, curr) => acc + this.systemConfigs[curr].numberOfPanels, 0);
|
|
149
|
+
this.panelPeakPower = Object.entries(this.systemConfigs)[0][1][0]
|
|
150
|
+
?.panel.kWattPeak ?? 0.44;
|
|
151
|
+
this.recalculate();
|
|
152
|
+
}
|
|
153
|
+
formatEuropeanNumber(num, decimals = 2) {
|
|
154
|
+
const fixed = num.toFixed(decimals);
|
|
155
|
+
const [integerPart, decimalPart] = fixed.split(".");
|
|
156
|
+
// Add dots as thousands separators
|
|
157
|
+
const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, ".");
|
|
158
|
+
// Join with comma as decimal separator
|
|
159
|
+
return decimalPart
|
|
160
|
+
? `${formattedInteger},${decimalPart}`
|
|
161
|
+
: formattedInteger;
|
|
162
|
+
}
|
|
163
|
+
recalculate() {
|
|
164
|
+
const currentSystemConfigs = {};
|
|
165
|
+
let totalNumberOfPanels = 0;
|
|
166
|
+
for (const [key, value] of Object.entries(this.systemConfigs)) {
|
|
167
|
+
if (totalNumberOfPanels >= this.numberOfPanels) {
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
if (value.numberOfPanels + totalNumberOfPanels > this.numberOfPanels) {
|
|
171
|
+
currentSystemConfigs[key] = {
|
|
172
|
+
...value,
|
|
173
|
+
numberOfPanels: this.numberOfPanels - totalNumberOfPanels,
|
|
174
|
+
};
|
|
175
|
+
totalNumberOfPanels = this.numberOfPanels;
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
currentSystemConfigs[key] = value;
|
|
179
|
+
totalNumberOfPanels += value.numberOfPanels;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
const simulationConfig = {
|
|
183
|
+
general: {
|
|
184
|
+
simulationYears: 20,
|
|
185
|
+
},
|
|
186
|
+
householdConsumption: {
|
|
187
|
+
consumptionProfile: this.consumptionProfile,
|
|
188
|
+
winterConsumptionFactor: 1.4,
|
|
189
|
+
summerConsumptionFactor: 0.6,
|
|
190
|
+
averageConsumption: this.householdConsumption / 365,
|
|
191
|
+
},
|
|
192
|
+
electricityPrice: {
|
|
193
|
+
purchase: this.electricityPrice,
|
|
194
|
+
sell: this.compensationRate,
|
|
195
|
+
increase: this.annualPriceIncrease / 100,
|
|
196
|
+
},
|
|
197
|
+
solarSystems: currentSystemConfigs,
|
|
198
|
+
batteryKWh: this.battery,
|
|
199
|
+
solarRadiation: {
|
|
200
|
+
winterFactor: 0.2,
|
|
201
|
+
summerFactor: 0.6,
|
|
202
|
+
},
|
|
203
|
+
heatPump: {
|
|
204
|
+
m2: this.heatPump,
|
|
205
|
+
consumptionPerM2: HEAT_PUMP_CONSUMPTION / 365,
|
|
206
|
+
},
|
|
207
|
+
electricCar: this.electricCar
|
|
208
|
+
? {
|
|
209
|
+
averageKilometersPerDay: this.kmDrivenPerYear / 365,
|
|
210
|
+
consumptionkWhPer100km: 20,
|
|
211
|
+
batteryKWh: 80,
|
|
212
|
+
chargingHours: this.electricCarChargingTime === "day"
|
|
213
|
+
? distExports.generateElectricCarChargingHours(6, 18)
|
|
214
|
+
: distExports.generateElectricCarChargingHours(18, 6),
|
|
215
|
+
}
|
|
216
|
+
: undefined,
|
|
217
|
+
};
|
|
218
|
+
const result = distExports.simulate(simulationConfig);
|
|
219
|
+
this.compensation20Years = result.compensationPerDay * 365 * 20;
|
|
220
|
+
this.savedCosts20Years = result.byYearSavedCosts.reduce((acc, curr) => acc + curr, 0) + this.compensation20Years;
|
|
221
|
+
this.costSavings = result.byYearSavedCosts[0];
|
|
222
|
+
this.autonomy = result.autonomy * 100;
|
|
223
|
+
this.totalEnergyConsumption = result.totalEnergyConsumptionDay * 365;
|
|
224
|
+
// Calculate total energy production based on compensation and rate
|
|
225
|
+
this.totalEnergyProduction = result.totalEnergyProduction * 365;
|
|
226
|
+
}
|
|
227
|
+
componentWillLoad() {
|
|
228
|
+
this.updateSystemConfigs();
|
|
229
|
+
}
|
|
230
|
+
validateForm() {
|
|
231
|
+
let isValid = true;
|
|
232
|
+
const t = getLanguageStrings(state.settings.language);
|
|
233
|
+
// Validate name
|
|
234
|
+
if (!this.name.trim()) {
|
|
235
|
+
this.nameError = t.solarSystemForm.nameError;
|
|
236
|
+
isValid = false;
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
this.nameError = "";
|
|
240
|
+
}
|
|
241
|
+
// Validate email
|
|
242
|
+
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
243
|
+
if (!this.email.trim()) {
|
|
244
|
+
this.emailError = t.solarSystemForm.emailError;
|
|
245
|
+
isValid = false;
|
|
246
|
+
}
|
|
247
|
+
else if (!emailRegex.test(this.email)) {
|
|
248
|
+
this.emailError = t.solarSystemForm.validEmailError;
|
|
249
|
+
isValid = false;
|
|
250
|
+
}
|
|
251
|
+
else {
|
|
252
|
+
this.emailError = "";
|
|
253
|
+
}
|
|
254
|
+
// Validate phone (optional)
|
|
255
|
+
const phoneRegex = /^[\+]?[1-9][\d]{0,15}$/;
|
|
256
|
+
if (this.phone.trim() &&
|
|
257
|
+
!phoneRegex.test(this.phone.replace(/[\s\-\(\)]/g, ""))) {
|
|
258
|
+
this.phoneError = t.solarSystemForm.phoneError;
|
|
259
|
+
isValid = false;
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
this.phoneError = "";
|
|
263
|
+
}
|
|
264
|
+
return isValid;
|
|
265
|
+
}
|
|
266
|
+
async handleRequestOffer() {
|
|
267
|
+
if (!this.validateForm()) {
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
this.isSubmitting = true;
|
|
271
|
+
this.submitMessage = "";
|
|
272
|
+
this.submitSuccess = false;
|
|
273
|
+
const t = getLanguageStrings(state.settings.language);
|
|
274
|
+
try {
|
|
275
|
+
const leadData = {
|
|
276
|
+
location: {
|
|
277
|
+
name: state.location,
|
|
278
|
+
latitude: state.latitude,
|
|
279
|
+
longitude: state.longitude,
|
|
280
|
+
},
|
|
281
|
+
systemConfig: {
|
|
282
|
+
maxNumberOfPanels: this.maxPanels,
|
|
283
|
+
panelPeakPower: this.panelPeakPower,
|
|
284
|
+
polygons: this.polygons,
|
|
285
|
+
solarSystems: this.systemConfigs,
|
|
286
|
+
electricityPrice: this.electricityPrice,
|
|
287
|
+
compensationRate: this.compensationRate,
|
|
288
|
+
annualPriceIncrease: this.annualPriceIncrease,
|
|
289
|
+
},
|
|
290
|
+
client: {
|
|
291
|
+
name: this.name,
|
|
292
|
+
email: this.email,
|
|
293
|
+
phone: this.phone,
|
|
294
|
+
consumption: this.householdConsumption,
|
|
295
|
+
consumptionProfile: this.consumptionProfile,
|
|
296
|
+
hasBattery: this.batteryEnabled,
|
|
297
|
+
battery: this.battery,
|
|
298
|
+
hasHeatPump: this.heatPump > 0,
|
|
299
|
+
heatPumpM2: this.heatPump,
|
|
300
|
+
hasElectricCar: this.electricCar,
|
|
301
|
+
electricCarChargingTime: this.electricCarChargingTime,
|
|
302
|
+
electricCarKmPerYear: this.kmDrivenPerYear,
|
|
303
|
+
},
|
|
304
|
+
images: {
|
|
305
|
+
roof: this.roofCanvas.toDataURL(),
|
|
306
|
+
polygon: this.polygonCanvas.toDataURL(),
|
|
307
|
+
},
|
|
308
|
+
results: {
|
|
309
|
+
autonomy: this.autonomy,
|
|
310
|
+
costSavings: this.costSavings,
|
|
311
|
+
compensation20Years: this.compensation20Years,
|
|
312
|
+
savedCosts20Years: this.savedCosts20Years,
|
|
313
|
+
totalEnergyConsumption: this.totalEnergyConsumption,
|
|
314
|
+
},
|
|
315
|
+
};
|
|
316
|
+
console.log("leadData", leadData);
|
|
317
|
+
const result = await sendLeadToNexvoro(leadData);
|
|
318
|
+
this.submitSuccess = result.success;
|
|
319
|
+
if (result.success) {
|
|
320
|
+
console.log("Lead successfully sent to Nexvoro", result);
|
|
321
|
+
this.submitMessage = t.solarSystemForm.leadSubmitted;
|
|
322
|
+
// Optionally reset form or show success message
|
|
323
|
+
}
|
|
324
|
+
else {
|
|
325
|
+
console.error("Failed to send lead to Nexvoro:", result.message);
|
|
326
|
+
this.submitMessage = t.solarSystemForm.leadError;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
catch (error) {
|
|
330
|
+
console.error("Error in handleRequestOffer:", error);
|
|
331
|
+
this.submitSuccess = false;
|
|
332
|
+
this.submitMessage = error instanceof Error
|
|
333
|
+
? error.message
|
|
334
|
+
: "An unexpected error occurred";
|
|
335
|
+
}
|
|
336
|
+
finally {
|
|
337
|
+
this.isSubmitting = false;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
isIOS() {
|
|
341
|
+
return state.isIOS;
|
|
342
|
+
}
|
|
343
|
+
render() {
|
|
344
|
+
const t = getLanguageStrings(state.settings.language);
|
|
345
|
+
// Reusable style objects
|
|
346
|
+
const borderStyle = { border: "1px solid var(--color-border)" };
|
|
347
|
+
const errorBorderStyle = { border: "1px solid var(--color-error)" };
|
|
348
|
+
return (h("div", { key: 'b3aac8c415b6f69f2853118cabc74601022d030b', class: "flex flex-col justify-center items-center w-full h-full pt-4" // style={{
|
|
349
|
+
,
|
|
350
|
+
// display: (Object.keys(this.systemConfigs).length === 0)
|
|
351
|
+
// ? "none"
|
|
352
|
+
// : "flex",
|
|
353
|
+
// }}
|
|
354
|
+
id: "solar-system-form" }, h("h1", { key: 'bc5cdebf33d124d8836da4e1088bba4450c816cd', class: "text-2xl font-bold text-secondary mb-4 w-full" }, t.solarSystemForm.title), h("div", { key: '3ab1cec7ed4bd186ba78f49c21917246c630df61', class: "w-full bg-primary rounded-4xl space-y-6" }, h("div", { key: 'c1a2dd948a840ff98d112d129317e5553f530147', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: '594a62add2fd8c6288bba7daa6a012756c1d4a10', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.systemInformation), h("div", { key: '5ac796f80e17307ca0fc3259e62b372e2fa12cc4', class: "flex flex-col sm:flex-row gap-4" }, h("div", { key: '9a4bfbceb41b31404fc9e38c69e4b4177a24ec44', class: "flex-1 bg-muted rounded-4xl p-4 space-y-3" }, h("div", { key: '6fc5982c6e841f73054c144a258648b54eb82498', class: "flex items-center justify-between" }, h("label", { key: '894e19c5be12317818b6637d5f250987d8cd621e', class: "text-sm font-medium text-text-muted" }, t.solarSystemForm.numberOfPanels), !this.isIOS()
|
|
355
|
+
? (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 }))
|
|
356
|
+
: (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) => {
|
|
357
|
+
const value = parseInt(e.target
|
|
358
|
+
.value);
|
|
359
|
+
if (value >= 1 &&
|
|
360
|
+
value <=
|
|
361
|
+
this.maxPanels) {
|
|
362
|
+
this.numberOfPanels =
|
|
363
|
+
value;
|
|
364
|
+
this.recalculate();
|
|
365
|
+
}
|
|
366
|
+
} }))), !this.isIOS() && (h("input", { key: '449fb7456001a4a4535cca861d2f6cb5e3524207', 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) => {
|
|
367
|
+
this.numberOfPanels = parseInt(e.target
|
|
368
|
+
.value);
|
|
369
|
+
if (isNaN(this.numberOfPanels)) {
|
|
370
|
+
this.numberOfPanels = 0;
|
|
371
|
+
}
|
|
372
|
+
this.recalculate();
|
|
373
|
+
} }))), h("div", { key: '170b71239b4ad1a31a60b07ad5bbbdbe3269b32a', class: "flex-1 bg-muted rounded-4xl p-4" }, h("div", { key: '23fb2ae75eea851bf70d0d45bd6a14ad0326337f', class: "flex items-center justify-between" }, h("label", { key: '22612c4214b995fa656d6cf12e8c45906fc66f5c', class: "text-sm font-medium text-text-muted" }, t.solarSystemForm.panelPeakPower), h("span", { key: '4b05f3ca41f9956242be5426ab1a99da3a377919', class: "text-text-muted" }, this.panelPeakPower.toFixed(2), " kW")), h("div", { key: 'ffdff42649f42580a90379f59c9fcc12377871ac', class: "flex items-center justify-between mt-4" }, h("span", { key: '328257ed6094505f7382fa05dea0d5b311a01c39', class: "text-sm font-medium text-text-muted" }, t.solarSystemForm.totalSystemPeakPower), h("span", { key: '72a1d3242113d6abf88a34e804c1f1b7de4de642', class: "font-bold text-text-muted" }, (DEFAULT_SOLAR_PANEL_TYPE.kWattPeak *
|
|
374
|
+
this.numberOfPanels).toFixed(1), " kWp"))))), h("div", { key: '5a75a286d0cf236a32486842bbf42630b063338a', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: '2ea2a85bd3ea2699371ad55bc2c307c12c9422fe', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.householdConsumptionTitle), h("div", { key: '5a0806013e7772a3999fb8c33e276d28e6433570', class: "grid grid-rows-2 gap-0" }, h("div", { key: 'df6798dad3f0db54eefb9fe725fdd5dc20ab0148', class: "grid grid-cols-2 gap-4" }, h("label", { key: '08c04771886ab1ed632b2d74414fc696d5c36d48', class: "block text-sm font-medium text-text-muted" }, t.solarSystemForm.annualConsumption), h("label", { key: '5f0f6fa2b92378fc99ca31438132e7b5fb384c5a', class: "block text-sm font-medium text-text-muted" }, t.solarSystemForm.consumptionProfileTitle)), h("div", { key: 'faf1efc7063c7dad129ee51be3942577d4eba3d2', class: "grid grid-cols-2 gap-4" }, h("input", { key: '39020b4fd4aa42cb60ce2ba4074daa6eff49317a', 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) => {
|
|
375
|
+
this.householdConsumption = parseInt(e.target
|
|
376
|
+
.value);
|
|
377
|
+
this.recalculate();
|
|
378
|
+
} }), h("select", { key: 'fbe2af24809a12043b9d1bfc23b0a480e378327b', 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) => {
|
|
379
|
+
this.consumptionProfile =
|
|
380
|
+
e.target
|
|
381
|
+
.value;
|
|
382
|
+
this.recalculate();
|
|
383
|
+
} }, h("option", { key: 'af56d4b4bc9d4623f03745a1bae46915e90b822b', value: "mostly_at_home", selected: this.consumptionProfile ===
|
|
384
|
+
"mostly_at_home" }, t.solarSystemForm.consumptionProfiles
|
|
385
|
+
.mostlyAtHome), h("option", { key: '03050dbc05259fd78693c68d736c65aea84c4692', value: "mostly_away", selected: this.consumptionProfile ===
|
|
386
|
+
"mostly_away" }, t.solarSystemForm.consumptionProfiles
|
|
387
|
+
.mostlyAway))))), h("div", { key: '398a347fe923ccf5c245237e4f923946ddccca2b', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: '017d2e0d7f9c6bf0960d48ea46e910e52f97ddf0', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.additionalComponents.title), h("div", { key: '8a4c0f966a4256fc34d4ea326e17494cb7c38d08', class: "flex flex-col gap-4" }, h("div", { key: '2802b69b3333ba6093824b4bce0bce34838beef0', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: '6eb56c4e1a05cc934539ff6834ef303f702d9230', class: "flex items-center justify-between" }, h("div", { key: '8672770642b35589cb5d2b70547545cda6436be8', class: "flex items-center gap-2" }, h("input", { key: '8cf94f816794f0d3fe9511241e33407d0db21cc9', 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) => {
|
|
388
|
+
this.heatPump =
|
|
389
|
+
e.target
|
|
390
|
+
.checked
|
|
391
|
+
? 100
|
|
392
|
+
: 0;
|
|
393
|
+
this.recalculate();
|
|
394
|
+
} }), h("label", { key: 'd068346b88585730a99bd8c64b86c0348c40f17d', htmlFor: "heatPump", class: "text-text-muted" }, t.solarSystemForm
|
|
395
|
+
.additionalComponents
|
|
396
|
+
.heatPump)), (this.heatPump > 0 && !this.isIOS()) && (h("span", { key: '16449a80ae506fd75a2b1c4bb53745ff2dfa9fc2', class: "text-text-muted" }, this.heatPump, " m\u00B2"))), this.heatPump > 0 && (h("div", { key: 'd64daeb593cd78c0b5a6a0c595b4ea68b6f58ecf', class: "flex flex-col gap-2" }, this.isIOS()
|
|
397
|
+
? (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) => {
|
|
398
|
+
let value = parseInt(e.target
|
|
399
|
+
.value);
|
|
400
|
+
if (isNaN(value)) {
|
|
401
|
+
value = 0;
|
|
402
|
+
}
|
|
403
|
+
if (value >= 0 &&
|
|
404
|
+
value <= 300) {
|
|
405
|
+
this.heatPump =
|
|
406
|
+
value;
|
|
407
|
+
this.recalculate();
|
|
408
|
+
}
|
|
409
|
+
} }), h("span", { class: "text-sm text-text-muted" }, "m\u00B2")))
|
|
410
|
+
: (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) => {
|
|
411
|
+
this.heatPump =
|
|
412
|
+
parseInt(e.target
|
|
413
|
+
.value);
|
|
414
|
+
this.recalculate();
|
|
415
|
+
} }))))), h("div", { key: '96e46b97840448e5d33351bb7550d29081b283ae', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: '8a5e9bfcbab6a380949cfb70aed04102e83524f9', class: "flex items-center justify-between" }, h("div", { key: '7bd3b892a195111d426571f4fd5ebc74ac8e4458', class: "flex items-center gap-2" }, h("input", { key: 'e0465348cd9edace9ea3f6d31b32c01130f599bf', 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) => {
|
|
416
|
+
this.electricCar =
|
|
417
|
+
e.target
|
|
418
|
+
.checked;
|
|
419
|
+
this.recalculate();
|
|
420
|
+
} }), h("label", { key: '632375d50fcc5d65b6755143fce0b0c6ecc1b9eb', htmlFor: "electricCar", class: "text-text-muted" }, t.solarSystemForm
|
|
421
|
+
.additionalComponents
|
|
422
|
+
.electricCar))), this.electricCar && (h("div", { key: 'ad61c2c776efe4d9ebba427b9077bffe0539845d', class: "flex flex-col gap-2" }, h("div", { key: '5cdebf71f86045d8fad0e34e9c1b3d509c7b009e', class: "grid grid-cols-2 gap-4" }, h("label", { key: 'cf81d88d2d88f6ae1b9a5024c2936876c3ef71fd', class: "text-sm text-text-muted" }, t.solarSystemForm
|
|
423
|
+
.additionalComponents
|
|
424
|
+
.chargingTime), h("label", { key: 'da1dcb1219717fb52575c597c4800d65bb961675', class: "text-sm text-text-muted" }, t.solarSystemForm
|
|
425
|
+
.additionalComponents
|
|
426
|
+
.kilometersPerYear)), h("div", { key: 'a2757d138453d73b7d8ec6e367e8c1de108ce034', class: "grid grid-cols-2 gap-4" }, h("select", { key: '37346901d46565768147d427051b5618f9e6b116', class: "w-full px-4 py-2 rounded-4xl focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", onChange: (e) => {
|
|
427
|
+
this.electricCarChargingTime =
|
|
428
|
+
e.target
|
|
429
|
+
.value;
|
|
430
|
+
this.recalculate();
|
|
431
|
+
}, style: borderStyle }, h("option", { key: 'd81865a15f17acd907c50cdcd78976065fa62652', value: "day", selected: this
|
|
432
|
+
.electricCarChargingTime ===
|
|
433
|
+
"day" }, t.solarSystemForm
|
|
434
|
+
.additionalComponents
|
|
435
|
+
.chargingTimeDay), h("option", { key: '210248d07239dd91b878b463029afb711da6f883', value: "night", selected: this
|
|
436
|
+
.electricCarChargingTime ===
|
|
437
|
+
"night" }, t.solarSystemForm
|
|
438
|
+
.additionalComponents
|
|
439
|
+
.chargingTimeNight)), h("input", { key: '7f34b587ffda5b9e075adbadd2a5f0bb4fbf5c49', 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) => {
|
|
440
|
+
this.kmDrivenPerYear =
|
|
441
|
+
parseInt(e.target
|
|
442
|
+
.value);
|
|
443
|
+
if (isNaN(this.kmDrivenPerYear)) {
|
|
444
|
+
this.kmDrivenPerYear =
|
|
445
|
+
0;
|
|
446
|
+
}
|
|
447
|
+
this.recalculate();
|
|
448
|
+
}, style: borderStyle }))))), h("div", { key: '04b6c11022c91d5f5156211b52f36436e5ee0e3a', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, h("div", { key: '75ec40dd3d6d82e7a347f51e7244934834cb1796', class: "flex items-center justify-between" }, h("div", { key: 'a656e188979e1a26756b1a0e253eb64045c0b6f4', class: "flex items-center gap-2" }, h("input", { key: 'daf0d7f659cbd8c6313a2b633b22853fa3ac1439', 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) => {
|
|
449
|
+
this.batteryEnabled =
|
|
450
|
+
e.target
|
|
451
|
+
.checked;
|
|
452
|
+
this.battery =
|
|
453
|
+
this.batteryEnabled
|
|
454
|
+
? 5
|
|
455
|
+
: 0;
|
|
456
|
+
this.recalculate();
|
|
457
|
+
} }), h("label", { key: '934f7b42b97134a6dcbdb566392a331a9824f4b9', htmlFor: "battery", class: "text-text-muted" }, t.solarSystemForm
|
|
458
|
+
.additionalComponents
|
|
459
|
+
.battery)), (this.batteryEnabled && !this.isIOS()) && (h("span", { key: '2b82db24bc6ea580b38a47720d39180727569fcf', class: "text-text-muted" }, this.battery, " kWh"))), this.batteryEnabled && (h("div", { key: '9cb0af19acffe8b6a22f8dab52d7b58748b89fa7', class: "flex flex-col gap-2" }, this.isIOS()
|
|
460
|
+
? (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) => {
|
|
461
|
+
let value = parseInt(e.target
|
|
462
|
+
.value);
|
|
463
|
+
if (isNaN(value)) {
|
|
464
|
+
value = 0;
|
|
465
|
+
}
|
|
466
|
+
if (value >= 0 &&
|
|
467
|
+
value <= 20) {
|
|
468
|
+
this.battery =
|
|
469
|
+
value;
|
|
470
|
+
}
|
|
471
|
+
else {
|
|
472
|
+
this.battery =
|
|
473
|
+
20;
|
|
474
|
+
}
|
|
475
|
+
this.recalculate();
|
|
476
|
+
}, style: borderStyle }), h("span", { class: "text-sm text-text-muted" }, "kWh")))
|
|
477
|
+
: (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) => {
|
|
478
|
+
const value = parseInt(e.target
|
|
479
|
+
.value);
|
|
480
|
+
this.battery = value;
|
|
481
|
+
this.batteryEnabled =
|
|
482
|
+
value > 0;
|
|
483
|
+
this.recalculate();
|
|
484
|
+
} }))))))), h("div", { key: 'ab35064c9f135bd5b0a3de1e8b58778773bb7183', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: 'f083142c6a3f5943f03f4c8c91e5b0191da2f18a', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.electricityCostsTitle), h("div", { key: '149f07c47577bfa66044711d00950d16f20b4daa', style: {
|
|
485
|
+
display: "grid",
|
|
486
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(100px, 1fr))",
|
|
487
|
+
gap: "1rem",
|
|
488
|
+
} }, h("div", { key: '7c0c06f3f5de6192ad6f88ca405bebc8164b776e' }, h("label", { key: '4e2624714478f92ee78cd826cb65976b4e1eedfe', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.electricityPrice), h("input", { key: 'c5ee3300484d227731ad4cf9ff156b1523262ce5', 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) => {
|
|
489
|
+
this.electricityPrice = parseFloat(e.target
|
|
490
|
+
.value);
|
|
491
|
+
this.recalculate();
|
|
492
|
+
} })), h("div", { key: '4220bc2ed90aac8e1ac60385872f10503aac2053' }, h("label", { key: '0b10f5c64eb7c77ea4895449726b19aa1450217f', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.compensationRate), h("input", { key: '794d102dfe59d68563e89b5da8ab5b93f66e9ccc', 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) => {
|
|
493
|
+
this.compensationRate = parseFloat(e.target
|
|
494
|
+
.value);
|
|
495
|
+
this.recalculate();
|
|
496
|
+
} })), h("div", { key: '10081bb97392c16a1d99e644cf4d392edee2ffd3' }, h("label", { key: '9727ffc2d1f89923cf0d569dd59f86868b54b723', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.annualPriceIncrease), h("input", { key: 'dca5fa0137b2366589d5adc68ce961c8084a1ea3', 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) => {
|
|
497
|
+
this.annualPriceIncrease = parseFloat(e.target
|
|
498
|
+
.value);
|
|
499
|
+
this.recalculate();
|
|
500
|
+
} })))), h("div", { key: 'ce396dfca25c42f00914f04db39aeb28465e3ed8', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: 'de2feec636ca79e02f9b895bea7ba35ba2dbe729', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.resultsTitle), h("div", { key: 'c0301e4286db317a049fe43f486db72c9c4632e6', class: "bg-muted rounded-4xl p-4" }, h("div", { key: 'f7eeb9506a80a2111681ba179b2570ae2f823188', class: "flex flex-col sm:flex-row sm:items-center justify-between" }, h("span", { key: '7384e4ef01cdf238dc584def68b9b82dabcf5f90', class: "text-text-muted" }, t.solarSystemForm.autonomy), h("span", { key: 'e015f0adf8216e61e823479687e62e1dc0cd1416', class: "text-xl font-bold text-secondary mt-1 sm:mt-0" }, this.autonomy > 100
|
|
501
|
+
? "100"
|
|
502
|
+
: this.formatEuropeanNumber(this.autonomy, 1), "%")), h("div", { key: '573898821896ccb941a4952db93e1ddcd02f1048', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("span", { key: 'acda47ca6f86a0059de4014c43e4c9da8cf8375a', class: "text-text-muted" }, t.solarSystemForm.totalEnergyConsumption), h("span", { key: 'c7a11736f29c94e9c12aeba2c4f8b4c9a90dabd2', class: "text-xl font-bold text-secondary mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.totalEnergyConsumption, 0), " kWh/", t.solarSystemForm.year)), h("div", { key: 'c2d7dd0636d540a2cfaadb46d51dcca2302a8948', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("span", { key: 'bd7c6d95d354688b6d82dda1d6da8cda06663a77', class: "text-text-muted" }, t.solarSystemForm.totalEnergyProduction), h("span", { key: '2f3a04b1649248b79945aa8fe87f4dfa4e17f074', class: "text-xl font-bold text-secondary mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.totalEnergyProduction, 0), " kWh/", t.solarSystemForm.year)), h("div", { key: 'd56b792fd2305eef5b79da1402a7595e788d6312', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("div", { key: '92deb1c8bfc0f4b30a70becbad935ab9f21c82f1', class: "flex items-center gap-2" }, h("span", { key: '0be5fbc8919d64438c098338731c3e3599b6a031', class: "text-text-muted" }, t.solarSystemForm.costSavings)), h("span", { key: '8693ccc59f8171aa5ac99cbf2c0e52e7a8e93b1c', class: "text-xl font-bold text-success mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.costSavings), " \u20AC/", t
|
|
503
|
+
.solarSystemForm.year)), h("div", { key: 'dcdfb4fd6f8599f3a8c680c460f4257365abb588', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("div", { key: '974783bd031dfb875215603e91a43fb324b64a59', class: "flex items-center gap-2" }, h("span", { key: '63453ca13b706b8f8d28471083f568433d938b29', class: "text-text-muted" }, t.solarSystemForm.compensation20Years)), h("span", { key: '4442d42f3f5fea6de6ebfe95eff0773b63384e37', class: "text-xl font-bold text-success mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.compensation20Years), " \u20AC")), h("div", { key: '1ef46e878482497336b6ea9ef07ea6b6b39ca568', class: "flex flex-col sm:flex-row sm:items-center justify-between mt-4" }, h("div", { key: 'b603edaa11df95af89dc40101a0501e95c272383', class: "flex items-center gap-2" }, h("span", { key: '8ad1f403369170986a4bb11f710f5f46a18f8bb9', class: "text-text-muted" }, t.solarSystemForm
|
|
504
|
+
.monetaryBenefit20Years)), h("span", { key: 'b02d50932181c8ce00c2ef8be4e1418814e145c6', class: "text-xl font-bold text-success mt-1 sm:mt-0" }, this.formatEuropeanNumber(this.savedCosts20Years), " \u20AC")))), h("div", { key: '8985466e01091bc03c45b0543c5ee26b5f5386db', class: "space-y-4 p-4 rounded-4xl", style: borderStyle }, h("h2", { key: '248f011371b5f188bc95347f4a6d38f85743526a', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.requestOffer), h("div", { key: 'c096a6fe9ff9b41f95b6481dead7af57ba961b72', style: {
|
|
505
|
+
display: "grid",
|
|
506
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(1 00px, 1fr))",
|
|
507
|
+
gap: "1rem",
|
|
508
|
+
} }, h("div", { key: '7f700d4bd04704f7aa29d47e739c36a6e54088a6' }, h("label", { key: 'f5668d862e0d487ee0b64899c766ffeed1c25072', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.name), h("input", { key: '9c676dafa8f27c193079f0dd6d68a991c69d4750', 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
|
|
509
|
+
? errorBorderStyle
|
|
510
|
+
: borderStyle, value: this.name, onInput: (e) => {
|
|
511
|
+
this.name =
|
|
512
|
+
e.target
|
|
513
|
+
.value;
|
|
514
|
+
this.validateForm();
|
|
515
|
+
}, placeholder: "Your name" }), this.nameError && (h("p", { key: '2ef2fd8d7e69f5039dde0b137568bd45b0e91a79', class: "text-error text-sm mt-1" }, this.nameError))), h("div", { key: 'a7f1d9da636f822aa3eb1936aca6bbb935267623' }, h("label", { key: 'b6eb2ccb8bd50afb00a68ad18efcd43e06a8f2bb', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.email), h("input", { key: '10beb1d64dfd3991e4d57c0504da0326eef9cf25', 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
|
|
516
|
+
? errorBorderStyle
|
|
517
|
+
: borderStyle, value: this.email, onInput: (e) => {
|
|
518
|
+
this.email =
|
|
519
|
+
e.target
|
|
520
|
+
.value;
|
|
521
|
+
this.validateForm();
|
|
522
|
+
}, placeholder: "your.email@example.com" }), this.emailError && (h("p", { key: 'a0740a7fb12f58639e519e89389c4c60c3a594b0', class: "text-error text-sm mt-1" }, this.emailError))), h("div", { key: '9ce5e139e2c4c0c88dff3f183a42f4966cf861b7' }, h("label", { key: '67f650c9ed7e38dcc0049f3ff7bac0427ca61942', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.phone), h("input", { key: '85eac1db16306e4342f3c52300fa8284e2ea1530', 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
|
|
523
|
+
? errorBorderStyle
|
|
524
|
+
: borderStyle, value: this.phone, onInput: (e) => {
|
|
525
|
+
this.phone =
|
|
526
|
+
e.target
|
|
527
|
+
.value;
|
|
528
|
+
this.validateForm();
|
|
529
|
+
}, placeholder: "+34 123 456 789" }), this.phoneError && (h("p", { key: 'a6d4c19718f0c822698df428c5541de8e851a7da', class: "text-error text-sm mt-1" }, this.phoneError)))), h("div", { key: '7ca3546cbf81c69d47087c2faa7d1f2e13eedfbd', class: "flex flex-col items-center gap-4" }, h("button", { key: 'ba107a8d0c9bc413c0962ccf8a5aad9d85882b9c', onClick: () => this.handleRequestOffer(), disabled: !this.name.trim() ||
|
|
530
|
+
!this.email.trim() || !!this.nameError ||
|
|
531
|
+
!!this.emailError || !!this.phoneError ||
|
|
532
|
+
this.isSubmitting, class: `px-6 py-3 rounded-4xl transition-colors duration-200 flex items-center gap-2 ${this.isSubmitting
|
|
533
|
+
? "bg-muted text-text-muted cursor-not-allowed"
|
|
534
|
+
: "bg-secondary hover:bg-tertiary"}`, style: {
|
|
535
|
+
color: this.isSubmitting
|
|
536
|
+
? "var(--color-text-muted)"
|
|
537
|
+
: "#ffffff",
|
|
538
|
+
} }, this.isSubmitting && (h("div", { key: '599bf6ba45b4f79760828b166451cad579ad99a4', class: "w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin" })), this.isSubmitting
|
|
539
|
+
? t.solarSystemForm.sending
|
|
540
|
+
: t.solarSystemForm.requestOfferButton), this.submitMessage && (h("div", { key: 'bff80e01d48c64a17f556446e68b17c7a061d0fb', class: `text-sm px-4 py-2 rounded-4xl ${this.submitSuccess
|
|
541
|
+
? "bg-success/10 text-success border border-success/20"
|
|
542
|
+
: "bg-error/10 text-error border border-error/20"}` }, this.submitMessage)))))));
|
|
543
|
+
}
|
|
544
|
+
static get watchers() { return {
|
|
545
|
+
"systemConfigs": ["updateSystemConfigs"]
|
|
546
|
+
}; }
|
|
547
|
+
};
|
|
548
|
+
SolarSystemForm.style = outputCss;
|
|
549
|
+
|
|
550
|
+
export { SolarSystemForm as solar_system_form };
|
|
551
|
+
//# sourceMappingURL=solar-system-form.entry.esm.js.map
|
|
552
|
+
|
|
553
|
+
//# sourceMappingURL=solar-system-form.entry.js.map
|