blue-chestnut-solar-expert 0.0.67 → 0.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/stencil-library/assets/tutorial4.mp4 +0 -0
- package/dist/{collection/config.js → stencil-library/config-CWfV1nKn.js} +10 -4
- package/dist/stencil-library/config-CWfV1nKn.js.map +1 -0
- package/dist/stencil-library/constants-hboFofU4.js +1522 -0
- package/dist/stencil-library/constants-hboFofU4.js.map +1 -0
- package/dist/stencil-library/decoder-DNOvLSaS.js +39 -0
- package/dist/stencil-library/decoder-DNOvLSaS.js.map +1 -0
- package/dist/stencil-library/deflate-0Vdd6-55.js +21 -0
- package/dist/{esm/deflate-DHgPf9CO.js.map → stencil-library/deflate-0Vdd6-55.js.map} +1 -1
- package/dist/stencil-library/eraser-icon.entry.esm.js.map +1 -0
- package/dist/{components/p-CL74Q4VR.js → stencil-library/eraser-icon.entry.js} +9 -27
- package/dist/stencil-library/eraser-icon.entry.js.map +1 -0
- package/dist/stencil-library/house-icon.entry.esm.js.map +1 -0
- package/dist/{components/p-D8w3bTPO.js → stencil-library/house-icon.entry.js} +9 -27
- package/dist/stencil-library/house-icon.entry.js.map +1 -0
- package/dist/{components/loading-widget.js → stencil-library/icon-selector.entry.esm.js.map} +1 -38
- package/dist/stencil-library/icon-selector.entry.js +47 -0
- package/dist/stencil-library/icon-selector.entry.js.map +1 -0
- package/dist/stencil-library/index-CChkgM3J.js +414 -0
- package/dist/stencil-library/index-CChkgM3J.js.map +1 -0
- package/dist/stencil-library/index-ICfDNUMe.js +4172 -0
- package/dist/stencil-library/index-ICfDNUMe.js.map +1 -0
- package/dist/stencil-library/index.esm.js +13 -1
- package/dist/stencil-library/index.esm.js.map +1 -1
- package/dist/{esm/jpeg-CJLm1GkA.js → stencil-library/jpeg-Dd5nnHR5.js} +11 -3
- package/dist/stencil-library/jpeg-Dd5nnHR5.js.map +1 -0
- package/dist/{components/p-BcVa4_YP.js → stencil-library/lerc-7W4E8EBs.js} +27 -1981
- package/dist/stencil-library/lerc-7W4E8EBs.js.map +1 -0
- package/dist/{esm → stencil-library}/loading-widget.entry.js +3 -3
- package/dist/{components/p-P28NBglk.js.map → stencil-library/loading-widget.entry.js.map} +1 -1
- package/dist/{esm/lzw-DaOzWJUD.js → stencil-library/lzw--P4c0ZHH.js} +10 -4
- package/dist/stencil-library/lzw--P4c0ZHH.js.map +1 -0
- package/dist/stencil-library/map-draw-Cx9WZoKH.js +25567 -0
- package/dist/stencil-library/map-draw-Cx9WZoKH.js.map +1 -0
- package/dist/stencil-library/map-draw.entry.esm.js.map +1 -0
- package/dist/stencil-library/map-draw.entry.js +12 -0
- package/dist/stencil-library/map-draw.entry.js.map +1 -0
- package/dist/stencil-library/map-selector.entry.esm.js.map +1 -0
- package/dist/{components/p-C5QieOat.js → stencil-library/map-selector.entry.js} +164 -96
- package/dist/stencil-library/map-selector.entry.js.map +1 -0
- package/dist/{components/loading-widget.js.map → stencil-library/marker-icon.entry.esm.js.map} +1 -1
- package/dist/{components/p-Umz6nJIv.js → stencil-library/marker-icon.entry.js} +9 -27
- package/dist/stencil-library/marker-icon.entry.js.map +1 -0
- package/dist/stencil-library/move-icon.entry.esm.js.map +1 -0
- package/dist/{components/p-FdEV2qPo.js → stencil-library/move-icon.entry.js} +9 -27
- package/dist/stencil-library/move-icon.entry.js.map +1 -0
- package/dist/{components/p-DTXeHbuh.js.map → stencil-library/octagon-minus-icon.entry.esm.js.map} +1 -1
- package/dist/{components/p-BJLO76Yi.js → stencil-library/octagon-minus-icon.entry.js} +9 -27
- package/dist/stencil-library/octagon-minus-icon.entry.js.map +1 -0
- package/dist/{components/p-ByX6QP-E.js → stencil-library/packbits-X3R_utTs.js} +9 -3
- package/dist/stencil-library/packbits-X3R_utTs.js.map +1 -0
- package/dist/stencil-library/pako.esm-CPorU236.js +6881 -0
- package/dist/{esm/pako.esm-B5WTRCh8.js.map → stencil-library/pako.esm-CPorU236.js.map} +1 -1
- package/dist/{components/p-B4X-RCW0.js.map → stencil-library/polygon-buttons.entry.esm.js.map} +1 -1
- package/dist/{cjs/loading-widget.cjs.entry.js → stencil-library/polygon-buttons.entry.js} +16 -10
- package/dist/stencil-library/polygon-buttons.entry.js.map +1 -0
- package/dist/{cjs/loading-widget.cjs.entry.js.map → stencil-library/polygon-information.entry.esm.js.map} +1 -1
- package/dist/{components/p-BFJHTJPM.js → stencil-library/polygon-information.entry.js} +13 -70
- package/dist/stencil-library/polygon-information.entry.js.map +1 -0
- package/dist/stencil-library/raw-BxukYehy.js +20 -0
- package/dist/stencil-library/raw-BxukYehy.js.map +1 -0
- package/dist/stencil-library/search-icon.entry.esm.js.map +1 -0
- package/dist/{components/p-DBwr8xSB.js → stencil-library/search-icon.entry.js} +9 -27
- package/dist/stencil-library/{p-ab0f2031.entry.js → search-icon.entry.js.map} +1 -2
- package/dist/stencil-library/settings-icon.entry.esm.js.map +1 -0
- package/dist/{components/p-DTXeHbuh.js → stencil-library/settings-icon.entry.js} +9 -27
- package/dist/stencil-library/settings-icon.entry.js.map +1 -0
- package/dist/stencil-library/settings-modal.entry.esm.js.map +1 -0
- package/dist/{components/p-B4X-RCW0.js → stencil-library/settings-modal.entry.js} +20 -38
- package/dist/stencil-library/settings-modal.entry.js.map +1 -0
- package/dist/stencil-library/solar-expert.entry.esm.js.map +1 -0
- package/dist/{components/solar-expert.js → stencil-library/solar-expert.entry.js} +14 -150
- package/dist/{components/p-i1uLweD0.js.map → stencil-library/solar-expert.entry.js.map} +1 -1
- package/dist/stencil-library/solar-system-form.entry.esm.js.map +1 -0
- package/dist/stencil-library/solar-system-form.entry.js +553 -0
- package/dist/stencil-library/solar-system-form.entry.js.map +1 -0
- package/dist/stencil-library/stencil-library.esm.js +52 -1
- package/dist/stencil-library/stencil-library.esm.js.map +1 -1
- package/dist/{components/p-eDwaXClX.js → stencil-library/store-CcqrFuBK.js} +24 -3
- package/dist/stencil-library/store-CcqrFuBK.js.map +1 -0
- package/dist/stencil-library/toast-notification.entry.esm.js.map +1 -0
- package/dist/{components/p-P28NBglk.js → stencil-library/toast-notification.entry.js} +9 -30
- package/dist/stencil-library/toast-notification.entry.js.map +1 -0
- package/dist/stencil-library/tool-box.entry.esm.js.map +1 -0
- package/dist/{components/p-i1uLweD0.js → stencil-library/tool-box.entry.js} +27 -35
- package/dist/stencil-library/tool-box.entry.js.map +1 -0
- package/dist/{collection/utils/render/tools.js → stencil-library/tools-BNYKV5H5.js} +14 -8
- package/dist/stencil-library/tools-BNYKV5H5.js.map +1 -0
- package/dist/stencil-library/tutorial-component.entry.esm.js.map +1 -0
- package/dist/{components/p-Dzl6kfPI.js → stencil-library/tutorial-component.entry.js} +42 -35
- package/dist/stencil-library/tutorial-component.entry.js.map +1 -0
- package/dist/stencil-library/undo-icon.entry.esm.js.map +1 -0
- package/dist/{components/p-waOPoUcA.js → stencil-library/undo-icon.entry.js} +9 -27
- package/dist/stencil-library/undo-icon.entry.js.map +1 -0
- package/dist/{collection/utils/utils.js → stencil-library/utils-BCUZxI9u.js} +9 -3
- package/dist/stencil-library/utils-BCUZxI9u.js.map +1 -0
- package/dist/{esm/webimage-BiHardhv.js → stencil-library/webimage-CBrfoxHM.js} +9 -3
- package/dist/{esm/webimage-BiHardhv.js.map → stencil-library/webimage-CBrfoxHM.js.map} +1 -1
- package/dist/types/components/map-draw/map-draw.d.ts +5 -0
- package/dist/types/components/map-draw/tutorial-component.d.ts +7 -0
- package/dist/types/components.d.ts +4 -0
- package/dist/types/types/lang.d.ts +7 -0
- package/package.json +1 -1
- package/dist/cjs/app-globals-I24yU8do.js +0 -10
- package/dist/cjs/app-globals-I24yU8do.js.map +0 -1
- package/dist/cjs/basedecoder-CQuzfSgz.js +0 -116
- package/dist/cjs/basedecoder-CQuzfSgz.js.map +0 -1
- package/dist/cjs/deflate-AzGzQSW2.js +0 -17
- package/dist/cjs/deflate-AzGzQSW2.js.map +0 -1
- package/dist/cjs/eraser-icon_19.cjs.entry.js +0 -31
- package/dist/cjs/eraser-icon_19.cjs.entry.js.map +0 -1
- package/dist/cjs/index-HgRXF6kp.js +0 -1470
- package/dist/cjs/index-HgRXF6kp.js.map +0 -1
- package/dist/cjs/index.cjs.js +0 -7
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/jpeg-Bx3bTm32.js +0 -904
- package/dist/cjs/jpeg-Bx3bTm32.js.map +0 -1
- package/dist/cjs/lerc-v64rYVDy.js +0 -4427
- package/dist/cjs/lerc-v64rYVDy.js.map +0 -1
- package/dist/cjs/loader.cjs.js +0 -18
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/cjs/loading-widget.entry.cjs.js.map +0 -1
- package/dist/cjs/lzw-BmFug486.js +0 -140
- package/dist/cjs/lzw-BmFug486.js.map +0 -1
- package/dist/cjs/packbits-CYx9fB0v.js +0 -35
- package/dist/cjs/packbits-CYx9fB0v.js.map +0 -1
- package/dist/cjs/pako.esm-0mKI6Jik.js +0 -3243
- package/dist/cjs/pako.esm-0mKI6Jik.js.map +0 -1
- package/dist/cjs/raw-DC82yoyr.js +0 -16
- package/dist/cjs/raw-DC82yoyr.js.map +0 -1
- package/dist/cjs/stencil-library.cjs.js +0 -30
- package/dist/cjs/stencil-library.cjs.js.map +0 -1
- package/dist/cjs/webimage-Dc0t2xAB.js +0 -49
- package/dist/cjs/webimage-Dc0t2xAB.js.map +0 -1
- package/dist/collection/collection-manifest.json +0 -31
- package/dist/collection/components/icons/eraser.js +0 -64
- package/dist/collection/components/icons/eraser.js.map +0 -1
- package/dist/collection/components/icons/house.js +0 -64
- package/dist/collection/components/icons/house.js.map +0 -1
- package/dist/collection/components/icons/icon.js +0 -108
- package/dist/collection/components/icons/icon.js.map +0 -1
- package/dist/collection/components/icons/marker.js +0 -64
- package/dist/collection/components/icons/marker.js.map +0 -1
- package/dist/collection/components/icons/move.js +0 -64
- package/dist/collection/components/icons/move.js.map +0 -1
- package/dist/collection/components/icons/octagonMinus.js +0 -64
- package/dist/collection/components/icons/octagonMinus.js.map +0 -1
- package/dist/collection/components/icons/search.js +0 -64
- package/dist/collection/components/icons/search.js.map +0 -1
- package/dist/collection/components/icons/settings.js +0 -64
- package/dist/collection/components/icons/settings.js.map +0 -1
- package/dist/collection/components/icons/undo.js +0 -64
- package/dist/collection/components/icons/undo.js.map +0 -1
- package/dist/collection/components/map-draw/map-draw.js +0 -795
- package/dist/collection/components/map-draw/map-draw.js.map +0 -1
- package/dist/collection/components/map-draw/map-selector.js +0 -246
- package/dist/collection/components/map-draw/map-selector.js.map +0 -1
- package/dist/collection/components/map-draw/polygon-buttons.js +0 -86
- package/dist/collection/components/map-draw/polygon-buttons.js.map +0 -1
- package/dist/collection/components/map-draw/polygon-information.js +0 -211
- package/dist/collection/components/map-draw/polygon-information.js.map +0 -1
- package/dist/collection/components/map-draw/tool-box.js +0 -108
- package/dist/collection/components/map-draw/tool-box.js.map +0 -1
- package/dist/collection/components/map-draw/tutorial-component.js +0 -151
- package/dist/collection/components/map-draw/tutorial-component.js.map +0 -1
- package/dist/collection/components/settings/settings.js +0 -127
- package/dist/collection/components/settings/settings.js.map +0 -1
- package/dist/collection/components/solar-expert/solar-expert.js +0 -241
- package/dist/collection/components/solar-expert/solar-expert.js.map +0 -1
- package/dist/collection/components/solar-system-form/solar-system-form.js +0 -596
- package/dist/collection/components/solar-system-form/solar-system-form.js.map +0 -1
- package/dist/collection/components/widgets/loading-widget.js +0 -18
- package/dist/collection/components/widgets/loading-widget.js.map +0 -1
- package/dist/collection/components/widgets/toast-notification.js +0 -133
- package/dist/collection/components/widgets/toast-notification.js.map +0 -1
- package/dist/collection/config.js.map +0 -1
- package/dist/collection/constants.js +0 -90
- package/dist/collection/constants.js.map +0 -1
- package/dist/collection/index.js +0 -2
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/output.css +0 -1126
- package/dist/collection/store.js +0 -43
- package/dist/collection/store.js.map +0 -1
- package/dist/collection/types/lang.js +0 -2
- package/dist/collection/types/lang.js.map +0 -1
- package/dist/collection/types/shapes.js +0 -2
- package/dist/collection/types/shapes.js.map +0 -1
- package/dist/collection/utils/api.js +0 -93
- package/dist/collection/utils/api.js.map +0 -1
- package/dist/collection/utils/images.js +0 -2
- package/dist/collection/utils/images.js.map +0 -1
- package/dist/collection/utils/lang/english.js +0 -157
- package/dist/collection/utils/lang/english.js.map +0 -1
- package/dist/collection/utils/lang/general.js +0 -30
- package/dist/collection/utils/lang/general.js.map +0 -1
- package/dist/collection/utils/lang/german.js +0 -157
- package/dist/collection/utils/lang/german.js.map +0 -1
- package/dist/collection/utils/lang/spanish.js +0 -157
- package/dist/collection/utils/lang/spanish.js.map +0 -1
- package/dist/collection/utils/render/tools.js.map +0 -1
- package/dist/collection/utils/solar.js +0 -136
- package/dist/collection/utils/solar.js.map +0 -1
- package/dist/collection/utils/theme.js +0 -97
- package/dist/collection/utils/theme.js.map +0 -1
- package/dist/collection/utils/utils.js.map +0 -1
- package/dist/components/eraser-icon.js +0 -11
- package/dist/components/eraser-icon.js.map +0 -1
- package/dist/components/house-icon.js +0 -11
- package/dist/components/house-icon.js.map +0 -1
- package/dist/components/icon-selector.js +0 -11
- package/dist/components/icon-selector.js.map +0 -1
- package/dist/components/index.js +0 -1269
- package/dist/components/index.js.map +0 -1
- package/dist/components/map-draw.js +0 -11
- package/dist/components/map-draw.js.map +0 -1
- package/dist/components/map-selector.js +0 -11
- package/dist/components/map-selector.js.map +0 -1
- package/dist/components/marker-icon.js +0 -11
- package/dist/components/marker-icon.js.map +0 -1
- package/dist/components/move-icon.js +0 -11
- package/dist/components/move-icon.js.map +0 -1
- package/dist/components/octagon-minus-icon.js +0 -11
- package/dist/components/octagon-minus-icon.js.map +0 -1
- package/dist/components/p-B54Ul0nf.js +0 -15
- package/dist/components/p-B54Ul0nf.js.map +0 -1
- package/dist/components/p-B5WTRCh8.js +0 -3241
- package/dist/components/p-B5WTRCh8.js.map +0 -1
- package/dist/components/p-BFJHTJPM.js.map +0 -1
- package/dist/components/p-BGoSj_DR.js +0 -902
- package/dist/components/p-BGoSj_DR.js.map +0 -1
- package/dist/components/p-BJLO76Yi.js.map +0 -1
- package/dist/components/p-BcVa4_YP.js.map +0 -1
- package/dist/components/p-Bopprtc7.js +0 -623
- package/dist/components/p-Bopprtc7.js.map +0 -1
- package/dist/components/p-ByX6QP-E.js.map +0 -1
- package/dist/components/p-C5QieOat.js.map +0 -1
- package/dist/components/p-CL74Q4VR.js.map +0 -1
- package/dist/components/p-Cgchl6bA.js +0 -47
- package/dist/components/p-Cgchl6bA.js.map +0 -1
- package/dist/components/p-D8w3bTPO.js.map +0 -1
- package/dist/components/p-DBwr8xSB.js.map +0 -1
- package/dist/components/p-DWirjxpO.js +0 -163
- package/dist/components/p-DWirjxpO.js.map +0 -1
- package/dist/components/p-DlNHVTGB.js +0 -15949
- package/dist/components/p-DlNHVTGB.js.map +0 -1
- package/dist/components/p-Dzl6kfPI.js.map +0 -1
- package/dist/components/p-FdEV2qPo.js.map +0 -1
- package/dist/components/p-PkMjF2if.js +0 -1985
- package/dist/components/p-PkMjF2if.js.map +0 -1
- package/dist/components/p-Umz6nJIv.js.map +0 -1
- package/dist/components/p-WmcSqXD8.js +0 -14
- package/dist/components/p-WmcSqXD8.js.map +0 -1
- package/dist/components/p-eDwaXClX.js.map +0 -1
- package/dist/components/p-j-vOrhhh.js +0 -114
- package/dist/components/p-j-vOrhhh.js.map +0 -1
- package/dist/components/p-q8auDIJ2.js +0 -138
- package/dist/components/p-q8auDIJ2.js.map +0 -1
- package/dist/components/p-waOPoUcA.js.map +0 -1
- package/dist/components/polygon-buttons.js +0 -11
- package/dist/components/polygon-buttons.js.map +0 -1
- package/dist/components/polygon-information.js +0 -11
- package/dist/components/polygon-information.js.map +0 -1
- package/dist/components/search-icon.js +0 -11
- package/dist/components/search-icon.js.map +0 -1
- package/dist/components/settings-icon.js +0 -11
- package/dist/components/settings-icon.js.map +0 -1
- package/dist/components/settings-modal.js +0 -11
- package/dist/components/settings-modal.js.map +0 -1
- package/dist/components/solar-expert.js.map +0 -1
- package/dist/components/solar-system-form.js +0 -11
- package/dist/components/solar-system-form.js.map +0 -1
- package/dist/components/toast-notification.js +0 -11
- package/dist/components/toast-notification.js.map +0 -1
- package/dist/components/tool-box.js +0 -11
- package/dist/components/tool-box.js.map +0 -1
- package/dist/components/tutorial-component.js +0 -11
- package/dist/components/tutorial-component.js.map +0 -1
- package/dist/components/undo-icon.js +0 -11
- package/dist/components/undo-icon.js.map +0 -1
- package/dist/esm/basedecoder-j-vOrhhh.js +0 -114
- package/dist/esm/basedecoder-j-vOrhhh.js.map +0 -1
- package/dist/esm/deflate-DHgPf9CO.js +0 -15
- package/dist/esm/eraser-icon_19.entry.js +0 -7
- package/dist/esm/eraser-icon_19.entry.js.map +0 -1
- package/dist/esm/index-C2JRBB5c.js +0 -1458
- package/dist/esm/index-C2JRBB5c.js.map +0 -1
- package/dist/esm/index.js +0 -5
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/jpeg-CJLm1GkA.js.map +0 -1
- package/dist/esm/lerc-CAiDQjTu.js +0 -4424
- package/dist/esm/lerc-CAiDQjTu.js.map +0 -1
- package/dist/esm/loader.js +0 -16
- package/dist/esm/loader.js.map +0 -1
- package/dist/esm/loading-widget.entry.js.map +0 -1
- package/dist/esm/lzw-DaOzWJUD.js.map +0 -1
- package/dist/esm/packbits-CZPyx9kx.js +0 -33
- package/dist/esm/packbits-CZPyx9kx.js.map +0 -1
- package/dist/esm/pako.esm-B5WTRCh8.js +0 -3241
- package/dist/esm/raw-pqeeWc2_.js +0 -14
- package/dist/esm/raw-pqeeWc2_.js.map +0 -1
- package/dist/esm/stencil-library.js +0 -26
- package/dist/esm/stencil-library.js.map +0 -1
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/stencil-library/p-B54Ul0nf.js +0 -2
- package/dist/stencil-library/p-B54Ul0nf.js.map +0 -1
- package/dist/stencil-library/p-B5WTRCh8.js +0 -2
- package/dist/stencil-library/p-B5WTRCh8.js.map +0 -1
- package/dist/stencil-library/p-BBtmpSUK.js +0 -2
- package/dist/stencil-library/p-BBtmpSUK.js.map +0 -1
- package/dist/stencil-library/p-BGoSj_DR.js +0 -2
- package/dist/stencil-library/p-BGoSj_DR.js.map +0 -1
- package/dist/stencil-library/p-ByX6QP-E.js +0 -2
- package/dist/stencil-library/p-ByX6QP-E.js.map +0 -1
- package/dist/stencil-library/p-C2JRBB5c.js +0 -3
- package/dist/stencil-library/p-C2JRBB5c.js.map +0 -1
- package/dist/stencil-library/p-CX8V3eiN.js +0 -2
- package/dist/stencil-library/p-CX8V3eiN.js.map +0 -1
- package/dist/stencil-library/p-Cgchl6bA.js +0 -2
- package/dist/stencil-library/p-Cgchl6bA.js.map +0 -1
- package/dist/stencil-library/p-WmcSqXD8.js +0 -2
- package/dist/stencil-library/p-WmcSqXD8.js.map +0 -1
- package/dist/stencil-library/p-ab0f2031.entry.js.map +0 -1
- package/dist/stencil-library/p-cAuhy_jT.js +0 -10
- package/dist/stencil-library/p-cAuhy_jT.js.map +0 -1
- package/dist/stencil-library/p-e7b94dbb.entry.js +0 -2
- package/dist/stencil-library/p-e7b94dbb.entry.js.map +0 -1
- package/dist/stencil-library/p-j-vOrhhh.js +0 -2
- package/dist/stencil-library/p-j-vOrhhh.js.map +0 -1
- package/dist/stencil-library/p-q8auDIJ2.js +0 -2
- package/dist/stencil-library/p-q8auDIJ2.js.map +0 -1
- /package/dist/{esm → stencil-library}/app-globals-CX8V3eiN.js +0 -0
- /package/dist/{esm → stencil-library}/app-globals-CX8V3eiN.js.map +0 -0
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
// import { fromArrayBuffer, TypedArray } from "../geotiff";
|
|
2
|
-
import { fromArrayBuffer } from "geotiff";
|
|
3
|
-
import * as geokeysToProj4 from "geotiff-geokeys-to-proj4";
|
|
4
|
-
import proj4 from "proj4";
|
|
5
|
-
/**
|
|
6
|
-
* Downloads the pixel values for a Data Layer URL from the Solar API.
|
|
7
|
-
*
|
|
8
|
-
* @param {string} url URL from the Data Layers response.
|
|
9
|
-
* @param {string} apiKey Google Cloud API key.
|
|
10
|
-
* @return {Promise<GeoTiff>} Pixel values with shape and lat/lon bounds.
|
|
11
|
-
*/
|
|
12
|
-
export async function downloadGeoTIFF(url, apiKey) {
|
|
13
|
-
// Include your Google Cloud API key in the Data Layers URL.
|
|
14
|
-
const solarUrl = url.includes("solar.googleapis.com")
|
|
15
|
-
? url + `&key=${apiKey}`
|
|
16
|
-
: url;
|
|
17
|
-
const response = await fetch(solarUrl);
|
|
18
|
-
if (response.status != 200) {
|
|
19
|
-
const error = await response.json();
|
|
20
|
-
console.error(`downloadGeoTIFF failed: ${url}\n`, error);
|
|
21
|
-
throw error;
|
|
22
|
-
}
|
|
23
|
-
// Get the GeoTIFF rasters, which are the pixel values for each band.
|
|
24
|
-
const arrayBuffer = await response.arrayBuffer();
|
|
25
|
-
const tiff = await fromArrayBuffer(arrayBuffer);
|
|
26
|
-
const image = await tiff.getImage();
|
|
27
|
-
const rasters = await image.readRasters();
|
|
28
|
-
// Reproject the bounding box into lat/lon coordinates.
|
|
29
|
-
const geoKeys = image.getGeoKeys();
|
|
30
|
-
const projObj = geokeysToProj4.toProj4(geoKeys);
|
|
31
|
-
const projection = proj4(projObj.proj4, "WGS84");
|
|
32
|
-
const box = image.getBoundingBox();
|
|
33
|
-
const sw = projection.forward({
|
|
34
|
-
x: box[0] * projObj.coordinatesConversionParameters.x,
|
|
35
|
-
y: box[1] * projObj.coordinatesConversionParameters.y,
|
|
36
|
-
});
|
|
37
|
-
const ne = projection.forward({
|
|
38
|
-
x: box[2] * projObj.coordinatesConversionParameters.x,
|
|
39
|
-
y: box[3] * projObj.coordinatesConversionParameters.y,
|
|
40
|
-
});
|
|
41
|
-
return {
|
|
42
|
-
// Width and height of the data layer image in pixels.
|
|
43
|
-
// Used to know the row and column since Javascript
|
|
44
|
-
// stores the values as flat arrays.
|
|
45
|
-
width: rasters.width,
|
|
46
|
-
height: rasters.height,
|
|
47
|
-
// Each raster reprents the pixel values of each band.
|
|
48
|
-
// We convert them from `geotiff.TypedArray`s into plain
|
|
49
|
-
// Javascript arrays to make them easier to process.
|
|
50
|
-
rasters: [...Array(rasters.length).keys()].map((i) => Array.from(rasters[i])),
|
|
51
|
-
// The bounding box as a lat/lon rectangle.
|
|
52
|
-
bounds: {
|
|
53
|
-
north: ne.y,
|
|
54
|
-
south: sw.y,
|
|
55
|
-
east: ne.x,
|
|
56
|
-
west: sw.x,
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
// [END solar_api_download_geotiff]
|
|
61
|
-
export async function getBuildingImages(latitude, longitude, apiKey, radiusMeters = 15) {
|
|
62
|
-
console.log("getBuildingImages", latitude, longitude, radiusMeters);
|
|
63
|
-
if (latitude === 0 || longitude === 0) {
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
try {
|
|
67
|
-
const args = {
|
|
68
|
-
"location.latitude": latitude.toFixed(5),
|
|
69
|
-
"location.longitude": longitude.toFixed(5),
|
|
70
|
-
radius_meters: (radiusMeters + 2).toString(),
|
|
71
|
-
required_quality: "LOW",
|
|
72
|
-
};
|
|
73
|
-
const params = new URLSearchParams({
|
|
74
|
-
...args,
|
|
75
|
-
key: apiKey,
|
|
76
|
-
});
|
|
77
|
-
const response = await fetch(`https://solar.googleapis.com/v1/dataLayers:get?${params}`);
|
|
78
|
-
if (!response.ok) {
|
|
79
|
-
throw new Error(`HTTP error! status: ${response.status}`);
|
|
80
|
-
}
|
|
81
|
-
const parsedResponse = await response.json();
|
|
82
|
-
const rgbTiff = await downloadGeoTIFF(parsedResponse.rgbUrl, apiKey);
|
|
83
|
-
return rgbTiff;
|
|
84
|
-
}
|
|
85
|
-
catch (error) {
|
|
86
|
-
console.error("Error fetching building images:", error);
|
|
87
|
-
return null;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
export async function fetchSolarData(latitude, longitude, apiKey) {
|
|
91
|
-
if (latitude === 0 || longitude === 0) {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
try {
|
|
95
|
-
const args = {
|
|
96
|
-
"location.latitude": latitude.toFixed(5),
|
|
97
|
-
"location.longitude": longitude.toFixed(5),
|
|
98
|
-
};
|
|
99
|
-
const params = new URLSearchParams({
|
|
100
|
-
...args,
|
|
101
|
-
key: apiKey,
|
|
102
|
-
});
|
|
103
|
-
const response = await fetch(`https://solar.googleapis.com/v1/buildingInsights:findClosest?${params}`);
|
|
104
|
-
if (!response.ok) {
|
|
105
|
-
const errorText = await response.text();
|
|
106
|
-
throw new Error(`HTTP error! status: ${response.status}, body: ${errorText}`);
|
|
107
|
-
}
|
|
108
|
-
const contentType = response.headers.get("content-type");
|
|
109
|
-
if (!contentType || !contentType.includes("application/json")) {
|
|
110
|
-
const text = await response.text();
|
|
111
|
-
console.error("Unexpected content type:", contentType, "Response:", text);
|
|
112
|
-
return null;
|
|
113
|
-
}
|
|
114
|
-
const rawData = await response.json();
|
|
115
|
-
return rawData;
|
|
116
|
-
}
|
|
117
|
-
catch (error) {
|
|
118
|
-
console.error("Error fetching solar data:", error);
|
|
119
|
-
if (error instanceof TypeError &&
|
|
120
|
-
error.message === "Failed to fetch") {
|
|
121
|
-
throw new Error("Unable to connect to the solar data API.");
|
|
122
|
-
}
|
|
123
|
-
throw error;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
export function getPixelInMeters(rgbTiff) {
|
|
127
|
-
const latDiff = rgbTiff.bounds.north - rgbTiff.bounds.south;
|
|
128
|
-
// const lngDiff = rgbTiff.bounds.east - rgbTiff.bounds.west;
|
|
129
|
-
// const pixelWidth = rgbTiff.width;
|
|
130
|
-
const pixelHeight = rgbTiff.height;
|
|
131
|
-
const pixelInMeters = latDiff * 111320 / pixelHeight;
|
|
132
|
-
// const latAvg = (rgbTiff.bounds.north + rgbTiff.bounds.south) / 2;
|
|
133
|
-
// const pixelInMetersLng = lngDiff * 111320 * Math.cos(latAvg * Math.PI / 180) / pixelWidth;
|
|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;YACD,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC9D,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAAgB;IAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;IAC5D,6DAA6D;IAC7D,oCAAoC;IACpC,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IACnC,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,WAAW,CAAC;IACrD,oEAAoE;IACpE,6FAA6F;IAC7F,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["import {\r\n BuildingInsightsResponse,\r\n DataLayersResponse,\r\n GeoTiff,\r\n} from \"harmonia-types\";\r\n\r\n// import { fromArrayBuffer, TypedArray } from \"../geotiff\";\r\nimport { fromArrayBuffer, TypedArray } from \"geotiff\";\r\nimport * as geokeysToProj4 from \"geotiff-geokeys-to-proj4\";\r\nimport proj4 from \"proj4\";\r\n\r\n/**\r\n * Downloads the pixel values for a Data Layer URL from the Solar API.\r\n *\r\n * @param {string} url URL from the Data Layers response.\r\n * @param {string} apiKey Google Cloud API key.\r\n * @return {Promise<GeoTiff>} Pixel values with shape and lat/lon bounds.\r\n */\r\nexport async function downloadGeoTIFF(url: string, apiKey: string) { //}: Promise<GeoTiff> {\r\n // Include your Google Cloud API key in the Data Layers URL.\r\n const solarUrl = url.includes(\"solar.googleapis.com\")\r\n ? url + `&key=${apiKey}`\r\n : url;\r\n const response = await fetch(solarUrl);\r\n if (response.status != 200) {\r\n const error = await response.json();\r\n console.error(`downloadGeoTIFF failed: ${url}\\n`, error);\r\n throw error;\r\n }\r\n\r\n // Get the GeoTIFF rasters, which are the pixel values for each band.\r\n const arrayBuffer = await response.arrayBuffer();\r\n const tiff = await fromArrayBuffer(arrayBuffer);\r\n const image = await tiff.getImage();\r\n const rasters = await image.readRasters();\r\n\r\n // Reproject the bounding box into lat/lon coordinates.\r\n const geoKeys = image.getGeoKeys();\r\n const projObj = geokeysToProj4.toProj4(geoKeys);\r\n const projection = proj4(projObj.proj4, \"WGS84\");\r\n const box = image.getBoundingBox();\r\n const sw = projection.forward({\r\n x: box[0] * projObj.coordinatesConversionParameters.x,\r\n y: box[1] * projObj.coordinatesConversionParameters.y,\r\n });\r\n const ne = projection.forward({\r\n x: box[2] * projObj.coordinatesConversionParameters.x,\r\n y: box[3] * projObj.coordinatesConversionParameters.y,\r\n });\r\n\r\n return {\r\n // Width and height of the data layer image in pixels.\r\n // Used to know the row and column since Javascript\r\n // stores the values as flat arrays.\r\n width: rasters.width,\r\n height: rasters.height,\r\n // Each raster reprents the pixel values of each band.\r\n // We convert them from `geotiff.TypedArray`s into plain\r\n // Javascript arrays to make them easier to process.\r\n rasters: [...Array(rasters.length).keys()].map((i) =>\r\n Array.from(rasters[i] as TypedArray)\r\n ),\r\n // The bounding box as a lat/lon rectangle.\r\n bounds: {\r\n north: ne.y,\r\n south: sw.y,\r\n east: ne.x,\r\n west: sw.x,\r\n },\r\n };\r\n}\r\n// [END solar_api_download_geotiff]\r\n\r\nexport async function getBuildingImages(\r\n latitude: number,\r\n longitude: number,\r\n apiKey: string,\r\n radiusMeters: number = 15,\r\n) {\r\n console.log(\"getBuildingImages\", latitude, longitude, radiusMeters);\r\n if (latitude === 0 || longitude === 0) {\r\n return null;\r\n }\r\n\r\n try {\r\n const args = {\r\n \"location.latitude\": latitude.toFixed(5),\r\n \"location.longitude\": longitude.toFixed(5),\r\n radius_meters: (radiusMeters + 2).toString(),\r\n required_quality: \"LOW\",\r\n };\r\n const params = new URLSearchParams({\r\n ...args,\r\n key: apiKey,\r\n });\r\n const response = await fetch(\r\n `https://solar.googleapis.com/v1/dataLayers:get?${params}`,\r\n );\r\n\r\n if (!response.ok) {\r\n throw new Error(`HTTP error! status: ${response.status}`);\r\n }\r\n const parsedResponse: DataLayersResponse = await response.json();\r\n\r\n const rgbTiff = await downloadGeoTIFF(\r\n parsedResponse.rgbUrl,\r\n apiKey,\r\n );\r\n\r\n return rgbTiff;\r\n } catch (error) {\r\n console.error(\"Error fetching building images:\", error);\r\n return null;\r\n }\r\n}\r\n\r\nexport async function fetchSolarData(\r\n latitude: number,\r\n longitude: number,\r\n apiKey: string,\r\n) {\r\n if (latitude === 0 || longitude === 0) {\r\n return null;\r\n }\r\n try {\r\n const args = {\r\n \"location.latitude\": latitude.toFixed(5),\r\n \"location.longitude\": longitude.toFixed(5),\r\n };\r\n const params = new URLSearchParams({\r\n ...args,\r\n key: apiKey,\r\n });\r\n const response = await fetch(\r\n `https://solar.googleapis.com/v1/buildingInsights:findClosest?${params}`,\r\n );\r\n\r\n if (!response.ok) {\r\n const errorText = await response.text();\r\n throw new Error(\r\n `HTTP error! status: ${response.status}, body: ${errorText}`,\r\n );\r\n }\r\n\r\n const contentType = response.headers.get(\"content-type\");\r\n if (!contentType || !contentType.includes(\"application/json\")) {\r\n const text = await response.text();\r\n console.error(\r\n \"Unexpected content type:\",\r\n contentType,\r\n \"Response:\",\r\n text,\r\n );\r\n return null;\r\n }\r\n\r\n const rawData: BuildingInsightsResponse = await response.json();\r\n return rawData;\r\n } catch (error) {\r\n console.error(\"Error fetching solar data:\", error);\r\n if (\r\n error instanceof TypeError &&\r\n error.message === \"Failed to fetch\"\r\n ) {\r\n throw new Error(\"Unable to connect to the solar data API.\");\r\n }\r\n throw error;\r\n }\r\n}\r\n\r\nexport function getPixelInMeters(rgbTiff: GeoTiff): number {\r\n const latDiff = rgbTiff.bounds.north - rgbTiff.bounds.south;\r\n // const lngDiff = rgbTiff.bounds.east - rgbTiff.bounds.west;\r\n // const pixelWidth = rgbTiff.width;\r\n const pixelHeight = rgbTiff.height;\r\n const pixelInMeters = latDiff * 111320 / pixelHeight;\r\n // const latAvg = (rgbTiff.bounds.north + rgbTiff.bounds.south) / 2;\r\n // const pixelInMetersLng = lngDiff * 111320 * Math.cos(latAvg * Math.PI / 180) / pixelWidth;\r\n return pixelInMeters;\r\n}\r\n"]}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Applies a color scheme theme globally to the document root.
|
|
3
|
-
* Since all components use global CSS (shadow: false), this will automatically
|
|
4
|
-
* update the theme for all components.
|
|
5
|
-
*
|
|
6
|
-
* @param colorScheme - The color scheme object containing theme colors
|
|
7
|
-
*/
|
|
8
|
-
export function applyThemeGlobally(colorScheme) {
|
|
9
|
-
applyThemeToElement(document.documentElement, colorScheme);
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Applies a color scheme theme to a specific element (useful for Shadow DOM).
|
|
13
|
-
*
|
|
14
|
-
* @param element - The element to apply the theme to (e.g., Shadow DOM host)
|
|
15
|
-
* @param colorScheme - The color scheme object containing theme colors
|
|
16
|
-
*/
|
|
17
|
-
export function applyThemeToElement(element, colorScheme) {
|
|
18
|
-
// Set CSS custom properties on the specified element
|
|
19
|
-
if (colorScheme.primary) {
|
|
20
|
-
element.style.setProperty('--color-primary', colorScheme.primary);
|
|
21
|
-
}
|
|
22
|
-
if (colorScheme.primaryForeground) {
|
|
23
|
-
element.style.setProperty('--color-primary-foreground', colorScheme.primaryForeground);
|
|
24
|
-
}
|
|
25
|
-
if (colorScheme.secondary) {
|
|
26
|
-
element.style.setProperty('--color-secondary', colorScheme.secondary);
|
|
27
|
-
}
|
|
28
|
-
if (colorScheme.secondaryForeground) {
|
|
29
|
-
element.style.setProperty('--color-secondary-foreground', colorScheme.secondaryForeground);
|
|
30
|
-
}
|
|
31
|
-
if (colorScheme.tertiary) {
|
|
32
|
-
element.style.setProperty('--color-tertiary', colorScheme.tertiary);
|
|
33
|
-
}
|
|
34
|
-
if (colorScheme.tertiaryForeground) {
|
|
35
|
-
element.style.setProperty('--color-tertiary-foreground', colorScheme.tertiaryForeground);
|
|
36
|
-
}
|
|
37
|
-
if (colorScheme.muted) {
|
|
38
|
-
element.style.setProperty('--color-muted', colorScheme.muted);
|
|
39
|
-
}
|
|
40
|
-
if (colorScheme.mutedForeground) {
|
|
41
|
-
element.style.setProperty('--color-muted-foreground', colorScheme.mutedForeground);
|
|
42
|
-
}
|
|
43
|
-
if (colorScheme.error) {
|
|
44
|
-
element.style.setProperty('--color-error', colorScheme.error);
|
|
45
|
-
}
|
|
46
|
-
if (colorScheme.errorForeground) {
|
|
47
|
-
element.style.setProperty('--color-error-foreground', colorScheme.errorForeground);
|
|
48
|
-
}
|
|
49
|
-
// Surface colors
|
|
50
|
-
if (colorScheme.surface) {
|
|
51
|
-
element.style.setProperty('--color-surface', colorScheme.surface);
|
|
52
|
-
}
|
|
53
|
-
if (colorScheme.surfaceHover) {
|
|
54
|
-
element.style.setProperty('--color-surface-hover', colorScheme.surfaceHover);
|
|
55
|
-
}
|
|
56
|
-
if (colorScheme.surfaceActive) {
|
|
57
|
-
element.style.setProperty('--color-surface-active', colorScheme.surfaceActive);
|
|
58
|
-
}
|
|
59
|
-
// Text colors
|
|
60
|
-
if (colorScheme.textMuted) {
|
|
61
|
-
element.style.setProperty('--color-text-muted', colorScheme.textMuted);
|
|
62
|
-
}
|
|
63
|
-
if (colorScheme.textSecondary) {
|
|
64
|
-
element.style.setProperty('--color-text-secondary', colorScheme.textSecondary);
|
|
65
|
-
}
|
|
66
|
-
if (colorScheme.textPlaceholder) {
|
|
67
|
-
element.style.setProperty('--color-text-placeholder', colorScheme.textPlaceholder);
|
|
68
|
-
}
|
|
69
|
-
// Border colors
|
|
70
|
-
if (colorScheme.border) {
|
|
71
|
-
element.style.setProperty('--color-border', colorScheme.border);
|
|
72
|
-
}
|
|
73
|
-
if (colorScheme.borderLight) {
|
|
74
|
-
element.style.setProperty('--color-border-light', colorScheme.borderLight);
|
|
75
|
-
}
|
|
76
|
-
// Status colors
|
|
77
|
-
if (colorScheme.success) {
|
|
78
|
-
element.style.setProperty('--color-success', colorScheme.success);
|
|
79
|
-
}
|
|
80
|
-
if (colorScheme.info) {
|
|
81
|
-
element.style.setProperty('--color-info', colorScheme.info);
|
|
82
|
-
}
|
|
83
|
-
// Interactive colors
|
|
84
|
-
if (colorScheme.hover) {
|
|
85
|
-
element.style.setProperty('--color-hover', colorScheme.hover);
|
|
86
|
-
}
|
|
87
|
-
if (colorScheme.hoverDark) {
|
|
88
|
-
element.style.setProperty('--color-hover-dark', colorScheme.hoverDark);
|
|
89
|
-
}
|
|
90
|
-
if (colorScheme.overlay) {
|
|
91
|
-
element.style.setProperty('--color-overlay', colorScheme.overlay);
|
|
92
|
-
}
|
|
93
|
-
if (colorScheme.tooltip) {
|
|
94
|
-
element.style.setProperty('--color-tooltip', colorScheme.tooltip);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
//# sourceMappingURL=theme.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAAiC;IAChE,mBAAmB,CAAC,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;AAC/D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAoB,EAAE,WAAiC;IACvF,qDAAqD;IACrD,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;QACtB,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,WAAW,CAAC,iBAAiB,EAAE,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAC;IAC3F,CAAC;IACD,IAAI,WAAW,CAAC,SAAS,EAAE,CAAC;QACxB,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,mBAAmB,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAC1E,CAAC;IACD,IAAI,WAAW,CA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AAK,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,eAAe,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;IACD,IAAI,WAAW,CAAC,SAAS,EAAE,CAAC;QACxB,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,oBAAoB,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAC3E,CAAC;IACD,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;QACtB,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;QACtB,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACtE,CAAC;AACL,CAAC","sourcesContent":["import { ColorScheme } from \"../config\";\r\n\r\n/**\r\n * Applies a color scheme theme globally to the document root.\r\n * Since all components use global CSS (shadow: false), this will automatically \r\n * update the theme for all components.\r\n * \r\n * @param colorScheme - The color scheme object containing theme colors\r\n */\r\nexport function applyThemeGlobally(colorScheme: Partial<ColorScheme>): void {\r\n applyThemeToElement(document.documentElement, colorScheme);\r\n}\r\n\r\n/**\r\n * Applies a color scheme theme to a specific element (useful for Shadow DOM).\r\n * \r\n * @param element - The element to apply the theme to (e.g., Shadow DOM host)\r\n * @param colorScheme - The color scheme object containing theme colors\r\n */\r\nexport function applyThemeToElement(element: HTMLElement, colorScheme: Partial<ColorScheme>): void {\r\n // Set CSS custom properties on the specified element\r\n if (colorScheme.primary) {\r\n element.style.setProperty('--color-primary', colorScheme.primary);\r\n }\r\n if (colorScheme.primaryForeground) {\r\n element.style.setProperty('--color-primary-foreground', colorScheme.primaryForeground);\r\n }\r\n if (colorScheme.secondary) {\r\n element.style.setProperty('--color-secondary', colorScheme.secondary);\r\n }\r\n if (colorScheme.secondaryForeground) {\r\n element.style.setProperty('--color-secondary-foreground', colorScheme.secondaryForeground);\r\n }\r\n if (colorScheme.tertiary) {\r\n element.style.setProperty('--color-tertiary', colorScheme.tertiary);\r\n }\r\n if (colorScheme.tertiaryForeground) {\r\n element.style.setProperty('--color-tertiary-foreground', colorScheme.tertiaryForeground);\r\n }\r\n if (colorScheme.muted) {\r\n element.style.setProperty('--color-muted', colorScheme.muted);\r\n }\r\n if (colorScheme.mutedForeground) { \r\n element.style.setProperty('--color-muted-foreground', colorScheme.mutedForeground);\r\n }\r\n if (colorScheme.error) {\r\n element.style.setProperty('--color-error', colorScheme.error);\r\n }\r\n if (colorScheme.errorForeground) {\r\n element.style.setProperty('--color-error-foreground', colorScheme.errorForeground);\r\n }\r\n \r\n // Surface colors\r\n if (colorScheme.surface) {\r\n element.style.setProperty('--color-surface', colorScheme.surface);\r\n }\r\n if (colorScheme.surfaceHover) {\r\n element.style.setProperty('--color-surface-hover', colorScheme.surfaceHover);\r\n }\r\n if (colorScheme.surfaceActive) {\r\n element.style.setProperty('--color-surface-active', colorScheme.surfaceActive);\r\n }\r\n \r\n // Text colors\r\n if (colorScheme.textMuted) {\r\n element.style.setProperty('--color-text-muted', colorScheme.textMuted);\r\n }\r\n if (colorScheme.textSecondary) {\r\n element.style.setProperty('--color-text-secondary', colorScheme.textSecondary);\r\n }\r\n if (colorScheme.textPlaceholder) {\r\n element.style.setProperty('--color-text-placeholder', colorScheme.textPlaceholder);\r\n }\r\n \r\n // Border colors\r\n if (colorScheme.border) {\r\n element.style.setProperty('--color-border', colorScheme.border);\r\n }\r\n if (colorScheme.borderLight) {\r\n element.style.setProperty('--color-border-light', colorScheme.borderLight);\r\n }\r\n \r\n // Status colors\r\n if (colorScheme.success) {\r\n element.style.setProperty('--color-success', colorScheme.success);\r\n }\r\n if (colorScheme.info) {\r\n element.style.setProperty('--color-info', colorScheme.info);\r\n }\r\n \r\n // Interactive colors\r\n if (colorScheme.hover) {\r\n element.style.setProperty('--color-hover', colorScheme.hover);\r\n }\r\n if (colorScheme.hoverDark) {\r\n element.style.setProperty('--color-hover-dark', colorScheme.hoverDark);\r\n }\r\n if (colorScheme.overlay) {\r\n element.style.setProperty('--color-overlay', colorScheme.overlay);\r\n }\r\n if (colorScheme.tooltip) {\r\n element.style.setProperty('--color-tooltip', colorScheme.tooltip);\r\n }\r\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,sCAAsC;IACtC,IAAI,OAAO,IAAI,KAAK,IAAI,OAAO,GAAG,IAAI;QAAE,OAAO,OAAO,CAAC;IACvD,IAAI,OAAO,IAAI,IAAI,IAAI,OAAO,GAAG,IAAI;QAAE,OAAO,WAAW,CAAC;IAC1D,IAAI,OAAO,IAAI,IAAI,IAAI,OAAO,GAAG,KAAK;QAAE,OAAO,MAAM,CAAC;IACtD,IAAI,OAAO,IAAI,KAAK,IAAI,OAAO,GAAG,KAAK;QAAE,OAAO,WAAW,CAAC;IAC5D,IAAI,OAAO,IAAI,KAAK,IAAI,OAAO,GAAG,KAAK;QAAE,OAAO,OAAO,CAAC;IACxD,IAAI,OAAO,IAAI,KAAK,IAAI,OAAO,GAAG,KAAK;QAAE,OAAO,WAAW,CAAC;IAC5D,IAAI,OAAO,IAAI,KAAK,IAAI,OAAO,GAAG,KAAK;QAAE,OAAO,MAAM,CAAC;IACvD,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAAgB;IAC/C,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;IAC5D,6DAA6D;IAC7D,oCAAoC;IACpC,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IACnC,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,WAAW,CAAC;IACrD,oEAAoE;IACpE,6FAA6F;IAC7F,OAAO,aAAa,CAAC;AACvB,CAAC","sourcesContent":["import { GeoTiff } from \"harmonia-types\";\r\n\r\nexport function azimuthToCardinal(azimuth: number): string {\r\n // Convert angle to cardinal direction\r\n if (azimuth >= 337.5 || azimuth < 22.5) return \"North\";\r\n if (azimuth >= 22.5 && azimuth < 67.5) return \"Northeast\";\r\n if (azimuth >= 67.5 && azimuth < 112.5) return \"East\";\r\n if (azimuth >= 112.5 && azimuth < 157.5) return \"Southeast\";\r\n if (azimuth >= 157.5 && azimuth < 202.5) return \"South\";\r\n if (azimuth >= 202.5 && azimuth < 247.5) return \"Southwest\";\r\n if (azimuth >= 247.5 && azimuth < 292.5) return \"West\";\r\n return \"Northwest\";\r\n}\r\n\r\nexport function getPixelInMeters(rgbTiff: GeoTiff): number {\r\n const latDiff = rgbTiff.bounds.north - rgbTiff.bounds.south;\r\n // const lngDiff = rgbTiff.bounds.east - rgbTiff.bounds.west;\r\n // const pixelWidth = rgbTiff.width;\r\n const pixelHeight = rgbTiff.height;\r\n const pixelInMeters = latDiff * 111320 / pixelHeight;\r\n // const latAvg = (rgbTiff.bounds.north + rgbTiff.bounds.south) / 2;\r\n // const pixelInMetersLng = lngDiff * 111320 * Math.cos(latAvg * Math.PI / 180) / pixelWidth;\r\n return pixelInMeters;\r\n}\r\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
if (typeof global === "undefined") { var global = globalThis || window || self; }
|
|
3
|
-
import { E as EraserIcon$1, d as defineCustomElement$1 } from './p-CL74Q4VR.js';
|
|
4
|
-
|
|
5
|
-
const EraserIcon = EraserIcon$1;
|
|
6
|
-
const defineCustomElement = defineCustomElement$1;
|
|
7
|
-
|
|
8
|
-
export { EraserIcon, defineCustomElement };
|
|
9
|
-
//# sourceMappingURL=eraser-icon.js.map
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=eraser-icon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"eraser-icon.js","mappings":";;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
if (typeof global === "undefined") { var global = globalThis || window || self; }
|
|
3
|
-
import { H as HouseIcon$1, d as defineCustomElement$1 } from './p-D8w3bTPO.js';
|
|
4
|
-
|
|
5
|
-
const HouseIcon = HouseIcon$1;
|
|
6
|
-
const defineCustomElement = defineCustomElement$1;
|
|
7
|
-
|
|
8
|
-
export { HouseIcon, defineCustomElement };
|
|
9
|
-
//# sourceMappingURL=house-icon.js.map
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=house-icon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"house-icon.js","mappings":";;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
if (typeof global === "undefined") { var global = globalThis || window || self; }
|
|
3
|
-
import { I as Icon, d as defineCustomElement$1 } from './p-C5QieOat.js';
|
|
4
|
-
|
|
5
|
-
const IconSelector = Icon;
|
|
6
|
-
const defineCustomElement = defineCustomElement$1;
|
|
7
|
-
|
|
8
|
-
export { IconSelector, defineCustomElement };
|
|
9
|
-
//# sourceMappingURL=icon-selector.js.map
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=icon-selector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"icon-selector.js","mappings":";;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|