blue-chestnut-solar-expert 0.0.31 → 0.0.33

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.
Files changed (34) hide show
  1. package/dist/cjs/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.cjs.js.map +1 -1
  2. package/dist/cjs/eraser-icon_16.cjs.entry.js +117 -61
  3. package/dist/cjs/eraser-icon_16.cjs.entry.js.map +1 -1
  4. package/dist/collection/components/map-draw/map-draw.js +7 -7
  5. package/dist/collection/components/map-draw/map-draw.js.map +1 -1
  6. package/dist/collection/components/solar-expert/solar-expert.js +12 -4
  7. package/dist/collection/components/solar-expert/solar-expert.js.map +1 -1
  8. package/dist/collection/components/solar-system-form/solar-system-form.js +35 -25
  9. package/dist/collection/components/solar-system-form/solar-system-form.js.map +1 -1
  10. package/dist/collection/config.js +31 -0
  11. package/dist/collection/config.js.map +1 -1
  12. package/dist/collection/utils/theme.js +34 -26
  13. package/dist/collection/utils/theme.js.map +1 -1
  14. package/dist/components/map-draw.js +1 -1
  15. package/dist/components/{p-r9wMCtI3.js → p-ClYOM_0b.js} +10 -10
  16. package/dist/components/{p-r9wMCtI3.js.map → p-ClYOM_0b.js.map} +1 -1
  17. package/dist/components/{p-ao6bHDbv.js → p-CrzEBN9H.js} +69 -28
  18. package/dist/components/p-CrzEBN9H.js.map +1 -0
  19. package/dist/components/solar-expert.js +46 -31
  20. package/dist/components/solar-expert.js.map +1 -1
  21. package/dist/components/solar-system-form.js +1 -1
  22. package/dist/esm/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.js.map +1 -1
  23. package/dist/esm/eraser-icon_16.entry.js +117 -61
  24. package/dist/esm/eraser-icon_16.entry.js.map +1 -1
  25. package/dist/stencil-library/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.esm.js.map +1 -1
  26. package/dist/stencil-library/p-3d7da486.entry.js +2 -0
  27. package/dist/stencil-library/p-3d7da486.entry.js.map +1 -0
  28. package/dist/stencil-library/stencil-library.esm.js +1 -1
  29. package/dist/types/config.d.ts +1 -0
  30. package/dist/types/utils/theme.d.ts +7 -0
  31. package/package.json +1 -1
  32. package/dist/components/p-ao6bHDbv.js.map +0 -1
  33. package/dist/stencil-library/p-141320bb.entry.js +0 -2
  34. package/dist/stencil-library/p-141320bb.entry.js.map +0 -1
@@ -507,6 +507,37 @@ const DEFAULT_SOLAR_PANEL_TYPE = {
507
507
  efficiency: 0.224,
508
508
  price: 77.68,
509
509
  };
510
+ const DEFAULT_COLOR_SCHEME = {
511
+ primary: "hsl(41 51% 90%)",
512
+ primaryForeground: "hsl(0 0% 0%)",
513
+ secondary: "hsl(28 100% 8%)",
514
+ secondaryForeground: "hsl(0 0% 100%)",
515
+ tertiary: "hsl(28 100% 29%)",
516
+ tertiaryForeground: "hsl(0 0% 100%)",
517
+ muted: "hsl(0 0% 100%)",
518
+ mutedForeground: "hsl(0 0% 0%)",
519
+ error: "hsl(0 100% 50%)",
520
+ errorForeground: "hsl(0 0% 100%)",
521
+ // Surface colors
522
+ surface: "hsl(0 0% 88%)", // gray-200
523
+ surfaceHover: "hsl(0 0% 82%)", // gray-300
524
+ surfaceActive: "hsl(0 0% 64%)", // gray-400
525
+ // Text colors
526
+ textMuted: "hsl(0 0% 45%)", // gray-600
527
+ textSecondary: "hsl(0 0% 55%)", // gray-500
528
+ textPlaceholder: "hsl(0 0% 73%)", // gray-400
529
+ // Border colors
530
+ border: "hsl(0 0% 82%)", // gray-300
531
+ borderLight: "hsl(0 0% 93%)", // gray-200
532
+ // Status colors
533
+ success: "hsl(142 76% 36%)", // green-600
534
+ info: "hsl(221 83% 53%)", // blue-500
535
+ // Interactive colors
536
+ hover: "hsl(0 0% 88%)", // gray-200
537
+ hoverDark: "hsl(28 100% 8%)", // darker secondary for hover
538
+ overlay: "rgba(0, 0, 0, 0.24)", // #0000003c
539
+ tooltip: "hsl(0 0% 13%)", // gray-800
540
+ };
510
541
 
511
542
  function getFillColor(selectedPolygon, hoveredPolygon, _id, polygon, config) {
512
543
  const isHovered = hoveredPolygon?.type === polygon.type && hoveredPolygon?._id === _id;
@@ -2239,22 +2270,22 @@ const MapDraw = class {
2239
2270
  render() {
2240
2271
  const t = getLanguageStrings(state.settings.language);
2241
2272
  const currentPolygon = this.getCurrentPolygon();
2242
- return (index.h("div", { key: '8f3ead7eb4acb8b26cf9e8d3a7f9f1cb7027b06b', class: "flex flex-col justify-center items-center w-full h-full gap-4 bg-primary", id: "map-draw" }, this.showInstructions && !state.isMobile && (index.h("div", { key: '314f035a8f0bc087936041ec1249ddc12d27a43a', class: "w-full rounded-4xl p-4 bg-muted text-muted-foreground" }, t.mapDraw.instructions.parts.roof, " ", index.h("button", { key: '4b50b9afab6c7bfd180eedab22eaa7aed6346d26', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-surface-hover transition-colors", onClick: () => this.handleToolSelect(roofTool) }, index.h("icon-selector", { key: '980fb93346b72807638793a711c3adf4f6c60fb8', name: "house", inline: true })), " ", t.mapDraw.instructions.parts.obstruction, " ", index.h("button", { key: 'c1d0edac8cbb504c8db4c57d6bb078c4c2746cd9', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-surface-hover transition-colors", onClick: () => this.handleToolSelect(obstructionTool) }, index.h("icon-selector", { key: '12956e51ff2ed628980597746ee4853d93c7d19d', name: "octagon-minus", inline: true })), " ", t.mapDraw.instructions.parts.delete, " ", index.h("button", { key: 'fc0c507764c04fd1699024c00d708430a2275df1', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-surface-hover transition-colors", onClick: () => this.handleToolSelect(deleteTool) }, index.h("icon-selector", { key: 'aabac0ddf1c029655accf3f4812219cad3744da5', name: "eraser", inline: true })), " ", t.mapDraw.instructions.parts.move, " ", index.h("button", { key: '850f0261e7b1da12cc1cc2b81356ece9d8ea1df8', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-surface-hover transition-colors", onClick: () => this.handleToolSelect(moveTool) }, index.h("icon-selector", { key: 'a25004dca55e42a1e0f13806cdceb95d0f16c8b5', name: "move", inline: true })), " ", t.mapDraw.instructions.parts.end)), index.h("div", { key: '93e10a821a9d8ad5f6ad8c62bcf56a5c015ba6a3', class: "w-full flex flex-row justify-between items-center" }, !state.isMobile && (this.showInstructions
2273
+ return (index.h("div", { key: 'ebe7e96014e7ecb78818096b9cb391f07b9d06ec', class: "flex flex-col justify-center items-center w-full h-full gap-4", id: "map-draw" }, this.showInstructions && !state.isMobile && (index.h("div", { key: '70722b3127cefe195ccc74ab758de6ef8e032fde', class: "w-full rounded-4xl p-4 bg-muted text-muted-foreground" }, t.mapDraw.instructions.parts.roof, " ", index.h("button", { key: '10761447b11b001d74eb7386bdf0be80d53e091b', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-surface-hover transition-colors", onClick: () => this.handleToolSelect(roofTool) }, index.h("icon-selector", { key: '4e5ac604551002d38b1c44b35de01c37412c74e6', name: "house", inline: true })), " ", t.mapDraw.instructions.parts.obstruction, " ", index.h("button", { key: '9dc52e0b6006a10221834c8a9d83234f9db0d319', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-surface-hover transition-colors", onClick: () => this.handleToolSelect(obstructionTool) }, index.h("icon-selector", { key: '39ab111d5647f9981a5f5f91c45d925d46e3283d', name: "octagon-minus", inline: true })), " ", t.mapDraw.instructions.parts.delete, " ", index.h("button", { key: '8ad5281af91d5ee5597f957f59cd37027fbd505a', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-surface-hover transition-colors", onClick: () => this.handleToolSelect(deleteTool) }, index.h("icon-selector", { key: '096b570b0ffa3bda667157d960ed89193a1caa12', name: "eraser", inline: true })), " ", t.mapDraw.instructions.parts.move, " ", index.h("button", { key: 'f1cbb3cbf71b13be266abdd049c2fd9b89cde715', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-surface-hover transition-colors", onClick: () => this.handleToolSelect(moveTool) }, index.h("icon-selector", { key: 'd9c6ba2268ab4a175ec15260f22bb03b19b8255a', name: "move", inline: true })), " ", t.mapDraw.instructions.parts.end)), index.h("div", { key: '10ac3758660b337a60934def1c9f2f35f36e60c5', class: "w-full flex flex-row justify-between items-center" }, !state.isMobile && (this.showInstructions
2243
2274
  ? (index.h("button", { class: "px-4 py-2 rounded-4xl hover:bg-surface-hover transition-colors duration-200 bg-muted p-4 text-muted-foreground", onClick: () => this.showInstructions = false }, t.mapDraw.instructions.hide))
2244
- : (index.h("button", { class: "px-4 py-2 rounded-4xl hover:bg-surface-hover transition-colors duration-200 bg-muted p-4 text-muted-foreground", onClick: () => this.showInstructions = true }, t.mapDraw.instructions.show))), index.h("button", { key: '7f6ec4e11d855a38563b9bb8d56f6d4c215e78e9', class: "flex items-center gap-2 bg-muted p-2 rounded-4xl hover:bg-surface-hover text-muted-foreground", onClick: this.handleSettingsClick }, index.h("settings-icon", { key: '34055a481938812d55f65295b045879649f99c35' }))), index.h("div", { key: '3a4f6caf453ccde75e4a1b80fa1fc78c39c82206', class: "w-full" }, !state.isMobile && (index.h("tool-box", { key: '6f95e7ace22619ff9472220f8119f4187622060a', currentTool: this.currentTool, onToolSelect: (tool) => this.handleToolSelect(tool), undoCallback: () => this.undo() }))), this.loadingState === "empty" && (index.h("div", { key: '6849146204c0ce8c9a674e28325f0c98c57dc251', class: "w-full" }, index.h("p", { key: 'd9b52b653f98f4b2775c1c371d4e3a5f024a0242', class: "text-muted text-center flex items-center justify-center rounded-4xl p-4 w-full bg-text-secondary" }, t.mapDraw.noAddressSelected))), (state.latitude && state.longitude &&
2245
- this.loadingState === "loading") && (index.h("div", { key: '7507c117e5816158b407b506b2e2280de4979009', class: "flex items-center justify-center w-full bg-opacity-75 z-20 pt-7 rounded-4xl" }, index.h("div", { key: 'fc8351bd8d0c3f4f18d1ca5a6ed360f6d647c219', class: "animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-secondary" }))), index.h("div", { key: '6f90d40009a0e8ceba3b94c4bd1b1c2e32962168', class: "flex items-start justify-center h-full w-full bg-primary rounded-4xl" }, index.h("div", { key: '256ee7feb26d9045312c588888dddc5db72eaeaa', class: "relative h-full flex items-center justify-center w-full rounded-4xl bg-secondary", style: {
2275
+ : (index.h("button", { class: "px-4 py-2 rounded-4xl hover:bg-surface-hover transition-colors duration-200 bg-muted p-4 text-muted-foreground", onClick: () => this.showInstructions = true }, t.mapDraw.instructions.show))), index.h("button", { key: 'e88a3957add7e0c36222962266913148020a2dee', class: "flex items-center gap-2 bg-muted p-2 rounded-4xl hover:bg-surface-hover text-muted-foreground", onClick: this.handleSettingsClick }, index.h("settings-icon", { key: '31df69629e4309e8d95e939a04c2dbba1fbc03ed' }))), index.h("div", { key: 'f724a52fefacbe5b60bd165de16f56ed345dfd11', class: "w-full" }, !state.isMobile && (index.h("tool-box", { key: 'd2477fcbd40d1a446f65bc2b42157006dde73acb', currentTool: this.currentTool, onToolSelect: (tool) => this.handleToolSelect(tool), undoCallback: () => this.undo() }))), this.loadingState === "empty" && (index.h("div", { key: '964f8012fae92090fad9b52f7dd664a7359e4365', class: "w-full" }, index.h("p", { key: '6adde4c4f3e24ed586f43d3f162f60fa5612bcce', class: "text-muted text-center flex items-center justify-center rounded-4xl p-4 w-full bg-text-secondary" }, t.mapDraw.noAddressSelected))), (state.latitude && state.longitude &&
2276
+ this.loadingState === "loading") && (index.h("div", { key: 'c0dfd656c2633f0c49a2ecb26d15550eba64ffb5', class: "flex items-center justify-center w-full bg-opacity-75 z-20 pt-7 rounded-4xl" }, index.h("div", { key: 'abe70b554757acd75988d439c6877af09f198d29', class: "animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-secondary" }))), index.h("div", { key: '624e94cb3969d04ee6026353616ca39e772d1129', class: "flex items-start justify-center h-full w-full bg-primary rounded-4xl" }, index.h("div", { key: '43d96ad059a8b085f0d3b1a1fa6e1521da87410c', class: "relative h-full flex items-center justify-center w-full rounded-4xl bg-secondary", style: {
2246
2277
  aspectRatio: this.rgbTiff
2247
2278
  ? `${this.rgbTiff.width}/${this.rgbTiff.height}`
2248
2279
  : "1/1",
2249
- } }, index.h("canvas", { key: 'e4d3790a48ca3bb05106c93c1a0753e42168a6f0', ref: (el) => this.canvasElement = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", id: "map-draw-canvas", style: {
2280
+ } }, index.h("canvas", { key: '4b67bc938bcb9b25b4a52dd163fdba1a70324e63', ref: (el) => this.canvasElement = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", id: "map-draw-canvas", style: {
2250
2281
  cursor: this.currentTool.cursor,
2251
- } }), index.h("canvas", { key: '7831fb29a9b4bf1f396577ed9d2385dea40b4539', ref: (el) => this.polygonCanvas = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", style: {
2282
+ } }), index.h("canvas", { key: '2d549095d5a3af42a109ce043fd357d14309e311', ref: (el) => this.polygonCanvas = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", style: {
2252
2283
  cursor: this.currentTool.cursor,
2253
- } }))), currentPolygon?.closed && (index.h("div", { key: 'e703e5a2313f55d0dc08b8f44d63f469a91fd724', class: "w-full" }, index.h("polygon-buttons", { key: '1d679142b0f2223a76e29db21949841b94c96f81', currentTool: this.currentTool.name, calculateSolarPanels: () => this.calculateSolarPanels(), selectEdgeTool: () => this.handleToolSelect(markRoofEdgeTool) }))), !state.isMobile && (index.h("div", { key: 'bccf61ba5a86ad1b44a5b46d8c2b2027022dd8ba', class: "w-full" }, index.h("polygon-information", { key: 'bbd60623873d8c2249c5d7ab74e03a4bade998be', currentPolygon: currentPolygon, positionedPanels: currentPolygon
2284
+ } }))), currentPolygon?.closed && (index.h("div", { key: '8519b6421d6ef36672504f7d120bf170d7dbd6f0', class: "w-full" }, index.h("polygon-buttons", { key: '21e7b96ddb3d2a6add87d41a314a89d702a4dd42', currentTool: this.currentTool.name, calculateSolarPanels: () => this.calculateSolarPanels(), selectEdgeTool: () => this.handleToolSelect(markRoofEdgeTool) }))), !state.isMobile && (index.h("div", { key: '265211ded512cbe17a9aed997b439011b4d0b982', class: "w-full" }, index.h("polygon-information", { key: '923dd819af422124d5171a1199a2e852a466f54e', currentPolygon: currentPolygon, positionedPanels: currentPolygon
2254
2285
  ? this
2255
2286
  .roofPolygonsSolarPanels[currentPolygon._id]
2256
2287
  ?.positionedPanels
2257
- : undefined, handleAzimuthChange: (event) => this.handleAzimuthChange(event), handlePitchChange: (event) => this.handlePitchChange(event), calculateSolarPanels: () => this.calculateSolarPanels() }))), index.h("div", { key: '9b804506b0ed890f99ceaba92f18c87b06951728', class: "w-full" }, index.h("solar-system-form", { key: '5383943dde347f1b75f919f4817a8d33b4b66b92', systemConfigs: this.roofPolygonsSolarPanels, roofPolygons: this.roofPolygons, obstructionPolygons: this.obstructionPolygons })), this.showSettings && (index.h("settings-modal", { key: '2397b2ab774504e514db8b0fd9537d124dcb17ed', settings: state.settings, onClose: this.handleSettingsClose, onSave: this.handleSettingsSave }))));
2288
+ : undefined, handleAzimuthChange: (event) => this.handleAzimuthChange(event), handlePitchChange: (event) => this.handlePitchChange(event), calculateSolarPanels: () => this.calculateSolarPanels() }))), index.h("div", { key: 'bb8d6f3fb719403814fba5871a9fcdc923ee9255', class: "w-full" }, index.h("solar-system-form", { key: 'eb6423fd823816992fe10a9a457018afe08fb0ca', systemConfigs: this.roofPolygonsSolarPanels, roofPolygons: this.roofPolygons, obstructionPolygons: this.obstructionPolygons })), this.showSettings && (index.h("settings-modal", { key: 'f00648d12379fb6738168706ac8326587b613c8f', settings: state.settings, onClose: this.handleSettingsClose, onSave: this.handleSettingsSave }))));
2258
2289
  }
2259
2290
  static get watchers() { return {
2260
2291
  "rgbTiff": ["drawMap"],
@@ -2594,84 +2625,92 @@ SettingsModal.style = outputCss$4;
2594
2625
  * @param colorScheme - The color scheme object containing theme colors
2595
2626
  */
2596
2627
  function applyThemeGlobally(colorScheme) {
2597
- const documentElement = document.documentElement;
2598
- // Set CSS custom properties on the document root
2628
+ applyThemeToElement(document.documentElement, colorScheme);
2629
+ }
2630
+ /**
2631
+ * Applies a color scheme theme to a specific element (useful for Shadow DOM).
2632
+ *
2633
+ * @param element - The element to apply the theme to (e.g., Shadow DOM host)
2634
+ * @param colorScheme - The color scheme object containing theme colors
2635
+ */
2636
+ function applyThemeToElement(element, colorScheme) {
2637
+ // Set CSS custom properties on the specified element
2599
2638
  if (colorScheme.primary) {
2600
- documentElement.style.setProperty('--color-primary', colorScheme.primary);
2639
+ element.style.setProperty('--color-primary', colorScheme.primary);
2601
2640
  }
2602
2641
  if (colorScheme.primaryForeground) {
2603
- documentElement.style.setProperty('--color-primary-foreground', colorScheme.primaryForeground);
2642
+ element.style.setProperty('--color-primary-foreground', colorScheme.primaryForeground);
2604
2643
  }
2605
2644
  if (colorScheme.secondary) {
2606
- documentElement.style.setProperty('--color-secondary', colorScheme.secondary);
2645
+ element.style.setProperty('--color-secondary', colorScheme.secondary);
2607
2646
  }
2608
2647
  if (colorScheme.secondaryForeground) {
2609
- documentElement.style.setProperty('--color-secondary-foreground', colorScheme.secondaryForeground);
2648
+ element.style.setProperty('--color-secondary-foreground', colorScheme.secondaryForeground);
2610
2649
  }
2611
2650
  if (colorScheme.tertiary) {
2612
- documentElement.style.setProperty('--color-tertiary', colorScheme.tertiary);
2651
+ element.style.setProperty('--color-tertiary', colorScheme.tertiary);
2613
2652
  }
2614
2653
  if (colorScheme.tertiaryForeground) {
2615
- documentElement.style.setProperty('--color-tertiary-foreground', colorScheme.tertiaryForeground);
2654
+ element.style.setProperty('--color-tertiary-foreground', colorScheme.tertiaryForeground);
2616
2655
  }
2617
2656
  if (colorScheme.muted) {
2618
- documentElement.style.setProperty('--color-muted', colorScheme.muted);
2657
+ element.style.setProperty('--color-muted', colorScheme.muted);
2619
2658
  }
2620
2659
  if (colorScheme.mutedForeground) {
2621
- documentElement.style.setProperty('--color-muted-foreground', colorScheme.mutedForeground);
2660
+ element.style.setProperty('--color-muted-foreground', colorScheme.mutedForeground);
2622
2661
  }
2623
2662
  if (colorScheme.error) {
2624
- documentElement.style.setProperty('--color-error', colorScheme.error);
2663
+ element.style.setProperty('--color-error', colorScheme.error);
2625
2664
  }
2626
2665
  if (colorScheme.errorForeground) {
2627
- documentElement.style.setProperty('--color-error-foreground', colorScheme.errorForeground);
2666
+ element.style.setProperty('--color-error-foreground', colorScheme.errorForeground);
2628
2667
  }
2629
2668
  // Surface colors
2630
2669
  if (colorScheme.surface) {
2631
- documentElement.style.setProperty('--color-surface', colorScheme.surface);
2670
+ element.style.setProperty('--color-surface', colorScheme.surface);
2632
2671
  }
2633
2672
  if (colorScheme.surfaceHover) {
2634
- documentElement.style.setProperty('--color-surface-hover', colorScheme.surfaceHover);
2673
+ element.style.setProperty('--color-surface-hover', colorScheme.surfaceHover);
2635
2674
  }
2636
2675
  if (colorScheme.surfaceActive) {
2637
- documentElement.style.setProperty('--color-surface-active', colorScheme.surfaceActive);
2676
+ element.style.setProperty('--color-surface-active', colorScheme.surfaceActive);
2638
2677
  }
2639
2678
  // Text colors
2640
2679
  if (colorScheme.textMuted) {
2641
- documentElement.style.setProperty('--color-text-muted', colorScheme.textMuted);
2680
+ element.style.setProperty('--color-text-muted', colorScheme.textMuted);
2642
2681
  }
2643
2682
  if (colorScheme.textSecondary) {
2644
- documentElement.style.setProperty('--color-text-secondary', colorScheme.textSecondary);
2683
+ element.style.setProperty('--color-text-secondary', colorScheme.textSecondary);
2645
2684
  }
2646
2685
  if (colorScheme.textPlaceholder) {
2647
- documentElement.style.setProperty('--color-text-placeholder', colorScheme.textPlaceholder);
2686
+ element.style.setProperty('--color-text-placeholder', colorScheme.textPlaceholder);
2648
2687
  }
2649
2688
  // Border colors
2650
2689
  if (colorScheme.border) {
2651
- documentElement.style.setProperty('--color-border', colorScheme.border);
2690
+ element.style.setProperty('--color-border', colorScheme.border);
2652
2691
  }
2653
2692
  if (colorScheme.borderLight) {
2654
- documentElement.style.setProperty('--color-border-light', colorScheme.borderLight);
2693
+ element.style.setProperty('--color-border-light', colorScheme.borderLight);
2655
2694
  }
2656
2695
  // Status colors
2657
2696
  if (colorScheme.success) {
2658
- documentElement.style.setProperty('--color-success', colorScheme.success);
2697
+ element.style.setProperty('--color-success', colorScheme.success);
2659
2698
  }
2660
2699
  if (colorScheme.info) {
2661
- documentElement.style.setProperty('--color-info', colorScheme.info);
2700
+ element.style.setProperty('--color-info', colorScheme.info);
2662
2701
  }
2663
2702
  // Interactive colors
2664
2703
  if (colorScheme.hover) {
2665
- documentElement.style.setProperty('--color-hover', colorScheme.hover);
2704
+ element.style.setProperty('--color-hover', colorScheme.hover);
2666
2705
  }
2667
2706
  if (colorScheme.hoverDark) {
2668
- documentElement.style.setProperty('--color-hover-dark', colorScheme.hoverDark);
2707
+ element.style.setProperty('--color-hover-dark', colorScheme.hoverDark);
2669
2708
  }
2670
2709
  if (colorScheme.overlay) {
2671
- documentElement.style.setProperty('--color-overlay', colorScheme.overlay);
2710
+ element.style.setProperty('--color-overlay', colorScheme.overlay);
2672
2711
  }
2673
2712
  if (colorScheme.tooltip) {
2674
- documentElement.style.setProperty('--color-tooltip', colorScheme.tooltip);
2713
+ element.style.setProperty('--color-tooltip', colorScheme.tooltip);
2675
2714
  }
2676
2715
  }
2677
2716
 
@@ -2740,7 +2779,11 @@ const SolarExpert = class {
2740
2779
  state.settings.language = this.language;
2741
2780
  const isIPhone = navigator.userAgent.indexOf("iPhone") != -1;
2742
2781
  const isMac = navigator.userAgent.indexOf("Mac OS") != -1;
2743
- state.isIOS = isIPhone || isMac;
2782
+ state.isIOS = isIPhone || isMac || true;
2783
+ if (!this.colorScheme) {
2784
+ applyThemeToElement(this.el, DEFAULT_COLOR_SCHEME);
2785
+ applyThemeGlobally(DEFAULT_COLOR_SCHEME);
2786
+ }
2744
2787
  this.applyTheme();
2745
2788
  }
2746
2789
  colorSchemeChanged() {
@@ -2748,7 +2791,10 @@ const SolarExpert = class {
2748
2791
  }
2749
2792
  applyTheme() {
2750
2793
  if (this.colorScheme) {
2794
+ // Apply theme globally for non-shadow components
2751
2795
  applyThemeGlobally(this.colorScheme);
2796
+ // Apply theme to this component's Shadow DOM host element
2797
+ applyThemeToElement(this.el, this.colorScheme);
2752
2798
  }
2753
2799
  }
2754
2800
  async loadGoogleMapsScript() {
@@ -2797,9 +2843,9 @@ const SolarExpert = class {
2797
2843
  }
2798
2844
  render() {
2799
2845
  const t = getLanguageStrings(this.language);
2800
- return (index.h("div", { key: '6efda59f1262e16b8490d167b0555a0b52ecaed1', class: "flex flex-col w-full h-full p-3 m-auto", id: "solar-calculator" }, this.showMapSelector
2846
+ return (index.h("div", { key: '8b0622ee8ebeea53897b0dac8a0bdd12950d1d72', class: "flex flex-col w-full h-full p-3 m-auto", id: "solar-calculator" }, this.showMapSelector
2801
2847
  ? (index.h("map-selector", { "api-key": this.apiKey, language: this.language }))
2802
- : (index.h(index.h.Fragment, null, index.h("div", { class: "pb-3 flex flex-row gap-4 items-stretch w-full bg-primary" }, index.h("div", { class: "relative flex-3" }, index.h("div", { class: "absolute left-3 top-0 h-full flex items-center text-muted-foreground pointer-events-none" }, index.h("search-icon", null)), index.h("input", { ref: (el) => this.inputElement = el, type: "text", placeholder: t.solarExpert
2848
+ : (index.h(index.h.Fragment, null, index.h("div", { class: "pb-3 flex flex-row gap-4 items-stretch w-full" }, index.h("div", { class: "relative flex-3" }, index.h("div", { class: "absolute left-3 top-0 h-full flex items-center text-muted-foreground pointer-events-none" }, index.h("search-icon", null)), index.h("input", { ref: (el) => this.inputElement = el, type: "text", placeholder: t.solarExpert
2803
2849
  .searchPlaceholder, class: "w-full pl-10 pr-4 py-2 border border-border rounded-4xl focus:ring-secondary bg-muted text-muted-foreground h-full" })), index.h("button", { onClick: () => this.handleChooseOnMap(), class: "flex-1 pl-4 pr-4 py-2 border border-border bg-muted rounded-4xl focus:ring-secondary hover:bg-secondary hover:text-muted" }, t.mapSelector.chooseOnMap)), index.h("map-draw", { apiKey: this.apiKey })))));
2804
2850
  }
2805
2851
  static get watchers() { return {
@@ -3122,17 +3168,19 @@ const SolarSystemForm = class {
3122
3168
  "mostly_at_home" }, t.solarSystemForm.consumptionProfiles
3123
3169
  .mostlyAtHome), index.h("option", { key: 'a713af601a9a122e83a7610df91dc87046c32684', value: "mostly_away", selected: this.consumptionProfile ===
3124
3170
  "mostly_away" }, t.solarSystemForm.consumptionProfiles
3125
- .mostlyAway))))), index.h("div", { key: 'e22302c5432e13704827226a9348eb5135fbd168', class: "space-y-4" }, index.h("h2", { key: '22ff557a03b832de10382cbd9e2934f1e40f48c1', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.additionalComponents.title), index.h("div", { key: '8dc84f2bee4d59e5a9024b252a990a6d86729bfa', class: "flex flex-col gap-4" }, index.h("div", { key: 'dfa92f5717a77e1f1d2bb6549ae38ce02aaccb7c', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, index.h("div", { key: '70a5a4390c42cd96d5ea7238842bc9a30e387d24', class: "flex items-center justify-between" }, index.h("div", { key: 'c6454e366f5086e6ca7964b2d41561a4f422ed1a', class: "flex items-center gap-2" }, index.h("input", { key: '1f382765d018c4e24d949482e1d203b91ec2dfa3', type: "checkbox", id: "heatPump", class: "w-4 h-4 accent-tertiary border-gray-300 rounded-full focus:ring-tertiary focus:ring-offset-0 focus:ring-2", checked: this.heatPump > 0, onChange: (e) => {
3171
+ .mostlyAway))))), index.h("div", { key: 'e22302c5432e13704827226a9348eb5135fbd168', class: "space-y-4" }, index.h("h2", { key: '22ff557a03b832de10382cbd9e2934f1e40f48c1', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.additionalComponents.title), index.h("div", { key: '8dc84f2bee4d59e5a9024b252a990a6d86729bfa', class: "flex flex-col gap-4" }, index.h("div", { key: 'dfa92f5717a77e1f1d2bb6549ae38ce02aaccb7c', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, index.h("div", { key: '70a5a4390c42cd96d5ea7238842bc9a30e387d24', class: "flex items-center justify-between" }, index.h("div", { key: 'c6454e366f5086e6ca7964b2d41561a4f422ed1a', class: "flex items-center gap-2" }, index.h("input", { key: '2e1d3ebd2908ded2959392bee1a08c268e34d612', 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) => {
3126
3172
  this.heatPump =
3127
3173
  e.target
3128
3174
  .checked
3129
3175
  ? 100
3130
3176
  : 0;
3131
3177
  this.recalculate();
3132
- } }), index.h("label", { key: '3d3bcbaddc2483d60637934cb8e0a5398b05f633', htmlFor: "heatPump", class: "text-text-muted" }, t.solarSystemForm
3178
+ } }), index.h("label", { key: '11a45cadaf1bc2c8661da788eca3c7d0e2560e13', htmlFor: "heatPump", class: "text-text-muted" }, t.solarSystemForm
3133
3179
  .additionalComponents
3134
- .heatPump)), (this.heatPump > 0 && !this.isIOS()) && (index.h("span", { key: 'afe05b6c84fb68e4345fdb0a9c70fbf1fcaae9d6', class: "text-text-muted" }, this.heatPump, " m\u00B2"))), this.heatPump > 0 && (index.h("div", { key: '9c3da7f679166ccd999b65d46e8e95fad6e2f8d6', class: "flex flex-col gap-2" }, this.isIOS()
3135
- ? (index.h("div", { class: "flex items-center gap-2" }, index.h("input", { type: "number", min: "10", max: "300", step: "10", class: "flex-1 px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.heatPump, onInput: (e) => {
3180
+ .heatPump)), (this.heatPump > 0 && !this.isIOS()) && (index.h("span", { key: '1f8bd12df9d5e0357afd755c83d1cf592b6b5384', class: "text-text-muted" }, this.heatPump, " m\u00B2"))), this.heatPump > 0 && (index.h("div", { key: '1fdd01ffe44f75daf94e5c9b716519d1636f6e3a', class: "flex flex-col gap-2" }, this.isIOS()
3181
+ ? (index.h("div", { class: "flex items-center gap-2" }, index.h("input", { type: "number", min: "10", max: "300", step: "10", class: "flex-1 px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", style: {
3182
+ border: "1px solid var(--color-border)",
3183
+ }, value: this.heatPump, onInput: (e) => {
3136
3184
  const value = parseInt(e.target
3137
3185
  .value);
3138
3186
  if (value >= 10 &&
@@ -3147,38 +3195,42 @@ const SolarSystemForm = class {
3147
3195
  parseInt(e.target
3148
3196
  .value);
3149
3197
  this.recalculate();
3150
- } }))))), index.h("div", { key: '6f2083075d0e40e0dcb679448f2b96dde1643da6', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, index.h("div", { key: '77a93f11a3c846f748fe6cd7b6b5ebd8c17bdcb3', class: "flex items-center justify-between" }, index.h("div", { key: 'd2f362806ba9a539218f31282f15e7faaf2aa646', class: "flex items-center gap-2" }, index.h("input", { key: 'd8f28f34a5d5724c6d4b140535e9479ff88a1600', type: "checkbox", id: "electricCar", class: "w-4 h-4 accent-tertiary border-gray-300 rounded focus:ring-tertiary focus:ring-offset-0 focus:ring-2", checked: this.electricCar, onChange: (e) => {
3198
+ } }))))), index.h("div", { key: '94b4d3e5d6bea8994012b3500160780796338202', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, index.h("div", { key: '880a456c5d9916a467be761ffb6d48a0ac702095', class: "flex items-center justify-between" }, index.h("div", { key: '7ee0b35d4b616af184dd94ec11e2e5cba538aacd', class: "flex items-center gap-2" }, index.h("input", { key: 'cebabbd261270049b52c3e471e8a02588c41af5f', 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) => {
3151
3199
  this.electricCar =
3152
3200
  e.target
3153
3201
  .checked;
3154
3202
  this.recalculate();
3155
- } }), index.h("label", { key: 'd4c598d484a9e3da63eff6cd811db8049cccb3eb', htmlFor: "electricCar", class: "text-text-muted" }, t.solarSystemForm
3203
+ } }), index.h("label", { key: 'a922eeb0abc8731c0410c308a3ea55d93961dfaf', htmlFor: "electricCar", class: "text-text-muted" }, t.solarSystemForm
3156
3204
  .additionalComponents
3157
- .electricCar))), this.electricCar && (index.h("div", { key: '751c30033bf00abcef925ceb980a95805a21df31', class: "flex flex-col gap-2" }, index.h("div", { key: '63d33a0f5e3f84e8a6194fc43c5e5df802c67fad', class: "grid grid-cols-2 gap-4" }, index.h("label", { key: '71ae1e3f6cd9958b031063c0e926512d289aafda', class: "text-sm text-text-muted" }, t.solarSystemForm
3205
+ .electricCar))), this.electricCar && (index.h("div", { key: '0c78c7f3176a0f6ab9c41c9876cf1a035877c798', class: "flex flex-col gap-2" }, index.h("div", { key: '722f0f8c09f037d75c7721c0bd7141da781f3c0c', class: "grid grid-cols-2 gap-4" }, index.h("label", { key: '258ee50ded063df8322520e2fdc7c7891b673c66', class: "text-sm text-text-muted" }, t.solarSystemForm
3158
3206
  .additionalComponents
3159
- .chargingTime), index.h("label", { key: '78fff69c03333669afa3b4b6bf38ec5ba3a1bf44', class: "text-sm text-text-muted" }, t.solarSystemForm
3207
+ .chargingTime), index.h("label", { key: '7ae9cfa77cd8ced89d1598ef09fcc4772133695e', class: "text-sm text-text-muted" }, t.solarSystemForm
3160
3208
  .additionalComponents
3161
- .kilometersPerYear)), index.h("div", { key: '3d74c92eb5a96352367172678eeb904841200bb4', class: "grid grid-cols-2 gap-4" }, index.h("select", { key: 'c024a076838f044c4b9c1079191f9511d61392b6', class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", onChange: (e) => {
3209
+ .kilometersPerYear)), index.h("div", { key: '1f9244bd861b20278eec8cbca21cf611a7b923f6', class: "grid grid-cols-2 gap-4" }, index.h("select", { key: '39022b4df361b6efb4f57057b27dc5419cc533be', class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", onChange: (e) => {
3162
3210
  this.electricCarChargingTime =
3163
3211
  e.target
3164
3212
  .value;
3165
3213
  this.recalculate();
3166
- } }, index.h("option", { key: '039b58a3c2704da605440cc66ef557e37831ad1b', value: "day", selected: this
3214
+ }, style: {
3215
+ border: "1px solid var(--color-border)",
3216
+ } }, index.h("option", { key: '3ac38d888755fe1ff1bbcdee4ac2ecbfbd51b8a6', value: "day", selected: this
3167
3217
  .electricCarChargingTime ===
3168
3218
  "day" }, t.solarSystemForm
3169
3219
  .additionalComponents
3170
- .chargingTimeDay), index.h("option", { key: 'b12b7e92e147a7235972fb7ce0e405c7ecb1cf3c', value: "night", selected: this
3220
+ .chargingTimeDay), index.h("option", { key: 'a6a8cca9b5f127aa4331cc412ea56da2ddfa480e', value: "night", selected: this
3171
3221
  .electricCarChargingTime ===
3172
3222
  "night" }, t.solarSystemForm
3173
3223
  .additionalComponents
3174
- .chargingTimeNight)), index.h("input", { key: '0abd86805116e6e4959c818f44df19193a03d245', type: "number", min: "1000", max: "50000", step: "1000", class: "w-full px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.kmDrivenPerYear, onInput: (e) => {
3224
+ .chargingTimeNight)), index.h("input", { key: 'd44e83a3e68f29ffbcc8c21132c3c357f4025eba', type: "number", min: "1000", max: "50000", step: "1000", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.kmDrivenPerYear, onInput: (e) => {
3175
3225
  this.kmDrivenPerYear =
3176
3226
  parseInt(e.target
3177
3227
  .value);
3178
3228
  this.recalculate();
3179
- } }))))), index.h("div", { key: 'd39d320c00a3407937cafbf26b061f739de9627f', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, index.h("div", { key: 'a546eb35e60b97b47f1fa7836a547d257cd9de83', class: "flex items-center justify-between" }, index.h("label", { key: '5d8202dc51be638b862229918b0a24a2d0a9c7a7', class: "text-text-muted" }, t.solarSystemForm.additionalComponents
3180
- .battery), !this.isIOS() && (index.h("span", { key: 'f145a7be5e343edcf1fd9d66695ed05dbf9c0b82', class: "text-text-muted" }, this.battery, " kWh"))), index.h("div", { key: '088eed5b81f1d2c7ac9990c7c164b7744abe9371', class: "flex flex-col gap-2" }, this.isIOS()
3181
- ? (index.h("div", { class: "flex items-center gap-2" }, index.h("input", { type: "number", min: "0", max: "20", step: "1", class: "flex-1 px-4 py-2 rounded-4xl border border-gray-300 focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.battery, onInput: (e) => {
3229
+ }, style: {
3230
+ border: "1px solid var(--color-border)",
3231
+ } }))))), index.h("div", { key: '78887c816adeaeecd3503953e6079678ea5ffa8a', class: "flex flex-col bg-muted rounded-4xl p-4 gap-4" }, index.h("div", { key: '0f4e2b348c0e7e7789c7a2badfbddfbb668e4842', class: "flex items-center justify-between" }, index.h("label", { key: '5eaa71f1ae5a7c08bdbd3ee1b8ea18767738b9f0', class: "text-text-muted" }, t.solarSystemForm.additionalComponents
3232
+ .battery), !this.isIOS() && (index.h("span", { key: 'f627ed9f5b6004bedfc99fed880701783e1f6b8c', class: "text-text-muted" }, this.battery, " kWh"))), index.h("div", { key: 'ae29676644ea5884897912332204f8df2edcc913', class: "flex flex-col gap-2" }, this.isIOS()
3233
+ ? (index.h("div", { class: "flex items-center gap-2" }, index.h("input", { type: "number", min: "0", max: "20", step: "1", class: "flex-1 px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.battery, onInput: (e) => {
3182
3234
  const value = parseInt(e.target
3183
3235
  .value);
3184
3236
  if (value >= 0 &&
@@ -3187,42 +3239,46 @@ const SolarSystemForm = class {
3187
3239
  value;
3188
3240
  this.recalculate();
3189
3241
  }
3190
- }, placeholder: "Battery capacity" }), index.h("span", { class: "text-sm text-text-muted" }, "kWh")))
3242
+ }, placeholder: "Battery capacity", style: {
3243
+ border: "1px solid var(--color-border)",
3244
+ } }), index.h("span", { class: "text-sm text-text-muted" }, "kWh")))
3191
3245
  : (index.h("input", { type: "range", min: "0", max: "20", step: "1", class: "input-slider w-full custom-range appearance-none rounded-full bg-transparent [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-runnable-track]:bg-black/25 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:h-[10px] [&::-webkit-slider-thumb]:w-[10px] [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-muted", value: this.battery, onInput: (e) => {
3192
3246
  this.battery = parseInt(e.target
3193
3247
  .value);
3194
3248
  this.recalculate();
3195
- } })))))), index.h("div", { key: '7b6611e7d71f5219dad46bfcb6b29334df4c62b0', class: "space-y-4" }, index.h("h2", { key: 'e25ba45b8af1fc9c5430caa7628623bb06a877fb', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.electricityCostsTitle), index.h("div", { key: '13ee68eaa8e6272a76bd91f6faa4cbd49c828ba1', class: "grid grid-rows-2 gap-0" }, index.h("div", { key: '913ff149a4a1a55f42c19f28e6e36f9ca74f4166', class: "grid grid-cols-3 gap-4" }, index.h("label", { key: '8672c051c4a8c5498b73d5c5eb867875b394d560', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.electricityPrice), index.h("label", { key: 'd5b18879d3aaad25b0c87a07e0f5498f24ce6826', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.compensationRate), index.h("label", { key: 'aa901ab741db5f6d626235a35e86a84eeca71c5e', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.annualPriceIncrease)), index.h("div", { key: '82b41e70d26578e176fc223a7026ce7011870d99', class: "grid grid-cols-3 gap-4 text-primary-foreground" }, index.h("input", { key: '2f011ba06930555e240569925e547987d99f6145', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.electricityPrice.toFixed(2), onInput: (e) => {
3249
+ } })))))), index.h("div", { key: '3ff4f76e3998594832541e7c29b62fd066eb6b93', class: "space-y-4" }, index.h("h2", { key: '0d699ce4651eafa967464bd2d514e33e7d7594f5', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.electricityCostsTitle), index.h("div", { key: '2fbf7001ef764bbdfcebb68aee462b9015740e42', class: "grid grid-rows-2 gap-0" }, index.h("div", { key: '822c1a7ebde43a0e82d8e85a738f7c6d71d59312', class: "grid grid-cols-3 gap-4" }, index.h("label", { key: '7037f5005c69ca0fc06706190b2a14b0e65d0bab', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.electricityPrice), index.h("label", { key: 'c57af75b004add729b4ddddc118534b2fdb783bf', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.compensationRate), index.h("label", { key: 'd28f0391fc0e52f6a6bbe454302afd54493be80b', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.annualPriceIncrease)), index.h("div", { key: '237e6d85d909b1b08d00cdc3ce3c340513c9ffd8', class: "grid grid-cols-3 gap-4 text-primary-foreground" }, index.h("input", { key: '59ac48fca752b9fb654342ec2bde43599a8451b4', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.electricityPrice.toFixed(2), onInput: (e) => {
3196
3250
  this.electricityPrice = parseFloat(e.target
3197
3251
  .value);
3198
3252
  this.recalculate();
3199
- } }), index.h("input", { key: '5758c11a7cd2cecefd35bbcf9c41f0f02ec002d1', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.compensationRate.toFixed(2), onInput: (e) => {
3253
+ } }), index.h("input", { key: '3644ceacd7733d2f74ffc5891522d4dd1ab67851', type: "number", step: "0.01", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.compensationRate.toFixed(2), onInput: (e) => {
3200
3254
  this.compensationRate = parseFloat(e.target
3201
3255
  .value);
3202
3256
  this.recalculate();
3203
- } }), index.h("input", { key: '2b1cc87904290adee01c406d66b12e6f4e543bde', type: "number", step: "0.1", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.annualPriceIncrease.toFixed(1), onInput: (e) => {
3257
+ } }), index.h("input", { key: '8e453b5b7665c51a5bb8160132bbcc8da5bf5159', type: "number", step: "0.1", class: "w-full px-4 py-2 rounded-4xl border border-border focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted", value: this.annualPriceIncrease.toFixed(1), onInput: (e) => {
3204
3258
  this.annualPriceIncrease = parseFloat(e.target
3205
3259
  .value);
3206
3260
  this.recalculate();
3207
- } })))), index.h("div", { key: 'd8d28b0b38f3878f7f934d673b6a669b4e534b5f', class: "space-y-4 p-4 border border-border rounded-4xl" }, index.h("h2", { key: 'be8b0acb0adfc87e2afd9aa00388eb4a7f307c28', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.resultsTitle), index.h("div", { key: '61af5a2d0c8c1aaafbcd8ba41e1139640788a7d4', class: "bg-muted rounded-4xl p-4" }, index.h("div", { key: '0520e67bb0252d31fbfba488217547812cec00a3', class: "flex items-center justify-between" }, index.h("span", { key: 'c9d35867d975c98d01db75902c6813fd2fb9b767', class: "text-text-muted" }, t.solarSystemForm.autonomy), index.h("span", { key: '9ef18c401de3a992ef3a7f459617cfd4dd8c0a08', class: "text-xl font-bold text-secondary" }, this.autonomy > 100
3261
+ } })))), index.h("div", { key: '4282852c39dde81bdf5b54ad8ea4e0a8aefaaf18', class: "space-y-4 p-4 border border-border rounded-4xl", style: {
3262
+ border: "1px solid var(--color-border)",
3263
+ } }, index.h("h2", { key: '7fcfd93db114602d3c1250c0b9ad5c106e2118d0', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.resultsTitle), index.h("div", { key: 'aa0da43f3ef2daf8f9b3bb83e15493300dd3d795', class: "bg-muted rounded-4xl p-4" }, index.h("div", { key: '82b9f95d27582a7e6fabc92b5f8c4f94a7760773', class: "flex items-center justify-between" }, index.h("span", { key: 'ac3a20954389eafb4222de55a9c380c6e6911822', class: "text-text-muted" }, t.solarSystemForm.autonomy), index.h("span", { key: '42573f1d642adc6e7d81c2205d64659fd5690ec6', class: "text-xl font-bold text-secondary" }, this.autonomy > 100
3208
3264
  ? "100"
3209
- : this.autonomy.toFixed(1), "%")), index.h("div", { key: '712a70ea717175793ddd38699ca45b080dacd249', class: "flex items-center justify-between mt-4" }, index.h("div", { key: '920ca4c50cd5ddfff3ef2f1a5eeb8a52d158b5d2', class: "flex items-center gap-2" }, index.h("span", { key: 'b234a6f6cc8caab1c58ac0695e71b19fc0b1ad6e', class: "text-text-muted" }, t.solarSystemForm.costSavings), index.h("div", { key: '7887922d2aba3e543558c27f0f4aa20c4392eb57', class: "relative group" }, index.h("svg", { key: '3cdffe480bc305f06684e19df36d32d17de58f0c', xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-gray-400 cursor-help", viewBox: "0 0 20 20", fill: "currentColor" }, index.h("path", { key: '464a6fae13b003e308d4f125ef819a5356209d23', "fill-rule": "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z", "clip-rule": "evenodd" })), index.h("div", { key: '318bb50174b5f3dc673cc98e45e30ed0196c9519', class: "absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 w-64 p-2 bg-gray-800 text-muted text-sm rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none" }, t.solarSystemForm
3210
- .savingsDisclaimer))), index.h("span", { key: '3dcbca7e66dbcbcb25a877d70e792051beb20240', class: "text-xl font-bold text-success" }, this.costSavings.toFixed(2), "\u20AC/", t
3211
- .solarSystemForm.year)), index.h("div", { key: '3bb3f98d227d0713b6e653b3e4044a4c3be3c3d2', class: "flex items-center justify-between mt-4" }, index.h("div", { key: '5d24629acf34dea5fbc3efb19884a2e45c630cca', class: "flex items-center gap-2" }, index.h("span", { key: '5d04bf4f77832c39abacb35fb5615d4daf79169f', class: "text-text-muted" }, "Einspeiseverg\u00FCtung 25 Jahre")), index.h("span", { key: '03775d1ae0490de0c29521cc6a29202bae96aa45', class: "text-xl font-bold text-success" }, this.compensation25Years.toFixed(2), "\u20AC")), index.h("div", { key: '568c7b218f9ada6c41b79df6f484a1490942130d', class: "flex items-center justify-between mt-4" }, index.h("div", { key: '6e38b66476972658cdcf31f6585717ebb0462d15', class: "flex items-center gap-2" }, index.h("span", { key: '9681ea349b79467c0ed1c7c037844752943bb398', class: "text-text-muted" }, "Geldwerter Vorteil 25 Jahre")), index.h("span", { key: '1a0d41da8e4371e511cce0415c90ea02e27f2c9c', class: "text-xl font-bold text-success" }, this.savedCosts25Years.toFixed(2), "\u20AC")))), index.h("div", { key: '01a6cd62eedbdf7c4dcf428a0f5220d3596e8153', class: "space-y-4 pt-4" }, index.h("h2", { key: 'd9ed42522ca59b26096a6f3b71287e86ab7ad4a5', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.requestOffer), index.h("div", { key: 'd4d83942d4c345b7bc5ae31e48386a86422d7a35', class: "grid gap-4" }, index.h("div", { key: 'c74bf83f9cd2209c8c5eb539fe9bf3ebadf0d889', class: "grid grid-cols-2 gap-4" }, index.h("label", { key: '1855733a879c9f19e890dbb4348b068b7eddf0f1', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.name), index.h("label", { key: '0f79a4878df0754e9e5908706fc673bab57597ac', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.email)), index.h("div", { key: 'd33d202d2865fc2b9bf2006593c4a75b667e04fb', class: "grid grid-cols-2 gap-4" }, index.h("div", { key: 'aa6647a9573369cd7cc6515887aa8601e305f434' }, index.h("input", { key: '5a1ee29bae3f9b80d725e904f618fbbfdb595add', type: "text", class: `w-full px-4 py-2 rounded-4xl border ${this.nameError
3265
+ : this.autonomy.toFixed(1), "%")), index.h("div", { key: '7b7ca03f694682ada5f3156e065ffbebfe8a162e', class: "flex items-center justify-between mt-4" }, index.h("div", { key: '39f1d25e85ab1f3ff1ab9f06874cb1e3178f1707', class: "flex items-center gap-2" }, index.h("span", { key: '0c62c76a68fa8532240fe28333c1ce592ddc6787', class: "text-text-muted" }, t.solarSystemForm.costSavings), index.h("div", { key: 'fc6baa108a6fc38d70562d147488085c17b3376b', class: "relative group" }, index.h("svg", { key: 'd6806679a14d75f3e9ef72bd3ac352855f8b30ae', xmlns: "http://www.w3.org/2000/svg", class: "h-5 w-5 text-gray-400 cursor-help", viewBox: "0 0 20 20", fill: "currentColor" }, index.h("path", { key: '9033bbf13fa59641816338bca9ea3c2272b5dcc0', "fill-rule": "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z", "clip-rule": "evenodd" })), index.h("div", { key: '1fad5e3281d00c91bdb0a112e98279d5107ed76c', class: "absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 w-64 p-2 bg-gray-800 text-muted text-sm rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 pointer-events-none" }, t.solarSystemForm
3266
+ .savingsDisclaimer))), index.h("span", { key: 'a99bd5d3f22f39fbfce522e6e8b9fa65d1fc1785', class: "text-xl font-bold text-success" }, this.costSavings.toFixed(2), "\u20AC/", t
3267
+ .solarSystemForm.year)), index.h("div", { key: '8aeb935408cfa36788a5396dd8a0719e93216721', class: "flex items-center justify-between mt-4" }, index.h("div", { key: 'aa778aabdfe02aeea72ef37a0087cfb03adbef3d', class: "flex items-center gap-2" }, index.h("span", { key: '4bc1dd985b07e229c3293db4c4f3be74bd885cec', class: "text-text-muted" }, "Einspeiseverg\u00FCtung 25 Jahre")), index.h("span", { key: '4eb548881579db3bdffcf5c0bcd0630c19b6961e', class: "text-xl font-bold text-success" }, this.compensation25Years.toFixed(2), "\u20AC")), index.h("div", { key: '00d848e65e0a13d7278ca1cef2a8a6c0810cef08', class: "flex items-center justify-between mt-4" }, index.h("div", { key: 'e33274627fa4a5d71b35bbc030212810cd1ecc15', class: "flex items-center gap-2" }, index.h("span", { key: '45fb735ec260bbea7ad6101f7aacac4e7a1f3313', class: "text-text-muted" }, "Geldwerter Vorteil 25 Jahre")), index.h("span", { key: '2d7bc5f25a4491e00a1985c9bf255abdaef729dd', class: "text-xl font-bold text-success" }, this.savedCosts25Years.toFixed(2), "\u20AC")))), index.h("div", { key: '603eafb9e819e4a2da8f919c2de5a7e7ed7b6ac9', class: "space-y-4 pt-4" }, index.h("h2", { key: '50de58cd408c63518a3a1aeebc2168e603f8f537', class: "text-lg font-semibold text-secondary" }, t.solarSystemForm.requestOffer), index.h("div", { key: 'cc85f1661fba68643d3f043ff51b1c2070e5d32a', class: "grid gap-4" }, index.h("div", { key: '54040b2ac5cb46fc2bbdabdfb78f1d25fa521b2d', class: "grid grid-cols-2 gap-4" }, index.h("label", { key: '9404270bfbd58d022fafff6646ff1dbf68352617', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.name), index.h("label", { key: 'ee3bb80e18b29446630d10f49e94d3ce8e8e3f46', class: "block text-sm font-medium text-text-muted mb-1" }, t.solarSystemForm.email)), index.h("div", { key: '298da00d7046b6437b175f3eb8859281392d75dd', class: "grid grid-cols-2 gap-4" }, index.h("div", { key: '31b01646d5370285c8dc0d5470643cd679f1eaee' }, index.h("input", { key: '27764cb15c5150f8ddd5c50b7559fe807014d021', type: "text", class: `w-full px-4 py-2 rounded-4xl border ${this.nameError
3212
3268
  ? "border-error"
3213
3269
  : "border-border"} focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, value: this.name, onInput: (e) => {
3214
3270
  this.name =
3215
3271
  e.target
3216
3272
  .value;
3217
3273
  this.validateForm();
3218
- }, placeholder: "Your name" }), this.nameError && (index.h("p", { key: 'c0024d874a8e1970f6d8bd34112e096683c08ea4', class: "text-error text-sm mt-1" }, this.nameError))), index.h("div", { key: 'a4ca9e0bac3472d38b9b28e809e216c9d828a0fd' }, index.h("input", { key: '69a0d659a7a9bda7829d514f4844ff31d3f48f03', type: "email", class: `w-full px-4 py-2 rounded-4xl border ${this.emailError
3274
+ }, placeholder: "Your name" }), this.nameError && (index.h("p", { key: 'fa62eac9fc7f58f4b0505dc8398ae7447524ac4f', class: "text-error text-sm mt-1" }, this.nameError))), index.h("div", { key: '936b2091fc5f889f7c98f3bbe9c783ebfcf97030' }, index.h("input", { key: 'd7f4bf93bee30c5dc47c14143c527be562ccdbfd', type: "email", class: `w-full px-4 py-2 rounded-4xl border ${this.emailError
3219
3275
  ? "border-error"
3220
3276
  : "border-border"} focus:ring-2 focus:ring-tertiary focus:border-transparent bg-muted text-muted-foreground`, value: this.email, onInput: (e) => {
3221
3277
  this.email =
3222
3278
  e.target
3223
3279
  .value;
3224
3280
  this.validateForm();
3225
- }, placeholder: "your.email@example.com" }), this.emailError && (index.h("p", { key: '7295f592a6924b7a003ca96c5da296d1dc57486d', class: "text-error text-sm mt-1" }, this.emailError))))), index.h("div", { key: 'ee4dd4e554f25d0c2384f77d6845cf81990ba6db', class: "flex justify-center" }, index.h("button", { key: 'b931e29f4a2a27110ef0b014a745d35428982ef9', onClick: () => this.handleRequestOffer(), disabled: !this.name.trim() ||
3281
+ }, placeholder: "your.email@example.com" }), this.emailError && (index.h("p", { key: '32c8ca2e1de772c5c2072f52827393e0aad287f2', class: "text-error text-sm mt-1" }, this.emailError))))), index.h("div", { key: '5ac2456b1e783e86d21405db8b34ee22ad5e88f3', class: "flex justify-center" }, index.h("button", { key: 'f4b4e6d7490e01a29e4065747fe64dec7ca06f37', onClick: () => this.handleRequestOffer(), disabled: !this.name.trim() ||
3226
3282
  !this.email.trim() || !!this.nameError ||
3227
3283
  !!this.emailError, class: "px-4 py-2 bg-secondary rounded-4xl hover:bg-tertiary transition-colors duration-200 text-muted" }, t.solarSystemForm.requestOfferButton))))));
3228
3284
  }