@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":"p-UQXG8bCI.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,GAA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E/C,IAAA,OAAO,OAAO,KAAK,KAAK,QAAQ,GAAGO,SAAS,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,KAAK,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{r,h as o}from"./p-CCVkga9Q.js";const e=()=>`:host{--viewer-toolbar-group-gap:0.5rem;--viewer-toolbar-group-background:rgba(245, 245, 245, 0.95);--viewer-toolbar-group-border-radius:0.25rem;--viewer-toolbar-group-box-shadow:-1px 0 2px rgba(0, 0, 0, 0.12), 1px 0 2px rgba(0, 0, 0, 0.13);--viewer-toolbar-group-padding:0.25rem;--viewer-toolbar-group-item-gap:0.25rem}.group{background:var(--viewer-toolbar-group-background);border-radius:var(--viewer-toolbar-group-border-radius);box-shadow:var(--viewer-toolbar-group-box-shadow);padding:var(--viewer-toolbar-group-padding)}.group[data-direction='horizontal']:not(:first-child){margin-left:var(--viewer-toolbar-group-gap)}.group[data-direction='horizontal'] .group-item:not(:first-child){margin-left:var(--viewer-toolbar-group-item-gap)}.group[data-direction='vertical']:not(:first-child){margin-top:var(--viewer-toolbar-group-gap)}.group[data-direction='vertical'] .group-item:not(:first-child){margin-top:var(--viewer-toolbar-group-item-gap)}.btn{color:var(--neutral-800);padding:0.125rem;border-radius:0.125rem}.btn:hover{background:var(--neutral-300)}`;const a=class{constructor(o){r(this,o);this.placement="bottom-center";this.direction="horizontal";this.animationsDisabled=false;this.animationMs=1e3}render(){return o("vertex-viewer-toolbar",{key:"349bf96991062154e2e7666bbbecd3d66310e69f",placement:this.placement,direction:this.direction},o("vertex-viewer-toolbar-group",{key:"6982b3cb19276e09484c52d8baaa825a7339f371",class:"group",direction:this.direction,"data-direction":this.direction},o("vertex-viewer-button",{key:"77e0f4332b4997c433d2f28b5b9917cc9bea9a12",class:"group-item btn","data-testid":"fit-all-btn",onClick:()=>this.viewAll()},o("vertex-viewer-icon",{key:"75f085b6c0443ba658e795f74a579cf70e1af2da",class:"icon",name:"fit-all",size:"md"}))))}async viewAll(){var r;const o=await((r=this.viewer)===null||r===void 0?void 0:r.scene());const e=this.animationsDisabled?undefined:{milliseconds:this.animationMs};o===null||o===void 0?void 0:o.camera().viewAll().render({animation:e})}};a.style=e();export{a as vertex_viewer_default_toolbar};
|
|
5
|
-
//# sourceMappingURL=p-c2c3579f.entry.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2026 Vertex Software LLC. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
import{h as i,r as t,c as s,H as n,a as o}from"./p-CCVkga9Q.js";import{p as l,v as h,r as e,b as r,a,m as d,h as u,g as v,q as c,e as f,c as w}from"./p-CZZALKHT.js";import{c as p}from"./p-Dw4-tG-V.js";import{w as x,r as g}from"./p-BxtKMwBH.js";import{T as y}from"./p-CelQDFR0.js";import{A as m,D as b}from"./p-Cr2EnhS-.js";import"./p-BAhfr1Nx.js";import{E as z}from"./p-CDM7zNn0.js";import{d as T,T as C,R as D,e as R,r as A,s as P,x as S,A as E,b as j,y as N,z as H,f as M,g as O,h as U,i as I,j as $}from"./p-C6YtUG51.js";import"./p-CG9AChtV.js";import"./p-5kcpg4MZ.js";import"./p-O1_Yvjd6.js";import"./p-EG7pMA2M.js";function F(i){if(window.document.activeElement!==i){i.focus();i.setSelectionRange(i.value.length,i.value.length)}}function k(i,t){return t!=null?l.create(i.x-t.left,i.y-t.top):undefined}function B(i,t,s,n){const o=n!=null?h.fromMatrixPosition(n):undefined;if(i!=null&&t!=null&&s!=null&&o!=null){const n=s.transformPointToRay(i,t.image,t.scene.camera);if(t.scene.camera.isOrthographic()){const i=e.at(e.create({origin:o,direction:t.scene.camera.direction}),h.magnitude(t.scene.camera.viewVector)*2);return e.intersectPlane(n,r.fromNormalAndCoplanarPoint(t.scene.camera.direction,i))}else{return e.intersectPlane(n,r.fromNormalAndCoplanarPoint(t.scene.camera.direction,o))}}return undefined}function _(i,t,s,n,o,l){return d.multiply(q(t,s,n,o,l),i)}function q(i,t,s,n,o){const l=new b(n);const e=new m(o);const r=()=>e.convertFrom(t-s);const a=()=>l.convertRealValueToWorld(t-s);switch(i){case"x-translate":return d.makeTranslation(h.create(a(),0,0));case"y-translate":return d.makeTranslation(h.create(0,a(),0));case"z-translate":return d.makeTranslation(h.create(0,0,a()));case"x-rotate":return d.transpose(d.makeRotation(c.fromAxisAngle(h.left(),r())));case"y-rotate":return d.transpose(d.makeRotation(c.fromAxisAngle(h.down(),r())));case"z-rotate":return d.transpose(d.makeRotation(c.fromAxisAngle(h.forward(),r())));default:return d.makeIdentity()}}function J(i){switch(i){case"x-rotate":return"xyz";case"y-rotate":return"yzx";case"z-rotate":return"zxy";default:return"xyz"}}function V(i,t,s,n,o){const l=new b(n);const e=new m(o);const r=()=>d.makeRotation(c.fromMatrixRotation(t));const v=()=>d.multiply(d.invert(s),t);const f=()=>h.multiplyByTransformMatrixColumnMajor(h.fromMatrixPosition(v()),r());const w=()=>u.fromRotationMatrix(d.multiply(s,r()),J(i));switch(i){case"x-translate":return l.convertWorldValueToReal(f().x);case"y-translate":return l.convertWorldValueToReal(f().y);case"z-translate":return l.convertWorldValueToReal(f().z);case"x-rotate":return e.convertTo(a.normalizeRadians(w().x));case"y-rotate":return e.convertTo(a.normalizeRadians(w().y));case"z-rotate":return e.convertTo(a.normalizeRadians(w().z));default:return 0}}function Z(i,t,s,n,o,l){return G(i,h.subtract(s,t),n,o,l)}function G(i,t,s,n,o){switch(o){case"x-translate":return Y(i,t,h.right());case"y-translate":return Y(i,t,h.up());case"z-translate":return Y(i,t,h.back());case"xy-translate":return X(i,t,h.create(0,0,1));case"xz-translate":return X(i,t,h.create(0,1,0));case"yz-translate":return X(i,t,h.create(1,0,0));case"x-rotate":return K(i,s,h.right(),n);case"y-rotate":return K(i,s,h.up(),n);case"z-rotate":return K(i,s,h.forward(),n);default:return i}}function K(i,t,s,n){const o=L(i,t,s);const l=c.fromAxisAngle(o,n);const h=d.transpose(d.makeRotation(l));return d.multiply(h,i)}function L(i,t,s){const n=d.makeRotation(c.fromMatrixRotation(i));const o=h.multiplyByTransformMatrixRowMajor(s,n);const l=h.multiplyByTransformMatrixRowMajor(h.negate(s),n);return h.dot(t,o)>h.dot(t,l)?s:h.negate(s)}function Y(i,t,s){const n=h.normalize(s);const o=d.makeRotation(c.fromMatrixRotation(i));const l=h.multiplyByTransformMatrixRowMajor(n,o);const e=h.project(t,l);const r=d.makeTranslation(e);return d.multiply(i,r)}function X(i,t,s){const n=h.normalize(s);const o=d.makeRotation(c.fromMatrixRotation(i));const l=h.multiplyByTransformMatrixRowMajor(n,o);const e=h.fromMatrixPosition(i);const a=r.fromNormalAndCoplanarPoint(l,e);const u=r.projectPoint(a,t);const v=h.add(u,h.scale(a.constant,a.normal));const f=d.makeTranslation(v);return d.multiply(i,f)}function Q(i,t,s){if(s.length===0){throw new Error("Unable to compute input position. At least one shape point must be provided.")}const n=v.pad(t,5);const o=s.map((t=>i.transformNdcPointToViewport(t)));const h=v.topLeft(n);const e=l.add(h,l.create(n.width,0));const r=v.bottomRight(n);const a=l.subtract(r,l.create(n.width,0));const d=l.scale(o.reduce(((i,t)=>l.add(i,t)),l.create()),1/o.length,1/o.length);const u=[e,a,r].reduce(((i,t)=>l.distance(d,t)<l.distance(d,i)?t:i),h);switch(u){case h:return{point:u,placement:"top-left"};case e:return{point:u,placement:"top-right"};case a:return{point:u,placement:"bottom-left"};default:return{point:u,placement:"bottom-right"}}}function W(i,t,s,n,o,l){const h=t==="alt"&&i.altKey||t==="ctrl"&&i.ctrlKey||t==="meta"&&i.metaKey||t==="shift"&&i.shiftKey;if(h&&l!=null&&l>0&&Number.isInteger(l)){const i=s-n;const t=a.toDegrees(i);const h=Math.round(t/l)*l;if(o!=null){const i=Math.round(o/l)*l;const t=o-i;const s=h-t;const e=a.toRadians(s);return e+n}else{const i=a.toRadians(h);return i+n}}else{return s}}const ii=({ref:t,bounds:s,viewport:n,point:o,placement:l,displayUnit:h},e)=>{const r=ni(n,s!==null&&s!==void 0?s:f.create(0,0),o,l);return i("div",{ref:t,class:"widget-input wrapper",style:{...r,height:(s===null||s===void 0?void 0:s.height)!=null?`${s.height}px`:undefined}},e,i("div",{class:"widget-input units"},h.unit.abbreviatedName))};const ti=({ref:t,identifier:s,disabled:n,onChange:o,onIncrement:l,onDecrement:h,onBlur:e,onUndo:r})=>{const a=i=>{if(i.target!=null){const t=Number.parseFloat(i.target.value);if(!Number.isNaN(t)){o===null||o===void 0?void 0:o(Number.parseFloat(i.target.value))}}};const d=i=>{const t=i.ctrlKey||i.metaKey;if(i.key==="ArrowUp"){l===null||l===void 0?void 0:l()}else if(i.key==="ArrowDown"){h===null||h===void 0?void 0:h()}else if(i.key==="z"&&t&&r){i.preventDefault();r()}};return i("input",{ref:t,disabled:n,class:`widget-input ${s}`,type:"text",onChange:a,onKeyDown:d,onBlur:e})};function si(i,t){return Math.min(i,Math.max(0,t))}function ni(i,t,s,n,o=5){const{width:l,height:h}=i.dimensions;const e=t.width+o;const r=t.height+o;function a(i){return`${i}px`}switch(n){case"top-left":return{right:a(si(l-e,l-s.x)),bottom:a(si(h-r,h-s.y))};case"top-right":return{left:a(si(l-e,s.x)),bottom:a(si(h-r,h-s.y))};case"bottom-left":return{right:a(si(l-e,l-s.x)),top:a(si(h-r,s.y))};case"bottom-right":default:return{left:a(si(l-e,s.x)),top:a(si(h-r,s.y))}}}function oi(i,t,s=3,n=1,o=1){return ei(i,t,h.back(),h.up(),s,n,o)}function li(i,t,s=3,n=1,o=1){return ei(i,t,h.right(),h.back(),s,n,o)}function hi(i,t,s=3,n=1,o=1){return ei(i,t,h.right(),h.up(),s,n,o)}function ei(i,t,s,n,o,l=1,r=1){const u=h.multiplyByTransformMatrixRowMajor(h.add(s,n),d.makeRotation(c.fromMatrixRotation(i)));const v=h.multiplyByTransformMatrixRowMajor(s,d.makeRotation(c.fromMatrixRotation(i)));const f=h.multiplyByTransformMatrixRowMajor(n,d.makeRotation(c.fromMatrixRotation(i)));const w=10*r**.25;const p=h.fromMatrixPosition(i);const x=h.add(p,h.scale(o*w,u));const g=e.create({origin:x,direction:v});const y=e.create({origin:x,direction:f});const m=h.cross(v,f);const b=h.rotateAboutAxis(a.toRadians(45),e.at(y,-(o*l)),m,x);const z=h.rotateAboutAxis(a.toRadians(45),e.at(g,o*l),m,x);const C=h.rotateAboutAxis(a.toRadians(45),e.at(y,o*l),m,x);const D=h.rotateAboutAxis(a.toRadians(45),e.at(g,-(o*l)),m,x);return new T(h.dot(v,t.direction)!==-1&&h.dot(f,t.direction)!==-1,b,D,z,C,h.multiplyByTransformMatrixColumnMajor(b,t.projectionViewMatrix),h.multiplyByTransformMatrixColumnMajor(D,t.projectionViewMatrix),h.multiplyByTransformMatrixColumnMajor(z,t.projectionViewMatrix),h.multiplyByTransformMatrixColumnMajor(C,t.projectionViewMatrix))}function ri(i,t,s,n){if(i instanceof C){return ai(i,t,s,n)}return false}function ai(i,t,s,n){return di([i.points.worldLeft,i.points.worldRight,i.points.worldTip],t,s,n)||di([i.points.worldLeft,i.points.worldRight,i.points.worldBase],t,s,n)}function di(i,t,s,n){var o;if(i.length===3){const l=s.transformPointToRay(n,t.image,t.scene.camera);const e=h.subtract(i[1],i[0]);const r=h.subtract(i[2],i[0]);const a=w.epsilon((o=w.fromVectors([l.direction,l.origin,e,r]))!==null&&o!==void 0?o:w.create(e,r));const d=h.cross(l.direction,r);const u=h.dot(e,d);if(!(Math.abs(u)>=a)){return false}const v=h.subtract(l.origin,i[0]);const c=h.dot(v,d)/u;if(c<0||c>1){return false}const f=h.cross(v,e);const p=h.dot(l.direction,f)/u;if(p<0||c+p>1){return false}const x=h.dot(r,f)/u;return!Number.isNaN(x)&&(x>0||t.scene.camera.isOrthographic())}return false}class ui extends D{constructor(i,t={},s={}){var n,o,l,h,e,r,a,d,u,v,c,f,w,p;super(i);this.customization=t;this.disabledAxis={xTranslation:false,yTranslation:false,zTranslation:false,xyTranslation:false,xzTranslation:false,yzTranslation:false,xRotation:false,yRotation:false,zRotation:false};this.axisLines=[];this.rotationLines=[];this.translationMeshes=[];this.rotationMeshes=[];this.hoveredChanged=new z;this.xArrowFillColor=(n=t.colors)===null||n===void 0?void 0:n.xArrow;this.yArrowFillColor=(o=t.colors)===null||o===void 0?void 0:o.yArrow;this.zArrowFillColor=(l=t.colors)===null||l===void 0?void 0:l.zArrow;this.hoveredArrowFillColor=(h=t.colors)===null||h===void 0?void 0:h.hovered;this.outlineColor=(e=t.colors)===null||e===void 0?void 0:e.outline;this.disabledAxis.xTranslation=(r=s.xTranslation)!==null&&r!==void 0?r:false;this.disabledAxis.yTranslation=(a=s.yTranslation)!==null&&a!==void 0?a:false;this.disabledAxis.zTranslation=(d=s.zTranslation)!==null&&d!==void 0?d:false;this.disabledAxis.xyTranslation=(u=s.xyTranslation)!==null&&u!==void 0?u:false;this.disabledAxis.xzTranslation=(v=s.xzTranslation)!==null&&v!==void 0?v:false;this.disabledAxis.yzTranslation=(c=s.yzTranslation)!==null&&c!==void 0?c:false;this.disabledAxis.xRotation=(f=s.xRotation)!==null&&f!==void 0?f:false;this.disabledAxis.yRotation=(w=s.yRotation)!==null&&w!==void 0?w:false;this.disabledAxis.zRotation=(p=s.zRotation)!==null&&p!==void 0?p:false}dispose(){var i;(i=this.reglFrameDisposable)===null||i===void 0?void 0:i.cancel()}getDrawableElements(){return this.drawableElements}getFullBounds(){return this.fullBounds}boundsContainsPoint(i){return this.interactiveBounds!=null&&this.frame!=null&&v.containsPoints(this.interactiveBounds,i)}updateDisabledAxis(i){this.disabledAxis={...this.disabledAxis,...i};this.updateDisabledOnDrawables()}updateCursor(i){this.cursor=i;if(i!=null&&this.frame!=null){this.updateHovered()}else{this.clearHovered()}}updateTransform(i){var t;this.transform=i;if(i!=null&&this.frame!=null){this.updateAndDraw()}else{this.clear();(t=this.reglFrameDisposable)===null||t===void 0?void 0:t.cancel();this.reglFrameDisposable=undefined}}updateColors(i={}){var t,s,n,o,l,h,e,r,a,d,u,v,c,f,w,p;this.xArrowFillColor=(t=i.xArrow)!==null&&t!==void 0?t:this.xArrowFillColor;this.yArrowFillColor=(s=i.yArrow)!==null&&s!==void 0?s:this.yArrowFillColor;this.zArrowFillColor=(n=i.zArrow)!==null&&n!==void 0?n:this.zArrowFillColor;this.twoAxesSquareFillColor=(o=i.twoAxesSquare)!==null&&o!==void 0?o:this.twoAxesSquareFillColor;this.hoveredArrowFillColor=(l=i.hovered)!==null&&l!==void 0?l:this.hoveredArrowFillColor;this.outlineColor=(h=i.outline)!==null&&h!==void 0?h:this.outlineColor;(e=this.xArrow)===null||e===void 0?void 0:e.updateFillColor(this.getXTranslationColor(),true);(r=this.yArrow)===null||r===void 0?void 0:r.updateFillColor(this.getYTranslationColor(),true);(a=this.zArrow)===null||a===void 0?void 0:a.updateFillColor(this.getZTranslationColor(),true);(d=this.xRotation)===null||d===void 0?void 0:d.updateFillColor(this.getXRotationColor(),true);(u=this.yRotation)===null||u===void 0?void 0:u.updateFillColor(this.getYRotationColor(),true);(v=this.zRotation)===null||v===void 0?void 0:v.updateFillColor(this.getZRotationColor(),true);(c=this.xyTranslation)===null||c===void 0?void 0:c.updateFillColor(this.getTwoAxesTranslationColor(),true);(f=this.xzTranslation)===null||f===void 0?void 0:f.updateFillColor(this.getTwoAxesTranslationColor(),true);(w=this.yzTranslation)===null||w===void 0?void 0:w.updateFillColor(this.getTwoAxesTranslationColor(),true);(p=this.hoveredElement)===null||p===void 0?void 0:p.updateFillColor(this.hoveredArrowFillColor)}updateScalars(i){this.customization={...this.customization,scalars:i};if(this.transform!=null&&this.frame!=null){this.updateElements(this.transform,this.frame)}}onHoveredChanged(i){return this.hoveredChanged.on(i)}updateDisabledOnDrawables(){var i,t,s,n,o,l,h,e,r,a,d,u,v,c,f;(i=this.xRotation)===null||i===void 0?void 0:i.setDisabled(this.disabledAxis.xRotation);(t=this.xyRotationLine)===null||t===void 0?void 0:t.setDisabled(this.disabledAxis.xRotation);(s=this.xzRotationLine)===null||s===void 0?void 0:s.setDisabled(this.disabledAxis.xRotation);(n=this.yRotation)===null||n===void 0?void 0:n.setDisabled(this.disabledAxis.yRotation);(o=this.yzRotationLine)===null||o===void 0?void 0:o.setDisabled(this.disabledAxis.yRotation);(l=this.yxRotationLine)===null||l===void 0?void 0:l.setDisabled(this.disabledAxis.yRotation);(h=this.zRotation)===null||h===void 0?void 0:h.setDisabled(this.disabledAxis.zRotation);(e=this.zxRotationLine)===null||e===void 0?void 0:e.setDisabled(this.disabledAxis.zRotation);(r=this.zyRotationLine)===null||r===void 0?void 0:r.setDisabled(this.disabledAxis.zRotation);(a=this.xArrow)===null||a===void 0?void 0:a.setDisabled(this.disabledAxis.xTranslation);(d=this.yArrow)===null||d===void 0?void 0:d.setDisabled(this.disabledAxis.yTranslation);(u=this.zArrow)===null||u===void 0?void 0:u.setDisabled(this.disabledAxis.zTranslation);(v=this.xyTranslation)===null||v===void 0?void 0:v.setDisabled(this.disabledAxis.xyTranslation);(c=this.xzTranslation)===null||c===void 0?void 0:c.setDisabled(this.disabledAxis.xzTranslation);(f=this.yzTranslation)===null||f===void 0?void 0:f.setDisabled(this.disabledAxis.yzTranslation);this.updateColors()}updateHovered(){var i,t,s,n,o,l,h,e,r,a;const d=this.hoveredElement;const u=this.frame;if(u!=null){this.hoveredElement=[...this.translationMeshes,...this.rotationMeshes].filter((i=>i.points.valid&&!i.isDisabled())).find((i=>this.cursor!=null?ri(i,u,this.viewport,this.cursor):false));if(this.hoveredElement!==d){this.hoveredChanged.emit(this.hoveredElement);(i=this.hoveredElement)===null||i===void 0?void 0:i.updateFillColor(this.hoveredArrowFillColor);this.clearFillColorOfPreviouslyHovered(d);if(((t=this.hoveredElement)===null||t===void 0?void 0:t.identifier)==="xy-translate"){(s=this.xArrow)===null||s===void 0?void 0:s.updateFillColor(this.hoveredArrowFillColor);(n=this.yArrow)===null||n===void 0?void 0:n.updateFillColor(this.hoveredArrowFillColor)}else if(((o=this.hoveredElement)===null||o===void 0?void 0:o.identifier)==="xz-translate"){(l=this.xArrow)===null||l===void 0?void 0:l.updateFillColor(this.hoveredArrowFillColor);(h=this.zArrow)===null||h===void 0?void 0:h.updateFillColor(this.hoveredArrowFillColor)}else if(((e=this.hoveredElement)===null||e===void 0?void 0:e.identifier)==="yz-translate"){(r=this.yArrow)===null||r===void 0?void 0:r.updateFillColor(this.hoveredArrowFillColor);(a=this.zArrow)===null||a===void 0?void 0:a.updateFillColor(this.hoveredArrowFillColor)}}}}clearHovered(){const i=this.hoveredElement;this.hoveredElement=undefined;if(this.hoveredElement!==i){this.hoveredChanged.emit(this.hoveredElement);this.clearFillColorOfPreviouslyHovered(i)}}clearFillColorOfPreviouslyHovered(i){var t,s,n,o,l,h,e,r,a,d,u,v;i===null||i===void 0?void 0:i.updateFillColor(i===null||i===void 0?void 0:i.initialFillColor);if((i===null||i===void 0?void 0:i.identifier)==="xy-translate"){(t=this.xArrow)===null||t===void 0?void 0:t.updateFillColor((s=this.xArrow)===null||s===void 0?void 0:s.initialFillColor);(n=this.yArrow)===null||n===void 0?void 0:n.updateFillColor((o=this.yArrow)===null||o===void 0?void 0:o.initialFillColor)}else if((i===null||i===void 0?void 0:i.identifier)==="xz-translate"){(l=this.xArrow)===null||l===void 0?void 0:l.updateFillColor((h=this.xArrow)===null||h===void 0?void 0:h.initialFillColor);(e=this.zArrow)===null||e===void 0?void 0:e.updateFillColor((r=this.zArrow)===null||r===void 0?void 0:r.initialFillColor)}else if((i===null||i===void 0?void 0:i.identifier)==="yz-translate"){(a=this.yArrow)===null||a===void 0?void 0:a.updateFillColor((d=this.yArrow)===null||d===void 0?void 0:d.initialFillColor);(u=this.zArrow)===null||u===void 0?void 0:u.updateFillColor((v=this.zArrow)===null||v===void 0?void 0:v.initialFillColor)}}hasData(){return this.transform!=null}createOrUpdateElements(){if(this.transform!=null&&this.frame!=null){if(this.xArrow==null||this.yArrow==null||this.zArrow==null){this.createElements(this.transform,this.frame)}else{this.updateElements(this.transform,this.frame)}this.interactiveBounds=R(this.viewport,...this.rotationMeshes,...this.translationMeshes);this.fullBounds=R(this.viewport,...this.rotationMeshes,...this.translationMeshes,...this.axisLines)}}createElements(i,t){var s,n,o,l,e,r,a,d,u,v,c,f;this.reglCommand=A({canvas:this.canvasElement,extensions:"angle_instanced_arrays"});const{createShape:w}=P(this.reglCommand);const p=this.computeTriangleSize(h.fromMatrixPosition(i),t);this.xArrow=new C(w,"x-translate",S(i,t.scene.camera,p,(s=this.customization.scalars)===null||s===void 0?void 0:s.xTranslation),this.outlineColor,this.getXTranslationColor());this.xRotation=new C(w,"x-rotate",oi(i,t.scene.camera,p,(n=this.customization.scalars)===null||n===void 0?void 0:n.xRotation,(o=this.customization.scalars)===null||o===void 0?void 0:o.xTranslation),this.outlineColor,this.getXRotationColor());this.xAxis=new E(w,"x-axis",j(i,t.scene.camera,this.xArrow),this.outlineColor,this.getXTranslationColor());this.yArrow=new C(w,"y-translate",N(i,t.scene.camera,p,(l=this.customization.scalars)===null||l===void 0?void 0:l.yTranslation),this.outlineColor,this.getYTranslationColor());this.yRotation=new C(w,"y-rotate",li(i,t.scene.camera,p,(e=this.customization.scalars)===null||e===void 0?void 0:e.yRotation,(r=this.customization.scalars)===null||r===void 0?void 0:r.yTranslation),this.outlineColor,this.getYRotationColor());this.yAxis=new E(w,"y-axis",j(i,t.scene.camera,this.yArrow),this.outlineColor,this.getYTranslationColor());this.zArrow=new C(w,"z-translate",H(i,t.scene.camera,p,(a=this.customization.scalars)===null||a===void 0?void 0:a.zTranslation),this.outlineColor,this.getZTranslationColor());this.zAxis=new E(w,"z-axis",j(i,t.scene.camera,this.zArrow),this.outlineColor,this.getZTranslationColor());this.zRotation=new C(w,"z-rotate",hi(i,t.scene.camera,p,(d=this.customization.scalars)===null||d===void 0?void 0:d.zRotation,(u=this.customization.scalars)===null||u===void 0?void 0:u.zTranslation),this.outlineColor,this.getZRotationColor());this.xyTranslation=new C(w,"xy-translate",M(i,t.scene.camera,p,(v=this.customization.scalars)===null||v===void 0?void 0:v.xyTranslation),this.outlineColor,this.getTwoAxesTranslationColor());this.xzTranslation=new C(w,"xz-translate",O(i,t.scene.camera,p,(c=this.customization.scalars)===null||c===void 0?void 0:c.xzTranslation),this.outlineColor,this.getTwoAxesTranslationColor());this.yzTranslation=new C(w,"yz-translate",U(i,t.scene.camera,p,(f=this.customization.scalars)===null||f===void 0?void 0:f.yzTranslation),this.outlineColor,this.getTwoAxesTranslationColor());this.createRotationLines(w,i,t);this.axisLines=[this.xAxis,this.yAxis,this.zAxis];this.translationMeshes=[this.xArrow,this.yArrow,this.zArrow,this.xyTranslation,this.xzTranslation,this.yzTranslation];this.rotationMeshes=[this.xRotation,this.yRotation,this.zRotation];this.updateDisabledOnDrawables();this.availableElements=[...this.axisLines,...this.rotationLines,...this.translationMeshes,...this.rotationMeshes]}getXRotationColor(){return this.xArrowFillColor}getYRotationColor(){return this.yArrowFillColor}getZRotationColor(){return this.zArrowFillColor}getXTranslationColor(){return this.xArrowFillColor}getYTranslationColor(){return this.yArrowFillColor}getZTranslationColor(){return this.zArrowFillColor}getTwoAxesTranslationColor(){return this.twoAxesSquareFillColor}createRotationLines(i,t,s){var n,o,l,e,r,a;const d=this.computeTriangleSize(h.fromMatrixPosition(t),s);const u=I(s.scene.camera,this.xRotation,(n=this.yArrow)===null||n===void 0?void 0:n.points.worldTip,d);const v=I(s.scene.camera,this.xRotation,(o=this.zArrow)===null||o===void 0?void 0:o.points.worldTip,d);const c=I(s.scene.camera,this.yRotation,(l=this.xArrow)===null||l===void 0?void 0:l.points.worldTip,d);const f=I(s.scene.camera,this.yRotation,(e=this.zArrow)===null||e===void 0?void 0:e.points.worldTip,d);const w=I(s.scene.camera,this.zRotation,(r=this.xArrow)===null||r===void 0?void 0:r.points.worldTip,d);const p=I(s.scene.camera,this.zRotation,(a=this.yArrow)===null||a===void 0?void 0:a.points.worldTip,d);if(u!=null){this.xyRotationLine=new $(i,"xy-rotation-line",u,this.outlineColor)}if(v!=null){this.xzRotationLine=new $(i,"xz-rotation-line",v,this.outlineColor)}if(c!=null){this.yxRotationLine=new $(i,"yx-rotation-line",c,this.outlineColor)}if(f!=null){this.yzRotationLine=new $(i,"yz-rotation-line",f,this.outlineColor)}if(w!=null){this.zxRotationLine=new $(i,"zx-rotation-line",w,this.outlineColor)}if(p!=null){this.zyRotationLine=new $(i,"zy-rotation-line",p,this.outlineColor)}this.rotationLines=[this.xyRotationLine,this.xzRotationLine,this.yxRotationLine,this.yzRotationLine,this.zxRotationLine,this.zyRotationLine].filter((i=>i!=null))}updateElements(i,t){var s,n,o,l,e,r,a,d,u,v,c,f,w,p,x,g,y,m,b,z,T,C,D,R,A,P,E,$,F,k;const B=this.computeTriangleSize(h.fromMatrixPosition(i),t);if(this.xArrow!=null){this.xArrow.updatePoints(S(i,t.scene.camera,B,(s=this.customization.scalars)===null||s===void 0?void 0:s.xTranslation));(n=this.xAxis)===null||n===void 0?void 0:n.updatePoints(j(i,t.scene.camera,this.xArrow))}(o=this.xRotation)===null||o===void 0?void 0:o.updatePoints(oi(i,t.scene.camera,B,(l=this.customization.scalars)===null||l===void 0?void 0:l.xRotation,(e=this.customization.scalars)===null||e===void 0?void 0:e.xTranslation));if(this.yArrow!=null){this.yArrow.updatePoints(N(i,t.scene.camera,B,(r=this.customization.scalars)===null||r===void 0?void 0:r.yTranslation));(a=this.yAxis)===null||a===void 0?void 0:a.updatePoints(j(i,t.scene.camera,this.yArrow))}(d=this.yRotation)===null||d===void 0?void 0:d.updatePoints(li(i,t.scene.camera,B,(u=this.customization.scalars)===null||u===void 0?void 0:u.yRotation,(v=this.customization.scalars)===null||v===void 0?void 0:v.yTranslation));if(this.zArrow!=null){this.zArrow.updatePoints(H(i,t.scene.camera,B,(c=this.customization.scalars)===null||c===void 0?void 0:c.zTranslation));(f=this.zAxis)===null||f===void 0?void 0:f.updatePoints(j(i,t.scene.camera,this.zArrow))}(w=this.zRotation)===null||w===void 0?void 0:w.updatePoints(hi(i,t.scene.camera,B,(p=this.customization.scalars)===null||p===void 0?void 0:p.zRotation,(x=this.customization.scalars)===null||x===void 0?void 0:x.zTranslation));(g=this.xyRotationLine)===null||g===void 0?void 0:g.updatePoints(I(t.scene.camera,this.xRotation,(y=this.yArrow)===null||y===void 0?void 0:y.points.worldTip,B));(m=this.xzRotationLine)===null||m===void 0?void 0:m.updatePoints(I(t.scene.camera,this.xRotation,(b=this.zArrow)===null||b===void 0?void 0:b.points.worldTip,B));(z=this.yxRotationLine)===null||z===void 0?void 0:z.updatePoints(I(t.scene.camera,this.yRotation,(T=this.xArrow)===null||T===void 0?void 0:T.points.worldTip,B));(C=this.yzRotationLine)===null||C===void 0?void 0:C.updatePoints(I(t.scene.camera,this.yRotation,(D=this.zArrow)===null||D===void 0?void 0:D.points.worldTip,B));(R=this.zxRotationLine)===null||R===void 0?void 0:R.updatePoints(I(t.scene.camera,this.zRotation,(A=this.xArrow)===null||A===void 0?void 0:A.points.worldTip,B));(P=this.zyRotationLine)===null||P===void 0?void 0:P.updatePoints(I(t.scene.camera,this.zRotation,(E=this.yArrow)===null||E===void 0?void 0:E.points.worldTip,B));if(this.xyTranslation!=null){this.xyTranslation.updatePoints(M(i,t.scene.camera,B,($=this.customization.scalars)===null||$===void 0?void 0:$.xyTranslation))}if(this.xzTranslation!=null){this.xzTranslation.updatePoints(O(i,t.scene.camera,B,(F=this.customization.scalars)===null||F===void 0?void 0:F.xzTranslation))}if(this.yzTranslation!=null){this.yzTranslation.updatePoints(U(i,t.scene.camera,B,(k=this.customization.scalars)===null||k===void 0?void 0:k.yzTranslation))}}}const vi=()=>`:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;--viewer-transform-widget-x-axis-arrow-color:var(--x-axis-color);--viewer-transform-widget-y-axis-arrow-color:var(--y-axis-color);--viewer-transform-widget-z-axis-arrow-color:var(--z-axis-color);--viewer-transform-widget-two-axes-square-color:var(--two-axes-color);--viewer-transform-widget-hovered-arrow-color:#ffff00;--viewer-transform-widget-input-width:8em}.widget{position:absolute;top:0;left:0}.widget.hovered{pointer-events:auto}.widget-input.wrapper{position:absolute;pointer-events:auto;display:flex;align-items:center;border:1px solid #444444;border-radius:4px;width:var(--viewer-transform-widget-input-width);text-align:center;background-color:white;box-sizing:border-box}.widget-input.units{position:relative;width:25%;height:100%;padding:0 0.25rem;font-size:0.8125rem;color:#444444}input.widget-input{position:relative;text-align:center;box-sizing:border-box;width:75%;height:100%;outline:none;border-width:0 1px 0 0;border-color:#444444;border-radius:2px 0 0 2px;font-size:0.875rem;color:#444444}input.widget-input.x-translate,input.widget-input.x-rotate{border-left:5px solid var(--viewer-transform-widget-x-axis-arrow-color)}input.widget-input.y-translate,input.widget-input.y-rotate{border-left:5px solid var(--viewer-transform-widget-y-axis-arrow-color)}input.widget-input.z-translate,input.widget-input.z-rotate{border-left:5px solid var(--viewer-transform-widget-z-axis-arrow-color)}input.widget-input:disabled{color:#888888}input.widget-input:focus{outline:none}`;const ci=class{constructor(i){t(this,i);this.positionChanged=s(this,"positionChanged");this.rotationChanged=s(this,"rotationChanged");this.interactionEnded=s(this,"interactionEnded");this.interactionStarted=s(this,"interactionStarted");this.xRotationDisabled=false;this.yRotationDisabled=false;this.zRotationDisabled=false;this.xTranslationDisabled=false;this.yTranslationDisabled=false;this.zTranslationDisabled=false;this.xyTranslationDisabled=false;this.xzTranslationDisabled=false;this.yzTranslationDisabled=false;this.showInputs=true;this.distanceUnit="millimeters";this.angleUnit="degrees";this.decimalPlaces=1;this.rotationSnapKey="shift";this.translationHandleScalar=1;this.rotationHandleScalar=1;this.interactionThrottle=75;this.EXPERIMENTAL_undoKeybindings=false;this.inputValue=0;this.isEndingTransform=false;this.inputShouldFocus=false;this.xArrowColor="#ea3324";this.yArrowColor="#4faf32";this.zArrowColor="#0000ff";this.twoAxesSquareColor="#e0e0e0";this.hoveredColor="#ffff00";this.lastAngle=0;this.handleHoveredDrawableChanged=i=>{this.hovered=i};this.handleViewerFrameDrawn=()=>{this.updatePropsFromViewer()};this.handleViewerDimensionsChange=()=>{x((()=>{if(this.viewer!=null&&this.canvasRef!=null){this.canvasRef.width=this.viewer.viewport.width;this.canvasRef.height=this.viewer.viewport.height;this.updateCanvasBounds(this.canvasRef)}}))};this.handleResize=()=>{if(this.canvasRef!=null){this.updateCanvasBounds(this.canvasRef)}};this.handleInputResize=()=>{if(this.inputWrapperRef!=null){const i=this.inputWrapperRef;g((()=>{this.inputBounds=i.getBoundingClientRect()}))}};this.handleStyleChange=()=>{g((()=>{const i=window.getComputedStyle(this.hostEl);this.xArrowColor=i.getPropertyValue("--viewer-transform-widget-x-axis-arrow-color").trim();this.yArrowColor=i.getPropertyValue("--viewer-transform-widget-y-axis-arrow-color").trim();this.zArrowColor=i.getPropertyValue("--viewer-transform-widget-z-axis-arrow-color").trim();this.twoAxesSquareColor=i.getPropertyValue("--viewer-transform-widget-two-axes-square-color").trim();this.hoveredColor=i.getPropertyValue("--viewer-transform-widget-hovered-arrow-color").trim();this.getTransformWidget().updateColors({xArrow:this.xArrowColor,yArrow:this.yArrowColor,zArrow:this.zArrowColor,twoAxesSquare:this.twoAxesSquareColor,hovered:this.hoveredColor})}))};this.handlePointerMove=i=>{if(this.dragging==null){const t=k(l.create(i.clientX,i.clientY),this.getCanvasBounds());const s=this.getTransformWidget();if(t!=null&&s.boundsContainsPoint(t)){s.updateCursor(t)}else{s.updateCursor(undefined);this.hovered=undefined}}};this.handleBeginDrag=async i=>{var t,s,n;const o=this.getCanvasBounds();if(this.hovered!=null&&o!=null&&this.viewer!=null&&this.position!=null&&this.viewer.frame!=null){this.dragging=this.hovered;if(this.dragging.identifier!==((t=this.lastDragged)===null||t===void 0?void 0:t.identifier)){this.inputValue=0;this.dragStartTransform=this.currentTransform;this.updateInputPosition();this.updateInputValue()}this.lastDragged=undefined;const h=k(l.create(i.clientX,i.clientY),o);const e=this.viewer.viewport.transformWorldToViewport(this.position,this.viewer.frame.scene.camera.projectionViewMatrix);this.lastAngle=h!=null?a.fromPoints(e,h):0;this.lastWorldPosition=B(h,(s=this.viewer)===null||s===void 0?void 0:s.frame,(n=this.viewer)===null||n===void 0?void 0:n.viewport,this.currentTransform);this.interactionStarted.emit();window.removeEventListener("pointermove",this.handlePointerMove);window.addEventListener("pointermove",this.handleDragWithTimer);window.addEventListener("pointerup",this.handleEndTransform)}};this.handleDragWithTimer=async i=>{if(i!=null){i.preventDefault();this.lastMouseEvent=i}if(this.interactionTimer==null){this.interactionTimer=window.setTimeout((async()=>{this.interactionTimer=undefined;await this.handleDrag();this.lastMouseEvent=undefined}),this.interactionThrottle)}};this.handleDrag=async()=>{var i,t,s;const n=this.getCanvasBounds();if(this.dragging!=null&&this.lastWorldPosition!=null&&n!=null&&this.viewer!=null&&this.viewer.frame!=null&&this.position!=null&&this.lastMouseEvent!=null){await((i=this.controller)===null||i===void 0?void 0:i.beginTransform());const o=k(l.create(this.lastMouseEvent.clientX,this.lastMouseEvent.clientY),n);const h=this.viewer.viewport.transformWorldToViewport(this.position,this.viewer.frame.scene.camera.projectionViewMatrix);const e=B(o,(t=this.viewer)===null||t===void 0?void 0:t.frame,(s=this.viewer)===null||s===void 0?void 0:s.viewport,this.currentTransform);if(e!=null&&o!=null&&h!=null){const i=a.fromPoints(h,o);const t=W(this.lastMouseEvent,this.rotationSnapKey,i,this.lastAngle,this.getDisplayedAngle(),this.rotationSnapDegrees);this.transform(this.lastWorldPosition,e,t-this.lastAngle);this.updateInputPosition();this.updateInputValue();this.lastWorldPosition=e;this.lastAngle=t}}};this.handleEndTransform=async i=>{var t,s;const n=k(l.create(i.clientX,i.clientY),this.getCanvasBounds());const o=this.getTransformWidget();this.lastDragged=this.dragging;this.dragging=undefined;this.lastWorldPosition=undefined;this.lastAngle=0;this.updateInputPosition();this.updateInputValue();o.updateCursor(n);o.updateTransform(this.currentTransform);this.beginEndTransform();window.removeEventListener("pointermove",this.handleDragWithTimer);window.removeEventListener("pointerup",this.handleEndTransform);try{const i=(t=this.controller)===null||t===void 0?void 0:t.getCurrentDelta();await((s=this.controller)===null||s===void 0?void 0:s.endTransform());this.interactionEnded.emit(i)}catch(i){console.error("Failed to end transform interaction",i)}window.addEventListener("pointermove",this.handlePointerMove);this.completeEndTransform()};this.handleInputStep=async i=>{if(this.inputValue!=null&&this.lastInputValue!=null){if(this.isModifyingAngleUnits()){const t=new m(this.angleUnit);const s=t.convertFrom(this.lastInputValue);const n=a.normalizeRadians(s+a.toRadians(i));this.inputValue=t.convertTo(n)}else{this.inputValue=this.lastInputValue+i}await this.updateTransformFromInput(this.inputValue)}};this.handleInputChange=async i=>{await this.updateTransformFromInput(i)};this.handleKeyDown=async i=>{const t=i.ctrlKey||i.metaKey;if(i.key==="z"&&t&&this.EXPERIMENTAL_undoKeybindings){i.stopPropagation();await this.EXPERIMENTAL_undo()}};this.updateTransformFromInput=async i=>{var t,s,n;if(this.lastDragged!=null&&this.currentTransform!=null&&this.startingTransform!=null&&this.lastInputValue!=null){this.currentTransform=_(this.currentTransform,this.lastDragged.identifier,i,this.lastInputValue,this.distanceUnit,this.angleUnit);this.updateInputValue();this.lastInputValue=i;await((t=this.controller)===null||t===void 0?void 0:t.beginTransform());this.getTransformWidget().updateTransform(this.currentTransform);await((s=this.controller)===null||s===void 0?void 0:s.updateTransform(d.multiply(d.invert(this.startingTransform),this.currentTransform)));this.updateInputPosition();await((n=this.controller)===null||n===void 0?void 0:n.endTransformDebounced(this.beginEndTransform,this.completeEndTransform))}};this.updatePropsFromViewer=()=>{const{frame:i}=this.viewer||{};if(i!=null){const t=this.getTransformWidget();t.updateFrame(i,this.dragging==null);this.updateInputPosition()}};this.setupTransformWidget=i=>{var t,s;console.debug(`Initializing transform widget. [initial-position=${JSON.stringify(this.position)}, has-initial-frame=${((t=this.viewer)===null||t===void 0?void 0:t.frame)!=null}]`);const n=this.getTranslationScalar();const o=this.getRotationScalar();this.widget=new ui(i,{colors:{xArrow:this.xArrowColor,yArrow:this.yArrowColor,zArrow:this.zArrowColor,twoAxesSquare:this.twoAxesSquareColor,hovered:this.hoveredColor},scalars:{xTranslation:n,yTranslation:n,zTranslation:n,xyTranslation:o,xzTranslation:o,yzTranslation:o,xRotation:o,yRotation:o,zRotation:o}});if(this.rotation!=null){this.currentTransform=this.getTransformForNewRotation(this.rotation);this.startingTransform=this.currentTransform;this.widget.updateTransform(this.currentTransform)}if(this.position!=null){this.currentTransform=this.getTransformForNewPosition(this.position);this.startingTransform=this.currentTransform;this.widget.updateTransform(this.currentTransform)}if(((s=this.viewer)===null||s===void 0?void 0:s.frame)!=null){this.widget.updateFrame(this.viewer.frame,true)}this.handleSettingDisabledAxis();this.hoveredChangeDisposable=this.widget.onHoveredChanged(this.handleHoveredDrawableChanged);return this.widget};this.updateCanvasBounds=i=>{g((()=>{this.canvasBounds=i.getBoundingClientRect();this.getTransformWidget().updateDimensions(i)}))};this.updateInputValue=()=>{var i,t,s;const n=(i=this.dragging)!==null&&i!==void 0?i:this.lastDragged;const o=(n===null||n===void 0?void 0:n.identifier)==="xy-translate"||(n===null||n===void 0?void 0:n.identifier)==="xz-translate"||(n===null||n===void 0?void 0:n.identifier)==="yz-translate";if(n!=null&&this.currentTransform!=null&&this.dragStartTransform!=null&&!o){this.lastInputValue=this.inputValue;this.inputValue=V(n.identifier,this.currentTransform,this.dragStartTransform,this.distanceUnit,this.angleUnit);if(this.inputRef!=null){const i=(s=(t=this.getDisplayedDistance())!==null&&t!==void 0?t:this.getDisplayedAngle())!==null&&s!==void 0?s:0;const n=`${Number.parseFloat(i.toFixed(this.decimalPlaces))}`;this.inputRef.value=n}}};this.updateInputPosition=()=>{var i,t;const s=(i=this.dragging)!==null&&i!==void 0?i:this.lastDragged;const n=(s===null||s===void 0?void 0:s.identifier)==="xy-translate"||(s===null||s===void 0?void 0:s.identifier)==="xz-translate"||(s===null||s===void 0?void 0:s.identifier)==="yz-translate";if(this.showInputs&&((t=this.viewer)===null||t===void 0?void 0:t.frame)!=null&&this.position!=null&&s!=null&&!n){const i=this.getTransformWidget();const t=i.getFullBounds();this.inputPosition=t!=null?Q(this.viewer.viewport,t,s.points.toArray()):undefined}else if(n){this.inputPosition=undefined}};this.beginEndTransform=()=>{const i=this.getTransformWidget();i.updateDisabledAxis({xRotation:true,yRotation:true,zRotation:true,xTranslation:true,yTranslation:true,zTranslation:true,xyTranslation:true,xzTranslation:true,yzTranslation:true});this.isEndingTransform=true};this.completeEndTransform=()=>{const i=this.getTransformWidget();i.updateDisabledAxis({xRotation:this.xRotationDisabled,yRotation:this.yRotationDisabled,zRotation:this.zRotationDisabled,xTranslation:this.xTranslationDisabled,yTranslation:this.yTranslationDisabled,zTranslation:this.zTranslationDisabled,xyTranslation:this.xyTranslationDisabled,xzTranslation:this.xzTranslationDisabled,yzTranslation:this.yzTranslationDisabled});this.isEndingTransform=false;this.inputShouldFocus=true;if(this.currentTransform!=null){this.position=h.fromMatrixPosition(this.currentTransform);this.rotation=u.fromRotationMatrix(this.currentTransform)}};this.isModifyingAngleUnits=()=>{var i,t,s;const n=(t=(i=this.dragging)===null||i===void 0?void 0:i.identifier)!==null&&t!==void 0?t:(s=this.lastDragged)===null||s===void 0?void 0:s.identifier;return!!(n===null||n===void 0?void 0:n.includes("rotate"))};this.getTranslationScalar=()=>{if(this.translationHandleScalar>0){return this.translationHandleScalar}console.warn("Invalid value provided for translation-handle-scalar. Expected a positive value greater than zero.");return 1};this.getRotationScalar=()=>{if(this.rotationHandleScalar>0){return this.rotationHandleScalar}console.warn("Invalid value provided for rotation-handle-scalar. Expected a positive value greater than zero.");return 1};this.getDisplayedUnits=()=>{if(this.isModifyingAngleUnits()){return new m(this.angleUnit)}return new b(this.distanceUnit)};this.getDisplayedAngle=()=>{if(this.isModifyingAngleUnits()){return this.inputValue}};this.getDisplayedDistance=()=>{var i,t,s;const n=(t=(i=this.dragging)===null||i===void 0?void 0:i.identifier)!==null&&t!==void 0?t:(s=this.lastDragged)===null||s===void 0?void 0:s.identifier;if(n===null||n===void 0?void 0:n.includes("translate")){return this.inputValue}};this.getTransformForNewPosition=i=>{if(i!=null){const t=this.currentTransform!=null?this.currentTransform:d.makeIdentity();const s=d.transpose(d.makeRotation(c.fromMatrixRotation(t)));const n=d.makeTranslation(i);return d.multiply(s,n)}};this.getTransformForNewRotation=i=>{const t=this.currentTransform!=null?this.currentTransform:d.makeIdentity();const s=d.makeRotation(c.fromMatrixRotation(t));const n=d.makeRotation(c.fromEuler(i));const o=d.multiply(s,t);return d.multiply(d.transpose(n),o)};this.getCanvasBounds=()=>{if(this.canvasBounds!=null){return this.canvasBounds}else if(this.canvasRef!=null){this.updateCanvasBounds(this.canvasRef);return this.canvasBounds}};this.getTransformWidget=()=>{if(this.widget==null&&this.canvasRef!=null){return this.setupTransformWidget(this.canvasRef)}else if(this.widget!=null){return this.widget}else{throw new Error("Transform widget was not initialized. The canvas element may not have been initialized.")}}}componentDidLoad(){window.addEventListener("pointermove",this.handlePointerMove);this.canvasResizeObserver=new ResizeObserver(this.handleResize);this.inputResizeObserver=new ResizeObserver(this.handleInputResize);this.hostStyleObserver=new MutationObserver(this.handleStyleChange);if(this.canvasRef!=null){this.canvasResizeObserver.observe(this.canvasRef);this.setupTransformWidget(this.canvasRef)}this.hostStyleObserver.observe(this.hostEl,{attributes:true,attributeFilter:["style"]});this.handleViewerChanged(this.viewer,undefined);this.handleStyleChange()}disconnectedCallback(){var i,t,s,n,o;window.removeEventListener("pointermove",this.handlePointerMove);(i=this.canvasResizeObserver)===null||i===void 0?void 0:i.disconnect();(t=this.inputResizeObserver)===null||t===void 0?void 0:t.disconnect();(s=this.hostStyleObserver)===null||s===void 0?void 0:s.disconnect();(n=this.hoveredChangeDisposable)===null||n===void 0?void 0:n.dispose();(o=this.widget)===null||o===void 0?void 0:o.dispose()}componentDidRender(){if(this.inputShouldFocus&&this.inputRef!=null){F(this.inputRef);this.inputShouldFocus=false}}async EXPERIMENTAL_undo(){var i,t;const s=await((i=this.controller)===null||i===void 0?void 0:i.EXPERIMENTAL_undoTransform());if(this.currentTransform!=null&&s!=null){this.currentTransform=d.multiply(this.currentTransform,s);(t=this.widget)===null||t===void 0?void 0:t.updateTransform(this.currentTransform);this.updateInputPosition();this.updateInputValue();this.lastInputValue=this.inputValue;this.position=h.fromMatrixPosition(this.currentTransform);this.rotation=u.fromRotationMatrix(this.currentTransform)}}handleViewerChanged(i,t){var s;t===null||t===void 0?void 0:t.removeEventListener("frameDrawn",this.handleViewerFrameDrawn);t===null||t===void 0?void 0:t.removeEventListener("dimensionschange",this.handleViewerDimensionsChange);i===null||i===void 0?void 0:i.addEventListener("frameDrawn",this.handleViewerFrameDrawn);i===null||i===void 0?void 0:i.addEventListener("dimensionschange",this.handleViewerDimensionsChange);if((i===null||i===void 0?void 0:i.stream)!=null){(s=this.controller)===null||s===void 0?void 0:s.dispose();this.controller=new y(i.stream)}}handleDisabledPropertyChanged(){var i;(i=this.widget)===null||i===void 0?void 0:i.updateDisabledAxis({xRotation:this.xRotationDisabled,yRotation:this.yRotationDisabled,zRotation:this.zRotationDisabled,xTranslation:this.xTranslationDisabled,yTranslation:this.yTranslationDisabled,zTranslation:this.zTranslationDisabled,xyTranslation:this.xyTranslationDisabled,xzTranslation:this.xzTranslationDisabled,yzTranslation:this.yzTranslationDisabled})}handleTransformHandleScalarChanged(){var i;const t=this.getTranslationScalar();const s=this.getRotationScalar();(i=this.widget)===null||i===void 0?void 0:i.updateScalars({xTranslation:t,yTranslation:t,zTranslation:t,xyTranslation:s,xzTranslation:s,yzTranslation:s,xRotation:s,yRotation:s,zRotation:s})}handleRotationChanged(i,t){var s;const n=i!==null&&i!==void 0?i:u.create();this.currentTransform=this.getTransformForNewRotation(n);this.startingTransform=this.currentTransform;if(i==null&&this.currentTransform!=null&&d.isIdentity(this.currentTransform)){this.currentTransform=undefined;this.startingTransform=this.currentTransform}(s=this.widget)===null||s===void 0?void 0:s.updateTransform(this.currentTransform);console.debug(`Updating widget rotation [previous=${JSON.stringify(t)}, current=${JSON.stringify(i)}]`);this.rotationChanged.emit(i)}handlePositionChanged(i,t){var s,n;this.currentTransform=this.getTransformForNewPosition(i);this.startingTransform=this.currentTransform;console.debug(`Updating widget position [previous=${JSON.stringify(t)}, current=${JSON.stringify(i)}]`);(s=this.widget)===null||s===void 0?void 0:s.updateTransform(this.currentTransform);if(i==null){this.lastDragged=undefined;this.inputPosition=undefined;(n=this.controller)===null||n===void 0?void 0:n.clearTransform()}this.positionChanged.emit(i)}handleInputFormattingChanged(){this.updateInputValue();this.lastInputValue=this.inputValue}render(){var t,s,o,l,h,e;return i(n,{key:"fdc062cb3cafa311baca827e03a765052e1ab2c8"},i("canvas",{key:"c6c9d413e971ef3db3b3eed7e9ff6c8387fff1d1",ref:i=>{this.canvasRef=i},class:p("widget",{hovered:this.hovered!=null}),tabindex:"0",width:(t=this.viewer)===null||t===void 0?void 0:t.viewport.width,height:(s=this.viewer)===null||s===void 0?void 0:s.viewport.height,onPointerDown:this.handleBeginDrag,onKeyDown:this.handleKeyDown}),this.showInputs&&this.inputPosition&&((o=this.viewer)===null||o===void 0?void 0:o.viewport)&&i(ii,{key:"7eb3550df7db8c95f3597d1bd8d7b05c70e11696",ref:i=>{var t,s;if(i!=null){(t=this.inputResizeObserver)===null||t===void 0?void 0:t.observe(i)}else if(this.inputRef!=null){(s=this.inputResizeObserver)===null||s===void 0?void 0:s.unobserve(this.inputRef)}this.inputWrapperRef=i},bounds:this.inputBounds,viewport:this.viewer.viewport,point:this.inputPosition.point,placement:this.inputPosition.placement,displayUnit:this.getDisplayedUnits()},i(ti,{key:"84e2ff6825856c6d5f0ffff1771861ed6087bedb",ref:i=>{this.inputRef=i},identifier:(h=(l=this.dragging)===null||l===void 0?void 0:l.identifier)!==null&&h!==void 0?h:(e=this.lastDragged)===null||e===void 0?void 0:e.identifier,disabled:this.isEndingTransform,onChange:this.handleInputChange,onIncrement:()=>this.handleInputStep(1),onDecrement:()=>this.handleInputStep(-1),onBlur:()=>{this.inputShouldFocus=false},onUndo:this.EXPERIMENTAL_undoKeybindings?()=>this.EXPERIMENTAL_undo():undefined})))}transform(i,t,s){var n,o;if(this.position!=null&&this.startingTransform!=null&&this.currentTransform!=null&&this.dragging!=null&&this.viewer!=null&&this.viewer.frame!=null){this.currentTransform=Z(this.currentTransform,i,t,(n=this.viewer)===null||n===void 0?void 0:n.frame.scene.camera.viewVector,s,this.dragging.identifier);this.getTransformWidget().updateTransform(this.currentTransform);(o=this.controller)===null||o===void 0?void 0:o.updateTransform(d.multiply(d.invert(this.startingTransform),this.currentTransform))}}handleSettingDisabledAxis(){if(this.widget){this.widget.updateDisabledAxis({xRotation:this.xRotationDisabled,yRotation:this.yRotationDisabled,zRotation:this.zRotationDisabled,xTranslation:this.xTranslationDisabled,yTranslation:this.yTranslationDisabled,zTranslation:this.zTranslationDisabled,xyTranslation:this.xyTranslationDisabled,xzTranslation:this.xzTranslationDisabled,yzTranslation:this.yzTranslationDisabled})}else{console.warn("Cannot set disabled values - no widget defined")}}get hostEl(){return o(this)}static get watchers(){return{viewer:[{handleViewerChanged:0}],xTranslationDisabled:[{handleDisabledPropertyChanged:0}],yTranslationDisabled:[{handleDisabledPropertyChanged:0}],zTranslationDisabled:[{handleDisabledPropertyChanged:0}],xyTranslationDisabled:[{handleDisabledPropertyChanged:0}],xzTranslationDisabled:[{handleDisabledPropertyChanged:0}],yzTranslationDisabled:[{handleDisabledPropertyChanged:0}],xRotationDisabled:[{handleDisabledPropertyChanged:0}],yRotationDisabled:[{handleDisabledPropertyChanged:0}],zRotationDisabled:[{handleDisabledPropertyChanged:0}],translationHandleScalar:[{handleTransformHandleScalarChanged:0}],rotationHandleScalar:[{handleTransformHandleScalarChanged:0}],rotation:[{handleRotationChanged:0}],position:[{handlePositionChanged:0}],distanceUnit:[{handleInputFormattingChanged:0}],angleUnit:[{handleInputFormattingChanged:0}],decimalPlaces:[{handleInputFormattingChanged:0}]}}};ci.style=vi();export{ci as vertex_viewer_transform_widget};
|
|
5
|
-
//# sourceMappingURL=p-d5542b6a.entry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["focusInputElement","element","window","document","activeElement","focus","setSelectionRange","value","length","convertPointToCanvas","point","bounds","Point","create","x","left","y","top","undefined","convertCanvasPointToWorld","frame","viewport","transform","position","Vector3","fromMatrixPosition","ray","transformPointToRay","image","scene","camera","isOrthographic","offsetPoint","Ray","at","origin","direction","magnitude","viewVector","intersectPlane","Plane","fromNormalAndCoplanarPoint","computeInputDeltaTransform","current","identifier","lastValue","distanceUnit","angleUnit","Matrix4","multiply","computeInputGlobalTransform","units","DistanceUnits","angles","AngleUnits","rotation","convertFrom","convertRealValueToWorld","makeTranslation","transpose","makeRotation","Quaternion","fromAxisAngle","down","forward","makeIdentity","eulerOrderForIdentifier","computeInputDisplayValue","start","fromMatrixRotation","transformDiff","invert","relativeTranslationDiff","multiplyByTransformMatrixColumnMajor","relativeRotationDiff","Euler","fromRotationMatrix","convertWorldValueToReal","z","convertTo","Angle","normalizeRadians","computeHandleDeltaTransform","previous","next","angle","computeHandleGlobalTransform","subtract","currentTransformationMatrix","translationVectorWorld","performTranslationConstrainedToAxis","right","up","back","performTranslationConstrainedToPlane","performRotationAroundAxis","localRotationAxis","rotationAngle","worldRotationAxis","computeRotationAxis","worldRotationQuaternion","worldRotationMatrix","changeOfBasisToWorld","multiplyByTransformMatrixRowMajor","worldNegatedRotationAxis","negate","dot","constrainToLocalAxis","constrainToLocalAxisUnitVector","normalize","constrainToWorldAxis","translationVectorProjectedToWorldAxis","project","translationMatrix","localNormalVectorToPlane","localNormalVectorToPlaneUnitVector","worldNormalVectorToPlane","currentPosition","worldPlaneToConstrainTranslationTo","translationVectorProjectedToWorldPlane","projectPoint","constrainedTranslationVector","add","scale","constant","normal","computeInputPosition","shapePoints","Error","paddedBounds","Rectangle","pad","canvasPoints","map","sp","transformNdcPointToViewport","topLeft","topRight","width","bottomRight","bottomLeft","center","reduce","sum","pt","closestPoint","closest","distance","placement","calculateNewRotationAngle","event","rotationSnapKey","angleOfRotation","lastAngle","existingAngle","rotationSnapDegrees","rotationSnapKeyIsHeld","altKey","ctrlKey","metaKey","shiftKey","Number","isInteger","angleChangeRelativeToLastAngle","angleChangeRelativeToLastAngleDegrees","toDegrees","angleChangeRounded","Math","round","existingAngleRounded","neededAdjustmentDueToExistingAngle","adjustedAngle","angleChangeRoundedRadians","toRadians","TransformWidgetInputWrapper","ref","displayUnit","children","inputPlacement","constrainInputToViewport","Dimensions","h","class","style","height","unit","abbreviatedName","TransformWidgetInput","disabled","onChange","onIncrement","onDecrement","onBlur","onUndo","handleChange","target","parsed","parseFloat","isNaN","handleKeyDown","commandOrControlModifier","key","preventDefault","type","onKeyDown","constrainTo","dimension","min","max","inputDimensions","padding","dimensions","paddedWidth","paddedHeight","toCssLength","bottom","xAxisRotationPositions","widgetTransform","triangleSize","rotationSizeScalar","translationSizeScalar","computeRotationNdcValues","yAxisRotationPositions","zAxisRotationPositions","xDirection","yDirection","transformedDirection","transformedX","transformedY","relativePositionScalar","basePosition","xRay","yRay","rotationAxis","cross","base","rotateAboutAxis","TriangleMeshPoints","projectionViewMatrix","testDrawable","drawable","TriangleMesh","testTriangleMesh","mesh","testTriangle","points","worldLeft","worldRight","worldTip","worldBase","edge1","edge2","epsilon","BoundingBox","_a","fromVectors","p","det","abs","t","u","q","v","r","TransformWidget","ReglComponent","constructor","canvasElement","customization","initialDisabledAxes","super","this","disabledAxis","xTranslation","yTranslation","zTranslation","xyTranslation","xzTranslation","yzTranslation","xRotation","yRotation","zRotation","axisLines","rotationLines","translationMeshes","rotationMeshes","hoveredChanged","EventDispatcher","xArrowFillColor","colors","xArrow","yArrowFillColor","_b","yArrow","zArrowFillColor","_c","zArrow","hoveredArrowFillColor","_d","hovered","outlineColor","_e","outline","_f","_g","_h","_j","_k","_l","_m","_o","_p","dispose","reglFrameDisposable","cancel","getDrawableElements","drawableElements","getFullBounds","fullBounds","boundsContainsPoint","interactiveBounds","containsPoints","updateDisabledAxis","axis","updateDisabledOnDrawables","updateCursor","cursor","updateHovered","clearHovered","updateTransform","updateAndDraw","clear","updateColors","twoAxesSquareFillColor","twoAxesSquare","updateFillColor","getXTranslationColor","getYTranslationColor","getZTranslationColor","getXRotationColor","getYRotationColor","getZRotationColor","getTwoAxesTranslationColor","_q","_r","hoveredElement","updateScalars","scalars","updateElements","onHoveredChanged","listener","on","setDisabled","xyRotationLine","xzRotationLine","yzRotationLine","yxRotationLine","zxRotationLine","zyRotationLine","previousHovered","currentFrame","filter","el","valid","isDisabled","find","m","emit","clearFillColorOfPreviouslyHovered","initialFillColor","hasData","createOrUpdateElements","createElements","computeDrawable2dBounds","reglCommand","regl","canvas","extensions","createShape","shapeBuilder","computeTriangleSize","xAxisArrowPositions","xAxis","AxisLine","axisPositions","yAxisArrowPositions","yAxis","zAxisArrowPositions","zAxis","xyAxisTranslationPositions","xzAxisTranslationPositions","yzAxisTranslationPositions","createRotationLines","availableElements","xyRotationLinePoints","rotationAxisPositions","xzRotationLinePoints","yxRotationLinePoints","yzRotationLinePoints","zxRotationLinePoints","zyRotationLinePoints","RotationLine","l","updatePoints","_s","_t","_u","_v","_w","_x","_y","_z","_0","_1","_2","_3","_4","_5","viewerTransformWidgetCss","ViewerTransformWidget","hostRef","xRotationDisabled","yRotationDisabled","zRotationDisabled","xTranslationDisabled","yTranslationDisabled","zTranslationDisabled","xyTranslationDisabled","xzTranslationDisabled","yzTranslationDisabled","showInputs","decimalPlaces","translationHandleScalar","rotationHandleScalar","interactionThrottle","EXPERIMENTAL_undoKeybindings","inputValue","isEndingTransform","inputShouldFocus","xArrowColor","yArrowColor","zArrowColor","twoAxesSquareColor","hoveredColor","handleHoveredDrawableChanged","handleViewerFrameDrawn","updatePropsFromViewer","handleViewerDimensionsChange","writeDOM","viewer","canvasRef","updateCanvasBounds","handleResize","handleInputResize","inputWrapperRef","wrapperElement","readDOM","inputBounds","getBoundingClientRect","handleStyleChange","hostStyles","getComputedStyle","hostEl","getPropertyValue","trim","getTransformWidget","handlePointerMove","dragging","canvasPoint","clientX","clientY","getCanvasBounds","widget","handleBeginDrag","async","canvasBounds","lastDragged","dragStartTransform","currentTransform","updateInputPosition","updateInputValue","currentCanvas","widgetCenter","transformWorldToViewport","fromPoints","lastWorldPosition","interactionStarted","removeEventListener","addEventListener","handleDragWithTimer","handleEndTransform","lastMouseEvent","interactionTimer","setTimeout","handleDrag","controller","beginTransform","currentWorld","angleToUse","getDisplayedAngle","beginEndTransform","delta","getCurrentDelta","endTransform","interactionEnded","e","console","error","completeEndTransform","handleInputStep","step","lastInputValue","isModifyingAngleUnits","updateTransformFromInput","handleInputChange","stopPropagation","EXPERIMENTAL_undo","startingTransform","endTransformDebounced","updateFrame","setupTransformWidget","debug","JSON","stringify","effectiveArrowScalar","getTranslationScalar","effectiveSquareScalar","getRotationScalar","getTransformForNewRotation","getTransformForNewPosition","handleSettingDisabledAxis","hoveredChangeDisposable","updateDimensions","isDraggingTwoAxesTranslation","inputRef","definedValue","getDisplayedDistance","displayValue","toFixed","widgetBounds","inputPosition","toArray","draggingIdentifier","includes","warn","getDisplayedUnits","newPosition","c","currentRotation","newRotationEuler","oldRotation","newRotation","fromEuler","oldTranslation","componentDidLoad","canvasResizeObserver","ResizeObserver","inputResizeObserver","hostStyleObserver","MutationObserver","observe","attributes","attributeFilter","handleViewerChanged","disconnectedCallback","disconnect","componentDidRender","undoDelta","EXPERIMENTAL_undoTransform","newViewer","oldViewer","stream","TransformController","handleDisabledPropertyChanged","handleTransformHandleScalarChanged","handleRotationChanged","rotationToApply","isIdentity","rotationChanged","handlePositionChanged","oldPosition","clearTransform","positionChanged","handleInputFormattingChanged","render","Host","classNames","tabindex","onPointerDown","unobserve"],"sources":["src/components/viewer-transform-widget/dom.ts","src/components/viewer-transform-widget/util.ts","src/components/viewer-transform-widget/viewer-transform-widget-components.tsx","src/lib/transforms/axis-rotation.ts","src/lib/transforms/hits.ts","src/components/viewer-transform-widget/widget.ts","src/components/viewer-transform-widget/viewer-transform-widget.css?tag=vertex-viewer-transform-widget&encapsulation=shadow","src/components/viewer-transform-widget/viewer-transform-widget.tsx"],"sourcesContent":["export function focusInputElement(element: HTMLInputElement): void {\n if (window.document.activeElement !== element) {\n element.focus();\n element.setSelectionRange(element.value.length, element.value.length);\n }\n}\n","import {\n Angle,\n Euler,\n Matrix4,\n Plane,\n Point,\n Quaternion,\n Ray,\n Rectangle,\n Vector3,\n} from '@vertexvis/geometry';\n\nimport {\n AngleUnits,\n AngleUnitType,\n DistanceUnits,\n DistanceUnitType,\n Frame,\n Viewport,\n} from '../../lib/types';\nimport { ModifierKey } from '../../lib/types/keys';\nimport { TransformWidgetInputPlacement } from './viewer-transform-widget-components';\n\nexport interface PointAndPlacement {\n point: Point.Point;\n placement: TransformWidgetInputPlacement;\n}\n\nexport function convertPointToCanvas(\n point: Point.Point,\n bounds?: DOMRect,\n): Point.Point | undefined {\n return bounds != null\n ? Point.create(point.x - bounds.left, point.y - bounds.top)\n : undefined;\n}\n\nexport function convertCanvasPointToWorld(\n point?: Point.Point,\n frame?: Frame,\n viewport?: Viewport,\n transform?: Matrix4.Matrix4,\n): Vector3.Vector3 | undefined {\n const position =\n transform != null ? Vector3.fromMatrixPosition(transform) : undefined;\n\n if (point != null && frame != null && viewport != null && position != null) {\n const ray = viewport.transformPointToRay(\n point,\n frame.image,\n frame.scene.camera,\n );\n\n if (frame.scene.camera.isOrthographic()) {\n // Offset the point to past the bounding sphere of the model to\n // adjust the position plane location.\n const offsetPoint = Ray.at(\n Ray.create({\n origin: position,\n direction: frame.scene.camera.direction,\n }),\n Vector3.magnitude(frame.scene.camera.viewVector) * 2,\n );\n\n return Ray.intersectPlane(\n ray,\n Plane.fromNormalAndCoplanarPoint(\n frame.scene.camera.direction,\n offsetPoint,\n ),\n );\n } else {\n return Ray.intersectPlane(\n ray,\n Plane.fromNormalAndCoplanarPoint(\n frame.scene.camera.direction,\n position,\n ),\n );\n }\n }\n return undefined;\n}\n\nexport function computeInputDeltaTransform(\n current: Matrix4.Matrix4,\n identifier: string,\n value: number,\n lastValue: number,\n distanceUnit: DistanceUnitType,\n angleUnit: AngleUnitType,\n): Matrix4.Matrix4 {\n return Matrix4.multiply(\n computeInputGlobalTransform(\n identifier,\n value,\n lastValue,\n distanceUnit,\n angleUnit,\n ),\n current,\n );\n}\n\nfunction computeInputGlobalTransform(\n identifier: string,\n value: number,\n lastValue: number,\n distanceUnit: DistanceUnitType,\n angleUnit: AngleUnitType,\n): Matrix4.Matrix4 {\n const units = new DistanceUnits(distanceUnit);\n const angles = new AngleUnits(angleUnit);\n\n const rotation = (): number => angles.convertFrom(value - lastValue);\n const position = (): number =>\n units.convertRealValueToWorld(value - lastValue);\n\n switch (identifier) {\n case 'x-translate':\n return Matrix4.makeTranslation(Vector3.create(position(), 0, 0));\n case 'y-translate':\n return Matrix4.makeTranslation(Vector3.create(0, position(), 0));\n case 'z-translate':\n return Matrix4.makeTranslation(Vector3.create(0, 0, position()));\n case 'x-rotate':\n return Matrix4.transpose(\n Matrix4.makeRotation(\n Quaternion.fromAxisAngle(Vector3.left(), rotation()),\n ),\n );\n case 'y-rotate':\n return Matrix4.transpose(\n Matrix4.makeRotation(\n Quaternion.fromAxisAngle(Vector3.down(), rotation()),\n ),\n );\n case 'z-rotate':\n return Matrix4.transpose(\n Matrix4.makeRotation(\n Quaternion.fromAxisAngle(Vector3.forward(), rotation()),\n ),\n );\n default:\n return Matrix4.makeIdentity();\n }\n}\n\nexport function eulerOrderForIdentifier(identifier: string): Euler.EulerOrder {\n switch (identifier) {\n case 'x-rotate':\n return 'xyz';\n case 'y-rotate':\n return 'yzx';\n case 'z-rotate':\n return 'zxy';\n default:\n return 'xyz';\n }\n}\n\nexport function computeInputDisplayValue(\n identifier: string,\n current: Matrix4.Matrix4,\n start: Matrix4.Matrix4,\n distanceUnit: DistanceUnitType,\n angleUnit: AngleUnitType,\n): number {\n const units = new DistanceUnits(distanceUnit);\n const angles = new AngleUnits(angleUnit);\n\n const rotation = (): Matrix4.Matrix4 =>\n Matrix4.makeRotation(Quaternion.fromMatrixRotation(current));\n\n const transformDiff = (): Matrix4.Matrix4 =>\n Matrix4.multiply(Matrix4.invert(start), current);\n\n const relativeTranslationDiff = (): Vector3.Vector3 =>\n Vector3.multiplyByTransformMatrixColumnMajor(\n Vector3.fromMatrixPosition(transformDiff()),\n rotation(),\n );\n\n const relativeRotationDiff = (): Euler.Euler =>\n Euler.fromRotationMatrix(\n Matrix4.multiply(start, rotation()),\n eulerOrderForIdentifier(identifier),\n );\n\n switch (identifier) {\n case 'x-translate':\n return units.convertWorldValueToReal(relativeTranslationDiff().x);\n case 'y-translate':\n return units.convertWorldValueToReal(relativeTranslationDiff().y);\n case 'z-translate':\n return units.convertWorldValueToReal(relativeTranslationDiff().z);\n case 'x-rotate':\n return angles.convertTo(Angle.normalizeRadians(relativeRotationDiff().x));\n case 'y-rotate':\n return angles.convertTo(Angle.normalizeRadians(relativeRotationDiff().y));\n case 'z-rotate':\n return angles.convertTo(Angle.normalizeRadians(relativeRotationDiff().z));\n default:\n return 0;\n }\n}\n\nexport function computeHandleDeltaTransform(\n current: Matrix4.Matrix4,\n previous: Vector3.Vector3,\n next: Vector3.Vector3,\n viewVector: Vector3.Vector3,\n angle: number,\n identifier: string,\n): Matrix4.Matrix4 {\n return computeHandleGlobalTransform(\n current,\n Vector3.subtract(next, previous),\n viewVector,\n angle,\n identifier,\n );\n}\n\nfunction computeHandleGlobalTransform(\n currentTransformationMatrix: Matrix4.Matrix4,\n translationVectorWorld: Vector3.Vector3,\n viewVector: Vector3.Vector3,\n angle: number,\n identifier: string,\n): Matrix4.Matrix4 {\n switch (identifier) {\n case 'x-translate':\n return performTranslationConstrainedToAxis(\n currentTransformationMatrix,\n translationVectorWorld,\n Vector3.right(),\n );\n case 'y-translate':\n return performTranslationConstrainedToAxis(\n currentTransformationMatrix,\n translationVectorWorld,\n Vector3.up(),\n );\n case 'z-translate':\n return performTranslationConstrainedToAxis(\n currentTransformationMatrix,\n translationVectorWorld,\n Vector3.back(),\n );\n case 'xy-translate':\n return performTranslationConstrainedToPlane(\n currentTransformationMatrix,\n translationVectorWorld,\n Vector3.create(0, 0, 1),\n );\n case 'xz-translate':\n return performTranslationConstrainedToPlane(\n currentTransformationMatrix,\n translationVectorWorld,\n Vector3.create(0, 1, 0),\n );\n case 'yz-translate':\n return performTranslationConstrainedToPlane(\n currentTransformationMatrix,\n translationVectorWorld,\n Vector3.create(1, 0, 0),\n );\n case 'x-rotate':\n return performRotationAroundAxis(\n currentTransformationMatrix,\n viewVector,\n Vector3.right(),\n angle,\n );\n case 'y-rotate':\n return performRotationAroundAxis(\n currentTransformationMatrix,\n viewVector,\n Vector3.up(),\n angle,\n );\n case 'z-rotate':\n return performRotationAroundAxis(\n currentTransformationMatrix,\n viewVector,\n Vector3.forward(),\n angle,\n );\n default:\n return currentTransformationMatrix;\n }\n}\n\nexport function performRotationAroundAxis(\n currentTransformationMatrix: Matrix4.Matrix4,\n viewVector: Vector3.Vector3,\n localRotationAxis: Vector3.Vector3,\n rotationAngle: number,\n): Matrix4.Matrix4 {\n // Determine the rotation axis in world coordinates\n const worldRotationAxis = computeRotationAxis(\n currentTransformationMatrix,\n viewVector,\n localRotationAxis,\n );\n\n // Determine the rotation matrix in world coordinates\n const worldRotationQuaternion = Quaternion.fromAxisAngle(\n worldRotationAxis,\n rotationAngle,\n );\n const worldRotationMatrix = Matrix4.transpose(\n Matrix4.makeRotation(worldRotationQuaternion),\n );\n\n return Matrix4.multiply(worldRotationMatrix, currentTransformationMatrix);\n}\n\nexport function computeRotationAxis(\n currentTransformationMatrix: Matrix4.Matrix4,\n viewVector: Vector3.Vector3,\n localRotationAxis: Vector3.Vector3,\n): Vector3.Vector3 {\n const changeOfBasisToWorld = Matrix4.makeRotation(\n Quaternion.fromMatrixRotation(currentTransformationMatrix),\n );\n const worldRotationAxis = Vector3.multiplyByTransformMatrixRowMajor(\n localRotationAxis,\n changeOfBasisToWorld,\n );\n const worldNegatedRotationAxis = Vector3.multiplyByTransformMatrixRowMajor(\n Vector3.negate(localRotationAxis),\n changeOfBasisToWorld,\n );\n\n return Vector3.dot(viewVector, worldRotationAxis) >\n Vector3.dot(viewVector, worldNegatedRotationAxis)\n ? localRotationAxis\n : Vector3.negate(localRotationAxis);\n}\n\nexport function performTranslationConstrainedToAxis(\n currentTransformationMatrix: Matrix4.Matrix4,\n translationVectorWorld: Vector3.Vector3,\n constrainToLocalAxis: Vector3.Vector3,\n): Matrix4.Matrix4 {\n // Ensure that constrainToLocalAxis is a unit vector\n const constrainToLocalAxisUnitVector =\n Vector3.normalize(constrainToLocalAxis);\n\n // Convert the axis to constrain the translation to from local to world\n const changeOfBasisToWorld = Matrix4.makeRotation(\n Quaternion.fromMatrixRotation(currentTransformationMatrix),\n );\n const constrainToWorldAxis = Vector3.multiplyByTransformMatrixRowMajor(\n constrainToLocalAxisUnitVector,\n changeOfBasisToWorld,\n );\n\n // Project the translation vector onto the desired axis for translation\n const translationVectorProjectedToWorldAxis = Vector3.project(\n translationVectorWorld,\n constrainToWorldAxis,\n );\n\n // Use the projected vector to determine the translation matrix\n const translationMatrix = Matrix4.makeTranslation(\n translationVectorProjectedToWorldAxis,\n );\n\n // Multiply the translation matrix with the current transformation matrix to\n // determine the new transformation matrix\n return Matrix4.multiply(currentTransformationMatrix, translationMatrix);\n}\n\nexport function performTranslationConstrainedToPlane(\n currentTransformationMatrix: Matrix4.Matrix4,\n translationVectorWorld: Vector3.Vector3,\n localNormalVectorToPlane: Vector3.Vector3,\n): Matrix4.Matrix4 {\n // Ensure that localNormalVectorToPlane is a unit vector\n const localNormalVectorToPlaneUnitVector = Vector3.normalize(\n localNormalVectorToPlane,\n );\n\n // Convert the normal vector from local to world\n const changeOfBasisToWorld = Matrix4.makeRotation(\n Quaternion.fromMatrixRotation(currentTransformationMatrix),\n );\n const worldNormalVectorToPlane = Vector3.multiplyByTransformMatrixRowMajor(\n localNormalVectorToPlaneUnitVector,\n changeOfBasisToWorld,\n );\n\n // Use the worldNormalVectorToPlane and the current position of the widget to define the plane to translate on\n const currentPosition = Vector3.fromMatrixPosition(\n currentTransformationMatrix,\n );\n const worldPlaneToConstrainTranslationTo = Plane.fromNormalAndCoplanarPoint(\n worldNormalVectorToPlane,\n currentPosition,\n );\n\n // Project the translation vector onto the desired plane for translation\n const translationVectorProjectedToWorldPlane = Plane.projectPoint(\n worldPlaneToConstrainTranslationTo,\n translationVectorWorld,\n );\n\n // Account for the plane offset to calculate the position change (the vector to translate by)\n const constrainedTranslationVector = Vector3.add(\n translationVectorProjectedToWorldPlane,\n Vector3.scale(\n worldPlaneToConstrainTranslationTo.constant,\n worldPlaneToConstrainTranslationTo.normal,\n ),\n );\n\n // Use the projected vector to perform the translation and determine the new transformation matrix\n const translationMatrix = Matrix4.makeTranslation(\n constrainedTranslationVector,\n );\n return Matrix4.multiply(currentTransformationMatrix, translationMatrix);\n}\n\nexport function computeInputPosition(\n viewport: Viewport,\n bounds: Rectangle.Rectangle,\n shapePoints: Point.Point[],\n): PointAndPlacement {\n if (shapePoints.length === 0) {\n throw new Error(\n 'Unable to compute input position. At least one shape point must be provided.',\n );\n }\n\n const paddedBounds = Rectangle.pad(bounds, 5);\n const canvasPoints = shapePoints.map((sp) =>\n viewport.transformNdcPointToViewport(sp),\n );\n\n const topLeft = Rectangle.topLeft(paddedBounds);\n const topRight = Point.add(topLeft, Point.create(paddedBounds.width, 0));\n const bottomRight = Rectangle.bottomRight(paddedBounds);\n const bottomLeft = Point.subtract(\n bottomRight,\n Point.create(paddedBounds.width, 0),\n );\n\n const center = Point.scale(\n canvasPoints.reduce((sum, pt) => Point.add(sum, pt), Point.create()),\n 1 / canvasPoints.length,\n 1 / canvasPoints.length,\n );\n\n const closestPoint = [topRight, bottomLeft, bottomRight].reduce(\n (closest, pt) =>\n Point.distance(center, pt) < Point.distance(center, closest)\n ? pt\n : closest,\n topLeft,\n );\n\n switch (closestPoint) {\n case topLeft:\n return { point: closestPoint, placement: 'top-left' };\n case topRight:\n return { point: closestPoint, placement: 'top-right' };\n case bottomLeft:\n return { point: closestPoint, placement: 'bottom-left' };\n default:\n return { point: closestPoint, placement: 'bottom-right' };\n }\n}\n\nexport function calculateNewRotationAngle(\n event: PointerEvent,\n rotationSnapKey: ModifierKey,\n angleOfRotation: number, // In radians\n lastAngle: number, // In radians\n existingAngle?: number, // In degrees\n rotationSnapDegrees?: number, // In degrees\n): number {\n const rotationSnapKeyIsHeld =\n (rotationSnapKey === 'alt' && event.altKey) ||\n (rotationSnapKey === 'ctrl' && event.ctrlKey) ||\n (rotationSnapKey === 'meta' && event.metaKey) ||\n (rotationSnapKey === 'shift' && event.shiftKey);\n\n // Check if the widget should snap to a certain angle\n if (\n rotationSnapKeyIsHeld &&\n rotationSnapDegrees != null &&\n rotationSnapDegrees > 0 &&\n Number.isInteger(rotationSnapDegrees)\n ) {\n const angleChangeRelativeToLastAngle = angleOfRotation - lastAngle;\n const angleChangeRelativeToLastAngleDegrees = Angle.toDegrees(\n angleChangeRelativeToLastAngle,\n );\n\n // This method rounds the angle change to the nearest multiple of this.rotationSnapDegrees\n const angleChangeRounded =\n Math.round(angleChangeRelativeToLastAngleDegrees / rotationSnapDegrees) *\n rotationSnapDegrees;\n\n // Check if there is already an existing rotation angle\n if (existingAngle != null) {\n // If there is an existing angle displayed in the widget, it might not be a multiple of the\n // desired number, so the difference needs to be accounted for\n const existingAngleRounded =\n Math.round(existingAngle / rotationSnapDegrees) * rotationSnapDegrees;\n const neededAdjustmentDueToExistingAngle =\n existingAngle - existingAngleRounded;\n\n // Adjust the rounded angle change to account for the existing angle, then\n // covert the rounded value to radians and return\n const adjustedAngle =\n angleChangeRounded - neededAdjustmentDueToExistingAngle;\n const angleChangeRoundedRadians = Angle.toRadians(adjustedAngle);\n return angleChangeRoundedRadians + lastAngle;\n } else {\n // There isn't an existing angle to account for, so convert the rounded value to radians and return\n const angleChangeRoundedRadians = Angle.toRadians(angleChangeRounded);\n return angleChangeRoundedRadians + lastAngle;\n }\n } else {\n // Angle should not be snapped, so return the original angle\n return angleOfRotation;\n }\n}\n","// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport { FunctionalComponent, h } from '@stencil/core';\nimport { Dimensions, Point } from '@vertexvis/geometry';\n\nimport { AngleUnits, DistanceUnits, Viewport } from '../../lib/types';\n\nexport type TransformWidgetInputPlacement =\n | 'top-left'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-right';\n\nexport interface TransformWidgetInputWrapperProps {\n ref: (el?: HTMLDivElement) => void;\n bounds?: DOMRect;\n\n viewport: Viewport;\n point: Point.Point;\n placement: TransformWidgetInputPlacement;\n\n displayUnit: DistanceUnits | AngleUnits;\n}\n\nexport const TransformWidgetInputWrapper: FunctionalComponent<\n TransformWidgetInputWrapperProps\n> = ({ ref, bounds, viewport, point, placement, displayUnit }, children) => {\n const inputPlacement = constrainInputToViewport(\n viewport,\n bounds ?? Dimensions.create(0, 0),\n point,\n placement,\n );\n\n return (\n <div\n ref={ref}\n class=\"widget-input wrapper\"\n style={{\n ...inputPlacement,\n height: bounds?.height != null ? `${bounds.height}px` : undefined,\n }}\n >\n {children}\n <div class=\"widget-input units\">{displayUnit.unit.abbreviatedName}</div>\n </div>\n );\n};\n\nexport interface TransformWidgetInputProps {\n ref: (el?: HTMLInputElement) => void;\n\n identifier?: string;\n disabled?: boolean;\n\n onChange?: (value: number) => void | Promise<void>;\n onIncrement?: VoidFunction;\n onDecrement?: VoidFunction;\n onBlur?: VoidFunction;\n onUndo?: VoidFunction;\n}\n\nexport const TransformWidgetInput: FunctionalComponent<\n TransformWidgetInputProps\n> = ({\n ref,\n identifier,\n disabled,\n onChange,\n onIncrement,\n onDecrement,\n onBlur,\n onUndo,\n}) => {\n const handleChange = (event: Event): void => {\n if (event.target != null) {\n const parsed = Number.parseFloat((event.target as HTMLInputElement).value);\n\n if (!Number.isNaN(parsed)) {\n onChange?.(Number.parseFloat((event.target as HTMLInputElement).value));\n }\n }\n };\n\n const handleKeyDown = (event: KeyboardEvent): void => {\n const commandOrControlModifier = event.ctrlKey || event.metaKey;\n\n if (event.key === 'ArrowUp') {\n onIncrement?.();\n } else if (event.key === 'ArrowDown') {\n onDecrement?.();\n } else if (event.key === 'z' && commandOrControlModifier && onUndo) {\n event.preventDefault();\n\n onUndo();\n }\n };\n\n return (\n <input\n ref={ref}\n disabled={disabled}\n class={`widget-input ${identifier}`}\n type=\"text\"\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n onBlur={onBlur}\n ></input>\n );\n};\n\nfunction constrainTo(dimension: number, length: number): number {\n return Math.min(dimension, Math.max(0, length));\n}\n\ninterface InputPlacement {\n left?: string;\n right?: string;\n top?: string;\n bottom?: string;\n}\n\nfunction constrainInputToViewport(\n viewport: Viewport,\n inputDimensions: Dimensions.Dimensions,\n point: Point.Point,\n placement: TransformWidgetInputPlacement,\n padding = 5,\n): InputPlacement {\n const { width, height } = viewport.dimensions;\n const paddedWidth = inputDimensions.width + padding;\n const paddedHeight = inputDimensions.height + padding;\n\n function toCssLength(length: number): string {\n return `${length}px`;\n }\n\n switch (placement) {\n case 'top-left':\n return {\n right: toCssLength(constrainTo(width - paddedWidth, width - point.x)),\n bottom: toCssLength(\n constrainTo(height - paddedHeight, height - point.y),\n ),\n };\n case 'top-right':\n return {\n left: toCssLength(constrainTo(width - paddedWidth, point.x)),\n bottom: toCssLength(\n constrainTo(height - paddedHeight, height - point.y),\n ),\n };\n case 'bottom-left':\n return {\n right: toCssLength(constrainTo(width - paddedWidth, width - point.x)),\n top: toCssLength(constrainTo(height - paddedHeight, point.y)),\n };\n case 'bottom-right':\n default:\n return {\n left: toCssLength(constrainTo(width - paddedWidth, point.x)),\n top: toCssLength(constrainTo(height - paddedHeight, point.y)),\n };\n }\n}\n","import { Angle, Matrix4, Quaternion, Ray, Vector3 } from '@vertexvis/geometry';\n\nimport { FrameCameraBase } from '../types';\nimport { TriangleMeshPoints } from './mesh';\n\nexport function xAxisRotationPositions(\n widgetTransform: Matrix4.Matrix4,\n camera: FrameCameraBase,\n triangleSize = 3,\n rotationSizeScalar = 1,\n translationSizeScalar = 1,\n): TriangleMeshPoints {\n return computeRotationNdcValues(\n widgetTransform,\n camera,\n Vector3.back(),\n Vector3.up(),\n triangleSize,\n rotationSizeScalar,\n translationSizeScalar,\n );\n}\n\nexport function yAxisRotationPositions(\n widgetTransform: Matrix4.Matrix4,\n camera: FrameCameraBase,\n triangleSize = 3,\n rotationSizeScalar = 1,\n translationSizeScalar = 1,\n): TriangleMeshPoints {\n return computeRotationNdcValues(\n widgetTransform,\n camera,\n Vector3.right(),\n Vector3.back(),\n triangleSize,\n rotationSizeScalar,\n translationSizeScalar,\n );\n}\n\nexport function zAxisRotationPositions(\n widgetTransform: Matrix4.Matrix4,\n camera: FrameCameraBase,\n triangleSize = 3,\n rotationSizeScalar = 1,\n translationSizeScalar = 1,\n): TriangleMeshPoints {\n return computeRotationNdcValues(\n widgetTransform,\n camera,\n Vector3.right(),\n Vector3.up(),\n triangleSize,\n rotationSizeScalar,\n translationSizeScalar,\n );\n}\n\nfunction computeRotationNdcValues(\n widgetTransform: Matrix4.Matrix4,\n camera: FrameCameraBase,\n xDirection: Vector3.Vector3,\n yDirection: Vector3.Vector3,\n triangleSize: number,\n rotationSizeScalar = 1,\n translationSizeScalar = 1,\n): TriangleMeshPoints {\n const transformedDirection = Vector3.multiplyByTransformMatrixRowMajor(\n Vector3.add(xDirection, yDirection),\n Matrix4.makeRotation(Quaternion.fromMatrixRotation(widgetTransform)),\n );\n const transformedX = Vector3.multiplyByTransformMatrixRowMajor(\n xDirection,\n Matrix4.makeRotation(Quaternion.fromMatrixRotation(widgetTransform)),\n );\n const transformedY = Vector3.multiplyByTransformMatrixRowMajor(\n yDirection,\n Matrix4.makeRotation(Quaternion.fromMatrixRotation(widgetTransform)),\n );\n // Position the rotation handle relative to the translation scale to\n // ensure that the rotation axis lines are angled inward.\n // This is a loose line of best fit based on the base scale of\n // `1` corresponding to a scalar of `10` and some experimentation.\n const relativePositionScalar = 10 * translationSizeScalar ** 0.25;\n\n const basePosition = Vector3.fromMatrixPosition(widgetTransform);\n const position = Vector3.add(\n basePosition,\n Vector3.scale(triangleSize * relativePositionScalar, transformedDirection),\n );\n\n const xRay = Ray.create({\n origin: position,\n direction: transformedX,\n });\n const yRay = Ray.create({\n origin: position,\n direction: transformedY,\n });\n const rotationAxis = Vector3.cross(transformedX, transformedY);\n\n const base = Vector3.rotateAboutAxis(\n Angle.toRadians(45),\n Ray.at(yRay, -(triangleSize * rotationSizeScalar)),\n rotationAxis,\n position,\n );\n const right = Vector3.rotateAboutAxis(\n Angle.toRadians(45),\n Ray.at(xRay, triangleSize * rotationSizeScalar),\n rotationAxis,\n position,\n );\n const up = Vector3.rotateAboutAxis(\n Angle.toRadians(45),\n Ray.at(yRay, triangleSize * rotationSizeScalar),\n rotationAxis,\n position,\n );\n const left = Vector3.rotateAboutAxis(\n Angle.toRadians(45),\n Ray.at(xRay, -(triangleSize * rotationSizeScalar)),\n rotationAxis,\n position,\n );\n\n return new TriangleMeshPoints(\n Vector3.dot(transformedX, camera.direction) !== -1 &&\n Vector3.dot(transformedY, camera.direction) !== -1,\n base,\n left,\n right,\n up,\n Vector3.multiplyByTransformMatrixColumnMajor(\n base,\n camera.projectionViewMatrix,\n ),\n Vector3.multiplyByTransformMatrixColumnMajor(\n left,\n camera.projectionViewMatrix,\n ),\n Vector3.multiplyByTransformMatrixColumnMajor(\n right,\n camera.projectionViewMatrix,\n ),\n Vector3.multiplyByTransformMatrixColumnMajor(\n up,\n camera.projectionViewMatrix,\n ),\n );\n}\n","import { BoundingBox, Point, Vector3 } from '@vertexvis/geometry';\n\nimport { Frame, Viewport } from '../../lib/types';\nimport { Drawable } from './drawable';\nimport { TriangleMesh } from './mesh';\n\nexport function testDrawable(\n drawable: Drawable,\n frame: Frame,\n viewport: Viewport,\n point: Point.Point,\n): boolean {\n if (drawable instanceof TriangleMesh) {\n return testTriangleMesh(drawable, frame, viewport, point);\n }\n return false;\n}\n\nexport function testTriangleMesh(\n mesh: TriangleMesh,\n frame: Frame,\n viewport: Viewport,\n point: Point.Point,\n): boolean {\n return (\n testTriangle(\n [mesh.points.worldLeft, mesh.points.worldRight, mesh.points.worldTip],\n frame,\n viewport,\n point,\n ) ||\n testTriangle(\n [mesh.points.worldLeft, mesh.points.worldRight, mesh.points.worldBase],\n frame,\n viewport,\n point,\n )\n );\n}\n\n/**\n * Adapted from https://en.wikipedia.org/wiki/M%C3%B6ller%E2%80%93Trumbore_intersection_algorithm.\n */\nexport function testTriangle(\n points: Vector3.Vector3[],\n frame: Frame,\n viewport: Viewport,\n point: Point.Point,\n): boolean {\n if (points.length === 3) {\n const ray = viewport.transformPointToRay(\n point,\n frame.image,\n frame.scene.camera,\n );\n\n const edge1 = Vector3.subtract(points[1], points[0]);\n const edge2 = Vector3.subtract(points[2], points[0]);\n\n const epsilon = BoundingBox.epsilon(\n BoundingBox.fromVectors([ray.direction, ray.origin, edge1, edge2]) ??\n BoundingBox.create(edge1, edge2),\n );\n\n const p = Vector3.cross(ray.direction, edge2);\n const det = Vector3.dot(edge1, p);\n\n // This check causes a `det` of NaN or 0 to return false\n // without needing to perform the subsequent calculations.\n if (!(Math.abs(det) >= epsilon)) {\n return false;\n }\n\n const t = Vector3.subtract(ray.origin, points[0]);\n const u = Vector3.dot(t, p) / det;\n\n if (u < 0 || u > 1) {\n return false;\n }\n\n const q = Vector3.cross(t, edge1);\n const v = Vector3.dot(ray.direction, q) / det;\n\n if (v < 0 || u + v > 1) {\n return false;\n }\n\n const r = Vector3.dot(edge2, q) / det;\n\n // Ignore the case where the computed hit position is negative\n // if in orthographic to correctly return hit results when close\n // to the camera.\n // TODO: revisit with https://vertexvis.atlassian.net/browse/PLAT-1549\n return !Number.isNaN(r) && (r > 0 || frame.scene.camera.isOrthographic());\n }\n return false;\n}\n","import { Matrix4 } from '@vertexvis/geometry';\nimport { Point, Rectangle, Vector3 } from '@vertexvis/geometry';\nimport { Color, Disposable, EventDispatcher, Listener } from '@vertexvis/utils';\nimport regl from 'regl';\nimport shapeBuilder from 'regl-shape';\n\nimport {\n axisPositions,\n rotationAxisPositions,\n} from '../../lib/transforms/axis-lines';\nimport {\n xAxisRotationPositions,\n yAxisRotationPositions,\n zAxisRotationPositions,\n} from '../../lib/transforms/axis-rotation';\nimport {\n xAxisArrowPositions,\n xyAxisTranslationPositions,\n xzAxisTranslationPositions,\n yAxisArrowPositions,\n yzAxisTranslationPositions,\n zAxisArrowPositions,\n} from '../../lib/transforms/axis-translation';\nimport {\n computeDrawable2dBounds,\n Drawable,\n} from '../../lib/transforms/drawable';\nimport { testDrawable } from '../../lib/transforms/hits';\nimport { AxisLine, RotationLine } from '../../lib/transforms/line';\nimport { TriangleMesh } from '../../lib/transforms/mesh';\nimport { CreateShape } from '../../lib/transforms/shape';\nimport { Frame } from '../../lib/types';\nimport { ReglComponent } from '../../lib/webgl/regl-component';\n\nexport interface DrawableElementColors {\n xArrow?: Color.Color | string;\n yArrow?: Color.Color | string;\n zArrow?: Color.Color | string;\n twoAxesSquare?: Color.Color | string;\n hovered?: Color.Color | string;\n outline?: Color.Color | string;\n}\n\nexport interface DrawableElementSizeScalars {\n xRotation?: number;\n yRotation?: number;\n zRotation?: number;\n xTranslation?: number;\n yTranslation?: number;\n zTranslation?: number;\n xyTranslation?: number;\n xzTranslation?: number;\n yzTranslation?: number;\n}\n\nexport interface DisabledAxis {\n xRotation: boolean;\n yRotation: boolean;\n zRotation: boolean;\n xTranslation: boolean;\n yTranslation: boolean;\n zTranslation: boolean;\n xyTranslation: boolean;\n xzTranslation: boolean;\n yzTranslation: boolean;\n}\n\nexport interface TransformWidgetCustomization {\n colors?: DrawableElementColors;\n scalars?: DrawableElementSizeScalars;\n}\n\nexport class TransformWidget extends ReglComponent {\n private cursor?: Point.Point;\n\n private xAxis?: AxisLine;\n private yAxis?: AxisLine;\n private zAxis?: AxisLine;\n\n private xArrow?: TriangleMesh;\n private yArrow?: TriangleMesh;\n private zArrow?: TriangleMesh;\n\n private xRotation?: TriangleMesh;\n private xyRotationLine?: RotationLine;\n private xzRotationLine?: RotationLine;\n\n private yRotation?: TriangleMesh;\n private yxRotationLine?: RotationLine;\n private yzRotationLine?: RotationLine;\n\n private zRotation?: TriangleMesh;\n private zxRotationLine?: RotationLine;\n private zyRotationLine?: RotationLine;\n\n private xyTranslation?: TriangleMesh;\n private xzTranslation?: TriangleMesh;\n private yzTranslation?: TriangleMesh;\n\n private disabledAxis: DisabledAxis = {\n xTranslation: false,\n yTranslation: false,\n zTranslation: false,\n xyTranslation: false,\n xzTranslation: false,\n yzTranslation: false,\n xRotation: false,\n yRotation: false,\n zRotation: false,\n };\n\n private axisLines: AxisLine[] = [];\n private rotationLines: RotationLine[] = [];\n private translationMeshes: TriangleMesh[] = [];\n private rotationMeshes: TriangleMesh[] = [];\n private hoveredElement?: Drawable;\n\n private transform?: Matrix4.Matrix4;\n private interactiveBounds?: Rectangle.Rectangle;\n private fullBounds?: Rectangle.Rectangle;\n\n private hoveredChanged = new EventDispatcher<Drawable | undefined>();\n\n private xArrowFillColor?: Color.Color | string;\n private yArrowFillColor?: Color.Color | string;\n private zArrowFillColor?: Color.Color | string;\n\n private twoAxesSquareFillColor?: Color.Color | string;\n\n private hoveredArrowFillColor?: Color.Color | string;\n private outlineColor?: Color.Color | string;\n\n public constructor(\n canvasElement: HTMLCanvasElement,\n private customization: TransformWidgetCustomization = {},\n initialDisabledAxes: Partial<DisabledAxis> = {},\n ) {\n super(canvasElement);\n\n this.xArrowFillColor = customization.colors?.xArrow;\n this.yArrowFillColor = customization.colors?.yArrow;\n this.zArrowFillColor = customization.colors?.zArrow;\n this.hoveredArrowFillColor = customization.colors?.hovered;\n this.outlineColor = customization.colors?.outline;\n\n this.disabledAxis.xTranslation = initialDisabledAxes.xTranslation ?? false;\n this.disabledAxis.yTranslation = initialDisabledAxes.yTranslation ?? false;\n this.disabledAxis.zTranslation = initialDisabledAxes.zTranslation ?? false;\n this.disabledAxis.xyTranslation =\n initialDisabledAxes.xyTranslation ?? false;\n this.disabledAxis.xzTranslation =\n initialDisabledAxes.xzTranslation ?? false;\n this.disabledAxis.yzTranslation =\n initialDisabledAxes.yzTranslation ?? false;\n this.disabledAxis.xRotation = initialDisabledAxes.xRotation ?? false;\n this.disabledAxis.yRotation = initialDisabledAxes.yRotation ?? false;\n this.disabledAxis.zRotation = initialDisabledAxes.zRotation ?? false;\n }\n\n public dispose(): void {\n this.reglFrameDisposable?.cancel();\n }\n\n /**\n * @internal - visible for testing\n */\n public getDrawableElements(): Drawable[] {\n return this.drawableElements;\n }\n\n public getFullBounds(): Rectangle.Rectangle | undefined {\n return this.fullBounds;\n }\n\n public boundsContainsPoint(point: Point.Point): boolean {\n return (\n this.interactiveBounds != null &&\n this.frame != null &&\n Rectangle.containsPoints(this.interactiveBounds, point)\n );\n }\n\n public updateDisabledAxis(axis: Partial<DisabledAxis>): void {\n this.disabledAxis = {\n ...this.disabledAxis,\n ...axis,\n };\n this.updateDisabledOnDrawables();\n }\n\n public updateCursor(cursor?: Point.Point): void {\n this.cursor = cursor;\n\n if (cursor != null && this.frame != null) {\n this.updateHovered();\n } else {\n this.clearHovered();\n }\n }\n\n /**\n * @param transform A transformation matrix in row-major form.\n */\n public updateTransform(transform?: Matrix4.Matrix4): void {\n this.transform = transform;\n\n if (transform != null && this.frame != null) {\n this.updateAndDraw();\n } else {\n this.clear();\n this.reglFrameDisposable?.cancel();\n this.reglFrameDisposable = undefined;\n }\n }\n\n public updateColors(colors: DrawableElementColors = {}): void {\n this.xArrowFillColor = colors.xArrow ?? this.xArrowFillColor;\n this.yArrowFillColor = colors.yArrow ?? this.yArrowFillColor;\n this.zArrowFillColor = colors.zArrow ?? this.zArrowFillColor;\n this.twoAxesSquareFillColor =\n colors.twoAxesSquare ?? this.twoAxesSquareFillColor;\n this.hoveredArrowFillColor = colors.hovered ?? this.hoveredArrowFillColor;\n this.outlineColor = colors.outline ?? this.outlineColor;\n\n this.xArrow?.updateFillColor(this.getXTranslationColor(), true);\n this.yArrow?.updateFillColor(this.getYTranslationColor(), true);\n this.zArrow?.updateFillColor(this.getZTranslationColor(), true);\n this.xRotation?.updateFillColor(this.getXRotationColor(), true);\n this.yRotation?.updateFillColor(this.getYRotationColor(), true);\n this.zRotation?.updateFillColor(this.getZRotationColor(), true);\n this.xyTranslation?.updateFillColor(\n this.getTwoAxesTranslationColor(),\n true,\n );\n this.xzTranslation?.updateFillColor(\n this.getTwoAxesTranslationColor(),\n true,\n );\n this.yzTranslation?.updateFillColor(\n this.getTwoAxesTranslationColor(),\n true,\n );\n\n this.hoveredElement?.updateFillColor(this.hoveredArrowFillColor);\n }\n\n public updateScalars(scalars: DrawableElementSizeScalars): void {\n this.customization = {\n ...this.customization,\n scalars,\n };\n\n if (this.transform != null && this.frame != null) {\n this.updateElements(this.transform, this.frame);\n }\n }\n\n public onHoveredChanged(\n listener: Listener<Drawable | undefined>,\n ): Disposable {\n return this.hoveredChanged.on(listener);\n }\n\n private updateDisabledOnDrawables(): void {\n this.xRotation?.setDisabled(this.disabledAxis.xRotation);\n this.xyRotationLine?.setDisabled(this.disabledAxis.xRotation);\n this.xzRotationLine?.setDisabled(this.disabledAxis.xRotation);\n\n this.yRotation?.setDisabled(this.disabledAxis.yRotation);\n this.yzRotationLine?.setDisabled(this.disabledAxis.yRotation);\n this.yxRotationLine?.setDisabled(this.disabledAxis.yRotation);\n\n this.zRotation?.setDisabled(this.disabledAxis.zRotation);\n this.zxRotationLine?.setDisabled(this.disabledAxis.zRotation);\n this.zyRotationLine?.setDisabled(this.disabledAxis.zRotation);\n\n this.xArrow?.setDisabled(this.disabledAxis.xTranslation);\n this.yArrow?.setDisabled(this.disabledAxis.yTranslation);\n this.zArrow?.setDisabled(this.disabledAxis.zTranslation);\n\n this.xyTranslation?.setDisabled(this.disabledAxis.xyTranslation);\n this.xzTranslation?.setDisabled(this.disabledAxis.xzTranslation);\n this.yzTranslation?.setDisabled(this.disabledAxis.yzTranslation);\n\n this.updateColors();\n }\n\n private updateHovered(): void {\n const previousHovered = this.hoveredElement;\n const currentFrame = this.frame;\n\n if (currentFrame != null) {\n this.hoveredElement = [...this.translationMeshes, ...this.rotationMeshes]\n .filter((el) => el.points.valid && !el.isDisabled())\n .find((m) =>\n this.cursor != null\n ? testDrawable(m, currentFrame, this.viewport, this.cursor)\n : false,\n );\n\n if (this.hoveredElement !== previousHovered) {\n this.hoveredChanged.emit(this.hoveredElement);\n this.hoveredElement?.updateFillColor(this.hoveredArrowFillColor);\n this.clearFillColorOfPreviouslyHovered(previousHovered);\n\n // Set the corresponding arrows to the hover fill color\n // when a 2-axes translation square is hovered over\n if (this.hoveredElement?.identifier === 'xy-translate') {\n this.xArrow?.updateFillColor(this.hoveredArrowFillColor);\n this.yArrow?.updateFillColor(this.hoveredArrowFillColor);\n } else if (this.hoveredElement?.identifier === 'xz-translate') {\n this.xArrow?.updateFillColor(this.hoveredArrowFillColor);\n this.zArrow?.updateFillColor(this.hoveredArrowFillColor);\n } else if (this.hoveredElement?.identifier === 'yz-translate') {\n this.yArrow?.updateFillColor(this.hoveredArrowFillColor);\n this.zArrow?.updateFillColor(this.hoveredArrowFillColor);\n }\n }\n }\n }\n\n private clearHovered(): void {\n const previousHovered = this.hoveredElement;\n this.hoveredElement = undefined;\n\n if (this.hoveredElement !== previousHovered) {\n this.hoveredChanged.emit(this.hoveredElement);\n this.clearFillColorOfPreviouslyHovered(previousHovered);\n }\n }\n\n private clearFillColorOfPreviouslyHovered(previousHovered?: Drawable): void {\n previousHovered?.updateFillColor(previousHovered?.initialFillColor);\n\n // Also clear the hover fill color from the corresponding arrows\n // when a 2-axes translation square is no longer hovered over\n if (previousHovered?.identifier === 'xy-translate') {\n this.xArrow?.updateFillColor(this.xArrow?.initialFillColor);\n this.yArrow?.updateFillColor(this.yArrow?.initialFillColor);\n } else if (previousHovered?.identifier === 'xz-translate') {\n this.xArrow?.updateFillColor(this.xArrow?.initialFillColor);\n this.zArrow?.updateFillColor(this.zArrow?.initialFillColor);\n } else if (previousHovered?.identifier === 'yz-translate') {\n this.yArrow?.updateFillColor(this.yArrow?.initialFillColor);\n this.zArrow?.updateFillColor(this.zArrow?.initialFillColor);\n }\n }\n\n protected hasData(): boolean {\n return this.transform != null;\n }\n\n protected createOrUpdateElements(): void {\n if (this.transform != null && this.frame != null) {\n if (this.xArrow == null || this.yArrow == null || this.zArrow == null) {\n this.createElements(this.transform, this.frame);\n } else {\n this.updateElements(this.transform, this.frame);\n }\n\n this.interactiveBounds = computeDrawable2dBounds(\n this.viewport,\n ...this.rotationMeshes,\n ...this.translationMeshes,\n );\n this.fullBounds = computeDrawable2dBounds(\n this.viewport,\n ...this.rotationMeshes,\n ...this.translationMeshes,\n ...this.axisLines,\n );\n }\n }\n\n private createElements(transform: Matrix4.Matrix4, frame: Frame): void {\n this.reglCommand = regl({\n canvas: this.canvasElement,\n extensions: 'angle_instanced_arrays',\n });\n const { createShape } = shapeBuilder(this.reglCommand);\n\n const triangleSize = this.computeTriangleSize(\n Vector3.fromMatrixPosition(transform),\n frame,\n );\n\n this.xArrow = new TriangleMesh(\n createShape,\n 'x-translate',\n xAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xTranslation,\n ),\n this.outlineColor,\n this.getXTranslationColor(),\n );\n this.xRotation = new TriangleMesh(\n createShape,\n 'x-rotate',\n xAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xRotation,\n this.customization.scalars?.xTranslation,\n ),\n this.outlineColor,\n this.getXRotationColor(),\n );\n this.xAxis = new AxisLine(\n createShape,\n 'x-axis',\n axisPositions(transform, frame.scene.camera, this.xArrow),\n this.outlineColor,\n this.getXTranslationColor(),\n );\n\n this.yArrow = new TriangleMesh(\n createShape,\n 'y-translate',\n yAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yTranslation,\n ),\n this.outlineColor,\n this.getYTranslationColor(),\n );\n this.yRotation = new TriangleMesh(\n createShape,\n 'y-rotate',\n yAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yRotation,\n this.customization.scalars?.yTranslation,\n ),\n this.outlineColor,\n this.getYRotationColor(),\n );\n this.yAxis = new AxisLine(\n createShape,\n 'y-axis',\n axisPositions(transform, frame.scene.camera, this.yArrow),\n this.outlineColor,\n this.getYTranslationColor(),\n );\n\n this.zArrow = new TriangleMesh(\n createShape,\n 'z-translate',\n zAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.zTranslation,\n ),\n this.outlineColor,\n this.getZTranslationColor(),\n );\n this.zAxis = new AxisLine(\n createShape,\n 'z-axis',\n axisPositions(transform, frame.scene.camera, this.zArrow),\n this.outlineColor,\n this.getZTranslationColor(),\n );\n this.zRotation = new TriangleMesh(\n createShape,\n 'z-rotate',\n zAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.zRotation,\n this.customization.scalars?.zTranslation,\n ),\n this.outlineColor,\n this.getZRotationColor(),\n );\n\n this.xyTranslation = new TriangleMesh(\n createShape,\n 'xy-translate',\n xyAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xyTranslation,\n ),\n this.outlineColor,\n this.getTwoAxesTranslationColor(),\n );\n this.xzTranslation = new TriangleMesh(\n createShape,\n 'xz-translate',\n xzAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xzTranslation,\n ),\n this.outlineColor,\n this.getTwoAxesTranslationColor(),\n );\n this.yzTranslation = new TriangleMesh(\n createShape,\n 'yz-translate',\n yzAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yzTranslation,\n ),\n this.outlineColor,\n this.getTwoAxesTranslationColor(),\n );\n\n this.createRotationLines(createShape, transform, frame);\n\n this.axisLines = [this.xAxis, this.yAxis, this.zAxis];\n this.translationMeshes = [\n this.xArrow,\n this.yArrow,\n this.zArrow,\n this.xyTranslation,\n this.xzTranslation,\n this.yzTranslation,\n ];\n this.rotationMeshes = [this.xRotation, this.yRotation, this.zRotation];\n this.updateDisabledOnDrawables();\n\n this.availableElements = [\n ...this.axisLines,\n ...this.rotationLines,\n ...this.translationMeshes,\n ...this.rotationMeshes,\n ];\n }\n\n private getXRotationColor(): Color.Color | string | undefined {\n return this.xArrowFillColor;\n }\n\n private getYRotationColor(): Color.Color | string | undefined {\n return this.yArrowFillColor;\n }\n\n private getZRotationColor(): Color.Color | string | undefined {\n return this.zArrowFillColor;\n }\n\n private getXTranslationColor(): Color.Color | string | undefined {\n return this.xArrowFillColor;\n }\n\n private getYTranslationColor(): Color.Color | string | undefined {\n return this.yArrowFillColor;\n }\n\n private getZTranslationColor(): Color.Color | string | undefined {\n return this.zArrowFillColor;\n }\n\n private getTwoAxesTranslationColor(): Color.Color | string | undefined {\n return this.twoAxesSquareFillColor;\n }\n\n private createRotationLines(\n createShape: CreateShape,\n transform: Matrix4.Matrix4,\n frame: Frame,\n ): void {\n const triangleSize = this.computeTriangleSize(\n Vector3.fromMatrixPosition(transform),\n frame,\n );\n\n const xyRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.xRotation,\n this.yArrow?.points.worldTip,\n triangleSize,\n );\n const xzRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.xRotation,\n this.zArrow?.points.worldTip,\n triangleSize,\n );\n const yxRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.yRotation,\n this.xArrow?.points.worldTip,\n triangleSize,\n );\n const yzRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.yRotation,\n this.zArrow?.points.worldTip,\n triangleSize,\n );\n const zxRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.zRotation,\n this.xArrow?.points.worldTip,\n triangleSize,\n );\n const zyRotationLinePoints = rotationAxisPositions(\n frame.scene.camera,\n this.zRotation,\n this.yArrow?.points.worldTip,\n triangleSize,\n );\n\n if (xyRotationLinePoints != null) {\n this.xyRotationLine = new RotationLine(\n createShape,\n 'xy-rotation-line',\n xyRotationLinePoints,\n this.outlineColor,\n );\n }\n if (xzRotationLinePoints != null) {\n this.xzRotationLine = new RotationLine(\n createShape,\n 'xz-rotation-line',\n xzRotationLinePoints,\n this.outlineColor,\n );\n }\n if (yxRotationLinePoints != null) {\n this.yxRotationLine = new RotationLine(\n createShape,\n 'yx-rotation-line',\n yxRotationLinePoints,\n this.outlineColor,\n );\n }\n if (yzRotationLinePoints != null) {\n this.yzRotationLine = new RotationLine(\n createShape,\n 'yz-rotation-line',\n yzRotationLinePoints,\n this.outlineColor,\n );\n }\n if (zxRotationLinePoints != null) {\n this.zxRotationLine = new RotationLine(\n createShape,\n 'zx-rotation-line',\n zxRotationLinePoints,\n this.outlineColor,\n );\n }\n if (zyRotationLinePoints != null) {\n this.zyRotationLine = new RotationLine(\n createShape,\n 'zy-rotation-line',\n zyRotationLinePoints,\n this.outlineColor,\n );\n }\n\n this.rotationLines = [\n this.xyRotationLine,\n this.xzRotationLine,\n this.yxRotationLine,\n this.yzRotationLine,\n this.zxRotationLine,\n this.zyRotationLine,\n ].filter((l) => l != null) as RotationLine[];\n }\n\n private updateElements(transform: Matrix4.Matrix4, frame: Frame): void {\n const triangleSize = this.computeTriangleSize(\n Vector3.fromMatrixPosition(transform),\n frame,\n );\n\n if (this.xArrow != null) {\n this.xArrow.updatePoints(\n xAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xTranslation,\n ),\n );\n this.xAxis?.updatePoints(\n axisPositions(transform, frame.scene.camera, this.xArrow),\n );\n }\n this.xRotation?.updatePoints(\n xAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xRotation,\n this.customization.scalars?.xTranslation,\n ),\n );\n\n if (this.yArrow != null) {\n this.yArrow.updatePoints(\n yAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yTranslation,\n ),\n );\n this.yAxis?.updatePoints(\n axisPositions(transform, frame.scene.camera, this.yArrow),\n );\n }\n this.yRotation?.updatePoints(\n yAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yRotation,\n this.customization.scalars?.yTranslation,\n ),\n );\n\n if (this.zArrow != null) {\n this.zArrow.updatePoints(\n zAxisArrowPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.zTranslation,\n ),\n );\n this.zAxis?.updatePoints(\n axisPositions(transform, frame.scene.camera, this.zArrow),\n );\n }\n this.zRotation?.updatePoints(\n zAxisRotationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.zRotation,\n this.customization.scalars?.zTranslation,\n ),\n );\n\n this.xyRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.xRotation,\n this.yArrow?.points.worldTip,\n triangleSize,\n ),\n );\n this.xzRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.xRotation,\n this.zArrow?.points.worldTip,\n triangleSize,\n ),\n );\n this.yxRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.yRotation,\n this.xArrow?.points.worldTip,\n triangleSize,\n ),\n );\n this.yzRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.yRotation,\n this.zArrow?.points.worldTip,\n triangleSize,\n ),\n );\n this.zxRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.zRotation,\n this.xArrow?.points.worldTip,\n triangleSize,\n ),\n );\n this.zyRotationLine?.updatePoints(\n rotationAxisPositions(\n frame.scene.camera,\n this.zRotation,\n this.yArrow?.points.worldTip,\n triangleSize,\n ),\n );\n\n if (this.xyTranslation != null) {\n this.xyTranslation.updatePoints(\n xyAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xyTranslation,\n ),\n );\n }\n if (this.xzTranslation != null) {\n this.xzTranslation.updatePoints(\n xzAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.xzTranslation,\n ),\n );\n }\n if (this.yzTranslation != null) {\n this.yzTranslation.updatePoints(\n yzAxisTranslationPositions(\n transform,\n frame.scene.camera,\n triangleSize,\n this.customization.scalars?.yzTranslation,\n ),\n );\n }\n }\n}\n",":host {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n /**\n * @prop --viewer-transform-widget-x-axis-arrow-color: A CSS color for the arrow\n * at the end of the X axis on this widget. Defaults to `#ea3324`.\n */\n --viewer-transform-widget-x-axis-arrow-color: var(--x-axis-color);\n\n /**\n * @prop --viewer-transform-widget-y-axis-arrow-color: A CSS color for the arrow\n * at the end of the Y axis on this widget. Defaults to `#4faf32`.\n */\n --viewer-transform-widget-y-axis-arrow-color: var(--y-axis-color);\n\n /**\n * @prop --viewer-transform-widget-z-axis-arrow-color: A CSS color for the arrow\n * at the end of the Z axis on this widget. Defaults to `#0000ff`.\n */\n --viewer-transform-widget-z-axis-arrow-color: var(--z-axis-color);\n\n /**\n * @prop --viewer-transform-widget-two-axes-square-color: A CSS color for the squares\n * to translate by two axes at a time. Defaults to `#e0e0e0`.\n */\n --viewer-transform-widget-two-axes-square-color: var(--two-axes-color);\n\n\n /**\n * @prop --viewer-transform-widget-hovered-arrow-color: A CSS color for the arrow\n * when it is hovered. Defaults to `#ffff00`.\n */\n --viewer-transform-widget-hovered-arrow-color: #ffff00;\n\n /**\n * @prop --viewer-transform-widget-input-width: A CSS length for the width of the\n * input displayed near the handles. Defaults to `8em`.\n */\n --viewer-transform-widget-input-width: 8em;\n}\n\n.widget {\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.widget.hovered {\n pointer-events: auto;\n}\n\n.widget-input.wrapper {\n position: absolute;\n pointer-events: auto;\n display: flex;\n align-items: center;\n border: 1px solid #444444;\n border-radius: 4px;\n width: var(--viewer-transform-widget-input-width);\n text-align: center;\n background-color: white;\n box-sizing: border-box;\n}\n\n.widget-input.units {\n position: relative;\n width: 25%;\n height: 100%;\n padding: 0 0.25rem;\n font-size: 0.8125rem;\n color: #444444;\n}\n\ninput.widget-input {\n position: relative;\n text-align: center;\n box-sizing: border-box;\n width: 75%;\n height: 100%;\n outline: none;\n border-width: 0 1px 0 0;\n border-color: #444444;\n border-radius: 2px 0 0 2px;\n font-size: 0.875rem;\n color: #444444;\n}\n\ninput.widget-input.x-translate,\ninput.widget-input.x-rotate {\n border-left: 5px solid var(--viewer-transform-widget-x-axis-arrow-color);\n}\n\ninput.widget-input.y-translate,\ninput.widget-input.y-rotate {\n border-left: 5px solid var(--viewer-transform-widget-y-axis-arrow-color);\n}\n\ninput.widget-input.z-translate,\ninput.widget-input.z-rotate {\n border-left: 5px solid var(--viewer-transform-widget-z-axis-arrow-color);\n}\n\ninput.widget-input:disabled {\n color: #888888;\n}\n\ninput.widget-input:focus {\n outline: none;\n}","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport {\n Angle,\n Euler,\n Matrix4,\n Point,\n Quaternion,\n Vector3,\n} from '@vertexvis/geometry';\nimport { Color, Disposable } from '@vertexvis/utils';\nimport classNames from 'classnames';\n\nimport { readDOM, writeDOM } from '../../lib/stencil';\nimport { TransformController } from '../../lib/transforms';\nimport { Drawable } from '../../lib/transforms/drawable';\nimport {\n AngleUnits,\n AngleUnitType,\n DistanceUnits,\n DistanceUnitType,\n} from '../../lib/types';\nimport { ModifierKey } from '../../lib/types/keys';\nimport { focusInputElement } from './dom';\nimport {\n calculateNewRotationAngle,\n computeHandleDeltaTransform,\n computeInputDeltaTransform,\n computeInputDisplayValue,\n computeInputPosition,\n convertCanvasPointToWorld,\n convertPointToCanvas,\n PointAndPlacement,\n} from './util';\nimport {\n TransformWidgetInput,\n TransformWidgetInputWrapper,\n} from './viewer-transform-widget-components';\nimport { TransformWidget } from './widget';\n\n@Component({\n tag: 'vertex-viewer-transform-widget',\n styleUrl: 'viewer-transform-widget.css',\n shadow: true,\n})\nexport class ViewerTransformWidget {\n /**\n * An event that is emitted when the position of the widget changes.\n */\n @Event({ bubbles: true })\n public positionChanged!: EventEmitter<Vector3.Vector3 | undefined>;\n\n /**\n * An event that is emitted when the rotation of the widget changes.\n */\n @Event({ bubbles: true })\n public rotationChanged!: EventEmitter<Euler.Euler | undefined>;\n\n /**\n * An event that is emitted when the interaction has ended\n */\n @Event({ bubbles: true })\n public interactionEnded!: EventEmitter<Matrix4.Matrix4 | undefined>;\n\n /**\n * An event that is emitted an interaction with the widget has started\n */\n @Event({ bubbles: true })\n public interactionStarted!: EventEmitter<void>;\n\n /**\n * The viewer to connect to transforms. If nested within a <vertex-viewer>,\n * this property will be populated automatically.\n */\n @Prop()\n public viewer?: HTMLVertexViewerElement;\n\n /**\n * The starting position of this transform widget. This position will be updated\n * as transforms occur. Setting this value to `undefined` will remove the widget.\n */\n @Prop({ mutable: true })\n public position?: Vector3.Vector3;\n\n /**\n * The starting angle for the transform widget. This rotation will be updated\n * as the rotations occur.\n */\n @Prop({ mutable: true })\n public rotation?: Euler.Euler;\n\n /**\n * The controller that is responsible for performing transforms.\n */\n @Prop({ mutable: true })\n public controller?: TransformController;\n\n /**\n * Determines whether the x-rotation is disabled on the widget\n */\n @Prop({ mutable: true })\n public xRotationDisabled = false;\n\n /**\n * Determines whether the y-rotation is disabled on the widget\n */\n @Prop({ mutable: true })\n public yRotationDisabled = false;\n\n /**\n * Determines whether the z-rotation is disabled on the widget\n */\n @Prop({ mutable: true })\n public zRotationDisabled = false;\n\n /**\n * Determines whether the x-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public xTranslationDisabled = false;\n\n /**\n * Determines whether the y-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public yTranslationDisabled = false;\n\n /**\n * Determines whether the z-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public zTranslationDisabled = false;\n\n /**\n * Determines whether the xy-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public xyTranslationDisabled = false;\n\n /**\n * Determines whether the xz-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public xzTranslationDisabled = false;\n\n /**\n * Determines whether the yz-translation is disabled on the widget\n */\n @Prop({ mutable: true })\n public yzTranslationDisabled = false;\n\n /**\n * Whether to show inputs beside the widget handles when they are interacted with.\n * Defaults to `true`.\n */\n @Prop()\n public showInputs = true;\n\n /**\n * The unit to show for translation inputs. Defaults to `millimeters`.\n *\n * @see DistanceUnitType\n */\n @Prop()\n public distanceUnit: DistanceUnitType = 'millimeters';\n\n /**\n * The unit to show for rotation inputs. Defaults to `degrees`.\n *\n * @see AngleUnitType\n */\n @Prop()\n public angleUnit: AngleUnitType = 'degrees';\n\n /**\n * The number of decimal places to show in the input. Defaults to `1`.\n */\n @Prop()\n public decimalPlaces = 1;\n\n /**\n * When defined, the widget will snap to the degree of the nearest multiple of\n * the given number when the user is rotating with the widget and holding the\n * key defined by rotationSnapKey. Defaults to undefined.\n */\n @Prop()\n public rotationSnapDegrees?: number;\n\n /**\n * When rotationSnapDegrees is defined, the widget will snap to the degree of the\n * nearest multiple of the given number when the user is rotating with the widget\n * and holding the key defined here. Defaults to the shift key.\n */\n @Prop()\n public rotationSnapKey: ModifierKey = 'shift';\n\n /**\n * Scalar to increase the size of the translation handles of this widget.\n * Values above zero and below three will result in the best visual representation\n * of the handles, and values above three may produce unexpected results.\n *\n * Defaults to `1`.\n */\n @Prop()\n public translationHandleScalar = 1;\n\n /**\n * Scalar to increase the size of the rotation handles of this widget.\n * Values above zero and below three will result in the best visual representation\n * of the handles, and values above three may produce unexpected results.\n *\n * Defaults to `1`.\n */\n @Prop()\n public rotationHandleScalar = 1;\n\n /**\n * Specifies the frequency, in milliseconds, to update the transform while interacting with the widget.\n *\n * This delay is used to group events happening in quick succession and results in smoother\n * widget movement.\n */\n @Prop()\n public interactionThrottle = 75;\n\n /**\n * **EXPERIMENTAL.**\n *\n * Enables Command+Z and Control+Z keybindings to perform an undo of\n * the previous delta transformation.\n *\n * @see `EXPERIMENTAL_undo`\n */\n @Prop()\n public EXPERIMENTAL_undoKeybindings = false;\n\n /**\n * @internal\n * @ignore\n *\n * Visible for testing.\n */\n @Prop({ mutable: true })\n public hovered?: Drawable;\n\n @State()\n protected inputPosition?: PointAndPlacement;\n\n @State()\n protected inputValue = 0;\n\n @State()\n protected isEndingTransform = false;\n\n @State()\n protected inputShouldFocus = false;\n\n @Element()\n private hostEl!: HTMLElement;\n\n // Transformation matrices in row-major form\n private startingTransform?: Matrix4.Matrix4;\n private currentTransform?: Matrix4.Matrix4;\n private dragStartTransform?: Matrix4.Matrix4;\n\n private xArrowColor: Color.Color | string = '#ea3324';\n private yArrowColor: Color.Color | string = '#4faf32';\n private zArrowColor: Color.Color | string = '#0000ff';\n private twoAxesSquareColor: Color.Color | string = '#e0e0e0';\n private hoveredColor: Color.Color | string = '#ffff00';\n\n private widget?: TransformWidget;\n private lastDragged?: Drawable;\n private dragging?: Drawable;\n private lastAngle = 0;\n private lastWorldPosition?: Vector3.Vector3;\n private lastInputValue?: number;\n\n private canvasBounds?: DOMRect;\n private inputBounds?: DOMRect;\n private canvasResizeObserver?: ResizeObserver;\n private inputResizeObserver?: ResizeObserver;\n private hostStyleObserver?: MutationObserver;\n private canvasRef?: HTMLCanvasElement;\n private inputWrapperRef?: HTMLDivElement;\n private inputRef?: HTMLInputElement;\n\n private hoveredChangeDisposable?: Disposable;\n\n private interactionTimer?: number;\n private lastMouseEvent?: PointerEvent;\n\n protected componentDidLoad(): void {\n window.addEventListener('pointermove', this.handlePointerMove);\n\n this.canvasResizeObserver = new ResizeObserver(this.handleResize);\n this.inputResizeObserver = new ResizeObserver(this.handleInputResize);\n this.hostStyleObserver = new MutationObserver(this.handleStyleChange);\n\n if (this.canvasRef != null) {\n this.canvasResizeObserver.observe(this.canvasRef);\n\n this.setupTransformWidget(this.canvasRef);\n }\n\n this.hostStyleObserver.observe(this.hostEl, {\n attributes: true,\n attributeFilter: ['style'],\n });\n\n this.handleViewerChanged(this.viewer, undefined);\n this.handleStyleChange();\n }\n\n protected disconnectedCallback(): void {\n window.removeEventListener('pointermove', this.handlePointerMove);\n\n this.canvasResizeObserver?.disconnect();\n this.inputResizeObserver?.disconnect();\n this.hostStyleObserver?.disconnect();\n\n this.hoveredChangeDisposable?.dispose();\n this.widget?.dispose();\n }\n\n protected componentDidRender(): void {\n if (this.inputShouldFocus && this.inputRef != null) {\n focusInputElement(this.inputRef);\n this.inputShouldFocus = false;\n }\n }\n\n /**\n * **EXPERIMENTAL.**\n *\n * Performs an undo of the most recent set of transform manipulations,\n * categorized by the last pause in interactivity (pointerup on a handle,\n * Enter press on an input, keyup on an input).\n *\n * Note that this *does not* work repeatedly. I.e. only one undo can be\n * performed, and once another set of transform manipulations is performed,\n * the history is lost.\n */\n @Method()\n public async EXPERIMENTAL_undo(): Promise<void> {\n const undoDelta = await this.controller?.EXPERIMENTAL_undoTransform();\n\n if (this.currentTransform != null && undoDelta != null) {\n this.currentTransform = Matrix4.multiply(\n this.currentTransform,\n undoDelta,\n );\n\n this.widget?.updateTransform(this.currentTransform);\n\n this.updateInputPosition();\n this.updateInputValue();\n this.lastInputValue = this.inputValue;\n\n this.position = Vector3.fromMatrixPosition(this.currentTransform);\n this.rotation = Euler.fromRotationMatrix(this.currentTransform);\n }\n }\n\n /**\n * @ignore\n */\n @Watch('viewer')\n protected handleViewerChanged(\n newViewer?: HTMLVertexViewerElement,\n oldViewer?: HTMLVertexViewerElement,\n ): void {\n oldViewer?.removeEventListener('frameDrawn', this.handleViewerFrameDrawn);\n oldViewer?.removeEventListener(\n 'dimensionschange',\n this.handleViewerDimensionsChange,\n );\n newViewer?.addEventListener('frameDrawn', this.handleViewerFrameDrawn);\n newViewer?.addEventListener(\n 'dimensionschange',\n this.handleViewerDimensionsChange,\n );\n\n if (newViewer?.stream != null) {\n this.controller?.dispose();\n this.controller = new TransformController(newViewer.stream);\n }\n }\n\n /**\n * @ignore\n */\n @Watch('xTranslationDisabled')\n @Watch('yTranslationDisabled')\n @Watch('zTranslationDisabled')\n @Watch('xyTranslationDisabled')\n @Watch('xzTranslationDisabled')\n @Watch('yzTranslationDisabled')\n @Watch('xRotationDisabled')\n @Watch('yRotationDisabled')\n @Watch('zRotationDisabled')\n protected handleDisabledPropertyChanged(): void {\n this.widget?.updateDisabledAxis({\n xRotation: this.xRotationDisabled,\n yRotation: this.yRotationDisabled,\n zRotation: this.zRotationDisabled,\n\n xTranslation: this.xTranslationDisabled,\n yTranslation: this.yTranslationDisabled,\n zTranslation: this.zTranslationDisabled,\n\n xyTranslation: this.xyTranslationDisabled,\n xzTranslation: this.xzTranslationDisabled,\n yzTranslation: this.yzTranslationDisabled,\n });\n }\n\n /**\n * @ignore\n */\n @Watch('translationHandleScalar')\n @Watch('rotationHandleScalar')\n protected handleTransformHandleScalarChanged(): void {\n const effectiveArrowScalar = this.getTranslationScalar();\n const effectiveSquareScalar = this.getRotationScalar();\n\n this.widget?.updateScalars({\n xTranslation: effectiveArrowScalar,\n yTranslation: effectiveArrowScalar,\n zTranslation: effectiveArrowScalar,\n xyTranslation: effectiveSquareScalar,\n xzTranslation: effectiveSquareScalar,\n yzTranslation: effectiveSquareScalar,\n xRotation: effectiveSquareScalar,\n yRotation: effectiveSquareScalar,\n zRotation: effectiveSquareScalar,\n });\n }\n\n /**\n * @ignore\n */\n @Watch('rotation')\n protected handleRotationChanged(\n newRotation?: Euler.Euler,\n oldRotation?: Euler.Euler,\n ): void {\n const rotationToApply = newRotation ?? Euler.create();\n\n this.currentTransform = this.getTransformForNewRotation(rotationToApply);\n this.startingTransform = this.currentTransform;\n\n // If the removal of the previous rotation above results in an identity matrix,\n // clear the transformation on the widget to prevent it from appearing at the origin.\n if (\n newRotation == null &&\n this.currentTransform != null &&\n Matrix4.isIdentity(this.currentTransform)\n ) {\n this.currentTransform = undefined;\n this.startingTransform = this.currentTransform;\n }\n\n this.widget?.updateTransform(this.currentTransform);\n\n console.debug(\n `Updating widget rotation [previous=${JSON.stringify(\n oldRotation,\n )}, current=${JSON.stringify(newRotation)}]`,\n );\n\n this.rotationChanged.emit(newRotation);\n }\n\n /**\n * @ignore\n */\n @Watch('position')\n protected handlePositionChanged(\n newPosition?: Vector3.Vector3,\n oldPosition?: Vector3.Vector3,\n ): void {\n this.currentTransform = this.getTransformForNewPosition(newPosition);\n this.startingTransform = this.currentTransform;\n\n console.debug(\n `Updating widget position [previous=${JSON.stringify(\n oldPosition,\n )}, current=${JSON.stringify(newPosition)}]`,\n );\n this.widget?.updateTransform(this.currentTransform);\n\n if (newPosition == null) {\n this.lastDragged = undefined;\n this.inputPosition = undefined;\n this.controller?.clearTransform();\n }\n\n this.positionChanged.emit(newPosition);\n }\n\n /**\n * @ignore\n */\n @Watch('distanceUnit')\n @Watch('angleUnit')\n @Watch('decimalPlaces')\n protected handleInputFormattingChanged(): void {\n this.updateInputValue();\n this.lastInputValue = this.inputValue;\n }\n\n public render(): h.JSX.IntrinsicElements {\n return (\n <Host>\n <canvas\n ref={(el) => {\n this.canvasRef = el;\n }}\n class={classNames('widget', {\n hovered: this.hovered != null,\n })}\n tabindex=\"0\"\n width={this.viewer?.viewport.width}\n height={this.viewer?.viewport.height}\n onPointerDown={this.handleBeginDrag}\n onKeyDown={this.handleKeyDown}\n />\n\n {this.showInputs && this.inputPosition && this.viewer?.viewport && (\n <TransformWidgetInputWrapper\n ref={(el) => {\n if (el != null) {\n this.inputResizeObserver?.observe(el);\n } else if (this.inputRef != null) {\n this.inputResizeObserver?.unobserve(this.inputRef);\n }\n this.inputWrapperRef = el;\n }}\n bounds={this.inputBounds}\n viewport={this.viewer.viewport}\n point={this.inputPosition.point}\n placement={this.inputPosition.placement}\n displayUnit={this.getDisplayedUnits()}\n >\n <TransformWidgetInput\n ref={(el) => {\n this.inputRef = el;\n }}\n identifier={\n this.dragging?.identifier ?? this.lastDragged?.identifier\n }\n disabled={this.isEndingTransform}\n onChange={this.handleInputChange}\n onIncrement={() => this.handleInputStep(1)}\n onDecrement={() => this.handleInputStep(-1)}\n onBlur={() => {\n this.inputShouldFocus = false;\n }}\n onUndo={\n this.EXPERIMENTAL_undoKeybindings\n ? () => this.EXPERIMENTAL_undo()\n : undefined\n }\n />\n </TransformWidgetInputWrapper>\n )}\n </Host>\n );\n }\n\n private handleHoveredDrawableChanged = (drawable?: Drawable): void => {\n this.hovered = drawable;\n };\n\n private handleViewerFrameDrawn = (): void => {\n this.updatePropsFromViewer();\n };\n\n private handleViewerDimensionsChange = (): void => {\n writeDOM(() => {\n if (this.viewer != null && this.canvasRef != null) {\n this.canvasRef.width = this.viewer.viewport.width;\n this.canvasRef.height = this.viewer.viewport.height;\n\n this.updateCanvasBounds(this.canvasRef);\n }\n });\n };\n\n private handleResize = (): void => {\n if (this.canvasRef != null) {\n this.updateCanvasBounds(this.canvasRef);\n }\n };\n\n private handleInputResize = (): void => {\n if (this.inputWrapperRef != null) {\n const wrapperElement = this.inputWrapperRef;\n\n readDOM(() => {\n this.inputBounds = wrapperElement.getBoundingClientRect();\n });\n }\n };\n\n private handleStyleChange = (): void => {\n readDOM(() => {\n const hostStyles = window.getComputedStyle(this.hostEl);\n\n this.xArrowColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-x-axis-arrow-color')\n .trim();\n this.yArrowColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-y-axis-arrow-color')\n .trim();\n this.zArrowColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-z-axis-arrow-color')\n .trim();\n this.twoAxesSquareColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-two-axes-square-color')\n .trim();\n this.hoveredColor = hostStyles\n .getPropertyValue('--viewer-transform-widget-hovered-arrow-color')\n .trim();\n\n this.getTransformWidget().updateColors({\n xArrow: this.xArrowColor,\n yArrow: this.yArrowColor,\n zArrow: this.zArrowColor,\n twoAxesSquare: this.twoAxesSquareColor,\n hovered: this.hoveredColor,\n });\n });\n };\n\n private handlePointerMove = (event: PointerEvent): void => {\n if (this.dragging == null) {\n const canvasPoint = convertPointToCanvas(\n Point.create(event.clientX, event.clientY),\n this.getCanvasBounds(),\n );\n const widget = this.getTransformWidget();\n\n if (canvasPoint != null && widget.boundsContainsPoint(canvasPoint)) {\n widget.updateCursor(canvasPoint);\n } else {\n widget.updateCursor(undefined);\n this.hovered = undefined;\n }\n }\n };\n\n private handleBeginDrag = async (event: PointerEvent): Promise<void> => {\n const canvasBounds = this.getCanvasBounds();\n\n if (\n this.hovered != null &&\n canvasBounds != null &&\n this.viewer != null &&\n this.position != null &&\n this.viewer.frame != null\n ) {\n this.dragging = this.hovered;\n\n if (this.dragging.identifier !== this.lastDragged?.identifier) {\n this.inputValue = 0;\n this.dragStartTransform = this.currentTransform;\n this.updateInputPosition();\n this.updateInputValue();\n }\n this.lastDragged = undefined;\n\n const currentCanvas = convertPointToCanvas(\n Point.create(event.clientX, event.clientY),\n canvasBounds,\n );\n const widgetCenter = this.viewer.viewport.transformWorldToViewport(\n this.position,\n this.viewer.frame.scene.camera.projectionViewMatrix,\n );\n\n this.lastAngle =\n currentCanvas != null\n ? Angle.fromPoints(widgetCenter, currentCanvas)\n : 0;\n\n this.lastWorldPosition = convertCanvasPointToWorld(\n currentCanvas,\n this.viewer?.frame,\n this.viewer?.viewport,\n this.currentTransform,\n );\n\n this.interactionStarted.emit();\n\n window.removeEventListener('pointermove', this.handlePointerMove);\n window.addEventListener('pointermove', this.handleDragWithTimer);\n window.addEventListener('pointerup', this.handleEndTransform);\n }\n };\n\n private handleDragWithTimer = async (event: PointerEvent): Promise<void> => {\n if (event != null) {\n // Prevent selection of text and interaction with view cube while dragging the widget\n event.preventDefault();\n\n this.lastMouseEvent = event;\n }\n\n if (this.interactionTimer == null) {\n this.interactionTimer = window.setTimeout(async () => {\n this.interactionTimer = undefined;\n await this.handleDrag();\n this.lastMouseEvent = undefined;\n }, this.interactionThrottle);\n }\n };\n\n private handleDrag = async (): Promise<void> => {\n const canvasBounds = this.getCanvasBounds();\n\n if (\n this.dragging != null &&\n this.lastWorldPosition != null &&\n canvasBounds != null &&\n this.viewer != null &&\n this.viewer.frame != null &&\n this.position != null &&\n this.lastMouseEvent != null\n ) {\n // Begin the transform on the first `pointermove` event as opposed to the\n // `pointerdown` to prevent accidental no-op transforms (identity matrix).\n await this.controller?.beginTransform();\n\n const currentCanvas = convertPointToCanvas(\n Point.create(this.lastMouseEvent.clientX, this.lastMouseEvent.clientY),\n canvasBounds,\n );\n const widgetCenter = this.viewer.viewport.transformWorldToViewport(\n this.position,\n this.viewer.frame.scene.camera.projectionViewMatrix,\n );\n\n const currentWorld = convertCanvasPointToWorld(\n currentCanvas,\n this.viewer?.frame,\n this.viewer?.viewport,\n this.currentTransform,\n );\n\n if (\n currentWorld != null &&\n currentCanvas != null &&\n widgetCenter != null\n ) {\n const angle = Angle.fromPoints(widgetCenter, currentCanvas);\n const angleToUse = calculateNewRotationAngle(\n this.lastMouseEvent,\n this.rotationSnapKey,\n angle,\n this.lastAngle,\n this.getDisplayedAngle(),\n this.rotationSnapDegrees,\n );\n\n this.transform(\n this.lastWorldPosition,\n currentWorld,\n angleToUse - this.lastAngle,\n );\n\n this.updateInputPosition();\n this.updateInputValue();\n\n this.lastWorldPosition = currentWorld;\n this.lastAngle = angleToUse;\n }\n }\n };\n\n private handleEndTransform = async (event: PointerEvent): Promise<void> => {\n const canvasPoint = convertPointToCanvas(\n Point.create(event.clientX, event.clientY),\n this.getCanvasBounds(),\n );\n const widget = this.getTransformWidget();\n this.lastDragged = this.dragging;\n\n this.dragging = undefined;\n this.lastWorldPosition = undefined;\n this.lastAngle = 0;\n\n this.updateInputPosition();\n this.updateInputValue();\n\n widget.updateCursor(canvasPoint);\n widget.updateTransform(this.currentTransform);\n\n this.beginEndTransform();\n\n window.removeEventListener('pointermove', this.handleDragWithTimer);\n window.removeEventListener('pointerup', this.handleEndTransform);\n\n try {\n const delta = this.controller?.getCurrentDelta();\n\n await this.controller?.endTransform();\n\n this.interactionEnded.emit(delta);\n } catch (e) {\n console.error('Failed to end transform interaction', e);\n }\n\n window.addEventListener('pointermove', this.handlePointerMove);\n\n this.completeEndTransform();\n };\n\n private handleInputStep = async (step: number): Promise<void> => {\n if (this.inputValue != null && this.lastInputValue != null) {\n // If modifying angle units, we want to adjust the step to always\n // perform the equivalent of a 1-degree rotation.\n if (this.isModifyingAngleUnits()) {\n const angles = new AngleUnits(this.angleUnit);\n const previous = angles.convertFrom(this.lastInputValue);\n const next = Angle.normalizeRadians(previous + Angle.toRadians(step));\n\n this.inputValue = angles.convertTo(next);\n } else {\n this.inputValue = this.lastInputValue + step;\n }\n await this.updateTransformFromInput(this.inputValue);\n }\n };\n\n private handleInputChange = async (value: number): Promise<void> => {\n await this.updateTransformFromInput(value);\n };\n\n private handleKeyDown = async (event: KeyboardEvent): Promise<void> => {\n const commandOrControlModifier = event.ctrlKey || event.metaKey;\n\n if (\n event.key === 'z' &&\n commandOrControlModifier &&\n this.EXPERIMENTAL_undoKeybindings\n ) {\n event.stopPropagation();\n await this.EXPERIMENTAL_undo();\n }\n };\n\n private updateTransformFromInput = async (value: number): Promise<void> => {\n if (\n this.lastDragged != null &&\n this.currentTransform != null &&\n this.startingTransform != null &&\n this.lastInputValue != null\n ) {\n this.currentTransform = computeInputDeltaTransform(\n this.currentTransform,\n this.lastDragged.identifier,\n value,\n this.lastInputValue,\n this.distanceUnit,\n this.angleUnit,\n );\n\n this.updateInputValue();\n this.lastInputValue = value;\n\n await this.controller?.beginTransform();\n this.getTransformWidget().updateTransform(this.currentTransform);\n await this.controller?.updateTransform(\n Matrix4.multiply(\n Matrix4.invert(this.startingTransform),\n this.currentTransform,\n ),\n );\n this.updateInputPosition();\n await this.controller?.endTransformDebounced(\n this.beginEndTransform,\n this.completeEndTransform,\n );\n }\n };\n\n private updatePropsFromViewer = (): void => {\n const { frame } = this.viewer || {};\n\n if (frame != null) {\n const widget = this.getTransformWidget();\n\n widget.updateFrame(frame, this.dragging == null);\n this.updateInputPosition();\n }\n };\n\n private transform(\n previous: Vector3.Vector3,\n next: Vector3.Vector3,\n angle: number,\n ): void {\n if (\n this.position != null &&\n this.startingTransform != null &&\n this.currentTransform != null &&\n this.dragging != null &&\n this.viewer != null &&\n this.viewer.frame != null\n ) {\n this.currentTransform = computeHandleDeltaTransform(\n this.currentTransform,\n previous,\n next,\n this.viewer?.frame.scene.camera.viewVector,\n angle,\n this.dragging.identifier,\n );\n\n this.getTransformWidget().updateTransform(this.currentTransform);\n this.controller?.updateTransform(\n Matrix4.multiply(\n Matrix4.invert(this.startingTransform),\n this.currentTransform,\n ),\n );\n }\n }\n\n private handleSettingDisabledAxis(): void {\n if (this.widget) {\n this.widget.updateDisabledAxis({\n xRotation: this.xRotationDisabled,\n yRotation: this.yRotationDisabled,\n zRotation: this.zRotationDisabled,\n xTranslation: this.xTranslationDisabled,\n yTranslation: this.yTranslationDisabled,\n zTranslation: this.zTranslationDisabled,\n xyTranslation: this.xyTranslationDisabled,\n xzTranslation: this.xzTranslationDisabled,\n yzTranslation: this.yzTranslationDisabled,\n });\n } else {\n console.warn('Cannot set disabled values - no widget defined');\n }\n }\n\n private setupTransformWidget = (\n canvasRef: HTMLCanvasElement,\n ): TransformWidget => {\n console.debug(\n `Initializing transform widget. [initial-position=${JSON.stringify(\n this.position,\n )}, has-initial-frame=${this.viewer?.frame != null}]`,\n );\n\n const effectiveArrowScalar = this.getTranslationScalar();\n const effectiveSquareScalar = this.getRotationScalar();\n\n this.widget = new TransformWidget(canvasRef, {\n colors: {\n xArrow: this.xArrowColor,\n yArrow: this.yArrowColor,\n zArrow: this.zArrowColor,\n twoAxesSquare: this.twoAxesSquareColor,\n hovered: this.hoveredColor,\n },\n scalars: {\n xTranslation: effectiveArrowScalar,\n yTranslation: effectiveArrowScalar,\n zTranslation: effectiveArrowScalar,\n xyTranslation: effectiveSquareScalar,\n xzTranslation: effectiveSquareScalar,\n yzTranslation: effectiveSquareScalar,\n xRotation: effectiveSquareScalar,\n yRotation: effectiveSquareScalar,\n zRotation: effectiveSquareScalar,\n },\n });\n\n if (this.rotation != null) {\n this.currentTransform = this.getTransformForNewRotation(this.rotation);\n this.startingTransform = this.currentTransform;\n this.widget.updateTransform(this.currentTransform);\n }\n\n if (this.position != null) {\n this.currentTransform = this.getTransformForNewPosition(this.position);\n this.startingTransform = this.currentTransform;\n this.widget.updateTransform(this.currentTransform);\n }\n if (this.viewer?.frame != null) {\n this.widget.updateFrame(this.viewer.frame, true);\n }\n\n this.handleSettingDisabledAxis();\n\n this.hoveredChangeDisposable = this.widget.onHoveredChanged(\n this.handleHoveredDrawableChanged,\n );\n\n return this.widget;\n };\n\n private updateCanvasBounds = (canvasElement: HTMLCanvasElement): void => {\n readDOM(() => {\n this.canvasBounds = canvasElement.getBoundingClientRect();\n\n this.getTransformWidget().updateDimensions(canvasElement);\n });\n };\n\n private updateInputValue = (): void => {\n const dragging = this.dragging ?? this.lastDragged;\n const isDraggingTwoAxesTranslation =\n dragging?.identifier === 'xy-translate' ||\n dragging?.identifier === 'xz-translate' ||\n dragging?.identifier === 'yz-translate';\n\n if (\n dragging != null &&\n this.currentTransform != null &&\n this.dragStartTransform != null &&\n !isDraggingTwoAxesTranslation\n ) {\n this.lastInputValue = this.inputValue;\n\n this.inputValue = computeInputDisplayValue(\n dragging.identifier,\n this.currentTransform,\n this.dragStartTransform,\n this.distanceUnit,\n this.angleUnit,\n );\n\n if (this.inputRef != null) {\n const definedValue =\n this.getDisplayedDistance() ?? this.getDisplayedAngle() ?? 0;\n const displayValue = `${Number.parseFloat(\n definedValue.toFixed(this.decimalPlaces),\n )}`;\n\n this.inputRef.value = displayValue;\n }\n }\n };\n\n private updateInputPosition = (): void => {\n const dragging = this.dragging ?? this.lastDragged;\n\n const isDraggingTwoAxesTranslation =\n dragging?.identifier === 'xy-translate' ||\n dragging?.identifier === 'xz-translate' ||\n dragging?.identifier === 'yz-translate';\n\n if (\n this.showInputs &&\n this.viewer?.frame != null &&\n this.position != null &&\n dragging != null &&\n !isDraggingTwoAxesTranslation\n ) {\n const widget = this.getTransformWidget();\n const widgetBounds = widget.getFullBounds();\n\n this.inputPosition =\n widgetBounds != null\n ? computeInputPosition(\n this.viewer.viewport,\n widgetBounds,\n dragging.points.toArray(),\n )\n : undefined;\n } else if (isDraggingTwoAxesTranslation) {\n this.inputPosition = undefined;\n }\n };\n\n private beginEndTransform = (): void => {\n const widget = this.getTransformWidget();\n\n widget.updateDisabledAxis({\n xRotation: true,\n yRotation: true,\n zRotation: true,\n xTranslation: true,\n yTranslation: true,\n zTranslation: true,\n xyTranslation: true,\n xzTranslation: true,\n yzTranslation: true,\n });\n\n this.isEndingTransform = true;\n };\n\n private completeEndTransform = (): void => {\n const widget = this.getTransformWidget();\n\n widget.updateDisabledAxis({\n xRotation: this.xRotationDisabled,\n yRotation: this.yRotationDisabled,\n zRotation: this.zRotationDisabled,\n\n xTranslation: this.xTranslationDisabled,\n yTranslation: this.yTranslationDisabled,\n zTranslation: this.zTranslationDisabled,\n\n xyTranslation: this.xyTranslationDisabled,\n xzTranslation: this.xzTranslationDisabled,\n yzTranslation: this.yzTranslationDisabled,\n });\n\n this.isEndingTransform = false;\n this.inputShouldFocus = true;\n\n if (this.currentTransform != null) {\n this.position = Vector3.fromMatrixPosition(this.currentTransform);\n this.rotation = Euler.fromRotationMatrix(this.currentTransform);\n }\n };\n\n private isModifyingAngleUnits = (): boolean => {\n const draggingIdentifier =\n this.dragging?.identifier ?? this.lastDragged?.identifier;\n\n return !!draggingIdentifier?.includes('rotate');\n };\n\n private getTranslationScalar = (): number => {\n if (this.translationHandleScalar > 0) {\n return this.translationHandleScalar;\n }\n console.warn(\n 'Invalid value provided for translation-handle-scalar. Expected a positive value greater than zero.',\n );\n return 1;\n };\n\n private getRotationScalar = (): number => {\n if (this.rotationHandleScalar > 0) {\n return this.rotationHandleScalar;\n }\n console.warn(\n 'Invalid value provided for rotation-handle-scalar. Expected a positive value greater than zero.',\n );\n return 1;\n };\n\n private getDisplayedUnits = (): AngleUnits | DistanceUnits => {\n if (this.isModifyingAngleUnits()) {\n return new AngleUnits(this.angleUnit);\n }\n return new DistanceUnits(this.distanceUnit);\n };\n\n private getDisplayedAngle = (): number | undefined => {\n if (this.isModifyingAngleUnits()) {\n return this.inputValue;\n }\n };\n\n private getDisplayedDistance = (): number | undefined => {\n const draggingIdentifier =\n this.dragging?.identifier ?? this.lastDragged?.identifier;\n if (draggingIdentifier?.includes('translate')) {\n return this.inputValue;\n }\n };\n\n private getTransformForNewPosition = (\n newPosition?: Vector3.Vector3,\n ): Matrix4.Matrix4 | undefined => {\n if (newPosition != null) {\n const c =\n this.currentTransform != null\n ? this.currentTransform\n : Matrix4.makeIdentity();\n\n const currentRotation = Matrix4.transpose(\n Matrix4.makeRotation(Quaternion.fromMatrixRotation(c)),\n );\n const position = Matrix4.makeTranslation(newPosition);\n\n return Matrix4.multiply(currentRotation, position);\n }\n };\n\n private getTransformForNewRotation = (\n newRotationEuler: Euler.Euler,\n ): Matrix4.Matrix4 | undefined => {\n const c =\n this.currentTransform != null\n ? this.currentTransform\n : Matrix4.makeIdentity();\n\n const oldRotation = Matrix4.makeRotation(Quaternion.fromMatrixRotation(c));\n\n const newRotation = Matrix4.makeRotation(\n Quaternion.fromEuler(newRotationEuler),\n );\n\n const oldTranslation = Matrix4.multiply(oldRotation, c);\n\n return Matrix4.multiply(Matrix4.transpose(newRotation), oldTranslation);\n };\n\n private getCanvasBounds = (): DOMRect | undefined => {\n if (this.canvasBounds != null) {\n return this.canvasBounds;\n } else if (this.canvasRef != null) {\n this.updateCanvasBounds(this.canvasRef);\n return this.canvasBounds;\n }\n };\n\n private getTransformWidget = (): TransformWidget => {\n if (this.widget == null && this.canvasRef != null) {\n return this.setupTransformWidget(this.canvasRef);\n } else if (this.widget != null) {\n return this.widget;\n } else {\n throw new Error(\n 'Transform widget was not initialized. The canvas element may not have been initialized.',\n );\n }\n };\n}\n"],"mappings":";;;4mBAAM,SAAUA,EAAkBC,GAChC,GAAIC,OAAOC,SAASC,gBAAkBH,EAAS,CAC7CA,EAAQI,QACRJ,EAAQK,kBAAkBL,EAAQM,MAAMC,OAAQP,EAAQM,MAAMC,O,CAElE,CCuBM,SAAUC,EACdC,EACAC,GAEA,OAAOA,GAAU,KACbC,EAAMC,OAAOH,EAAMI,EAAIH,EAAOI,KAAML,EAAMM,EAAIL,EAAOM,KACrDC,SACN,CAEM,SAAUC,EACdT,EACAU,EACAC,EACAC,GAEA,MAAMC,EACJD,GAAa,KAAOE,EAAQC,mBAAmBH,GAAaJ,UAE9D,GAAIR,GAAS,MAAQU,GAAS,MAAQC,GAAY,MAAQE,GAAY,KAAM,CAC1E,MAAMG,EAAML,EAASM,oBACnBjB,EACAU,EAAMQ,MACNR,EAAMS,MAAMC,QAGd,GAAIV,EAAMS,MAAMC,OAAOC,iBAAkB,CAGvC,MAAMC,EAAcC,EAAIC,GACtBD,EAAIpB,OAAO,CACTsB,OAAQZ,EACRa,UAAWhB,EAAMS,MAAMC,OAAOM,YAEhCZ,EAAQa,UAAUjB,EAAMS,MAAMC,OAAOQ,YAAc,GAGrD,OAAOL,EAAIM,eACTb,EACAc,EAAMC,2BACJrB,EAAMS,MAAMC,OAAOM,UACnBJ,G,KAGC,CACL,OAAOC,EAAIM,eACTb,EACAc,EAAMC,2BACJrB,EAAMS,MAAMC,OAAOM,UACnBb,G,EAKR,OAAOL,SACT,CAEM,SAAUwB,EACdC,EACAC,EACArC,EACAsC,EACAC,EACAC,GAEA,OAAOC,EAAQC,SACbC,EACEN,EACArC,EACAsC,EACAC,EACAC,GAEFJ,EAEJ,CAEA,SAASO,EACPN,EACArC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