@vertexvis/viewer 1.1.1-testing.3 → 1.1.1-testing.5
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/README.template.md +14 -8
- package/dist/cjs/{bundle-07I6_WqC.js → bundle-BCS0nA91.js} +28 -25
- package/dist/cjs/bundle-BCS0nA91.js.map +1 -0
- package/dist/cjs/{config-CepHuwRF.js → config-OELTgslY.js} +3 -3
- package/dist/cjs/{config-CepHuwRF.js.map → config-OELTgslY.js.map} +1 -1
- package/dist/cjs/{controller-Dklbe0Y6.js → controller-DvE3p6ta.js} +3 -3
- package/dist/cjs/{controller-Dklbe0Y6.js.map → controller-DvE3p6ta.js.map} +1 -1
- package/dist/cjs/{dom-Dlu6-7PF.js → dom-BuQSLPWr.js} +3 -3
- package/dist/cjs/{dom-Dlu6-7PF.js.map → dom-BuQSLPWr.js.map} +1 -1
- package/dist/cjs/{entities-BdWnb6KI.js → entities-rj-TEPKc.js} +4 -4
- package/dist/cjs/{entities-BdWnb6KI.js.map → entities-rj-TEPKc.js.map} +1 -1
- package/dist/cjs/{geometry_pb-BISQT2vx.js → geometry_pb-asn2mNvW.js} +3 -3
- package/dist/cjs/{geometry_pb-BISQT2vx.js.map → geometry_pb-asn2mNvW.js.map} +1 -1
- package/dist/cjs/grpc-D5Apx_zz.js.map +1 -1
- package/dist/cjs/index.cjs.js +13 -13
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{markup-C-qyTwID.js → markup-Du4uVRo4.js} +3 -3
- package/dist/cjs/{markup-C-qyTwID.js.map → markup-Du4uVRo4.js.map} +1 -1
- package/dist/cjs/{model-Dy5FvjIA.js → model-BC6acIWJ.js} +3 -3
- package/dist/cjs/{model-Dy5FvjIA.js.map → model-BC6acIWJ.js.map} +1 -1
- package/dist/cjs/model-Bw4h8wNt.js.map +1 -1
- package/dist/cjs/{model-k5VBFN6C.js → model-DqxeakCS.js} +3 -3
- package/dist/cjs/{model-k5VBFN6C.js.map → model-DqxeakCS.js.map} +1 -1
- package/dist/cjs/{multiElementInteractionHandler-Bqpg2wVT.js → multiElementInteractionHandler-Bdeo6FYp.js} +6 -5
- package/dist/cjs/multiElementInteractionHandler-Bdeo6FYp.js.map +1 -0
- package/dist/cjs/{overlays-BujVkBnG.js → overlays-DASFbMSp.js} +3 -3
- package/dist/cjs/{overlays-BujVkBnG.js.map → overlays-DASFbMSp.js.map} +1 -1
- package/dist/cjs/{queries-GhYmoomu.js → queries-e19TP_oF.js} +5 -5
- package/dist/cjs/queries-e19TP_oF.js.map +1 -0
- package/dist/cjs/{regl-component-CB004H91.js → regl-component-DjVaO3t3.js} +6 -6
- package/dist/cjs/{regl-component-CB004H91.js.map → regl-component-DjVaO3t3.js.map} +1 -1
- package/dist/cjs/{representation_pb-CHCm5o1e.js → representation_pb-BVBPrHLf.js} +3 -3
- package/dist/cjs/{representation_pb-CHCm5o1e.js.map → representation_pb-BVBPrHLf.js.map} +1 -1
- package/dist/cjs/{results-BpfUIwa8.js → results-CU9Ctm2K.js} +3 -3
- package/dist/cjs/{results-BpfUIwa8.js.map → results-CU9Ctm2K.js.map} +1 -1
- package/dist/cjs/{streamAttributes-CJOD7AxG.js → streamAttributes-M3UUIO3l.js} +118 -95
- package/dist/cjs/streamAttributes-M3UUIO3l.js.map +1 -0
- package/dist/cjs/{util-smaTO4bk.js → util-gX3IGslq.js} +3 -3
- package/dist/cjs/{util-smaTO4bk.js.map → util-gX3IGslq.js.map} +1 -1
- package/dist/cjs/{utils-BsXO-wLi.js → utils-D5TGpFAV.js} +3 -3
- package/dist/cjs/utils-D5TGpFAV.js.map +1 -0
- package/dist/cjs/{utils-DY6afhh8.js → utils-opS9hsaU.js} +3 -3
- package/dist/cjs/{utils-DY6afhh8.js.map → utils-opS9hsaU.js.map} +1 -1
- package/dist/cjs/vertex-scene-tree-notification-banner_4.cjs.entry.js +2 -2
- package/dist/cjs/vertex-scene-tree-notification-banner_4.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-scene-tree-table-cell.cjs.entry.js +3 -3
- package/dist/cjs/vertex-scene-tree-table-cell.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-scene-tree-table-column.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-scene-tree.cjs.entry.js +3 -3
- package/dist/cjs/vertex-scene-tree.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-annotation-callout.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-box-query-tool.cjs.entry.js +4 -4
- package/dist/cjs/vertex-viewer-box-query-tool.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-button_3.cjs.entry.js +6 -1
- package/dist/cjs/vertex-viewer-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-default-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-default-toolbar.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-dom-element_2.cjs.entry.js +5 -5
- package/dist/cjs/vertex-viewer-dom-group.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer-hit-result-indicator.cjs.entry.js +5 -5
- package/dist/cjs/vertex-viewer-markup-arrow_3.cjs.entry.js +3 -3
- package/dist/cjs/vertex-viewer-markup-tool.cjs.entry.js +4 -4
- package/dist/cjs/vertex-viewer-markup-tool.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-markup.cjs.entry.js +3 -3
- package/dist/cjs/vertex-viewer-markup.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-measurement-details.cjs.entry.js +3 -3
- package/dist/cjs/vertex-viewer-measurement-distance.cjs.entry.js +8 -8
- package/dist/cjs/vertex-viewer-measurement-line_2.cjs.entry.js +5 -5
- package/dist/cjs/vertex-viewer-measurement-precise.cjs.entry.js +7 -7
- package/dist/cjs/vertex-viewer-pin-group.cjs.entry.js +7 -7
- package/dist/cjs/vertex-viewer-pin-group.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-pin-label_2.cjs.entry.js +9 -8
- package/dist/cjs/vertex-viewer-pin-label_2.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-pin-tool.cjs.entry.js +3 -3
- package/dist/cjs/vertex-viewer-spinner.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-teleport-tool.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-transform-widget.cjs.entry.js +7 -7
- package/dist/cjs/vertex-viewer-transform-widget.cjs.entry.js.map +1 -1
- package/dist/cjs/vertex-viewer-view-cube.cjs.entry.js +2 -2
- package/dist/cjs/vertex-viewer-walk-mode-tool.cjs.entry.js +1 -1
- package/dist/cjs/vertex-viewer.cjs.entry.js +8 -8
- package/dist/cjs/viewer.cjs.js +1 -1
- package/dist/cjs/{viewport-B70DgDZj.js → viewport-BDbB9o9T.js} +3 -3
- package/dist/cjs/{viewport-B70DgDZj.js.map → viewport-BDbB9o9T.js.map} +1 -1
- package/dist/collection/components/scene-tree/scene-tree.css +2 -3
- package/dist/collection/components/scene-tree/scene-tree.js.map +1 -1
- package/dist/collection/components/scene-tree-notification-banner/scene-tree-notification-banner.css +1 -1
- package/dist/collection/components/scene-tree-search/scene-tree-search.css +1 -1
- package/dist/collection/components/scene-tree-search/scene-tree-search.js +1 -1
- package/dist/collection/components/scene-tree-search/scene-tree-search.js.map +1 -1
- package/dist/collection/components/scene-tree-table-cell/scene-tree-table-cell.css +10 -10
- package/dist/collection/components/scene-tree-table-cell/scene-tree-table-cell.js +1 -1
- package/dist/collection/components/scene-tree-table-cell/scene-tree-table-cell.js.map +1 -1
- package/dist/collection/components/scene-tree-table-column/scene-tree-table-column.css +0 -1
- package/dist/collection/components/scene-tree-table-layout/scene-tree-table-layout.css +3 -3
- package/dist/collection/components/viewer-annotation-callout/viewer-annotation-callout.css +3 -4
- package/dist/collection/components/viewer-box-query-tool/types.js.map +1 -1
- package/dist/collection/components/viewer-box-query-tool/viewer-box-query-tool.css +9 -7
- package/dist/collection/components/viewer-button/viewer-button.js +32 -1
- package/dist/collection/components/viewer-button/viewer-button.js.map +1 -1
- package/dist/collection/components/viewer-default-toolbar/viewer-default-toolbar.css +2 -2
- package/dist/collection/components/viewer-default-toolbar/viewer-default-toolbar.js +1 -1
- package/dist/collection/components/viewer-default-toolbar/viewer-default-toolbar.js.map +1 -1
- package/dist/collection/components/viewer-markup/viewer-markup.js.map +1 -1
- package/dist/collection/components/viewer-markup-arrow/utils.js.map +1 -1
- package/dist/collection/components/viewer-markup-tool/viewer-markup-tool.css +2 -2
- package/dist/collection/components/viewer-pin-group/viewer-pin-group.css +12 -11
- package/dist/collection/components/viewer-pin-label/viewer-pin-label.css +21 -8
- package/dist/collection/components/viewer-pin-label/viewer-pin-label.js +4 -3
- package/dist/collection/components/viewer-pin-label/viewer-pin-label.js.map +1 -1
- package/dist/collection/components/viewer-pin-label-line/viewer-pin-label-line.css +5 -4
- package/dist/collection/components/viewer-spinner/viewer-spinner.css +2 -2
- package/dist/collection/components/viewer-transform-widget/viewer-transform-widget-components.js +1 -1
- package/dist/collection/components/viewer-transform-widget/viewer-transform-widget-components.js.map +1 -1
- package/dist/collection/components/viewer-transform-widget/viewer-transform-widget.css +1 -2
- package/dist/collection/lib/grpc.js.map +1 -1
- package/dist/collection/lib/interactions/baseInteractionHandler.js +2 -1
- package/dist/collection/lib/interactions/baseInteractionHandler.js.map +1 -1
- package/dist/collection/lib/scenes/scene.js.map +1 -1
- package/dist/collection/lib/scenes/sceneViewStateLoader.js.map +1 -1
- package/dist/collection/lib/stream/state.js.map +1 -1
- package/dist/collection/lib/types/loadableResource.js.map +1 -1
- package/dist/collection/lib/types/sceneViewStateIdentifier.js.map +1 -1
- package/dist/collection/lib/walk-mode/model.js.map +1 -1
- package/dist/collection/workers/png-decoder-pool.js +4 -3
- package/dist/collection/workers/png-decoder-pool.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-2UsvOTHJ.js +5 -0
- package/dist/components/p-2UsvOTHJ.js.map +1 -0
- package/dist/components/{p-CZgX-9yo.js → p-5bk1mHRt.js} +2 -2
- package/dist/components/{p-DRGCkSEK.js → p-B8530k7R.js} +2 -2
- package/dist/components/{p-garvKln8.js → p-BAuOB8M-.js} +2 -2
- package/dist/components/p-BAuOB8M-.js.map +1 -0
- package/dist/components/{p-BKQMbekH.js → p-BCuMPvZO.js} +2 -2
- package/dist/components/p-BFEV_v80.js +5 -0
- package/dist/components/p-BFEV_v80.js.map +1 -0
- package/dist/components/{p-C02XtMl4.js → p-BHyxBmg6.js} +2 -2
- package/dist/components/{p-O1_Yvjd6.js → p-BT9d9jRt.js} +2 -2
- package/dist/components/{p-oDn1DcWj.js → p-BZDn1Vuv.js} +2 -2
- package/dist/components/{p-VEJB73Ei.js → p-Bdf4AcJ2.js} +2 -2
- package/dist/components/p-BgzjmANj.js +5 -0
- package/dist/components/p-BgzjmANj.js.map +1 -0
- package/dist/components/p-BjvjKoy7.js +5 -0
- package/dist/components/p-BjvjKoy7.js.map +1 -0
- package/dist/components/p-Bwtyddca.js +5 -0
- package/dist/components/p-Bwtyddca.js.map +1 -0
- package/dist/components/{p-CMdP8O-G.js → p-Bx42CNGV.js} +2 -2
- package/dist/components/{p-CelQDFR0.js → p-C12jtCFb.js} +2 -2
- package/dist/components/p-C86HMDzi.js +5 -0
- package/dist/components/p-C86HMDzi.js.map +1 -0
- package/dist/components/{p-Dzs4u_ZY.js → p-CABws4i9.js} +2 -2
- package/dist/components/p-CIuxJYJL.js.map +1 -1
- package/dist/components/{p-BqeEZXPn.js → p-CPROw2BU.js} +2 -2
- package/dist/components/p-CSVgoQU8.js +5 -0
- package/dist/components/p-CSVgoQU8.js.map +1 -0
- package/dist/components/{p-DnVcQAR9.js → p-CTi-0-dI.js} +2 -2
- package/dist/components/{p-EG7pMA2M.js → p-CeZe0Qql.js} +2 -2
- package/dist/components/p-CioaIHsi.js.map +1 -1
- package/dist/components/{p-Due5EmBt.js → p-Clyxptbp.js} +2 -2
- package/dist/components/{p-taOlygmc.js → p-Cs2aiMUK.js} +2 -2
- package/dist/components/p-Cs2aiMUK.js.map +1 -0
- package/dist/components/p-DUo-H-nW.js +5 -0
- package/dist/components/p-DUo-H-nW.js.map +1 -0
- package/dist/components/{p-MnZadXO8.js → p-D_h07qsA.js} +2 -2
- package/dist/components/{p-DCTZZ5Rd.js → p-DjQ6RXWP.js} +2 -2
- package/dist/components/p-DxuSiXYg.js.map +1 -1
- package/dist/components/{p-CxzyM08j.js → p-DyL2wWm6.js} +2 -2
- package/dist/components/{p-avWSFTeP.js → p-JvS9LLoO.js} +2 -2
- package/dist/components/{p-CfTvpqud.js → p-KidjtXKE.js} +2 -2
- package/dist/{viewer/p-7m7Vr5V7.js → components/p-Ng27jBsS.js} +2 -2
- package/dist/components/p-Ng27jBsS.js.map +1 -0
- package/dist/components/{p-BC777sCK.js → p-UJR-ixsy.js} +2 -2
- package/dist/components/{p-Ib4vgh2t.js → p-UrT4ZJv3.js} +2 -2
- package/dist/components/{p-Ib4vgh2t.js.map → p-UrT4ZJv3.js.map} +1 -1
- package/dist/components/{p-mpsCUvSn.js → p-_qi2VkC2.js} +2 -2
- package/dist/components/{p-CNprIkKd.js → p-rDr0x5Z7.js} +2 -2
- package/dist/components/vertex-scene-tree-search.js +1 -1
- package/dist/components/vertex-scene-tree-table-cell.js +1 -1
- package/dist/components/vertex-scene-tree-table-cell.js.map +1 -1
- package/dist/components/vertex-scene-tree-table-column.js.map +1 -1
- package/dist/components/vertex-scene-tree-table-layout.js +1 -1
- package/dist/components/vertex-scene-tree.js +1 -1
- package/dist/components/vertex-scene-tree.js.map +1 -1
- package/dist/components/vertex-viewer-annotation-callout.js.map +1 -1
- package/dist/components/vertex-viewer-box-query-tool.js +1 -1
- package/dist/components/vertex-viewer-box-query-tool.js.map +1 -1
- package/dist/components/vertex-viewer-button.js +1 -1
- package/dist/components/vertex-viewer-default-toolbar.js +1 -1
- package/dist/components/vertex-viewer-default-toolbar.js.map +1 -1
- package/dist/components/vertex-viewer-dom-element.js +1 -1
- package/dist/components/vertex-viewer-dom-group.js +1 -1
- package/dist/components/vertex-viewer-dom-renderer.js +1 -1
- package/dist/components/vertex-viewer-hit-result-indicator.js +1 -1
- package/dist/components/vertex-viewer-markup-arrow.js +1 -1
- package/dist/components/vertex-viewer-markup-circle.js +1 -1
- package/dist/components/vertex-viewer-markup-freeform.js +1 -1
- package/dist/components/vertex-viewer-markup-tool.js +1 -1
- package/dist/components/vertex-viewer-markup-tool.js.map +1 -1
- package/dist/components/vertex-viewer-markup.js +1 -1
- package/dist/components/vertex-viewer-markup.js.map +1 -1
- package/dist/components/vertex-viewer-measurement-details.js +1 -1
- package/dist/components/vertex-viewer-measurement-distance.js +1 -1
- package/dist/components/vertex-viewer-measurement-line.js +1 -1
- package/dist/components/vertex-viewer-measurement-overlays.js +1 -1
- package/dist/components/vertex-viewer-measurement-precise.js +1 -1
- package/dist/components/vertex-viewer-pin-group.js +1 -1
- package/dist/components/vertex-viewer-pin-label-line.js +1 -1
- package/dist/components/vertex-viewer-pin-label.js +1 -1
- package/dist/components/vertex-viewer-pin-tool.js +1 -1
- package/dist/components/vertex-viewer-teleport-tool.js +1 -1
- package/dist/components/vertex-viewer-transform-widget.js +1 -1
- package/dist/components/vertex-viewer-transform-widget.js.map +1 -1
- package/dist/components/vertex-viewer-view-cube.js +1 -1
- package/dist/components/vertex-viewer-walk-mode-tool.js +1 -1
- package/dist/components/vertex-viewer.js +1 -1
- package/dist/esm/{bundle-CZZALKHT.js → bundle-2UsvOTHJ.js} +28 -25
- package/dist/esm/bundle-2UsvOTHJ.js.map +1 -0
- package/dist/esm/{config-CyaUTJEG.js → config-Cqrcty7U.js} +3 -3
- package/dist/esm/{config-CyaUTJEG.js.map → config-Cqrcty7U.js.map} +1 -1
- package/dist/esm/{controller-ByBd8r3O.js → controller-BPECXXfj.js} +3 -3
- package/dist/esm/{controller-ByBd8r3O.js.map → controller-BPECXXfj.js.map} +1 -1
- package/dist/esm/{dom-Bbf2HAst.js → dom-DaP9SiyY.js} +3 -3
- package/dist/esm/{dom-Bbf2HAst.js.map → dom-DaP9SiyY.js.map} +1 -1
- package/dist/esm/{entities-DriL3zBC.js → entities-CawBZH7i.js} +4 -4
- package/dist/esm/{entities-DriL3zBC.js.map → entities-CawBZH7i.js.map} +1 -1
- package/dist/esm/{geometry_pb-BEB8SExe.js → geometry_pb-COdZQiRi.js} +3 -3
- package/dist/esm/{geometry_pb-BEB8SExe.js.map → geometry_pb-COdZQiRi.js.map} +1 -1
- package/dist/esm/grpc-hWL8wFvk.js.map +1 -1
- package/dist/esm/index.js +13 -13
- package/dist/esm/index.mjs +13 -13
- package/dist/esm/loader.js +1 -1
- package/dist/esm/loader.mjs +1 -1
- package/dist/esm/{markup-y96-uR-l.js → markup-B58g75Hr.js} +3 -3
- package/dist/esm/{markup-y96-uR-l.js.map → markup-B58g75Hr.js.map} +1 -1
- package/dist/esm/{model-BJQo0DxL.js → model-B5KuXEsl.js} +3 -3
- package/dist/esm/{model-BJQo0DxL.js.map → model-B5KuXEsl.js.map} +1 -1
- package/dist/esm/model-BHVr1tU0.js.map +1 -1
- package/dist/esm/{model-CTdG73h9.js → model-Dc6T63-k.js} +3 -3
- package/dist/esm/{model-CTdG73h9.js.map → model-Dc6T63-k.js.map} +1 -1
- package/dist/esm/{multiElementInteractionHandler-C45E8VzE.js → multiElementInteractionHandler-3tE3OPpw.js} +6 -5
- package/dist/esm/multiElementInteractionHandler-3tE3OPpw.js.map +1 -0
- package/dist/esm/{overlays-DmcRtaSn.js → overlays-BwIqsqLW.js} +3 -3
- package/dist/esm/{overlays-DmcRtaSn.js.map → overlays-BwIqsqLW.js.map} +1 -1
- package/dist/esm/{queries-DWjy-LsV.js → queries-B4XotYyr.js} +5 -5
- package/dist/esm/queries-B4XotYyr.js.map +1 -0
- package/dist/esm/{regl-component-zzdsBise.js → regl-component-B1_h3_s8.js} +6 -6
- package/dist/esm/{regl-component-zzdsBise.js.map → regl-component-B1_h3_s8.js.map} +1 -1
- package/dist/esm/{representation_pb-CQdJxiGO.js → representation_pb-C4MJfZMo.js} +3 -3
- package/dist/esm/{representation_pb-CQdJxiGO.js.map → representation_pb-C4MJfZMo.js.map} +1 -1
- package/dist/esm/{results-ClIgKssN.js → results-De9arm7M.js} +3 -3
- package/dist/esm/{results-ClIgKssN.js.map → results-De9arm7M.js.map} +1 -1
- package/dist/esm/{streamAttributes-CTs61PCl.js → streamAttributes-BW9JzMeG.js} +117 -94
- package/dist/esm/streamAttributes-BW9JzMeG.js.map +1 -0
- package/dist/esm/{util-DUjEw5Kh.js → util-CMPFqnEv.js} +3 -3
- package/dist/esm/{util-DUjEw5Kh.js.map → util-CMPFqnEv.js.map} +1 -1
- package/dist/esm/{utils-DOjHP1wA.js → utils-B1mSYmAK.js} +3 -3
- package/dist/esm/{utils-DOjHP1wA.js.map → utils-B1mSYmAK.js.map} +1 -1
- package/dist/esm/{utils-DJ5FvINs.js → utils-c-mcLgsj.js} +3 -3
- package/dist/esm/utils-c-mcLgsj.js.map +1 -0
- package/dist/esm/vertex-scene-tree-notification-banner_4.entry.js +2 -2
- package/dist/esm/vertex-scene-tree-notification-banner_4.entry.js.map +1 -1
- package/dist/esm/vertex-scene-tree-table-cell.entry.js +3 -3
- package/dist/esm/vertex-scene-tree-table-cell.entry.js.map +1 -1
- package/dist/esm/vertex-scene-tree-table-column.entry.js.map +1 -1
- package/dist/esm/vertex-scene-tree.entry.js +3 -3
- package/dist/esm/vertex-scene-tree.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-annotation-callout.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-box-query-tool.entry.js +4 -4
- package/dist/esm/vertex-viewer-box-query-tool.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-button_3.entry.js +6 -1
- package/dist/esm/vertex-viewer-button_3.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-default-toolbar.entry.js +2 -2
- package/dist/esm/vertex-viewer-default-toolbar.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-dom-element_2.entry.js +5 -5
- package/dist/esm/vertex-viewer-dom-group.entry.js +1 -1
- package/dist/esm/vertex-viewer-hit-result-indicator.entry.js +5 -5
- package/dist/esm/vertex-viewer-markup-arrow_3.entry.js +3 -3
- package/dist/esm/vertex-viewer-markup-tool.entry.js +4 -4
- package/dist/esm/vertex-viewer-markup-tool.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-markup.entry.js +3 -3
- package/dist/esm/vertex-viewer-markup.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-measurement-details.entry.js +3 -3
- package/dist/esm/vertex-viewer-measurement-distance.entry.js +8 -8
- package/dist/esm/vertex-viewer-measurement-line_2.entry.js +5 -5
- package/dist/esm/vertex-viewer-measurement-precise.entry.js +7 -7
- package/dist/esm/vertex-viewer-pin-group.entry.js +7 -7
- package/dist/esm/vertex-viewer-pin-group.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-pin-label_2.entry.js +9 -8
- package/dist/esm/vertex-viewer-pin-label_2.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-pin-tool.entry.js +3 -3
- package/dist/esm/vertex-viewer-spinner.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-teleport-tool.entry.js +2 -2
- package/dist/esm/vertex-viewer-transform-widget.entry.js +7 -7
- package/dist/esm/vertex-viewer-transform-widget.entry.js.map +1 -1
- package/dist/esm/vertex-viewer-view-cube.entry.js +2 -2
- package/dist/esm/vertex-viewer-walk-mode-tool.entry.js +1 -1
- package/dist/esm/vertex-viewer.entry.js +8 -8
- package/dist/esm/viewer.js +1 -1
- package/dist/esm/{viewport-D90kzsD7.js → viewport-CHtidaFL.js} +3 -3
- package/dist/esm/{viewport-D90kzsD7.js.map → viewport-CHtidaFL.js.map} +1 -1
- package/dist/types/components/viewer-button/viewer-button.d.ts +5 -0
- package/dist/types/components.d.ts +14 -1
- package/dist/types/lib/walk-mode/model.d.ts +10 -10
- package/dist/types/regl-shape.d.ts +1 -5
- package/dist/types/workers/png-decoder-pool.d.ts +0 -1
- package/dist/viewer/index.esm.js +1 -1
- package/dist/viewer/{p-12a673f0.entry.js → p-1506f9a2.entry.js} +2 -2
- package/dist/viewer/p-1506f9a2.entry.js.map +1 -0
- package/dist/viewer/{p-78f422af.entry.js → p-287e0670.entry.js} +2 -2
- package/dist/viewer/{p-78f422af.entry.js.map → p-287e0670.entry.js.map} +1 -1
- package/dist/viewer/{p-7b4eec65.entry.js → p-293d8f3f.entry.js} +2 -2
- package/dist/viewer/p-2UsvOTHJ.js +5 -0
- package/dist/viewer/p-2UsvOTHJ.js.map +1 -0
- package/dist/viewer/{p-510fd2e1.entry.js → p-2d2fa147.entry.js} +2 -2
- package/dist/viewer/{p-a108a305.entry.js → p-2faddbf8.entry.js} +2 -2
- package/dist/viewer/{p-e3981cf8.entry.js → p-36349a80.entry.js} +2 -2
- package/dist/viewer/p-36349a80.entry.js.map +1 -0
- package/dist/viewer/{p-aa0359e0.entry.js → p-3c5dd716.entry.js} +2 -2
- package/dist/viewer/p-44395076.entry.js +5 -0
- package/dist/viewer/p-44395076.entry.js.map +1 -0
- package/dist/viewer/{p-fe434552.entry.js → p-45cc095e.entry.js} +2 -2
- package/dist/viewer/p-504e77a7.entry.js +5 -0
- package/dist/viewer/{p-c2c3579f.entry.js.map → p-504e77a7.entry.js.map} +1 -1
- package/dist/viewer/{p-71c03352.entry.js → p-53f6cc59.entry.js} +2 -2
- package/dist/viewer/{p-56e39cff.entry.js → p-83683307.entry.js} +2 -2
- package/dist/viewer/{p-91fca24b.entry.js → p-93311f46.entry.js} +2 -2
- package/dist/viewer/{p-BIR7Lfxx.js → p-BEOO-Ypv.js} +2 -2
- package/dist/viewer/{p-BIR7Lfxx.js.map → p-BEOO-Ypv.js.map} +1 -1
- package/dist/viewer/{p-C6YtUG51.js → p-BJGbLthH.js} +2 -2
- package/dist/viewer/{p-C6YtUG51.js.map → p-BJGbLthH.js.map} +1 -1
- package/dist/viewer/{p-O1_Yvjd6.js → p-BT9d9jRt.js} +2 -2
- package/dist/viewer/{p-O1_Yvjd6.js.map → p-BT9d9jRt.js.map} +1 -1
- package/dist/viewer/{p-VEJB73Ei.js → p-Bdf4AcJ2.js} +2 -2
- package/dist/viewer/{p-VEJB73Ei.js.map → p-Bdf4AcJ2.js.map} +1 -1
- package/dist/viewer/{p-C-huOg09.js → p-Br21pGVj.js} +2 -2
- package/dist/viewer/{p-C-huOg09.js.map → p-Br21pGVj.js.map} +1 -1
- package/dist/viewer/{p-Ce1j43tF.js → p-Bw_ryWU0.js} +2 -2
- package/dist/viewer/{p-Ce1j43tF.js.map → p-Bw_ryWU0.js.map} +1 -1
- package/dist/viewer/{p-CelQDFR0.js → p-C12jtCFb.js} +2 -2
- package/dist/viewer/{p-CelQDFR0.js.map → p-C12jtCFb.js.map} +1 -1
- package/dist/viewer/{p-B-J4CqZy.js → p-C4_1Jc7H.js} +2 -2
- package/dist/viewer/{p-B-J4CqZy.js.map → p-C4_1Jc7H.js.map} +1 -1
- package/dist/viewer/p-CEDqc5sS.js +5 -0
- package/dist/viewer/{p-BDy3SLKk.js.map → p-CEDqc5sS.js.map} +1 -1
- package/dist/viewer/p-Cc3XhAoA.js +5 -0
- package/dist/viewer/p-Cc3XhAoA.js.map +1 -0
- package/dist/viewer/{p-EG7pMA2M.js → p-CeZe0Qql.js} +2 -2
- package/dist/viewer/{p-EG7pMA2M.js.map → p-CeZe0Qql.js.map} +1 -1
- package/dist/viewer/p-CioaIHsi.js.map +1 -1
- package/dist/viewer/{p-EUeCUp3y.js → p-CxBXErQ8.js} +2 -2
- package/dist/viewer/{p-EUeCUp3y.js.map → p-CxBXErQ8.js.map} +1 -1
- package/dist/viewer/{p-CIBBr-p1.js → p-D0aTA_2m.js} +2 -2
- package/dist/viewer/{p-CIBBr-p1.js.map → p-D0aTA_2m.js.map} +1 -1
- package/dist/viewer/{p-UQXG8bCI.js → p-DBfvBC5O.js} +2 -2
- package/dist/viewer/p-DBfvBC5O.js.map +1 -0
- package/dist/{components/p-QhlhRt6X.js → viewer/p-DIbJ8Ijj.js} +2 -2
- package/dist/viewer/p-DIbJ8Ijj.js.map +1 -0
- package/dist/viewer/{p-Cju1inFh.js → p-DYDhLlLS.js} +2 -2
- package/dist/viewer/p-DYDhLlLS.js.map +1 -0
- package/dist/viewer/{p-CxzyM08j.js → p-DyL2wWm6.js} +2 -2
- package/dist/viewer/{p-CxzyM08j.js.map → p-DyL2wWm6.js.map} +1 -1
- package/dist/viewer/{p-avWSFTeP.js → p-JvS9LLoO.js} +2 -2
- package/dist/viewer/{p-avWSFTeP.js.map → p-JvS9LLoO.js.map} +1 -1
- package/dist/viewer/{p-mpsCUvSn.js → p-_qi2VkC2.js} +2 -2
- package/dist/viewer/{p-mpsCUvSn.js.map → p-_qi2VkC2.js.map} +1 -1
- package/dist/viewer/{p-9312a936.entry.js → p-a94b626c.entry.js} +2 -2
- package/dist/viewer/p-b5cc83a4.entry.js.map +1 -1
- package/dist/viewer/{p-fc7d9b2b.entry.js → p-c531ca97.entry.js} +2 -2
- package/dist/viewer/{p-fc7d9b2b.entry.js.map → p-c531ca97.entry.js.map} +1 -1
- package/dist/viewer/p-c9dee5c4.entry.js +5 -0
- package/dist/viewer/p-c9dee5c4.entry.js.map +1 -0
- package/dist/viewer/p-ce711ae0.entry.js +5 -0
- package/dist/viewer/p-ce711ae0.entry.js.map +1 -0
- package/dist/viewer/{p-82ed4346.entry.js → p-ced98004.entry.js} +2 -2
- package/dist/viewer/p-d357d235.entry.js.map +1 -1
- package/dist/viewer/p-dcb6ddfe.entry.js +5 -0
- package/dist/viewer/p-dcb6ddfe.entry.js.map +1 -0
- package/dist/viewer/p-e98db875.entry.js.map +1 -1
- package/dist/viewer/{p-c2454523.entry.js → p-ea45c3e9.entry.js} +2 -2
- package/dist/viewer/p-ebd9dd99.entry.js +5 -0
- package/dist/viewer/p-ebd9dd99.entry.js.map +1 -0
- package/dist/viewer/{p-a893a299.entry.js → p-ecd594f2.entry.js} +2 -2
- package/dist/viewer/{p-03a531d9.entry.js → p-ef9437ca.entry.js} +2 -2
- package/dist/viewer/p-fec5a15d.entry.js +5 -0
- package/dist/viewer/p-fec5a15d.entry.js.map +1 -0
- package/dist/viewer/p-ipyYHvea.js.map +1 -1
- package/dist/viewer/viewer.esm.js +1 -1
- package/package.json +10 -10
- package/readme.md +14 -8
- package/dist/cjs/bundle-07I6_WqC.js.map +0 -1
- package/dist/cjs/multiElementInteractionHandler-Bqpg2wVT.js.map +0 -1
- package/dist/cjs/queries-GhYmoomu.js.map +0 -1
- package/dist/cjs/streamAttributes-CJOD7AxG.js.map +0 -1
- package/dist/cjs/utils-BsXO-wLi.js.map +0 -1
- package/dist/components/p-B4sO9HdX.js +0 -5
- package/dist/components/p-B4sO9HdX.js.map +0 -1
- package/dist/components/p-C--Voxln.js +0 -5
- package/dist/components/p-C--Voxln.js.map +0 -1
- package/dist/components/p-CZZALKHT.js +0 -5
- package/dist/components/p-CZZALKHT.js.map +0 -1
- package/dist/components/p-Cn0vKqIN.js +0 -5
- package/dist/components/p-Cn0vKqIN.js.map +0 -1
- package/dist/components/p-DH341c7b.js +0 -5
- package/dist/components/p-DH341c7b.js.map +0 -1
- package/dist/components/p-DjrtwKcK.js +0 -5
- package/dist/components/p-DjrtwKcK.js.map +0 -1
- package/dist/components/p-Dmc49hX3.js +0 -5
- package/dist/components/p-Dmc49hX3.js.map +0 -1
- package/dist/components/p-QhlhRt6X.js.map +0 -1
- package/dist/components/p-Y8W_BXUk.js +0 -5
- package/dist/components/p-Y8W_BXUk.js.map +0 -1
- package/dist/components/p-garvKln8.js.map +0 -1
- package/dist/components/p-taOlygmc.js.map +0 -1
- package/dist/esm/bundle-CZZALKHT.js.map +0 -1
- package/dist/esm/multiElementInteractionHandler-C45E8VzE.js.map +0 -1
- package/dist/esm/queries-DWjy-LsV.js.map +0 -1
- package/dist/esm/streamAttributes-CTs61PCl.js.map +0 -1
- package/dist/esm/utils-DJ5FvINs.js.map +0 -1
- package/dist/viewer/p-02384d83.entry.js +0 -5
- package/dist/viewer/p-02384d83.entry.js.map +0 -1
- package/dist/viewer/p-12a673f0.entry.js.map +0 -1
- package/dist/viewer/p-49578ec9.entry.js +0 -5
- package/dist/viewer/p-49578ec9.entry.js.map +0 -1
- package/dist/viewer/p-4c223366.entry.js +0 -5
- package/dist/viewer/p-4c223366.entry.js.map +0 -1
- package/dist/viewer/p-7m7Vr5V7.js.map +0 -1
- package/dist/viewer/p-8774425b.entry.js +0 -5
- package/dist/viewer/p-8774425b.entry.js.map +0 -1
- package/dist/viewer/p-9c02567d.entry.js +0 -5
- package/dist/viewer/p-9c02567d.entry.js.map +0 -1
- package/dist/viewer/p-BDy3SLKk.js +0 -5
- package/dist/viewer/p-CZZALKHT.js +0 -5
- package/dist/viewer/p-CZZALKHT.js.map +0 -1
- package/dist/viewer/p-Cju1inFh.js.map +0 -1
- package/dist/viewer/p-Cr2EnhS-.js +0 -5
- package/dist/viewer/p-Cr2EnhS-.js.map +0 -1
- package/dist/viewer/p-UQXG8bCI.js.map +0 -1
- package/dist/viewer/p-c2c3579f.entry.js +0 -5
- package/dist/viewer/p-d5542b6a.entry.js +0 -5
- package/dist/viewer/p-d5542b6a.entry.js.map +0 -1
- package/dist/viewer/p-e3981cf8.entry.js.map +0 -1
- /package/dist/components/{p-CZgX-9yo.js.map → p-5bk1mHRt.js.map} +0 -0
- /package/dist/components/{p-DRGCkSEK.js.map → p-B8530k7R.js.map} +0 -0
- /package/dist/components/{p-BKQMbekH.js.map → p-BCuMPvZO.js.map} +0 -0
- /package/dist/components/{p-C02XtMl4.js.map → p-BHyxBmg6.js.map} +0 -0
- /package/dist/components/{p-O1_Yvjd6.js.map → p-BT9d9jRt.js.map} +0 -0
- /package/dist/components/{p-oDn1DcWj.js.map → p-BZDn1Vuv.js.map} +0 -0
- /package/dist/components/{p-VEJB73Ei.js.map → p-Bdf4AcJ2.js.map} +0 -0
- /package/dist/components/{p-CMdP8O-G.js.map → p-Bx42CNGV.js.map} +0 -0
- /package/dist/components/{p-CelQDFR0.js.map → p-C12jtCFb.js.map} +0 -0
- /package/dist/components/{p-Dzs4u_ZY.js.map → p-CABws4i9.js.map} +0 -0
- /package/dist/components/{p-BqeEZXPn.js.map → p-CPROw2BU.js.map} +0 -0
- /package/dist/components/{p-DnVcQAR9.js.map → p-CTi-0-dI.js.map} +0 -0
- /package/dist/components/{p-EG7pMA2M.js.map → p-CeZe0Qql.js.map} +0 -0
- /package/dist/components/{p-Due5EmBt.js.map → p-Clyxptbp.js.map} +0 -0
- /package/dist/components/{p-MnZadXO8.js.map → p-D_h07qsA.js.map} +0 -0
- /package/dist/components/{p-DCTZZ5Rd.js.map → p-DjQ6RXWP.js.map} +0 -0
- /package/dist/components/{p-CxzyM08j.js.map → p-DyL2wWm6.js.map} +0 -0
- /package/dist/components/{p-avWSFTeP.js.map → p-JvS9LLoO.js.map} +0 -0
- /package/dist/components/{p-CfTvpqud.js.map → p-KidjtXKE.js.map} +0 -0
- /package/dist/components/{p-BC777sCK.js.map → p-UJR-ixsy.js.map} +0 -0
- /package/dist/components/{p-mpsCUvSn.js.map → p-_qi2VkC2.js.map} +0 -0
- /package/dist/components/{p-CNprIkKd.js.map → p-rDr0x5Z7.js.map} +0 -0
- /package/dist/viewer/{p-7b4eec65.entry.js.map → p-293d8f3f.entry.js.map} +0 -0
- /package/dist/viewer/{p-510fd2e1.entry.js.map → p-2d2fa147.entry.js.map} +0 -0
- /package/dist/viewer/{p-a108a305.entry.js.map → p-2faddbf8.entry.js.map} +0 -0
- /package/dist/viewer/{p-aa0359e0.entry.js.map → p-3c5dd716.entry.js.map} +0 -0
- /package/dist/viewer/{p-fe434552.entry.js.map → p-45cc095e.entry.js.map} +0 -0
- /package/dist/viewer/{p-71c03352.entry.js.map → p-53f6cc59.entry.js.map} +0 -0
- /package/dist/viewer/{p-56e39cff.entry.js.map → p-83683307.entry.js.map} +0 -0
- /package/dist/viewer/{p-91fca24b.entry.js.map → p-93311f46.entry.js.map} +0 -0
- /package/dist/viewer/{p-9312a936.entry.js.map → p-a94b626c.entry.js.map} +0 -0
- /package/dist/viewer/{p-82ed4346.entry.js.map → p-ced98004.entry.js.map} +0 -0
- /package/dist/viewer/{p-c2454523.entry.js.map → p-ea45c3e9.entry.js.map} +0 -0
- /package/dist/viewer/{p-a893a299.entry.js.map → p-ecd594f2.entry.js.map} +0 -0
- /package/dist/viewer/{p-03a531d9.entry.js.map → p-ef9437ca.entry.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils-BsXO-wLi.js","sources":["../geometry/src/point.ts","src/components/viewer-markup-arrow/utils.ts","src/components/viewer-markup-circle/utils.ts","src/components/viewer-markup-freeform/utils.ts"],"sourcesContent":["import * as Angle from './angle';\nimport { lerp as lerpNumber } from './math';\n\n/**\n * A `Point` represents a cartesian coordinate with a horizontal and vertical\n * position or length.\n */\nexport interface Point {\n x: number;\n y: number;\n}\n\n/**\n * Returns a new `Point` with the given horizontal and vertical position.\n */\nexport function create(x = 0, y = 0): Point {\n return { x, y };\n}\n\n/**\n * Converts a polar coordinate (length and angle) into a Cartesian coordinate.\n */\nexport function polar(length: number, radians: Angle.Angle): Point {\n const x = Math.cos(radians) * length;\n const y = Math.sin(radians) * length;\n return create(x, y);\n}\n\n/**\n * Returns the distance between two points.\n */\nexport function distance(a: Point, b: Point): number {\n const delta = subtract(a, b);\n return Math.sqrt(delta.x * delta.x + delta.y * delta.y);\n}\n\n/**\n * Returns a new `Point` where `b` is subtracted from `a`.\n */\nexport function subtract(a: Point, b: Point): Point {\n return { x: a.x - b.x, y: a.y - b.y };\n}\n\n/**\n * Returns a new `Point` where `b` is added to `a`.\n */\nexport function add(a: Point, b: Point): Point {\n return { x: a.x + b.x, y: a.y + b.y };\n}\n\n/**\n * Returns `true` if the `x` and `y` positions of `a` and `b` are equal.\n */\nexport function isEqual(a: Point, b: Point): boolean {\n return a.x === b.x && a.y === b.y;\n}\n\n/**\n * Performs a linear interpolation between `a` and `b` and returns the result.\n * The value of `t` is clamped between `[0, 1]`.\n *\n * @param a The start value.\n * @param b The end value.\n * @param t A value between 0 and 1.\n * @returns A point between `a` and `b`.\n */\nexport function lerp(a: Point, b: Point, t: number): Point {\n return {\n x: lerpNumber(a.x, b.x, t),\n y: lerpNumber(a.y, b.y, t),\n };\n}\n\n/**\n * Returns a new `Point` where `x` and `y` are inverted.\n */\nexport function negate(pt: Point): Point {\n return create(-pt.x, -pt.y);\n}\n\n/**\n * Returns a new `Point` where `x` and `y` are multiplied by the given scale\n * factors.\n */\nexport function scale(pt: Point, scaleX: number, scaleY: number): Point {\n return {\n x: pt.x * scaleX,\n y: pt.y * scaleY,\n };\n}\n\n/**\n * Returns a new `Point` where `x` and `y` are multiplied by the given scale\n * factor.\n */\nexport function scaleProportional(pt: Point, scale: number): Point {\n return {\n x: pt.x * scale,\n y: pt.y * scale,\n };\n}\n\n/**\n * Returns the magnitude of a point.\n */\nexport function magnitude(pt: Point): number {\n return Math.sqrt(pt.x * pt.x + pt.y * pt.y);\n}\n\n/**\n * Transforms a vector into the corresponding normal (unit) vector.\n */\nexport function normalizeVector(pt: Point): Point {\n const magnitudeOfPoint = magnitude(pt);\n if (magnitudeOfPoint === 0) {\n return create(0, 0);\n } else {\n return scaleProportional(pt, 1 / magnitudeOfPoint);\n }\n}\n\n/**\n * Returns a new normal (unit) vector pointing between the two given points.\n */\nexport function normalDirectionVector(ptA: Point, ptB: Point): Point {\n return normalizeVector(subtract(ptB, ptA));\n}\n\n/**\n * Returns a vector orthogonal to the vector between the two given points.\n */\nexport function orthogonalVector(ptA: Point, ptB: Point): Point {\n const unitVectorBetweenPoints = normalDirectionVector(ptA, ptB);\n\n // Handle vectors that are parallel to the x or y axis\n if (unitVectorBetweenPoints.x === 0 || unitVectorBetweenPoints.y === 0) {\n return create(-1 * unitVectorBetweenPoints.y, unitVectorBetweenPoints.x);\n }\n\n if (\n Math.abs(unitVectorBetweenPoints.x) > Math.abs(unitVectorBetweenPoints.y)\n ) {\n const vectorXValue = 1 - Math.pow(unitVectorBetweenPoints.x, 2);\n const vectorYValue =\n -1 * unitVectorBetweenPoints.x * unitVectorBetweenPoints.y;\n return normalizeVector(create(vectorXValue, vectorYValue));\n } else {\n const vectorXValue =\n -1 * unitVectorBetweenPoints.x * unitVectorBetweenPoints.y;\n const vectorYValue = 1 - Math.pow(unitVectorBetweenPoints.y, 2);\n return normalizeVector(create(vectorXValue, vectorYValue));\n }\n}\n\n/**\n * Parses a JSON string representation of a Point and returns an object.\n *\n * @param json A JSON string, either in the form `[x,y]` or `{\"x\": 0, \"y\": 0}`\n * @returns A parsed Point.\n */\nexport function fromJson(json: string): Point {\n const obj = JSON.parse(json);\n if (Array.isArray(obj)) {\n const [x, y] = obj;\n return create(x, y);\n } else {\n const { x, y } = obj;\n return create(x, y);\n }\n}\n","import { Angle } from '@vertexvis/geometry';\n\nimport * as Point from '../../../../geometry/src/point';\n\nexport type LineAnchorStyle =\n | 'arrow-triangle'\n | 'arrow-line'\n | 'dot'\n | 'hash'\n | 'none';\n\nexport interface LineAnchorStylePoints {\n tip: Point.Point;\n base: Point.Point;\n arrowTriangle: ArrowheadPoints;\n arrowLine: ArrowheadPoints;\n hash: ArrowheadPoints;\n radius: number;\n}\n\nexport interface ArrowheadPoints {\n leftPoint: Point.Point;\n rightPoint: Point.Point;\n}\n\nexport interface LinePoints {\n x1: number;\n y1: number;\n x2: number;\n y2: number;\n}\n\nexport interface CirclePoints {\n cx: number;\n cy: number;\n r: number;\n}\n\nexport function createArrowheadPoints(\n start: Point.Point,\n end: Point.Point,\n arrowSideLength: number,\n arrowHeadTheta: number,\n): ArrowheadPoints {\n const arrowOrthogonalVector = Point.orthogonalVector(start, end);\n const normalizedDirection = Point.normalDirectionVector(start, end);\n\n const arrowLeft = Point.subtract(\n end,\n Point.add(\n Point.scaleProportional(\n normalizedDirection,\n arrowSideLength * Math.cos(arrowHeadTheta),\n ),\n Point.scaleProportional(\n arrowOrthogonalVector,\n arrowSideLength * Math.sin(arrowHeadTheta),\n ),\n ),\n );\n const arrowRight = Point.subtract(\n end,\n Point.subtract(\n Point.scaleProportional(\n normalizedDirection,\n arrowSideLength * Math.cos(arrowHeadTheta),\n ),\n Point.scaleProportional(\n arrowOrthogonalVector,\n arrowSideLength * Math.sin(arrowHeadTheta),\n ),\n ),\n );\n\n return {\n leftPoint: arrowLeft,\n rightPoint: arrowRight,\n };\n}\n\nexport function createLineAnchorStylePoints(\n start: Point.Point,\n end: Point.Point,\n triangleArrowAngle = 65,\n lineArrowAngle = 85,\n): LineAnchorStylePoints {\n // Adjust the size of the end style to the distance between the start and end points\n const distance = Point.distance(start, end);\n const arrowHeadHeight = Math.max(4, Math.min(16, distance * 0.25));\n const hashHeight = Math.max(4, Math.min(12, distance * 0.16));\n const radius = Math.min(5, distance * 0.1);\n\n // Triangle arrow position\n const triangleArrowRelativeHeight = arrowHeadHeight / distance;\n const triangleArrowBasePosition = Point.add(\n Point.scaleProportional(end, 1 - triangleArrowRelativeHeight),\n Point.scaleProportional(start, triangleArrowRelativeHeight),\n );\n const triangleArrowTheta = Angle.toRadians(triangleArrowAngle / 2);\n const triangleArrowSideLength =\n arrowHeadHeight / Math.cos(triangleArrowTheta);\n const triangleArrow = createArrowheadPoints(\n start,\n end,\n triangleArrowSideLength,\n triangleArrowTheta,\n );\n\n // Line arrow position\n const lineArrowTheta = Angle.toRadians(lineArrowAngle / 2);\n const lineArrowSideLength = arrowHeadHeight / Math.cos(lineArrowTheta);\n const lineArrow = createArrowheadPoints(\n start,\n end,\n lineArrowSideLength,\n lineArrowTheta,\n );\n\n // Hash position\n // Setting the arrowHeadAngle to 90 degrees results in a\n // straight hash mark perpendicular to the direction of the line\n const hashLineTheta = Angle.toRadians(90);\n const hashLine = createArrowheadPoints(start, end, hashHeight, hashLineTheta);\n\n return {\n tip: end,\n base: triangleArrowBasePosition,\n arrowTriangle: triangleArrow,\n arrowLine: lineArrow,\n hash: hashLine,\n radius: radius,\n };\n}\n\nexport function arrowheadPointsToPolygonPoints(\n points: LineAnchorStylePoints,\n scale = 1,\n): string {\n const scaledRight = scalePointProportional(\n points.tip,\n points.arrowTriangle.rightPoint,\n scale,\n );\n const scaledLeft = scalePointProportional(\n points.tip,\n points.arrowTriangle.leftPoint,\n scale,\n );\n const scaledBase = scalePointProportional(points.tip, points.base, scale);\n\n return [points.tip, scaledRight, scaledBase, scaledLeft]\n .map((pt) => `${pt.x},${pt.y}`)\n .join(' ');\n}\n\nexport function arrowheadPointsToPathPoints(\n points: LineAnchorStylePoints,\n scale = 1,\n): string {\n const scaledRight = scalePointProportional(\n points.tip,\n points.arrowLine.rightPoint,\n scale,\n );\n const scaledLeft = scalePointProportional(\n points.tip,\n points.arrowLine.leftPoint,\n scale,\n );\n\n return `M${scaledRight.x} ${scaledRight.y} L${points.tip.x} ${points.tip.y} L${scaledLeft.x} ${scaledLeft.y} L${points.tip.x} ${points.tip.y} Z`;\n}\n\nexport function arrowheadPointsToHashPoints(\n points: LineAnchorStylePoints,\n scale = 1,\n): LinePoints {\n const scaledRight = scalePointProportional(\n points.tip,\n points.hash.rightPoint,\n scale,\n );\n const scaledLeft = scalePointProportional(\n points.tip,\n points.hash.leftPoint,\n scale,\n );\n\n return {\n x1: scaledRight.x,\n y1: scaledRight.y,\n x2: scaledLeft.x,\n y2: scaledLeft.y,\n };\n}\n\nexport function arrowheadPointsToCirclePoints(\n points: LineAnchorStylePoints,\n scale = 1,\n): CirclePoints {\n return {\n cx: points.tip.x,\n cy: points.tip.y,\n r: points.radius * scale,\n };\n}\n\nexport function isVertexViewerArrowMarkup(\n el: unknown,\n): el is HTMLVertexViewerMarkupArrowElement {\n return (\n el instanceof HTMLElement && el.nodeName === 'VERTEX-VIEWER-MARKUP-ARROW'\n );\n}\n\nexport function parsePoint(\n value: string | Point.Point | undefined,\n): Point.Point | undefined {\n return typeof value === 'string' ? Point.fromJson(value) : value;\n}\n\nexport function scalePointProportional(\n basePoint: Point.Point,\n scaledPoint: Point.Point,\n scale: number,\n): Point.Point {\n return Point.add(\n basePoint,\n Point.scaleProportional(Point.subtract(scaledPoint, basePoint), scale),\n );\n}\n","import { Rectangle } from '@vertexvis/geometry';\n\nexport function isVertexViewerCircleMarkup(\n el: unknown,\n): el is HTMLVertexViewerMarkupCircleElement {\n return (\n el instanceof HTMLElement && el.nodeName === 'VERTEX-VIEWER-MARKUP-CIRCLE'\n );\n}\n\nexport function parseBounds(\n value: string | Rectangle.Rectangle | undefined,\n): Rectangle.Rectangle | undefined {\n return typeof value === 'string' ? Rectangle.fromJson(value) : value;\n}\n","import { Point } from '@vertexvis/geometry';\n\nexport function parsePoints(\n value: string | Point.Point[] | undefined,\n): Point.Point[] | undefined {\n return typeof value === 'string'\n ? JSON.parse(value).map((values: number[]) =>\n Point.fromJson(JSON.stringify(values)),\n )\n : value;\n}\n\nexport function isVertexViewerFreeformMarkup(\n el: unknown,\n): el is HTMLVertexViewerMarkupFreeformElement {\n return (\n el instanceof HTMLElement && el.nodeName === 'VERTEX-VIEWER-MARKUP-FREEFORM'\n );\n}\n"],"names":["Point.orthogonalVector","Point.normalDirectionVector","Point.subtract","Point.add","Point.scaleProportional","distance","Point.distance","Angle","Point.fromJson","Rectangle","Point"],"mappings":";;;;;;;AAYA;;AAEG;AACG,SAAU,MAAM,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAA;AACjC,IAAA,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE;AACjB;AAWA;;AAEG;AACG,SAAU,QAAQ,CAAC,CAAQ,EAAE,CAAQ,EAAA;IACzC,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;IAC5B,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;AACzD;AAEA;;AAEG;AACG,SAAU,QAAQ,CAAC,CAAQ,EAAE,CAAQ,EAAA;IACzC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,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;AAE/C,IAAA,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAGO,gBAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,KAAK;AACtE;;ACZM,SAAU,WAAW,CACzB,KAAyC,EAAA;IAEzC,OAAO,OAAO,KAAK,KAAK;UACpB,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,MAAgB,KACrCC,YAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;UAExC,KAAK;AACX;AAEM,SAAU,4BAA4B,CAC1C,EAAW,EAAA;IAEX,QACE,EAAE,YAAY,WAAW,IAAI,EAAE,CAAC,QAAQ,KAAK,+BAA+B;AAEhF;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import{t as i,p as t,H as e,d as n,h as o,e as s}from"./p-Bb32XUUS.js";import{e as a,p as r}from"./p-CZZALKHT.js";import{c as l}from"./p-C6gMOKYg.js";import{g as h}from"./p-BqeEZXPn.js";import{P as d,g as p,a as c}from"./p-D1akPoVm.js";import{r as v}from"./p-Cd7kap5W.js";import{r as u}from"./p-CDM7zNn0.js";class b{constructor(i,t="view",e="pin-icon",n=undefined){this.model=i;this.mode=t;this.type=e;this.styleAttributes=n}addPin(i){this.model.addPin(i)}clearPins(){this.model.clearPins()}removePin(i){this.model.removePin(i)}setPins(i){this.model.setPins(i)}setPin(i){this.model.setPin(i)}updatePin(i){this.model.updatePin(i)}setSelectedPinId(i){this.model.setSelectedPin(i)}getToolMode(){return this.mode}getToolType(){return this.type}setToolMode(i){this.mode=i}setToolType(i){this.type=i}getDraggable(){return this.draggable}setDraggable(i){this.draggable=i}setPrimaryColor(i){this.styleAttributes={...this.styleAttributes,primaryColor:i}}setAccentColor(i){this.styleAttributes={...this.styleAttributes,accentColor:i}}getStyleAttributes(){return this.styleAttributes}updateDraggable(i,t,e){if(this.draggable!=null){this.draggable=i}const n=this.model.getPinById(i.id);if(n!=null){this.updatePin({...n,worldPosition:t,partId:e})}}}function w(i,t){const e=Math.max(t.start,Math.min(t.end,i.x));const n=Math.max(t.start,Math.min(t.end,i.y));return r.create(e,n)}function m(i,t){return r.add(r.scale(i,t.width,t.height),a.center(t))}function f(i,t,e,n,o){const s=1/t.height;const l=1/t.width;const h=a.center(t);const d=r.scale(r.subtract(i,h),l,s);if(e){const t=r.scale(r.create(n,o),l,s);const e=h.x>i.x;const a=e?t.x:-3*t.x;const p=h.y>i.y;const c=p?t.y:-3*t.y;const v=r.add(d,r.create(a,c));return w(v,u.create(-.5,.5))}else{return w(d,u.create(-.5,.5))}}function g(i){return window.getComputedStyle(i)}const x=()=>`:host{--viewer-annotations-pin-label-background-color:var(--viewer-annotations-pin-accent-color);--viewer-annotations-pin-label-border-color:var(--viewer-annotations-pin-primary-color);--viewer-annotations-pin-label-focused-border-color:var(--viewer-annotations-pin-primary-color);--viewer-annotations-pin-label-color:var(--white);--viewer-annotations-pin-label-padding-y:0.375em;--viewer-annotations-pin-label-padding-x:0.5em;--viewer-annotations-pin-label-border-width:2px;--viewer-annotations-pin-label-border-style:solid;--viewer-annotations-pin-label-border-radius:0.25em;--viewer-annotations-pin-label-min-width:2rem;--viewer-annotations-pin-label-max-width:25rem;--viewer-annotations-pin-label-max-height:50rem;overflow:hidden;pointer-events:none}:host([mode='']) .pin-label{color:var(--viewer-annotations-pin-label-color);background:var(--viewer-annotations-pin-label-background-color)}.pin-label-text{font-family:Arial, Helvetica, sans-serif;font-size:0.875rem;line-height:1rem;word-break:break-word;white-space:pre-wrap}.pin-label-input-wrapper{display:flex;position:absolute;pointer-events:auto;box-sizing:border-box;min-width:var(--viewer-annotations-pin-label-min-width);max-width:var(--viewer-annotations-pin-label-max-width);max-height:var(--viewer-annotations-pin-label-max-height);background:var(--viewer-annotations-pin-label-background-color);border-width:var(--viewer-annotations-pin-label-border-width);border-style:var(--viewer-annotations-pin-label-border-style);border-color:var(--viewer-annotations-pin-label-border-color);border-radius:var(--viewer-annotations-pin-label-border-radius)}.pin-label-input-wrapper.focused{min-width:var(--viewer-annotations-pin-label-max-width);border-color:var(--viewer-annotations-pin-label-focused-border-color)}.pin-input-drag-target{position:absolute;top:0;left:0;width:100%;height:100%;cursor:pointer}.pin-label-input{resize:none;position:relative;outline:none;border:none;word-break:break-word;padding:0 0 0 0;background-color:transparent;margin:var(--viewer-annotations-pin-label-padding-y) var(--viewer-annotations-pin-label-padding-x);width:var(--viewer-annotations-pin-label-min-width);flex-grow:1;overflow:hidden;max-width:calc(var(--viewer-annotations-pin-label-max-width) - calc(2 * var(--viewer-annotations-pin-label-padding-x)))}.pin-label-input.readonly{pointer-events:auto;color:black;cursor:pointer}.pin-label-hidden{position:absolute;visibility:hidden;pointer-events:none;width:auto;height:auto;box-sizing:border-box;border-width:var(--viewer-annotations-pin-label-border-width);border-style:var(--viewer-annotations-pin-label-border-style);border-color:var(--viewer-annotations-pin-label-border-color);margin:var(--viewer-annotations-pin-label-padding-y) 0;padding:0 var(--viewer-annotations-pin-label-padding-x);max-width:calc(var(--viewer-annotations-pin-label-max-width) - calc(2 * var(--viewer-annotations-pin-label-padding-x)))}`;const y=t(class i extends e{constructor(i){super();if(i!==false){this.__registerHost()}this.labelChanged=n(this,"labelChanged");this.labelFocused=n(this,"labelFocused");this.labelBlurred=n(this,"labelBlurred");this.value="";this.focused=false;this.textareaRows=1;this.computeContentSize=()=>{v((()=>{if(this.contentEl!=null){this.contentElBounds=this.contentEl.getBoundingClientRect();const i=g(this.contentEl);this.textareaRows=Math.max(1,Math.ceil((Number.parseFloat(i.getPropertyValue("height"))-Number.parseFloat(i.getPropertyValue("borderWidth"))*2)/Number.parseFloat(i.getPropertyValue("lineHeight"))))}}))};this.handleInputKeyDown=i=>{i.stopPropagation();if(i.key==="Enter"&&(i.ctrlKey||i.metaKey||i.shiftKey)){this.textareaRows+=1;this.value+="\n"}else if(i.key==="Enter"){i.preventDefault();this.submit()}};this.handlePointerDown=i=>{var t;if(!this.focused){if(this.elementBounds!=null){if(i.buttons!==2){i.preventDefault();i.stopPropagation()}this.relativePointerDownPosition=f(h(i,this.elementBounds),this.elementBounds);this.pinPointerDownPosition=(t=this.pin)===null||t===void 0?void 0:t.label.point;window.addEventListener("pointermove",this.handlePointerMove);window.addEventListener("pointerup",this.handlePointerUp)}}};this.handlePointerMove=i=>{var t;if(this.elementBounds!=null&&this.relativePointerDownPosition&&this.pinPointerDownPosition!=null){i.preventDefault();i.stopPropagation();const e=h(i,this.elementBounds);const n=f(e,this.elementBounds);const o=r.subtract(n,this.relativePointerDownPosition);const s=this.pin!=null?{...this.pin,label:{...this.pin.label,point:r.add(this.pinPointerDownPosition,o)}}:undefined;if(s){(t=this.pinController)===null||t===void 0?void 0:t.updatePin(s);this.computeScreenPosition()}}};this.handlePointerUp=i=>{var t,e;if(((t=this.pinController)===null||t===void 0?void 0:t.getToolMode())==="edit"&&this.relativePointerDownPosition!=null&&this.elementBounds!=null){const t=m(this.relativePointerDownPosition,this.elementBounds);const n=r.distance(t,h(i,this.elementBounds));if(n<=2){this.focused=true;this.labelFocused.emit((e=this.pin)===null||e===void 0?void 0:e.id)}}this.relativePointerDownPosition=undefined;this.pinPointerDownPosition=undefined;window.removeEventListener("pointermove",this.handlePointerMove);window.removeEventListener("pointerup",this.handlePointerUp)};this.handleTextBlur=()=>{this.submit()};this.handleTextInput=i=>{const t=i.target;this.value=t.value}}async setFocus(){var i,t,e;if(typeof((i=this.inputEl)===null||i===void 0?void 0:i.focus)==="function"){this.focused=true;this.labelFocused.emit((t=this.pin)===null||t===void 0?void 0:t.id);(e=this.inputEl)===null||e===void 0?void 0:e.focus()}}async submit(){var i,t;this.focused=false;this.labelBlurred.emit((i=this.pin)===null||i===void 0?void 0:i.id);if(this.pin!=null){(t=this.pinController)===null||t===void 0?void 0:t.updatePin({...this.pin,label:{point:this.pin.label.point,text:this.value}})}}watchFocusChange(){var i,t;this.labelChanged.emit();if(this.focused){(i=this.pinController)===null||i===void 0?void 0:i.setSelectedPinId((t=this.pin)===null||t===void 0?void 0:t.id)}}watchPinChange(){var i,t;this.value=(t=(i=this.pin)===null||i===void 0?void 0:i.label.text)!==null&&t!==void 0?t:"";this.computeScreenPosition()}watchElementBoundsChange(){this.computeScreenPosition()}componentWillLoad(){var i,t;this.value=(t=(i=this.pin)===null||i===void 0?void 0:i.label.text)!==null&&t!==void 0?t:"";this.computeScreenPosition();if(this.pinController==null){this.pinController=new b(new d)}}componentDidLoad(){this.resizeObserver=new ResizeObserver((()=>{this.labelChanged.emit()}));this.contentResizeObserver=new ResizeObserver(this.computeContentSize);if(this.hostEl!=null){this.resizeObserver.observe(this.hostEl)}if(this.contentEl!=null){this.contentResizeObserver.observe(this.contentEl)}}disconnectedCallback(){var i,t;(i=this.resizeObserver)===null||i===void 0?void 0:i.disconnect();(t=this.contentResizeObserver)===null||t===void 0?void 0:t.disconnect()}componentDidRender(){if(this.focused&&this.inputEl!=null){this.setFocus()}}render(){var i,t,e;const{primaryColor:n,accentColor:a}=p(this.pin);return o(s,{key:"2eeca89781ad06fce5403bee5d967496c4886201"},o("div",{key:"9f6ca00bfadf8b6090db219ce05ec2eae28f341f",class:l("pin-label-input-wrapper",{focused:this.focused}),onPointerDown:this.handlePointerDown,style:{top:`${((i=this.computedScreenPosition)===null||i===void 0?void 0:i.y.toString())||0}px`,left:`${((t=this.computedScreenPosition)===null||t===void 0?void 0:t.x.toString())||0}px`,minWidth:this.computeMinWidth(),maxWidth:this.computeMaxWidth(),maxHeight:this.computeMaxHeight(),borderColor:n,background:a}},o("textarea",{key:"faee5e02d2f9bd18dd2e367e4e52b4325ac3c782",id:`pin-label-input-${(e=this.pin)===null||e===void 0?void 0:e.id}`,class:l("pin-label-input","pin-label-text",{["readonly"]:!this.focused}),disabled:!this.focused,ref:i=>this.inputEl=i,value:this.value,rows:this.textareaRows,onKeyDown:this.handleInputKeyDown,onInput:this.handleTextInput,onBlur:this.handleTextBlur}),!this.focused&&o("div",{key:"2851d39b6cf87c64ef585a9f1967c689f01d030e",class:"pin-input-drag-target",onPointerDown:this.handlePointerDown})),o("div",{key:"a7c2e114227e9fe744b0ef4e42c3fd5abd5c626e",ref:i=>this.contentEl=i,class:l("pin-label-text","pin-label-hidden"),style:{maxWidth:this.computeMaxWidth(),maxHeight:this.computeMaxHeight()}},this.hiddenContent()))}hiddenContent(){return this.value.includes("\n")?this.value.split("\n").reduce(((i,t)=>[...i,t,o("br",null)]),[]):[this.value]}computeMinWidth(){if(this.contentElBounds!=null){const i=`${this.contentElBounds.width+8}px`;return`min(${i}, ${this.computeMaxWidth()})`}else{return`var(--viewer-annotations-pin-label-min-width)`}}computeMaxWidth(){const i=`var(--viewer-annotations-pin-label-max-width)`;return`min(${i}, ${this.computeRemainingWidth()})`}computeMaxHeight(){const i=`var(--viewer-annotations-pin-label-max-height)`;return`min(${i}, ${this.computeRemainingHeight()})`}computeRemainingWidth(){var i,t;return`calc(${((i=this.elementBounds)===null||i===void 0?void 0:i.width.toString())||0}px - ${((t=this.computedScreenPosition)===null||t===void 0?void 0:t.x.toString())||0}px)`}computeRemainingHeight(){var i,t;return`calc(${((i=this.elementBounds)===null||i===void 0?void 0:i.height.toString())||0}px - ${((t=this.computedScreenPosition)===null||t===void 0?void 0:t.y.toString())||0}px)`}computeScreenPosition(){this.computedScreenPosition=c(this.pin)&&this.elementBounds!=null&&this.pin.label.point!=null?m(this.pin.label.point,this.elementBounds):undefined}get hostEl(){return this}static get watchers(){return{focused:[{watchFocusChange:0}],pin:[{watchPinChange:0}],elementBounds:[{watchElementBoundsChange:0}]}}static get style(){return x()}},[0,"vertex-viewer-pin-label",{pin:[16],elementBounds:[16],value:[1025],pinController:[1040],focused:[32],computedScreenPosition:[32],textareaRows:[32],contentElBounds:[32],setFocus:[64],submit:[64]},undefined,{focused:[{watchFocusChange:0}],pin:[{watchPinChange:0}],elementBounds:[{watchElementBoundsChange:0}]}]);function C(){if(typeof customElements==="undefined"){return}const t=["vertex-viewer-pin-label"];t.forEach((t=>{switch(t){case"vertex-viewer-pin-label":if(!customElements.get(i(t))){customElements.define(i(t),y)}break}}))}C();export{b as P,y as V,f as a,C as d,m as t};
|
|
5
|
-
//# sourceMappingURL=p-B4sO9HdX.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["PinController","constructor","model","mode","type","styleAttributes","undefined","this","addPin","pin","clearPins","removePin","setPins","pins","setPin","updatePin","setSelectedPinId","pinId","setSelectedPin","getToolMode","getToolType","setToolMode","setToolType","getDraggable","draggable","setDraggable","setPrimaryColor","color","primaryColor","setAccentColor","accentColor","getStyleAttributes","updateDraggable","worldPosition","partId","getPinById","id","constrainRelativePoint","pt","range","constrainedX","Math","max","start","min","end","x","constrainedY","y","Point","create","translatePointToScreen","canvasDimensions","add","scale","width","height","Dimensions","center","translatePointToRelative","includeOffset","xOffset","yOffset","verticalScaleFactor","horizontalScaleFactor","canvasCenterPoint","point","subtract","offset","centerIsToTheRightInXDirection","xOffsetCalculated","centerIsBelowInYDirection","yOffsetCalculated","offsetPoint","Range","getComputedStyle","el","window","viewerPinLabelCss","VertexPinLabel","__stencil_proxyCustomElement","HTMLElement","registerHost","value","focused","textareaRows","computeContentSize","readDOM","contentEl","contentElBounds","getBoundingClientRect","computedStyles","ceil","Number","parseFloat","getPropertyValue","handleInputKeyDown","event","stopPropagation","key","ctrlKey","metaKey","shiftKey","preventDefault","submit","handlePointerDown","elementBounds","buttons","relativePointerDownPosition","getMouseClientPosition","pinPointerDownPosition","_a","label","addEventListener","handlePointerMove","handlePointerUp","relative","relativeDelta","myUpdatedPin","pinController","computeScreenPosition","pointerDownScreen","distanceBetweenStartAndEndPoint","distance","labelFocused","emit","_b","removeEventListener","handleTextBlur","handleTextInput","input","target","setFocus","inputEl","focus","_c","labelBlurred","text","watchFocusChange","labelChanged","watchPinChange","watchElementBoundsChange","componentWillLoad","PinModel","componentDidLoad","resizeObserver","ResizeObserver","contentResizeObserver","hostEl","observe","disconnectedCallback","disconnect","componentDidRender","render","getPinColors","h","Host","class","classNames","onPointerDown","style","top","computedScreenPosition","toString","left","minWidth","computeMinWidth","maxWidth","computeMaxWidth","maxHeight","computeMaxHeight","borderColor","background","disabled","ref","rows","onKeyDown","onInput","onBlur","hiddenContent","includes","split","reduce","res","str","expected","computeRemainingWidth","computeRemainingHeight","isTextPin"],"sources":["src/lib/pins/controller.ts","src/components/viewer-pin-tool/utils.ts","src/components/viewer-pin-label/utils.ts","src/components/viewer-pin-label/viewer-pin-label.css?tag=vertex-viewer-pin-label","src/components/viewer-pin-label/viewer-pin-label.tsx"],"sourcesContent":["import { Point, Vector3 } from '@vertexvis/geometry';\nimport { Color } from '@vertexvis/utils';\n\nimport {\n Pin,\n PinModel,\n PinStyleAttributes,\n ViewerPinToolMode,\n ViewerPinToolType,\n} from './model';\n\nexport interface Draggable {\n id: string;\n lastPoint?: Point.Point;\n}\n\n/**\n * The `PinController` is responsible for adding pin entities to the viewer canvas\n */\nexport class PinController {\n private draggable?: Draggable;\n\n public constructor(\n private model: PinModel,\n private mode: ViewerPinToolMode = 'view',\n private type: ViewerPinToolType = 'pin-icon',\n private styleAttributes: PinStyleAttributes | undefined = undefined,\n ) {}\n\n /**\n * Registers an entity to place on the canvas and places the pin on the associated part.\n *\n * @param pin The pin entity\n * @returns A void promise\n */\n public addPin(pin: Pin): void {\n this.model.addPin(pin);\n }\n\n /**\n * Clears all entities and returns a promise that resolves with an empty list\n * of pin results.\n */\n public clearPins(): void {\n this.model.clearPins();\n }\n\n /**\n * Deregisters an entity and performs a pin if this entity was\n * removed.\n *\n * @param entity The entity to remove.\n * @returns A promise that resolves with the results after removing this\n * entity.\n */\n public removePin(pin: Pin): void {\n this.model.removePin(pin);\n }\n\n /**\n * Registers a set of entities and adds a pin\n *\n * @param entities The pin entities to draw.\n * @returns A promise that resolves with the results after registering these\n * entities.\n */\n public setPins(pins: Set<Pin>): void {\n this.model.setPins(pins);\n }\n\n /**\n * Sets the set of entities to be placed with the model.\n *\n * @param pin A pin to set\n * @returns `true` if the entity has been added.\n */\n public setPin(pin: Pin): void {\n this.model.setPin(pin);\n }\n\n /**\n * Updates an existing pin\n * @param pin A pin to set\n * @returns `true` if the entity has been updated, false otherwise\n */\n public updatePin(pin: Pin): void {\n this.model.updatePin(pin);\n }\n\n /**\n * Tells the controller which pin is selected in the model\n * @param pinId\n */\n public setSelectedPinId(pinId?: string): void {\n this.model.setSelectedPin(pinId);\n }\n\n public getToolMode(): ViewerPinToolMode {\n return this.mode;\n }\n\n public getToolType(): ViewerPinToolType {\n return this.type;\n }\n\n public setToolMode(mode: ViewerPinToolMode): void {\n this.mode = mode;\n }\n\n public setToolType(type: ViewerPinToolType): void {\n this.type = type;\n }\n\n public getDraggable(): Draggable | undefined {\n return this.draggable;\n }\n\n public setDraggable(draggable: Draggable | undefined): void {\n this.draggable = draggable;\n }\n\n public setPrimaryColor(color?: Color.Color | string): void {\n this.styleAttributes = {\n ...this.styleAttributes,\n primaryColor: color,\n };\n }\n\n public setAccentColor(color?: Color.Color | string): void {\n this.styleAttributes = {\n ...this.styleAttributes,\n accentColor: color,\n };\n }\n\n public getStyleAttributes(): PinStyleAttributes | undefined {\n return this.styleAttributes;\n }\n\n public updateDraggable(\n draggable: Draggable,\n worldPosition: Vector3.Vector3,\n partId?: string,\n ): void {\n if (this.draggable != null) {\n this.draggable = draggable;\n }\n const pin = this.model.getPinById(draggable.id);\n if (pin != null) {\n this.updatePin({\n ...pin,\n worldPosition,\n partId,\n });\n }\n }\n}\n","import { Dimensions, Point } from '@vertexvis/geometry';\nimport { Range } from '@vertexvis/utils';\n\nexport function constrainRelativePoint(\n pt: Point.Point,\n range: Range.Range,\n): Point.Point {\n const constrainedX = Math.max(range.start, Math.min(range.end, pt.x));\n const constrainedY = Math.max(range.start, Math.min(range.end, pt.y));\n\n return Point.create(constrainedX, constrainedY);\n}\n\n/**\n * Translates a point in relative units to a point in screen units.\n */\nexport function translatePointToScreen(\n pt: Point.Point,\n canvasDimensions: Dimensions.Dimensions,\n): Point.Point {\n return Point.add(\n Point.scale(pt, canvasDimensions.width, canvasDimensions.height),\n Dimensions.center(canvasDimensions),\n );\n}\n\n/**\n * Translates a point in screen units to a point in relative units.\n */\nexport function translatePointToRelative(\n pt: Point.Point,\n canvasDimensions: Dimensions.Dimensions,\n includeOffset?: boolean,\n xOffset?: number,\n yOffset?: number,\n): Point.Point {\n const verticalScaleFactor = 1 / canvasDimensions.height;\n const horizontalScaleFactor = 1 / canvasDimensions.width;\n const canvasCenterPoint = Dimensions.center(canvasDimensions);\n\n const point = Point.scale(\n Point.subtract(pt, canvasCenterPoint),\n horizontalScaleFactor,\n verticalScaleFactor,\n );\n\n if (includeOffset) {\n const offset = Point.scale(\n Point.create(xOffset, yOffset),\n horizontalScaleFactor,\n verticalScaleFactor,\n );\n\n // We want to place the label towards the center of the screen.\n // The given point corresponds to the upper left corner of the label, so increase the offset\n // when placing it to the left or above to ensure that part of the label line is visible\n const centerIsToTheRightInXDirection = canvasCenterPoint.x > pt.x;\n const xOffsetCalculated = centerIsToTheRightInXDirection\n ? offset.x\n : -3 * offset.x;\n\n const centerIsBelowInYDirection = canvasCenterPoint.y > pt.y;\n const yOffsetCalculated = centerIsBelowInYDirection\n ? offset.y\n : -3 * offset.y;\n\n const offsetPoint = Point.add(\n point,\n Point.create(xOffsetCalculated, yOffsetCalculated),\n );\n\n return constrainRelativePoint(offsetPoint, Range.create(-0.5, 0.5));\n } else {\n return constrainRelativePoint(point, Range.create(-0.5, 0.5));\n }\n}\n","export function getComputedStyle(el: HTMLElement): CSSStyleDeclaration {\n return window.getComputedStyle(el);\n}\n",":host {\n /**\n * @prop --viewer-annotations-pin-label-background-color: A CSS color that\n * specifies the color of the label background\n */\n --viewer-annotations-pin-label-background-color: var(--viewer-annotations-pin-accent-color);\n\n /**\n * @prop --viewer-annotations-pin-label-border-color: A CSS color that\n * specifies the color of the label's border\n */\n --viewer-annotations-pin-label-border-color: var(--viewer-annotations-pin-primary-color);\n\n /**\n * @prop --viewer-annotations-pin-label-focused-border-color: A CSS color that\n * specifies the color of the label's border when focused. \n */\n --viewer-annotations-pin-label-focused-border-color: var(--viewer-annotations-pin-primary-color);\n\n /**\n * @prop --viewer-annotations-pin-label-color: A CSS color that\n * specifies the color of the label \n */\n --viewer-annotations-pin-label-color: var(--white);\n\n /**\n * @prop --viewer-annotations-pin-label-padding-y: A var that\n * specifies the vertical padding of the label\n */\n --viewer-annotations-pin-label-padding-y: 0.375em;\n\n /**\n * @prop --viewer-annotations-pin-label-padding-x: A var that\n * specifies the horizontal padding of the label\n */\n --viewer-annotations-pin-label-padding-x: 0.5em;\n\n /**\n * @prop --viewer-annotations-pin-label-border-width: A CSS length that\n * specifies the width of the border on this label. Defaults to `2px`.\n */\n --viewer-annotations-pin-label-border-width: 2px;\n\n /**\n * @prop --viewer-annotations-pin-label-border-style: A CSS variable that\n * specifies the style of border on this label. Defaults to `solid`.\n */\n --viewer-annotations-pin-label-border-style: solid;\n\n /**\n * @prop --viewer-annotations-pin-label-border-radius: A var that\n * specifies the border radius of the label\n */\n --viewer-annotations-pin-label-border-radius: 0.25em;\n\n /**\n * @prop --viewer-annotations-pin-label-min-width: A CSS length that\n * specifies the minimum width of the label. Defaults to `2rem`.\n */\n --viewer-annotations-pin-label-min-width: 2rem;\n\n /**\n * @prop --viewer-annotations-pin-label-max-width: A CSS length that\n * specifies the maximum width of the label. Defaults to `25rem`.\n */\n --viewer-annotations-pin-label-max-width: 25rem;\n\n /**\n * @prop --viewer-annotations-pin-label-max-height: A CSS length that\n * specifies the maximum height of the label. Defaults to `50rem`.\n */\n --viewer-annotations-pin-label-max-height: 50rem;\n\n overflow: hidden;\n pointer-events: none;\n}\n\n:host([mode='']) .pin-label {\n color: var(--viewer-annotations-pin-label-color);\n background: var(--viewer-annotations-pin-label-background-color);\n}\n\n.pin-label-text {\n font-family: Arial, Helvetica, sans-serif;\n font-size: 0.875rem;\n line-height: 1rem;\n word-break: break-word;\n white-space: pre-wrap;\n}\n\n.pin-label-input-wrapper {\n display: flex;\n position: absolute;\n pointer-events: auto;\n box-sizing: border-box;\n min-width: var(--viewer-annotations-pin-label-min-width);\n max-width: var(--viewer-annotations-pin-label-max-width);\n max-height: var(--viewer-annotations-pin-label-max-height);\n background: var(--viewer-annotations-pin-label-background-color);\n border-width: var(--viewer-annotations-pin-label-border-width);\n border-style: var(--viewer-annotations-pin-label-border-style);\n border-color: var(--viewer-annotations-pin-label-border-color);\n border-radius: var(--viewer-annotations-pin-label-border-radius);\n}\n\n.pin-label-input-wrapper.focused {\n min-width: var(--viewer-annotations-pin-label-max-width);\n border-color: var(--viewer-annotations-pin-label-focused-border-color);\n}\n\n.pin-input-drag-target {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n\n.pin-label-input {\n resize: none;\n position: relative;\n outline: none;\n border: none;\n word-break: break-word;\n padding: 0 0 0 0;\n background-color: transparent;\n margin: var(--viewer-annotations-pin-label-padding-y) var(--viewer-annotations-pin-label-padding-x);\n width: var(--viewer-annotations-pin-label-min-width);\n flex-grow: 1;\n overflow: hidden;\n max-width: calc(var(--viewer-annotations-pin-label-max-width) - calc(2 * var(--viewer-annotations-pin-label-padding-x)));\n}\n\n.pin-label-input.readonly {\n pointer-events: auto;\n color: black;\n cursor: pointer;\n}\n\n.pin-label-hidden {\n position: absolute;\n visibility: hidden;\n pointer-events: none;\n width: auto;\n height: auto;\n box-sizing: border-box;\n border-width: var(--viewer-annotations-pin-label-border-width);\n border-style: var(--viewer-annotations-pin-label-border-style);\n border-color: var(--viewer-annotations-pin-label-border-color);\n margin: var(--viewer-annotations-pin-label-padding-y) 0;\n padding: 0 var(--viewer-annotations-pin-label-padding-x);\n max-width: calc(var(--viewer-annotations-pin-label-max-width) - calc(2 * var(--viewer-annotations-pin-label-padding-x)));\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n h,\n Host,\n JSX,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { Point } from '@vertexvis/geometry';\nimport classNames from 'classnames';\n\nimport { getMouseClientPosition } from '../../lib/dom';\nimport { PinController } from '../../lib/pins/controller';\nimport {\n getPinColors,\n isTextPin,\n PinModel,\n TextPin,\n} from '../../lib/pins/model';\nimport { readDOM } from '../../lib/stencil';\nimport {\n translatePointToRelative,\n translatePointToScreen,\n} from '../viewer-pin-tool/utils';\nimport { getComputedStyle } from './utils';\n\n@Component({\n tag: 'vertex-viewer-pin-label',\n styleUrl: 'viewer-pin-label.css',\n shadow: false,\n})\nexport class VertexPinLabel {\n /**\n * The pin to draw for the group\n */\n @Prop()\n public pin?: TextPin;\n\n /**\n * The dimensions of the canvas for the pins\n */\n @Prop()\n public elementBounds?: DOMRect;\n\n /**\n * The current text value of the component. Value is updated on user\n * interaction.\n */\n @Prop({ mutable: true })\n public value = '';\n\n /**\n * The controller that drives behavior for pin operations\n */\n @Prop({ mutable: true })\n public pinController?: PinController;\n\n /**\n * @internal\n */\n @Event({ bubbles: true })\n public labelChanged!: EventEmitter<void>;\n\n /**\n * Emitted whenever the label is focused, with the ID of the\n * associated pin (or undefined if no pin is provided).\n */\n @Event({ bubbles: true })\n public labelFocused!: EventEmitter<string | undefined>;\n\n /**\n * Emitted whenever the label is blurred, with the ID of the\n * associated pin (or undefined if no pin is provided).\n */\n @Event({ bubbles: true })\n public labelBlurred!: EventEmitter<string | undefined>;\n\n @Element()\n private hostEl!: HTMLElement;\n\n @State()\n private focused = false;\n\n @State()\n private computedScreenPosition?: Point.Point;\n\n @State()\n private textareaRows = 1;\n\n @State()\n private contentElBounds?: DOMRect;\n\n private relativePointerDownPosition?: Point.Point;\n private pinPointerDownPosition?: Point.Point;\n\n private inputEl?: HTMLTextAreaElement;\n private contentEl?: HTMLDivElement;\n\n private resizeObserver?: ResizeObserver;\n private contentResizeObserver?: ResizeObserver;\n\n /**\n * Gives focus to the component's internal text input.\n */\n @Method()\n public async setFocus(): Promise<void> {\n // HTMLInputElement.focus() doesn't exist in tests.\n if (typeof this.inputEl?.focus === 'function') {\n this.focused = true;\n this.labelFocused.emit(this.pin?.id);\n this.inputEl?.focus();\n }\n }\n\n /**\n * @internal\n * submits the current text, unfocuses the input and emits the blur event to consumers\n */\n @Method()\n public async submit(): Promise<void> {\n this.focused = false;\n this.labelBlurred.emit(this.pin?.id);\n if (this.pin != null) {\n this.pinController?.updatePin({\n ...this.pin,\n label: {\n point: this.pin.label.point,\n text: this.value,\n },\n });\n }\n }\n\n @Watch('focused')\n protected watchFocusChange(): void {\n this.labelChanged.emit();\n\n if (this.focused) {\n this.pinController?.setSelectedPinId(this.pin?.id);\n }\n }\n\n @Watch('pin')\n protected watchPinChange(): void {\n this.value = this.pin?.label.text ?? '';\n this.computeScreenPosition();\n }\n\n @Watch('elementBounds')\n protected watchElementBoundsChange(): void {\n this.computeScreenPosition();\n }\n\n protected componentWillLoad(): void {\n this.value = this.pin?.label.text ?? '';\n this.computeScreenPosition();\n\n if (this.pinController == null) {\n this.pinController = new PinController(new PinModel());\n }\n }\n\n protected componentDidLoad(): void {\n this.resizeObserver = new ResizeObserver(() => {\n this.labelChanged.emit();\n });\n\n this.contentResizeObserver = new ResizeObserver(this.computeContentSize);\n\n if (this.hostEl != null) {\n this.resizeObserver.observe(this.hostEl);\n }\n\n if (this.contentEl != null) {\n this.contentResizeObserver.observe(this.contentEl);\n }\n }\n\n protected disconnectedCallback(): void {\n this.resizeObserver?.disconnect();\n this.contentResizeObserver?.disconnect();\n }\n\n protected componentDidRender(): void {\n if (this.focused && this.inputEl != null) {\n this.setFocus();\n }\n }\n\n protected render(): JSX.Element {\n const { primaryColor, accentColor } = getPinColors(this.pin);\n return (\n <Host>\n <div\n class={classNames('pin-label-input-wrapper', {\n focused: this.focused,\n })}\n onPointerDown={this.handlePointerDown}\n style={{\n top: `${this.computedScreenPosition?.y.toString() || 0}px`,\n left: `${this.computedScreenPosition?.x.toString() || 0}px`,\n minWidth: this.computeMinWidth(),\n maxWidth: this.computeMaxWidth(),\n maxHeight: this.computeMaxHeight(),\n borderColor: primaryColor,\n background: accentColor,\n }}\n >\n <textarea\n id={`pin-label-input-${this.pin?.id}`}\n class={classNames('pin-label-input', 'pin-label-text', {\n ['readonly']: !this.focused,\n })}\n disabled={!this.focused}\n ref={(ref) => (this.inputEl = ref)}\n value={this.value}\n rows={this.textareaRows}\n onKeyDown={this.handleInputKeyDown}\n onInput={this.handleTextInput}\n onBlur={this.handleTextBlur}\n />\n {/* This corrects for a behavior in Firefox where setting the `disabled` attribute to true */}\n {/* prevents any events from propagating. */}\n {!this.focused && (\n <div\n class=\"pin-input-drag-target\"\n onPointerDown={this.handlePointerDown}\n />\n )}\n </div>\n <div\n ref={(el) => (this.contentEl = el)}\n class={classNames('pin-label-text', 'pin-label-hidden')}\n style={{\n maxWidth: this.computeMaxWidth(),\n maxHeight: this.computeMaxHeight(),\n }}\n >\n {this.hiddenContent()}\n </div>\n </Host>\n );\n }\n\n private hiddenContent(): Array<string | HTMLBRElement> {\n // This corrects some inconsistencies in how a newline character\n // is represented in a div. Leveraging `<br>`s results in a more\n // consistent representation of the newlines in a textarea.\n return this.value.includes('\\n')\n ? this.value\n .split('\\n')\n .reduce(\n (res, str) => [...res, str, <br />],\n [] as Array<string | HTMLBRElement>,\n )\n : [this.value];\n }\n\n private computeMinWidth(): string {\n if (this.contentElBounds != null) {\n const expected = `${this.contentElBounds.width + 8}px`;\n\n return `min(${expected}, ${this.computeMaxWidth()})`;\n } else {\n return `var(--viewer-annotations-pin-label-min-width)`;\n }\n }\n\n private computeMaxWidth(): string {\n const expected = `var(--viewer-annotations-pin-label-max-width)`;\n\n return `min(${expected}, ${this.computeRemainingWidth()})`;\n }\n\n private computeMaxHeight(): string {\n const expected = `var(--viewer-annotations-pin-label-max-height)`;\n\n return `min(${expected}, ${this.computeRemainingHeight()})`;\n }\n\n private computeRemainingWidth(): string {\n return `calc(${this.elementBounds?.width.toString() || 0}px - ${\n this.computedScreenPosition?.x.toString() || 0\n }px)`;\n }\n\n private computeRemainingHeight(): string {\n return `calc(${this.elementBounds?.height.toString() || 0}px - ${\n this.computedScreenPosition?.y.toString() || 0\n }px)`;\n }\n\n private computeScreenPosition(): void {\n this.computedScreenPosition =\n isTextPin(this.pin) &&\n this.elementBounds != null &&\n this.pin.label.point != null\n ? translatePointToScreen(this.pin.label.point, this.elementBounds)\n : undefined;\n }\n\n private computeContentSize = (): void => {\n readDOM(() => {\n if (this.contentEl != null) {\n this.contentElBounds = this.contentEl.getBoundingClientRect();\n const computedStyles = getComputedStyle(this.contentEl);\n this.textareaRows = Math.max(\n 1,\n Math.ceil(\n (Number.parseFloat(computedStyles.getPropertyValue('height')) -\n Number.parseFloat(computedStyles.getPropertyValue('borderWidth')) * 2) /\n Number.parseFloat(computedStyles.getPropertyValue('lineHeight')),\n ),\n );\n }\n });\n };\n\n private handleInputKeyDown = (event: KeyboardEvent): void => {\n event.stopPropagation();\n if (\n event.key === 'Enter' &&\n (event.ctrlKey || event.metaKey || event.shiftKey)\n ) {\n this.textareaRows += 1;\n this.value += '\\n';\n } else if (event.key === 'Enter') {\n event.preventDefault();\n this.submit();\n }\n };\n\n private handlePointerDown = (event: PointerEvent): void => {\n if (!this.focused) {\n if (this.elementBounds != null) {\n if (event.buttons !== 2) {\n event.preventDefault();\n event.stopPropagation();\n }\n this.relativePointerDownPosition = translatePointToRelative(\n getMouseClientPosition(event, this.elementBounds),\n this.elementBounds,\n );\n this.pinPointerDownPosition = this.pin?.label.point;\n\n window.addEventListener('pointermove', this.handlePointerMove);\n window.addEventListener('pointerup', this.handlePointerUp);\n }\n }\n };\n\n private handlePointerMove = (event: PointerEvent): void => {\n if (\n this.elementBounds != null &&\n this.relativePointerDownPosition &&\n this.pinPointerDownPosition != null\n ) {\n // Prevent selection of any text while interacting with the label\n event.preventDefault();\n event.stopPropagation();\n\n const point = getMouseClientPosition(event, this.elementBounds);\n const relative = translatePointToRelative(point, this.elementBounds);\n\n const relativeDelta = Point.subtract(\n relative,\n this.relativePointerDownPosition,\n );\n\n const myUpdatedPin =\n this.pin != null\n ? {\n ...this.pin,\n label: {\n ...this.pin.label,\n point: Point.add(this.pinPointerDownPosition, relativeDelta),\n },\n }\n : undefined;\n\n if (myUpdatedPin) {\n this.pinController?.updatePin(myUpdatedPin);\n this.computeScreenPosition();\n }\n }\n };\n\n private handlePointerUp = (event: PointerEvent): void => {\n if (\n this.pinController?.getToolMode() === 'edit' &&\n this.relativePointerDownPosition != null &&\n this.elementBounds != null\n ) {\n const pointerDownScreen = translatePointToScreen(\n this.relativePointerDownPosition,\n this.elementBounds,\n );\n const distanceBetweenStartAndEndPoint = Point.distance(\n pointerDownScreen,\n getMouseClientPosition(event, this.elementBounds),\n );\n\n if (distanceBetweenStartAndEndPoint <= 2) {\n this.focused = true;\n this.labelFocused.emit(this.pin?.id);\n }\n }\n\n this.relativePointerDownPosition = undefined;\n this.pinPointerDownPosition = undefined;\n\n window.removeEventListener('pointermove', this.handlePointerMove);\n window.removeEventListener('pointerup', this.handlePointerUp);\n };\n\n private handleTextBlur = (): void => {\n this.submit();\n };\n\n private handleTextInput = (event: Event): void => {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n };\n}\n"],"mappings":";;;0TAmBaA,EAGX,WAAAC,CACUC,EACAC,EAA0B,OAC1BC,EAA0B,WAC1BC,EAAkDC,WAHlDC,KAAAL,QACAK,KAAAJ,OACAI,KAAAH,OACAG,KAAAF,iB,CASH,MAAAG,CAAOC,GACZF,KAAKL,MAAMM,OAAOC,E,CAOb,SAAAC,GACLH,KAAKL,MAAMQ,W,CAWN,SAAAC,CAAUF,GACfF,KAAKL,MAAMS,UAAUF,E,CAUhB,OAAAG,CAAQC,GACbN,KAAKL,MAAMU,QAAQC,E,CASd,MAAAC,CAAOL,GACZF,KAAKL,MAAMY,OAAOL,E,CAQb,SAAAM,CAAUN,GACfF,KAAK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C,EAAK7B,EAAA,aAC5B,IAEJ,CAACpJ,KAAK4E,M,CAGJ,eAAAmF,GACN,GAAI/J,KAAKkF,iBAAmB,KAAM,CAChC,MAAMgG,EAAW,GAAGlL,KAAKkF,gBAAgBlC,MAAQ,MAEjD,MAAO,OAAOkI,MAAalL,KAAKiK,oB,KAC3B,CACL,MAAO,+C,EAIH,eAAAA,GACN,MAAMiB,EAAW,gDAEjB,MAAO,OAAOA,MAAalL,KAAKmL,0B,CAG1B,gBAAAhB,GACN,MAAMe,EAAW,iDAEjB,MAAO,OAAOA,MAAalL,KAAKoL,2B,CAG1B,qBAAAD,G,QACN,MAAO,UAAQ3E,EAAAxG,KAAKmG,iBAAa,MAAAK,SAAA,SAAAA,EAAExD,MAAM4G,aAAc,WACrDrC,EAAAvH,KAAK2J,0BAAsB,MAAApC,SAAA,SAAAA,EAAEhF,EAAEqH,aAAc,M,CAIzC,sBAAAwB,G,QACN,MAAO,UAAQ5E,EAAAxG,KAAKmG,iBAAa,MAAAK,SAAA,SAAAA,EAAEvD,OAAO2G,aAAc,WACtDrC,EAAAvH,KAAK2J,0BAAsB,MAAApC,SAAA,SAAAA,EAAE9E,EAAEmH,aAAc,M,CAIzC,qBAAA3C,GACNjH,KAAK2J,uBACH0B,EAAUrL,KAAKE,MACfF,KAAKmG,eAAiB,MACtBnG,KAAKE,IAAIuG,MAAM9C,OAAS,KACpBf,EAAuB5C,KAAKE,IAAIuG,MAAM9C,MAAO3D,KAAKmG,eAClDpG,S","ignoreList":[]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import{t as e,p as t,H as r,h as s,e as n}from"./p-Bb32XUUS.js";const o=()=>`:host{cursor:pointer}.viewer-button{align-items:center;background:none;border:none;color:inherit;cursor:inherit;display:flex;padding:0}`;const c=t(class e extends r{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow()}render(){return s(n,{key:"ad089fc6e38b51cc0bd267c21f034f5cf92787f4"},s("button",{key:"6c4c11f6ee44645ba5b8e8246dda2a2f7f7ca472",class:"viewer-button"},s("slot",{key:"17fae4ab960240b4bb6e3fb41bfafec60e3db3f8"})))}static get style(){return o()}},[257,"vertex-viewer-button"]);function i(){if(typeof customElements==="undefined"){return}const t=["vertex-viewer-button"];t.forEach((t=>{switch(t){case"vertex-viewer-button":if(!customElements.get(e(t))){customElements.define(e(t),c)}break}}))}i();export{c as V,i as d};
|
|
5
|
-
//# sourceMappingURL=p-C--Voxln.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["viewerButtonCss","ViewerButton","__stencil_proxyCustomElement","HTMLElement","render","h","Host","key","class"],"sources":["src/components/viewer-button/viewer-button.css?tag=vertex-viewer-button&encapsulation=shadow","src/components/viewer-button/viewer-button.tsx"],"sourcesContent":[":host {\n cursor: pointer;\n}\n\n.viewer-button {\n align-items: center;\n background: none;\n border: none;\n color: inherit;\n cursor: inherit;\n display: flex;\n padding: 0;\n}\n","import { Component, h, Host } from '@stencil/core';\n\n@Component({\n tag: 'vertex-viewer-button',\n styleUrl: 'viewer-button.css',\n shadow: true,\n})\nexport class ViewerButton {\n public render(): h.JSX.IntrinsicElements {\n return (\n <Host>\n <button class=\"viewer-button\">\n <slot></slot>\n </button>\n </Host>\n );\n }\n}\n"],"mappings":";;;gEAAA,MAAMA,EAAkB,IAAM,0I,MCOjBC,EAAYC,EAAA,MAAAD,UAAAE,E,iFAChB,MAAAC,GACL,OACEC,EAACC,EAAI,CAAAC,IAAA,4CACHF,EAAA,UAAAE,IAAA,2CAAQC,MAAM,iBACZH,EAAA,QAAAE,IAAA,8C","ignoreList":[]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
function t(t,n,r){return Math.max(n,Math.min(r,t))}function n(n,r,o){o=t(o,0,1);return o*(r-n)+n}function r(t=0,n=0){return{x:t,y:n}}function o(t,n){const o=Math.cos(n)*t;const e=Math.sin(n)*t;return r(o,e)}function e(t,n){const r=c(t,n);return Math.sqrt(r.x*r.x+r.y*r.y)}function c(t,n){return{x:t.x-n.x,y:t.y-n.y}}function u(t,n){return{x:t.x+n.x,y:t.y+n.y}}function i(t,n){return t.x===n.x&&t.y===n.y}function s(t,r,o){return{x:n(t.x,r.x,o),y:n(t.y,r.y,o)}}function a(t){return r(-t.x,-t.y)}function f(t,n,r){return{x:t.x*n,y:t.y*r}}function l(t,n){return{x:t.x*n,y:t.y*n}}function h(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function M(t){const n=h(t);if(n===0){return r(0,0)}else{return l(t,1/n)}}function m(t,n){return M(c(n,t))}function y(t,n){const o=m(t,n);if(o.x===0||o.y===0){return r(-1*o.y,o.x)}if(Math.abs(o.x)>Math.abs(o.y)){const t=1-Math.pow(o.x,2);const n=-1*o.x*o.y;return M(r(t,n))}else{const t=-1*o.x*o.y;const n=1-Math.pow(o.y,2);return M(r(t,n))}}function x(t){const n=JSON.parse(t);if(Array.isArray(n)){const[t,o]=n;return r(t,o)}else{const{x:t,y:o}=n;return r(t,o)}}var d=Object.freeze({__proto__:null,add:u,create:r,distance:e,fromJson:x,isEqual:i,lerp:s,magnitude:h,negate:a,normalDirectionVector:m,normalizeVector:M,orthogonalVector:y,polar:o,scale:f,scaleProportional:l,subtract:c});function z(t,n){const r=c(n,t);const o=Math.atan2(r.y,r.x);return o}function _(t,n){const r=c(n,t);const o=Math.atan2(r.y,r.x);return p(w(o)-270)}function p(t){return(t+3600)%360}function g(t){return b(p(w(t)))}function w(t){return t*(180/Math.PI)}function b(t){return t*(Math.PI/180)}var v=Object.freeze({__proto__:null,fromPoints:z,fromPointsInDegrees:_,normalize:p,normalizeRadians:g,toDegrees:w,toRadians:b});function j(t,n,r,o,e,c,u,i,s,a,f,l,h,M,m,y){return[t,n,r,o,e,c,u,i,s,a,f,l,h,M,m,y]}function O(t){return j(t.m11,t.m12,t.m13,t.m14,t.m21,t.m22,t.m23,t.m24,t.m31,t.m32,t.m33,t.m34,t.m41,t.m42,t.m43,t.m44)}function k(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function A(){return[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}function S(t){const{x:n,y:r,z:o}=t;return[1,0,0,0,0,1,0,0,0,0,1,0,n,r,o,1]}function P(t){const{x:n,y:r,z:o,w:e}=t;const c=n+n,u=r+r,i=o+o;const s=n*c,a=n*u,f=n*i;const l=r*u,h=r*i,M=o*i;const m=e*c,y=e*u,x=e*i;return[1-(l+M),a-x,f+y,0,a+x,1-(s+M),h-m,0,f-y,h+m,1-(s+l),0,0,0,0,1]}function T(t){const{x:n,y:r,z:o}=t;return[n,0,0,0,0,r,0,0,0,0,o,0,0,0,0,1]}function J(t,n,r){const o=S(t);const e=C(P(n));const c=T(r);return B(c,B(e,o))}function R(t,n,r){return[t.x,t.y,t.z,0,n.x,n.y,n.z,0,r.x,r.y,r.z,0,0,0,0,1]}function q(t,n,r,o,e,c){const u=2*e/(n-t);const i=2*e/(r-o);const s=(n+t)/(n-t);const a=(r+o)/(r-o);const f=-(c+e)/(c-e);const l=-2*c*e/(c-e);return[u,0,0,0,0,i,0,0,s,a,f,-1,0,0,l,0]}function N(t,n,r,o){const e=t*Math.tan(b(r/2));const c=e*o;const u=-c;const i=c;const s=e;const a=-e;return q(u,i,s,a,t,n)}function V(t,n,r,o,e,c){const u=1/(n-t);const i=1/(o-r);const s=1/(c-e);const a=(n+t)*u;const f=(o+r)*i;const l=(c+e)*s;return[2*u,0,0,-a,0,2*i,0,-f,0,0,-2*s,-l,0,0,0,1]}function F(t,n,r){const o=St(qt(t,n));const e=St(Jt(r,o));const c=Jt(o,e);const u=-Ft(e,t);const i=-Ft(c,t);const s=-Ft(o,t);return[e.x,c.x,o.x,0,e.y,c.y,o.y,0,e.z,c.z,o.z,0,u,i,s,1]}function D(t,n,r){const o=St(qt(t,n));const e=St(Jt(r,o));const c=Jt(o,e);return[e.x,e.y,e.z,0,c.x,c.y,c.z,0,o.x,o.y,o.z,0,t.x,t.y,t.z,1]}function E(t){const n=t[0],r=t[1],o=t[2],e=t[3];const c=t[4],u=t[5],i=t[6],s=t[7];const a=t[8],f=t[9],l=t[10],h=t[11];const M=t[12],m=t[13],y=t[14],x=t[15];const d=n*u-r*c;const z=n*i-o*c;const _=n*s-e*c;const p=r*i-o*u;const g=r*s-e*u;const w=o*s-e*i;const b=a*m-f*M;const v=a*y-l*M;const j=a*x-h*M;const O=f*y-l*m;const k=f*x-h*m;const S=l*x-h*y;const P=d*S-z*k+_*O+p*j-g*v+w*b;if(!P){return A()}const T=1/P;return[(u*S-i*k+s*O)*T,(o*k-r*S-e*O)*T,(m*w-y*g+x*p)*T,(l*g-f*w-h*p)*T,(i*j-c*S-s*v)*T,(n*S-o*j+e*v)*T,(y*_-M*w-x*z)*T,(a*w-l*_+h*z)*T,(c*k-u*j+s*b)*T,(r*j-n*k-e*b)*T,(M*g-m*_+x*d)*T,(f*_-a*g-h*d)*T,(u*v-c*O-i*b)*T,(n*O-r*v+o*b)*T,(m*z-M*p-y*d)*T,(a*p-f*z+l*d)*T]}function L(t,n,r,o){let e=qt(n,r);if(Tt(e)===0){e={...e,z:1}}e=St(e);let c=Jt(o,e);if(Tt(c)===0){if(Math.abs(o.z)===1){e={...e,x:e.x+1e-4}}else{e={...e,z:e.z+1e-4}}e=St(e);c=Jt(o,e)}c=St(c);const u=Jt(e,c);const i=[...t];i[0]=c.x;i[1]=c.y;i[2]=c.z;i[4]=u.x;i[5]=u.y;i[6]=u.z;i[8]=e.x;i[9]=e.y;i[10]=e.z;return i}function B(t,n){const r=k();for(let o=0;o<4;o++){for(let e=0;e<4;e++){let c=0;for(let r=0;r<4;r++){c+=t[o*4+r]*n[r*4+e]}const u=4*o+e;r[u]=c}}return r}function C(t){return[t[0],t[4],t[8],t[12],t[1],t[5],t[9],t[13],t[2],t[6],t[10],t[14],t[3],t[7],t[11],t[15]]}function I(t,n){const{x:r,y:o,z:e}=n;const c=[...t];c[0]*=r;c[1]*=r;c[2]*=r;c[3]*=r;c[4]*=o;c[5]*=o;c[6]*=o;c[7]*=o;c[8]*=e;c[9]*=e;c[10]*=e;c[11]*=e;return c}function Z(t,n){const r=[...t];r[12]=n[12];r[13]=n[13];r[14]=n[14];return r}function W(t){const n=k();return t.every(((t,r)=>t===n[r]))}function G(t){return H(t)}function H(t){return{m11:t[0],m12:t[4],m13:t[8],m14:t[12],m21:t[1],m22:t[5],m23:t[9],m24:t[13],m31:t[2],m32:t[6],m33:t[10],m34:t[14],m41:t[3],m42:t[7],m43:t[11],m44:t[15]}}function K(t){return{m11:t[0],m12:t[1],m13:t[2],m14:t[3],m21:t[4],m22:t[5],m23:t[6],m24:t[7],m31:t[8],m32:t[9],m33:t[10],m34:t[11],m41:t[12],m42:t[13],m43:t[14],m44:t[15]}}function Q(t){return Array.isArray(t)&&t.length===16}var U=Object.freeze({__proto__:null,fromObject:O,fromValues:j,invert:E,isIdentity:W,isType:Q,lookAt:L,makeBasis:R,makeFrustum:q,makeIdentity:k,makeLookAt:D,makeLookAtView:F,makeOrthographic:V,makePerspective:N,makeRotation:P,makeScale:T,makeTRS:J,makeTranslation:S,makeZero:A,multiply:B,position:Z,scale:I,toObject:G,toObjectColumnMajor:H,toObjectRowMajor:K,transpose:C});function X(t={}){var n,r,o,e;return{x:(n=t.x)!==null&&n!==void 0?n:0,y:(r=t.y)!==null&&r!==void 0?r:0,z:(o=t.z)!==null&&o!==void 0?o:0,order:(e=t.order)!==null&&e!==void 0?e:"xyz"}}function Y(t={}){const{x:n=0,y:r=0,z:o=0,order:e}=t;return X({x:b(n),y:b(r),z:b(o),order:e})}function $(n,r="xyz",o=true){const e=o?H(n):K(n);let c=0,u=0,i=0;if(r==="xyz"){u=Math.asin(t(e.m13,-1,1));if(Math.abs(e.m13)<.9999999){c=Math.atan2(-e.m23,e.m33);i=Math.atan2(-e.m12,e.m11)}else{c=Math.atan2(e.m32,e.m22);i=0}}else if(r==="yxz"){c=Math.asin(-t(e.m23,-1,1));if(Math.abs(e.m23)<.9999999){u=Math.atan2(e.m13,e.m33);i=Math.atan2(e.m21,e.m22)}else{u=Math.atan2(-e.m31,e.m11);i=0}}else if(r==="zxy"){c=Math.asin(t(e.m32,-1,1));if(Math.abs(e.m32)<.9999999){u=Math.atan2(-e.m31,e.m33);i=Math.atan2(-e.m12,e.m22)}else{u=0;i=Math.atan2(e.m21,e.m11)}}else if(r==="zyx"){u=Math.asin(-t(e.m31,-1,1));if(Math.abs(e.m31)<.9999999){c=Math.atan2(e.m32,e.m33);i=Math.atan2(e.m21,e.m11)}else{c=0;i=Math.atan2(-e.m12,e.m22)}}else if(r==="yzx"){i=Math.asin(t(e.m21,-1,1));if(Math.abs(e.m21)<.9999999){c=Math.atan2(-e.m23,e.m22);u=Math.atan2(-e.m31,e.m11)}else{c=0;u=Math.atan2(e.m13,e.m33)}}else if(r==="xzy"){i=Math.asin(-t(e.m12,-1,1));if(Math.abs(e.m12)<.9999999){c=Math.atan2(e.m32,e.m22);u=Math.atan2(e.m13,e.m11)}else{c=Math.atan2(-e.m23,e.m33);u=0}}return{x:c,y:u,z:i,order:r}}function tt(t){const n=JSON.parse(t);if(Array.isArray(n)){const[t,r,o,e="xyz"]=n;return{x:t,y:r,z:o,order:e}}else{const{x:t,y:r,z:o,order:e="xyz"}=n;return{x:t,y:r,z:o,order:e}}}function nt(t){const n=t;return n!=null&&n.hasOwnProperty("x")&&n.hasOwnProperty("y")&&n.hasOwnProperty("z")&&n.hasOwnProperty("order")}var rt=Object.freeze({__proto__:null,create:X,fromDegrees:Y,fromJson:tt,fromRotationMatrix:$,isType:nt});function ot(t={}){return{x:0,y:0,z:0,w:1,...t}}function et(t){const n=JSON.parse(t);if(Array.isArray(n)){const[t,r,o,e]=n;return ot({x:t,y:r,z:o,w:e})}else{return ot(n)}}function ct(t){return it(1/ut(t),t)}function ut(t){return Math.sqrt(t.w*t.w+t.x*t.x+t.y*t.y+t.z*t.z)}function it(t,n){return ot({w:n.w*t,x:n.x*t,y:n.y*t,z:n.z*t})}function st(t,n){const r=n/2;const o=Math.sin(r);const e=t.x*o;const c=t.y*o;const u=t.z*o;const i=Math.cos(r);return{x:e,y:c,z:u,w:i}}function at(t){const n=dt(t);const r=mt(1/n.x,1/n.y,1/n.z);const o=I(t,r);const e=K(o);const c=e.m11+e.m22+e.m33;if(c>0){const t=Math.sqrt(c+1)*2;return{x:(e.m23-e.m32)/t,y:(e.m31-e.m13)/t,z:(e.m12-e.m21)/t,w:.25*t}}else if(e.m11>e.m22&&e.m11>e.m33){const t=Math.sqrt(1+e.m11-e.m22-e.m33)*2;return{x:.25*t,y:(e.m12+e.m21)/t,z:(e.m31+e.m13)/t,w:(e.m23-e.m32)/t}}else if(e.m22>e.m33){const t=Math.sqrt(1+e.m22-e.m11-e.m33)*2;return{x:(e.m12+e.m21)/t,y:.25*t,z:(e.m23+e.m32)/t,w:(e.m31-e.m13)/t}}else{const t=Math.sqrt(1+e.m33-e.m11-e.m22)*2;return{x:(e.m31+e.m13)/t,y:(e.m23+e.m32)/t,z:.25*t,w:(e.m12-e.m21)/t}}}function ft(t){const{x:n,y:r,z:o,order:e}=t;const c=Math.cos(n/2);const u=Math.cos(r/2);const i=Math.cos(o/2);const s=Math.sin(n/2);const a=Math.sin(r/2);const f=Math.sin(o/2);let l=0,h=0,M=0,m=0;switch(e){case"xyz":l=s*u*i+c*a*f;h=c*a*i-s*u*f;M=c*u*f+s*a*i;m=c*u*i-s*a*f;break;case"yxz":l=s*u*i+c*a*f;h=c*a*i-s*u*f;M=c*u*f-s*a*i;m=c*u*i+s*a*f;break;case"zxy":l=s*u*i-c*a*f;h=c*a*i+s*u*f;M=c*u*f+s*a*i;m=c*u*i-s*a*f;break;case"zyx":l=s*u*i-c*a*f;h=c*a*i+s*u*f;M=c*u*f-s*a*i;m=c*u*i+s*a*f;break;case"yzx":l=s*u*i+c*a*f;h=c*a*i+s*u*f;M=c*u*f-s*a*i;m=c*u*i-s*a*f;break;case"xzy":l=s*u*i-c*a*f;h=c*a*i-s*u*f;M=c*u*f+s*a*i;m=c*u*i+s*a*f;break}return{x:l,y:h,z:M,w:m}}function lt(t,n){return{x:t.x*n.w+t.w*n.x+t.y*n.z-t.z*n.y,y:t.y*n.w+t.w*n.y+t.z*n.x-t.x*n.z,z:t.z*n.w+t.w*n.z+t.x*n.y-t.y*n.x,w:t.w*n.w-t.x*n.x-t.y*n.y-t.z*n.z}}function ht(t){const n=t;return n!=null&&n.hasOwnProperty("x")&&n.hasOwnProperty("y")&&n.hasOwnProperty("z")&&n.hasOwnProperty("w")}var Mt=Object.freeze({__proto__:null,create:ot,fromAxisAngle:st,fromEuler:ft,fromJson:et,fromMatrixRotation:at,isType:ht,magnitude:ut,multiply:lt,normalize:ct,scale:it});function mt(...t){var n,r,o,e,c,u;if(t.length===1){return{x:(n=t[0].x)!==null&&n!==void 0?n:0,y:(r=t[0].y)!==null&&r!==void 0?r:0,z:(o=t[0].z)!==null&&o!==void 0?o:0}}else if(t.length===3){return{x:(e=t[0])!==null&&e!==void 0?e:0,y:(c=t[1])!==null&&c!==void 0?c:0,z:(u=t[2])!==null&&u!==void 0?u:0}}return{x:0,y:0,z:0}}function yt({x:t,y:n,z:r}){return[t,n,r].every((t=>Number.isFinite(t)&&!Number.isNaN(t)))}function xt({x:t,y:n,z:r}){return[t,n,r].every((t=>t===0))}function dt(t){const n=K(t);return{x:Math.hypot(n.m11,n.m12,n.m13),y:Math.hypot(n.m21,n.m22,n.m23),z:Math.hypot(n.m31,n.m32,n.m33)}}function zt(t){const n=K(t);return{x:n.m41,y:n.m42,z:n.m43}}function _t(t){const n=JSON.parse(t);if(Array.isArray(n)){const[t,r,o]=n;return mt(t,r,o)}else{const{x:t,y:r,z:o}=n;return mt(t,r,o)}}function pt(t,n=0){const r=t[n];const o=t[n+1];const e=t[n+2];return mt(r,o,e)}function gt({x:t,y:n,z:r}){return[t,n,r]}function wt(){return mt(1,0,0)}function bt(){return mt(0,1,0)}function vt(){return mt(0,0,-1)}function jt(){return mt(-1,0,0)}function Ot(){return mt(0,-1,0)}function kt(){return mt(0,0,1)}function At(){return mt(0,0,0)}function St(t){const n=Pt(t);return{x:t.x/n,y:t.y/n,z:t.z/n}}function Pt(t){return Math.sqrt(Tt(t))}function Tt(t){return t.x*t.x+t.y*t.y+t.z*t.z}function Jt(t,n){return{x:t.y*n.z-t.z*n.y,y:t.z*n.x-t.x*n.z,z:t.x*n.y-t.y*n.x}}function Rt(t,...n){return n.reduce(((t,n)=>({x:t.x+n.x,y:t.y+n.y,z:t.z+n.z})),t)}function qt(t,...n){return n.reduce(((t,n)=>({x:t.x-n.x,y:t.y-n.y,z:t.z-n.z})),t)}function Nt(t,n){return{x:t.x*n.x,y:t.y*n.y,z:t.z*n.z}}function Vt(t,n){return{x:n.x*t,y:n.y*t,z:n.z*t}}function Ft(t,n){return t.x*n.x+t.y*n.y+t.z*n.z}function Dt(t,n){const r=Ft(t,n)/(Pt(t)*Pt(n));return Math.acos(r)}function Et(t,n){const r=St(t);const o=St(n);const e=Math.cos(b(1));const c=Ft(r,o);const u=Math.abs(c)>e;if(u){return c>1-1e-6?X():X({x:Math.PI})}const i=ct(ot({w:1+c,...Jt(r,o)}));return $(P(i),"xyz",false)}function Lt(t,n){return Vt(Ft(n,t)/Pt(n),n)}function Bt(t,n,r,o){if(t!==0){const{x:e,y:c,z:u}=n;const{x:i,y:s,z:a}=o;const{x:f,y:l,z:h}=r;const M=(i*(l*l+h*h)-f*(s*l+a*h-f*e-l*c-h*u))*(1-Math.cos(t))+e*Math.cos(t)+(-a*l+s*h-h*c+l*u)*Math.sin(t);const m=(s*(f*f+h*h)-l*(i*f+a*h-f*e-l*c-h*u))*(1-Math.cos(t))+c*Math.cos(t)+(a*f-i*h+h*e-f*u)*Math.sin(t);const y=(a*(f*f+l*l)-h*(i*f+s*l-f*e-l*c-h*u))*(1-Math.cos(t))+u*Math.cos(t)+(-s*f+i*l-l*e+f*c)*Math.sin(t);return{x:M,y:m,z:y}}else{return n}}function Ct(t,n){return It(t,n)}function It(t,n){const{x:r,y:o,z:e}=t;const c=1/(n[3]*r+n[7]*o+n[11]*e+n[15]);return{x:(n[0]*r+n[4]*o+n[8]*e+n[12])*c,y:(n[1]*r+n[5]*o+n[9]*e+n[13])*c,z:(n[2]*r+n[6]*o+n[10]*e+n[14])*c}}function Zt(t,n){const{x:r,y:o,z:e}=t;const c=1/(n[12]*r+n[13]*o+n[14]*e+n[15]);return{x:(n[0]*r+n[1]*o+n[2]*e+n[3])*c,y:(n[4]*r+n[5]*o+n[6]*e+n[7])*c,z:(n[8]*r+n[9]*o+n[10]*e+n[11])*c}}function Wt(t,n){return Math.sqrt(Gt(t,n))}function Gt(t,n){const{x:r,y:o,z:e}=qt(t,n);return r*r+o*o+e*e}function Ht(t,n){return t.x===n.x&&t.y===n.y&&t.z===n.z}function Kt(t,n){return mt(Math.max(t.x,n.x),Math.max(t.y,n.y),Math.max(t.z,n.z))}function Qt(t,n){return mt(Math.min(t.x,n.x),Math.min(t.y,n.y),Math.min(t.z,n.z))}function Ut(t){return{x:-t.x,y:-t.y,z:-t.z}}function Xt(t,r,o){return{x:n(t.x,r.x,o),y:n(t.y,r.y,o),z:n(t.z,r.z,o)}}function Yt(t,n,r){return It(It(t,r),n)}var $t=Object.freeze({__proto__:null,add:Rt,angleTo:Dt,back:kt,create:mt,cross:Jt,distance:Wt,distanceSquared:Gt,dot:Ft,down:Ot,eulerTo:Et,forward:vt,fromArray:pt,fromJson:_t,fromMatrixPosition:zt,fromMatrixScale:dt,isEqual:Ht,isValid:yt,isZeroVector:xt,left:jt,lerp:Xt,magnitude:Pt,magnitudeSquared:Tt,max:Kt,min:Qt,multiply:Nt,multiplyByTransformMatrixColumnMajor:It,multiplyByTransformMatrixRowMajor:Zt,negate:Ut,normalize:St,origin:At,project:Lt,right:wt,rotateAboutAxis:Bt,scale:Vt,subtract:qt,toArray:gt,transformMatrix:Ct,transformNdcToWorldSpace:Yt,up:bt});const tn=(t,n)=>({min:t,max:n});const nn=t=>cn(...t.map((t=>tn(t,t))));const rn=t=>Vt(.5,Rt(t.min,t.max));const on=t=>qt(t.max,t.min);const en=t=>Math.max(Math.max(Pt(t.max),Pt(t.min)),Pt(on(t)))*1e-6;function cn(t,...n){return n.reduce(((t,n)=>tn(Qt(t.min,n.min),Kt(t.max,n.max))),t)}const un=t=>mt(t.max.x-t.min.x,t.max.y-t.min.y,t.max.z-t.min.z);function sn(t){const n=yt(t.max);const r=yt(t.min);return n&&r}var an=Object.freeze({__proto__:null,center:rn,create:tn,diagonal:on,epsilon:en,fromVectors:nn,isValid:sn,lengths:un,union:cn});const fn=t=>{const n=rn(t);const r=qt(t.max,n);const o=Pt(r);const e=Math.max(o,Pt(n));const c=e===0?1:e*1e-6;return{center:n,radius:o,epsilon:c}};var ln=Object.freeze({__proto__:null,create:fn});function hn(t,n,r,o){return{x:t,y:n,width:r,height:o}}function Mn(t){return hn(0,0,t.width,t.height)}function mn(t,n){return hn(t.x,t.y,n.width,n.height)}function yn(t,n){const r=Math.min(t.x,n.x);const o=Math.min(t.y,n.y);const e=Math.max(t.x,n.x);const c=Math.max(t.y,n.y);return hn(r,o,e-r,c-o)}function xn(t,n){const r=Math.min(t.width/n.width,t.height/n.height);const o=Fn(r,n);const e=c(bn(t),Zn(o));return mn(e,o)}function dn(t,n){const r=Math.max(t.width/n.width,t.height/n.height);const o=Fn(r,n);const e=c(bn(t),Zn(o));return mn(e,o)}function zn(t,n){const r=Math.min(Math.sqrt(t/wn(n)),1);const o=In(Fn(r,n));const e=c(bn(n),Zn(o));return mn(e,o)}function _n(t,n,r){if(r==null){return _n(t,n,n)}else{const{x:o,y:e,width:c,height:u}=t;const i=n;return hn(o*i,e*r,c*i,u*r)}}function pn(t,n){return i(t,n)&&Nn(t,n)}function gn(t,n){return mn(u(vn(n),t),n)}function wn(t){return t.width*t.height}function bn(t){return{x:t.x+t.width/2,y:t.y+t.height/2}}function vn(t){return r(t.x,t.y)}function jn(t){return r(t.x+t.width,t.y+t.height)}function On(t){return t.width<t.height}function kn(t){return t.width>t.height}function An(t){return t.width===t.height}function Sn(t,n){return hn(t.x-n,t.y-n,t.width+n*2,t.height+n*2)}function Pn(t,...n){return n.every((n=>t.x<=n.x&&t.x+t.width>=n.x&&t.y<=n.y&&t.y+t.height>=n.y))}function Tn(t){const n=JSON.parse(t);if(Array.isArray(n)){const[t,r,o,e]=n;return hn(t,r,o,e)}else{const{x:t,y:r,width:o,height:e}=n;return hn(t,r,o,e)}}var Jn=Object.freeze({__proto__:null,area:wn,bottomRight:jn,center:bn,containFit:xn,containsPoints:Pn,create:hn,cropFit:dn,fromDimensions:Mn,fromJson:Tn,fromPointAndDimensions:mn,fromPoints:yn,isEqual:pn,isLandscape:kn,isPortrait:On,isSquare:An,offset:gn,pad:Sn,scale:_n,scaleFit:zn,topLeft:vn});const Rn=(t,n)=>({width:t,height:n});const qn=t=>Rn(t,t);const Nn=(t,n)=>t.width===n.width&&t.height===n.height;const Vn=(t,n,r)=>({width:r.width*t,height:r.height*n});const Fn=(t,n)=>Vn(t,t,n);const Dn=(t,n)=>({width:Math.min(t.width,n.width),height:Math.min(t.height,n.height)});const En=(t,n)=>{const{width:r,height:o}=xn(Kn(t),Kn(n));return{width:r,height:o}};const Ln=(t,n)=>{const{width:r,height:o}=dn(Kn(t),Kn(n));return{width:r,height:o}};const Bn=(t,n)=>{const{width:r,height:o}=zn(t,Kn(n));return{width:r,height:o}};const Cn=t=>({width:Math.round(t.width),height:Math.round(t.height)});const In=t=>({width:Math.floor(t.width),height:Math.floor(t.height)});const Zn=t=>({x:t.width/2,y:t.height/2});const Wn=({width:t,height:n})=>t/n;const Gn=({width:t,height:n})=>t*n;const Hn=(t,n)=>{if(n.width>=n.height*t){return Rn(n.height*t,n.height)}return Rn(n.width,n.width/t)};function Kn(t,n=r()){return mn(n,t)}var Qn=Object.freeze({__proto__:null,area:Gn,aspectRatio:Wn,center:Zn,containFit:En,create:Rn,cropFit:Ln,fitToRatio:Hn,floor:In,isEqual:Nn,proportionalScale:Fn,round:Cn,scale:Vn,scaleFit:Bn,square:qn,toRectangle:Kn,trim:Dn});function Un(t={}){var n,r;return{start:(n=t.start)!==null&&n!==void 0?n:At(),end:(r=t.end)!==null&&r!==void 0?r:At()}}function Xn(t){return Xt(t.start,t.end,.5)}function Yn(t,n){const r=It(t.start,n);const o=It(t.end,n);return{start:r,end:o}}function $n(t){return Wt(t.start,t.end)}function tr(t){return Gt(t.start,t.end)}function nr(t){return qt(t.end,t.start)}var rr=Object.freeze({__proto__:null,center:Xn,create:Un,direction:nr,distance:$n,distanceSquared:tr,transformMatrix:Yn});function or(...t){if(t.length===2){return{a:t[0].x,b:t[0].y,c:t[1].x,d:t[1].y}}else if(t.length===4){return{a:t[0],b:t[1],c:t[2],d:t[3]}}return{a:0,b:0,c:0,d:0}}function er(t){return t.a*t.d-t.b*t.c}function cr(t){return t.a*t.c+t.b*t.d}var ur=Object.freeze({__proto__:null,create:or,determinant:er,dot:cr});function ir(t={}){return{normal:At(),constant:0,...t}}function sr(t,n){const r=-Ft(n,t);return ir({normal:t,constant:r})}function ar(t,n){return Ft(t.normal,n)+t.constant}function fr(t,n){const r=nr(n);const o=Ft(t.normal,r);if(o===0){if(ar(t,n.start)===0){return n.start}else{return undefined}}const e=-(Ft(n.start,t.normal)+t.constant)/o;if(e<0||e>1){return undefined}else{return Rt(Vt(e,r),n.start)}}function lr(t,n){const r=ar(t,n);return Rt(n,Vt(-r,t.normal))}var hr=Object.freeze({__proto__:null,create:ir,distanceToPoint:ar,fromNormalAndCoplanarPoint:sr,intersectLine:fr,projectPoint:lr});function Mr(t={}){var n,r;return{origin:(n=t.origin)!==null&&n!==void 0?n:At(),direction:(r=t.direction)!==null&&r!==void 0?r:vt()}}function mr(t,n){return Rt(Vt(n,t.direction),t.origin)}function yr(t,n){const r=Ft(n.normal,t.direction);if(r===0){return ar(n,t.origin)===0?0:undefined}else{const o=-(Ft(t.origin,n.normal)+n.constant)/r;return o>=0?o:undefined}}function xr(t,n){const r=yr(t,n);return r!=null?mr(t,r):undefined}var dr=Object.freeze({__proto__:null,at:mr,create:Mr,distanceToPlane:yr,intersectPlane:xr});function zr(t={}){return{x:0,y:0,z:0,w:0,...t}}function _r(t){const n=JSON.parse(t);if(Array.isArray(n)){const[t,r,o,e]=n;return zr({x:t,y:r,z:o,w:e})}else{return zr(n)}}var pr=Object.freeze({__proto__:null,create:zr,fromJson:_r});export{v as a,hr as b,an as c,ur as d,Qn as e,ln as f,Jn as g,rt as h,pr as i,t as j,rr as l,U as m,d as p,Mt as q,dr as r,$t as v};
|
|
5
|
-
//# sourceMappingURL=p-CZZALKHT.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["clamp","value","min","max","Math","lerp$2","a","b","t","create$d","x","y","polar","length","radians","cos","sin","distance$2","delta","subtract$1","sqrt","add$1","isEqual$3","lerp$1","negate$1","pt","scale$5","scaleX","scaleY","scaleProportional","scale","magnitude$2","normalizeVector","magnitudeOfPoint","normalDirectionVector","ptA","ptB","orthogonalVector","unitVectorBetweenPoints","abs","vectorXValue","pow","vectorYValue","fromJson$5","json","obj","JSON","parse","Array","isArray","point","Object","freeze","__proto__","add","create","distance","fromJson","isEqual","lerp","magnitude","negate","subtract","fromPoints$1","theta","atan2","fromPointsInDegrees","normalize$2","toDegrees","degrees","normalizeRadians","toRadians","PI","angle","fromPoints","normalize","fromValues","m11","m12","m13","m14","m21","m22","m23","m24","m31","m32","m33","m34","m41","m42","m43","m44","fromObject","makeIdentity","makeZero","makeTranslation","translation","z","makeRotation","rotation","w","x2","y2","z2","xx","xy","xz","yy","yz","zz","wx","wy","wz","makeScale","makeTRS","r","transpose","s","multiply$2","makeBasis","makeFrustum","left","right","top","bottom","near","far","c","d","makePerspective","fovY","aspect","ymax","tan","xmax","makeOrthographic","h","makeLookAtView","position","lookAt","up","cross","dotX","dot$1","dotY","dotZ","makeLookAt","invert","matrix","a00","a01","a02","a03","a10","a11","a12","a13","a20","a21","a22","a23","a30","a31","a32","a33","b00","b01","b02","b03","b04","b05","b06","b07","b08","b09","b10","b11","det","oneOverDet","m","target","magnitudeSquared","res","result","i","j","k","positionInResultingMatrix","scale$4","originalMatrix","matrixWithDesiredPosition","isIdentity","identity","every","v","toObject","toObjectColumnMajor","toObjectRowMajor","isType$2","matrix4","isType","multiply","create$c","_a","_b","_c","_d","order","fromDegrees","fromRotationMatrix","matrixIsColumnMajor","asin","fromJson$4","isType$1","o","hasOwnProperty","euler","create$b","fromJson$3","normalize$1","q","scale$3","magnitude$1","scalar","fromAxisAngle","axis","halfAngle","fromMatrixRotation","fromMatrixScale","oneOverScaleVector","create$a","scaledMatrix","sM","trace","fromEuler","ex","ey","ez","c1","c2","c3","s1","s2","s3","multiply$1","quaternion","args","_e","_f","isValid$1","Number","isFinite","isNaN","isZeroVector","hypot","fromMatrixPosition","fromJson$2","fromArray","nums","offset","toArray","forward","down","back","origin","vector","vectors","reduce","next","scale$2","angleTo","acos","eulerTo","normalizedA","normalizedB","dotDelta","dotAB","vectorsAreParallel","normalizedQ","project","onNormal","rotateAboutAxis","axisDirection","axisPosition","u","newX","newY","newZ","transformMatrix$1","multiplyByTransformMatrixColumnMajor","multiplyByTransformMatrixRowMajor","distance$1","distanceSquared$1","dx","dy","dz","isEqual$2","transformNdcToWorldSpace","ndc","worldMatrix","projectionMatrixInverse","vector3","distanceSquared","dot","isValid","transformMatrix","create$9","fromVectors","union","map","center$3","boundingBox","diagonal","epsilon","box","rest","lengths","maxIsValid","minIsValid","center","create$8","boundingBox$1","boundingBoxCenter","centerToBoundingPlane","radius","boundingSphere","create$7","width","height","fromDimensions","dimensions","fromPointAndDimensions","topLeftPt","bottomRightPt","minX","minY","maxX","maxY","containFit$1","to","rect","dimensions$1","proportionalScale","center$2","center$1","cropFit$1","scaleFit$1","area$1","floor","scale$1","scaleOrScaleX","isEqual$1","topLeft","bottomRight","isPortrait","isLandscape","isSquare","pad","padding","containsPoints","points","fromJson$1","rectangle","area","containFit","cropFit","scaleFit","create$6","square","size","scaleFactor","trim","toRectangle","round","aspectRatio","fitToRatio","ratio","create$5","values","start","end","line","direction","line3","create$3","determinant","matrix2","create$2","normal","constant","fromNormalAndCoplanarPoint","distanceToPoint","plane","intersectLine","direction$1","denominator","undefined","projectPoint","create$1","at","ray","distanceToPlane","plane$1","intersectPlane","vector4"],"sources":["../geometry/dist/bundle.js"],"sourcesContent":["/**\n * Clamps the given value between `min` and `max`.\n *\n * @param value The value to clamp.\n * @param min The min possible value.\n * @param max The max possible value.\n * @returns `value` or a value clamped to `min` or `max`.\n */\nfunction clamp(value, min, max) {\n return Math.max(min, Math.min(max, value));\n}\n/**\n * Linear interpolates a value between `a` and `b` by `t`. If `t` is 0, then the\n * result will be `a`. If `t` is 1, then the result will be `b`. `t` will be\n * clamped to a value between 0 and 1.\n *\n * @param a The start value.\n * @param b The end value.\n * @param t The interpolation value between 0 and 1.\n * @returns The interpolated value between `a` and `b`.\n */\nfunction lerp$2(a, b, t) {\n t = clamp(t, 0, 1);\n return t * (b - a) + a;\n}\n\n/**\n * Returns a new `Point` with the given horizontal and vertical position.\n */\nfunction create$d(x = 0, y = 0) {\n return { x, y };\n}\n/**\n * Converts a polar coordinate (length and angle) into a Cartesian coordinate.\n */\nfunction polar(length, radians) {\n const x = Math.cos(radians) * length;\n const y = Math.sin(radians) * length;\n return create$d(x, y);\n}\n/**\n * Returns the distance between two points.\n */\nfunction distance$2(a, b) {\n const delta = subtract$1(a, b);\n return Math.sqrt(delta.x * delta.x + delta.y * delta.y);\n}\n/**\n * Returns a new `Point` where `b` is subtracted from `a`.\n */\nfunction subtract$1(a, b) {\n return { x: a.x - b.x, y: a.y - b.y };\n}\n/**\n * Returns a new `Point` where `b` is added to `a`.\n */\nfunction add$1(a, b) {\n return { x: a.x + b.x, y: a.y + b.y };\n}\n/**\n * Returns `true` if the `x` and `y` positions of `a` and `b` are equal.\n */\nfunction isEqual$3(a, b) {\n return a.x === b.x && a.y === b.y;\n}\n/**\n * Performs a linear interpolation between `a` and `b` and returns the result.\n * The value of `t` is clamped between `[0, 1]`.\n *\n * @param a The start value.\n * @param b The end value.\n * @param t A value between 0 and 1.\n * @returns A point between `a` and `b`.\n */\nfunction lerp$1(a, b, t) {\n return {\n x: lerp$2(a.x, b.x, t),\n y: lerp$2(a.y, b.y, t),\n };\n}\n/**\n * Returns a new `Point` where `x` and `y` are inverted.\n */\nfunction negate$1(pt) {\n return create$d(-pt.x, -pt.y);\n}\n/**\n * Returns a new `Point` where `x` and `y` are multiplied by the given scale\n * factors.\n */\nfunction scale$5(pt, scaleX, scaleY) {\n return {\n x: pt.x * scaleX,\n y: pt.y * scaleY,\n };\n}\n/**\n * Returns a new `Point` where `x` and `y` are multiplied by the given scale\n * factor.\n */\nfunction scaleProportional(pt, scale) {\n return {\n x: pt.x * scale,\n y: pt.y * scale,\n };\n}\n/**\n * Returns the magnitude of a point.\n */\nfunction magnitude$2(pt) {\n return Math.sqrt(pt.x * pt.x + pt.y * pt.y);\n}\n/**\n * Transforms a vector into the corresponding normal (unit) vector.\n */\nfunction normalizeVector(pt) {\n const magnitudeOfPoint = magnitude$2(pt);\n if (magnitudeOfPoint === 0) {\n return create$d(0, 0);\n }\n else {\n return scaleProportional(pt, 1 / magnitudeOfPoint);\n }\n}\n/**\n * Returns a new normal (unit) vector pointing between the two given points.\n */\nfunction normalDirectionVector(ptA, ptB) {\n return normalizeVector(subtract$1(ptB, ptA));\n}\n/**\n * Returns a vector orthogonal to the vector between the two given points.\n */\nfunction orthogonalVector(ptA, ptB) {\n const unitVectorBetweenPoints = normalDirectionVector(ptA, ptB);\n // Handle vectors that are parallel to the x or y axis\n if (unitVectorBetweenPoints.x === 0 || unitVectorBetweenPoints.y === 0) {\n return create$d(-1 * unitVectorBetweenPoints.y, unitVectorBetweenPoints.x);\n }\n if (Math.abs(unitVectorBetweenPoints.x) > Math.abs(unitVectorBetweenPoints.y)) {\n const vectorXValue = 1 - Math.pow(unitVectorBetweenPoints.x, 2);\n const vectorYValue = -1 * unitVectorBetweenPoints.x * unitVectorBetweenPoints.y;\n return normalizeVector(create$d(vectorXValue, vectorYValue));\n }\n else {\n const vectorXValue = -1 * unitVectorBetweenPoints.x * unitVectorBetweenPoints.y;\n const vectorYValue = 1 - Math.pow(unitVectorBetweenPoints.y, 2);\n return normalizeVector(create$d(vectorXValue, vectorYValue));\n }\n}\n/**\n * Parses a JSON string representation of a Point and returns an object.\n *\n * @param json A JSON string, either in the form `[x,y]` or `{\"x\": 0, \"y\": 0}`\n * @returns A parsed Point.\n */\nfunction fromJson$5(json) {\n const obj = JSON.parse(json);\n if (Array.isArray(obj)) {\n const [x, y] = obj;\n return create$d(x, y);\n }\n else {\n const { x, y } = obj;\n return create$d(x, y);\n }\n}\n\nvar point = /*#__PURE__*/Object.freeze({\n __proto__: null,\n add: add$1,\n create: create$d,\n distance: distance$2,\n fromJson: fromJson$5,\n isEqual: isEqual$3,\n lerp: lerp$1,\n magnitude: magnitude$2,\n negate: negate$1,\n normalDirectionVector: normalDirectionVector,\n normalizeVector: normalizeVector,\n orthogonalVector: orthogonalVector,\n polar: polar,\n scale: scale$5,\n scaleProportional: scaleProportional,\n subtract: subtract$1\n});\n\n/**\n * Returns an `Angle` between two points, in radians.\n *\n * @param a The starting point.\n * @param b The ending point.\n * @returns An angle in radians.\n */\nfunction fromPoints$1(a, b) {\n const delta = subtract$1(b, a);\n const theta = Math.atan2(delta.y, delta.x);\n return theta;\n}\n/**\n * Returns an `Angle` between two points, in degrees.\n *\n * An angle of 0 represents an upward vector, and increases in a clockwise\n * direction.\n *\n * @deprecated Use {@link fromPoints} instead.\n */\nfunction fromPointsInDegrees(a, b) {\n const delta = subtract$1(b, a);\n const theta = Math.atan2(delta.y, delta.x);\n return normalize$2(toDegrees(theta) - 270);\n}\n/**\n * Normalizes the given angle, in degrees, to a number greater than or equal to 0 and less than 360.\n */\nfunction normalize$2(degrees) {\n return (degrees + 3600) % 360;\n}\n/**\n * Normalizes the given angle, in radians, to a number greater than or equal to 0 and less than 2 PI.\n */\nfunction normalizeRadians(radians) {\n return toRadians(normalize$2(toDegrees(radians)));\n}\n/**\n * Converts the given radians to degrees.\n */\nfunction toDegrees(radians) {\n return radians * (180 / Math.PI);\n}\n/**\n * Converts the given degrees to radians.\n */\nfunction toRadians(degrees) {\n return degrees * (Math.PI / 180);\n}\n\nvar angle = /*#__PURE__*/Object.freeze({\n __proto__: null,\n fromPoints: fromPoints$1,\n fromPointsInDegrees: fromPointsInDegrees,\n normalize: normalize$2,\n normalizeRadians: normalizeRadians,\n toDegrees: toDegrees,\n toRadians: toRadians\n});\n\n/**\n * Creates a 4x4 matrix from a set of row-major components.\n */\nfunction fromValues(\n// prettier-ignore\nm11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, m41, m42, m43, m44) {\n // prettier-ignore\n return [\n m11, m12, m13, m14,\n m21, m22, m23, m24,\n m31, m32, m33, m34,\n m41, m42, m43, m44,\n ];\n}\n/**\n * Creates a `Matrix4` from an object representation.\n */\nfunction fromObject(obj) {\n // prettier-ignore\n return fromValues(obj.m11, obj.m12, obj.m13, obj.m14, obj.m21, obj.m22, obj.m23, obj.m24, obj.m31, obj.m32, obj.m33, obj.m34, obj.m41, obj.m42, obj.m43, obj.m44);\n}\n/**\n * Returns a new [identity matrix](https://en.wikipedia.org/wiki/Identity_matrix).\n */\nfunction makeIdentity() {\n // prettier-ignore\n return [\n 1, 0, 0, 0,\n 0, 1, 0, 0,\n 0, 0, 1, 0,\n 0, 0, 0, 1,\n ];\n}\n/**\n * Returns a matrix with all values as 0.\n */\nfunction makeZero() {\n // prettier-ignore\n return [\n 0, 0, 0, 0,\n 0, 0, 0, 0,\n 0, 0, 0, 0,\n 0, 0, 0, 0,\n ];\n}\n/**\n * Creates a translation matrix.\n *\n * ```\n * 1, 0, 0, 0,\n * 0, 1, 0, 0,\n * 0, 0, 1, 0,\n * x, y, z, 1\n * ```\n *\n * @param translation A vector representing the translation components.\n * @returns A translation matrix.\n */\nfunction makeTranslation(translation) {\n const { x, y, z } = translation;\n // prettier-ignore\n return [\n 1, 0, 0, 0,\n 0, 1, 0, 0,\n 0, 0, 1, 0,\n x, y, z, 1,\n ];\n}\n/**\n * Creates a rotation matrix.\n *\n * ```\n * 1-2y²-2z², 2xy-2zw, 2xz+2yw, 0,\n * 2xy+2zw, 1-2x²-2z², 2yz-2xw, 0,\n * 2xz-2yw, 2yz+2xw, 1-2x²-2y², 0,\n * 0, 0, 0, 1,\n * ```\n *\n * @param rotation A quaternion representing the rotation.\n * @see https://en.wikipedia.org/wiki/Rotation_matrix#Quaternion\n * @returns A rotation matrix.\n */\nfunction makeRotation(rotation) {\n const { x, y, z, w } = rotation;\n const x2 = x + x, y2 = y + y, z2 = z + z;\n const xx = x * x2, xy = x * y2, xz = x * z2;\n const yy = y * y2, yz = y * z2, zz = z * z2;\n const wx = w * x2, wy = w * y2, wz = w * z2;\n // prettier-ignore\n return [\n 1 - (yy + zz), xy - wz, xz + wy, 0,\n xy + wz, 1 - (xx + zz), yz - wx, 0,\n xz - wy, yz + wx, 1 - (xx + yy), 0,\n 0, 0, 0, 1\n ];\n}\n/**\n * Creates a scale matrix.\n *\n * ```\n * x, 0, 0, 0,\n * 0, y, 0, 0,\n * 0, 0, z, 0,\n * 0, 0, 0, 1\n * ```\n *\n * @param scale A vector representing the different scale components.\n * @returns A scale matrix.\n */\nfunction makeScale(scale) {\n const { x, y, z } = scale;\n // prettier-ignore\n return [\n x, 0, 0, 0,\n 0, y, 0, 0,\n 0, 0, z, 0,\n 0, 0, 0, 1,\n ];\n}\n/**\n * Creates a matrix that has translation, rotation, and scale applied to it.\n *\n * @param translation The translation applied to the matrix.\n * @param rotation The rotation applied to the matrix.\n * @param scale The scale applied to the matrix.\n * @returns A transformed matrix in column-major form.\n */\nfunction makeTRS(translation, rotation, scale) {\n const t = makeTranslation(translation);\n const r = transpose(makeRotation(rotation));\n const s = makeScale(scale);\n return multiply$2(s, multiply$2(r, t));\n}\n/**\n * Returns a matrix that has the basis components (upper left 3x3 matrix) set to\n * the following x, y, and z axis.\n *\n * ```\n * x.x x.y x.z 0\n * y.x y.y y.z 0\n * z.x z.y z.z 0\n * 0 0 0 0\n * ```\n *\n * @param x The x-axis to set.\n * @param y The y-axis to set.\n * @param z The z-axis to set.\n * @returns A matrix with its basis components populated.\n */\nfunction makeBasis(x, y, z) {\n // prettier-ignore\n return [\n x.x, x.y, x.z, 0,\n y.x, y.y, y.z, 0,\n z.x, z.y, z.z, 0,\n 0, 0, 0, 1\n ];\n}\n/**\n * Creates a matrix used for [perspective\n * projections](https://en.wikipedia.org/wiki/3D_projection#Perspective_projection).\n *\n * The viewing volume is frustum-shaped and defined by the six parameters. Left,\n * right, top, and bottom specify coordinates in the near clipping plane where\n * the frustum edges intersect it, and the near and far parameters define the\n * forward distances of the view volume. The resulting volume can be vertically\n * and horizontally asymmetrical around the center of the near plane.\n *\n * @param left The left coordinate at the near plane.\n * @param right The right coordinate at the near plane.\n * @param top The top coordinate at the near plane.\n * @param bottom The bottom coordinate at the near plane.\n * @param near The near distance.\n * @param far The far distance.\n * @returns A matrix representing a view frustum.\n */\nfunction makeFrustum(left, right, top, bottom, near, far) {\n const x = (2 * near) / (right - left);\n const y = (2 * near) / (top - bottom);\n const a = (right + left) / (right - left);\n const b = (top + bottom) / (top - bottom);\n const c = -(far + near) / (far - near);\n const d = (-2 * far * near) / (far - near);\n // prettier-ignore\n return [\n x, 0, 0, 0,\n 0, y, 0, 0,\n a, b, c, -1,\n 0, 0, d, 0\n ];\n}\n/**\n * Creates a perspective projection matrix.\n *\n * Related to: gluPerspective. The viewing volume is frustum-shaped amd defined\n * by the four parameters. The fovy and aspect ratio are used to compute the\n * positions of the left, right, top, and bottom sides of the viewing volume in\n * the zNear plane. The fovy is the y field-of-view, the angle made by the top\n * and bottom sides of frustum if they were to intersect. The aspect ratio is\n * the width of the frustum divided by its height. Note that the resulting\n * volume is both vertically and horizontally symmetrical around the center of\n * the near plane.\n *\n * @param near The near Z value.\n * @param far The far Z value.\n * @param fovY The field of view.\n * @param aspect The aspect ratio.\n * @returns A matrix.\n */\nfunction makePerspective(near, far, fovY, aspect) {\n const ymax = near * Math.tan(toRadians(fovY / 2.0));\n const xmax = ymax * aspect;\n const left = -xmax;\n const right = xmax;\n const top = ymax;\n const bottom = -ymax;\n return makeFrustum(left, right, top, bottom, near, far);\n}\n/**\n * Creates an orthographic projection matrix.\n *\n * Related to: gluOrtho. The viewing volume is cube-shaped and defined by\n * the six parameters. The left and right values represent the coordinates of\n * the vertical clipping planes, top and bottom values represent the coordinates\n * of the horizontal clipping planes, and near and far values represent the\n * coordinates of the depth clipping planes.\n *\n * @param left The coordinate of the left horizontal clipping plane.\n * @param right The coordinate of the right horizontal clipping plane.\n * @param bottom The coordinate of the bottom vertical clipping plane.\n * @param top The coordinate of the top vertical clipping plane.\n * @param near The coordinate of the near depth clipping plane.\n * @param far The coordinate of the far depth clipping plane.\n * @returns A matrix.\n */\nfunction makeOrthographic(left, right, bottom, top, near, far) {\n const w = 1.0 / (right - left);\n const h = 1.0 / (top - bottom);\n const d = 1.0 / (far - near);\n const x = (right + left) * w;\n const y = (top + bottom) * h;\n const z = (far + near) * d;\n // prettier-ignore\n return [\n 2 * w, 0, 0, -x,\n 0, 2 * h, 0, -y,\n 0, 0, -2 * d, -z,\n 0, 0, 0, 1\n ];\n}\n/**\n * Matrix becomes a combination of an inverse translation and rotation.\n *\n * Related to: gluLookAt. This creates the inverse of makeLookAtMatrix. The\n * matrix will be an opposite translation from the 'eye' position, and it will\n * rotate things in the opposite direction of the eye-to-center orientation.\n * This is definitely confusing, but the main reason to use this transform is to\n * set up a view matrix for a camera that's looking at a certain point. To\n * achieve the effect of moving the camera somewhere and rotating it so that it\n * points at something, the rest of the world is moved in the opposite direction\n * and rotated in the opposite way around the camera. This way, you get the same\n * effect as moving the actual camera, but all the projection math can still be\n * done with the camera positioned at the origin (which makes it way simpler).\n *\n * @param position The position of the object.\n * @param lookAt The point which the object is looking at.\n * @param up The direction which the object considers up.\n * @returns A matrix.\n */\nfunction makeLookAtView(position, lookAt, up) {\n const z = normalize(subtract(position, lookAt));\n const x = normalize(cross(up, z));\n const y = cross(z, x);\n const dotX = -dot$1(x, position);\n const dotY = -dot$1(y, position);\n const dotZ = -dot$1(z, position);\n // prettier-ignore\n return [\n x.x, y.x, z.x, 0,\n x.y, y.y, z.y, 0,\n x.z, y.z, z.z, 0,\n dotX, dotY, dotZ, 1,\n ];\n}\n/**\n * Matrix becomes a combination of translation and rotation.\n *\n * Matrix becomes a combination of a translation to the position of 'eye' and a\n * rotation matrix which orients an object to point towards 'center' along its\n * z-axis. Use this function if you want an object to look at a point from\n * another point in space.\n *\n * @param position The position of the object.\n * @param lookAt The point which the object is looking at.\n * @param up The direction which the object considers up.\n * @returns A matrix.\n */\nfunction makeLookAt(position, lookAt, up) {\n const z = normalize(subtract(position, lookAt));\n const x = normalize(cross(up, z));\n const y = cross(z, x);\n // prettier-ignore\n return [\n x.x, x.y, x.z, 0,\n y.x, y.y, y.z, 0,\n z.x, z.y, z.z, 0,\n position.x, position.y, position.z, 1\n ];\n}\n/**\n * Returns the inverse of the given matrix. If the determinate of the matrix is\n * zero, then a zero matrix is returned.\n */\nfunction invert(matrix) {\n const a00 = matrix[0], a01 = matrix[1], a02 = matrix[2], a03 = matrix[3];\n const a10 = matrix[4], a11 = matrix[5], a12 = matrix[6], a13 = matrix[7];\n const a20 = matrix[8], a21 = matrix[9], a22 = matrix[10], a23 = matrix[11];\n const a30 = matrix[12], a31 = matrix[13], a32 = matrix[14], a33 = matrix[15];\n const b00 = a00 * a11 - a01 * a10;\n const b01 = a00 * a12 - a02 * a10;\n const b02 = a00 * a13 - a03 * a10;\n const b03 = a01 * a12 - a02 * a11;\n const b04 = a01 * a13 - a03 * a11;\n const b05 = a02 * a13 - a03 * a12;\n const b06 = a20 * a31 - a21 * a30;\n const b07 = a20 * a32 - a22 * a30;\n const b08 = a20 * a33 - a23 * a30;\n const b09 = a21 * a32 - a22 * a31;\n const b10 = a21 * a33 - a23 * a31;\n const b11 = a22 * a33 - a23 * a32;\n // Calculate the determinant\n const det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n if (!det) {\n return makeZero();\n }\n const oneOverDet = 1 / det;\n return [\n (a11 * b11 - a12 * b10 + a13 * b09) * oneOverDet,\n (a02 * b10 - a01 * b11 - a03 * b09) * oneOverDet,\n (a31 * b05 - a32 * b04 + a33 * b03) * oneOverDet,\n (a22 * b04 - a21 * b05 - a23 * b03) * oneOverDet,\n (a12 * b08 - a10 * b11 - a13 * b07) * oneOverDet,\n (a00 * b11 - a02 * b08 + a03 * b07) * oneOverDet,\n (a32 * b02 - a30 * b05 - a33 * b01) * oneOverDet,\n (a20 * b05 - a22 * b02 + a23 * b01) * oneOverDet,\n (a10 * b10 - a11 * b08 + a13 * b06) * oneOverDet,\n (a01 * b08 - a00 * b10 - a03 * b06) * oneOverDet,\n (a30 * b04 - a31 * b02 + a33 * b00) * oneOverDet,\n (a21 * b02 - a20 * b04 - a23 * b00) * oneOverDet,\n (a11 * b07 - a10 * b09 - a12 * b06) * oneOverDet,\n (a00 * b09 - a01 * b07 + a02 * b06) * oneOverDet,\n (a31 * b01 - a30 * b03 - a32 * b00) * oneOverDet,\n (a20 * b03 - a21 * b01 + a22 * b00) * oneOverDet,\n ];\n}\n/**\n * Returns a rotation matrix looking from position towards target and oriented\n * by an up vector.\n *\n * @param m The matrix to transform.\n * @param position The point from which to look at target.\n * @param target The point to look at.\n * @param up The orientation.\n * @returns A rotation matrix.\n */\nfunction lookAt(m, position, target, up) {\n let z = subtract(position, target);\n if (magnitudeSquared(z) === 0) {\n z = { ...z, z: 1 };\n }\n z = normalize(z);\n let x = cross(up, z);\n if (magnitudeSquared(x) === 0) {\n if (Math.abs(up.z) === 1) {\n z = { ...z, x: z.x + 0.0001 };\n }\n else {\n z = { ...z, z: z.z + 0.0001 };\n }\n z = normalize(z);\n x = cross(up, z);\n }\n x = normalize(x);\n const y = cross(z, x);\n const res = [...m];\n // prettier-ignore\n res[0] = x.x;\n res[1] = x.y;\n res[2] = x.z;\n res[4] = y.x;\n res[5] = y.y;\n res[6] = y.z;\n res[8] = z.x;\n res[9] = z.y;\n res[10] = z.z;\n return res;\n}\n/**\n * Returns a post-multiplied matrix equal to ab.\n */\nfunction multiply$2(a, b) {\n const result = makeIdentity();\n // Consider each row i in the final matrix\n for (let i = 0; i < 4; i++) {\n // Consider each column j in the final matrix\n for (let j = 0; j < 4; j++) {\n // Calculate the value at row i and column j\n let value = 0;\n for (let k = 0; k < 4; k++) {\n // Calculate (ik + kj) and add it to the value\n value += a[i * 4 + k] * b[k * 4 + j];\n }\n const positionInResultingMatrix = 4 * i + j;\n result[positionInResultingMatrix] = value;\n }\n }\n return result;\n}\n/**\n * Returns the [transpose](https://en.wikipedia.org/wiki/Transpose) of the given\n * matrix.\n */\nfunction transpose(matrix) {\n // prettier-ignore\n return [\n matrix[0], matrix[4], matrix[8], matrix[12],\n matrix[1], matrix[5], matrix[9], matrix[13],\n matrix[2], matrix[6], matrix[10], matrix[14],\n matrix[3], matrix[7], matrix[11], matrix[15],\n ];\n}\n/**\n * Multiplies the columns of a row-major matrix by the given vector.\n */\nfunction scale$4(matrix, scale) {\n const { x, y, z } = scale;\n const m = [...matrix];\n // prettier-ignore\n m[0] *= x;\n m[1] *= x;\n m[2] *= x;\n m[3] *= x;\n m[4] *= y;\n m[5] *= y;\n m[6] *= y;\n m[7] *= y;\n m[8] *= z;\n m[9] *= z;\n m[10] *= z;\n m[11] *= z;\n return m;\n}\n/**\n * Sets the position of the matrix given as the first parameter\n * to the position of the matrix given as the second parameter.\n * Both matrices should have row-major format.\n */\nfunction position(originalMatrix, matrixWithDesiredPosition) {\n const m = [...originalMatrix];\n m[12] = matrixWithDesiredPosition[12];\n m[13] = matrixWithDesiredPosition[13];\n m[14] = matrixWithDesiredPosition[14];\n return m;\n}\n/**\n * Returns true if the matrix is an identity matrix.\n */\nfunction isIdentity(matrix) {\n const identity = makeIdentity();\n return matrix.every((v, i) => v === identity[i]);\n}\n/**\n * Returns an object representation of a `Matrix4`.\n * @param m A Matrix4 item written in column-major form.\n *\n * @deprecated Use {@link toObjectColumnMajor} or {@link toObjectRowMajor} instead.\n */\nfunction toObject(m) {\n return toObjectColumnMajor(m);\n}\n/**\n * Returns an object representation of a `Matrix4`.\n * @param m A Matrix4 item written in column-major form.\n */\nfunction toObjectColumnMajor(m) {\n // prettier-ignore\n return {\n m11: m[0], m12: m[4], m13: m[8], m14: m[12],\n m21: m[1], m22: m[5], m23: m[9], m24: m[13],\n m31: m[2], m32: m[6], m33: m[10], m34: m[14],\n m41: m[3], m42: m[7], m43: m[11], m44: m[15],\n };\n}\n/**\n * Returns an object representation of a `Matrix4`.\n * @param m A Matrix4 item written in row-major form.\n */\nfunction toObjectRowMajor(m) {\n // prettier-ignore\n return {\n m11: m[0], m12: m[1], m13: m[2], m14: m[3],\n m21: m[4], m22: m[5], m23: m[6], m24: m[7],\n m31: m[8], m32: m[9], m33: m[10], m34: m[11],\n m41: m[12], m42: m[13], m43: m[14], m44: m[15],\n };\n}\n/**\n * A type guard to check if `obj` is of type `Matrix4`.\n */\nfunction isType$2(obj) {\n return Array.isArray(obj) && obj.length === 16;\n}\n\nvar matrix4 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n fromObject: fromObject,\n fromValues: fromValues,\n invert: invert,\n isIdentity: isIdentity,\n isType: isType$2,\n lookAt: lookAt,\n makeBasis: makeBasis,\n makeFrustum: makeFrustum,\n makeIdentity: makeIdentity,\n makeLookAt: makeLookAt,\n makeLookAtView: makeLookAtView,\n makeOrthographic: makeOrthographic,\n makePerspective: makePerspective,\n makeRotation: makeRotation,\n makeScale: makeScale,\n makeTRS: makeTRS,\n makeTranslation: makeTranslation,\n makeZero: makeZero,\n multiply: multiply$2,\n position: position,\n scale: scale$4,\n toObject: toObject,\n toObjectColumnMajor: toObjectColumnMajor,\n toObjectRowMajor: toObjectRowMajor,\n transpose: transpose\n});\n\n/**\n * Creates a new set of Euler angles where each axis of rotation is defined by an angle,\n * in radians. If no value is given, then `{x: 0, y: 0, z: 0, order: 'xyz'}` is\n * returned.\n *\n * @param value The values to populate the Euler angles with.\n * @returns A set of Euler angles.\n */\nfunction create$c(value = {}) {\n var _a, _b, _c, _d;\n return {\n x: (_a = value.x) !== null && _a !== void 0 ? _a : 0,\n y: (_b = value.y) !== null && _b !== void 0 ? _b : 0,\n z: (_c = value.z) !== null && _c !== void 0 ? _c : 0,\n order: (_d = value.order) !== null && _d !== void 0 ? _d : 'xyz',\n };\n}\n/**\n * Creates a new set of Euler angles where each axis of rotation is defined by an angle,\n * in degrees. If no value is given, then `{x: 0, y: 0, z: 0, order: 'xyz'}` is\n * returned.\n *\n * @param value The values to populate the Euler angles with.\n * @returns A set of Euler angles.\n */\nfunction fromDegrees(value = {}) {\n const { x = 0, y = 0, z = 0, order } = value;\n return create$c({\n x: toRadians(x),\n y: toRadians(y),\n z: toRadians(z),\n order,\n });\n}\n/**\n * Creates a set of Euler angles from the rotation components of a 4x4 matrix. The\n * rotation components are represented by the upper 3x3 of the matrix.\n *\n * Note that there are two solutions for the Euler angle of the 2nd applied\n * rotation (i.e. y for xyz) because sin(theta) = sin(PI-theta).\n * The returned angle will always be the solution between -PI/2 and PI/2.\n *\n * @param matrix A pure rotation matrix, unscaled.\n * @param order The order that the rotations are applied.\n */\nfunction fromRotationMatrix(matrix, order = 'xyz', matrixIsColumnMajor = true) {\n const m = matrixIsColumnMajor\n ? toObjectColumnMajor(matrix)\n : toObjectRowMajor(matrix);\n let x = 0, y = 0, z = 0;\n if (order === 'xyz') {\n y = Math.asin(clamp(m.m13, -1, 1));\n if (Math.abs(m.m13) < 0.9999999) {\n x = Math.atan2(-m.m23, m.m33);\n z = Math.atan2(-m.m12, m.m11);\n }\n else {\n x = Math.atan2(m.m32, m.m22);\n z = 0;\n }\n }\n else if (order === 'yxz') {\n x = Math.asin(-clamp(m.m23, -1, 1));\n if (Math.abs(m.m23) < 0.9999999) {\n y = Math.atan2(m.m13, m.m33);\n z = Math.atan2(m.m21, m.m22);\n }\n else {\n y = Math.atan2(-m.m31, m.m11);\n z = 0;\n }\n }\n else if (order === 'zxy') {\n x = Math.asin(clamp(m.m32, -1, 1));\n if (Math.abs(m.m32) < 0.9999999) {\n y = Math.atan2(-m.m31, m.m33);\n z = Math.atan2(-m.m12, m.m22);\n }\n else {\n y = 0;\n z = Math.atan2(m.m21, m.m11);\n }\n }\n else if (order === 'zyx') {\n y = Math.asin(-clamp(m.m31, -1, 1));\n if (Math.abs(m.m31) < 0.9999999) {\n x = Math.atan2(m.m32, m.m33);\n z = Math.atan2(m.m21, m.m11);\n }\n else {\n x = 0;\n z = Math.atan2(-m.m12, m.m22);\n }\n }\n else if (order === 'yzx') {\n z = Math.asin(clamp(m.m21, -1, 1));\n if (Math.abs(m.m21) < 0.9999999) {\n x = Math.atan2(-m.m23, m.m22);\n y = Math.atan2(-m.m31, m.m11);\n }\n else {\n x = 0;\n y = Math.atan2(m.m13, m.m33);\n }\n }\n else if (order === 'xzy') {\n z = Math.asin(-clamp(m.m12, -1, 1));\n if (Math.abs(m.m12) < 0.9999999) {\n x = Math.atan2(m.m32, m.m22);\n y = Math.atan2(m.m13, m.m11);\n }\n else {\n x = Math.atan2(-m.m23, m.m33);\n y = 0;\n }\n }\n return { x, y, z, order };\n}\n/**\n * Returns a set of Euler angles that was decoded from a JSON string. Supports either\n * extracting values from an array `[x, y, z, order]` or object `{x, y, z,\n * order}`.\n *\n * @param json A JSON object.\n * @returns A set of Euler angles.\n */\nfunction fromJson$4(json) {\n const obj = JSON.parse(json);\n if (Array.isArray(obj)) {\n const [x, y, z, order = 'xyz'] = obj;\n return { x, y, z, order };\n }\n else {\n const { x, y, z, order = 'xyz' } = obj;\n return { x, y, z, order };\n }\n}\n/**\n * Type guard that checks if the given type is a set of Euler angles.\n */\nfunction isType$1(obj) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const o = obj;\n return (o != null &&\n o.hasOwnProperty('x') &&\n o.hasOwnProperty('y') &&\n o.hasOwnProperty('z') &&\n o.hasOwnProperty('order'));\n}\n\nvar euler = /*#__PURE__*/Object.freeze({\n __proto__: null,\n create: create$c,\n fromDegrees: fromDegrees,\n fromJson: fromJson$4,\n fromRotationMatrix: fromRotationMatrix,\n isType: isType$1\n});\n\n/**\n * Returns a new quaternion. If `value` is undefined, then `{x: 0, y: 0, z: 0,\n * w: 1}` is returned.\n */\nfunction create$b(value = {}) {\n return { x: 0, y: 0, z: 0, w: 1, ...value };\n}\n/**\n * Parses a JSON string representation of a `Quaternion`.\n *\n * @param json A JSON string either in the form of `[x, y, z, w]` or `{\"x\": 0, \"y\": 0, \"z\": 0, \"w\": 0}`.\n * @returns A parsed `Quaternion`.\n */\nfunction fromJson$3(json) {\n const obj = JSON.parse(json);\n if (Array.isArray(obj)) {\n const [x, y, z, w] = obj;\n return create$b({ x, y, z, w });\n }\n else {\n return create$b(obj);\n }\n}\n/**\n * Returns a quaternion with that will have a magnitude of 1.\n */\nfunction normalize$1(q) {\n return scale$3(1 / magnitude$1(q), q);\n}\n/**\n * Returns the magnitude of the provided quaternion.\n */\nfunction magnitude$1(q) {\n return Math.sqrt(q.w * q.w + q.x * q.x + q.y * q.y + q.z * q.z);\n}\n/**\n * Returns a quaternion where each component is multiplied by the `scalar`.\n */\nfunction scale$3(scalar, q) {\n return create$b({\n w: q.w * scalar,\n x: q.x * scalar,\n y: q.y * scalar,\n z: q.z * scalar,\n });\n}\n/**\n * Creates a `Quaternion` that is rotated the given radians around an axis.\n *\n * @param axis The axis to rotate around.\n * @param radians The rotation, in radians.\n * @returns A rotated quaternion.\n */\nfunction fromAxisAngle(axis, radians) {\n const halfAngle = radians / 2;\n const s = Math.sin(halfAngle);\n const x = axis.x * s;\n const y = axis.y * s;\n const z = axis.z * s;\n const w = Math.cos(halfAngle);\n return { x, y, z, w };\n}\n/**\n * Returns a quaternion using the upper 3x3 of a pure rotation matrix\n * (unscaled).\n */\nfunction fromMatrixRotation(matrix) {\n // Determine the scalars for each vector\n const scale = fromMatrixScale(matrix);\n const oneOverScaleVector = create$a(1 / scale.x, 1 / scale.y, 1 / scale.z);\n // Scale the matrix\n const scaledMatrix = scale$4(matrix, oneOverScaleVector);\n const sM = toObjectRowMajor(scaledMatrix);\n const trace = sM.m11 + sM.m22 + sM.m33;\n if (trace > 0) {\n const s = Math.sqrt(trace + 1) * 2;\n return {\n x: (sM.m23 - sM.m32) / s,\n y: (sM.m31 - sM.m13) / s,\n z: (sM.m12 - sM.m21) / s,\n w: 0.25 * s,\n };\n }\n else if (sM.m11 > sM.m22 && sM.m11 > sM.m33) {\n const s = Math.sqrt(1 + sM.m11 - sM.m22 - sM.m33) * 2;\n return {\n x: 0.25 * s,\n y: (sM.m12 + sM.m21) / s,\n z: (sM.m31 + sM.m13) / s,\n w: (sM.m23 - sM.m32) / s,\n };\n }\n else if (sM.m22 > sM.m33) {\n const s = Math.sqrt(1 + sM.m22 - sM.m11 - sM.m33) * 2;\n return {\n x: (sM.m12 + sM.m21) / s,\n y: 0.25 * s,\n z: (sM.m23 + sM.m32) / s,\n w: (sM.m31 - sM.m13) / s,\n };\n }\n else {\n const s = Math.sqrt(1 + sM.m33 - sM.m11 - sM.m22) * 2;\n return {\n x: (sM.m31 + sM.m13) / s,\n y: (sM.m23 + sM.m32) / s,\n z: 0.25 * s,\n w: (sM.m12 - sM.m21) / s,\n };\n }\n}\nfunction fromEuler(euler) {\n const { x: ex, y: ey, z: ez, order } = euler;\n const c1 = Math.cos(ex / 2);\n const c2 = Math.cos(ey / 2);\n const c3 = Math.cos(ez / 2);\n const s1 = Math.sin(ex / 2);\n const s2 = Math.sin(ey / 2);\n const s3 = Math.sin(ez / 2);\n let x = 0, y = 0, z = 0, w = 0;\n switch (order) {\n case 'xyz':\n x = s1 * c2 * c3 + c1 * s2 * s3;\n y = c1 * s2 * c3 - s1 * c2 * s3;\n z = c1 * c2 * s3 + s1 * s2 * c3;\n w = c1 * c2 * c3 - s1 * s2 * s3;\n break;\n case 'yxz':\n x = s1 * c2 * c3 + c1 * s2 * s3;\n y = c1 * s2 * c3 - s1 * c2 * s3;\n z = c1 * c2 * s3 - s1 * s2 * c3;\n w = c1 * c2 * c3 + s1 * s2 * s3;\n break;\n case 'zxy':\n x = s1 * c2 * c3 - c1 * s2 * s3;\n y = c1 * s2 * c3 + s1 * c2 * s3;\n z = c1 * c2 * s3 + s1 * s2 * c3;\n w = c1 * c2 * c3 - s1 * s2 * s3;\n break;\n case 'zyx':\n x = s1 * c2 * c3 - c1 * s2 * s3;\n y = c1 * s2 * c3 + s1 * c2 * s3;\n z = c1 * c2 * s3 - s1 * s2 * c3;\n w = c1 * c2 * c3 + s1 * s2 * s3;\n break;\n case 'yzx':\n x = s1 * c2 * c3 + c1 * s2 * s3;\n y = c1 * s2 * c3 + s1 * c2 * s3;\n z = c1 * c2 * s3 - s1 * s2 * c3;\n w = c1 * c2 * c3 - s1 * s2 * s3;\n break;\n case 'xzy':\n x = s1 * c2 * c3 - c1 * s2 * s3;\n y = c1 * s2 * c3 - s1 * c2 * s3;\n z = c1 * c2 * s3 + s1 * s2 * c3;\n w = c1 * c2 * c3 + s1 * s2 * s3;\n break;\n }\n return { x, y, z, w };\n}\n/**\n * Multiplies `a` x `b` and returns a new quaternion with the result.\n */\nfunction multiply$1(a, b) {\n // http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/quaternions/code/index.htm\n return {\n x: a.x * b.w + a.w * b.x + a.y * b.z - a.z * b.y,\n y: a.y * b.w + a.w * b.y + a.z * b.x - a.x * b.z,\n z: a.z * b.w + a.w * b.z + a.x * b.y - a.y * b.x,\n w: a.w * b.w - a.x * b.x - a.y * b.y - a.z * b.z,\n };\n}\n/**\n * Type guard that checks if the given type is a Quaternion.\n */\nfunction isType(obj) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const o = obj;\n return (o != null &&\n o.hasOwnProperty('x') &&\n o.hasOwnProperty('y') &&\n o.hasOwnProperty('z') &&\n o.hasOwnProperty('w'));\n}\n\nvar quaternion = /*#__PURE__*/Object.freeze({\n __proto__: null,\n create: create$b,\n fromAxisAngle: fromAxisAngle,\n fromEuler: fromEuler,\n fromJson: fromJson$3,\n fromMatrixRotation: fromMatrixRotation,\n isType: isType,\n magnitude: magnitude$1,\n multiply: multiply$1,\n normalize: normalize$1,\n scale: scale$3\n});\n\nfunction create$a(...args) {\n var _a, _b, _c, _d, _e, _f;\n if (args.length === 1) {\n return {\n x: (_a = args[0].x) !== null && _a !== void 0 ? _a : 0,\n y: (_b = args[0].y) !== null && _b !== void 0 ? _b : 0,\n z: (_c = args[0].z) !== null && _c !== void 0 ? _c : 0,\n };\n }\n else if (args.length === 3) {\n return {\n x: (_d = args[0]) !== null && _d !== void 0 ? _d : 0,\n y: (_e = args[1]) !== null && _e !== void 0 ? _e : 0,\n z: (_f = args[2]) !== null && _f !== void 0 ? _f : 0,\n };\n }\n return {\n x: 0,\n y: 0,\n z: 0,\n };\n}\n/* eslint-enable @typescript-eslint/no-explicit-any */\n/**\n * Checks if each component of the given vector is populated with a numeric\n * component. A component is invalid if it contains a non-finite or NaN value.\n */\nfunction isValid$1({ x, y, z }) {\n return [x, y, z].every((v) => Number.isFinite(v) && !Number.isNaN(v));\n}\n/**\n * Checks if every component of the given vector is zero.\n * Useful for detecting potentially problematic camera vectors, for example.\n */\nfunction isZeroVector({ x, y, z }) {\n return [x, y, z].every((v) => v === 0);\n}\n/**\n * Returns a vector representing the scale elements of `matrix`.\n */\nfunction fromMatrixScale(matrix) {\n const m = toObjectRowMajor(matrix);\n return {\n x: Math.hypot(m.m11, m.m12, m.m13),\n y: Math.hypot(m.m21, m.m22, m.m23),\n z: Math.hypot(m.m31, m.m32, m.m33),\n };\n}\n/**\n * Returns a vector representing the position elements of `matrix`.\n */\nfunction fromMatrixPosition(matrix) {\n const m = toObjectRowMajor(matrix);\n return { x: m.m41, y: m.m42, z: m.m43 };\n}\n/**\n * Parses a JSON string representation of a Vector3 and returns an object.\n *\n * @param json A JSON string, either in the form `[x,y,z]` or `{\"x\": 0, \"y\": 0, \"z\": 0}`\n * @returns A parsed Vector3.\n */\nfunction fromJson$2(json) {\n const obj = JSON.parse(json);\n if (Array.isArray(obj)) {\n const [x, y, z] = obj;\n return create$a(x, y, z);\n }\n else {\n const { x, y, z } = obj;\n return create$a(x, y, z);\n }\n}\n/**\n * Creates a `Vector3` from an array. Pass `offset` to read values from the\n * starting index.\n *\n * @see #toArray()\n * @see #create()\n */\nfunction fromArray(nums, offset = 0) {\n const x = nums[offset];\n const y = nums[offset + 1];\n const z = nums[offset + 2];\n return create$a(x, y, z);\n}\n/**\n * Converts a Vector3 to an array where the values of the vector will be\n * represented as [x, y, z];\n *\n * @see #fromArray()\n * @see #create()\n */\nfunction toArray({ x, y, z }) {\n return [x, y, z];\n}\n/**\n * Returns a directional vector on the positive x axis, Vector3(1, 0, 0).\n */\nfunction right() {\n return create$a(1, 0, 0);\n}\n/**\n * Returns a directional vector on the positive y axis, Vector3(0, 1, 0).\n */\nfunction up() {\n return create$a(0, 1, 0);\n}\n/**\n * Returns a directional vector on the positive z axis, Vector3(0, 0, -1).\n */\nfunction forward() {\n return create$a(0, 0, -1);\n}\n/**\n * Returns a directional vector on the negative x axis, Vector3(-1, 0, 0).\n */\nfunction left() {\n return create$a(-1, 0, 0);\n}\n/**\n * Returns a directional vector on the negative y axis, Vector3(0, -1, 0).\n */\nfunction down() {\n return create$a(0, -1, 0);\n}\n/**\n * Returns a directional vector on the negative z axis, Vector3(0, 0, 1).\n */\nfunction back() {\n return create$a(0, 0, 1);\n}\n/**\n * Returns a vector at the origin, Vector3(0, 0, 0).\n */\nfunction origin() {\n return create$a(0, 0, 0);\n}\n/**\n * Returns a vector with that will have a magnitude of 1.\n */\nfunction normalize(vector) {\n const length = magnitude(vector);\n return { x: vector.x / length, y: vector.y / length, z: vector.z / length };\n}\n/**\n * Returns the straight-line length from (0, 0, 0) to the given vector.\n */\nfunction magnitude(vector) {\n return Math.sqrt(magnitudeSquared(vector));\n}\n/**\n * Returns the straight-line length from (0, 0, 0) to the given vector).\n *\n * When comparing lengths of vectors, you should use this function as it's\n * slightly more efficient to calculate.\n */\nfunction magnitudeSquared(vector) {\n return vector.x * vector.x + vector.y * vector.y + vector.z * vector.z;\n}\n/**\n * Returns a vector that is the cross product of two vectors.\n *\n * The cross product of two vectors results in a third vector which is\n * perpendicular to the two input vectors. The result's magnitude is equal to\n * the magnitudes of the two inputs multiplied together and then multiplied by\n * the sine of the angle between the inputs. You can determine the direction of\n * the result vector using the \"left hand rule\".\n */\nfunction cross(a, b) {\n return {\n x: a.y * b.z - a.z * b.y,\n y: a.z * b.x - a.x * b.z,\n z: a.x * b.y - a.y * b.x,\n };\n}\n/**\n * Returns a vector that is the sum of two vectors.\n */\nfunction add(a, ...vectors) {\n return vectors.reduce((res, next) => {\n return { x: res.x + next.x, y: res.y + next.y, z: res.z + next.z };\n }, a);\n}\n/**\n * Returns a vector that is the difference between two vectors.\n */\nfunction subtract(a, ...vectors) {\n return vectors.reduce((res, next) => {\n return { x: res.x - next.x, y: res.y - next.y, z: res.z - next.z };\n }, a);\n}\n/**\n * Returns a vector that where each component of `b` is multiplied with `a`.\n */\nfunction multiply(a, b) {\n return { x: a.x * b.x, y: a.y * b.y, z: a.z * b.z };\n}\n/**\n * Returns a vector where each value of a vector is multiplied by the `scalar`.\n */\nfunction scale$2(scalar, vector) {\n return { x: vector.x * scalar, y: vector.y * scalar, z: vector.z * scalar };\n}\n/**\n * Returns a value representing the dot product of two vectors.\n *\n * The dot product is a float value equal to the magnitudes of the two vectors\n * multiplied together and then multiplied by the cosine of the angle between\n * them.\n */\nfunction dot$1(a, b) {\n return a.x * b.x + a.y * b.y + a.z * b.z;\n}\n/**\n * Returns the angle, in radians, between two vectors.\n *\n * The angle returned is the unsigned angle between the two vectors. This means\n * the smaller of the two possible angles between the two vectors is used. The\n * result is never greater than 180 degrees.\n */\nfunction angleTo(a, b) {\n const theta = dot$1(a, b) / (magnitude(a) * magnitude(b));\n // Clamp to avoid numerical problems.\n return Math.acos(theta);\n}\n/**\n * Returns the Euler angle, in radians with the `xyz` ordering, between two vectors.\n *\n * This method will normalize both vectors for the calculation, and uses the\n * algorithm described in https://www.xarg.org/proof/quaternion-from-two-vectors/.\n */\nfunction eulerTo(a, b) {\n const normalizedA = normalize(a);\n const normalizedB = normalize(b);\n const dotDelta = Math.cos(toRadians(1));\n const dotAB = dot$1(normalizedA, normalizedB);\n const vectorsAreParallel = Math.abs(dotAB) > dotDelta;\n if (vectorsAreParallel) {\n return dotAB > 1 - 1e-6 ? create$c() : create$c({ x: Math.PI });\n }\n const normalizedQ = normalize$1(create$b({\n w: 1 + dotAB,\n ...cross(normalizedA, normalizedB),\n }));\n return fromRotationMatrix(makeRotation(normalizedQ), 'xyz', false);\n}\n/**\n * Performs a projection of a `vector` onto `onNormal`.\n *\n * A projection is represented as the nearest point along a normal to a vector,\n * which constructs a triangle from the origin, to the vector, to the projected\n * point.\n *\n * ```\n * Vector --> * * <-- Projected\n * \\\n * \\ | <-- Normal\n * \\|\n * * <-- Origin\n * ```\n */\nfunction project(vector, onNormal) {\n return scale$2(dot$1(onNormal, vector) / magnitude(onNormal), onNormal);\n}\n/**\n * Returns a vector that is rotated about an origin point.\n *\n * @param angle The angle to rotate, in radians.\n * @param point The origin point to rotate around.\n * @param axisDirection The direction used to compute the axis.\n * @param axisPosition The point of the axis.\n */\nfunction rotateAboutAxis(angle, point, axisDirection, axisPosition) {\n if (angle !== 0) {\n const { x, y, z } = point;\n const { x: a, y: b, z: c } = axisPosition;\n const { x: u, y: v, z: w } = axisDirection;\n const newX = (a * (v * v + w * w) - u * (b * v + c * w - u * x - v * y - w * z)) *\n (1 - Math.cos(angle)) +\n x * Math.cos(angle) +\n (-c * v + b * w - w * y + v * z) * Math.sin(angle);\n const newY = (b * (u * u + w * w) - v * (a * u + c * w - u * x - v * y - w * z)) *\n (1 - Math.cos(angle)) +\n y * Math.cos(angle) +\n (c * u - a * w + w * x - u * z) * Math.sin(angle);\n const newZ = (c * (u * u + v * v) - w * (a * u + b * v - u * x - v * y - w * z)) *\n (1 - Math.cos(angle)) +\n z * Math.cos(angle) +\n (-b * u + a * v - v * x + u * y) * Math.sin(angle);\n return { x: newX, y: newY, z: newZ };\n }\n else {\n return point;\n }\n}\n/**\n * Returns a vector that is multiplied with a matrix in column-major form.\n * @param vector A Vector3 item.\n * @param m A Matrix4 item written in column-major form.\n *\n * @deprecated Use {@link multiplyByTransformMatrixColumnMajor} or {@link multiplyByTransformMatrixRowMajor} instead.\n */\nfunction transformMatrix$1(vector, m) {\n return multiplyByTransformMatrixColumnMajor(vector, m);\n}\n/**\n * Returns a vector that is multiplied with a matrix in column-major form.\n * @param vector A Vector3 item.\n * @param m A Matrix4 item written in column-major form.\n */\nfunction multiplyByTransformMatrixColumnMajor(vector, m) {\n const { x, y, z } = vector;\n const w = 1 / (m[3] * x + m[7] * y + m[11] * z + m[15]);\n return {\n x: (m[0] * x + m[4] * y + m[8] * z + m[12]) * w,\n y: (m[1] * x + m[5] * y + m[9] * z + m[13]) * w,\n z: (m[2] * x + m[6] * y + m[10] * z + m[14]) * w,\n };\n}\n/**\n * Returns a vector that is multiplied with a matrix in row-major form.\n * @param vector A Vector3 item.\n * @param m A Matrix4 item written in row-major form.\n */\nfunction multiplyByTransformMatrixRowMajor(vector, m) {\n const { x, y, z } = vector;\n const w = 1 / (m[12] * x + m[13] * y + m[14] * z + m[15]);\n return {\n x: (m[0] * x + m[1] * y + m[2] * z + m[3]) * w,\n y: (m[4] * x + m[5] * y + m[6] * z + m[7]) * w,\n z: (m[8] * x + m[9] * y + m[10] * z + m[11]) * w,\n };\n}\n/**\n * Euclidean distance between two vectors\n */\nfunction distance$1(a, b) {\n return Math.sqrt(distanceSquared$1(a, b));\n}\n/**\n * Returns the squared distance between two vectors. If you're just comparing\n * distances, this is slightly more efficient than `distanceTo`.\n */\nfunction distanceSquared$1(a, b) {\n const { x: dx, y: dy, z: dz } = subtract(a, b);\n return dx * dx + dy * dy + dz * dz;\n}\n/**\n * Returns `true` if two vectors have the same values.\n */\nfunction isEqual$2(a, b) {\n return a.x === b.x && a.y === b.y && a.z === b.z;\n}\n/**\n * Returns a vector that contains the largest components of `a` and `b`.\n */\nfunction max(a, b) {\n return create$a(Math.max(a.x, b.x), Math.max(a.y, b.y), Math.max(a.z, b.z));\n}\n/**\n * Returns a vector that contains the smallest components of `a` and `b`.\n */\nfunction min(a, b) {\n return create$a(Math.min(a.x, b.x), Math.min(a.y, b.y), Math.min(a.z, b.z));\n}\n/**\n * Returns a vector that each of its component negated.\n */\nfunction negate(vector) {\n return { x: -vector.x, y: -vector.y, z: -vector.z };\n}\n/**\n * Performs a linear interpolation between `a` and `b` and returns the result.\n * The value of `t` is clamped between `[0, 1]`.\n *\n * @param a The start value.\n * @param b The end value.\n * @param t A value between 0 and 1.\n * @returns A point between `a` and `b`.\n */\nfunction lerp(a, b, t) {\n return {\n x: lerp$2(a.x, b.x, t),\n y: lerp$2(a.y, b.y, t),\n z: lerp$2(a.z, b.z, t),\n };\n}\n/**\n * Maps a normalized device coordinate (NDC) space to world space coordinates.\n *\n * @param ndc A point in normalized device coordinates.\n * @param worldMatrix A camera's world matrix.\n * @param projectionMatrixInverse A camera's inverse projection matrix.\n * @returns A point in world space coordinates.\n */\nfunction transformNdcToWorldSpace(ndc, worldMatrix, projectionMatrixInverse) {\n return multiplyByTransformMatrixColumnMajor(multiplyByTransformMatrixColumnMajor(ndc, projectionMatrixInverse), worldMatrix);\n}\n\nvar vector3 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n add: add,\n angleTo: angleTo,\n back: back,\n create: create$a,\n cross: cross,\n distance: distance$1,\n distanceSquared: distanceSquared$1,\n dot: dot$1,\n down: down,\n eulerTo: eulerTo,\n forward: forward,\n fromArray: fromArray,\n fromJson: fromJson$2,\n fromMatrixPosition: fromMatrixPosition,\n fromMatrixScale: fromMatrixScale,\n isEqual: isEqual$2,\n isValid: isValid$1,\n isZeroVector: isZeroVector,\n left: left,\n lerp: lerp,\n magnitude: magnitude,\n magnitudeSquared: magnitudeSquared,\n max: max,\n min: min,\n multiply: multiply,\n multiplyByTransformMatrixColumnMajor: multiplyByTransformMatrixColumnMajor,\n multiplyByTransformMatrixRowMajor: multiplyByTransformMatrixRowMajor,\n negate: negate,\n normalize: normalize,\n origin: origin,\n project: project,\n right: right,\n rotateAboutAxis: rotateAboutAxis,\n scale: scale$2,\n subtract: subtract,\n toArray: toArray,\n transformMatrix: transformMatrix$1,\n transformNdcToWorldSpace: transformNdcToWorldSpace,\n up: up\n});\n\n/**\n * Returns a `BoundingBox` with the given min and max points.\n */\nconst create$9 = (min, max) => {\n return { min, max };\n};\n/**\n * Construct a minimal bounding box for a set of vectors, such that all vectors\n * are contained by the bounding box.\n */\nconst fromVectors = (vectors) => {\n return union(...vectors.map((v) => create$9(v, v)));\n};\n/**\n * Returns the center point of the given `BoundingBox`.\n */\nconst center$3 = (boundingBox) => {\n return scale$2(0.5, add(boundingBox.min, boundingBox.max));\n};\n/**\n * Returns the diagonal vector between the `min` and `max` vectors of the\n * given `BoundingBox`.\n */\nconst diagonal = (boundingBox) => {\n return subtract(boundingBox.max, boundingBox.min);\n};\n/**\n * Returns a floating-point spatial error tolerance based on the extents of the box.\n */\nconst epsilon = (boundingBox) => {\n return (Math.max(Math.max(magnitude(boundingBox.max), magnitude(boundingBox.min)), magnitude(diagonal(boundingBox))) * 1e-6);\n};\nfunction union(box, ...rest) {\n return rest.reduce((a, b) => {\n return create$9(min(a.min, b.min), max(a.max, b.max));\n }, box);\n}\n/**\n * Returns the distance between the min and max for the provided\n * bounding box for each axis.\n */\nconst lengths = (box) => {\n return create$a(box.max.x - box.min.x, box.max.y - box.min.y, box.max.z - box.min.z);\n};\n/**\n * Checks if each component of the given bounding box is populated with a numeric\n * component. A component is invalid if it contains a non-finite or NaN value.\n */\nfunction isValid(boundingBox) {\n const maxIsValid = isValid$1(boundingBox.max);\n const minIsValid = isValid$1(boundingBox.min);\n return maxIsValid && minIsValid;\n}\n\nvar boundingBox = /*#__PURE__*/Object.freeze({\n __proto__: null,\n center: center$3,\n create: create$9,\n diagonal: diagonal,\n epsilon: epsilon,\n fromVectors: fromVectors,\n isValid: isValid,\n lengths: lengths,\n union: union\n});\n\n/**\n * Returns a `BoundingSphere` that encompasses the provided `BoundingBox`.\n */\nconst create$8 = (boundingBox$1) => {\n const boundingBoxCenter = center$3(boundingBox$1);\n const centerToBoundingPlane = subtract(boundingBox$1.max, boundingBoxCenter);\n const radius = magnitude(centerToBoundingPlane);\n const length = Math.max(radius, magnitude(boundingBoxCenter));\n const epsilon = length === 0 ? 1.0 : length * 1e-6;\n return { center: boundingBoxCenter, radius, epsilon };\n};\n\nvar boundingSphere = /*#__PURE__*/Object.freeze({\n __proto__: null,\n create: create$8\n});\n\n/**\n * Returns a new `Rectangle` with the given position and size.\n */\nfunction create$7(x, y, width, height) {\n return { x, y, width, height };\n}\n/**\n * Returns a new `Rectangle` at the origin point and given size.\n */\nfunction fromDimensions(dimensions) {\n return create$7(0, 0, dimensions.width, dimensions.height);\n}\n/**\n * Returns a new `Rectangle` with the given position and size.\n */\nfunction fromPointAndDimensions(point, dimensions) {\n return create$7(point.x, point.y, dimensions.width, dimensions.height);\n}\n/**\n * Returns a new `Rectangle` with the given top-left and bottom-right positions.\n * The returned rectangle will always returns a positive width and height.\n */\nfunction fromPoints(topLeftPt, bottomRightPt) {\n const minX = Math.min(topLeftPt.x, bottomRightPt.x);\n const minY = Math.min(topLeftPt.y, bottomRightPt.y);\n const maxX = Math.max(topLeftPt.x, bottomRightPt.x);\n const maxY = Math.max(topLeftPt.y, bottomRightPt.y);\n return create$7(minX, minY, maxX - minX, maxY - minY);\n}\n/**\n * Returns a rectangle where the longest length of `rect` will be equal to the\n * shortest length of `to`. The shortest length of `rect` will be proportionally\n * scaled to match the aspect ratio of `rect`. The returned rectangle will be\n * centered within `to`.\n *\n * @see {@link cropFit}\n */\nfunction containFit$1(to, rect) {\n const scale = Math.min(to.width / rect.width, to.height / rect.height);\n const dimensions$1 = proportionalScale(scale, rect);\n const position = subtract$1(center$2(to), center$1(dimensions$1));\n return fromPointAndDimensions(position, dimensions$1);\n}\n/**\n * Returns a rectangle where the shortest length of `rect` will be equal to the\n * longest length of `to`. The longest length of `rect` will be proportionally\n * scaled to match the aspect ratio of `rect`. The returned rectangle will be\n * centered within `to`.\n *\n * @see {@link containFit}\n */\nfunction cropFit$1(to, rect) {\n const scale = Math.max(to.width / rect.width, to.height / rect.height);\n const dimensions$1 = proportionalScale(scale, rect);\n const position = subtract$1(center$2(to), center$1(dimensions$1));\n return fromPointAndDimensions(position, dimensions$1);\n}\n/**\n * Returns a rectangle where each side of `rect` will be reduced proportionally\n * to have an area less than or equal to the provided `to` value. The returned\n * rectangle will be centered within the original bounds of `rect`.\n *\n * @param to - the maximum area this rectangle can have\n * @param rect - the rectangle to scale to fit the specified area\n */\nfunction scaleFit$1(to, rect) {\n const scale = Math.min(Math.sqrt(to / area$1(rect)), 1);\n const dimensions$1 = floor(proportionalScale(scale, rect));\n const position = subtract$1(center$2(rect), center$1(dimensions$1));\n return fromPointAndDimensions(position, dimensions$1);\n}\n/**\n * Returns a rectangle where the position and dimensions are scaled by the given\n * factors. If `scaleY` is omitted, then the position and dimensions are scaled\n * uniformly by `scaleOrScaleX`.\n *\n * @param rect The rectangle to scale.\n * @param scaleOrScaleX The uniform scale factor, or the horizontal scale\n * factor.\n * @param scaleY The vertical scale factor.\n * @returns A scaled rectangle.\n */\nfunction scale$1(rect, scaleOrScaleX, scaleY) {\n if (scaleY == null) {\n return scale$1(rect, scaleOrScaleX, scaleOrScaleX);\n }\n else {\n const { x, y, width, height } = rect;\n const scaleX = scaleOrScaleX;\n return create$7(x * scaleX, y * scaleY, width * scaleX, height * scaleY);\n }\n}\n/**\n * Returns true if two rectangles are equal in position and size.\n */\nfunction isEqual$1(a, b) {\n return isEqual$3(a, b) && isEqual(a, b);\n}\n/**\n * Returns a rectangle that has its position shifted by a given offset. The\n * size of the rectangle is unchanged.\n */\nfunction offset(delta, rect) {\n return fromPointAndDimensions(add$1(topLeft(rect), delta), rect);\n}\n/**\n * Returns the area of the rectangle.\n */\nfunction area$1(rect) {\n return rect.width * rect.height;\n}\n/**\n * Returns the center point of the rectangle.\n */\nfunction center$2(rect) {\n return { x: rect.x + rect.width / 2, y: rect.y + rect.height / 2 };\n}\n/**\n * Returns the top-left position of the rectangle, as a point.\n */\nfunction topLeft(rect) {\n return create$d(rect.x, rect.y);\n}\n/**\n * Returns the bottom-right position of the rectangle, as a point.\n */\nfunction bottomRight(rect) {\n return create$d(rect.x + rect.width, rect.y + rect.height);\n}\n/**\n * Returns `true` if the given rectangle has a portrait aspect ratio.\n */\nfunction isPortrait(rect) {\n return rect.width < rect.height;\n}\n/**\n * Returns `true` if the given rectangle has a landscape aspect ratio.\n */\nfunction isLandscape(rect) {\n return rect.width > rect.height;\n}\n/**\n * Returns `true` if the given rectangle has a square aspect ratio.\n */\nfunction isSquare(rect) {\n return rect.width === rect.height;\n}\n/**\n * Pads a rectangle by the given amount, maintaining the center position.\n *\n * @param rect The rectangle to apply padding to.\n * @param padding The padding to add.\n */\nfunction pad(rect, padding) {\n return create$7(rect.x - padding, rect.y - padding, rect.width + padding * 2, rect.height + padding * 2);\n}\n/**\n * Returns `true` if the given rectangle contains all the given `points`.\n *\n * @param rect The rectangle to check against.\n * @param points The points to check.\n */\nfunction containsPoints(rect, ...points) {\n return points.every((point) => {\n return (rect.x <= point.x &&\n rect.x + rect.width >= point.x &&\n rect.y <= point.y &&\n rect.y + rect.height >= point.y);\n });\n}\n/**\n * Parses a JSON string representation of a Rectangle and returns an object.\n *\n * @param json A JSON string, either in the form `[x,y,width,height]` or `{\"x\": 0, \"y\": 0, \"width\": 10, \"height\": 10}`\n * @returns A parsed Point.\n */\nfunction fromJson$1(json) {\n const obj = JSON.parse(json);\n if (Array.isArray(obj)) {\n const [x, y, width, height] = obj;\n return create$7(x, y, width, height);\n }\n else {\n const { x, y, width, height } = obj;\n return create$7(x, y, width, height);\n }\n}\n\nvar rectangle = /*#__PURE__*/Object.freeze({\n __proto__: null,\n area: area$1,\n bottomRight: bottomRight,\n center: center$2,\n containFit: containFit$1,\n containsPoints: containsPoints,\n create: create$7,\n cropFit: cropFit$1,\n fromDimensions: fromDimensions,\n fromJson: fromJson$1,\n fromPointAndDimensions: fromPointAndDimensions,\n fromPoints: fromPoints,\n isEqual: isEqual$1,\n isLandscape: isLandscape,\n isPortrait: isPortrait,\n isSquare: isSquare,\n offset: offset,\n pad: pad,\n scale: scale$1,\n scaleFit: scaleFit$1,\n topLeft: topLeft\n});\n\n/**\n * Returns a `Dimensions` with the given width and height.\n *\n */\nconst create$6 = (width, height) => {\n return { width, height };\n};\n/**\n * Returns a `Dimensions` with the same width and height.\n */\nconst square = (size) => {\n return create$6(size, size);\n};\n/**\n * Returns `true` if two dimensions have the same width and height. Otherwise\n * `false`.\n */\nconst isEqual = (a, b) => {\n return a.width === b.width && a.height === b.height;\n};\n/**\n * Returns a scaled dimensions, where the width is scaled by `scaleX` and height\n * is scaled by `scaleY`.\n */\nconst scale = (scaleX, scaleY, dimensions) => {\n return {\n width: dimensions.width * scaleX,\n height: dimensions.height * scaleY,\n };\n};\n/**\n * Returns a dimension where each length is scaled by `scaleFactor`.\n */\nconst proportionalScale = (scaleFactor, dimensions) => {\n return scale(scaleFactor, scaleFactor, dimensions);\n};\n/**\n * Returns a `Dimensions` where the lengths of `dimensions` are trimmed to fit\n * into `to`.\n */\nconst trim = (to, dimensions) => {\n return {\n width: Math.min(to.width, dimensions.width),\n height: Math.min(to.height, dimensions.height),\n };\n};\n/**\n * Returns a `Dimensions` where the longest length of `dimensions` will be equal\n * to the shortest length of `to`. The shortest length of `dimensions` will be\n * proportionally scaled to match the aspect ratio of `dimensions`.\n *\n * @see #cropFit()\n */\nconst containFit = (to, dimensions) => {\n const { width, height } = containFit$1(toRectangle(to), toRectangle(dimensions));\n return { width, height };\n};\n/**\n * Returns a `Dimensions` where the shortest length of `dimensions` will be\n * equal to the longest length of `to`. The longest length of `dimensions` will\n * be proportionally scaled to match the aspect ratio of `dimensions`.\n *\n * @see #containFit()\n */\nconst cropFit = (to, dimensions) => {\n const { width, height } = cropFit$1(toRectangle(to), toRectangle(dimensions));\n return { width, height };\n};\n/**\n * Returns a `Dimensions` where each side of `dimensions` will be reduced proportionally\n * to have an area less than or equal to the provided `to` value. The returned\n * dimensions will be centered within the original bounds of `dimensions`.\n *\n * @param to - the maximum area this dimensions can have\n * @param dimensions - the dimensions to scale to fit the specified area\n */\nconst scaleFit = (to, dimensions) => {\n const { width, height } = scaleFit$1(to, toRectangle(dimensions));\n return { width, height };\n};\n/**\n * Returns a `Dimensions` with each length rounded.\n */\nconst round = (dimensions) => {\n return {\n width: Math.round(dimensions.width),\n height: Math.round(dimensions.height),\n };\n};\n/**\n * Returns a `Dimensions` with each length rounded down.\n */\nconst floor = (dimensions) => {\n return {\n width: Math.floor(dimensions.width),\n height: Math.floor(dimensions.height),\n };\n};\n/**\n * Returns the center point of the given `dimensions`.\n */\nconst center$1 = (dimensions) => {\n return { x: dimensions.width / 2, y: dimensions.height / 2 };\n};\n/**\n * Returns the aspect ratio of the given `dimensions`, as defined by width over\n * height.\n */\nconst aspectRatio = ({ width, height }) => {\n return width / height;\n};\n/**\n * Returns the area of the given `dimensions`.\n */\nconst area = ({ width, height }) => {\n return width * height;\n};\n/**\n * Returns a `Dimensions` fitted to the provided aspect ratio.\n *\n * @param ratio - Aspect ratio to fit the provided Dimensions to\n * @param dimensions - Dimensions to fit to the specified ratio\n */\nconst fitToRatio = (ratio, dimensions) => {\n if (dimensions.width >= dimensions.height * ratio) {\n return create$6(dimensions.height * ratio, dimensions.height);\n }\n return create$6(dimensions.width, dimensions.width / ratio);\n};\n/**\n * Converts a dimension to a rectangle, with an optional position.\n */\nfunction toRectangle(dimensions, position = create$d()) {\n return fromPointAndDimensions(position, dimensions);\n}\n\nvar dimensions = /*#__PURE__*/Object.freeze({\n __proto__: null,\n area: area,\n aspectRatio: aspectRatio,\n center: center$1,\n containFit: containFit,\n create: create$6,\n cropFit: cropFit,\n fitToRatio: fitToRatio,\n floor: floor,\n isEqual: isEqual,\n proportionalScale: proportionalScale,\n round: round,\n scale: scale,\n scaleFit: scaleFit,\n square: square,\n toRectangle: toRectangle,\n trim: trim\n});\n\n/**\n * Creates a new `Line3`. If unspecified, the start and end values of the line\n * will be at origin.\n *\n * @param values The values to assign to the line.\n */\nfunction create$5(values = {}) {\n var _a, _b;\n return {\n start: (_a = values.start) !== null && _a !== void 0 ? _a : origin(),\n end: (_b = values.end) !== null && _b !== void 0 ? _b : origin(),\n };\n}\n/**\n * Returns the point that is halfway between start and end.\n */\nfunction center(line) {\n return lerp(line.start, line.end, 0.5);\n}\n/**\n * Returns a line where the start and end points are transformed with the given\n * matrix.\n *\n * @param line The line to transform.\n * @param matrix The matrix to apply.\n * @returns A transformed line.\n */\nfunction transformMatrix(line, matrix) {\n const start = multiplyByTransformMatrixColumnMajor(line.start, matrix);\n const end = multiplyByTransformMatrixColumnMajor(line.end, matrix);\n return { start, end };\n}\n/**\n * Euclidean distance between the start and end points of the line.\n */\nfunction distance(line) {\n return distance$1(line.start, line.end);\n}\n/**\n * Returns the squared distance between a line's start and end point. If you're\n * just comparing distances, this is slightly more efficient than `distanceTo`.\n */\nfunction distanceSquared(line) {\n return distanceSquared$1(line.start, line.end);\n}\n/**\n * Returns a vector describing the direction of the line from start to end.\n */\nfunction direction(line) {\n return subtract(line.end, line.start);\n}\n\nvar line3 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n center: center,\n create: create$5,\n direction: direction,\n distance: distance,\n distanceSquared: distanceSquared,\n transformMatrix: transformMatrix\n});\n\n/**\n * Creates a new matrix. If arguments are undefined, returns an identity matrix.\n */\nconst create$4 = (a = 1, b = 0, c = 0, d = 1, tx = 0, ty = 0) => {\n return { a, b, c, d, tx, ty };\n};\n/**\n * Returns an identity matrix.\n */\nconst identity = () => {\n return create$4();\n};\n/**\n * Creates a matrix that is translated by the given `tx` and `ty` values.\n */\nconst translation = (tx, ty) => {\n return translate(tx, ty, identity());\n};\n/**\n * Creates a matrix that is rotated by the given degrees.\n */\nconst rotation = (degrees) => {\n return rotate(degrees, identity());\n};\n/**\n * Rotates the given matrix by the given degrees.\n */\nconst rotate = (degrees, matrix) => {\n const radians = toRadians(degrees);\n const cos = Math.cos(radians);\n const sin = Math.sin(radians);\n const a = matrix.a * cos + matrix.c * sin;\n const b = matrix.b * cos + matrix.d * sin;\n const c = matrix.a * -sin + matrix.c * cos;\n const d = matrix.b * -sin + matrix.d * cos;\n return create$4(a, b, c, d, matrix.tx, matrix.ty);\n};\n/**\n * Translates the given matrix along the horizontal and vertical axis by the\n * given `dx` and `dy` delta values.\n */\nconst translate = (dx, dy, matrix) => {\n const newTx = matrix.a * dx + matrix.c * dy + matrix.tx;\n const newTy = matrix.b * dx + matrix.d * dy + matrix.ty;\n return create$4(matrix.a, matrix.b, matrix.c, matrix.d, newTx, newTy);\n};\n/**\n * Returns the result of applying a geometric transformation of a matrix on the\n * given point.\n */\nconst transformPoint = (matrix, pt) => {\n const x = matrix.a * pt.x + matrix.c * pt.y + matrix.tx;\n const y = matrix.b * pt.x + matrix.d * pt.y + matrix.ty;\n return create$d(x, y);\n};\n\nvar matrix = /*#__PURE__*/Object.freeze({\n __proto__: null,\n create: create$4,\n identity: identity,\n rotate: rotate,\n rotation: rotation,\n transformPoint: transformPoint,\n translate: translate,\n translation: translation\n});\n\nfunction create$3(...args) {\n if (args.length === 2) {\n return {\n a: args[0].x,\n b: args[0].y,\n c: args[1].x,\n d: args[1].y,\n };\n }\n else if (args.length === 4) {\n return {\n a: args[0],\n b: args[1],\n c: args[2],\n d: args[3],\n };\n }\n return {\n a: 0,\n b: 0,\n c: 0,\n d: 0,\n };\n}\n/**\n * Returns the determinant of the provided matrix.\n */\nfunction determinant(matrix) {\n return matrix.a * matrix.d - matrix.b * matrix.c;\n}\n/**\n * Returns the dot product of the two vectors represented in this matrix.\n */\nfunction dot(matrix) {\n return matrix.a * matrix.c + matrix.b * matrix.d;\n}\n\nvar matrix2 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n create: create$3,\n determinant: determinant,\n dot: dot\n});\n\n/**\n * Creates a new plane. Defaults to a normal of `[0,0,0]` and constant of `0`.\n *\n * @param values Values to assign to the plane.\n * @returns A new plane.\n */\nfunction create$2(values = {}) {\n return { normal: origin(), constant: 0, ...values };\n}\n/**\n * Creates a plane from a normal and an arbitrary point on a plane.\n *\n * @param normal A normal.\n * @param point A point on the plane.\n * @returns A new plane.\n */\nfunction fromNormalAndCoplanarPoint(normal, point) {\n const constant = -dot$1(point, normal);\n return create$2({ normal, constant });\n}\n/**\n * Returns the perpendicular distance from the plane to the given point.\n *\n * @param plane The plane.\n * @param point The point to calculate distance from `plane`.\n * @returns A distance.\n */\nfunction distanceToPoint(plane, point) {\n return dot$1(plane.normal, point) + plane.constant;\n}\n/**\n * Returns the point where the line intersects with this plane. If the line does\n * not intersect, then `undefined` is returned. If the line is on the plane,\n * then the starting point of the line is returned.\n *\n * @param plane The plane to intersect.\n * @param line The line to intersect.\n * @returns An intersecting point on the plane and line.\n */\nfunction intersectLine(plane, line) {\n const direction$1 = direction(line);\n const denominator = dot$1(plane.normal, direction$1);\n if (denominator === 0) {\n if (distanceToPoint(plane, line.start) === 0) {\n return line.start;\n }\n else {\n return undefined;\n }\n }\n const t = -(dot$1(line.start, plane.normal) + plane.constant) / denominator;\n if (t < 0 || t > 1) {\n return undefined;\n }\n else {\n return add(scale$2(t, direction$1), line.start);\n }\n}\n/**\n * Projects the given `point` onto the given `plane`.\n *\n * @param plane The plane to project onto.\n * @param point The point to project.\n * @returns The projected point.\n */\nfunction projectPoint(plane, point) {\n const d = distanceToPoint(plane, point);\n return add(point, scale$2(-d, plane.normal));\n}\n\nvar plane = /*#__PURE__*/Object.freeze({\n __proto__: null,\n create: create$2,\n distanceToPoint: distanceToPoint,\n fromNormalAndCoplanarPoint: fromNormalAndCoplanarPoint,\n intersectLine: intersectLine,\n projectPoint: projectPoint\n});\n\n/**\n * Creates a new ray with the given values, or using default values if none are\n * provided. The direction defaults to `{x: 0, y: 0, z: -1}` if undefined.\n *\n * @param value The values of the ray.\n * @returns A new ray.\n */\nfunction create$1(value = {}) {\n var _a, _b;\n return {\n origin: (_a = value.origin) !== null && _a !== void 0 ? _a : origin(),\n direction: (_b = value.direction) !== null && _b !== void 0 ? _b : forward(),\n };\n}\n/**\n * Returns a point at the given distance along this ray.\n *\n * @param ray The ray to get the point on.\n * @param distance A distance from origin along the ray's direction.\n * @returns A point on the ray.\n */\nfunction at(ray, distance) {\n return add(scale$2(distance, ray.direction), ray.origin);\n}\n/**\n * Computes the distance of the `ray`s origin to the given `plane`. Returns a\n * distance of 0 if the ray is coplanar and returns `undefined` if the ray does\n * not intersect with the plane.\n *\n * @param ray The ray to get the distance for.\n * @param plane The plane to compute the distance to.\n * @returns The distance to the plane, or `undefined` if it cannot be computed.\n */\nfunction distanceToPlane(ray, plane$1) {\n const d = dot$1(plane$1.normal, ray.direction);\n if (d === 0) {\n // Ray is on plane.\n return distanceToPoint(plane$1, ray.origin) === 0 ? 0 : undefined;\n }\n else {\n const t = -(dot$1(ray.origin, plane$1.normal) + plane$1.constant) / d;\n // Checks if ray intersects plane.\n return t >= 0 ? t : undefined;\n }\n}\n/**\n * Computes the intersection point of the given `ray` to the given `plane`. If\n * the ray does not intersect with the plane, then `undefined` is returned.\n *\n * @param ray The ray to intersect.\n * @param plane The plane to intersect with.\n * @returns The intersection point, or `undefined` if the ray does not\n * intersect.\n */\nfunction intersectPlane(ray, plane) {\n const t = distanceToPlane(ray, plane);\n return t != null ? at(ray, t) : undefined;\n}\n\nvar ray = /*#__PURE__*/Object.freeze({\n __proto__: null,\n at: at,\n create: create$1,\n distanceToPlane: distanceToPlane,\n intersectPlane: intersectPlane\n});\n\n/**\n * Returns a new Vector4. If `value` is undefined, then `{x: 0, y: 0, z: 0,\n * w: 0}` is returned.\n */\nfunction create(value = {}) {\n return { x: 0, y: 0, z: 0, w: 0, ...value };\n}\n/**\n * Parses a JSON string representation of a `Vector4`.\n *\n * @param json A JSON string either in the form of `[x, y, z, w]` or `{\"x\": 0, \"y\": 0, \"z\": 0, \"w\": 0}`.\n * @returns A parsed `Vector4`.\n */\nfunction fromJson(json) {\n const obj = JSON.parse(json);\n if (Array.isArray(obj)) {\n const [x, y, z, w] = obj;\n return create({ x, y, z, w });\n }\n else {\n return create(obj);\n }\n}\n\nvar vector4 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n create: create,\n fromJson: fromJson\n});\n\nexport { angle as Angle, boundingBox as BoundingBox, boundingSphere as BoundingSphere, dimensions as Dimensions, euler as Euler, line3 as Line3, matrix as Matrix, matrix2 as Matrix2, matrix4 as Matrix4, plane as Plane, point as Point, quaternion as Quaternion, ray as Ray, rectangle as Rectangle, vector3 as Vector3, vector4 as Vector4, clamp, lerp$2 as lerp };\n//# sourceMappingURL=bundle.js.map\n"],"mappings":";;;AAQA,SAASA,EAAMC,EAAOC,EAAKC,GACvB,OAAOC,KAAKD,IAAID,EAAKE,KAAKF,IAAIC,EAAKF,GACvC,CAWA,SAASI,EAAOC,EAAGC,EAAGC,GAClBA,EAAIR,EAAMQ,EAAG,EAAG,GAChB,OAAOA,GAAKD,EAAID,GAAKA,CACzB,CAKA,SAASG,EAASC,EAAI,EAAGC,EAAI,GACzB,MAAO,CAAED,IAAGC,IAChB,CAIA,SAASC,EAAMC,EAAQC,GACnB,MAAMJ,EAAIN,KAAKW,IAAID,GAAWD,EAC9B,MAAMF,EAAIP,KAAKY,IAAIF,GAAWD,EAC9B,OAAOJ,EAASC,EAAGC,EACvB,CAIA,SAASM,EAAWX,EAAGC,GACnB,MAAMW,EAAQC,EAAW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AKC,MAAMH,GACvB,GAAII,MAAMC,QAAQJ,GAAM,CACpB,MAAOnC,EAAGC,EAAGuF,EAAGG,GAAKxD,EACrB,OAAOU,GAAO,CAAE7C,IAAGC,IAAGuF,IAAGG,KACjC,KACS,CACD,OAAO9C,GAAOV,EACtB,CACA,CAEG,IAACwW,GAAuBlW,OAAOC,OAAO,CACvCC,UAAW,KACXE,OAAQA,GACRE,SAAUA,Y","ignoreList":[]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import{t as e,p as i,H as t,h as n,e as o}from"./p-Bb32XUUS.js";import{g as s}from"./p-D1akPoVm.js";const l=()=>`:host{--viewer-annotations-pin-label-line-color:var(--viewer-annotations-pin-primary-color);--viewer-annotations-pin-label-line-width:1;overflow:hidden;pointer-events:none}.label-line{pointer-events:auto;stroke:var(--viewer-annotations-pin-label-line-color);stroke-width:var( --viewer-annotations-pin-label-line-width);cursor:default}.svg{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden;pointer-events:none;height:100%;width:100%}`;const a=i(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}}render(){var e,i,t,l;const{primaryColor:a}=s(this.pin);return n(o,{key:"daf863da93b542c252fdedcf3a6effc95d86942c"},n("svg",{key:"4a1b04fd9fb7a04b3a46cdbaf2b5ded7efa0bc2c",class:"svg"},n("line",{key:"809a20f602e6c459f3d8988b931406ca63770337",class:"label-line",style:{stroke:a},x1:(e=this.labelPoint)===null||e===void 0?void 0:e.x,y1:(i=this.labelPoint)===null||i===void 0?void 0:i.y,x2:(t=this.pinPoint)===null||t===void 0?void 0:t.x,y2:(l=this.pinPoint)===null||l===void 0?void 0:l.y})))}static get style(){return l()}},[0,"vertex-viewer-pin-label-line",{pinPoint:[16],labelPoint:[16],pin:[16]}]);function r(){if(typeof customElements==="undefined"){return}const i=["vertex-viewer-pin-label-line"];i.forEach((i=>{switch(i){case"vertex-viewer-pin-label-line":if(!customElements.get(e(i))){customElements.define(e(i),a)}break}}))}r();export{a as V,r as d};
|
|
5
|
-
//# sourceMappingURL=p-Cn0vKqIN.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["viewerPinLabelLineCss","VertexPinLabelLine","__stencil_proxyCustomElement","HTMLElement","render","primaryColor","getPinColors","this","pin","h","Host","key","class","style","stroke","x1","_a","labelPoint","x","y1","_b","y","x2","_c","pinPoint","y2","_d"],"sources":["src/components/viewer-pin-label-line/viewer-pin-label-line.css?tag=vertex-viewer-pin-label-line","src/components/viewer-pin-label-line/viewer-pin-label-line.tsx"],"sourcesContent":["\n:host {\n /**\n * @prop --viewer-annotations-pin-label-line-color: A CSS color that\n * specifies the color of the label line\n */\n --viewer-annotations-pin-label-line-color: var(--viewer-annotations-pin-primary-color);\n\n /**\n * @prop --viewer-annotations-pin-label-line-width: A CSS color that\n * specifies the width of the label line\n */\n --viewer-annotations-pin-label-line-width: 1;\n\n overflow: hidden;\n pointer-events: none;\n}\n\n.label-line {\n pointer-events: auto;\n stroke: var(--viewer-annotations-pin-label-line-color);\n stroke-width: var( --viewer-annotations-pin-label-line-width);\n cursor: default;\n}\n\n.svg {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n overflow: hidden;\n pointer-events: none;\n height: 100%;\n width: 100%;\n}\n","import {\n Component,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n h,\n Host,\n JSX,\n Prop,\n} from '@stencil/core';\nimport { Point } from '@vertexvis/geometry';\n\nimport { getPinColors, Pin } from '../../lib/pins/model';\n\n@Component({\n tag: 'vertex-viewer-pin-label-line',\n styleUrl: 'viewer-pin-label-line.css',\n shadow: false,\n})\nexport class VertexPinLabelLine {\n @Prop()\n public pinPoint: Point.Point | undefined;\n\n @Prop()\n public labelPoint: Point.Point | undefined;\n\n @Prop()\n public pin: Pin | undefined;\n\n protected render(): JSX.Element {\n const { primaryColor } = getPinColors(this.pin);\n return (\n <Host>\n <svg class=\"svg\">\n <line\n class=\"label-line\"\n style={{\n stroke: primaryColor,\n }}\n x1={this.labelPoint?.x}\n y1={this.labelPoint?.y}\n x2={this.pinPoint?.x}\n y2={this.pinPoint?.y}\n />\n </svg>\n </Host>\n );\n }\n}\n"],"mappings":";;;oGAAA,MAAMA,EAAwB,IAAM,ic,MCiBvBC,EAAkBC,EAAA,MAAAD,UAAAE,E,4DAUnB,MAAAC,G,YACR,MAAMC,aAAEA,GAAiBC,EAAaC,KAAKC,KAC3C,OACEC,EAACC,EAAI,CAAAC,IAAA,4CACHF,EAAA,OAAAE,IAAA,2CAAKC,MAAM,OACTH,EAAA,QAAAE,IAAA,2CACEC,MAAM,aACNC,MAAO,CACLC,OAAQT,GAEVU,IAAIC,EAAAT,KAAKU,cAAU,MAAAD,SAAA,SAAAA,EAAEE,EACrBC,IAAIC,EAAAb,KAAKU,cAAU,MAAAG,SAAA,SAAAA,EAAEC,EACrBC,IAAIC,EAAAhB,KAAKiB,YAAQ,MAAAD,SAAA,SAAAA,EAAEL,EACnBO,IAAIC,EAAAnB,KAAKiB,YAAQ,MAAAE,SAAA,SAAAA,EAAEL,K","ignoreList":[]}
|