blue-chestnut-solar-expert 0.0.18 → 0.0.20

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 (181) 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 -0
  2. package/dist/cjs/eraser-icon_16.cjs.entry.js +3124 -0
  3. package/dist/cjs/eraser-icon_16.cjs.entry.js.map +1 -0
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/loading-widget.cjs.entry.js +2 -2
  6. package/dist/cjs/loading-widget.cjs.entry.js.map +1 -1
  7. package/dist/cjs/loading-widget.entry.cjs.js.map +1 -1
  8. package/dist/cjs/solar-calculator.cjs.entry.js +2 -2
  9. package/dist/cjs/solar-calculator.cjs.entry.js.map +1 -1
  10. package/dist/cjs/solar-calculator.entry.cjs.js.map +1 -1
  11. package/dist/cjs/stencil-library.cjs.js +1 -1
  12. package/dist/collection/collection-manifest.json +1 -0
  13. package/dist/collection/components/icons/icon.js +3 -0
  14. package/dist/collection/components/icons/icon.js.map +1 -1
  15. package/dist/collection/components/icons/undo.js +64 -0
  16. package/dist/collection/components/icons/undo.js.map +1 -0
  17. package/dist/collection/components/map-draw/map-draw.js +65 -22
  18. package/dist/collection/components/map-draw/map-draw.js.map +1 -1
  19. package/dist/collection/components/map-draw/map-selector.js +2 -2
  20. package/dist/collection/components/map-draw/map-selector.js.map +1 -1
  21. package/dist/collection/components/map-draw/polygon-buttons.js +26 -1
  22. package/dist/collection/components/map-draw/polygon-buttons.js.map +1 -1
  23. package/dist/collection/components/map-draw/polygon-information.js +3 -3
  24. package/dist/collection/components/map-draw/polygon-information.js.map +1 -1
  25. package/dist/collection/components/map-draw/tool-box.js +27 -3
  26. package/dist/collection/components/map-draw/tool-box.js.map +1 -1
  27. package/dist/collection/components/settings/settings.js +8 -8
  28. package/dist/collection/components/solar-calculator/solar-calculator.js +1 -1
  29. package/dist/collection/components/solar-expert/solar-expert.js +16 -1
  30. package/dist/collection/components/solar-expert/solar-expert.js.map +1 -1
  31. package/dist/collection/components/solar-system-form/solar-system-form.js +85 -185
  32. package/dist/collection/components/solar-system-form/solar-system-form.js.map +1 -1
  33. package/dist/collection/components/widgets/loading-widget.js +1 -1
  34. package/dist/collection/constants.js +2 -1
  35. package/dist/collection/constants.js.map +1 -1
  36. package/dist/collection/output.css +20 -9
  37. package/dist/collection/store.js +1 -1
  38. package/dist/collection/store.js.map +1 -1
  39. package/dist/collection/types/lang.js.map +1 -1
  40. package/dist/collection/utils/lang/english.js +5 -0
  41. package/dist/collection/utils/lang/english.js.map +1 -1
  42. package/dist/collection/utils/lang/german.js +7 -2
  43. package/dist/collection/utils/lang/german.js.map +1 -1
  44. package/dist/collection/utils/lang/spanish.js +5 -0
  45. package/dist/collection/utils/lang/spanish.js.map +1 -1
  46. package/dist/collection/utils/render/tools.js +7 -0
  47. package/dist/collection/utils/render/tools.js.map +1 -1
  48. package/dist/collection/utils/simulation/simulation.js +109 -0
  49. package/dist/collection/utils/simulation/simulation.js.map +1 -0
  50. package/dist/collection/utils/simulation/solarCurves.js +31 -0
  51. package/dist/collection/utils/simulation/solarCurves.js.map +1 -0
  52. package/dist/collection/utils/simulation/types.js +4 -0
  53. package/dist/collection/utils/simulation/types.js.map +1 -0
  54. package/dist/components/eraser-icon.js +1 -1
  55. package/dist/components/house-icon.js +1 -1
  56. package/dist/components/icon-selector.js +1 -1
  57. package/dist/components/loading-widget.js +2 -2
  58. package/dist/components/loading-widget.js.map +1 -1
  59. package/dist/components/map-draw.js +1 -1
  60. package/dist/components/map-selector.js +1 -1
  61. package/dist/components/move-icon.js +1 -1
  62. package/dist/components/octagon-minus-icon.js +1 -1
  63. package/dist/components/p-BDBrVfn4.js +38 -0
  64. package/dist/components/p-BDBrVfn4.js.map +1 -0
  65. package/dist/components/p-BDrs1Te9.js +38 -0
  66. package/dist/components/p-BDrs1Te9.js.map +1 -0
  67. package/dist/components/p-BbXgEBG5.js +38 -0
  68. package/dist/components/p-BbXgEBG5.js.map +1 -0
  69. package/dist/components/p-Bq1PVegq.js +174 -0
  70. package/dist/components/p-Bq1PVegq.js.map +1 -0
  71. package/dist/components/p-BrVkygdn.js +38 -0
  72. package/dist/components/p-BrVkygdn.js.map +1 -0
  73. package/dist/components/p-BxEeUA4s.js +149 -0
  74. package/dist/components/p-BxEeUA4s.js.map +1 -0
  75. package/dist/components/p-C-_6TJs5.js +164 -0
  76. package/dist/components/p-C-_6TJs5.js.map +1 -0
  77. package/dist/components/{p-BSx-VRl1.js → p-CPLDlLfb.js} +99 -50
  78. package/dist/components/p-CPLDlLfb.js.map +1 -0
  79. package/dist/components/p-CRnyqUKc.js +47 -0
  80. package/dist/components/p-CRnyqUKc.js.map +1 -0
  81. package/dist/components/p-CabEU06O.js +103 -0
  82. package/dist/components/p-CabEU06O.js.map +1 -0
  83. package/dist/components/p-CmFUQbz_.js +507 -0
  84. package/dist/components/p-CmFUQbz_.js.map +1 -0
  85. package/dist/components/p-CumvV0_M.js +38 -0
  86. package/dist/components/p-CumvV0_M.js.map +1 -0
  87. package/dist/components/{p-C5Qpifsm.js → p-CwVUc6Hq.js} +20 -5
  88. package/dist/components/p-CwVUc6Hq.js.map +1 -0
  89. package/dist/components/p-DI6_jwLe.js +38 -0
  90. package/dist/components/p-DI6_jwLe.js.map +1 -0
  91. package/dist/components/p-DPfpDV5e.js +74 -0
  92. package/dist/components/p-DPfpDV5e.js.map +1 -0
  93. package/dist/components/p-DYiK8eDp.js +38 -0
  94. package/dist/components/p-DYiK8eDp.js.map +1 -0
  95. package/dist/components/polygon-buttons.js +1 -1
  96. package/dist/components/polygon-information.js +1 -1
  97. package/dist/components/search-icon.js +1 -1
  98. package/dist/components/settings-icon.js +1 -1
  99. package/dist/components/settings-modal.js +1 -1
  100. package/dist/components/solar-calculator.js +2 -2
  101. package/dist/components/solar-calculator.js.map +1 -1
  102. package/dist/components/solar-expert.js +52 -31
  103. package/dist/components/solar-expert.js.map +1 -1
  104. package/dist/components/solar-system-form.js +1 -1
  105. package/dist/components/tool-box.js +1 -1
  106. package/dist/components/undo-icon.d.ts +11 -0
  107. package/dist/components/undo-icon.js +9 -0
  108. package/dist/components/undo-icon.js.map +1 -0
  109. 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 -0
  110. package/dist/esm/eraser-icon_16.entry.js +3107 -0
  111. package/dist/esm/eraser-icon_16.entry.js.map +1 -0
  112. package/dist/esm/loader.js +1 -1
  113. package/dist/esm/loading-widget.entry.js +2 -2
  114. package/dist/esm/loading-widget.entry.js.map +1 -1
  115. package/dist/esm/solar-calculator.entry.js +2 -2
  116. package/dist/esm/solar-calculator.entry.js.map +1 -1
  117. package/dist/esm/stencil-library.js +1 -1
  118. 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 -0
  119. package/dist/stencil-library/loading-widget.entry.esm.js.map +1 -1
  120. package/dist/stencil-library/p-1acfe8c0.entry.js +32 -0
  121. package/dist/stencil-library/{p-04893dc6.entry.js.map → p-1acfe8c0.entry.js.map} +1 -1
  122. package/dist/stencil-library/p-1e2ddc82.entry.js +2 -0
  123. package/dist/stencil-library/p-1e2ddc82.entry.js.map +1 -0
  124. package/dist/stencil-library/p-56f8bd65.entry.js +2 -0
  125. package/dist/stencil-library/p-56f8bd65.entry.js.map +1 -0
  126. package/dist/stencil-library/solar-calculator.entry.esm.js.map +1 -1
  127. package/dist/stencil-library/stencil-library.esm.js +1 -1
  128. package/dist/types/components/icons/undo.d.ts +5 -0
  129. package/dist/types/components/map-draw/map-draw.d.ts +1 -0
  130. package/dist/types/components/map-draw/polygon-buttons.d.ts +1 -0
  131. package/dist/types/components/map-draw/tool-box.d.ts +1 -0
  132. package/dist/types/components/solar-expert/solar-expert.d.ts +1 -0
  133. package/dist/types/components/solar-system-form/solar-system-form.d.ts +3 -2
  134. package/dist/types/components.d.ts +21 -0
  135. package/dist/types/constants.d.ts +2 -1
  136. package/dist/types/types/lang.d.ts +5 -0
  137. package/dist/types/utils/render/tools.d.ts +2 -1
  138. package/dist/types/utils/simulation/simulation.d.ts +8 -0
  139. package/dist/types/utils/simulation/solarCurves.d.ts +3 -0
  140. package/dist/types/utils/simulation/types.d.ts +49 -0
  141. package/package.json +2 -2
  142. 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.entry.cjs.js.map +0 -1
  143. package/dist/cjs/eraser-icon_15.cjs.entry.js +0 -3007
  144. package/dist/cjs/eraser-icon_15.cjs.entry.js.map +0 -1
  145. package/dist/components/p-BJFgUvs3.js +0 -38
  146. package/dist/components/p-BJFgUvs3.js.map +0 -1
  147. package/dist/components/p-BP2JkbOB.js +0 -149
  148. package/dist/components/p-BP2JkbOB.js.map +0 -1
  149. package/dist/components/p-BSx-VRl1.js.map +0 -1
  150. package/dist/components/p-BfAeCWO4.js +0 -38
  151. package/dist/components/p-BfAeCWO4.js.map +0 -1
  152. package/dist/components/p-BilSpdUG.js +0 -94
  153. package/dist/components/p-BilSpdUG.js.map +0 -1
  154. package/dist/components/p-Bn39cXBR.js +0 -38
  155. package/dist/components/p-Bn39cXBR.js.map +0 -1
  156. package/dist/components/p-BzuGyPz5.js +0 -493
  157. package/dist/components/p-BzuGyPz5.js.map +0 -1
  158. package/dist/components/p-C4UfrfLc.js +0 -40
  159. package/dist/components/p-C4UfrfLc.js.map +0 -1
  160. package/dist/components/p-C5Qpifsm.js.map +0 -1
  161. package/dist/components/p-CesxKYgJ.js +0 -38
  162. package/dist/components/p-CesxKYgJ.js.map +0 -1
  163. package/dist/components/p-Cm-6HU5f.js +0 -38
  164. package/dist/components/p-Cm-6HU5f.js.map +0 -1
  165. package/dist/components/p-D93MrNOs.js +0 -174
  166. package/dist/components/p-D93MrNOs.js.map +0 -1
  167. package/dist/components/p-DSWRVBhO.js +0 -74
  168. package/dist/components/p-DSWRVBhO.js.map +0 -1
  169. package/dist/components/p-klKuBKKU.js +0 -149
  170. package/dist/components/p-klKuBKKU.js.map +0 -1
  171. package/dist/components/p-metMBa33.js +0 -38
  172. package/dist/components/p-metMBa33.js.map +0 -1
  173. 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.entry.js.map +0 -1
  174. package/dist/esm/eraser-icon_15.entry.js +0 -2991
  175. package/dist/esm/eraser-icon_15.entry.js.map +0 -1
  176. 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.entry.esm.js.map +0 -1
  177. package/dist/stencil-library/p-02607fda.entry.js +0 -2
  178. package/dist/stencil-library/p-02607fda.entry.js.map +0 -1
  179. package/dist/stencil-library/p-04893dc6.entry.js +0 -32
  180. package/dist/stencil-library/p-3af1ea82.entry.js +0 -2
  181. package/dist/stencil-library/p-3af1ea82.entry.js.map +0 -1
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["loading-widget.cjs",[[0,"loading-widget"]]],["solar-calculator.cjs",[[0,"solar-calculator",{"apiKey":[1,"api-key"],"buildingInsights":[32],"isLoaded":[32],"autocomplete":[32],"place":[32]}]]],["eraser-icon_15.cjs",[[0,"solar-expert",{"apiKey":[1,"api-key"],"language":[1],"latitude":[32],"longitude":[32],"isLoaded":[32],"autocomplete":[32],"place":[32],"showMapSelector":[32]}],[0,"map-draw",{"apiKey":[1,"api-key"],"config":[16],"solarPanel":[16,"solar-panel"],"showInstructions":[32],"showSettings":[32],"zoom":[32],"loadingState":[32],"rgbTiff":[32],"draggedPointIndex":[32],"hoveredPointIndex":[32],"hoveredPolygon":[32],"shiftKeyPressed":[32],"altKeyPressed":[32],"mousePoint":[32],"currentTool":[32],"roofPolygons":[32],"roofPolygonsSolarPanels":[32],"obstructionPolygons":[32],"selectedPolygon":[32],"buildingInsights":[32],"pixelInMeters":[32],"isMobile":[32],"highlightedEdge":[32]},[[5,"mousemove","handleMouseMove"],[4,"keydown","handleKeyDown"],[4,"keyup","handleKeyUp"],[5,"mousedown","handleMouseDown"],[5,"mouseup","handleMouseUp"]],{"rgbTiff":["drawMap"],"buildingInsights":["drawMap"],"canvasElement":["drawMap"]}],[1,"map-selector",{"apiKey":[1,"api-key"],"language":[1],"isLoaded":[32],"autocomplete":[32],"map":[32],"marker":[32],"circle":[32],"radius":[32],"latitude":[32],"longitude":[32]}],[0,"tool-box",{"currentTool":[16,"current-tool"],"onToolSelect":[16,"on-tool-select"]}],[0,"polygon-buttons",{"calculateSolarPanels":[16,"calculate-solar-panels"],"selectEdgeTool":[16,"select-edge-tool"]}],[1,"polygon-information",{"currentPolygon":[8,"current-polygon"],"positionedPanels":[16,"positioned-panels"],"handleAzimuthChange":[16,"handle-azimuth-change"],"handlePitchChange":[16,"handle-pitch-change"],"calculateSolarPanels":[16,"calculate-solar-panels"]}],[0,"settings-modal",{"settings":[16],"tempSettings":[32]}],[0,"solar-system-form",{"systemConfigs":[16,"system-configs"],"roofPolygons":[16,"roof-polygons"],"obstructionPolygons":[16,"obstruction-polygons"],"householdConsumption":[32],"consumptionProfile":[32],"electricityPrice":[32],"compensationRate":[32],"annualPriceIncrease":[32],"autonomy":[32],"costSavings":[32],"costSavings25Years":[32],"numberOfPanels":[32],"panelPeakPower":[32],"name":[32],"email":[32],"nameError":[32],"emailError":[32],"electricCar":[32],"electricCarChargingTime":[32],"heatPump":[32],"battery":[32]},null,{"systemConfigs":["updateSystemConfigs"]}],[0,"icon-selector",{"name":[1],"inline":[4],"size":[2]}],[0,"eraser-icon",{"inline":[4],"size":[2]}],[0,"house-icon",{"inline":[4],"size":[2]}],[0,"move-icon",{"inline":[4],"size":[2]}],[0,"octagon-minus-icon",{"inline":[4],"size":[2]}],[0,"settings-icon",{"inline":[4],"size":[2]}],[0,"search-icon",{"inline":[4],"size":[2]}]]]], options);
22
+ return index.bootstrapLazy([["loading-widget.cjs",[[0,"loading-widget"]]],["solar-calculator.cjs",[[0,"solar-calculator",{"apiKey":[1,"api-key"],"buildingInsights":[32],"isLoaded":[32],"autocomplete":[32],"place":[32]}]]],["eraser-icon_16.cjs",[[0,"solar-expert",{"apiKey":[1,"api-key"],"language":[1],"latitude":[32],"longitude":[32],"isLoaded":[32],"autocomplete":[32],"place":[32],"showMapSelector":[32]}],[0,"map-draw",{"apiKey":[1,"api-key"],"config":[16],"solarPanel":[16,"solar-panel"],"showInstructions":[32],"showSettings":[32],"zoom":[32],"loadingState":[32],"rgbTiff":[32],"draggedPointIndex":[32],"hoveredPointIndex":[32],"hoveredPolygon":[32],"shiftKeyPressed":[32],"altKeyPressed":[32],"mousePoint":[32],"currentTool":[32],"roofPolygons":[32],"roofPolygonsSolarPanels":[32],"obstructionPolygons":[32],"selectedPolygon":[32],"buildingInsights":[32],"pixelInMeters":[32],"isMobile":[32],"highlightedEdge":[32]},[[5,"mousemove","handleMouseMove"],[4,"keydown","handleKeyDown"],[4,"keyup","handleKeyUp"],[5,"mousedown","handleMouseDown"],[5,"mouseup","handleMouseUp"]],{"rgbTiff":["drawMap"],"buildingInsights":["drawMap"],"canvasElement":["drawMap"]}],[1,"map-selector",{"apiKey":[1,"api-key"],"language":[1],"isLoaded":[32],"autocomplete":[32],"map":[32],"marker":[32],"circle":[32],"radius":[32],"latitude":[32],"longitude":[32]}],[0,"tool-box",{"currentTool":[16,"current-tool"],"undoCallback":[16,"undo-callback"],"onToolSelect":[16,"on-tool-select"]}],[0,"polygon-buttons",{"calculateSolarPanels":[16,"calculate-solar-panels"],"selectEdgeTool":[16,"select-edge-tool"],"currentTool":[1,"current-tool"]}],[1,"polygon-information",{"currentPolygon":[8,"current-polygon"],"positionedPanels":[16,"positioned-panels"],"handleAzimuthChange":[16,"handle-azimuth-change"],"handlePitchChange":[16,"handle-pitch-change"],"calculateSolarPanels":[16,"calculate-solar-panels"]}],[0,"settings-modal",{"settings":[16],"tempSettings":[32]}],[0,"solar-system-form",{"systemConfigs":[16,"system-configs"],"roofPolygons":[16,"roof-polygons"],"obstructionPolygons":[16,"obstruction-polygons"],"householdConsumption":[32],"consumptionProfile":[32],"electricityPrice":[32],"compensationRate":[32],"annualPriceIncrease":[32],"autonomy":[32],"costSavings":[32],"numberOfPanels":[32],"panelPeakPower":[32],"name":[32],"email":[32],"nameError":[32],"emailError":[32],"electricCar":[32],"electricCarChargingTime":[32],"heatPump":[32],"battery":[32],"compensation25Years":[32],"savedCosts25Years":[32],"maxPanels":[32]},null,{"systemConfigs":["updateSystemConfigs"]}],[0,"icon-selector",{"name":[1],"inline":[4],"size":[2]}],[0,"eraser-icon",{"inline":[4],"size":[2]}],[0,"house-icon",{"inline":[4],"size":[2]}],[0,"move-icon",{"inline":[4],"size":[2]}],[0,"octagon-minus-icon",{"inline":[4],"size":[2]}],[0,"settings-icon",{"inline":[4],"size":[2]}],[0,"undo-icon",{"inline":[4],"size":[2]}],[0,"search-icon",{"inline":[4],"size":[2]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -7,6 +7,7 @@
7
7
  "components/icons/octagonMinus.js",
8
8
  "components/icons/search.js",
9
9
  "components/icons/settings.js",
10
+ "components/icons/undo.js",
10
11
  "components/map-draw/map-draw.js",
11
12
  "components/map-draw/map-selector.js",
12
13
  "components/map-draw/polygon-buttons.js",
@@ -22,6 +22,9 @@ export class Icon {
22
22
  if (this.name === "settings") {
23
23
  return h("settings-icon", { inline: this.inline, size: this.size });
24
24
  }
25
+ if (this.name === "undo") {
26
+ return h("undo-icon", { inline: this.inline, size: this.size });
27
+ }
25
28
  return (h("div", { class: `${this.inline ? "inline-block" : ""}` }, "Icon ", this.name));
26
29
  }
27
30
  static get is() { return "icon-selector"; }
@@ -1 +1 @@
1
- {"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../src/components/icons/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOnD,MAAM,OAAO,IAAI;IAEb,IAAI,CAAS;IAEb,MAAM,GAAY,KAAK,CAAC;IAExB,IAAI,GAAW,EAAE,CAAC;IAElB,MAAM;QACF,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACzB,OAAO,mBAAa,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CAAC;QACjE,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YACxB,OAAO,kBAAY,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CAAC;QAChE,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YACvB,OAAO,iBAAW,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CAAC;QAC/D,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;YAChC,OAAO,0BAAoB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CAAC;QACxE,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACzB,OAAO,mBAAa,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CAAC;QACjE,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YAC3B,OAAO,qBAAe,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CAAC;QACnE,CAAC;QACD,OAAO,CACH,WAAK,KAAK,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE;;YACxC,IAAI,CAAC,IAAI,CACb,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, Prop } from \"@stencil/core\";\r\n\r\n@Component({\r\n tag: \"icon-selector\",\r\n styleUrl: \"../../output.css\",\r\n shadow: false,\r\n})\r\nexport class Icon {\r\n @Prop()\r\n name: string;\r\n @Prop()\r\n inline: boolean = false;\r\n @Prop()\r\n size: number = 20;\r\n\r\n render() {\r\n if (this.name === \"search\") {\r\n return <search-icon inline={this.inline} size={this.size} />;\r\n }\r\n if (this.name === \"house\") {\r\n return <house-icon inline={this.inline} size={this.size} />;\r\n }\r\n if (this.name === \"move\") {\r\n return <move-icon inline={this.inline} size={this.size} />;\r\n }\r\n if (this.name === \"octagon-minus\") {\r\n return <octagon-minus-icon inline={this.inline} size={this.size} />;\r\n }\r\n if (this.name === \"eraser\") {\r\n return <eraser-icon inline={this.inline} size={this.size} />;\r\n }\r\n if (this.name === \"settings\") {\r\n return <settings-icon inline={this.inline} size={this.size} />;\r\n }\r\n return (\r\n <div class={`${this.inline ? \"inline-block\" : \"\"}`}>\r\n Icon {this.name}\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../src/components/icons/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOnD,MAAM,OAAO,IAAI;IAEb,IAAI,CAAS;IAEb,MAAM,GAAY,KAAK,CAAC;IAExB,IAAI,GAAW,EAAE,CAAC;IAElB,MAAM;QACF,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACzB,OAAO,mBAAa,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CAAC;QACjE,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;YACxB,OAAO,kBAAY,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CAAC;QAChE,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YACvB,OAAO,iBAAW,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CAAC;QAC/D,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;YAChC,OAAO,0BAAoB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CAAC;QACxE,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACzB,OAAO,mBAAa,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CAAC;QACjE,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YAC3B,OAAO,qBAAe,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CAAC;QACnE,CAAC;QACD,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YACvB,OAAO,iBAAW,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI,CAAC;QAC/D,CAAC;QACD,OAAO,CACH,WAAK,KAAK,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,EAAE;;YACxC,IAAI,CAAC,IAAI,CACb,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, Prop } from \"@stencil/core\";\r\n\r\n@Component({\r\n tag: \"icon-selector\",\r\n styleUrl: \"../../output.css\",\r\n shadow: false,\r\n})\r\nexport class Icon {\r\n @Prop()\r\n name: string;\r\n @Prop()\r\n inline: boolean = false;\r\n @Prop()\r\n size: number = 20;\r\n\r\n render() {\r\n if (this.name === \"search\") {\r\n return <search-icon inline={this.inline} size={this.size} />;\r\n }\r\n if (this.name === \"house\") {\r\n return <house-icon inline={this.inline} size={this.size} />;\r\n }\r\n if (this.name === \"move\") {\r\n return <move-icon inline={this.inline} size={this.size} />;\r\n }\r\n if (this.name === \"octagon-minus\") {\r\n return <octagon-minus-icon inline={this.inline} size={this.size} />;\r\n }\r\n if (this.name === \"eraser\") {\r\n return <eraser-icon inline={this.inline} size={this.size} />;\r\n }\r\n if (this.name === \"settings\") {\r\n return <settings-icon inline={this.inline} size={this.size} />;\r\n }\r\n if (this.name === \"undo\") {\r\n return <undo-icon inline={this.inline} size={this.size} />;\r\n }\r\n return (\r\n <div class={`${this.inline ? \"inline-block\" : \"\"}`}>\r\n Icon {this.name}\r\n </div>\r\n );\r\n }\r\n}\r\n"]}
@@ -0,0 +1,64 @@
1
+ import { h } from "@stencil/core";
2
+ export class UndoIcon {
3
+ inline = false;
4
+ size = 20;
5
+ render() {
6
+ return (h("svg", { key: '351fc78e58401fc39d8a38f7724320ea9807d009', xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", class: "lucide lucide-undo2-icon lucide-undo-2" }, h("path", { key: 'bc1097d7c20f4a2a1524e1d6de19b9827e951535', d: "M9 14 4 9l5-5" }), h("path", { key: '9d149bc6d7c2ea80e79d32bcb69f2927b5906170', d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11" })));
7
+ }
8
+ static get is() { return "undo-icon"; }
9
+ static get originalStyleUrls() {
10
+ return {
11
+ "$": ["../../output.css"]
12
+ };
13
+ }
14
+ static get styleUrls() {
15
+ return {
16
+ "$": ["../../output.css"]
17
+ };
18
+ }
19
+ static get properties() {
20
+ return {
21
+ "inline": {
22
+ "type": "boolean",
23
+ "attribute": "inline",
24
+ "mutable": false,
25
+ "complexType": {
26
+ "original": "boolean",
27
+ "resolved": "boolean",
28
+ "references": {}
29
+ },
30
+ "required": false,
31
+ "optional": false,
32
+ "docs": {
33
+ "tags": [],
34
+ "text": ""
35
+ },
36
+ "getter": false,
37
+ "setter": false,
38
+ "reflect": false,
39
+ "defaultValue": "false"
40
+ },
41
+ "size": {
42
+ "type": "number",
43
+ "attribute": "size",
44
+ "mutable": false,
45
+ "complexType": {
46
+ "original": "number",
47
+ "resolved": "number",
48
+ "references": {}
49
+ },
50
+ "required": false,
51
+ "optional": false,
52
+ "docs": {
53
+ "tags": [],
54
+ "text": ""
55
+ },
56
+ "getter": false,
57
+ "setter": false,
58
+ "reflect": false,
59
+ "defaultValue": "20"
60
+ }
61
+ };
62
+ }
63
+ }
64
+ //# sourceMappingURL=undo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"undo.js","sourceRoot":"","sources":["../../../src/components/icons/undo.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAOnD,MAAM,OAAO,QAAQ;IAEjB,MAAM,GAAY,KAAK,CAAC;IAExB,IAAI,GAAW,EAAE,CAAC;IAElB,MAAM;QACF,OAAO,CACH,4DACI,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,kBACR,GAAG,oBACD,OAAO,qBACN,OAAO,EACvB,KAAK,EAAC,wCAAwC;YAE9C,6DAAM,CAAC,EAAC,eAAe,GAAG;YAC1B,6DAAM,CAAC,EAAC,0DAA0D,GAAG,CACnE,CACT,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, Prop } from \"@stencil/core\";\r\n\r\n@Component({\r\n tag: \"undo-icon\",\r\n styleUrl: \"../../output.css\",\r\n shadow: false,\r\n})\r\nexport class UndoIcon {\r\n @Prop()\r\n inline: boolean = false;\r\n @Prop()\r\n size: number = 20;\r\n\r\n render() {\r\n return (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"24\"\r\n height=\"24\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n class=\"lucide lucide-undo2-icon lucide-undo-2\"\r\n >\r\n <path d=\"M9 14 4 9l5-5\" />\r\n <path d=\"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11\" />\r\n </svg>\r\n );\r\n }\r\n}\r\n"]}
@@ -112,7 +112,7 @@ export class MapDraw {
112
112
  // If on mobile, automatically calculate panels using Google API data
113
113
  if (state.isMobile && this.buildingInsights) {
114
114
  const maxPanels = this.buildingInsights.solarPotential.maxArrayPanelsCount;
115
- const approximatedPanels = Math.floor(maxPanels / 3); // Use one third of max panels
115
+ const approximatedPanels = Math.floor(maxPanels * 3 / 4); // Use two thirds of max panels
116
116
  const positionedPanels = Array(approximatedPanels).fill(null)
117
117
  .map((_, __) => ({
118
118
  panel: this.solarPanel,
@@ -176,6 +176,7 @@ export class MapDraw {
176
176
  const { x, y } = this.convertToCanvasCoordinates(event);
177
177
  this.mousePoint = { x, y };
178
178
  const currentPolygon = this.getCurrentPolygon();
179
+ let redraw = false;
179
180
  if (this.currentTool.name === "markRoofEdge") {
180
181
  let distances = [];
181
182
  for (let i = 0; i < currentPolygon?.points.length; i++) {
@@ -194,6 +195,11 @@ export class MapDraw {
194
195
  const closestEdge = distances.sort((a, b) => a.dist - b.dist)[0];
195
196
  if (closestEdge && (closestEdge.dist < 10)) {
196
197
  this.highlightedEdge = closestEdge.edge;
198
+ redraw = true;
199
+ }
200
+ else if (this.highlightedEdge) {
201
+ this.highlightedEdge = null;
202
+ redraw = true;
197
203
  }
198
204
  }
199
205
  // Check for point hover
@@ -225,7 +231,7 @@ export class MapDraw {
225
231
  JSON.stringify(this.hoveredPolygon)) {
226
232
  this.hoveredPointIndex = newHoveredPointIndex;
227
233
  this.hoveredPolygon = newHoveredPolygon;
228
- this.drawPolygons();
234
+ redraw = true;
229
235
  }
230
236
  // Handle dragging
231
237
  if (this.draggedPointIndex !== null && currentPolygon &&
@@ -238,9 +244,12 @@ export class MapDraw {
238
244
  (metersInPixels * metersInPixels);
239
245
  currentPolygon.details.area = area;
240
246
  }
241
- this.drawPolygons();
247
+ redraw = true;
242
248
  }
243
249
  if (this.shiftKeyPressed) {
250
+ redraw = true;
251
+ }
252
+ if (redraw) {
244
253
  this.drawPolygons();
245
254
  }
246
255
  }
@@ -350,7 +359,31 @@ export class MapDraw {
350
359
  this.altKeyPressed = false;
351
360
  }
352
361
  }
362
+ undo() {
363
+ const currentPolygon = this.getCurrentPolygon();
364
+ if (!currentPolygon) {
365
+ return;
366
+ }
367
+ if (currentPolygon.closed) {
368
+ currentPolygon.closed = false;
369
+ if (currentPolygon.type === "roof") {
370
+ delete this.roofPolygonsSolarPanels[currentPolygon._id];
371
+ this.currentTool = roofTool;
372
+ this.highlightedEdge = null;
373
+ }
374
+ else if (currentPolygon.type === "obstruction") {
375
+ this.currentTool = obstructionTool;
376
+ }
377
+ }
378
+ else {
379
+ currentPolygon.points.pop();
380
+ }
381
+ this.drawPolygons();
382
+ }
353
383
  handleMouseDown(event) {
384
+ if (this.currentTool.name === "undo") {
385
+ return;
386
+ }
354
387
  if (state.isMobile)
355
388
  return; // Prevent interactions on mobile
356
389
  if (!this.polygonCanvas || !this.polygonCtx)
@@ -359,11 +392,15 @@ export class MapDraw {
359
392
  return;
360
393
  let { x, y } = this.convertToCanvasCoordinates(event);
361
394
  if (this.currentTool.name === "markRoofEdge") {
362
- const x = this.highlightedEdge?.pointA.x -
363
- this.highlightedEdge?.pointB.x;
364
- const y = this.highlightedEdge?.pointA.y -
365
- this.highlightedEdge?.pointB.y;
395
+ if (!this.highlightedEdge) {
396
+ return;
397
+ }
398
+ const x = this.highlightedEdge.pointA.x -
399
+ this.highlightedEdge.pointB.x;
400
+ const y = this.highlightedEdge.pointA.y -
401
+ this.highlightedEdge.pointB.y;
366
402
  const azimuth = Math.atan2(-x, y) * (180 / Math.PI);
403
+ this.calculateSolarPanels();
367
404
  this.handleAzimuthChange({
368
405
  target: {
369
406
  value: azimuth,
@@ -390,10 +427,10 @@ export class MapDraw {
390
427
  this.drawPolygons();
391
428
  return;
392
429
  }
430
+ const currentPolygon = this.getCurrentPolygon();
393
431
  if (this.currentTool.name === "move") {
394
432
  // Check if we're clicking on a point of the selected polygon
395
433
  if (this.selectedPolygon) {
396
- const currentPolygon = this.getCurrentPolygon();
397
434
  const pointIndex = currentPolygon?.points.findIndex((point) => {
398
435
  const distance = Math.sqrt(Math.pow(x - point.x, 2) + Math.pow(y - point.y, 2));
399
436
  return distance < 10;
@@ -411,7 +448,8 @@ export class MapDraw {
411
448
  this.drawPolygons();
412
449
  return;
413
450
  }
414
- if (!this.selectedPolygon || this.getCurrentPolygon()?.closed) {
451
+ if (!this.selectedPolygon || currentPolygon?.closed ||
452
+ this.currentTool.name !== this.selectedPolygon?.type) {
415
453
  // no polygon is active, create a new one
416
454
  const newPolygon = {
417
455
  _id: uuidv4(),
@@ -438,10 +476,6 @@ export class MapDraw {
438
476
  this.drawPolygons();
439
477
  return;
440
478
  }
441
- const { _id, type } = this.selectedPolygon;
442
- const currentPolygon = type === "roof"
443
- ? this.roofPolygons[_id]
444
- : this.obstructionPolygons[_id];
445
479
  if (currentPolygon.closed) {
446
480
  return;
447
481
  }
@@ -503,7 +537,7 @@ export class MapDraw {
503
537
  this.drawPolygons();
504
538
  this.currentTool = moveTool;
505
539
  }
506
- calculateSolarPanels() {
540
+ calculateSolarPanels({ redraw = true } = {}) {
507
541
  const currentPolygon = this.getCurrentPolygon();
508
542
  if (!currentPolygon.details) {
509
543
  return;
@@ -529,7 +563,9 @@ export class MapDraw {
529
563
  DEFAULT_SUNNINESS,
530
564
  },
531
565
  };
532
- this.drawPolygons();
566
+ if (redraw) {
567
+ this.drawPolygons();
568
+ }
533
569
  }
534
570
  handlePitchChange(event) {
535
571
  const target = event.target;
@@ -558,6 +594,13 @@ export class MapDraw {
558
594
  }
559
595
  }
560
596
  handleToolSelect(tool) {
597
+ const currentPolygon = this.getCurrentPolygon();
598
+ if (currentPolygon && !currentPolygon.closed &&
599
+ currentPolygon.points.length > 0) {
600
+ alert("Please close the polygon before selecting a tool");
601
+ // TODO translate
602
+ return;
603
+ }
561
604
  this.currentTool = tool;
562
605
  }
563
606
  scrollToCanvas() {
@@ -579,24 +622,24 @@ export class MapDraw {
579
622
  render() {
580
623
  const t = getLanguageStrings(state.settings.language);
581
624
  const currentPolygon = this.getCurrentPolygon();
582
- return (h("div", { key: 'db05a3e9e75823f18f47f33060f5bc6a0ec7d1ae', class: "flex flex-col justify-center items-center w-full h-full gap-4", id: "map-draw" }, this.showInstructions && !state.isMobile && (h("div", { key: '6fecaec769220c945c6e8e2967ad044039851f21', class: "w-full rounded-4xl p-4 bg-white" }, t.mapDraw.instructions.parts.roof, " ", h("button", { key: '56bb7d8b770d137b84ade2b2e445e35bf6a2d5e4', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-gray-300 transition-colors", onClick: () => this.handleToolSelect(roofTool) }, h("icon-selector", { key: '5aa62f574812f20a912a712d06d90534e9332b63', name: "house", inline: true })), " ", t.mapDraw.instructions.parts.obstruction, " ", h("button", { key: '700b9c850fbe5b432dbfa4eb02941d226876ab18', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-gray-300 transition-colors", onClick: () => this.handleToolSelect(obstructionTool) }, h("icon-selector", { key: 'de7b4baa4683b4cc50afc1c785a93d4a0a683544', name: "octagon-minus", inline: true })), " ", t.mapDraw.instructions.parts.delete, " ", h("button", { key: '3aba287e7a8f9e635ba7d83121d12d5c3f259ed7', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-gray-300 transition-colors", onClick: () => this.handleToolSelect(deleteTool) }, h("icon-selector", { key: 'dac926501562e02584eef41ce5c0e8d5f3669431', name: "eraser", inline: true })), " ", t.mapDraw.instructions.parts.move, " ", h("button", { key: '5495b847cced1997b0ebc406986472699111c746', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-gray-300 transition-colors", onClick: () => this.handleToolSelect(moveTool) }, h("icon-selector", { key: 'a7d51484dbff6f28d1bf5566934f5aec99f09737', name: "move", inline: true })), " ", t.mapDraw.instructions.parts.end)), h("div", { key: '3a6e2ddc5100069937250dc183d944dee5c1ab07', class: "w-full flex flex-row justify-between items-center" }, !state.isMobile && (this.showInstructions
625
+ return (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 && (h("div", { key: '11628abd7633bd943eb2d33772250675df19f4bd', class: "w-full rounded-4xl p-4 bg-white" }, t.mapDraw.instructions.parts.roof, " ", h("button", { key: '3c059c0616008b426c1a7ba4e465bf9fc081cf05', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-gray-300 transition-colors", onClick: () => this.handleToolSelect(roofTool) }, h("icon-selector", { key: '26c297579ac137eb8d91083932933f34b7278011', name: "house", inline: true })), " ", t.mapDraw.instructions.parts.obstruction, " ", h("button", { key: '9e129e16e285300268be4b05a03e245501078111', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-gray-300 transition-colors", onClick: () => this.handleToolSelect(obstructionTool) }, h("icon-selector", { key: 'a4c5822589a06bd6b2a9782d33d3025704e3efe5', name: "octagon-minus", inline: true })), " ", t.mapDraw.instructions.parts.delete, " ", h("button", { key: '5b3872a47d5d9475400c74a22dc02196a56aeed3', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-gray-300 transition-colors", onClick: () => this.handleToolSelect(deleteTool) }, h("icon-selector", { key: '9a5544c3573117cf3aae325319c161e781255356', name: "eraser", inline: true })), " ", t.mapDraw.instructions.parts.move, " ", h("button", { key: 'af9f0e5ccc0bb132d0601bb2a1bc8e0ff4677d05', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-gray-300 transition-colors", onClick: () => this.handleToolSelect(moveTool) }, h("icon-selector", { key: 'a7cd46f4b0ab05d69edd71237b44a62f0d776ea1', name: "move", inline: true })), " ", t.mapDraw.instructions.parts.end)), h("div", { key: 'f27da8d073e2d49ca923b74319065265b078b51d', class: "w-full flex flex-row justify-between items-center" }, !state.isMobile && (this.showInstructions
583
626
  ? (h("button", { class: "px-4 py-2 rounded-4xl hover:bg-gray-300 transition-colors duration-200 bg-white p-4", onClick: () => this.showInstructions = false }, t.mapDraw.instructions.hide))
584
- : (h("button", { class: "px-4 py-2 rounded-4xl hover:bg-gray-300 transition-colors duration-200 bg-white p-4", onClick: () => this.showInstructions = true }, t.mapDraw.instructions.show))), h("button", { key: '6891f0e8b14d8533739d27b6ff40625eef29f1ba', class: "flex items-center gap-2 bg-white p-2 rounded-4xl hover:bg-gray-300", onClick: this.handleSettingsClick }, h("settings-icon", { key: '9f66cfbc1cd4d39fd0ee62e3e31c1d0c804848c5' }))), h("div", { key: 'e6f5d94e07276a86b102443bdcff5499f571425f', class: "w-full" }, !state.isMobile && (h("tool-box", { key: '4911e6f2cbccc82a073dce6d2c3b8c8d1a2b06f1', currentTool: this.currentTool, onToolSelect: (tool) => this.handleToolSelect(tool) }))), this.loadingState === "empty" && (h("div", { key: '81098e09b730a7d5e24062379f172a136c143df6', class: "w-full" }, h("p", { key: 'e3bb821c5510f30091b1d5e813724a7a4e9d8971', class: "text-white text-center flex items-center justify-center rounded-4xl p-4 w-full", style: {
627
+ : (h("button", { class: "px-4 py-2 rounded-4xl hover:bg-gray-300 transition-colors duration-200 bg-white p-4", onClick: () => this.showInstructions = true }, t.mapDraw.instructions.show))), h("button", { key: 'ab4c01b61913637df21a5d7f6b6a814fb804dc7d', class: "flex items-center gap-2 bg-white p-2 rounded-4xl hover:bg-gray-300", onClick: this.handleSettingsClick }, h("settings-icon", { key: '8c1f33df887d1b5810d88f412d0c82b6491110d3' }))), h("div", { key: '9d1c86714cd25349000739fd74f9da866d50b64e', class: "w-full" }, !state.isMobile && (h("tool-box", { key: '40e7f320a6c015baff3294c03bea3f373e7996ca', currentTool: this.currentTool, onToolSelect: (tool) => this.handleToolSelect(tool), undoCallback: () => this.undo() }))), this.loadingState === "empty" && (h("div", { key: 'd05709445fc8f58a62f4dd9c6b9e9604b745b80a', class: "w-full" }, h("p", { key: 'ab9772c7b0ece883781c78280f1ac03db45fa069', class: "text-white text-center flex items-center justify-center rounded-4xl p-4 w-full", style: {
585
628
  backgroundColor: "rgba(0, 0, 0, 0.5)",
586
629
  } }, t.mapDraw.noAddressSelected))), (state.latitude && state.longitude &&
587
- this.loadingState === "loading") && (h("div", { key: '75471babac89444385700935a2bdcfee22b7828f', class: "flex items-center justify-center w-full bg-opacity-75 z-20 pt-7 rounded-4xl" }, h("div", { key: '5822c0ce8903013cf4df805af0b193ed7d3e90f9', class: "animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-[#271200]" }))), h("div", { key: 'c2dfd01cb77f0ae4987ce6cab2b80fa795a480e5', class: "flex items-start justify-center h-full w-full bg-[#f3ebda] rounded-4xl" }, h("div", { key: 'df0b2165641f675b4c059cb68c391a2aff07a20e', class: "relative h-full flex items-center justify-center w-full rounded-4xl bg-[#271200]", style: {
630
+ this.loadingState === "loading") && (h("div", { key: 'd705b12182197d37f8312b0ea99b66defa4e2888', class: "flex items-center justify-center w-full bg-opacity-75 z-20 pt-7 rounded-4xl" }, h("div", { key: 'a65212b6dcb05a2a640a84b0aa9c0e2dc79c1418', class: "animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-[#271200]" }))), h("div", { key: 'c7e39c57c523376c9410708fc09fc9437133c533', class: "flex items-start justify-center h-full w-full bg-[#f3ebda] rounded-4xl" }, h("div", { key: '4cca7a6f7e6857a6d4e1828735f077e84d297398', class: "relative h-full flex items-center justify-center w-full rounded-4xl bg-[#271200]", style: {
588
631
  aspectRatio: this.rgbTiff
589
632
  ? `${this.rgbTiff.width}/${this.rgbTiff.height}`
590
633
  : "1/1",
591
- } }, h("canvas", { key: '07b4ac6baaf8f6983f5516ec322d27fd8ae64d6d', ref: (el) => this.canvasElement = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", id: "map-draw-canvas", style: {
634
+ } }, h("canvas", { key: 'e35c67b1641cc4ed364139598e2eb5de7eb7b788', ref: (el) => this.canvasElement = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", id: "map-draw-canvas", style: {
592
635
  cursor: this.currentTool.cursor,
593
- } }), h("canvas", { key: 'e57d6f0865c117bc2046e6386b02a6cc88741e86', ref: (el) => this.polygonCanvas = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", style: {
636
+ } }), h("canvas", { key: 'e645e24ee02ddae97d2a8f81c1107a47e10b3a30', ref: (el) => this.polygonCanvas = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", style: {
594
637
  cursor: this.currentTool.cursor,
595
- } }), currentPolygon?.details && (h("button", { key: 'cabbfd6d516498bbf9f13d85a79cc904bc526ab9', class: "absolute bottom-4 right-4 px-4 py-2 bg-[#f3ebda] rounded-4xl hover:bg-[#ffffff] text-[#271200] transition-colors duration-200 z-10 text-xs", onClick: () => this.calculateSolarPanels() }, t.mapDraw.calculateSolarPanels)))), h("div", { key: 'b765a477b2269659853446b419a39267350351c6', class: "w-full" }, h("polygon-buttons", { key: '1b6364ae616c111619216369d74c91295f82bc1f', calculateSolarPanels: () => this.calculateSolarPanels(), selectEdgeTool: () => this.handleToolSelect(markRoofEdgeTool) })), !state.isMobile && (h("div", { key: '927828fb90af42c7b39e1cfdbde85bf95cc9925b', class: "w-full" }, h("polygon-information", { key: 'be15afe3769cc6ac064f7de2944b5305e6880fbf', currentPolygon: currentPolygon, positionedPanels: currentPolygon
638
+ } }))), currentPolygon?.closed && (h("div", { key: '5b5d7b3abc617b0d322104c3a041d8d331df6862', class: "w-full" }, h("polygon-buttons", { key: '2a5b31ca5b9b7cc0127ad45b8ae0281e5af5de63', currentTool: this.currentTool.name, calculateSolarPanels: () => this.calculateSolarPanels(), selectEdgeTool: () => this.handleToolSelect(markRoofEdgeTool) }))), !state.isMobile && (h("div", { key: 'aec8403b81ff41c3ba6423f8266bf52f10ffff9b', class: "w-full" }, h("polygon-information", { key: '604b909a604bcc1b30345824167d2083ccd4e159', currentPolygon: currentPolygon, positionedPanels: currentPolygon
596
639
  ? this
597
640
  .roofPolygonsSolarPanels[currentPolygon._id]
598
641
  ?.positionedPanels
599
- : undefined, handleAzimuthChange: (event) => this.handleAzimuthChange(event), handlePitchChange: (event) => this.handlePitchChange(event), calculateSolarPanels: () => this.calculateSolarPanels() }))), h("div", { key: 'df7d4b0e5d3ad645d6f1240b920e8f26cba7fcb5', class: "w-full" }, h("solar-system-form", { key: '73d003470f3a575aadda7f40c06b6af028d42eb4', systemConfigs: this.roofPolygonsSolarPanels, roofPolygons: this.roofPolygons, obstructionPolygons: this.obstructionPolygons })), this.showSettings && (h("settings-modal", { key: 'c570d9798ea0613546c5ece40372b2eadfc3adda', settings: state.settings, onClose: this.handleSettingsClose, onSave: this.handleSettingsSave }))));
642
+ : undefined, handleAzimuthChange: (event) => this.handleAzimuthChange(event), handlePitchChange: (event) => this.handlePitchChange(event), calculateSolarPanels: () => this.calculateSolarPanels() }))), h("div", { key: '03895fe0f238cf4a0698af6a9b53a788086cc1cf', class: "w-full" }, h("solar-system-form", { key: '400f8596661668f7a8aa5d2010fcfeac6e02bf5b', systemConfigs: this.roofPolygonsSolarPanels, roofPolygons: this.roofPolygons, obstructionPolygons: this.obstructionPolygons })), this.showSettings && (h("settings-modal", { key: '2be9723f241098046d45eebadaba8d241b4c0c44', settings: state.settings, onClose: this.handleSettingsClose, onSave: this.handleSettingsSave }))));
600
643
  }
601
644
  static get is() { return "map-draw"; }
602
645
  static get originalStyleUrls() {