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.
- 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
- package/dist/cjs/eraser-icon_16.cjs.entry.js +3124 -0
- package/dist/cjs/eraser-icon_16.cjs.entry.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/loading-widget.cjs.entry.js +2 -2
- package/dist/cjs/loading-widget.cjs.entry.js.map +1 -1
- package/dist/cjs/loading-widget.entry.cjs.js.map +1 -1
- package/dist/cjs/solar-calculator.cjs.entry.js +2 -2
- package/dist/cjs/solar-calculator.cjs.entry.js.map +1 -1
- package/dist/cjs/solar-calculator.entry.cjs.js.map +1 -1
- package/dist/cjs/stencil-library.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/icons/icon.js +3 -0
- package/dist/collection/components/icons/icon.js.map +1 -1
- package/dist/collection/components/icons/undo.js +64 -0
- package/dist/collection/components/icons/undo.js.map +1 -0
- package/dist/collection/components/map-draw/map-draw.js +65 -22
- package/dist/collection/components/map-draw/map-draw.js.map +1 -1
- package/dist/collection/components/map-draw/map-selector.js +2 -2
- package/dist/collection/components/map-draw/map-selector.js.map +1 -1
- package/dist/collection/components/map-draw/polygon-buttons.js +26 -1
- package/dist/collection/components/map-draw/polygon-buttons.js.map +1 -1
- package/dist/collection/components/map-draw/polygon-information.js +3 -3
- package/dist/collection/components/map-draw/polygon-information.js.map +1 -1
- package/dist/collection/components/map-draw/tool-box.js +27 -3
- package/dist/collection/components/map-draw/tool-box.js.map +1 -1
- package/dist/collection/components/settings/settings.js +8 -8
- package/dist/collection/components/solar-calculator/solar-calculator.js +1 -1
- package/dist/collection/components/solar-expert/solar-expert.js +16 -1
- package/dist/collection/components/solar-expert/solar-expert.js.map +1 -1
- package/dist/collection/components/solar-system-form/solar-system-form.js +85 -185
- package/dist/collection/components/solar-system-form/solar-system-form.js.map +1 -1
- package/dist/collection/components/widgets/loading-widget.js +1 -1
- package/dist/collection/constants.js +2 -1
- package/dist/collection/constants.js.map +1 -1
- package/dist/collection/output.css +20 -9
- package/dist/collection/store.js +1 -1
- package/dist/collection/store.js.map +1 -1
- package/dist/collection/types/lang.js.map +1 -1
- package/dist/collection/utils/lang/english.js +5 -0
- package/dist/collection/utils/lang/english.js.map +1 -1
- package/dist/collection/utils/lang/german.js +7 -2
- package/dist/collection/utils/lang/german.js.map +1 -1
- package/dist/collection/utils/lang/spanish.js +5 -0
- package/dist/collection/utils/lang/spanish.js.map +1 -1
- package/dist/collection/utils/render/tools.js +7 -0
- package/dist/collection/utils/render/tools.js.map +1 -1
- package/dist/collection/utils/simulation/simulation.js +109 -0
- package/dist/collection/utils/simulation/simulation.js.map +1 -0
- package/dist/collection/utils/simulation/solarCurves.js +31 -0
- package/dist/collection/utils/simulation/solarCurves.js.map +1 -0
- package/dist/collection/utils/simulation/types.js +4 -0
- package/dist/collection/utils/simulation/types.js.map +1 -0
- package/dist/components/eraser-icon.js +1 -1
- package/dist/components/house-icon.js +1 -1
- package/dist/components/icon-selector.js +1 -1
- package/dist/components/loading-widget.js +2 -2
- package/dist/components/loading-widget.js.map +1 -1
- package/dist/components/map-draw.js +1 -1
- package/dist/components/map-selector.js +1 -1
- package/dist/components/move-icon.js +1 -1
- package/dist/components/octagon-minus-icon.js +1 -1
- package/dist/components/p-BDBrVfn4.js +38 -0
- package/dist/components/p-BDBrVfn4.js.map +1 -0
- package/dist/components/p-BDrs1Te9.js +38 -0
- package/dist/components/p-BDrs1Te9.js.map +1 -0
- package/dist/components/p-BbXgEBG5.js +38 -0
- package/dist/components/p-BbXgEBG5.js.map +1 -0
- package/dist/components/p-Bq1PVegq.js +174 -0
- package/dist/components/p-Bq1PVegq.js.map +1 -0
- package/dist/components/p-BrVkygdn.js +38 -0
- package/dist/components/p-BrVkygdn.js.map +1 -0
- package/dist/components/p-BxEeUA4s.js +149 -0
- package/dist/components/p-BxEeUA4s.js.map +1 -0
- package/dist/components/p-C-_6TJs5.js +164 -0
- package/dist/components/p-C-_6TJs5.js.map +1 -0
- package/dist/components/{p-BSx-VRl1.js → p-CPLDlLfb.js} +99 -50
- package/dist/components/p-CPLDlLfb.js.map +1 -0
- package/dist/components/p-CRnyqUKc.js +47 -0
- package/dist/components/p-CRnyqUKc.js.map +1 -0
- package/dist/components/p-CabEU06O.js +103 -0
- package/dist/components/p-CabEU06O.js.map +1 -0
- package/dist/components/p-CmFUQbz_.js +507 -0
- package/dist/components/p-CmFUQbz_.js.map +1 -0
- package/dist/components/p-CumvV0_M.js +38 -0
- package/dist/components/p-CumvV0_M.js.map +1 -0
- package/dist/components/{p-C5Qpifsm.js → p-CwVUc6Hq.js} +20 -5
- package/dist/components/p-CwVUc6Hq.js.map +1 -0
- package/dist/components/p-DI6_jwLe.js +38 -0
- package/dist/components/p-DI6_jwLe.js.map +1 -0
- package/dist/components/p-DPfpDV5e.js +74 -0
- package/dist/components/p-DPfpDV5e.js.map +1 -0
- package/dist/components/p-DYiK8eDp.js +38 -0
- package/dist/components/p-DYiK8eDp.js.map +1 -0
- package/dist/components/polygon-buttons.js +1 -1
- package/dist/components/polygon-information.js +1 -1
- package/dist/components/search-icon.js +1 -1
- package/dist/components/settings-icon.js +1 -1
- package/dist/components/settings-modal.js +1 -1
- package/dist/components/solar-calculator.js +2 -2
- package/dist/components/solar-calculator.js.map +1 -1
- package/dist/components/solar-expert.js +52 -31
- package/dist/components/solar-expert.js.map +1 -1
- package/dist/components/solar-system-form.js +1 -1
- package/dist/components/tool-box.js +1 -1
- package/dist/components/undo-icon.d.ts +11 -0
- package/dist/components/undo-icon.js +9 -0
- package/dist/components/undo-icon.js.map +1 -0
- 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
- package/dist/esm/eraser-icon_16.entry.js +3107 -0
- package/dist/esm/eraser-icon_16.entry.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loading-widget.entry.js +2 -2
- package/dist/esm/loading-widget.entry.js.map +1 -1
- package/dist/esm/solar-calculator.entry.js +2 -2
- package/dist/esm/solar-calculator.entry.js.map +1 -1
- package/dist/esm/stencil-library.js +1 -1
- 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
- package/dist/stencil-library/loading-widget.entry.esm.js.map +1 -1
- package/dist/stencil-library/p-1acfe8c0.entry.js +32 -0
- package/dist/stencil-library/{p-04893dc6.entry.js.map → p-1acfe8c0.entry.js.map} +1 -1
- package/dist/stencil-library/p-1e2ddc82.entry.js +2 -0
- package/dist/stencil-library/p-1e2ddc82.entry.js.map +1 -0
- package/dist/stencil-library/p-56f8bd65.entry.js +2 -0
- package/dist/stencil-library/p-56f8bd65.entry.js.map +1 -0
- package/dist/stencil-library/solar-calculator.entry.esm.js.map +1 -1
- package/dist/stencil-library/stencil-library.esm.js +1 -1
- package/dist/types/components/icons/undo.d.ts +5 -0
- package/dist/types/components/map-draw/map-draw.d.ts +1 -0
- package/dist/types/components/map-draw/polygon-buttons.d.ts +1 -0
- package/dist/types/components/map-draw/tool-box.d.ts +1 -0
- package/dist/types/components/solar-expert/solar-expert.d.ts +1 -0
- package/dist/types/components/solar-system-form/solar-system-form.d.ts +3 -2
- package/dist/types/components.d.ts +21 -0
- package/dist/types/constants.d.ts +2 -1
- package/dist/types/types/lang.d.ts +5 -0
- package/dist/types/utils/render/tools.d.ts +2 -1
- package/dist/types/utils/simulation/simulation.d.ts +8 -0
- package/dist/types/utils/simulation/solarCurves.d.ts +3 -0
- package/dist/types/utils/simulation/types.d.ts +49 -0
- package/package.json +2 -2
- 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
- package/dist/cjs/eraser-icon_15.cjs.entry.js +0 -3007
- package/dist/cjs/eraser-icon_15.cjs.entry.js.map +0 -1
- package/dist/components/p-BJFgUvs3.js +0 -38
- package/dist/components/p-BJFgUvs3.js.map +0 -1
- package/dist/components/p-BP2JkbOB.js +0 -149
- package/dist/components/p-BP2JkbOB.js.map +0 -1
- package/dist/components/p-BSx-VRl1.js.map +0 -1
- package/dist/components/p-BfAeCWO4.js +0 -38
- package/dist/components/p-BfAeCWO4.js.map +0 -1
- package/dist/components/p-BilSpdUG.js +0 -94
- package/dist/components/p-BilSpdUG.js.map +0 -1
- package/dist/components/p-Bn39cXBR.js +0 -38
- package/dist/components/p-Bn39cXBR.js.map +0 -1
- package/dist/components/p-BzuGyPz5.js +0 -493
- package/dist/components/p-BzuGyPz5.js.map +0 -1
- package/dist/components/p-C4UfrfLc.js +0 -40
- package/dist/components/p-C4UfrfLc.js.map +0 -1
- package/dist/components/p-C5Qpifsm.js.map +0 -1
- package/dist/components/p-CesxKYgJ.js +0 -38
- package/dist/components/p-CesxKYgJ.js.map +0 -1
- package/dist/components/p-Cm-6HU5f.js +0 -38
- package/dist/components/p-Cm-6HU5f.js.map +0 -1
- package/dist/components/p-D93MrNOs.js +0 -174
- package/dist/components/p-D93MrNOs.js.map +0 -1
- package/dist/components/p-DSWRVBhO.js +0 -74
- package/dist/components/p-DSWRVBhO.js.map +0 -1
- package/dist/components/p-klKuBKKU.js +0 -149
- package/dist/components/p-klKuBKKU.js.map +0 -1
- package/dist/components/p-metMBa33.js +0 -38
- package/dist/components/p-metMBa33.js.map +0 -1
- package/dist/esm/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.entry.js.map +0 -1
- package/dist/esm/eraser-icon_15.entry.js +0 -2991
- package/dist/esm/eraser-icon_15.entry.js.map +0 -1
- 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
- package/dist/stencil-library/p-02607fda.entry.js +0 -2
- package/dist/stencil-library/p-02607fda.entry.js.map +0 -1
- package/dist/stencil-library/p-04893dc6.entry.js +0 -32
- package/dist/stencil-library/p-3af1ea82.entry.js +0 -2
- package/dist/stencil-library/p-3af1ea82.entry.js.map +0 -1
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, h } from './index.js';
|
|
2
2
|
import { f as fetchSolarData, b as getBuildingImages } from './p-Dw7R29Cg.js';
|
|
3
|
-
import { D as DOTTED_LINE_COLOR, C as COLUMN_SPACING, R as ROW_SPACING, d as defineCustomElement$
|
|
4
|
-
import { d as defineCustomElement$
|
|
5
|
-
import { l as latLngToPixel, d as defineCustomElement$
|
|
6
|
-
import { o as onChange, s as state, g as getLanguageStrings } from './p-
|
|
7
|
-
import { d as defineCustomElement$
|
|
8
|
-
import { d as defineCustomElement$
|
|
9
|
-
import { d as defineCustomElement$
|
|
10
|
-
import { d as defineCustomElement$
|
|
11
|
-
import { d as defineCustomElement$
|
|
12
|
-
import { d as defineCustomElement$
|
|
13
|
-
import { d as defineCustomElement$
|
|
14
|
-
import { d as defineCustomElement$
|
|
15
|
-
import { d as defineCustomElement$
|
|
3
|
+
import { D as DOTTED_LINE_COLOR, C as COLUMN_SPACING, R as ROW_SPACING, d as defineCustomElement$3, a as DEFAULT_SOLAR_EXPERT_CONFIG, b as DEFAULT_SOLAR_PANEL_TYPE, c as DEFAULT_SUNNINESS, B as BORDER_INSET } from './p-CmFUQbz_.js';
|
|
4
|
+
import { d as defineCustomElement$2, r as roofTool, t as tools, o as obstructionTool, m as moveTool, a as markRoofEdgeTool, b as deleteTool } from './p-C-_6TJs5.js';
|
|
5
|
+
import { l as latLngToPixel, d as defineCustomElement$7, g as getPixelInMeters, c as calculatePolygonArea } from './p-BxEeUA4s.js';
|
|
6
|
+
import { o as onChange, s as state, g as getLanguageStrings } from './p-CwVUc6Hq.js';
|
|
7
|
+
import { d as defineCustomElement$d } from './p-DYiK8eDp.js';
|
|
8
|
+
import { d as defineCustomElement$c } from './p-BrVkygdn.js';
|
|
9
|
+
import { d as defineCustomElement$b } from './p-CabEU06O.js';
|
|
10
|
+
import { d as defineCustomElement$a } from './p-BDrs1Te9.js';
|
|
11
|
+
import { d as defineCustomElement$9 } from './p-BDBrVfn4.js';
|
|
12
|
+
import { d as defineCustomElement$8 } from './p-CRnyqUKc.js';
|
|
13
|
+
import { d as defineCustomElement$6 } from './p-DI6_jwLe.js';
|
|
14
|
+
import { d as defineCustomElement$5 } from './p-BbXgEBG5.js';
|
|
15
|
+
import { d as defineCustomElement$4 } from './p-DPfpDV5e.js';
|
|
16
|
+
import { d as defineCustomElement$1 } from './p-CumvV0_M.js';
|
|
16
17
|
|
|
17
18
|
/*
|
|
18
19
|
Copyright 2023 Google LLC
|
|
@@ -777,7 +778,7 @@ function getOptimalSolarPositionFully(roof, obstacles, solarPanel, azimuth, inse
|
|
|
777
778
|
return unprojectedPanels;
|
|
778
779
|
}
|
|
779
780
|
|
|
780
|
-
const outputCss = "/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\",\n \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\",\n \"Courier New\", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-black: #000;\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-md: 28rem;\n --text-xs: 0.75rem;\n --text-xs--line-height: calc(1 / 0.75);\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-4xl: 2rem;\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type=\"button\"], [type=\"reset\"], [type=\"submit\"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=\"until-found\"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .right-4 {\n right: calc(var(--spacing) * 4);\n }\n .bottom-4 {\n bottom: calc(var(--spacing) * 4);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-10 {\n z-index: 10;\n }\n .z-20 {\n z-index: 20;\n }\n .z-50 {\n z-index: 50;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mt-6 {\n margin-top: calc(var(--spacing) * 6);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .mb-6 {\n margin-bottom: calc(var(--spacing) * 6);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .inline {\n display: inline;\n }\n .inline-block {\n display: inline-block;\n }\n .inline-flex {\n display: inline-flex;\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-\\[400px\\] {\n height: 400px;\n }\n .h-full {\n height: 100%;\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-md {\n max-width: var(--container-md);\n }\n .flex-1 {\n flex: 1;\n }\n .flex-3 {\n flex: 3;\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n .grid-rows-2 {\n grid-template-rows: repeat(2, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .flex-wrap {\n flex-wrap: wrap;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .items-stretch {\n align-items: stretch;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-0 {\n gap: calc(var(--spacing) * 0);\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-\\[\\#ffffff\\] {\n background-color: #ffffff;\n }\n .bg-black {\n background-color: var(--color-black);\n }\n .bg-gray-200 {\n background-color: var(--color-gray-200);\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-transparent {\n background-color: transparent;\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-1 {\n padding: calc(var(--spacing) * 1);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pb-4 {\n padding-bottom: calc(var(--spacing) * 4);\n }\n .pl-2 {\n padding-left: calc(var(--spacing) * 2);\n }\n .pl-4 {\n padding-left: calc(var(--spacing) * 4);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .text-xs {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-gray-700 {\n color: var(--color-gray-700);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .accent-\\[\\#964500\\] {\n accent-color: #964500;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .hover\\:bg-\\[\\#0000003c\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #0000003c;\n }\n }\n }\n .hover\\:bg-\\[\\#3a1b00\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #3a1b00;\n }\n }\n }\n .hover\\:bg-\\[\\#271200\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #271200;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .hover\\:bg-\\[\\#ffffff\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #ffffff;\n }\n }\n }\n .hover\\:bg-gray-200 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-200);\n }\n }\n }\n .hover\\:bg-gray-300 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-300);\n }\n }\n }\n .hover\\:bg-gray-500 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-500);\n }\n }\n }\n .hover\\:text-white {\n &:hover {\n @media (hover: hover) {\n color: var(--color-white);\n }\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#271200\\] {\n &:focus {\n --tw-ring-color: #271200;\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:ring-offset-0 {\n &:focus {\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:rounded-full {\n &::-webkit-slider-runnable-track {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:bg-black\\/25 {\n &::-webkit-slider-runnable-track {\n background-color: color-mix(in srgb, #000 25%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-black) 25%, transparent);\n }\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:h-\\[10px\\] {\n &::-webkit-slider-thumb {\n height: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:w-\\[10px\\] {\n &::-webkit-slider-thumb {\n width: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:appearance-none {\n &::-webkit-slider-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:rounded-full {\n &::-webkit-slider-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:bg-white {\n &::-webkit-slider-thumb {\n background-color: var(--color-white);\n }\n }\n}\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-duration {\n syntax: \"*\";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-duration: initial;\n }\n }\n}\n";
|
|
781
|
+
const outputCss = "/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */\n@layer properties;\n@layer theme, base, components, utilities;\n@layer theme {\n :root, :host {\n --font-sans: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\",\n \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\";\n --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\",\n \"Courier New\", monospace;\n --color-red-500: oklch(63.7% 0.237 25.331);\n --color-green-600: oklch(62.7% 0.194 149.214);\n --color-blue-500: oklch(62.3% 0.214 259.815);\n --color-gray-200: oklch(92.8% 0.006 264.531);\n --color-gray-300: oklch(87.2% 0.01 258.338);\n --color-gray-400: oklch(70.7% 0.022 261.325);\n --color-gray-500: oklch(55.1% 0.027 264.364);\n --color-gray-600: oklch(44.6% 0.03 256.802);\n --color-gray-700: oklch(37.3% 0.034 259.733);\n --color-gray-800: oklch(27.8% 0.033 256.848);\n --color-black: #000;\n --color-white: #fff;\n --spacing: 0.25rem;\n --container-md: 28rem;\n --text-xs: 0.75rem;\n --text-xs--line-height: calc(1 / 0.75);\n --text-sm: 0.875rem;\n --text-sm--line-height: calc(1.25 / 0.875);\n --text-lg: 1.125rem;\n --text-lg--line-height: calc(1.75 / 1.125);\n --text-xl: 1.25rem;\n --text-xl--line-height: calc(1.75 / 1.25);\n --text-2xl: 1.5rem;\n --text-2xl--line-height: calc(2 / 1.5);\n --font-weight-medium: 500;\n --font-weight-semibold: 600;\n --font-weight-bold: 700;\n --radius-lg: 0.5rem;\n --radius-4xl: 2rem;\n --animate-spin: spin 1s linear infinite;\n --default-transition-duration: 150ms;\n --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n --default-font-family: var(--font-sans);\n --default-mono-font-family: var(--font-mono);\n }\n}\n@layer base {\n *, ::after, ::before, ::backdrop, ::file-selector-button {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n border: 0 solid;\n }\n html, :host {\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n tab-size: 4;\n font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\");\n font-feature-settings: var(--default-font-feature-settings, normal);\n font-variation-settings: var(--default-font-variation-settings, normal);\n -webkit-tap-highlight-color: transparent;\n }\n hr {\n height: 0;\n color: inherit;\n border-top-width: 1px;\n }\n abbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n }\n h1, h2, h3, h4, h5, h6 {\n font-size: inherit;\n font-weight: inherit;\n }\n a {\n color: inherit;\n -webkit-text-decoration: inherit;\n text-decoration: inherit;\n }\n b, strong {\n font-weight: bolder;\n }\n code, kbd, samp, pre {\n font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace);\n font-feature-settings: var(--default-mono-font-feature-settings, normal);\n font-variation-settings: var(--default-mono-font-variation-settings, normal);\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub, sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n table {\n text-indent: 0;\n border-color: inherit;\n border-collapse: collapse;\n }\n :-moz-focusring {\n outline: auto;\n }\n progress {\n vertical-align: baseline;\n }\n summary {\n display: list-item;\n }\n ol, ul, menu {\n list-style: none;\n }\n img, svg, video, canvas, audio, iframe, embed, object {\n display: block;\n vertical-align: middle;\n }\n img, video {\n max-width: 100%;\n height: auto;\n }\n button, input, select, optgroup, textarea, ::file-selector-button {\n font: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n letter-spacing: inherit;\n color: inherit;\n border-radius: 0;\n background-color: transparent;\n opacity: 1;\n }\n :where(select:is([multiple], [size])) optgroup {\n font-weight: bolder;\n }\n :where(select:is([multiple], [size])) optgroup option {\n padding-inline-start: 20px;\n }\n ::file-selector-button {\n margin-inline-end: 4px;\n }\n ::placeholder {\n opacity: 1;\n }\n @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {\n ::placeholder {\n color: currentcolor;\n @supports (color: color-mix(in lab, red, red)) {\n color: color-mix(in oklab, currentcolor 50%, transparent);\n }\n }\n }\n textarea {\n resize: vertical;\n }\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-date-and-time-value {\n min-height: 1lh;\n text-align: inherit;\n }\n ::-webkit-datetime-edit {\n display: inline-flex;\n }\n ::-webkit-datetime-edit-fields-wrapper {\n padding: 0;\n }\n ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {\n padding-block: 0;\n }\n :-moz-ui-invalid {\n box-shadow: none;\n }\n button, input:where([type=\"button\"], [type=\"reset\"], [type=\"submit\"]), ::file-selector-button {\n appearance: button;\n }\n ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {\n height: auto;\n }\n [hidden]:where(:not([hidden=\"until-found\"])) {\n display: none !important;\n }\n}\n@layer utilities {\n .pointer-events-none {\n pointer-events: none;\n }\n .absolute {\n position: absolute;\n }\n .fixed {\n position: fixed;\n }\n .relative {\n position: relative;\n }\n .inset-0 {\n inset: calc(var(--spacing) * 0);\n }\n .top-0 {\n top: calc(var(--spacing) * 0);\n }\n .top-1\\/2 {\n top: calc(1/2 * 100%);\n }\n .bottom-full {\n bottom: 100%;\n }\n .left-0 {\n left: calc(var(--spacing) * 0);\n }\n .left-1\\/2 {\n left: calc(1/2 * 100%);\n }\n .left-3 {\n left: calc(var(--spacing) * 3);\n }\n .z-20 {\n z-index: 20;\n }\n .z-50 {\n z-index: 50;\n }\n .m-auto {\n margin: auto;\n }\n .mt-1 {\n margin-top: calc(var(--spacing) * 1);\n }\n .mt-4 {\n margin-top: calc(var(--spacing) * 4);\n }\n .mt-6 {\n margin-top: calc(var(--spacing) * 6);\n }\n .mb-1 {\n margin-bottom: calc(var(--spacing) * 1);\n }\n .mb-2 {\n margin-bottom: calc(var(--spacing) * 2);\n }\n .mb-4 {\n margin-bottom: calc(var(--spacing) * 4);\n }\n .mb-6 {\n margin-bottom: calc(var(--spacing) * 6);\n }\n .block {\n display: block;\n }\n .flex {\n display: flex;\n }\n .grid {\n display: grid;\n }\n .inline {\n display: inline;\n }\n .inline-block {\n display: inline-block;\n }\n .inline-flex {\n display: inline-flex;\n }\n .h-4 {\n height: calc(var(--spacing) * 4);\n }\n .h-5 {\n height: calc(var(--spacing) * 5);\n }\n .h-16 {\n height: calc(var(--spacing) * 16);\n }\n .h-48 {\n height: calc(var(--spacing) * 48);\n }\n .h-\\[400px\\] {\n height: 400px;\n }\n .h-full {\n height: 100%;\n }\n .w-4 {\n width: calc(var(--spacing) * 4);\n }\n .w-5 {\n width: calc(var(--spacing) * 5);\n }\n .w-16 {\n width: calc(var(--spacing) * 16);\n }\n .w-64 {\n width: calc(var(--spacing) * 64);\n }\n .w-full {\n width: 100%;\n }\n .max-w-md {\n max-width: var(--container-md);\n }\n .flex-1 {\n flex: 1;\n }\n .flex-3 {\n flex: 3;\n }\n .-translate-x-1\\/2 {\n --tw-translate-x: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .-translate-y-1\\/2 {\n --tw-translate-y: calc(calc(1/2 * 100%) * -1);\n translate: var(--tw-translate-x) var(--tw-translate-y);\n }\n .transform {\n transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);\n }\n .animate-spin {\n animation: var(--animate-spin);\n }\n .cursor-help {\n cursor: help;\n }\n .appearance-none {\n appearance: none;\n }\n .grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n }\n .grid-cols-3 {\n grid-template-columns: repeat(3, minmax(0, 1fr));\n }\n .grid-rows-2 {\n grid-template-rows: repeat(2, minmax(0, 1fr));\n }\n .grid-rows-3 {\n grid-template-rows: repeat(3, minmax(0, 1fr));\n }\n .flex-col {\n flex-direction: column;\n }\n .flex-row {\n flex-direction: row;\n }\n .flex-wrap {\n flex-wrap: wrap;\n }\n .items-center {\n align-items: center;\n }\n .items-start {\n align-items: flex-start;\n }\n .items-stretch {\n align-items: stretch;\n }\n .justify-between {\n justify-content: space-between;\n }\n .justify-center {\n justify-content: center;\n }\n .justify-end {\n justify-content: flex-end;\n }\n .justify-start {\n justify-content: flex-start;\n }\n .gap-0 {\n gap: calc(var(--spacing) * 0);\n }\n .gap-1 {\n gap: calc(var(--spacing) * 1);\n }\n .gap-2 {\n gap: calc(var(--spacing) * 2);\n }\n .gap-4 {\n gap: calc(var(--spacing) * 4);\n }\n .space-y-4 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .space-y-6 {\n :where(& > :not(:last-child)) {\n --tw-space-y-reverse: 0;\n margin-block-start: calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));\n margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));\n }\n }\n .rounded {\n border-radius: 0.25rem;\n }\n .rounded-4xl {\n border-radius: var(--radius-4xl);\n }\n .rounded-full {\n border-radius: calc(infinity * 1px);\n }\n .rounded-lg {\n border-radius: var(--radius-lg);\n }\n .border {\n border-style: var(--tw-border-style);\n border-width: 1px;\n }\n .border-t {\n border-top-style: var(--tw-border-style);\n border-top-width: 1px;\n }\n .border-t-2 {\n border-top-style: var(--tw-border-style);\n border-top-width: 2px;\n }\n .border-b-2 {\n border-bottom-style: var(--tw-border-style);\n border-bottom-width: 2px;\n }\n .border-\\[\\#271200\\] {\n border-color: #271200;\n }\n .border-gray-200 {\n border-color: var(--color-gray-200);\n }\n .border-gray-300 {\n border-color: var(--color-gray-300);\n }\n .border-red-500 {\n border-color: var(--color-red-500);\n }\n .bg-\\[\\#00000056\\] {\n background-color: #00000056;\n }\n .bg-\\[\\#271200\\] {\n background-color: #271200;\n }\n .bg-\\[\\#f3ebda\\] {\n background-color: #f3ebda;\n }\n .bg-\\[\\#ffffff\\] {\n background-color: #ffffff;\n }\n .bg-black {\n background-color: var(--color-black);\n }\n .bg-gray-200 {\n background-color: var(--color-gray-200);\n }\n .bg-gray-800 {\n background-color: var(--color-gray-800);\n }\n .bg-transparent {\n background-color: transparent;\n }\n .bg-white {\n background-color: var(--color-white);\n }\n .p-1 {\n padding: calc(var(--spacing) * 1);\n }\n .p-2 {\n padding: calc(var(--spacing) * 2);\n }\n .p-3 {\n padding: calc(var(--spacing) * 3);\n }\n .p-4 {\n padding: calc(var(--spacing) * 4);\n }\n .p-6 {\n padding: calc(var(--spacing) * 6);\n }\n .px-4 {\n padding-inline: calc(var(--spacing) * 4);\n }\n .py-2 {\n padding-block: calc(var(--spacing) * 2);\n }\n .pt-2 {\n padding-top: calc(var(--spacing) * 2);\n }\n .pt-4 {\n padding-top: calc(var(--spacing) * 4);\n }\n .pt-7 {\n padding-top: calc(var(--spacing) * 7);\n }\n .pr-4 {\n padding-right: calc(var(--spacing) * 4);\n }\n .pb-3 {\n padding-bottom: calc(var(--spacing) * 3);\n }\n .pb-4 {\n padding-bottom: calc(var(--spacing) * 4);\n }\n .pl-2 {\n padding-left: calc(var(--spacing) * 2);\n }\n .pl-4 {\n padding-left: calc(var(--spacing) * 4);\n }\n .pl-10 {\n padding-left: calc(var(--spacing) * 10);\n }\n .text-center {\n text-align: center;\n }\n .text-2xl {\n font-size: var(--text-2xl);\n line-height: var(--tw-leading, var(--text-2xl--line-height));\n }\n .text-lg {\n font-size: var(--text-lg);\n line-height: var(--tw-leading, var(--text-lg--line-height));\n }\n .text-sm {\n font-size: var(--text-sm);\n line-height: var(--tw-leading, var(--text-sm--line-height));\n }\n .text-xl {\n font-size: var(--text-xl);\n line-height: var(--tw-leading, var(--text-xl--line-height));\n }\n .text-xs {\n font-size: var(--text-xs);\n line-height: var(--tw-leading, var(--text-xs--line-height));\n }\n .font-bold {\n --tw-font-weight: var(--font-weight-bold);\n font-weight: var(--font-weight-bold);\n }\n .font-medium {\n --tw-font-weight: var(--font-weight-medium);\n font-weight: var(--font-weight-medium);\n }\n .font-semibold {\n --tw-font-weight: var(--font-weight-semibold);\n font-weight: var(--font-weight-semibold);\n }\n .text-\\[\\#271200\\] {\n color: #271200;\n }\n .text-gray-400 {\n color: var(--color-gray-400);\n }\n .text-gray-500 {\n color: var(--color-gray-500);\n }\n .text-gray-600 {\n color: var(--color-gray-600);\n }\n .text-gray-700 {\n color: var(--color-gray-700);\n }\n .text-green-600 {\n color: var(--color-green-600);\n }\n .text-red-500 {\n color: var(--color-red-500);\n }\n .text-white {\n color: var(--color-white);\n }\n .accent-\\[\\#964500\\] {\n accent-color: #964500;\n }\n .opacity-0 {\n opacity: 0%;\n }\n .shadow {\n --tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n .transition-colors {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .transition-opacity {\n transition-property: opacity;\n transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));\n transition-duration: var(--tw-duration, var(--default-transition-duration));\n }\n .duration-200 {\n --tw-duration: 200ms;\n transition-duration: 200ms;\n }\n .group-hover\\:opacity-100 {\n &:is(:where(.group):hover *) {\n @media (hover: hover) {\n opacity: 100%;\n }\n }\n }\n .hover\\:bg-\\[\\#0000003c\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #0000003c;\n }\n }\n }\n .hover\\:bg-\\[\\#3a1b00\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #3a1b00;\n }\n }\n }\n .hover\\:bg-\\[\\#271200\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #271200;\n }\n }\n }\n .hover\\:bg-\\[\\#964500\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #964500;\n }\n }\n }\n .hover\\:bg-\\[\\#ffffff\\] {\n &:hover {\n @media (hover: hover) {\n background-color: #ffffff;\n }\n }\n }\n .hover\\:bg-gray-200 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-200);\n }\n }\n }\n .hover\\:bg-gray-300 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-300);\n }\n }\n }\n .hover\\:bg-gray-500 {\n &:hover {\n @media (hover: hover) {\n background-color: var(--color-gray-500);\n }\n }\n }\n .hover\\:text-white {\n &:hover {\n @media (hover: hover) {\n color: var(--color-white);\n }\n }\n }\n .focus\\:border-2 {\n &:focus {\n border-style: var(--tw-border-style);\n border-width: 2px;\n }\n }\n .focus\\:border-black {\n &:focus {\n border-color: var(--color-black);\n }\n }\n .focus\\:border-transparent {\n &:focus {\n border-color: transparent;\n }\n }\n .focus\\:ring-2 {\n &:focus {\n --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);\n box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);\n }\n }\n .focus\\:ring-\\[\\#271200\\] {\n &:focus {\n --tw-ring-color: #271200;\n }\n }\n .focus\\:ring-\\[\\#964500\\] {\n &:focus {\n --tw-ring-color: #964500;\n }\n }\n .focus\\:ring-blue-500 {\n &:focus {\n --tw-ring-color: var(--color-blue-500);\n }\n }\n .focus\\:ring-offset-0 {\n &:focus {\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-shadow: var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n }\n }\n .focus\\:outline-none {\n &:focus {\n --tw-outline-style: none;\n outline-style: none;\n }\n }\n .lg\\:gap-4 {\n @media (width >= 64rem) {\n gap: calc(var(--spacing) * 4);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:rounded-full {\n &::-webkit-slider-runnable-track {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-runnable-track\\]\\:bg-black\\/25 {\n &::-webkit-slider-runnable-track {\n background-color: color-mix(in srgb, #000 25%, transparent);\n @supports (color: color-mix(in lab, red, red)) {\n background-color: color-mix(in oklab, var(--color-black) 25%, transparent);\n }\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:h-\\[10px\\] {\n &::-webkit-slider-thumb {\n height: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:w-\\[10px\\] {\n &::-webkit-slider-thumb {\n width: 10px;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:appearance-none {\n &::-webkit-slider-thumb {\n appearance: none;\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:rounded-full {\n &::-webkit-slider-thumb {\n border-radius: calc(infinity * 1px);\n }\n }\n .\\[\\&\\:\\:-webkit-slider-thumb\\]\\:bg-white {\n &::-webkit-slider-thumb {\n background-color: var(--color-white);\n }\n }\n}\n@property --tw-translate-x {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-y {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-translate-z {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-rotate-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-rotate-z {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-x {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-skew-y {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-space-y-reverse {\n syntax: \"*\";\n inherits: false;\n initial-value: 0;\n}\n@property --tw-border-style {\n syntax: \"*\";\n inherits: false;\n initial-value: solid;\n}\n@property --tw-font-weight {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-inset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-shadow-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-shadow-alpha {\n syntax: \"<percentage>\";\n inherits: false;\n initial-value: 100%;\n}\n@property --tw-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-inset-ring-color {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-inset-ring-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-ring-inset {\n syntax: \"*\";\n inherits: false;\n}\n@property --tw-ring-offset-width {\n syntax: \"<length>\";\n inherits: false;\n initial-value: 0px;\n}\n@property --tw-ring-offset-color {\n syntax: \"*\";\n inherits: false;\n initial-value: #fff;\n}\n@property --tw-ring-offset-shadow {\n syntax: \"*\";\n inherits: false;\n initial-value: 0 0 #0000;\n}\n@property --tw-duration {\n syntax: \"*\";\n inherits: false;\n}\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n@layer properties {\n @supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {\n *, ::before, ::after, ::backdrop {\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-translate-z: 0;\n --tw-rotate-x: initial;\n --tw-rotate-y: initial;\n --tw-rotate-z: initial;\n --tw-skew-x: initial;\n --tw-skew-y: initial;\n --tw-space-y-reverse: 0;\n --tw-border-style: solid;\n --tw-font-weight: initial;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-color: initial;\n --tw-shadow-alpha: 100%;\n --tw-inset-shadow: 0 0 #0000;\n --tw-inset-shadow-color: initial;\n --tw-inset-shadow-alpha: 100%;\n --tw-ring-color: initial;\n --tw-ring-shadow: 0 0 #0000;\n --tw-inset-ring-color: initial;\n --tw-inset-ring-shadow: 0 0 #0000;\n --tw-ring-inset: initial;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-duration: initial;\n }\n }\n}\n";
|
|
781
782
|
|
|
782
783
|
const MapDraw = /*@__PURE__*/ proxyCustomElement(class MapDraw extends H {
|
|
783
784
|
constructor() {
|
|
@@ -882,7 +883,7 @@ const MapDraw = /*@__PURE__*/ proxyCustomElement(class MapDraw extends H {
|
|
|
882
883
|
// If on mobile, automatically calculate panels using Google API data
|
|
883
884
|
if (state.isMobile && this.buildingInsights) {
|
|
884
885
|
const maxPanels = this.buildingInsights.solarPotential.maxArrayPanelsCount;
|
|
885
|
-
const approximatedPanels = Math.floor(maxPanels /
|
|
886
|
+
const approximatedPanels = Math.floor(maxPanels * 3 / 4); // Use two thirds of max panels
|
|
886
887
|
const positionedPanels = Array(approximatedPanels).fill(null)
|
|
887
888
|
.map((_, __) => ({
|
|
888
889
|
panel: this.solarPanel,
|
|
@@ -946,6 +947,7 @@ const MapDraw = /*@__PURE__*/ proxyCustomElement(class MapDraw extends H {
|
|
|
946
947
|
const { x, y } = this.convertToCanvasCoordinates(event);
|
|
947
948
|
this.mousePoint = { x, y };
|
|
948
949
|
const currentPolygon = this.getCurrentPolygon();
|
|
950
|
+
let redraw = false;
|
|
949
951
|
if (this.currentTool.name === "markRoofEdge") {
|
|
950
952
|
let distances = [];
|
|
951
953
|
for (let i = 0; i < currentPolygon?.points.length; i++) {
|
|
@@ -964,6 +966,11 @@ const MapDraw = /*@__PURE__*/ proxyCustomElement(class MapDraw extends H {
|
|
|
964
966
|
const closestEdge = distances.sort((a, b) => a.dist - b.dist)[0];
|
|
965
967
|
if (closestEdge && (closestEdge.dist < 10)) {
|
|
966
968
|
this.highlightedEdge = closestEdge.edge;
|
|
969
|
+
redraw = true;
|
|
970
|
+
}
|
|
971
|
+
else if (this.highlightedEdge) {
|
|
972
|
+
this.highlightedEdge = null;
|
|
973
|
+
redraw = true;
|
|
967
974
|
}
|
|
968
975
|
}
|
|
969
976
|
// Check for point hover
|
|
@@ -995,7 +1002,7 @@ const MapDraw = /*@__PURE__*/ proxyCustomElement(class MapDraw extends H {
|
|
|
995
1002
|
JSON.stringify(this.hoveredPolygon)) {
|
|
996
1003
|
this.hoveredPointIndex = newHoveredPointIndex;
|
|
997
1004
|
this.hoveredPolygon = newHoveredPolygon;
|
|
998
|
-
|
|
1005
|
+
redraw = true;
|
|
999
1006
|
}
|
|
1000
1007
|
// Handle dragging
|
|
1001
1008
|
if (this.draggedPointIndex !== null && currentPolygon &&
|
|
@@ -1008,9 +1015,12 @@ const MapDraw = /*@__PURE__*/ proxyCustomElement(class MapDraw extends H {
|
|
|
1008
1015
|
(metersInPixels * metersInPixels);
|
|
1009
1016
|
currentPolygon.details.area = area;
|
|
1010
1017
|
}
|
|
1011
|
-
|
|
1018
|
+
redraw = true;
|
|
1012
1019
|
}
|
|
1013
1020
|
if (this.shiftKeyPressed) {
|
|
1021
|
+
redraw = true;
|
|
1022
|
+
}
|
|
1023
|
+
if (redraw) {
|
|
1014
1024
|
this.drawPolygons();
|
|
1015
1025
|
}
|
|
1016
1026
|
}
|
|
@@ -1117,7 +1127,31 @@ const MapDraw = /*@__PURE__*/ proxyCustomElement(class MapDraw extends H {
|
|
|
1117
1127
|
this.altKeyPressed = false;
|
|
1118
1128
|
}
|
|
1119
1129
|
}
|
|
1130
|
+
undo() {
|
|
1131
|
+
const currentPolygon = this.getCurrentPolygon();
|
|
1132
|
+
if (!currentPolygon) {
|
|
1133
|
+
return;
|
|
1134
|
+
}
|
|
1135
|
+
if (currentPolygon.closed) {
|
|
1136
|
+
currentPolygon.closed = false;
|
|
1137
|
+
if (currentPolygon.type === "roof") {
|
|
1138
|
+
delete this.roofPolygonsSolarPanels[currentPolygon._id];
|
|
1139
|
+
this.currentTool = roofTool;
|
|
1140
|
+
this.highlightedEdge = null;
|
|
1141
|
+
}
|
|
1142
|
+
else if (currentPolygon.type === "obstruction") {
|
|
1143
|
+
this.currentTool = obstructionTool;
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
else {
|
|
1147
|
+
currentPolygon.points.pop();
|
|
1148
|
+
}
|
|
1149
|
+
this.drawPolygons();
|
|
1150
|
+
}
|
|
1120
1151
|
handleMouseDown(event) {
|
|
1152
|
+
if (this.currentTool.name === "undo") {
|
|
1153
|
+
return;
|
|
1154
|
+
}
|
|
1121
1155
|
if (state.isMobile)
|
|
1122
1156
|
return; // Prevent interactions on mobile
|
|
1123
1157
|
if (!this.polygonCanvas || !this.polygonCtx)
|
|
@@ -1126,11 +1160,15 @@ const MapDraw = /*@__PURE__*/ proxyCustomElement(class MapDraw extends H {
|
|
|
1126
1160
|
return;
|
|
1127
1161
|
let { x, y } = this.convertToCanvasCoordinates(event);
|
|
1128
1162
|
if (this.currentTool.name === "markRoofEdge") {
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1163
|
+
if (!this.highlightedEdge) {
|
|
1164
|
+
return;
|
|
1165
|
+
}
|
|
1166
|
+
const x = this.highlightedEdge.pointA.x -
|
|
1167
|
+
this.highlightedEdge.pointB.x;
|
|
1168
|
+
const y = this.highlightedEdge.pointA.y -
|
|
1169
|
+
this.highlightedEdge.pointB.y;
|
|
1133
1170
|
const azimuth = Math.atan2(-x, y) * (180 / Math.PI);
|
|
1171
|
+
this.calculateSolarPanels();
|
|
1134
1172
|
this.handleAzimuthChange({
|
|
1135
1173
|
target: {
|
|
1136
1174
|
value: azimuth,
|
|
@@ -1157,10 +1195,10 @@ const MapDraw = /*@__PURE__*/ proxyCustomElement(class MapDraw extends H {
|
|
|
1157
1195
|
this.drawPolygons();
|
|
1158
1196
|
return;
|
|
1159
1197
|
}
|
|
1198
|
+
const currentPolygon = this.getCurrentPolygon();
|
|
1160
1199
|
if (this.currentTool.name === "move") {
|
|
1161
1200
|
// Check if we're clicking on a point of the selected polygon
|
|
1162
1201
|
if (this.selectedPolygon) {
|
|
1163
|
-
const currentPolygon = this.getCurrentPolygon();
|
|
1164
1202
|
const pointIndex = currentPolygon?.points.findIndex((point) => {
|
|
1165
1203
|
const distance = Math.sqrt(Math.pow(x - point.x, 2) + Math.pow(y - point.y, 2));
|
|
1166
1204
|
return distance < 10;
|
|
@@ -1178,7 +1216,8 @@ const MapDraw = /*@__PURE__*/ proxyCustomElement(class MapDraw extends H {
|
|
|
1178
1216
|
this.drawPolygons();
|
|
1179
1217
|
return;
|
|
1180
1218
|
}
|
|
1181
|
-
if (!this.selectedPolygon ||
|
|
1219
|
+
if (!this.selectedPolygon || currentPolygon?.closed ||
|
|
1220
|
+
this.currentTool.name !== this.selectedPolygon?.type) {
|
|
1182
1221
|
// no polygon is active, create a new one
|
|
1183
1222
|
const newPolygon = {
|
|
1184
1223
|
_id: v4(),
|
|
@@ -1205,10 +1244,6 @@ const MapDraw = /*@__PURE__*/ proxyCustomElement(class MapDraw extends H {
|
|
|
1205
1244
|
this.drawPolygons();
|
|
1206
1245
|
return;
|
|
1207
1246
|
}
|
|
1208
|
-
const { _id, type } = this.selectedPolygon;
|
|
1209
|
-
const currentPolygon = type === "roof"
|
|
1210
|
-
? this.roofPolygons[_id]
|
|
1211
|
-
: this.obstructionPolygons[_id];
|
|
1212
1247
|
if (currentPolygon.closed) {
|
|
1213
1248
|
return;
|
|
1214
1249
|
}
|
|
@@ -1270,7 +1305,7 @@ const MapDraw = /*@__PURE__*/ proxyCustomElement(class MapDraw extends H {
|
|
|
1270
1305
|
this.drawPolygons();
|
|
1271
1306
|
this.currentTool = moveTool;
|
|
1272
1307
|
}
|
|
1273
|
-
calculateSolarPanels() {
|
|
1308
|
+
calculateSolarPanels({ redraw = true } = {}) {
|
|
1274
1309
|
const currentPolygon = this.getCurrentPolygon();
|
|
1275
1310
|
if (!currentPolygon.details) {
|
|
1276
1311
|
return;
|
|
@@ -1296,7 +1331,9 @@ const MapDraw = /*@__PURE__*/ proxyCustomElement(class MapDraw extends H {
|
|
|
1296
1331
|
DEFAULT_SUNNINESS,
|
|
1297
1332
|
},
|
|
1298
1333
|
};
|
|
1299
|
-
|
|
1334
|
+
if (redraw) {
|
|
1335
|
+
this.drawPolygons();
|
|
1336
|
+
}
|
|
1300
1337
|
}
|
|
1301
1338
|
handlePitchChange(event) {
|
|
1302
1339
|
const target = event.target;
|
|
@@ -1325,6 +1362,13 @@ const MapDraw = /*@__PURE__*/ proxyCustomElement(class MapDraw extends H {
|
|
|
1325
1362
|
}
|
|
1326
1363
|
}
|
|
1327
1364
|
handleToolSelect(tool) {
|
|
1365
|
+
const currentPolygon = this.getCurrentPolygon();
|
|
1366
|
+
if (currentPolygon && !currentPolygon.closed &&
|
|
1367
|
+
currentPolygon.points.length > 0) {
|
|
1368
|
+
alert("Please close the polygon before selecting a tool");
|
|
1369
|
+
// TODO translate
|
|
1370
|
+
return;
|
|
1371
|
+
}
|
|
1328
1372
|
this.currentTool = tool;
|
|
1329
1373
|
}
|
|
1330
1374
|
scrollToCanvas() {
|
|
@@ -1346,24 +1390,24 @@ const MapDraw = /*@__PURE__*/ proxyCustomElement(class MapDraw extends H {
|
|
|
1346
1390
|
render() {
|
|
1347
1391
|
const t = getLanguageStrings(state.settings.language);
|
|
1348
1392
|
const currentPolygon = this.getCurrentPolygon();
|
|
1349
|
-
return (h("div", { key: '
|
|
1393
|
+
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
|
|
1350
1394
|
? (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))
|
|
1351
|
-
: (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: '
|
|
1395
|
+
: (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: {
|
|
1352
1396
|
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
1353
1397
|
} }, t.mapDraw.noAddressSelected))), (state.latitude && state.longitude &&
|
|
1354
|
-
this.loadingState === "loading") && (h("div", { key: '
|
|
1398
|
+
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: {
|
|
1355
1399
|
aspectRatio: this.rgbTiff
|
|
1356
1400
|
? `${this.rgbTiff.width}/${this.rgbTiff.height}`
|
|
1357
1401
|
: "1/1",
|
|
1358
|
-
} }, h("canvas", { key: '
|
|
1402
|
+
} }, 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: {
|
|
1359
1403
|
cursor: this.currentTool.cursor,
|
|
1360
|
-
} }), h("canvas", { key: '
|
|
1404
|
+
} }), h("canvas", { key: 'e645e24ee02ddae97d2a8f81c1107a47e10b3a30', ref: (el) => this.polygonCanvas = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", style: {
|
|
1361
1405
|
cursor: this.currentTool.cursor,
|
|
1362
|
-
} }), currentPolygon?.
|
|
1406
|
+
} }))), 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
|
|
1363
1407
|
? this
|
|
1364
1408
|
.roofPolygonsSolarPanels[currentPolygon._id]
|
|
1365
1409
|
?.positionedPanels
|
|
1366
|
-
: undefined, handleAzimuthChange: (event) => this.handleAzimuthChange(event), handlePitchChange: (event) => this.handlePitchChange(event), calculateSolarPanels: () => this.calculateSolarPanels() }))), h("div", { key: '
|
|
1410
|
+
: 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 }))));
|
|
1367
1411
|
}
|
|
1368
1412
|
static get watchers() { return {
|
|
1369
1413
|
"rgbTiff": ["drawMap"],
|
|
@@ -1404,7 +1448,7 @@ function defineCustomElement() {
|
|
|
1404
1448
|
if (typeof customElements === "undefined") {
|
|
1405
1449
|
return;
|
|
1406
1450
|
}
|
|
1407
|
-
const components = ["map-draw", "eraser-icon", "house-icon", "icon-selector", "move-icon", "octagon-minus-icon", "polygon-buttons", "polygon-information", "search-icon", "settings-icon", "settings-modal", "solar-system-form", "tool-box"];
|
|
1451
|
+
const components = ["map-draw", "eraser-icon", "house-icon", "icon-selector", "move-icon", "octagon-minus-icon", "polygon-buttons", "polygon-information", "search-icon", "settings-icon", "settings-modal", "solar-system-form", "tool-box", "undo-icon"];
|
|
1408
1452
|
components.forEach(tagName => { switch (tagName) {
|
|
1409
1453
|
case "map-draw":
|
|
1410
1454
|
if (!customElements.get(tagName)) {
|
|
@@ -1413,60 +1457,65 @@ function defineCustomElement() {
|
|
|
1413
1457
|
break;
|
|
1414
1458
|
case "eraser-icon":
|
|
1415
1459
|
if (!customElements.get(tagName)) {
|
|
1416
|
-
defineCustomElement$
|
|
1460
|
+
defineCustomElement$d();
|
|
1417
1461
|
}
|
|
1418
1462
|
break;
|
|
1419
1463
|
case "house-icon":
|
|
1420
1464
|
if (!customElements.get(tagName)) {
|
|
1421
|
-
defineCustomElement$
|
|
1465
|
+
defineCustomElement$c();
|
|
1422
1466
|
}
|
|
1423
1467
|
break;
|
|
1424
1468
|
case "icon-selector":
|
|
1425
1469
|
if (!customElements.get(tagName)) {
|
|
1426
|
-
defineCustomElement$
|
|
1470
|
+
defineCustomElement$b();
|
|
1427
1471
|
}
|
|
1428
1472
|
break;
|
|
1429
1473
|
case "move-icon":
|
|
1430
1474
|
if (!customElements.get(tagName)) {
|
|
1431
|
-
defineCustomElement$
|
|
1475
|
+
defineCustomElement$a();
|
|
1432
1476
|
}
|
|
1433
1477
|
break;
|
|
1434
1478
|
case "octagon-minus-icon":
|
|
1435
1479
|
if (!customElements.get(tagName)) {
|
|
1436
|
-
defineCustomElement$
|
|
1480
|
+
defineCustomElement$9();
|
|
1437
1481
|
}
|
|
1438
1482
|
break;
|
|
1439
1483
|
case "polygon-buttons":
|
|
1440
1484
|
if (!customElements.get(tagName)) {
|
|
1441
|
-
defineCustomElement$
|
|
1485
|
+
defineCustomElement$8();
|
|
1442
1486
|
}
|
|
1443
1487
|
break;
|
|
1444
1488
|
case "polygon-information":
|
|
1445
1489
|
if (!customElements.get(tagName)) {
|
|
1446
|
-
defineCustomElement$
|
|
1490
|
+
defineCustomElement$7();
|
|
1447
1491
|
}
|
|
1448
1492
|
break;
|
|
1449
1493
|
case "search-icon":
|
|
1450
1494
|
if (!customElements.get(tagName)) {
|
|
1451
|
-
defineCustomElement$
|
|
1495
|
+
defineCustomElement$6();
|
|
1452
1496
|
}
|
|
1453
1497
|
break;
|
|
1454
1498
|
case "settings-icon":
|
|
1455
1499
|
if (!customElements.get(tagName)) {
|
|
1456
|
-
defineCustomElement$
|
|
1500
|
+
defineCustomElement$5();
|
|
1457
1501
|
}
|
|
1458
1502
|
break;
|
|
1459
1503
|
case "settings-modal":
|
|
1460
1504
|
if (!customElements.get(tagName)) {
|
|
1461
|
-
defineCustomElement$
|
|
1505
|
+
defineCustomElement$4();
|
|
1462
1506
|
}
|
|
1463
1507
|
break;
|
|
1464
1508
|
case "solar-system-form":
|
|
1465
1509
|
if (!customElements.get(tagName)) {
|
|
1466
|
-
defineCustomElement$
|
|
1510
|
+
defineCustomElement$3();
|
|
1467
1511
|
}
|
|
1468
1512
|
break;
|
|
1469
1513
|
case "tool-box":
|
|
1514
|
+
if (!customElements.get(tagName)) {
|
|
1515
|
+
defineCustomElement$2();
|
|
1516
|
+
}
|
|
1517
|
+
break;
|
|
1518
|
+
case "undo-icon":
|
|
1470
1519
|
if (!customElements.get(tagName)) {
|
|
1471
1520
|
defineCustomElement$1();
|
|
1472
1521
|
}
|
|
@@ -1476,6 +1525,6 @@ function defineCustomElement() {
|
|
|
1476
1525
|
defineCustomElement();
|
|
1477
1526
|
|
|
1478
1527
|
export { MapDraw as M, defineCustomElement as d };
|
|
1479
|
-
//# sourceMappingURL=p-
|
|
1528
|
+
//# sourceMappingURL=p-CPLDlLfb.js.map
|
|
1480
1529
|
|
|
1481
|
-
//# sourceMappingURL=p-
|
|
1530
|
+
//# sourceMappingURL=p-CPLDlLfb.js.map
|