@vertexvis/viewer 1.1.1-testing.3 → 1.1.1-testing.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (456) hide show
  1. package/README.template.md +14 -8
  2. package/dist/cjs/{bundle-07I6_WqC.js → bundle-BCS0nA91.js} +28 -25
  3. package/dist/cjs/bundle-BCS0nA91.js.map +1 -0
  4. package/dist/cjs/{config-CepHuwRF.js → config-BY0v6BSK.js} +3 -3
  5. package/dist/cjs/{config-CepHuwRF.js.map → config-BY0v6BSK.js.map} +1 -1
  6. package/dist/cjs/{controller-Dklbe0Y6.js → controller-DvE3p6ta.js} +3 -3
  7. package/dist/cjs/{controller-Dklbe0Y6.js.map → controller-DvE3p6ta.js.map} +1 -1
  8. package/dist/cjs/{dom-Dlu6-7PF.js → dom-BuQSLPWr.js} +3 -3
  9. package/dist/cjs/{dom-Dlu6-7PF.js.map → dom-BuQSLPWr.js.map} +1 -1
  10. package/dist/cjs/{entities-BdWnb6KI.js → entities-CEaa12yP.js} +4 -4
  11. package/dist/cjs/{entities-BdWnb6KI.js.map → entities-CEaa12yP.js.map} +1 -1
  12. package/dist/cjs/{geometry_pb-BISQT2vx.js → geometry_pb-EVfAEuPO.js} +3 -3
  13. package/dist/cjs/{geometry_pb-BISQT2vx.js.map → geometry_pb-EVfAEuPO.js.map} +1 -1
  14. package/dist/cjs/grpc-D5Apx_zz.js.map +1 -1
  15. package/dist/cjs/index.cjs.js +13 -13
  16. package/dist/cjs/loader.cjs.js +1 -1
  17. package/dist/cjs/{markup-C-qyTwID.js → markup-Du4uVRo4.js} +3 -3
  18. package/dist/cjs/{markup-C-qyTwID.js.map → markup-Du4uVRo4.js.map} +1 -1
  19. package/dist/cjs/{model-Dy5FvjIA.js → model-BC6acIWJ.js} +3 -3
  20. package/dist/cjs/{model-Dy5FvjIA.js.map → model-BC6acIWJ.js.map} +1 -1
  21. package/dist/cjs/model-Bw4h8wNt.js.map +1 -1
  22. package/dist/cjs/{model-k5VBFN6C.js → model-DqxeakCS.js} +3 -3
  23. package/dist/cjs/{model-k5VBFN6C.js.map → model-DqxeakCS.js.map} +1 -1
  24. package/dist/cjs/{multiElementInteractionHandler-Bqpg2wVT.js → multiElementInteractionHandler-Bdeo6FYp.js} +6 -5
  25. package/dist/cjs/multiElementInteractionHandler-Bdeo6FYp.js.map +1 -0
  26. package/dist/cjs/{overlays-BujVkBnG.js → overlays-DASFbMSp.js} +3 -3
  27. package/dist/cjs/{overlays-BujVkBnG.js.map → overlays-DASFbMSp.js.map} +1 -1
  28. package/dist/cjs/{queries-GhYmoomu.js → queries-LthBzEHD.js} +5 -5
  29. package/dist/cjs/queries-LthBzEHD.js.map +1 -0
  30. package/dist/cjs/{regl-component-CB004H91.js → regl-component-B_JaaVlv.js} +6 -6
  31. package/dist/cjs/{regl-component-CB004H91.js.map → regl-component-B_JaaVlv.js.map} +1 -1
  32. package/dist/cjs/{representation_pb-CHCm5o1e.js → representation_pb-B6XR10pQ.js} +3 -3
  33. package/dist/cjs/{representation_pb-CHCm5o1e.js.map → representation_pb-B6XR10pQ.js.map} +1 -1
  34. package/dist/cjs/{results-BpfUIwa8.js → results-CU9Ctm2K.js} +3 -3
  35. package/dist/cjs/{results-BpfUIwa8.js.map → results-CU9Ctm2K.js.map} +1 -1
  36. package/dist/cjs/{streamAttributes-CJOD7AxG.js → streamAttributes-nCF7u7lv.js} +4 -4
  37. package/dist/cjs/{streamAttributes-CJOD7AxG.js.map → streamAttributes-nCF7u7lv.js.map} +1 -1
  38. package/dist/cjs/{util-smaTO4bk.js → util-gX3IGslq.js} +3 -3
  39. package/dist/cjs/{util-smaTO4bk.js.map → util-gX3IGslq.js.map} +1 -1
  40. package/dist/cjs/{utils-BsXO-wLi.js → utils-D5TGpFAV.js} +3 -3
  41. package/dist/cjs/utils-D5TGpFAV.js.map +1 -0
  42. package/dist/cjs/{utils-DY6afhh8.js → utils-opS9hsaU.js} +3 -3
  43. package/dist/cjs/{utils-DY6afhh8.js.map → utils-opS9hsaU.js.map} +1 -1
  44. package/dist/cjs/vertex-scene-tree-notification-banner_4.cjs.entry.js +1 -1
  45. package/dist/cjs/vertex-scene-tree-notification-banner_4.cjs.entry.js.map +1 -1
  46. package/dist/cjs/vertex-scene-tree-table-cell.cjs.entry.js +2 -2
  47. package/dist/cjs/vertex-scene-tree-table-cell.cjs.entry.js.map +1 -1
  48. package/dist/cjs/vertex-scene-tree-table-column.cjs.entry.js.map +1 -1
  49. package/dist/cjs/vertex-scene-tree.cjs.entry.js +3 -3
  50. package/dist/cjs/vertex-scene-tree.cjs.entry.js.map +1 -1
  51. package/dist/cjs/vertex-viewer-annotation-callout.cjs.entry.js.map +1 -1
  52. package/dist/cjs/vertex-viewer-box-query-tool.cjs.entry.js +4 -4
  53. package/dist/cjs/vertex-viewer-box-query-tool.cjs.entry.js.map +1 -1
  54. package/dist/cjs/vertex-viewer-button_3.cjs.entry.js +6 -1
  55. package/dist/cjs/vertex-viewer-button_3.cjs.entry.js.map +1 -1
  56. package/dist/cjs/vertex-viewer-default-toolbar.cjs.entry.js +2 -2
  57. package/dist/cjs/vertex-viewer-default-toolbar.cjs.entry.js.map +1 -1
  58. package/dist/cjs/vertex-viewer-dom-element_2.cjs.entry.js +5 -5
  59. package/dist/cjs/vertex-viewer-dom-group.cjs.entry.js +1 -1
  60. package/dist/cjs/vertex-viewer-hit-result-indicator.cjs.entry.js +5 -5
  61. package/dist/cjs/vertex-viewer-markup-arrow_3.cjs.entry.js +3 -3
  62. package/dist/cjs/vertex-viewer-markup-tool.cjs.entry.js +4 -4
  63. package/dist/cjs/vertex-viewer-markup-tool.cjs.entry.js.map +1 -1
  64. package/dist/cjs/vertex-viewer-markup.cjs.entry.js +3 -3
  65. package/dist/cjs/vertex-viewer-markup.cjs.entry.js.map +1 -1
  66. package/dist/cjs/vertex-viewer-measurement-details.cjs.entry.js +3 -3
  67. package/dist/cjs/vertex-viewer-measurement-distance.cjs.entry.js +8 -8
  68. package/dist/cjs/vertex-viewer-measurement-line_2.cjs.entry.js +5 -5
  69. package/dist/cjs/vertex-viewer-measurement-precise.cjs.entry.js +7 -7
  70. package/dist/cjs/vertex-viewer-pin-group.cjs.entry.js +7 -7
  71. package/dist/cjs/vertex-viewer-pin-group.cjs.entry.js.map +1 -1
  72. package/dist/cjs/vertex-viewer-pin-label_2.cjs.entry.js +7 -6
  73. package/dist/cjs/vertex-viewer-pin-label_2.cjs.entry.js.map +1 -1
  74. package/dist/cjs/vertex-viewer-pin-tool.cjs.entry.js +3 -3
  75. package/dist/cjs/vertex-viewer-spinner.cjs.entry.js.map +1 -1
  76. package/dist/cjs/vertex-viewer-teleport-tool.cjs.entry.js +2 -2
  77. package/dist/cjs/vertex-viewer-transform-widget.cjs.entry.js +6 -6
  78. package/dist/cjs/vertex-viewer-transform-widget.cjs.entry.js.map +1 -1
  79. package/dist/cjs/vertex-viewer-view-cube.cjs.entry.js +2 -2
  80. package/dist/cjs/vertex-viewer-walk-mode-tool.cjs.entry.js +1 -1
  81. package/dist/cjs/vertex-viewer.cjs.entry.js +8 -8
  82. package/dist/cjs/viewer.cjs.js +1 -1
  83. package/dist/cjs/{viewport-B70DgDZj.js → viewport-BDbB9o9T.js} +3 -3
  84. package/dist/cjs/{viewport-B70DgDZj.js.map → viewport-BDbB9o9T.js.map} +1 -1
  85. package/dist/collection/components/scene-tree/scene-tree.css +2 -3
  86. package/dist/collection/components/scene-tree/scene-tree.js.map +1 -1
  87. package/dist/collection/components/scene-tree-notification-banner/scene-tree-notification-banner.css +1 -1
  88. package/dist/collection/components/scene-tree-search/scene-tree-search.css +1 -1
  89. package/dist/collection/components/scene-tree-table-cell/scene-tree-table-cell.css +10 -10
  90. package/dist/collection/components/scene-tree-table-column/scene-tree-table-column.css +0 -1
  91. package/dist/collection/components/scene-tree-table-layout/scene-tree-table-layout.css +3 -3
  92. package/dist/collection/components/viewer-annotation-callout/viewer-annotation-callout.css +3 -4
  93. package/dist/collection/components/viewer-box-query-tool/types.js.map +1 -1
  94. package/dist/collection/components/viewer-box-query-tool/viewer-box-query-tool.css +9 -7
  95. package/dist/collection/components/viewer-button/viewer-button.js +32 -1
  96. package/dist/collection/components/viewer-button/viewer-button.js.map +1 -1
  97. package/dist/collection/components/viewer-default-toolbar/viewer-default-toolbar.css +2 -2
  98. package/dist/collection/components/viewer-default-toolbar/viewer-default-toolbar.js +1 -1
  99. package/dist/collection/components/viewer-default-toolbar/viewer-default-toolbar.js.map +1 -1
  100. package/dist/collection/components/viewer-markup/viewer-markup.js.map +1 -1
  101. package/dist/collection/components/viewer-markup-arrow/utils.js.map +1 -1
  102. package/dist/collection/components/viewer-markup-tool/viewer-markup-tool.css +2 -2
  103. package/dist/collection/components/viewer-pin-group/viewer-pin-group.css +12 -11
  104. package/dist/collection/components/viewer-pin-label/viewer-pin-label.css +21 -8
  105. package/dist/collection/components/viewer-pin-label/viewer-pin-label.js +2 -1
  106. package/dist/collection/components/viewer-pin-label/viewer-pin-label.js.map +1 -1
  107. package/dist/collection/components/viewer-pin-label-line/viewer-pin-label-line.css +5 -4
  108. package/dist/collection/components/viewer-spinner/viewer-spinner.css +2 -2
  109. package/dist/collection/components/viewer-transform-widget/viewer-transform-widget-components.js.map +1 -1
  110. package/dist/collection/components/viewer-transform-widget/viewer-transform-widget.css +1 -2
  111. package/dist/collection/lib/grpc.js.map +1 -1
  112. package/dist/collection/lib/interactions/baseInteractionHandler.js +2 -1
  113. package/dist/collection/lib/interactions/baseInteractionHandler.js.map +1 -1
  114. package/dist/collection/lib/scenes/scene.js.map +1 -1
  115. package/dist/collection/lib/scenes/sceneViewStateLoader.js.map +1 -1
  116. package/dist/collection/lib/stream/state.js.map +1 -1
  117. package/dist/collection/lib/types/loadableResource.js.map +1 -1
  118. package/dist/collection/lib/types/sceneViewStateIdentifier.js.map +1 -1
  119. package/dist/collection/lib/walk-mode/model.js.map +1 -1
  120. package/dist/components/index.js +1 -1
  121. package/dist/components/p-2UsvOTHJ.js +5 -0
  122. package/dist/components/p-2UsvOTHJ.js.map +1 -0
  123. package/dist/components/{p-garvKln8.js → p-BAuOB8M-.js} +2 -2
  124. package/dist/components/p-BAuOB8M-.js.map +1 -0
  125. package/dist/components/p-BFEV_v80.js +5 -0
  126. package/dist/components/p-BFEV_v80.js.map +1 -0
  127. package/dist/components/{p-C02XtMl4.js → p-BHyxBmg6.js} +2 -2
  128. package/dist/components/{p-CfTvpqud.js → p-BNRm88jS.js} +2 -2
  129. package/dist/components/{p-O1_Yvjd6.js → p-BT9d9jRt.js} +2 -2
  130. package/dist/components/{p-oDn1DcWj.js → p-BZDn1Vuv.js} +2 -2
  131. package/dist/components/{p-VEJB73Ei.js → p-Bdf4AcJ2.js} +2 -2
  132. package/dist/components/{p-CelQDFR0.js → p-C12jtCFb.js} +2 -2
  133. package/dist/components/{p-Dzs4u_ZY.js → p-CABws4i9.js} +2 -2
  134. package/dist/components/p-CIuxJYJL.js.map +1 -1
  135. package/dist/components/{p-CZgX-9yo.js → p-COznr3CH.js} +2 -2
  136. package/dist/components/{p-BqeEZXPn.js → p-CPROw2BU.js} +2 -2
  137. package/dist/components/{p-BKQMbekH.js → p-CWcvgy8e.js} +2 -2
  138. package/dist/components/{p-CMdP8O-G.js → p-Ca253f0h.js} +2 -2
  139. package/dist/components/{p-EG7pMA2M.js → p-CeZe0Qql.js} +2 -2
  140. package/dist/components/p-CioaIHsi.js.map +1 -1
  141. package/dist/components/{p-DH341c7b.js → p-Cku0WCYo.js} +2 -2
  142. package/dist/components/p-Cku0WCYo.js.map +1 -0
  143. package/dist/components/{p-Due5EmBt.js → p-Clyxptbp.js} +2 -2
  144. package/dist/components/{p-taOlygmc.js → p-Cs2aiMUK.js} +2 -2
  145. package/dist/components/p-Cs2aiMUK.js.map +1 -0
  146. package/dist/components/{p-DjrtwKcK.js → p-CvEK3ZK1.js} +2 -2
  147. package/dist/components/p-Cxz4L6FA.js +5 -0
  148. package/dist/components/p-Cxz4L6FA.js.map +1 -0
  149. package/dist/components/{p-MnZadXO8.js → p-D1Vdomj_.js} +2 -2
  150. package/dist/components/{p-DRGCkSEK.js → p-D3bzgaCV.js} +2 -2
  151. package/dist/components/{p-DnVcQAR9.js → p-D3in41xo.js} +2 -2
  152. package/dist/components/p-DTwJX9HL.js +5 -0
  153. package/dist/components/p-DTwJX9HL.js.map +1 -0
  154. package/dist/components/p-DUo-H-nW.js +5 -0
  155. package/dist/components/p-DUo-H-nW.js.map +1 -0
  156. package/dist/components/{p-DCTZZ5Rd.js → p-DjQ6RXWP.js} +2 -2
  157. package/dist/components/p-DxuSiXYg.js.map +1 -1
  158. package/dist/components/{p-CxzyM08j.js → p-DyL2wWm6.js} +2 -2
  159. package/dist/components/{p-avWSFTeP.js → p-JvS9LLoO.js} +2 -2
  160. package/dist/{viewer/p-7m7Vr5V7.js → components/p-Ng27jBsS.js} +2 -2
  161. package/dist/components/p-Ng27jBsS.js.map +1 -0
  162. package/dist/components/{p-BC777sCK.js → p-UJR-ixsy.js} +2 -2
  163. package/dist/components/{p-Ib4vgh2t.js → p-UrT4ZJv3.js} +2 -2
  164. package/dist/components/{p-Ib4vgh2t.js.map → p-UrT4ZJv3.js.map} +1 -1
  165. package/dist/components/p-Y8W_BXUk.js.map +1 -1
  166. package/dist/components/{p-mpsCUvSn.js → p-_qi2VkC2.js} +2 -2
  167. package/dist/components/{p-CNprIkKd.js → p-rDr0x5Z7.js} +2 -2
  168. package/dist/components/vertex-scene-tree-table-cell.js +1 -1
  169. package/dist/components/vertex-scene-tree-table-cell.js.map +1 -1
  170. package/dist/components/vertex-scene-tree-table-column.js.map +1 -1
  171. package/dist/components/vertex-scene-tree-table-layout.js +1 -1
  172. package/dist/components/vertex-scene-tree.js +1 -1
  173. package/dist/components/vertex-scene-tree.js.map +1 -1
  174. package/dist/components/vertex-viewer-annotation-callout.js.map +1 -1
  175. package/dist/components/vertex-viewer-box-query-tool.js +1 -1
  176. package/dist/components/vertex-viewer-box-query-tool.js.map +1 -1
  177. package/dist/components/vertex-viewer-button.js +1 -1
  178. package/dist/components/vertex-viewer-default-toolbar.js +1 -1
  179. package/dist/components/vertex-viewer-default-toolbar.js.map +1 -1
  180. package/dist/components/vertex-viewer-dom-element.js +1 -1
  181. package/dist/components/vertex-viewer-dom-group.js +1 -1
  182. package/dist/components/vertex-viewer-dom-renderer.js +1 -1
  183. package/dist/components/vertex-viewer-hit-result-indicator.js +1 -1
  184. package/dist/components/vertex-viewer-markup-arrow.js +1 -1
  185. package/dist/components/vertex-viewer-markup-circle.js +1 -1
  186. package/dist/components/vertex-viewer-markup-freeform.js +1 -1
  187. package/dist/components/vertex-viewer-markup-tool.js +1 -1
  188. package/dist/components/vertex-viewer-markup-tool.js.map +1 -1
  189. package/dist/components/vertex-viewer-markup.js +1 -1
  190. package/dist/components/vertex-viewer-markup.js.map +1 -1
  191. package/dist/components/vertex-viewer-measurement-details.js +1 -1
  192. package/dist/components/vertex-viewer-measurement-distance.js +1 -1
  193. package/dist/components/vertex-viewer-measurement-line.js +1 -1
  194. package/dist/components/vertex-viewer-measurement-overlays.js +1 -1
  195. package/dist/components/vertex-viewer-measurement-precise.js +1 -1
  196. package/dist/components/vertex-viewer-pin-group.js +1 -1
  197. package/dist/components/vertex-viewer-pin-label-line.js +1 -1
  198. package/dist/components/vertex-viewer-pin-label.js +1 -1
  199. package/dist/components/vertex-viewer-pin-tool.js +1 -1
  200. package/dist/components/vertex-viewer-teleport-tool.js +1 -1
  201. package/dist/components/vertex-viewer-transform-widget.js +1 -1
  202. package/dist/components/vertex-viewer-transform-widget.js.map +1 -1
  203. package/dist/components/vertex-viewer-view-cube.js +1 -1
  204. package/dist/components/vertex-viewer-walk-mode-tool.js +1 -1
  205. package/dist/components/vertex-viewer.js +1 -1
  206. package/dist/esm/{bundle-CZZALKHT.js → bundle-2UsvOTHJ.js} +28 -25
  207. package/dist/esm/bundle-2UsvOTHJ.js.map +1 -0
  208. package/dist/esm/{config-CyaUTJEG.js → config-ss9ha12b.js} +3 -3
  209. package/dist/esm/{config-CyaUTJEG.js.map → config-ss9ha12b.js.map} +1 -1
  210. package/dist/esm/{controller-ByBd8r3O.js → controller-BPECXXfj.js} +3 -3
  211. package/dist/esm/{controller-ByBd8r3O.js.map → controller-BPECXXfj.js.map} +1 -1
  212. package/dist/esm/{dom-Bbf2HAst.js → dom-DaP9SiyY.js} +3 -3
  213. package/dist/esm/{dom-Bbf2HAst.js.map → dom-DaP9SiyY.js.map} +1 -1
  214. package/dist/esm/{entities-DriL3zBC.js → entities-DEFAhYdV.js} +4 -4
  215. package/dist/esm/{entities-DriL3zBC.js.map → entities-DEFAhYdV.js.map} +1 -1
  216. package/dist/esm/{geometry_pb-BEB8SExe.js → geometry_pb-D7fM1PYG.js} +3 -3
  217. package/dist/esm/{geometry_pb-BEB8SExe.js.map → geometry_pb-D7fM1PYG.js.map} +1 -1
  218. package/dist/esm/grpc-hWL8wFvk.js.map +1 -1
  219. package/dist/esm/index.js +13 -13
  220. package/dist/esm/index.mjs +13 -13
  221. package/dist/esm/loader.js +1 -1
  222. package/dist/esm/loader.mjs +1 -1
  223. package/dist/esm/{markup-y96-uR-l.js → markup-B58g75Hr.js} +3 -3
  224. package/dist/esm/{markup-y96-uR-l.js.map → markup-B58g75Hr.js.map} +1 -1
  225. package/dist/esm/{model-BJQo0DxL.js → model-B5KuXEsl.js} +3 -3
  226. package/dist/esm/{model-BJQo0DxL.js.map → model-B5KuXEsl.js.map} +1 -1
  227. package/dist/esm/model-BHVr1tU0.js.map +1 -1
  228. package/dist/esm/{model-CTdG73h9.js → model-Dc6T63-k.js} +3 -3
  229. package/dist/esm/{model-CTdG73h9.js.map → model-Dc6T63-k.js.map} +1 -1
  230. package/dist/esm/{multiElementInteractionHandler-C45E8VzE.js → multiElementInteractionHandler-3tE3OPpw.js} +6 -5
  231. package/dist/esm/multiElementInteractionHandler-3tE3OPpw.js.map +1 -0
  232. package/dist/esm/{overlays-DmcRtaSn.js → overlays-BwIqsqLW.js} +3 -3
  233. package/dist/esm/{overlays-DmcRtaSn.js.map → overlays-BwIqsqLW.js.map} +1 -1
  234. package/dist/esm/{queries-DWjy-LsV.js → queries-BcmE5Zbq.js} +5 -5
  235. package/dist/esm/queries-BcmE5Zbq.js.map +1 -0
  236. package/dist/esm/{regl-component-zzdsBise.js → regl-component-gIonUTBJ.js} +6 -6
  237. package/dist/esm/{regl-component-zzdsBise.js.map → regl-component-gIonUTBJ.js.map} +1 -1
  238. package/dist/esm/{representation_pb-CQdJxiGO.js → representation_pb-Bf023NuN.js} +3 -3
  239. package/dist/esm/{representation_pb-CQdJxiGO.js.map → representation_pb-Bf023NuN.js.map} +1 -1
  240. package/dist/esm/{results-ClIgKssN.js → results-De9arm7M.js} +3 -3
  241. package/dist/esm/{results-ClIgKssN.js.map → results-De9arm7M.js.map} +1 -1
  242. package/dist/esm/{streamAttributes-CTs61PCl.js → streamAttributes-Bj2xDHfI.js} +3 -3
  243. package/dist/esm/{streamAttributes-CTs61PCl.js.map → streamAttributes-Bj2xDHfI.js.map} +1 -1
  244. package/dist/esm/{util-DUjEw5Kh.js → util-CMPFqnEv.js} +3 -3
  245. package/dist/esm/{util-DUjEw5Kh.js.map → util-CMPFqnEv.js.map} +1 -1
  246. package/dist/esm/{utils-DOjHP1wA.js → utils-B1mSYmAK.js} +3 -3
  247. package/dist/esm/{utils-DOjHP1wA.js.map → utils-B1mSYmAK.js.map} +1 -1
  248. package/dist/esm/{utils-DJ5FvINs.js → utils-c-mcLgsj.js} +3 -3
  249. package/dist/esm/utils-c-mcLgsj.js.map +1 -0
  250. package/dist/esm/vertex-scene-tree-notification-banner_4.entry.js +1 -1
  251. package/dist/esm/vertex-scene-tree-notification-banner_4.entry.js.map +1 -1
  252. package/dist/esm/vertex-scene-tree-table-cell.entry.js +2 -2
  253. package/dist/esm/vertex-scene-tree-table-cell.entry.js.map +1 -1
  254. package/dist/esm/vertex-scene-tree-table-column.entry.js.map +1 -1
  255. package/dist/esm/vertex-scene-tree.entry.js +3 -3
  256. package/dist/esm/vertex-scene-tree.entry.js.map +1 -1
  257. package/dist/esm/vertex-viewer-annotation-callout.entry.js.map +1 -1
  258. package/dist/esm/vertex-viewer-box-query-tool.entry.js +4 -4
  259. package/dist/esm/vertex-viewer-box-query-tool.entry.js.map +1 -1
  260. package/dist/esm/vertex-viewer-button_3.entry.js +6 -1
  261. package/dist/esm/vertex-viewer-button_3.entry.js.map +1 -1
  262. package/dist/esm/vertex-viewer-default-toolbar.entry.js +2 -2
  263. package/dist/esm/vertex-viewer-default-toolbar.entry.js.map +1 -1
  264. package/dist/esm/vertex-viewer-dom-element_2.entry.js +5 -5
  265. package/dist/esm/vertex-viewer-dom-group.entry.js +1 -1
  266. package/dist/esm/vertex-viewer-hit-result-indicator.entry.js +5 -5
  267. package/dist/esm/vertex-viewer-markup-arrow_3.entry.js +3 -3
  268. package/dist/esm/vertex-viewer-markup-tool.entry.js +4 -4
  269. package/dist/esm/vertex-viewer-markup-tool.entry.js.map +1 -1
  270. package/dist/esm/vertex-viewer-markup.entry.js +3 -3
  271. package/dist/esm/vertex-viewer-markup.entry.js.map +1 -1
  272. package/dist/esm/vertex-viewer-measurement-details.entry.js +3 -3
  273. package/dist/esm/vertex-viewer-measurement-distance.entry.js +8 -8
  274. package/dist/esm/vertex-viewer-measurement-line_2.entry.js +5 -5
  275. package/dist/esm/vertex-viewer-measurement-precise.entry.js +7 -7
  276. package/dist/esm/vertex-viewer-pin-group.entry.js +7 -7
  277. package/dist/esm/vertex-viewer-pin-group.entry.js.map +1 -1
  278. package/dist/esm/vertex-viewer-pin-label_2.entry.js +7 -6
  279. package/dist/esm/vertex-viewer-pin-label_2.entry.js.map +1 -1
  280. package/dist/esm/vertex-viewer-pin-tool.entry.js +3 -3
  281. package/dist/esm/vertex-viewer-spinner.entry.js.map +1 -1
  282. package/dist/esm/vertex-viewer-teleport-tool.entry.js +2 -2
  283. package/dist/esm/vertex-viewer-transform-widget.entry.js +6 -6
  284. package/dist/esm/vertex-viewer-transform-widget.entry.js.map +1 -1
  285. package/dist/esm/vertex-viewer-view-cube.entry.js +2 -2
  286. package/dist/esm/vertex-viewer-walk-mode-tool.entry.js +1 -1
  287. package/dist/esm/vertex-viewer.entry.js +8 -8
  288. package/dist/esm/viewer.js +1 -1
  289. package/dist/esm/{viewport-D90kzsD7.js → viewport-CHtidaFL.js} +3 -3
  290. package/dist/esm/{viewport-D90kzsD7.js.map → viewport-CHtidaFL.js.map} +1 -1
  291. package/dist/types/components/viewer-button/viewer-button.d.ts +5 -0
  292. package/dist/types/components.d.ts +14 -1
  293. package/dist/types/lib/walk-mode/model.d.ts +10 -10
  294. package/dist/types/regl-shape.d.ts +1 -5
  295. package/dist/viewer/index.esm.js +1 -1
  296. package/dist/viewer/{p-12a673f0.entry.js → p-00540193.entry.js} +2 -2
  297. package/dist/viewer/p-00540193.entry.js.map +1 -0
  298. package/dist/viewer/{p-78f422af.entry.js → p-287e0670.entry.js} +2 -2
  299. package/dist/viewer/{p-78f422af.entry.js.map → p-287e0670.entry.js.map} +1 -1
  300. package/dist/viewer/p-2UsvOTHJ.js +5 -0
  301. package/dist/viewer/p-2UsvOTHJ.js.map +1 -0
  302. package/dist/viewer/{p-510fd2e1.entry.js → p-2d2fa147.entry.js} +2 -2
  303. package/dist/viewer/{p-fe434552.entry.js → p-30a5748d.entry.js} +2 -2
  304. package/dist/viewer/p-32a51a21.entry.js +5 -0
  305. package/dist/viewer/p-32a51a21.entry.js.map +1 -0
  306. package/dist/viewer/{p-aa0359e0.entry.js → p-3c5dd716.entry.js} +2 -2
  307. package/dist/viewer/{p-9312a936.entry.js → p-48020de1.entry.js} +2 -2
  308. package/dist/viewer/{p-d5542b6a.entry.js → p-4dd67d16.entry.js} +2 -2
  309. package/dist/viewer/p-4dd67d16.entry.js.map +1 -0
  310. package/dist/viewer/p-504e77a7.entry.js +5 -0
  311. package/dist/viewer/{p-c2c3579f.entry.js.map → p-504e77a7.entry.js.map} +1 -1
  312. package/dist/viewer/{p-71c03352.entry.js → p-53f6cc59.entry.js} +2 -2
  313. package/dist/viewer/{p-7b4eec65.entry.js → p-5cfb3047.entry.js} +2 -2
  314. package/dist/viewer/{p-e3981cf8.entry.js → p-7cb9c9bb.entry.js} +2 -2
  315. package/dist/viewer/p-7cb9c9bb.entry.js.map +1 -0
  316. package/dist/viewer/{p-56e39cff.entry.js → p-83683307.entry.js} +2 -2
  317. package/dist/viewer/{p-a108a305.entry.js → p-9a39315d.entry.js} +2 -2
  318. package/dist/viewer/{p-O1_Yvjd6.js → p-BT9d9jRt.js} +2 -2
  319. package/dist/viewer/{p-O1_Yvjd6.js.map → p-BT9d9jRt.js.map} +1 -1
  320. package/dist/viewer/{p-VEJB73Ei.js → p-Bdf4AcJ2.js} +2 -2
  321. package/dist/viewer/{p-VEJB73Ei.js.map → p-Bdf4AcJ2.js.map} +1 -1
  322. package/dist/viewer/{p-Cr2EnhS-.js → p-BhKTTmpL.js} +2 -2
  323. package/dist/viewer/{p-Cr2EnhS-.js.map → p-BhKTTmpL.js.map} +1 -1
  324. package/dist/viewer/{p-CelQDFR0.js → p-C12jtCFb.js} +2 -2
  325. package/dist/viewer/{p-CelQDFR0.js.map → p-C12jtCFb.js.map} +1 -1
  326. package/dist/viewer/p-CEDqc5sS.js +5 -0
  327. package/dist/viewer/{p-BDy3SLKk.js.map → p-CEDqc5sS.js.map} +1 -1
  328. package/dist/viewer/{p-C6YtUG51.js → p-CS8PfgcI.js} +2 -2
  329. package/dist/viewer/{p-C6YtUG51.js.map → p-CS8PfgcI.js.map} +1 -1
  330. package/dist/viewer/{p-EG7pMA2M.js → p-CeZe0Qql.js} +2 -2
  331. package/dist/viewer/{p-EG7pMA2M.js.map → p-CeZe0Qql.js.map} +1 -1
  332. package/dist/viewer/p-CioaIHsi.js.map +1 -1
  333. package/dist/viewer/{p-EUeCUp3y.js → p-CxBXErQ8.js} +2 -2
  334. package/dist/viewer/{p-EUeCUp3y.js.map → p-CxBXErQ8.js.map} +1 -1
  335. package/dist/viewer/{p-BIR7Lfxx.js → p-CyiY_hsD.js} +2 -2
  336. package/dist/viewer/{p-BIR7Lfxx.js.map → p-CyiY_hsD.js.map} +1 -1
  337. package/dist/viewer/{p-CIBBr-p1.js → p-D0aTA_2m.js} +2 -2
  338. package/dist/viewer/{p-CIBBr-p1.js.map → p-D0aTA_2m.js.map} +1 -1
  339. package/dist/viewer/{p-C-huOg09.js → p-D2IEHEGM.js} +2 -2
  340. package/dist/viewer/{p-C-huOg09.js.map → p-D2IEHEGM.js.map} +1 -1
  341. package/dist/viewer/{p-UQXG8bCI.js → p-DBfvBC5O.js} +2 -2
  342. package/dist/viewer/p-DBfvBC5O.js.map +1 -0
  343. package/dist/viewer/{p-B-J4CqZy.js → p-DHK23fw4.js} +2 -2
  344. package/dist/viewer/{p-B-J4CqZy.js.map → p-DHK23fw4.js.map} +1 -1
  345. package/dist/{components/p-QhlhRt6X.js → viewer/p-DIbJ8Ijj.js} +2 -2
  346. package/dist/viewer/p-DIbJ8Ijj.js.map +1 -0
  347. package/dist/viewer/{p-CxzyM08j.js → p-DyL2wWm6.js} +2 -2
  348. package/dist/viewer/{p-CxzyM08j.js.map → p-DyL2wWm6.js.map} +1 -1
  349. package/dist/viewer/{p-avWSFTeP.js → p-JvS9LLoO.js} +2 -2
  350. package/dist/viewer/{p-avWSFTeP.js.map → p-JvS9LLoO.js.map} +1 -1
  351. package/dist/viewer/p-_LpaX1ga.js +5 -0
  352. package/dist/viewer/p-_LpaX1ga.js.map +1 -0
  353. package/dist/viewer/{p-mpsCUvSn.js → p-_qi2VkC2.js} +2 -2
  354. package/dist/viewer/{p-mpsCUvSn.js.map → p-_qi2VkC2.js.map} +1 -1
  355. package/dist/viewer/p-b5cc83a4.entry.js.map +1 -1
  356. package/dist/viewer/{p-82ed4346.entry.js → p-b79c295a.entry.js} +2 -2
  357. package/dist/viewer/{p-fc7d9b2b.entry.js → p-c531ca97.entry.js} +2 -2
  358. package/dist/viewer/{p-fc7d9b2b.entry.js.map → p-c531ca97.entry.js.map} +1 -1
  359. package/dist/viewer/p-c9dee5c4.entry.js +5 -0
  360. package/dist/viewer/p-c9dee5c4.entry.js.map +1 -0
  361. package/dist/viewer/{p-c2454523.entry.js → p-cc835213.entry.js} +2 -2
  362. package/dist/viewer/p-ce711ae0.entry.js +5 -0
  363. package/dist/viewer/p-ce711ae0.entry.js.map +1 -0
  364. package/dist/viewer/p-d357d235.entry.js.map +1 -1
  365. package/dist/viewer/{p-91fca24b.entry.js → p-d5a57757.entry.js} +2 -2
  366. package/dist/viewer/p-e4913b06.entry.js +5 -0
  367. package/dist/viewer/p-e4913b06.entry.js.map +1 -0
  368. package/dist/viewer/p-e98db875.entry.js.map +1 -1
  369. package/dist/viewer/{p-a893a299.entry.js → p-edc2f914.entry.js} +2 -2
  370. package/dist/viewer/{p-03a531d9.entry.js → p-ef9437ca.entry.js} +2 -2
  371. package/dist/viewer/{p-49578ec9.entry.js → p-fd3a5837.entry.js} +2 -2
  372. package/dist/viewer/p-fd3a5837.entry.js.map +1 -0
  373. package/dist/viewer/p-ipyYHvea.js.map +1 -1
  374. package/dist/viewer/{p-Ce1j43tF.js → p-kMZA0v7I.js} +2 -2
  375. package/dist/viewer/{p-Ce1j43tF.js.map → p-kMZA0v7I.js.map} +1 -1
  376. package/dist/viewer/viewer.esm.js +1 -1
  377. package/package.json +8 -8
  378. package/readme.md +14 -8
  379. package/dist/cjs/bundle-07I6_WqC.js.map +0 -1
  380. package/dist/cjs/multiElementInteractionHandler-Bqpg2wVT.js.map +0 -1
  381. package/dist/cjs/queries-GhYmoomu.js.map +0 -1
  382. package/dist/cjs/utils-BsXO-wLi.js.map +0 -1
  383. package/dist/components/p-B4sO9HdX.js +0 -5
  384. package/dist/components/p-B4sO9HdX.js.map +0 -1
  385. package/dist/components/p-C--Voxln.js +0 -5
  386. package/dist/components/p-C--Voxln.js.map +0 -1
  387. package/dist/components/p-CZZALKHT.js +0 -5
  388. package/dist/components/p-CZZALKHT.js.map +0 -1
  389. package/dist/components/p-Cn0vKqIN.js +0 -5
  390. package/dist/components/p-Cn0vKqIN.js.map +0 -1
  391. package/dist/components/p-DH341c7b.js.map +0 -1
  392. package/dist/components/p-Dmc49hX3.js +0 -5
  393. package/dist/components/p-Dmc49hX3.js.map +0 -1
  394. package/dist/components/p-QhlhRt6X.js.map +0 -1
  395. package/dist/components/p-garvKln8.js.map +0 -1
  396. package/dist/components/p-taOlygmc.js.map +0 -1
  397. package/dist/esm/bundle-CZZALKHT.js.map +0 -1
  398. package/dist/esm/multiElementInteractionHandler-C45E8VzE.js.map +0 -1
  399. package/dist/esm/queries-DWjy-LsV.js.map +0 -1
  400. package/dist/esm/utils-DJ5FvINs.js.map +0 -1
  401. package/dist/viewer/p-02384d83.entry.js +0 -5
  402. package/dist/viewer/p-02384d83.entry.js.map +0 -1
  403. package/dist/viewer/p-12a673f0.entry.js.map +0 -1
  404. package/dist/viewer/p-49578ec9.entry.js.map +0 -1
  405. package/dist/viewer/p-4c223366.entry.js +0 -5
  406. package/dist/viewer/p-4c223366.entry.js.map +0 -1
  407. package/dist/viewer/p-7m7Vr5V7.js.map +0 -1
  408. package/dist/viewer/p-8774425b.entry.js +0 -5
  409. package/dist/viewer/p-8774425b.entry.js.map +0 -1
  410. package/dist/viewer/p-9c02567d.entry.js +0 -5
  411. package/dist/viewer/p-9c02567d.entry.js.map +0 -1
  412. package/dist/viewer/p-BDy3SLKk.js +0 -5
  413. package/dist/viewer/p-CZZALKHT.js +0 -5
  414. package/dist/viewer/p-CZZALKHT.js.map +0 -1
  415. package/dist/viewer/p-Cju1inFh.js +0 -5
  416. package/dist/viewer/p-Cju1inFh.js.map +0 -1
  417. package/dist/viewer/p-UQXG8bCI.js.map +0 -1
  418. package/dist/viewer/p-c2c3579f.entry.js +0 -5
  419. package/dist/viewer/p-d5542b6a.entry.js.map +0 -1
  420. package/dist/viewer/p-e3981cf8.entry.js.map +0 -1
  421. /package/dist/components/{p-C02XtMl4.js.map → p-BHyxBmg6.js.map} +0 -0
  422. /package/dist/components/{p-CfTvpqud.js.map → p-BNRm88jS.js.map} +0 -0
  423. /package/dist/components/{p-O1_Yvjd6.js.map → p-BT9d9jRt.js.map} +0 -0
  424. /package/dist/components/{p-oDn1DcWj.js.map → p-BZDn1Vuv.js.map} +0 -0
  425. /package/dist/components/{p-VEJB73Ei.js.map → p-Bdf4AcJ2.js.map} +0 -0
  426. /package/dist/components/{p-CelQDFR0.js.map → p-C12jtCFb.js.map} +0 -0
  427. /package/dist/components/{p-Dzs4u_ZY.js.map → p-CABws4i9.js.map} +0 -0
  428. /package/dist/components/{p-CZgX-9yo.js.map → p-COznr3CH.js.map} +0 -0
  429. /package/dist/components/{p-BqeEZXPn.js.map → p-CPROw2BU.js.map} +0 -0
  430. /package/dist/components/{p-BKQMbekH.js.map → p-CWcvgy8e.js.map} +0 -0
  431. /package/dist/components/{p-CMdP8O-G.js.map → p-Ca253f0h.js.map} +0 -0
  432. /package/dist/components/{p-EG7pMA2M.js.map → p-CeZe0Qql.js.map} +0 -0
  433. /package/dist/components/{p-Due5EmBt.js.map → p-Clyxptbp.js.map} +0 -0
  434. /package/dist/components/{p-DjrtwKcK.js.map → p-CvEK3ZK1.js.map} +0 -0
  435. /package/dist/components/{p-MnZadXO8.js.map → p-D1Vdomj_.js.map} +0 -0
  436. /package/dist/components/{p-DRGCkSEK.js.map → p-D3bzgaCV.js.map} +0 -0
  437. /package/dist/components/{p-DnVcQAR9.js.map → p-D3in41xo.js.map} +0 -0
  438. /package/dist/components/{p-DCTZZ5Rd.js.map → p-DjQ6RXWP.js.map} +0 -0
  439. /package/dist/components/{p-CxzyM08j.js.map → p-DyL2wWm6.js.map} +0 -0
  440. /package/dist/components/{p-avWSFTeP.js.map → p-JvS9LLoO.js.map} +0 -0
  441. /package/dist/components/{p-BC777sCK.js.map → p-UJR-ixsy.js.map} +0 -0
  442. /package/dist/components/{p-mpsCUvSn.js.map → p-_qi2VkC2.js.map} +0 -0
  443. /package/dist/components/{p-CNprIkKd.js.map → p-rDr0x5Z7.js.map} +0 -0
  444. /package/dist/viewer/{p-510fd2e1.entry.js.map → p-2d2fa147.entry.js.map} +0 -0
  445. /package/dist/viewer/{p-fe434552.entry.js.map → p-30a5748d.entry.js.map} +0 -0
  446. /package/dist/viewer/{p-aa0359e0.entry.js.map → p-3c5dd716.entry.js.map} +0 -0
  447. /package/dist/viewer/{p-9312a936.entry.js.map → p-48020de1.entry.js.map} +0 -0
  448. /package/dist/viewer/{p-71c03352.entry.js.map → p-53f6cc59.entry.js.map} +0 -0
  449. /package/dist/viewer/{p-7b4eec65.entry.js.map → p-5cfb3047.entry.js.map} +0 -0
  450. /package/dist/viewer/{p-56e39cff.entry.js.map → p-83683307.entry.js.map} +0 -0
  451. /package/dist/viewer/{p-a108a305.entry.js.map → p-9a39315d.entry.js.map} +0 -0
  452. /package/dist/viewer/{p-82ed4346.entry.js.map → p-b79c295a.entry.js.map} +0 -0
  453. /package/dist/viewer/{p-c2454523.entry.js.map → p-cc835213.entry.js.map} +0 -0
  454. /package/dist/viewer/{p-91fca24b.entry.js.map → p-d5a57757.entry.js.map} +0 -0
  455. /package/dist/viewer/{p-a893a299.entry.js.map → p-edc2f914.entry.js.map} +0 -0
  456. /package/dist/viewer/{p-03a531d9.entry.js.map → p-ef9437ca.entry.js.map} +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
3
3
  */
4
- import{a as t,v as e,f as n,p as r,r as o,g as s,l as i,b as c,m as a,e as u,c as l,i as f,j as h}from"./p-CZZALKHT.js";import{v as d,p as m,L as p}from"./p-5kcpg4MZ.js";import{m as v,c as w,b as y}from"./p-CDM7zNn0.js";import{E as g}from"./p-BAhfr1Nx.js";import{g as b}from"./p-CG9AChtV.js";const C=v.defineMapper((t=>{switch(t){case"perspective":return d.protobuf.stream.CameraType.CAMERA_TYPE_PERSPECTIVE;case"orthographic":return d.protobuf.stream.CameraType.CAMERA_TYPE_ORTHOGRAPHIC;default:return d.protobuf.stream.CameraType.CAMERA_TYPE_INVALID}}),(t=>t));function x(){return v.ifInvalidThrow(C)}const k=v.defineMapper(v.read(v.requiredProp("r"),v.requiredProp("g"),v.requiredProp("b"),v.requiredProp("a")),(([t,e,n,r])=>w.create(t,e,n,r)));const F=v.defineMapper(v.read(v.requiredProp("msb"),v.requiredProp("lsb")),(([t,e])=>y.fromMsbLsb(t,e)));const M=v.defineMapper(v.read(v.requiredProp("seconds"),v.requiredProp("nanos")),(([t,e])=>m({seconds:t,nanos:e})));const S=v.defineMapper(v.read(v.requiredProp("iso")),(([t])=>new Date(t)));const j=v.defineMapper(v.read(v.requiredProp("hex")),(([t])=>t));const P=v.defineMapper(v.read(v.requiredProp("msb"),v.requiredProp("lsb")),(([t,e])=>{const n=BigInt(typeof t==="number"?t:t.toString());const r=BigInt(typeof e==="number"?e:e.toString());return y.fromMsbLsb(n,r)}));const I=v.defineMapper(v.compose((t=>y.toMsbLsb(t)),v.read(v.mapProp("msb",p.fromString),v.mapProp("lsb",p.fromString))),(([t,e])=>({msb:t,lsb:e})));function N(t){"@babel/helpers - typeof";return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(t)}function E(t){if(t===null||t===true||t===false){return NaN}var e=Number(t);if(isNaN(e)){return e}return e<0?Math.ceil(e):Math.floor(e)}function T(t,e){if(e.length<t){throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}}function D(t){T(1,arguments);var e=Object.prototype.toString.call(t);if(t instanceof Date||N(t)==="object"&&e==="[object Date]"){return new Date(t.getTime())}else if(typeof t==="number"||e==="[object Number]"){return new Date(t)}else{if((typeof t==="string"||e==="[object String]")&&typeof console!=="undefined"){console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");console.warn((new Error).stack)}return new Date(NaN)}}function A(t,e){T(2,arguments);var n=D(t);var r=E(e);if(isNaN(r)){return new Date(NaN)}if(!r){return n}n.setDate(n.getDate()+r);return n}function O(t,e){T(2,arguments);var n=D(t);var r=E(e);if(isNaN(r)){return new Date(NaN)}if(!r){return n}var o=n.getDate();var s=new Date(n.getTime());s.setMonth(n.getMonth()+r+1,0);var i=s.getDate();if(o>=i){return s}else{n.setFullYear(s.getFullYear(),s.getMonth(),o);return n}}function V(t,e){T(2,arguments);if(!e||N(e)!=="object")return new Date(NaN);var n=e.years?E(e.years):0;var r=e.months?E(e.months):0;var o=e.weeks?E(e.weeks):0;var s=e.days?E(e.days):0;var i=e.hours?E(e.hours):0;var c=e.minutes?E(e.minutes):0;var a=e.seconds?E(e.seconds):0;var u=D(t);var l=r||n?O(u,r+n*12):u;var f=s||o?A(l,s+o*7):l;var h=c+i*60;var d=a+h*60;var m=d*1e3;var p=new Date(f.getTime()+m);return p}function z(t,e){T(2,arguments);return D(t).getTime()-D(e).getTime()}function B(t,e){T(2,arguments);var n=D(t);var r=D(e);return n.getTime()>r.getTime()}function W(t,e){T(2,arguments);var n=E(e);return A(t,-n)}function R(t,e){T(2,arguments);var n=E(e);return O(t,-n)}function $(t,e){T(2,arguments);if(!e||N(e)!=="object")return new Date(NaN);var n=e.years?E(e.years):0;var r=e.months?E(e.months):0;var o=e.weeks?E(e.weeks):0;var s=e.days?E(e.days):0;var i=e.hours?E(e.hours):0;var c=e.minutes?E(e.minutes):0;var a=e.seconds?E(e.seconds):0;var u=R(t,r+n*12);var l=W(u,s+o*7);var f=c+i*60;var h=a+f*60;var d=h*1e3;var m=new Date(l.getTime()-d);return m}class q{constructor(t,e,n){this.token=t;this.expiresIn=e;this.expiresAt=n}static create(t,e){const n=V(new Date,{seconds:e});return new q(t,e,n)}hasExpired(){return B(new Date,this.expiresAt)}remainingTimeInMs(t){return z($(this.expiresAt,{seconds:t}),new Date)}}function L(t){if(H(t)){const n=_(t.lookAt);const r=_(t.position);const o=U(t.up);const s=n&&r&&U(e.subtract(t.lookAt,t.position));const i=t.fovY!=null&&Number.isFinite(t.fovY)&&t.fovY>=1&&t.fovY<=179;return o&&s&&i}else{const e=t;const n=U(e.viewVector);const r=_(e.lookAt);const o=U(e.up);const s=Number.isFinite(e.fovHeight)&&e.fovHeight>0;return n&&r&&o&&s}}function _(t){return t!=null&&e.isValid(t)}function U(t){return _(t)&&!e.isZeroVector(t)}function H(t){return t.position!=null&&t.fovHeight==null}function G(t){const e=t;return e.viewVector!=null&&e.fovHeight!=null}function Y(t){if(G(t)){return{...t,position:e.add(t.lookAt,e.negate(t.viewVector))}}else{return{...t,viewVector:e.subtract(t.lookAt,t.position)}}}function J(t={}){var n,r,o,s;return{position:(n=t.position)!==null&&n!==void 0?n:e.forward(),lookAt:(r=t.lookAt)!==null&&r!==void 0?r:e.origin(),up:(o=t.up)!==null&&o!==void 0?o:e.up(),fovY:(s=t.fovY)!==null&&s!==void 0?s:45}}function Z(t={}){var n,r,o,s,i,c;return{viewVector:(n=t.viewVector)!==null&&n!==void 0?n:e.back(),lookAt:(r=t.lookAt)!==null&&r!==void 0?r:e.origin(),up:(o=t.up)!==null&&o!==void 0?o:e.up(),fovHeight:(s=t.fovHeight)!==null&&s!==void 0?s:1,rotationPoint:(c=(i=t.rotationPoint)!==null&&i!==void 0?i:t.lookAt)!==null&&c!==void 0?c:e.origin()}}function Q(r,o){var s;const i=e.subtract(r.lookAt,r.position);const c=n.create(o);const a=c.radius/e.magnitude(i);return{viewVector:e.scale(a,i),up:r.up,lookAt:r.lookAt,fovHeight:2*e.magnitude(i)*Math.tan(t.toRadians(((s=r.fovY)!==null&&s!==void 0?s:45)/2))}}function K(n,r=45){const o=n.fovHeight/(2*Math.tan(t.toRadians(r/2)));const s=e.magnitude(n.viewVector);const i=o/s;return{position:e.add(n.lookAt,e.negate(e.scale(i,n.viewVector))),up:n.up,lookAt:n.lookAt,fovY:r}}function X(t){if(G(t)){return{orthographic:{viewVector:{...t.viewVector},lookAt:{...t.lookAt},up:{...t.up},fovHeight:t.fovHeight}}}else if(H(t)){return{perspective:{position:{...t.position},lookAt:{...t.lookAt},up:{...t.up},fovY:t.fovY?{value:t.fovY}:null},position:{...t.position},lookAt:{...t.lookAt},up:{...t.up}}}else{return{...t}}}var tt=Object.freeze({__proto__:null,createOrthographic:Z,createPerspective:J,isOrthographicFrameCamera:G,isPerspectiveFrameCamera:H,isValidFrameCamera:L,toOrthographic:Q,toPerspective:K,toProtobuf:X,withPositionAndViewVector:Y});function et(t,e){return G(e)?rt(t):nt(t,e)}function nt(t,r){const o=n.create(t);const s=o.epsilon*100;const i=e.dot(e.subtract(o.center,r.position),e.normalize(e.subtract(r.lookAt,r.position)));const c=Math.max(o.radius,s);let a=c+i<s?c*3:c+i;let u=a-c*2<s?Math.min(s,a):a-c*2;if(a-u<s){u=Math.max(u,s);a+=u+s}else if(u/a<1e-4){u=a*1e-4}if(u>a-c*2){if(u>1e3+s){a-=u-1e3;u=1e3}}return{near:u,far:a}}function rt(t,e){const r=n.create(t);const o=r.epsilon*100;const s=Math.max(r.radius,o);return{near:-s,far:s}}function ot(t={}){return{sectionPlanes:t.sectionPlanes||[],highlightColor:t.highlightColor,lineWidth:t.lineWidth}}var st=Object.freeze({__proto__:null,create:ot});function it(t={}){return{modelViewId:t.modelViewId,sceneItemId:t.sceneItemId}}function ct(t={}){return{visibleSummary:t.visibleSummary,selectedVisibleSummary:t.selectedVisibleSummary}}function at(t,e){return ut(t.scene.sceneViewSummary)?t.copy({scene:t.scene.copy({sceneViewSummary:e===null||e===void 0?void 0:e.scene.sceneViewSummary})}):t}function ut(t){return t.visibleSummary==null}class lt{constructor(t,e,n){this.camera=t;this.imageAttr=e;this.pixels=n}static fromPng(t,e,n){if(t.data instanceof Uint16Array){return new lt(e,n,t.data)}else{throw new Error("Expected depth PNG to have depth of 16-bit")}}getDepthAtPoint(t,e){const{near:n,far:r}=this.camera;const o=this.camera.isPerspective();const s=this.getNormalizedDepthAtPoint(t,e);if(o){return s*(r-n)+n}else{return s*(r-n)}}getMaxDepthOfGeometry(){const{near:t,far:e}=this.camera;const n=this.camera.isPerspective();if(n){return e}else{return e-t}}getNormalizedDepthAtPoint(t,e){const{width:n,height:o}=this.imageAttr.imageRect;const s=r.subtract(t,this.imageAttr.imageRect);const i=1/this.imageAttr.imageScale;const c=r.scale(s,i,i);if(c.x>=0&&c.y>=0&&c.x<n&&c.y<o){const t=Math.floor(c.x)+Math.floor(c.y)*n;const r=this.pixels[t];const o=r===lt.MAX_DEPTH_VALUE?e!==null&&e!==void 0?e:r:r;return(o!==null&&o!==void 0?o:lt.MAX_DEPTH_VALUE)/lt.MAX_DEPTH_VALUE}else{return e!==null&&e!==void 0?e:1}}hitTest(t){return this.getNormalizedDepthAtPoint(t)<1}getWorldPoint(t,n,r){const s=this.getDepthAtPoint(t,r);const i=this.camera.isPerspective();if(i){const{position:t,viewVector:r,far:i}=this.camera;const c=o.at(n,i);const a=e.subtract(c,t);const u=e.dot(r,a)/(e.magnitude(r)*e.magnitude(a));return o.at(n,s/u)}else{return o.at(n,s)}}distanceToPoint(t){const{position:n,direction:r}=this.camera;const o=e.subtract(t,n);return Math.abs(e.dot(o,r))}depthOfClosestGeometry(t,e){const{projectionViewMatrix:n}=this.camera;const r=e.transformWorldToViewport(t,n);const o=e.transformPointToFrame(r,this);return this.getDepthAtPoint(o)}isOccluded(t,e){const n=this.distanceToPoint(t);const r=this.depthOfClosestGeometry(t,e);const o=Math.abs(.02*n);const s=Math.abs(r-n);return n>r&&s>o}isDetached(t,e){const n=this.distanceToPoint(t);const r=this.depthOfClosestGeometry(t,e);const o=r-n;const s=.02*n;const i=o<s;const c=this.getMaxDepthOfGeometry();const a=n>c;const u=!i||a;return u}}lt.MAX_DEPTH_VALUE=2**16-1;class ft{constructor(t){this.scale=t}convertTo(t){return t*this.scale}convertFrom(t){return t/this.scale}}class ht extends ft{constructor(){super(1)}}class dt extends ft{constructor(t=1){super(1/Math.pow(10,t))}}class mt extends ft{constructor(t=1){super(1/Math.pow(1e3,t))}}class pt extends ft{constructor(t=1){super(1/Math.pow(25.4,t))}}class vt extends ft{constructor(t=1){super(1/Math.pow(25.4*12,t))}}class wt extends ft{constructor(t=1){super(1/Math.pow(25.4*12*3,t))}}class yt{constructor(t){this.unitType=t;this.unit=yt.units[t]}convertWorldValueToReal(t){return this.unit.converter.convertTo(t)}convertRealValueToWorld(t){return this.unit.converter.convertFrom(t)}convertWorldPointToReal(t){const e=this.unit.converter.convertTo(t.x);const n=this.unit.converter.convertTo(t.y);const r=this.unit.converter.convertTo(t.z);return{x:e,y:n,z:r}}convertRealPointToWorld(t){const e=this.unit.converter.convertFrom(t.x);const n=this.unit.converter.convertFrom(t.y);const r=this.unit.converter.convertFrom(t.z);return{x:e,y:n,z:r}}}yt.units={millimeters:{name:"Millimeters",abbreviatedName:"mm",converter:new ht},centimeters:{name:"Centimeters",abbreviatedName:"cm",converter:new dt},meters:{name:"Meters",abbreviatedName:"m",converter:new mt},inches:{name:"Inches",abbreviatedName:"in",converter:new pt},feet:{name:"Feet",abbreviatedName:"ft",converter:new vt},yards:{name:"Yards",abbreviatedName:"yd",converter:new wt}};class gt{convertTo(e){return t.toDegrees(e)}convertFrom(e){return t.toRadians(e)}}class bt{constructor(t){this.unitType=t;this.unit=bt.units[t]}convertTo(t){return this.unit.converter.convertTo(t)}convertFrom(t){return this.unit.converter.convertFrom(t)}}bt.units={radians:{name:"Radians",abbreviatedName:"rad",converter:new ft(1)},degrees:{name:"Degrees",abbreviatedName:"deg",converter:new gt}};class Ct{constructor(t){this.unitType=t;this.unit=Ct.units[t]}convertWorldValueToReal(t){return this.unit.converter.convertTo(t)}convertRealValueToWorld(t){return this.unit.converter.convertFrom(t)}}Ct.units={millimeters:{name:"Square Millimeters",abbreviatedName:"mm²",converter:new ht},centimeters:{name:"Square Centimeters",abbreviatedName:"cm²",converter:new dt(2)},meters:{name:"Square Meters",abbreviatedName:"m²",converter:new mt(2)},inches:{name:"Square Inches",abbreviatedName:"in²",converter:new pt(2)},feet:{name:"Square Feet",abbreviatedName:"ft²",converter:new vt(2)},yards:{name:"Square Yards",abbreviatedName:"yd²",converter:new wt(2)}};class xt{constructor(t,e){this.pixels=t;this.imageAttr=e}static fromPng(t,e){if(!(t.data instanceof Uint8Array)){throw new Error("Cannot create FeatureMap. Expected decoded PNG to be a Uint8Array.")}else if(t.channels!==4){throw new Error("Cannot create FeatureMap. Missing alpha channel.")}else{return new xt(t.data,{...e,imageRect:s.fromPointAndDimensions(e.imageRect,t)})}}getEntityType(t){const e=this.getColor(t);if((e===null||e===void 0?void 0:e.a)===g.CROSS_SECTION){return g.CROSS_SECTION}else if((e===null||e===void 0?void 0:e.a)===g.GENERIC_GEOMETRY){return g.GENERIC_GEOMETRY}else if((e===null||e===void 0?void 0:e.a)===g.IMPRECISE_EDGE){return g.IMPRECISE_EDGE}else if((e===null||e===void 0?void 0:e.a)===g.IMPRECISE_SURFACE){return g.IMPRECISE_SURFACE}else if((e===null||e===void 0?void 0:e.a)===g.PRECISE_EDGE){return g.PRECISE_EDGE}else if((e===null||e===void 0?void 0:e.a)===g.PRECISE_SURFACE){return g.PRECISE_SURFACE}else{return g.NO_GEOMETRY}}getColor(t){const{width:e,height:n}=this.imageAttr.imageRect;const o=r.subtract(t,this.imageAttr.imageRect);const s=1/this.imageAttr.imageScale;const i=r.scale(o,s,s);if(i.x>=0&&i.y>=0&&i.x<e&&i.y<n){const t=Math.floor(i.x)*4+Math.floor(i.y)*4*e;const n=this.pixels[t];const r=this.pixels[t+1];const o=this.pixels[t+2];const s=this.pixels[t+3];return w.create(n,r,o,s)}else return undefined}}let kt;function Ft(){if(!kt){kt=Mt()}return kt}function Mt(){try{throw new Error}catch(t){const e=(""+t.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);if(e){return St(e[0])}}return"/"}function St(t){return(""+t).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)?\/[^/]+(?:\?.*)?$/,"$1")+"/"}const jt=typeof navigator!=="undefined"&&navigator.hardwareConcurrency?navigator.hardwareConcurrency:4;const Pt=t=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(t);function It(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function Nt(){if(typeof Worker==="undefined"){return class t{constructor(){throw Error("No web worker implementation available. You might have tried to spawn a worker within a worker in a browser that doesn't support workers in workers.")}}}class t extends Worker{constructor(t,e){var n,r;if(typeof t==="string"&&e&&e._baseURL){t=new URL(t,e._baseURL)}else if(typeof t==="string"&&!Pt(t)&&Ft().match(/^file:\/\//i)){t=new URL(t,Ft().replace(/\/[^/]+$/,"/"));if((n=e===null||e===void 0?void 0:e.CORSWorkaround)!==null&&n!==void 0?n:true){t=It(`importScripts(${JSON.stringify(t)});`)}}if(typeof t==="string"&&Pt(t)){if((r=e===null||e===void 0?void 0:e.CORSWorkaround)!==null&&r!==void 0?r:true){t=It(`importScripts(${JSON.stringify(t)});`)}}super(t,e)}}class e extends t{constructor(t,e){const n=window.URL.createObjectURL(t);super(n,e)}static fromText(t,n){const r=new window.Blob([t],{type:"text/javascript"});return new e(r,n)}}return{blob:e,default:t}}let Et;function Tt(){if(!Et){Et=Nt()}return Et}var Dt={exports:{}};var At;var Ot;function Vt(){if(Ot)return At;Ot=1;var t=1e3;var e=t*60;var n=e*60;var r=n*24;var o=r*7;var s=r*365.25;At=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0){return i(t)}else if(n==="number"&&isFinite(t)){return e.long?a(t):c(t)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function i(i){i=String(i);if(i.length>100){return}var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(!c){return}var a=parseFloat(c[1]);var u=(c[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"weeks":case"week":case"w":return a*o;case"days":case"day":case"d":return a*r;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*e;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return undefined}}function c(o){var s=Math.abs(o);if(s>=r){return Math.round(o/r)+"d"}if(s>=n){return Math.round(o/n)+"h"}if(s>=e){return Math.round(o/e)+"m"}if(s>=t){return Math.round(o/t)+"s"}return o+"ms"}function a(o){var s=Math.abs(o);if(s>=r){return u(o,s,r,"day")}if(s>=n){return u(o,s,n,"hour")}if(s>=e){return u(o,s,e,"minute")}if(s>=t){return u(o,s,t,"second")}return o+" ms"}function u(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}return At}var zt;var Bt;function Wt(){if(Bt)return zt;Bt=1;function t(t){n.debug=n;n.default=n;n.coerce=a;n.disable=i;n.enable=o;n.enabled=c;n.humanize=Vt();n.destroy=u;Object.keys(t).forEach((e=>{n[e]=t[e]}));n.names=[];n.skips=[];n.formatters={};function e(t){let e=0;for(let n=0;n<t.length;n++){e=(e<<5)-e+t.charCodeAt(n);e|=0}return n.colors[Math.abs(e)%n.colors.length]}n.selectColor=e;function n(t){let e;let o=null;let s;let i;function c(...t){if(!c.enabled){return}const r=c;const o=Number(new Date);const s=o-(e||o);r.diff=s;r.prev=e;r.curr=o;e=o;t[0]=n.coerce(t[0]);if(typeof t[0]!=="string"){t.unshift("%O")}let i=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((e,o)=>{if(e==="%%"){return"%"}i++;const s=n.formatters[o];if(typeof s==="function"){const n=t[i];e=s.call(r,n);t.splice(i,1);i--}return e}));n.formatArgs.call(r,t);const a=r.log||n.log;a.apply(r,t)}c.namespace=t;c.useColors=n.useColors();c.color=n.selectColor(t);c.extend=r;c.destroy=n.destroy;Object.defineProperty(c,"enabled",{enumerable:true,configurable:false,get:()=>{if(o!==null){return o}if(s!==n.namespaces){s=n.namespaces;i=n.enabled(t)}return i},set:t=>{o=t}});if(typeof n.init==="function"){n.init(c)}return c}function r(t,e){const r=n(this.namespace+(typeof e==="undefined"?":":e)+t);r.log=this.log;return r}function o(t){n.save(t);n.namespaces=t;n.names=[];n.skips=[];const e=(typeof t==="string"?t:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const t of e){if(t[0]==="-"){n.skips.push(t.slice(1))}else{n.names.push(t)}}}function s(t,e){let n=0;let r=0;let o=-1;let s=0;while(n<t.length){if(r<e.length&&(e[r]===t[n]||e[r]==="*")){if(e[r]==="*"){o=r;s=n;r++}else{n++;r++}}else if(o!==-1){r=o+1;s++;n=s}else{return false}}while(r<e.length&&e[r]==="*"){r++}return r===e.length}function i(){const t=[...n.names,...n.skips.map((t=>"-"+t))].join(",");n.enable("");return t}function c(t){for(const e of n.skips){if(s(t,e)){return false}}for(const e of n.names){if(s(t,e)){return true}}return false}function a(t){if(t instanceof Error){return t.stack||t.message}return t}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}n.enable(n.load());return n}zt=t;return zt}var Rt;function $t(){if(Rt)return Dt.exports;Rt=1;(function(t,e){e.formatArgs=r;e.save=o;e.load=s;e.useColors=n;e.storage=i();e.destroy=(()=>{let t=false;return()=>{if(!t){t=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}let t;return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff);if(!this.useColors){return}const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0;let o=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{if(t==="%%"){return}r++;if(t==="%c"){o=r}}));e.splice(o,0,n)}e.log=console.debug||console.log||(()=>{});function o(t){try{if(t){e.storage.setItem("debug",t)}else{e.storage.removeItem("debug")}}catch(t){}}function s(){let t;try{t=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch(t){}if(!t&&typeof process!=="undefined"&&"env"in process){t=process.env.DEBUG}return t}function i(){try{return localStorage}catch(t){}}t.exports=Wt()(e);const{formatters:c}=t.exports;c.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}})(Dt,Dt.exports);return Dt.exports}var qt=$t();var Lt=b(qt);const _t=()=>typeof Symbol==="function";const Ut=t=>_t()&&Boolean(Symbol[t]);const Ht=t=>Ut(t)?Symbol[t]:"@@"+t;if(!Ut("asyncIterator")){Symbol.asyncIterator=Symbol.asyncIterator||Symbol.for("Symbol.asyncIterator")}const Gt=Ht("iterator");const Yt=Ht("observable");const Jt=Ht("species");function Zt(t,e){const n=t[e];if(n==null){return undefined}if(typeof n!=="function"){throw new TypeError(n+" is not a function")}return n}function Qt(t){let e=t.constructor;if(e!==undefined){e=e[Jt];if(e===null){e=undefined}}return e!==undefined?e:ae}function Kt(t){return t instanceof ae}function Xt(t){if(Xt.log){Xt.log(t)}else{setTimeout((()=>{throw t}),0)}}function te(t){Promise.resolve().then((()=>{try{t()}catch(t){Xt(t)}}))}function ee(t){const e=t._cleanup;if(e===undefined){return}t._cleanup=undefined;if(!e){return}try{if(typeof e==="function"){e()}else{const t=Zt(e,"unsubscribe");if(t){t.call(e)}}}catch(t){Xt(t)}}function ne(t){t._observer=undefined;t._queue=undefined;t._state="closed"}function re(t){const e=t._queue;if(!e){return}t._queue=undefined;t._state="ready";for(const n of e){oe(t,n.type,n.value);if(t._state==="closed"){break}}}function oe(t,e,n){t._state="running";const r=t._observer;try{const o=r?Zt(r,e):undefined;switch(e){case"next":if(o)o.call(r,n);break;case"error":ne(t);if(o)o.call(r,n);else throw n;break;case"complete":ne(t);if(o)o.call(r);break}}catch(t){Xt(t)}if(t._state==="closed"){ee(t)}else if(t._state==="running"){t._state="ready"}}function se(t,e,n){if(t._state==="closed"){return}if(t._state==="buffering"){t._queue=t._queue||[];t._queue.push({type:e,value:n});return}if(t._state!=="ready"){t._state="buffering";t._queue=[{type:e,value:n}];te((()=>re(t)));return}oe(t,e,n)}class ie{constructor(t,e){this._cleanup=undefined;this._observer=t;this._queue=undefined;this._state="initializing";const n=new ce(this);try{this._cleanup=e.call(undefined,n)}catch(t){n.error(t)}if(this._state==="initializing"){this._state="ready"}}get closed(){return this._state==="closed"}unsubscribe(){if(this._state!=="closed"){ne(this);ee(this)}}}class ce{constructor(t){this._subscription=t}get closed(){return this._subscription._state==="closed"}next(t){se(this._subscription,"next",t)}error(t){se(this._subscription,"error",t)}complete(){se(this._subscription,"complete")}}class ae{constructor(t){if(!(this instanceof ae)){throw new TypeError("Observable cannot be called as a function")}if(typeof t!=="function"){throw new TypeError("Observable initializer must be a function")}this._subscriber=t}subscribe(t,e,n){if(typeof t!=="object"||t===null){t={next:t,error:e,complete:n}}return new ie(t,this._subscriber)}pipe(t,...e){let n=this;for(const r of[t,...e]){n=r(n)}return n}tap(t,e,n){const r=typeof t!=="object"||t===null?{next:t,error:e,complete:n}:t;return new ae((t=>this.subscribe({next(e){r.next&&r.next(e);t.next(e)},error(e){r.error&&r.error(e);t.error(e)},complete(){r.complete&&r.complete();t.complete()},start(t){r.start&&r.start(t)}})))}forEach(t){return new Promise(((e,n)=>{if(typeof t!=="function"){n(new TypeError(t+" is not a function"));return}function r(){o.unsubscribe();e(undefined)}const o=this.subscribe({next(e){try{t(e,r)}catch(t){n(t);o.unsubscribe()}},error(t){n(t)},complete(){e(undefined)}})}))}map(t){if(typeof t!=="function"){throw new TypeError(t+" is not a function")}const e=Qt(this);return new e((e=>this.subscribe({next(n){let r=n;try{r=t(n)}catch(t){return e.error(t)}e.next(r)},error(t){e.error(t)},complete(){e.complete()}})))}filter(t){if(typeof t!=="function"){throw new TypeError(t+" is not a function")}const e=Qt(this);return new e((e=>this.subscribe({next(n){try{if(!t(n))return}catch(t){return e.error(t)}e.next(n)},error(t){e.error(t)},complete(){e.complete()}})))}reduce(t,e){if(typeof t!=="function"){throw new TypeError(t+" is not a function")}const n=Qt(this);const r=arguments.length>1;let o=false;let s=e;return new n((e=>this.subscribe({next(n){const i=!o;o=true;if(!i||r){try{s=t(s,n)}catch(t){return e.error(t)}}else{s=n}},error(t){e.error(t)},complete(){if(!o&&!r){return e.error(new TypeError("Cannot reduce an empty sequence"))}e.next(s);e.complete()}})))}concat(...t){const e=Qt(this);return new e((n=>{let r;let o=0;function s(i){r=i.subscribe({next(t){n.next(t)},error(t){n.error(t)},complete(){if(o===t.length){r=undefined;n.complete()}else{s(e.from(t[o++]))}}})}s(this);return()=>{if(r){r.unsubscribe();r=undefined}}}))}flatMap(t){if(typeof t!=="function"){throw new TypeError(t+" is not a function")}const e=Qt(this);return new e((n=>{const r=[];const o=this.subscribe({next(o){let i;if(t){try{i=t(o)}catch(t){return n.error(t)}}else{i=o}const c=e.from(i).subscribe({next(t){n.next(t)},error(t){n.error(t)},complete(){const t=r.indexOf(c);if(t>=0)r.splice(t,1);s()}});r.push(c)},error(t){n.error(t)},complete(){s()}});function s(){if(o.closed&&r.length===0){n.complete()}}return()=>{r.forEach((t=>t.unsubscribe()));o.unsubscribe()}}))}[Yt](){return this}static from(t){const e=typeof this==="function"?this:ae;if(t==null){throw new TypeError(t+" is not an object")}const n=Zt(t,Yt);if(n){const r=n.call(t);if(Object(r)!==r){throw new TypeError(r+" is not an object")}if(Kt(r)&&r.constructor===e){return r}return new e((t=>r.subscribe(t)))}if(Ut("iterator")){const n=Zt(t,Gt);if(n){return new e((e=>{te((()=>{if(e.closed)return;for(const r of n.call(t)){e.next(r);if(e.closed)return}e.complete()}))}))}}if(Array.isArray(t)){return new e((e=>{te((()=>{if(e.closed)return;for(const n of t){e.next(n);if(e.closed)return}e.complete()}))}))}throw new TypeError(t+" is not observable")}static of(...t){const e=typeof this==="function"?this:ae;return new e((e=>{te((()=>{if(e.closed)return;for(const n of t){e.next(n);if(e.closed)return}e.complete()}))}))}static get[Jt](){return this}}if(_t()){Object.defineProperty(ae,Symbol("extensions"),{value:{symbol:Yt,hostReportError:Xt},configurable:true})}function ue(t){if(typeof t==="function"){t()}else if(t&&typeof t.unsubscribe==="function"){t.unsubscribe()}}class le extends ae{constructor(){super((t=>{this._observers.add(t);return()=>this._observers.delete(t)}));this._observers=new Set}next(t){for(const e of this._observers){e.next(t)}}error(t){for(const e of this._observers){e.error(t)}}complete(){for(const t of this._observers){t.complete()}}}function fe(t){const e=new le;let n;let r=0;return new ae((o=>{if(!n){n=t.subscribe(e)}const s=e.subscribe(o);r++;return()=>{r--;s.unsubscribe();if(r===0){ue(n);n=undefined}}}))}function he(t){return Promise.all(t.map((t=>{const e=t=>({status:"fulfilled",value:t});const n=t=>({status:"rejected",reason:t});const r=Promise.resolve(t);try{return r.then(e,n)}catch(t){return Promise.reject(t)}})))}var de;(function(t){t["initialized"]="initialized";t["taskCanceled"]="taskCanceled";t["taskCompleted"]="taskCompleted";t["taskFailed"]="taskFailed";t["taskQueued"]="taskQueued";t["taskQueueDrained"]="taskQueueDrained";t["taskStart"]="taskStart";t["terminated"]="terminated"})(de||(de={}));const me=Symbol("thread.errors");const pe=Symbol("thread.events");const ve=Symbol("thread.terminate");const we=Symbol("thread.transferable");const ye=Symbol("thread.worker");function ge(t){throw Error(t)}const be={errors(t){return t[me]||ge("Error observable not found. Make sure to pass a thread instance as returned by the spawn() promise.")},events(t){return t[pe]||ge("Events observable not found. Make sure to pass a thread instance as returned by the spawn() promise.")},terminate(t){return t[ve]()}};var Ce=undefined&&undefined.__awaiter||function(t,e,n,r){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,s){function i(t){try{a(r.next(t))}catch(t){s(t)}}function c(t){try{a(r["throw"](t))}catch(t){s(t)}}function a(t){t.done?n(t.value):o(t.value).then(i,c)}a((r=r.apply(t,e||[])).next())}))};let xe=1;function ke(t){const e=[];for(let n=0;n<t;n++){e.push(n)}return e}function Fe(t){return new Promise((e=>setTimeout(e,t)))}function Me(t,e){return t.reduce(((t,n)=>[...t,...e(n)]),[])}function Se(t){return t.replace(/\W/g," ").trim().replace(/\s+/g,"-")}function je(t,e){return ke(e).map((()=>({init:t(),runningTasks:[]})))}class Pe{constructor(t,e){this.eventSubject=new le;this.initErrors=[];this.isClosing=false;this.nextTaskID=1;this.taskQueue=[];const n=typeof e==="number"?{size:e}:e||{};const{size:r=jt}=n;this.debug=Lt(`threads:pool:${Se(n.name||String(xe++))}`);this.options=n;this.workers=je(t,r);this.eventObservable=fe(ae.from(this.eventSubject));Promise.all(this.workers.map((t=>t.init))).then((()=>this.eventSubject.next({type:de.initialized,size:this.workers.length})),(t=>{this.debug("Error while initializing pool worker:",t);this.eventSubject.error(t);this.initErrors.push(t)}))}findIdlingWorker(){const{concurrency:t=1}=this.options;return this.workers.find((e=>e.runningTasks.length<t))}runPoolTask(t,e){return Ce(this,void 0,void 0,(function*(){const n=this.workers.indexOf(t)+1;this.debug(`Running task #${e.id} on worker #${n}...`);this.eventSubject.next({type:de.taskStart,taskID:e.id,workerID:n});try{const r=yield e.run(yield t.init);this.debug(`Task #${e.id} completed successfully`);this.eventSubject.next({type:de.taskCompleted,returnValue:r,taskID:e.id,workerID:n})}catch(t){this.debug(`Task #${e.id} failed`);this.eventSubject.next({type:de.taskFailed,taskID:e.id,error:t,workerID:n})}}))}run(t,e){return Ce(this,void 0,void 0,(function*(){const n=(()=>Ce(this,void 0,void 0,(function*(){const r=()=>{t.runningTasks=t.runningTasks.filter((t=>t!==n))};yield Fe(0);try{yield this.runPoolTask(t,e)}finally{r();if(!this.isClosing){this.scheduleWork()}}})))();t.runningTasks.push(n)}))}scheduleWork(){this.debug(`Attempt de-queueing a task in order to run it...`);const t=this.findIdlingWorker();if(!t)return;const e=this.taskQueue.shift();if(!e){this.debug(`Task queue is empty`);this.eventSubject.next({type:de.taskQueueDrained});return}this.run(t,e)}taskCompletion(t){return new Promise(((e,n)=>{const r=this.events().subscribe((o=>{if(o.type===de.taskCompleted&&o.taskID===t){r.unsubscribe();e(o.returnValue)}else if(o.type===de.taskFailed&&o.taskID===t){r.unsubscribe();n(o.error)}else if(o.type===de.terminated){r.unsubscribe();n(Error("Pool has been terminated before task was run."))}}))}))}settled(){return Ce(this,arguments,void 0,(function*(t=false){const e=()=>Me(this.workers,(t=>t.runningTasks));const n=[];const r=this.eventObservable.subscribe((t=>{if(t.type===de.taskFailed){n.push(t.error)}}));if(this.initErrors.length>0){return Promise.reject(this.initErrors[0])}if(t&&this.taskQueue.length===0){yield he(e());return n}yield new Promise(((t,e)=>{const n=this.eventObservable.subscribe({next(e){if(e.type===de.taskQueueDrained||e.type===de.terminated){n.unsubscribe();t(void 0)}},complete(){n.unsubscribe();t(void 0)},error:e})}));yield he(e());r.unsubscribe();return n}))}completed(){return Ce(this,arguments,void 0,(function*(t=false){const e=this.settled(t);const n=new Promise(((t,n)=>{const r=this.eventObservable.subscribe({next(o){if(o.type===de.taskQueueDrained||o.type===de.terminated){r.unsubscribe();t(e)}else if(o.type===de.taskFailed){r.unsubscribe();n(o.error)}},complete(){r.unsubscribe();t(e)},error:n})}));const r=yield Promise.race([e,n]);if(r.length>0){throw r[0]}}))}events(){return this.eventObservable}queue(t){const{maxQueuedJobs:e=Infinity}=this.options;if(this.isClosing){throw Error(`Cannot schedule pool tasks after terminate() has been called.`)}if(this.initErrors.length>0){throw this.initErrors[0]}const n=this.nextTaskID++;const r=this.taskCompletion(n);r.catch((t=>{this.debug(`Task #${n} errored:`,t)}));const o={id:n,run:t,cancel:()=>{if(this.taskQueue.indexOf(o)===-1)return;this.taskQueue=this.taskQueue.filter((t=>t!==o));this.eventSubject.next({type:de.taskCanceled,taskID:o.id})},then:r.then.bind(r)};if(this.taskQueue.length>=e){throw Error("Maximum number of pool tasks queued. Refusing to queue another one.\n"+"This usually happens for one of two reasons: We are either at peak "+"workload right now or some tasks just won't finish, thus blocking the pool.")}this.debug(`Queueing task #${o.id}...`);this.taskQueue.push(o);this.eventSubject.next({type:de.taskQueued,taskID:o.id});this.scheduleWork();return o}terminate(t){return Ce(this,void 0,void 0,(function*(){this.isClosing=true;if(!t){yield this.completed(true)}this.eventSubject.next({type:de.terminated,remainingQueue:[...this.taskQueue]});this.eventSubject.complete();yield Promise.all(this.workers.map((t=>Ce(this,void 0,void 0,(function*(){try{yield be.terminate(yield t.init)}catch(t){this.debug("Worker did not initialize; nothing to terminate:",t)}})))))}))}}Pe.EventType=de;function Ie(t,e){return new Pe(t,e)}Ie.EventType=de;const Ne=Ie;const Ee={deserialize(t){return Object.assign(Error(t.message),{name:t.name,stack:t.stack})},serialize(t){return{__error_marker:"$$error",message:t.message,name:t.name,stack:t.stack}}};const Te=t=>t&&typeof t==="object"&&"__error_marker"in t&&t.__error_marker==="$$error";const De={deserialize(t){if(Te(t)){return Ee.deserialize(t)}else{return t}},serialize(t){if(t instanceof Error){return Ee.serialize(t)}else{return t}}};let Ae=De;function Oe(t){return Ae.deserialize(t)}function Ve(t){return Ae.serialize(t)}const ze=()=>undefined;function Be(){let t=false;let e;let n=ze;const r=new Promise((r=>{if(t){r(e)}else{n=r}}));const o=r=>{t=true;e=r;n(e)};return[r,o]}var We;(function(t){t["internalError"]="internalError";t["message"]="message";t["termination"]="termination"})(We||(We={}));class Re extends Error{constructor(t,e){super(t);this.name="ThreadCloneError";this.cause=e;Object.setPrototypeOf(this,Re.prototype)}}function $e(t){return Boolean(t&&typeof t==="object"&&t.name==="DataCloneError")}var qe;const Le=()=>undefined;const _e=t=>t;const Ue=t=>Promise.resolve().then(t);function He(t){throw t}function Ge(t){return t&&typeof t.then==="function"}class Ye extends ae{constructor(t){super((e=>{const n=this;const r=Object.assign(Object.assign({},e),{complete(){e.complete();n.onCompletion()},error(t){e.error(t);n.onError(t)},next(t){e.next(t);n.onNext(t)}});try{this.initHasRun=true;return t(r)}catch(t){r.error(t)}}));this.initHasRun=false;this.fulfillmentCallbacks=[];this.rejectionCallbacks=[];this.firstValueSet=false;this.state="pending";this[qe]="[object ObservablePromise]"}onNext(t){if(!this.firstValueSet){this.firstValue=t;this.firstValueSet=true}}onError(t){this.state="rejected";this.rejection=t;for(const e of this.rejectionCallbacks){Ue((()=>e(t)))}}onCompletion(){this.state="fulfilled";for(const t of this.fulfillmentCallbacks){Ue((()=>t(this.firstValue)))}}then(t,e){const n=t||_e;const r=e||He;let o=false;return new Promise(((t,e)=>{const s=n=>{if(o)return;o=true;try{t(r(n))}catch(t){e(t)}};const i=e=>{try{t(n(e))}catch(t){s(t)}};if(!this.initHasRun){this.subscribe({error:s})}if(this.state==="fulfilled"){return t(n(this.firstValue))}if(this.state==="rejected"){o=true;return t(r(this.rejection))}this.fulfillmentCallbacks.push(i);this.rejectionCallbacks.push(s)}))}catch(t){return this.then(undefined,t)}finally(t){const e=t||Le;return this.then((t=>{e();return t}),(()=>e()))}static from(t){if(Ge(t)){return new Ye((e=>{const n=t=>{e.next(t);e.complete()};const r=t=>{e.error(t)};t.then(n,r)}))}else{return super.from(t)}}}qe=Symbol.toStringTag;function Je(t){return t&&typeof t==="object"&&t[we]}var Ze;(function(t){t["cancel"]="cancel";t["run"]="run"})(Ze||(Ze={}));var Qe;(function(t){t["error"]="error";t["init"]="init";t["result"]="result";t["running"]="running";t["uncaughtError"]="uncaughtError"})(Qe||(Qe={}));const Ke=Lt("threads:master:messages");let Xe=1;const tn=t=>Array.from(new Set(t));const en=t=>t&&t.type===Qe.error;const nn=t=>t&&t.type===Qe.result;const rn=t=>t&&t.type===Qe.running;function on(t,e){return new ae((n=>{let r;let o=false;const s=()=>{t.removeEventListener("message",i);t.removeEventListener("error",c);t.removeEventListener("exit",a)};const i=t=>{Ke("Message from worker:",t.data);if(!t.data||t.data.uid!==e)return;if(rn(t.data)){r=t.data.resultType}else if(nn(t.data)){if(r==="promise"){if(typeof t.data.payload!=="undefined"){n.next(Oe(t.data.payload))}o=true;n.complete();s()}else{if(typeof t.data.payload!=="undefined"){n.next(Oe(t.data.payload))}if(t.data.complete){o=true;n.complete();s()}}}else if(en(t.data)){const e=Oe(t.data.error);o=true;n.error(e);s()}};const c=t=>{if(o)return;o=true;const e=t&&t.data instanceof Error?t.data:Error(String(t&&t.data||"Worker errored before the job completed."));n.error(e);s()};const a=t=>{if(o)return;o=true;const e=t?t.data:undefined;n.error(Error(`Worker terminated before the job completed (exit code: ${e}).`));s()};t.addEventListener("message",i);t.addEventListener("error",c);t.addEventListener("exit",a);return()=>{if(r==="observable"||!r){const n={type:Ze.cancel,uid:e};t.postMessage(n)}s()}}))}function sn(t){if(t.length===0){return{args:[],transferables:[]}}const e=[];const n=[];for(const r of t){if(Je(r)){e.push(Ve(r.send));n.push(...r.transferables)}else{e.push(Ve(r))}}return{args:e,transferables:n.length===0?n:tn(n)}}function cn(t,e){return(...n)=>{const r=Xe++;const{args:o,transferables:s}=sn(n);const i={type:Ze.run,uid:r,method:e,args:o};Ke("Sending command to run function to worker:",i);try{t.postMessage(i,s)}catch(t){if($e(t)){const e=new Re(`Cannot send arguments to the worker thread: a value is not structured-cloneable. `+`Functions, class instances and other non-serializable values cannot be passed to a thread. `+`Original error: ${t.message}`,t);return Ye.from(Promise.reject(e))}return Ye.from(Promise.reject(t))}return Ye.from(fe(on(t,r)))}}function an(t,e){const n={};for(const r of e){n[r]=cn(t,r)}return n}var un=undefined&&undefined.__awaiter||function(t,e,n,r){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,s){function i(t){try{a(r.next(t))}catch(t){s(t)}}function c(t){try{a(r["throw"](t))}catch(t){s(t)}}function a(t){t.done?n(t.value):o(t.value).then(i,c)}a((r=r.apply(t,e||[])).next())}))};const ln=Lt("threads:master:messages");const fn=Lt("threads:master:spawn");const hn=Lt("threads:master:thread-utils");const dn=t=>t&&t.type==="init";const mn=t=>t&&t.type==="uncaughtError";const pn=typeof process!=="undefined"&&typeof process.env!=="undefined"&&process.env.THREADS_WORKER_INIT_TIMEOUT?Number.parseInt(process.env.THREADS_WORKER_INIT_TIMEOUT,10):1e4;function vn(t,e,n){return un(this,void 0,void 0,(function*(){let r;const o=new Promise(((t,o)=>{r=setTimeout((()=>o(Error(n))),e)}));try{return yield Promise.race([t,o])}finally{clearTimeout(r)}}))}function wn(t){return new Promise(((e,n)=>{const r=o=>{ln("Message from worker before finishing initialization:",o.data);if(dn(o.data)){t.removeEventListener("message",r);e(o.data)}else if(mn(o.data)){t.removeEventListener("message",r);n(Oe(o.data.error))}};t.addEventListener("message",r)}))}function yn(t,e){return new ae((n=>{const r=t=>{const e={type:We.message,data:t.data};n.next(e)};const o=t=>{hn("Unhandled promise rejection event in thread:",t);const e={type:We.internalError,error:Error(t.reason)};n.next(e)};t.addEventListener("message",r);t.addEventListener("unhandledrejection",o);e.then((()=>{const e={type:We.termination};t.removeEventListener("message",r);t.removeEventListener("unhandledrejection",o);n.next(e);n.complete()}))}))}function gn(t){const[e,n]=Be();const r=()=>un(this,void 0,void 0,(function*(){hn("Terminating worker");yield t.terminate();n()}));return{terminate:r,termination:e}}function bn(t,e,n,r){const o=n.filter((t=>t.type===We.internalError)).map((t=>t.error));return Object.assign(t,{[me]:o,[pe]:n,[ve]:r,[ye]:e})}function Cn(t,e){return un(this,void 0,void 0,(function*(){var e,n;fn("Initializing new thread");const r=pn;let o;try{o=yield vn(wn(t),r,`Timeout: Did not receive an init message from worker after ${r}ms. Make sure the worker calls expose().`)}catch(r){yield Promise.resolve((n=(e=t).terminate)===null||n===void 0?void 0:n.call(e)).catch((()=>undefined));throw r}const s=o.exposed;const{termination:i,terminate:c}=gn(t);const a=yn(t,i);if(s.type==="function"){const e=cn(t);return bn(e,t,a,c)}else if(s.type==="module"){const e=an(t,s.methods);return bn(e,t,a,c)}else{const t=s.type;throw Error(`Worker init message states unexpected type of expose(): ${t}`)}}))}Tt().blob;const xn=Tt().default;if(typeof global!=="undefined"){global.Worker=xn}else if(typeof window!=="undefined"){window.Worker=xn}const kn=new URL("./png-decoder.worker.js",import.meta.url);let Fn;const Mn=1;function Sn(){var t;if(typeof window!=="undefined"){const e=(t=window.navigator.hardwareConcurrency)!==null&&t!==void 0?t:8;return Math.ceil(e/4)}else{return Mn}}function jn(){if(Fn==null){const t=Sn();console.debug(`Spawning PNG worker pool [size=${t}]`);Fn=Ne((()=>Cn(new Worker(kn))),{size:t})}return Fn}const Pn=async t=>{const e=jn();return e.queue((e=>e(t)))};function In(t,n){const r=e.magnitude(t);const o=n.radius/r;return e.scale(o,t)}function Nn(t,n,r){const o=e.subtract(r,t);const s=e.dot(n,o);const i=e.magnitudeSquared(n);const c=s/i;const a=e.scale(c,n);return e.add(a,t)}class En{constructor(t,e,n,r,o,s,i,c,a,u=y.create()){this.correlationIds=t;this.temporalRefinementCorrelationId=e;this.sequenceNumber=n;this.dimensions=r;this.image=o;this.scene=s;this.depthBufferBytes=i;this.featureMapBytes=c;this.partialFrame=a;this.id=u}getId(){return this.id}async depthBuffer(){if(this.cachedDepthBuffer==null){this.cachedDepthBuffer=this.depthBufferBytes!=null?this.decodeDepthBuffer(new Uint8Array(this.depthBufferBytes)):Promise.resolve(undefined)}return this.cachedDepthBuffer}async decodeDepthBuffer(t){const e=await Pn(t);return lt.fromPng(e,this.scene.camera,this.image.imageAttr)}async featureMap(){if(this.cachedFeatureMap==null){this.cachedFeatureMap=this.featureMapBytes!=null?this.decodeFeatureMap(new Uint8Array(this.featureMapBytes)):Promise.resolve(undefined)}return this.cachedFeatureMap}async decodeFeatureMap(t){const e=await Pn(t);return xt.fromPng(e,this.image.imageAttr)}copy({correlationIds:t,temporalRefinementCorrelationId:e,sequenceNumber:n,dimensions:r,image:o,scene:s,depthBufferBytes:i,featureMapBytes:c,partialFrame:a}){return new En(t!==null&&t!==void 0?t:this.correlationIds,e!==null&&e!==void 0?e:this.temporalRefinementCorrelationId,n!==null&&n!==void 0?n:this.sequenceNumber,r!==null&&r!==void 0?r:this.dimensions,o!==null&&o!==void 0?o:this.image,s!==null&&s!==void 0?s:this.scene,i!==null&&i!==void 0?i:this.depthBufferBytes,c!==null&&c!==void 0?c:this.featureMapBytes,a!==null&&a!==void 0?a:this.partialFrame,this.id)}}class Tn{constructor(t,e){this.imageAttr=t;this.imageBytes=e}}class Dn{constructor(t,e,n,r,o,s,i,c){this.camera=t;this.boundingBox=e;this.crossSection=n;this.worldOrientation=r;this.hasChanged=o;this.sceneViewSummary=s;this.modelViewId=i;this.itemModelView=c}copy({camera:t,boundingBox:e,crossSection:n,worldOrientation:r,hasChanged:o,sceneViewSummary:s,modelViewId:i,itemModelView:c}){return new Dn(t!==null&&t!==void 0?t:this.camera,e!==null&&e!==void 0?e:this.boundingBox,n!==null&&n!==void 0?n:this.crossSection,r!==null&&r!==void 0?r:this.worldOrientation,o!==null&&o!==void 0?o:this.hasChanged,s!==null&&s!==void 0?s:this.sceneViewSummary,i!==null&&i!==void 0?i:this.modelViewId,c!==null&&c!==void 0?c:this.itemModelView)}}class An{constructor(t,e,n,r,o,s){this.position=t;this.lookAt=e;this.up=n;this.near=r;this.far=o;this.aspectRatio=s}get direction(){return e.normalize(this.viewVector)}get viewVector(){return e.subtract(this.lookAt,this.position)}get worldMatrix(){return this.computeCameraMatrices().worldMatrix}get viewMatrix(){return this.computeCameraMatrices().viewMatrix}get projectionMatrix(){return this.computeCameraMatrices().projectionMatrix}get projectionMatrixInverse(){return this.computeCameraMatrices().projectionMatrixInverse}get projectionViewMatrix(){return this.computeCameraMatrices().projectionViewMatrix}static fromBoundingBox(t,e,r){var o;const{near:s,far:i}=et(e,t);if(G(t)){const o=n.create(e);const c=In(t.viewVector,o);const a=Nn(t.lookAt,c,o.center);return new Vn(c,a,t.up,s,i,r,t.fovHeight,t.rotationPoint)}else{return new On(t.position,t.lookAt,t.up,s,i,r,(o=t.fovY)!==null&&o!==void 0?o:45)}}isOrthographic(){return false}isPerspective(){return false}isPointBehindNear(t){const{position:n,direction:r,near:o}=this;const s=e.dot(e.subtract(t,n),r);return s<o}intersectLineWithNear(t){const{position:n,direction:r,near:o}=this;const s=e.subtract(t.start,n);const a=e.subtract(t.end,n);const u=i.create({start:s,end:a});const l=c.create({normal:r,constant:-o});const f=c.intersectLine(l,u);return f!=null?e.add(f,n):undefined}computeCameraMatrices(){if(this.cameraMatrices==null){return{viewMatrix:a.makeIdentity(),worldMatrix:a.makeIdentity(),projectionMatrix:a.makeIdentity(),projectionMatrixInverse:a.makeIdentity(),projectionViewMatrix:a.makeIdentity()}}return this.cameraMatrices}updateCameraMatrices(t){this.cameraMatrices=t;return this.cameraMatrices}}class On extends An{constructor(t,e,n,r,o,s,i){super(t,e,n,r,o,s);this.position=t;this.lookAt=e;this.up=n;this.near=r;this.far=o;this.aspectRatio=s;this.fovY=i}toOrthographic(t){return An.fromBoundingBox(Q(this,t),t,this.aspectRatio)}isPerspective(){return true}computeCameraMatrices(){if(this.cameraMatrices==null){const t=a.makeLookAtView(this.position,this.lookAt,this.up);const e=a.invert(t);const n=a.makePerspective(this.near,this.far,this.fovY,this.aspectRatio);const r=a.invert(n);const o=a.multiply(t,n);return super.updateCameraMatrices({viewMatrix:t,worldMatrix:e,projectionMatrix:n,projectionMatrixInverse:r,projectionViewMatrix:o})}return this.cameraMatrices}}class Vn extends An{constructor(t,n,r,o,s,i,c,a){super(e.add(n,e.negate(t)),n,r,o,s,i);this.lookAt=n;this.up=r;this.near=o;this.far=s;this.aspectRatio=i;this.fovHeight=c;this.rotationPoint=a;this.top=c*.5;this.bottom=-this.top;this.right=this.top*i;this.left=-this.right}toPerspective(t){return An.fromBoundingBox(K(this),t,this.aspectRatio)}isOrthographic(){return true}computeCameraMatrices(){if(this.cameraMatrices==null){const t=a.makeLookAtView(this.position,this.lookAt,this.up);const e=a.invert(t);const n=a.makeOrthographic(this.left,this.right,this.bottom,this.top,this.near,this.far);const r=a.invert(n);const o=a.multiply(t,n);return super.updateCameraMatrices({viewMatrix:t,worldMatrix:e,projectionMatrix:n,projectionMatrixInverse:r,projectionViewMatrix:o})}return this.cameraMatrices}}class zn{constructor(t,e){this.y=t;this.z=e}get matrix(){const t=this.z;const n=this.y;const r=e.cross(n,t);return a.makeBasis(r,n,t)}}zn.DEFAULT=new zn(e.up(),e.back());class Bn{constructor(t,e){this.position=t;this.up=e}transformMatrix(t){const n=e.multiplyByTransformMatrixColumnMajor(this.position,t);const r=e.multiplyByTransformMatrixColumnMajor(this.up,t);return new Bn(n,r)}}Bn.FRONT=new Bn(e.back(),e.up());Bn.RIGHT=new Bn(e.right(),e.up());Bn.LEFT=new Bn(e.left(),e.up());Bn.BACK=new Bn(e.forward(),e.up());Bn.TOP=new Bn(e.up(),e.forward());Bn.BOTTOM=new Bn(e.down(),e.back());Bn.TOP_FRONT_RIGHT=new Bn(e.add(e.back(),e.up(),e.left()),e.up());Bn.TOP_FRONT_LEFT=new Bn(e.add(e.back(),e.up(),e.right()),e.up());Bn.BOTTOM_FRONT_RIGHT=new Bn(e.add(e.back(),e.down(),e.left()),e.up());Bn.BOTTOM_FRONT_LEFT=new Bn(e.add(e.back(),e.down(),e.right()),e.up());Bn.TOP_BACK_LEFT=new Bn(e.add(e.forward(),e.up(),e.right()),e.up());Bn.TOP_BACK_RIGHT=new Bn(e.add(e.forward(),e.up(),e.left()),e.up());Bn.BOTTOM_BACK_LEFT=new Bn(e.add(e.forward(),e.down(),e.right()),e.up());Bn.BOTTOM_BACK_RIGHT=new Bn(e.add(e.forward(),e.down(),e.left()),e.up());Bn.TOP_FRONT=new Bn(e.add(e.back(),e.up()),e.up());Bn.BOTTOM_FRONT=new Bn(e.add(e.back(),e.down()),e.up());Bn.FRONT_RIGHT=new Bn(e.add(e.back(),e.left()),e.up());Bn.FRONT_LEFT=new Bn(e.add(e.back(),e.right()),e.up());Bn.TOP_BACK=new Bn(e.add(e.forward(),e.up()),e.up());Bn.BOTTOM_BACK=new Bn(e.add(e.forward(),e.down()),e.up());Bn.BACK_LEFT=new Bn(e.add(e.forward(),e.right()),e.up());Bn.BACK_RIGHT=new Bn(e.add(e.forward(),e.left()),e.up());Bn.TOP_LEFT=new Bn(e.add(e.up(),e.right()),e.up());Bn.TOP_RIGHT=new Bn(e.add(e.up(),e.left()),e.up());Bn.BOTTOM_LEFT=new Bn(e.add(e.down(),e.right()),e.up());Bn.BOTTOM_RIGHT=new Bn(e.add(e.down(),e.left()),e.up());const Wn=v.defineMapper(v.read(v.requiredProp("x"),v.requiredProp("y")),(([t,e])=>r.create(t,e)));const Rn=v.defineMapper(v.read(v.requiredProp("width"),v.requiredProp("height")),(([t,e])=>u.create(t,e)));const $n=v.defineMapper(v.read(v.requiredProp("x"),v.requiredProp("y"),v.requiredProp("width"),v.requiredProp("height")),(([t,e,n,r])=>s.create(t,e,n,r)));const qn=v.defineMapper(v.read(v.requiredProp("x"),v.requiredProp("y"),v.requiredProp("z")),(([t,n,r])=>e.create(t,n,r)));const Ln=v.defineMapper(v.read(v.requiredProp("xmin"),v.requiredProp("ymin"),v.requiredProp("zmin"),v.requiredProp("xmax"),v.requiredProp("ymax"),v.requiredProp("zmax")),(([t,n,r,o,s,i])=>l.create(e.create(t,n,r),e.create(o,s,i))));const _n=v.defineMapper(v.read(v.requiredProp("d"),v.mapRequiredProp("normal",qn)),(([t,e])=>c.create({normal:e,constant:t})));const Un=v.defineMapper(v.read(v.requiredProp("x"),v.requiredProp("y"),v.requiredProp("z"),v.requiredProp("w")),(([t,e,n,r])=>f.create({x:t,y:e,z:n,w:r})));const Hn=v.defineMapper(v.read(v.mapRequiredProp("r0",Un),v.mapRequiredProp("r1",Un),v.mapRequiredProp("r2",Un),v.mapRequiredProp("r3",Un)),(([t,e,n,r])=>a.transpose(a.fromValues(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,n.x,n.y,n.z,n.w,r.x,r.y,r.z,r.w))));const Gn=v.defineMapper(v.read(v.requiredProp("r"),v.requiredProp("g"),v.requiredProp("b")),(([t,e,n])=>w.create(t,e,n)));const Yn=v.defineMapper((t=>{function e(t){return{r:t.r,g:t.g,b:t.b}}if(typeof t==="string"){const n=w.fromHexString(t);return n!=null?e(n):{errors:["String is not a valid color."]}}else if(typeof t==="number"){return e(w.fromNumber(t))}else{return e(t)}}),(t=>t));tr();const Jn=tr();const Zn=tr();const Qn=er();const Kn=er();const Xn=er();function tr(){return v.defineMapper((t=>t!=null?{value:t}:undefined),(t=>t))}function er(){return v.defineMapper((t=>(t===null||t===void 0?void 0:t.value)||undefined),(t=>t))}const nr=v.defineMapper(v.read(v.mapProp("position",v.compose(v.required("position"),qn)),v.mapProp("lookAt",v.compose(v.required("lookAt"),qn)),v.mapProp("up",v.compose(v.required("up"),qn)),v.getProp("fovY")),(([t,e,n,r])=>({position:t,lookAt:e,up:n,fovY:(r===null||r===void 0?void 0:r.value)!=null?r.value:45})));const rr=v.defineMapper(v.read(v.mapProp("viewVector",v.compose(v.required("viewVector"),qn)),v.mapProp("lookAt",v.compose(v.required("lookAt"),qn)),v.mapProp("up",v.compose(v.required("up"),qn)),v.mapProp("fovHeight",v.required("fovHeight"))),(([t,e,n,r])=>({viewVector:t,lookAt:e,up:n,fovHeight:r})));const or=v.defineMapper(v.read(v.mapProp("position",v.ifDefined(qn)),v.mapProp("lookAt",v.ifDefined(qn)),v.mapProp("up",v.ifDefined(qn)),v.mapProp("perspective",v.ifDefined(nr)),v.mapProp("orthographic",v.ifDefined(rr))),(([t,n,r,o,s])=>{var i;return(i=o!==null&&o!==void 0?o:s)!==null&&i!==void 0?i:{position:t!==null&&t!==void 0?t:e.back(),lookAt:n!==null&&n!==void 0?n:e.origin(),up:r!==null&&r!==void 0?r:e.up(),fovY:45}}));const sr=v.defineMapper(v.read(v.mapProp("normal",v.compose(v.required("normal"),qn)),v.requiredProp("offset")),(([t,e])=>({normal:t,offset:e})));const ir=v.defineMapper(v.read(v.mapProp("frameDimensions",v.compose(v.required("frameDimensions"),Rn)),v.mapProp("imageRect",v.compose(v.required("imageRect"),$n)),v.mapProp("scaleFactor",v.required("scaleFactor"))),(([t,e,n])=>({frameDimensions:t,imageRect:e,imageScale:n})));const cr=v.defineMapper(v.read(v.mapProp("sectionPlanes",v.compose(v.required("sectionPlanes"),v.mapArray(sr))),v.mapProp("highlightColor",v.ifDefined(Gn))),(([t,e])=>ot({sectionPlanes:t,highlightColor:e||undefined})));const ar=v.defineMapper(v.read(v.requiredProp("count"),v.mapProp("boundingBox",v.ifDefined(Ln))),(([t,e])=>({count:t,boundingBox:e!==null&&e!==void 0?e:undefined})));const ur=v.defineMapper(v.read(v.mapProp("visibleSummary",v.ifDefined(ar)),v.mapProp("selectedVisibleSummary",v.ifDefined(ar))),(([t,e])=>ct({visibleSummary:t!==null&&t!==void 0?t:undefined,selectedVisibleSummary:e!==null&&e!==void 0?e:undefined})));const lr=v.defineMapper(v.read(v.mapProp("modelViewId",v.ifDefined(j)),v.mapProp("sceneItemId",v.ifDefined(j))),(([t,e])=>it({modelViewId:t!==null&&t!==void 0?t:undefined,sceneItemId:e!==null&&e!==void 0?e:undefined})));const fr=v.defineMapper(v.read(v.mapProp("imageAttributes",v.compose(v.required("imageAttributes"),ir))),(([t])=>t));const hr=v.defineMapper(v.read(fr,v.mapProp("image",v.required("image"))),(([t,e])=>new Tn(t,e)));const dr=v.defineMapper(v.read(v.mapRequiredProp("camera",or),v.mapRequiredProp("visibleBoundingBox",Ln),v.mapRequiredProp("crossSectioning",cr),v.requiredProp("hasChanged"),v.mapRequiredProp("displayListSummary",ur),v.mapProp("modelViewId",v.ifDefined(P)),v.mapProp("itemModelView",v.ifDefined(lr))),(([t,e,n,r,o,s,i])=>({camera:t,boundingBox:e,crossSectioning:n,hasChanged:r,displayListSummary:o,modelViewId:s!==null&&s!==void 0?s:undefined,itemModelView:i!==null&&i!==void 0?i:undefined})));const mr=v.defineMapper(v.read(v.mapProp("sceneAttributes",v.compose(v.required("sceneAttributes"),dr))),(([t])=>t));const pr=v.defineMapper(v.read(mr,fr),(([t,e])=>An.fromBoundingBox(t.camera,t.boundingBox,u.aspectRatio(e.frameDimensions))));function vr(t){return v.defineMapper(v.read(mr,pr),(([e,n])=>new Dn(n,e.boundingBox,e.crossSectioning,t,e.hasChanged,e.displayListSummary,e.modelViewId,e.itemModelView)))}function wr(t){return v.defineMapper(v.read(v.mapProp("frameCorrelationIds",(t=>t!=null?t:[])),v.requiredProp("sequenceNumber"),v.compose(fr,v.getProp("frameDimensions")),vr(t),hr,v.mapProp("depthBuffer",Kn),v.mapProp("featureMap",Kn),v.mapProp("temporalRefinementCorrelationId",(t=>t!=null?j(t):null)),v.mapProp("partialFrame",v.ifDefined(Qn))),(([t,e,n,r,o,s,i,c,a])=>new En(t,c||"",e,n,o,r,s,i,a!==null&&a!==void 0?a:false)))}function yr(t){return v.ifInvalidThrow(wr(t))}const gr=v.defineMapper(v.compose(v.required("orientation"),v.read(v.mapProp("up",v.compose(v.required("up"),qn)),v.mapProp("front",v.compose(v.required("front"),qn)))),(([t,e])=>new zn(t,e)));v.ifInvalidThrow(gr);const br=v.defineMapper(v.read(v.mapRequiredProp("imageAttributes",ir),v.requiredProp("stencilBuffer"),v.mapRequiredProp("depthBuffer",v.compose(Kn,v.required("depthBuffer")))),(([t,e,n])=>({imageAttributes:t,stencilBuffer:e,depthBuffer:n})));const Cr=kr("stencilBuffer",br);const xr=v.ifInvalidThrow(Cr);function kr(t,e){return v.mapRequiredProp(t,e)}const Fr=v.defineMapper(v.read(v.requiredProp("token"),v.requiredProp("expiresIn")),(([t,e])=>q.create(t,e)));const Mr=v.defineMapper(v.read(v.compose(v.requiredProp("startStream"),v.mapRequiredProp("streamId",j)),v.compose(v.requiredProp("startStream"),v.mapRequiredProp("sceneId",j)),v.compose(v.requiredProp("startStream"),v.mapRequiredProp("sceneViewId",j)),v.compose(v.requiredProp("startStream"),v.mapRequiredProp("sessionId",j)),v.compose(v.requiredProp("startStream"),v.mapRequiredProp("worldOrientation",gr)),v.compose(v.requiredProp("startStream"),v.mapRequiredProp("token",Fr))),(([t,e,n,r,o,s])=>({streamId:t,sceneId:e,sceneViewId:n,sessionId:r,worldOrientation:o,token:s})));const Sr=v.ifInvalidThrow(Mr);const jr=v.defineMapper(v.read(v.compose(v.requiredProp("reconnect"),v.mapRequiredProp("token",Fr))),(([t])=>({token:t})));const Pr=v.ifInvalidThrow(jr);const Ir=v.defineMapper(v.compose(v.requiredProp("refreshToken"),v.requiredProp("token"),Fr),(t=>t));const Nr=v.ifInvalidThrow(Ir);const Er=v.defineMapper(v.compose(v.requiredProp("syncTime"),v.requiredProp("replyTime"),v.read(v.requiredProp("seconds"),v.requiredProp("nanos"))),(([t,e])=>m({seconds:t,nanos:e})));const Tr=v.ifInvalidThrow(Er);const Dr=v.defineMapper(v.ifDefined(v.getProp("next")),(t=>t!=null?t:undefined));const Ar=v.defineMapper((t=>{switch(t){case"all":return{enabled:{value:true},frameType:d.protobuf.stream.FrameType.FRAME_TYPE_ALL};case"final":return{enabled:{value:true},frameType:d.protobuf.stream.FrameType.FRAME_TYPE_FINAL};default:return{enabled:{value:false},frameType:d.protobuf.stream.FrameType.FRAME_TYPE_INVALID}}}),(t=>t));const Or=v.defineMapper(v.read(v.ifDefined(v.getProp("opacity"))),(([t])=>({opacity:{value:h(t!==null&&t!==void 0?t:0,0,1)}})));const Vr=v.defineMapper(v.read(v.ifDefined(v.getProp("width")),v.ifDefined(v.mapProp("color",v.ifDefined(Yn)))),(([t,e])=>({lineWidth:t,lineColor:e})));const zr=v.defineMapper(v.read(v.ifDefined(v.mapProp("color",v.ifDefined(Yn))),v.ifDefined(v.mapProp("opacity",Jn)),v.ifDefined(v.getProp("lineWidth"))),(([t,e,n])=>{if(t||e||n){return{color:t,opacity:e,lineWidth:n}}else return undefined}));const Br=v.defineMapper(v.read(v.ifDefined(v.mapProp("highlightColor",v.ifDefined(Yn))),v.ifDefined(v.mapProp("occludedOpacity",Jn)),v.ifDefined(v.mapProp("outline",v.ifDefined(Vr)))),(([t,e,n])=>({highlightColor:t,occludedOpacity:e,outline:n})));const Wr=v.defineMapper((t=>!!t),(t=>t));const Rr=v.defineMapper((t=>t!==null&&t!==void 0?t:""),(t=>t));const $r=v.defineMapper(v.read(v.ifDefined(v.mapProp("frameBackgroundColor",v.ifDefined(Yn)))),(([t])=>({frameBackgroundColor:t})));const qr=v.defineMapper(v.read(v.ifDefined(v.mapProp("streamKeyToCompare",v.ifDefined(Zn)))),(([t])=>({streamKeyToCompare:t})));const Lr=v.defineMapper(v.read(v.ifDefined(v.mapProp("endCapEnabled",(t=>!!t))),v.ifDefined(v.mapProp("endCapColor",v.ifDefined(Yn)))),(([t,e])=>({endCapEnabled:t,endCapColor:e})));const _r=v.defineMapper(v.read(v.mapProp("depthBuffers",Ar),v.mapProp("phantom",Or),v.mapProp("noDefaultLights",Wr),v.mapProp("featureLines",Vr),v.mapProp("featureHighlighting",Br),v.mapProp("featureMaps",Ar),v.mapProp("experimentalRenderingOptions",Rr),v.mapProp("selectionHighlighting",zr),v.mapProp("frames",$r),v.mapProp("sceneComparison",qr),v.mapProp("crossSectioning",Lr)),(([t,e,n,r,o,s,i,c,a,u,l])=>{const f={depthBuffers:t,phantomItems:e,noDefaultLights:n,featureLines:r,featureHighlighting:o,featureMaps:s,experimentalRenderingOptions:i,selectionHighlighting:c,frames:a,sceneComparison:u,crossSectioningAttributes:l};return f}));export{bt as A,Yn as B,C,yt as D,Jn as E,An as F,yr as G,Sr as H,Pr as I,Tr as J,Nr as K,at as L,x as M,Q as N,zn as O,K as P,L as Q,Y as R,Bn as S,et as T,In as U,or as V,I as W,_n as X,En as a,Tn as b,st as c,Dn as d,Vn as e,tt as f,On as g,Ct as h,xr as i,Pn as j,lt as k,F as l,M as m,Xn as n,qn as o,k as p,Wn as q,Gn as r,Dr as s,X as t,Nn as u,S as v,Hn as w,Qn as x,Ln as y,_r as z};
5
- //# sourceMappingURL=p-Cr2EnhS-.js.map
4
+ import{a as t,v as e,f as n,p as r,r as o,g as s,l as i,b as c,m as a,e as u,c as l,i as f,j as h}from"./p-2UsvOTHJ.js";import{v as d,p as m,L as p}from"./p-5kcpg4MZ.js";import{m as v,c as w,b as y}from"./p-CDM7zNn0.js";import{E as g}from"./p-BAhfr1Nx.js";import{g as b}from"./p-CG9AChtV.js";const C=v.defineMapper((t=>{switch(t){case"perspective":return d.protobuf.stream.CameraType.CAMERA_TYPE_PERSPECTIVE;case"orthographic":return d.protobuf.stream.CameraType.CAMERA_TYPE_ORTHOGRAPHIC;default:return d.protobuf.stream.CameraType.CAMERA_TYPE_INVALID}}),(t=>t));function x(){return v.ifInvalidThrow(C)}const k=v.defineMapper(v.read(v.requiredProp("r"),v.requiredProp("g"),v.requiredProp("b"),v.requiredProp("a")),(([t,e,n,r])=>w.create(t,e,n,r)));const F=v.defineMapper(v.read(v.requiredProp("msb"),v.requiredProp("lsb")),(([t,e])=>y.fromMsbLsb(t,e)));const M=v.defineMapper(v.read(v.requiredProp("seconds"),v.requiredProp("nanos")),(([t,e])=>m({seconds:t,nanos:e})));const S=v.defineMapper(v.read(v.requiredProp("iso")),(([t])=>new Date(t)));const j=v.defineMapper(v.read(v.requiredProp("hex")),(([t])=>t));const P=v.defineMapper(v.read(v.requiredProp("msb"),v.requiredProp("lsb")),(([t,e])=>{const n=BigInt(typeof t==="number"?t:t.toString());const r=BigInt(typeof e==="number"?e:e.toString());return y.fromMsbLsb(n,r)}));const I=v.defineMapper(v.compose((t=>y.toMsbLsb(t)),v.read(v.mapProp("msb",p.fromString),v.mapProp("lsb",p.fromString))),(([t,e])=>({msb:t,lsb:e})));function N(t){"@babel/helpers - typeof";return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(t)}function E(t){if(t===null||t===true||t===false){return NaN}var e=Number(t);if(isNaN(e)){return e}return e<0?Math.ceil(e):Math.floor(e)}function T(t,e){if(e.length<t){throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}}function D(t){T(1,arguments);var e=Object.prototype.toString.call(t);if(t instanceof Date||N(t)==="object"&&e==="[object Date]"){return new Date(t.getTime())}else if(typeof t==="number"||e==="[object Number]"){return new Date(t)}else{if((typeof t==="string"||e==="[object String]")&&typeof console!=="undefined"){console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");console.warn((new Error).stack)}return new Date(NaN)}}function O(t,e){T(2,arguments);var n=D(t);var r=E(e);if(isNaN(r)){return new Date(NaN)}if(!r){return n}n.setDate(n.getDate()+r);return n}function A(t,e){T(2,arguments);var n=D(t);var r=E(e);if(isNaN(r)){return new Date(NaN)}if(!r){return n}var o=n.getDate();var s=new Date(n.getTime());s.setMonth(n.getMonth()+r+1,0);var i=s.getDate();if(o>=i){return s}else{n.setFullYear(s.getFullYear(),s.getMonth(),o);return n}}function V(t,e){T(2,arguments);if(!e||N(e)!=="object")return new Date(NaN);var n=e.years?E(e.years):0;var r=e.months?E(e.months):0;var o=e.weeks?E(e.weeks):0;var s=e.days?E(e.days):0;var i=e.hours?E(e.hours):0;var c=e.minutes?E(e.minutes):0;var a=e.seconds?E(e.seconds):0;var u=D(t);var l=r||n?A(u,r+n*12):u;var f=s||o?O(l,s+o*7):l;var h=c+i*60;var d=a+h*60;var m=d*1e3;var p=new Date(f.getTime()+m);return p}function z(t,e){T(2,arguments);return D(t).getTime()-D(e).getTime()}function B(t,e){T(2,arguments);var n=D(t);var r=D(e);return n.getTime()>r.getTime()}function W(t,e){T(2,arguments);var n=E(e);return O(t,-n)}function R(t,e){T(2,arguments);var n=E(e);return A(t,-n)}function $(t,e){T(2,arguments);if(!e||N(e)!=="object")return new Date(NaN);var n=e.years?E(e.years):0;var r=e.months?E(e.months):0;var o=e.weeks?E(e.weeks):0;var s=e.days?E(e.days):0;var i=e.hours?E(e.hours):0;var c=e.minutes?E(e.minutes):0;var a=e.seconds?E(e.seconds):0;var u=R(t,r+n*12);var l=W(u,s+o*7);var f=c+i*60;var h=a+f*60;var d=h*1e3;var m=new Date(l.getTime()-d);return m}class q{constructor(t,e,n){this.token=t;this.expiresIn=e;this.expiresAt=n}static create(t,e){const n=V(new Date,{seconds:e});return new q(t,e,n)}hasExpired(){return B(new Date,this.expiresAt)}remainingTimeInMs(t){return z($(this.expiresAt,{seconds:t}),new Date)}}function U(t){if(H(t)){const n=_(t.lookAt);const r=_(t.position);const o=L(t.up);const s=n&&r&&L(e.subtract(t.lookAt,t.position));const i=t.fovY!=null&&Number.isFinite(t.fovY)&&t.fovY>=1&&t.fovY<=179;return o&&s&&i}else{const e=t;const n=L(e.viewVector);const r=_(e.lookAt);const o=L(e.up);const s=Number.isFinite(e.fovHeight)&&e.fovHeight>0;return n&&r&&o&&s}}function _(t){return t!=null&&e.isValid(t)}function L(t){return _(t)&&!e.isZeroVector(t)}function H(t){return t.position!=null&&t.fovHeight==null}function G(t){const e=t;return e.viewVector!=null&&e.fovHeight!=null}function Y(t){if(G(t)){return{...t,position:e.add(t.lookAt,e.negate(t.viewVector))}}else{return{...t,viewVector:e.subtract(t.lookAt,t.position)}}}function J(t={}){var n,r,o,s;return{position:(n=t.position)!==null&&n!==void 0?n:e.forward(),lookAt:(r=t.lookAt)!==null&&r!==void 0?r:e.origin(),up:(o=t.up)!==null&&o!==void 0?o:e.up(),fovY:(s=t.fovY)!==null&&s!==void 0?s:45}}function Q(t={}){var n,r,o,s,i,c;return{viewVector:(n=t.viewVector)!==null&&n!==void 0?n:e.back(),lookAt:(r=t.lookAt)!==null&&r!==void 0?r:e.origin(),up:(o=t.up)!==null&&o!==void 0?o:e.up(),fovHeight:(s=t.fovHeight)!==null&&s!==void 0?s:1,rotationPoint:(c=(i=t.rotationPoint)!==null&&i!==void 0?i:t.lookAt)!==null&&c!==void 0?c:e.origin()}}function Z(r,o){var s;const i=e.subtract(r.lookAt,r.position);const c=n.create(o);const a=c.radius/e.magnitude(i);return{viewVector:e.scale(a,i),up:r.up,lookAt:r.lookAt,fovHeight:2*e.magnitude(i)*Math.tan(t.toRadians(((s=r.fovY)!==null&&s!==void 0?s:45)/2))}}function K(n,r=45){const o=n.fovHeight/(2*Math.tan(t.toRadians(r/2)));const s=e.magnitude(n.viewVector);const i=o/s;return{position:e.add(n.lookAt,e.negate(e.scale(i,n.viewVector))),up:n.up,lookAt:n.lookAt,fovY:r}}function X(t){if(G(t)){return{orthographic:{viewVector:{...t.viewVector},lookAt:{...t.lookAt},up:{...t.up},fovHeight:t.fovHeight}}}else if(H(t)){return{perspective:{position:{...t.position},lookAt:{...t.lookAt},up:{...t.up},fovY:t.fovY?{value:t.fovY}:null},position:{...t.position},lookAt:{...t.lookAt},up:{...t.up}}}else{return{...t}}}var tt=Object.freeze({__proto__:null,createOrthographic:Q,createPerspective:J,isOrthographicFrameCamera:G,isPerspectiveFrameCamera:H,isValidFrameCamera:U,toOrthographic:Z,toPerspective:K,toProtobuf:X,withPositionAndViewVector:Y});function et(t,e){return G(e)?rt(t):nt(t,e)}function nt(t,r){const o=n.create(t);const s=o.epsilon*100;const i=e.dot(e.subtract(o.center,r.position),e.normalize(e.subtract(r.lookAt,r.position)));const c=Math.max(o.radius,s);let a=c+i<s?c*3:c+i;let u=a-c*2<s?Math.min(s,a):a-c*2;if(a-u<s){u=Math.max(u,s);a+=u+s}else if(u/a<1e-4){u=a*1e-4}if(u>a-c*2){if(u>1e3+s){a-=u-1e3;u=1e3}}return{near:u,far:a}}function rt(t,e){const r=n.create(t);const o=r.epsilon*100;const s=Math.max(r.radius,o);return{near:-s,far:s}}function ot(t={}){return{sectionPlanes:t.sectionPlanes||[],highlightColor:t.highlightColor,lineWidth:t.lineWidth}}var st=Object.freeze({__proto__:null,create:ot});function it(t={}){return{modelViewId:t.modelViewId,sceneItemId:t.sceneItemId}}function ct(t={}){return{visibleSummary:t.visibleSummary,selectedVisibleSummary:t.selectedVisibleSummary}}function at(t,e){return ut(t.scene.sceneViewSummary)?t.copy({scene:t.scene.copy({sceneViewSummary:e===null||e===void 0?void 0:e.scene.sceneViewSummary})}):t}function ut(t){return t.visibleSummary==null}class lt{constructor(t,e,n){this.camera=t;this.imageAttr=e;this.pixels=n}static fromPng(t,e,n){if(t.data instanceof Uint16Array){return new lt(e,n,t.data)}else{throw new Error("Expected depth PNG to have depth of 16-bit")}}getDepthAtPoint(t,e){const{near:n,far:r}=this.camera;const o=this.camera.isPerspective();const s=this.getNormalizedDepthAtPoint(t,e);if(o){return s*(r-n)+n}else{return s*(r-n)}}getMaxDepthOfGeometry(){const{near:t,far:e}=this.camera;const n=this.camera.isPerspective();if(n){return e}else{return e-t}}getNormalizedDepthAtPoint(t,e){const{width:n,height:o}=this.imageAttr.imageRect;const s=r.subtract(t,this.imageAttr.imageRect);const i=1/this.imageAttr.imageScale;const c=r.scale(s,i,i);if(c.x>=0&&c.y>=0&&c.x<n&&c.y<o){const t=Math.floor(c.x)+Math.floor(c.y)*n;const r=this.pixels[t];const o=r===lt.MAX_DEPTH_VALUE?e!==null&&e!==void 0?e:r:r;return(o!==null&&o!==void 0?o:lt.MAX_DEPTH_VALUE)/lt.MAX_DEPTH_VALUE}else{return e!==null&&e!==void 0?e:1}}hitTest(t){return this.getNormalizedDepthAtPoint(t)<1}getWorldPoint(t,n,r){const s=this.getDepthAtPoint(t,r);const i=this.camera.isPerspective();if(i){const{position:t,viewVector:r,far:i}=this.camera;const c=o.at(n,i);const a=e.subtract(c,t);const u=e.dot(r,a)/(e.magnitude(r)*e.magnitude(a));return o.at(n,s/u)}else{return o.at(n,s)}}distanceToPoint(t){const{position:n,direction:r}=this.camera;const o=e.subtract(t,n);return Math.abs(e.dot(o,r))}depthOfClosestGeometry(t,e){const{projectionViewMatrix:n}=this.camera;const r=e.transformWorldToViewport(t,n);const o=e.transformPointToFrame(r,this);return this.getDepthAtPoint(o)}isOccluded(t,e){const n=this.distanceToPoint(t);const r=this.depthOfClosestGeometry(t,e);const o=Math.abs(.02*n);const s=Math.abs(r-n);return n>r&&s>o}isDetached(t,e){const n=this.distanceToPoint(t);const r=this.depthOfClosestGeometry(t,e);const o=r-n;const s=.02*n;const i=o<s;const c=this.getMaxDepthOfGeometry();const a=n>c;const u=!i||a;return u}}lt.MAX_DEPTH_VALUE=2**16-1;class ft{constructor(t){this.scale=t}convertTo(t){return t*this.scale}convertFrom(t){return t/this.scale}}class ht extends ft{constructor(){super(1)}}class dt extends ft{constructor(t=1){super(1/Math.pow(10,t))}}class mt extends ft{constructor(t=1){super(1/Math.pow(1e3,t))}}class pt extends ft{constructor(t=1){super(1/Math.pow(25.4,t))}}class vt extends ft{constructor(t=1){super(1/Math.pow(25.4*12,t))}}class wt extends ft{constructor(t=1){super(1/Math.pow(25.4*12*3,t))}}class yt{constructor(t){this.unitType=t;this.unit=yt.units[t]}convertWorldValueToReal(t){return this.unit.converter.convertTo(t)}convertRealValueToWorld(t){return this.unit.converter.convertFrom(t)}convertWorldPointToReal(t){const e=this.unit.converter.convertTo(t.x);const n=this.unit.converter.convertTo(t.y);const r=this.unit.converter.convertTo(t.z);return{x:e,y:n,z:r}}convertRealPointToWorld(t){const e=this.unit.converter.convertFrom(t.x);const n=this.unit.converter.convertFrom(t.y);const r=this.unit.converter.convertFrom(t.z);return{x:e,y:n,z:r}}}yt.units={millimeters:{name:"Millimeters",abbreviatedName:"mm",converter:new ht},centimeters:{name:"Centimeters",abbreviatedName:"cm",converter:new dt},meters:{name:"Meters",abbreviatedName:"m",converter:new mt},inches:{name:"Inches",abbreviatedName:"in",converter:new pt},feet:{name:"Feet",abbreviatedName:"ft",converter:new vt},yards:{name:"Yards",abbreviatedName:"yd",converter:new wt}};class gt{convertTo(e){return t.toDegrees(e)}convertFrom(e){return t.toRadians(e)}}class bt{constructor(t){this.unitType=t;this.unit=bt.units[t]}convertTo(t){return this.unit.converter.convertTo(t)}convertFrom(t){return this.unit.converter.convertFrom(t)}}bt.units={radians:{name:"Radians",abbreviatedName:"rad",converter:new ft(1)},degrees:{name:"Degrees",abbreviatedName:"deg",converter:new gt}};class Ct{constructor(t){this.unitType=t;this.unit=Ct.units[t]}convertWorldValueToReal(t){return this.unit.converter.convertTo(t)}convertRealValueToWorld(t){return this.unit.converter.convertFrom(t)}}Ct.units={millimeters:{name:"Square Millimeters",abbreviatedName:"mm²",converter:new ht},centimeters:{name:"Square Centimeters",abbreviatedName:"cm²",converter:new dt(2)},meters:{name:"Square Meters",abbreviatedName:"m²",converter:new mt(2)},inches:{name:"Square Inches",abbreviatedName:"in²",converter:new pt(2)},feet:{name:"Square Feet",abbreviatedName:"ft²",converter:new vt(2)},yards:{name:"Square Yards",abbreviatedName:"yd²",converter:new wt(2)}};class xt{constructor(t,e){this.pixels=t;this.imageAttr=e}static fromPng(t,e){if(!(t.data instanceof Uint8Array)){throw new Error("Cannot create FeatureMap. Expected decoded PNG to be a Uint8Array.")}else if(t.channels!==4){throw new Error("Cannot create FeatureMap. Missing alpha channel.")}else{return new xt(t.data,{...e,imageRect:s.fromPointAndDimensions(e.imageRect,t)})}}getEntityType(t){const e=this.getColor(t);if((e===null||e===void 0?void 0:e.a)===g.CROSS_SECTION){return g.CROSS_SECTION}else if((e===null||e===void 0?void 0:e.a)===g.GENERIC_GEOMETRY){return g.GENERIC_GEOMETRY}else if((e===null||e===void 0?void 0:e.a)===g.IMPRECISE_EDGE){return g.IMPRECISE_EDGE}else if((e===null||e===void 0?void 0:e.a)===g.IMPRECISE_SURFACE){return g.IMPRECISE_SURFACE}else if((e===null||e===void 0?void 0:e.a)===g.PRECISE_EDGE){return g.PRECISE_EDGE}else if((e===null||e===void 0?void 0:e.a)===g.PRECISE_SURFACE){return g.PRECISE_SURFACE}else{return g.NO_GEOMETRY}}getColor(t){const{width:e,height:n}=this.imageAttr.imageRect;const o=r.subtract(t,this.imageAttr.imageRect);const s=1/this.imageAttr.imageScale;const i=r.scale(o,s,s);if(i.x>=0&&i.y>=0&&i.x<e&&i.y<n){const t=Math.floor(i.x)*4+Math.floor(i.y)*4*e;const n=this.pixels[t];const r=this.pixels[t+1];const o=this.pixels[t+2];const s=this.pixels[t+3];return w.create(n,r,o,s)}else return undefined}}let kt;function Ft(){if(!kt){kt=Mt()}return kt}function Mt(){try{throw new Error}catch(t){const e=(""+t.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);if(e){return St(e[0])}}return"/"}function St(t){return(""+t).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)?\/[^/]+(?:\?.*)?$/,"$1")+"/"}const jt=typeof navigator!=="undefined"&&navigator.hardwareConcurrency?navigator.hardwareConcurrency:4;const Pt=t=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(t);function It(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function Nt(){if(typeof Worker==="undefined"){return class t{constructor(){throw Error("No web worker implementation available. You might have tried to spawn a worker within a worker in a browser that doesn't support workers in workers.")}}}class t extends Worker{constructor(t,e){var n,r;if(typeof t==="string"&&e&&e._baseURL){t=new URL(t,e._baseURL)}else if(typeof t==="string"&&!Pt(t)&&Ft().match(/^file:\/\//i)){t=new URL(t,Ft().replace(/\/[^/]+$/,"/"));if((n=e===null||e===void 0?void 0:e.CORSWorkaround)!==null&&n!==void 0?n:true){t=It(`importScripts(${JSON.stringify(t)});`)}}if(typeof t==="string"&&Pt(t)){if((r=e===null||e===void 0?void 0:e.CORSWorkaround)!==null&&r!==void 0?r:true){t=It(`importScripts(${JSON.stringify(t)});`)}}super(t,e)}}class e extends t{constructor(t,e){const n=window.URL.createObjectURL(t);super(n,e)}static fromText(t,n){const r=new window.Blob([t],{type:"text/javascript"});return new e(r,n)}}return{blob:e,default:t}}let Et;function Tt(){if(!Et){Et=Nt()}return Et}var Dt={exports:{}};var Ot;var At;function Vt(){if(At)return Ot;At=1;var t=1e3;var e=t*60;var n=e*60;var r=n*24;var o=r*7;var s=r*365.25;Ot=function(t,e){e=e||{};var n=typeof t;if(n==="string"&&t.length>0){return i(t)}else if(n==="number"&&isFinite(t)){return e.long?a(t):c(t)}throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function i(i){i=String(i);if(i.length>100){return}var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(i);if(!c){return}var a=parseFloat(c[1]);var u=(c[2]||"ms").toLowerCase();switch(u){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"weeks":case"week":case"w":return a*o;case"days":case"day":case"d":return a*r;case"hours":case"hour":case"hrs":case"hr":case"h":return a*n;case"minutes":case"minute":case"mins":case"min":case"m":return a*e;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return undefined}}function c(o){var s=Math.abs(o);if(s>=r){return Math.round(o/r)+"d"}if(s>=n){return Math.round(o/n)+"h"}if(s>=e){return Math.round(o/e)+"m"}if(s>=t){return Math.round(o/t)+"s"}return o+"ms"}function a(o){var s=Math.abs(o);if(s>=r){return u(o,s,r,"day")}if(s>=n){return u(o,s,n,"hour")}if(s>=e){return u(o,s,e,"minute")}if(s>=t){return u(o,s,t,"second")}return o+" ms"}function u(t,e,n,r){var o=e>=n*1.5;return Math.round(t/n)+" "+r+(o?"s":"")}return Ot}var zt;var Bt;function Wt(){if(Bt)return zt;Bt=1;function t(t){n.debug=n;n.default=n;n.coerce=a;n.disable=i;n.enable=o;n.enabled=c;n.humanize=Vt();n.destroy=u;Object.keys(t).forEach((e=>{n[e]=t[e]}));n.names=[];n.skips=[];n.formatters={};function e(t){let e=0;for(let n=0;n<t.length;n++){e=(e<<5)-e+t.charCodeAt(n);e|=0}return n.colors[Math.abs(e)%n.colors.length]}n.selectColor=e;function n(t){let e;let o=null;let s;let i;function c(...t){if(!c.enabled){return}const r=c;const o=Number(new Date);const s=o-(e||o);r.diff=s;r.prev=e;r.curr=o;e=o;t[0]=n.coerce(t[0]);if(typeof t[0]!=="string"){t.unshift("%O")}let i=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((e,o)=>{if(e==="%%"){return"%"}i++;const s=n.formatters[o];if(typeof s==="function"){const n=t[i];e=s.call(r,n);t.splice(i,1);i--}return e}));n.formatArgs.call(r,t);const a=r.log||n.log;a.apply(r,t)}c.namespace=t;c.useColors=n.useColors();c.color=n.selectColor(t);c.extend=r;c.destroy=n.destroy;Object.defineProperty(c,"enabled",{enumerable:true,configurable:false,get:()=>{if(o!==null){return o}if(s!==n.namespaces){s=n.namespaces;i=n.enabled(t)}return i},set:t=>{o=t}});if(typeof n.init==="function"){n.init(c)}return c}function r(t,e){const r=n(this.namespace+(typeof e==="undefined"?":":e)+t);r.log=this.log;return r}function o(t){n.save(t);n.namespaces=t;n.names=[];n.skips=[];const e=(typeof t==="string"?t:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const t of e){if(t[0]==="-"){n.skips.push(t.slice(1))}else{n.names.push(t)}}}function s(t,e){let n=0;let r=0;let o=-1;let s=0;while(n<t.length){if(r<e.length&&(e[r]===t[n]||e[r]==="*")){if(e[r]==="*"){o=r;s=n;r++}else{n++;r++}}else if(o!==-1){r=o+1;s++;n=s}else{return false}}while(r<e.length&&e[r]==="*"){r++}return r===e.length}function i(){const t=[...n.names,...n.skips.map((t=>"-"+t))].join(",");n.enable("");return t}function c(t){for(const e of n.skips){if(s(t,e)){return false}}for(const e of n.names){if(s(t,e)){return true}}return false}function a(t){if(t instanceof Error){return t.stack||t.message}return t}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}n.enable(n.load());return n}zt=t;return zt}var Rt;function $t(){if(Rt)return Dt.exports;Rt=1;(function(t,e){e.formatArgs=r;e.save=o;e.load=s;e.useColors=n;e.storage=i();e.destroy=(()=>{let t=false;return()=>{if(!t){t=true;console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}}})();e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function n(){if(typeof window!=="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)){return true}if(typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)){return false}let t;return typeof document!=="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!=="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!=="undefined"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator!=="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function r(e){e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff);if(!this.useColors){return}const n="color: "+this.color;e.splice(1,0,n,"color: inherit");let r=0;let o=0;e[0].replace(/%[a-zA-Z%]/g,(t=>{if(t==="%%"){return}r++;if(t==="%c"){o=r}}));e.splice(o,0,n)}e.log=console.debug||console.log||(()=>{});function o(t){try{if(t){e.storage.setItem("debug",t)}else{e.storage.removeItem("debug")}}catch(t){}}function s(){let t;try{t=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch(t){}if(!t&&typeof process!=="undefined"&&"env"in process){t=process.env.DEBUG}return t}function i(){try{return localStorage}catch(t){}}t.exports=Wt()(e);const{formatters:c}=t.exports;c.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}})(Dt,Dt.exports);return Dt.exports}var qt=$t();var Ut=b(qt);const _t=()=>typeof Symbol==="function";const Lt=t=>_t()&&Boolean(Symbol[t]);const Ht=t=>Lt(t)?Symbol[t]:"@@"+t;if(!Lt("asyncIterator")){Symbol.asyncIterator=Symbol.asyncIterator||Symbol.for("Symbol.asyncIterator")}const Gt=Ht("iterator");const Yt=Ht("observable");const Jt=Ht("species");function Qt(t,e){const n=t[e];if(n==null){return undefined}if(typeof n!=="function"){throw new TypeError(n+" is not a function")}return n}function Zt(t){let e=t.constructor;if(e!==undefined){e=e[Jt];if(e===null){e=undefined}}return e!==undefined?e:ae}function Kt(t){return t instanceof ae}function Xt(t){if(Xt.log){Xt.log(t)}else{setTimeout((()=>{throw t}),0)}}function te(t){Promise.resolve().then((()=>{try{t()}catch(t){Xt(t)}}))}function ee(t){const e=t._cleanup;if(e===undefined){return}t._cleanup=undefined;if(!e){return}try{if(typeof e==="function"){e()}else{const t=Qt(e,"unsubscribe");if(t){t.call(e)}}}catch(t){Xt(t)}}function ne(t){t._observer=undefined;t._queue=undefined;t._state="closed"}function re(t){const e=t._queue;if(!e){return}t._queue=undefined;t._state="ready";for(const n of e){oe(t,n.type,n.value);if(t._state==="closed"){break}}}function oe(t,e,n){t._state="running";const r=t._observer;try{const o=r?Qt(r,e):undefined;switch(e){case"next":if(o)o.call(r,n);break;case"error":ne(t);if(o)o.call(r,n);else throw n;break;case"complete":ne(t);if(o)o.call(r);break}}catch(t){Xt(t)}if(t._state==="closed"){ee(t)}else if(t._state==="running"){t._state="ready"}}function se(t,e,n){if(t._state==="closed"){return}if(t._state==="buffering"){t._queue=t._queue||[];t._queue.push({type:e,value:n});return}if(t._state!=="ready"){t._state="buffering";t._queue=[{type:e,value:n}];te((()=>re(t)));return}oe(t,e,n)}class ie{constructor(t,e){this._cleanup=undefined;this._observer=t;this._queue=undefined;this._state="initializing";const n=new ce(this);try{this._cleanup=e.call(undefined,n)}catch(t){n.error(t)}if(this._state==="initializing"){this._state="ready"}}get closed(){return this._state==="closed"}unsubscribe(){if(this._state!=="closed"){ne(this);ee(this)}}}class ce{constructor(t){this._subscription=t}get closed(){return this._subscription._state==="closed"}next(t){se(this._subscription,"next",t)}error(t){se(this._subscription,"error",t)}complete(){se(this._subscription,"complete")}}class ae{constructor(t){if(!(this instanceof ae)){throw new TypeError("Observable cannot be called as a function")}if(typeof t!=="function"){throw new TypeError("Observable initializer must be a function")}this._subscriber=t}subscribe(t,e,n){if(typeof t!=="object"||t===null){t={next:t,error:e,complete:n}}return new ie(t,this._subscriber)}pipe(t,...e){let n=this;for(const r of[t,...e]){n=r(n)}return n}tap(t,e,n){const r=typeof t!=="object"||t===null?{next:t,error:e,complete:n}:t;return new ae((t=>this.subscribe({next(e){r.next&&r.next(e);t.next(e)},error(e){r.error&&r.error(e);t.error(e)},complete(){r.complete&&r.complete();t.complete()},start(t){r.start&&r.start(t)}})))}forEach(t){return new Promise(((e,n)=>{if(typeof t!=="function"){n(new TypeError(t+" is not a function"));return}function r(){o.unsubscribe();e(undefined)}const o=this.subscribe({next(e){try{t(e,r)}catch(t){n(t);o.unsubscribe()}},error(t){n(t)},complete(){e(undefined)}})}))}map(t){if(typeof t!=="function"){throw new TypeError(t+" is not a function")}const e=Zt(this);return new e((e=>this.subscribe({next(n){let r=n;try{r=t(n)}catch(t){return e.error(t)}e.next(r)},error(t){e.error(t)},complete(){e.complete()}})))}filter(t){if(typeof t!=="function"){throw new TypeError(t+" is not a function")}const e=Zt(this);return new e((e=>this.subscribe({next(n){try{if(!t(n))return}catch(t){return e.error(t)}e.next(n)},error(t){e.error(t)},complete(){e.complete()}})))}reduce(t,e){if(typeof t!=="function"){throw new TypeError(t+" is not a function")}const n=Zt(this);const r=arguments.length>1;let o=false;let s=e;return new n((e=>this.subscribe({next(n){const i=!o;o=true;if(!i||r){try{s=t(s,n)}catch(t){return e.error(t)}}else{s=n}},error(t){e.error(t)},complete(){if(!o&&!r){return e.error(new TypeError("Cannot reduce an empty sequence"))}e.next(s);e.complete()}})))}concat(...t){const e=Zt(this);return new e((n=>{let r;let o=0;function s(i){r=i.subscribe({next(t){n.next(t)},error(t){n.error(t)},complete(){if(o===t.length){r=undefined;n.complete()}else{s(e.from(t[o++]))}}})}s(this);return()=>{if(r){r.unsubscribe();r=undefined}}}))}flatMap(t){if(typeof t!=="function"){throw new TypeError(t+" is not a function")}const e=Zt(this);return new e((n=>{const r=[];const o=this.subscribe({next(o){let i;if(t){try{i=t(o)}catch(t){return n.error(t)}}else{i=o}const c=e.from(i).subscribe({next(t){n.next(t)},error(t){n.error(t)},complete(){const t=r.indexOf(c);if(t>=0)r.splice(t,1);s()}});r.push(c)},error(t){n.error(t)},complete(){s()}});function s(){if(o.closed&&r.length===0){n.complete()}}return()=>{r.forEach((t=>t.unsubscribe()));o.unsubscribe()}}))}[Yt](){return this}static from(t){const e=typeof this==="function"?this:ae;if(t==null){throw new TypeError(t+" is not an object")}const n=Qt(t,Yt);if(n){const r=n.call(t);if(Object(r)!==r){throw new TypeError(r+" is not an object")}if(Kt(r)&&r.constructor===e){return r}return new e((t=>r.subscribe(t)))}if(Lt("iterator")){const n=Qt(t,Gt);if(n){return new e((e=>{te((()=>{if(e.closed)return;for(const r of n.call(t)){e.next(r);if(e.closed)return}e.complete()}))}))}}if(Array.isArray(t)){return new e((e=>{te((()=>{if(e.closed)return;for(const n of t){e.next(n);if(e.closed)return}e.complete()}))}))}throw new TypeError(t+" is not observable")}static of(...t){const e=typeof this==="function"?this:ae;return new e((e=>{te((()=>{if(e.closed)return;for(const n of t){e.next(n);if(e.closed)return}e.complete()}))}))}static get[Jt](){return this}}if(_t()){Object.defineProperty(ae,Symbol("extensions"),{value:{symbol:Yt,hostReportError:Xt},configurable:true})}function ue(t){if(typeof t==="function"){t()}else if(t&&typeof t.unsubscribe==="function"){t.unsubscribe()}}class le extends ae{constructor(){super((t=>{this._observers.add(t);return()=>this._observers.delete(t)}));this._observers=new Set}next(t){for(const e of this._observers){e.next(t)}}error(t){for(const e of this._observers){e.error(t)}}complete(){for(const t of this._observers){t.complete()}}}function fe(t){const e=new le;let n;let r=0;return new ae((o=>{if(!n){n=t.subscribe(e)}const s=e.subscribe(o);r++;return()=>{r--;s.unsubscribe();if(r===0){ue(n);n=undefined}}}))}function he(t){return Promise.all(t.map((t=>{const e=t=>({status:"fulfilled",value:t});const n=t=>({status:"rejected",reason:t});const r=Promise.resolve(t);try{return r.then(e,n)}catch(t){return Promise.reject(t)}})))}var de;(function(t){t["initialized"]="initialized";t["taskCanceled"]="taskCanceled";t["taskCompleted"]="taskCompleted";t["taskFailed"]="taskFailed";t["taskQueued"]="taskQueued";t["taskQueueDrained"]="taskQueueDrained";t["taskStart"]="taskStart";t["terminated"]="terminated"})(de||(de={}));const me=Symbol("thread.errors");const pe=Symbol("thread.events");const ve=Symbol("thread.terminate");const we=Symbol("thread.transferable");const ye=Symbol("thread.worker");function ge(t){throw Error(t)}const be={errors(t){return t[me]||ge("Error observable not found. Make sure to pass a thread instance as returned by the spawn() promise.")},events(t){return t[pe]||ge("Events observable not found. Make sure to pass a thread instance as returned by the spawn() promise.")},terminate(t){return t[ve]()}};var Ce=undefined&&undefined.__awaiter||function(t,e,n,r){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,s){function i(t){try{a(r.next(t))}catch(t){s(t)}}function c(t){try{a(r["throw"](t))}catch(t){s(t)}}function a(t){t.done?n(t.value):o(t.value).then(i,c)}a((r=r.apply(t,e||[])).next())}))};let xe=1;function ke(t){const e=[];for(let n=0;n<t;n++){e.push(n)}return e}function Fe(t){return new Promise((e=>setTimeout(e,t)))}function Me(t,e){return t.reduce(((t,n)=>[...t,...e(n)]),[])}function Se(t){return t.replace(/\W/g," ").trim().replace(/\s+/g,"-")}function je(t,e){return ke(e).map((()=>({init:t(),runningTasks:[]})))}class Pe{constructor(t,e){this.eventSubject=new le;this.initErrors=[];this.isClosing=false;this.nextTaskID=1;this.taskQueue=[];const n=typeof e==="number"?{size:e}:e||{};const{size:r=jt}=n;this.debug=Ut(`threads:pool:${Se(n.name||String(xe++))}`);this.options=n;this.workers=je(t,r);this.eventObservable=fe(ae.from(this.eventSubject));Promise.all(this.workers.map((t=>t.init))).then((()=>this.eventSubject.next({type:de.initialized,size:this.workers.length})),(t=>{this.debug("Error while initializing pool worker:",t);this.eventSubject.error(t);this.initErrors.push(t)}))}findIdlingWorker(){const{concurrency:t=1}=this.options;return this.workers.find((e=>e.runningTasks.length<t))}runPoolTask(t,e){return Ce(this,void 0,void 0,(function*(){const n=this.workers.indexOf(t)+1;this.debug(`Running task #${e.id} on worker #${n}...`);this.eventSubject.next({type:de.taskStart,taskID:e.id,workerID:n});try{const r=yield e.run(yield t.init);this.debug(`Task #${e.id} completed successfully`);this.eventSubject.next({type:de.taskCompleted,returnValue:r,taskID:e.id,workerID:n})}catch(t){this.debug(`Task #${e.id} failed`);this.eventSubject.next({type:de.taskFailed,taskID:e.id,error:t,workerID:n})}}))}run(t,e){return Ce(this,void 0,void 0,(function*(){const n=(()=>Ce(this,void 0,void 0,(function*(){const r=()=>{t.runningTasks=t.runningTasks.filter((t=>t!==n))};yield Fe(0);try{yield this.runPoolTask(t,e)}finally{r();if(!this.isClosing){this.scheduleWork()}}})))();t.runningTasks.push(n)}))}scheduleWork(){this.debug(`Attempt de-queueing a task in order to run it...`);const t=this.findIdlingWorker();if(!t)return;const e=this.taskQueue.shift();if(!e){this.debug(`Task queue is empty`);this.eventSubject.next({type:de.taskQueueDrained});return}this.run(t,e)}taskCompletion(t){return new Promise(((e,n)=>{const r=this.events().subscribe((o=>{if(o.type===de.taskCompleted&&o.taskID===t){r.unsubscribe();e(o.returnValue)}else if(o.type===de.taskFailed&&o.taskID===t){r.unsubscribe();n(o.error)}else if(o.type===de.terminated){r.unsubscribe();n(Error("Pool has been terminated before task was run."))}}))}))}settled(){return Ce(this,arguments,void 0,(function*(t=false){const e=()=>Me(this.workers,(t=>t.runningTasks));const n=[];const r=this.eventObservable.subscribe((t=>{if(t.type===de.taskFailed){n.push(t.error)}}));if(this.initErrors.length>0){return Promise.reject(this.initErrors[0])}if(t&&this.taskQueue.length===0){yield he(e());return n}yield new Promise(((t,e)=>{const n=this.eventObservable.subscribe({next(e){if(e.type===de.taskQueueDrained||e.type===de.terminated){n.unsubscribe();t(void 0)}},complete(){n.unsubscribe();t(void 0)},error:e})}));yield he(e());r.unsubscribe();return n}))}completed(){return Ce(this,arguments,void 0,(function*(t=false){const e=this.settled(t);const n=new Promise(((t,n)=>{const r=this.eventObservable.subscribe({next(o){if(o.type===de.taskQueueDrained||o.type===de.terminated){r.unsubscribe();t(e)}else if(o.type===de.taskFailed){r.unsubscribe();n(o.error)}},complete(){r.unsubscribe();t(e)},error:n})}));const r=yield Promise.race([e,n]);if(r.length>0){throw r[0]}}))}events(){return this.eventObservable}queue(t){const{maxQueuedJobs:e=Infinity}=this.options;if(this.isClosing){throw Error(`Cannot schedule pool tasks after terminate() has been called.`)}if(this.initErrors.length>0){throw this.initErrors[0]}const n=this.nextTaskID++;const r=this.taskCompletion(n);r.catch((t=>{this.debug(`Task #${n} errored:`,t)}));const o={id:n,run:t,cancel:()=>{if(this.taskQueue.indexOf(o)===-1)return;this.taskQueue=this.taskQueue.filter((t=>t!==o));this.eventSubject.next({type:de.taskCanceled,taskID:o.id})},then:r.then.bind(r)};if(this.taskQueue.length>=e){throw Error("Maximum number of pool tasks queued. Refusing to queue another one.\n"+"This usually happens for one of two reasons: We are either at peak "+"workload right now or some tasks just won't finish, thus blocking the pool.")}this.debug(`Queueing task #${o.id}...`);this.taskQueue.push(o);this.eventSubject.next({type:de.taskQueued,taskID:o.id});this.scheduleWork();return o}terminate(t){return Ce(this,void 0,void 0,(function*(){this.isClosing=true;if(!t){yield this.completed(true)}this.eventSubject.next({type:de.terminated,remainingQueue:[...this.taskQueue]});this.eventSubject.complete();yield Promise.all(this.workers.map((t=>Ce(this,void 0,void 0,(function*(){try{yield be.terminate(yield t.init)}catch(t){this.debug("Worker did not initialize; nothing to terminate:",t)}})))))}))}}Pe.EventType=de;function Ie(t,e){return new Pe(t,e)}Ie.EventType=de;const Ne=Ie;const Ee={deserialize(t){return Object.assign(Error(t.message),{name:t.name,stack:t.stack})},serialize(t){return{__error_marker:"$$error",message:t.message,name:t.name,stack:t.stack}}};const Te=t=>t&&typeof t==="object"&&"__error_marker"in t&&t.__error_marker==="$$error";const De={deserialize(t){if(Te(t)){return Ee.deserialize(t)}else{return t}},serialize(t){if(t instanceof Error){return Ee.serialize(t)}else{return t}}};let Oe=De;function Ae(t){return Oe.deserialize(t)}function Ve(t){return Oe.serialize(t)}const ze=()=>undefined;function Be(){let t=false;let e;let n=ze;const r=new Promise((r=>{if(t){r(e)}else{n=r}}));const o=r=>{t=true;e=r;n(e)};return[r,o]}var We;(function(t){t["internalError"]="internalError";t["message"]="message";t["termination"]="termination"})(We||(We={}));class Re extends Error{constructor(t,e){super(t);this.name="ThreadCloneError";this.cause=e;Object.setPrototypeOf(this,Re.prototype)}}function $e(t){return Boolean(t&&typeof t==="object"&&t.name==="DataCloneError")}var qe;const Ue=()=>undefined;const _e=t=>t;const Le=t=>Promise.resolve().then(t);function He(t){throw t}function Ge(t){return t&&typeof t.then==="function"}class Ye extends ae{constructor(t){super((e=>{const n=this;const r=Object.assign(Object.assign({},e),{complete(){e.complete();n.onCompletion()},error(t){e.error(t);n.onError(t)},next(t){e.next(t);n.onNext(t)}});try{this.initHasRun=true;return t(r)}catch(t){r.error(t)}}));this.initHasRun=false;this.fulfillmentCallbacks=[];this.rejectionCallbacks=[];this.firstValueSet=false;this.state="pending";this[qe]="[object ObservablePromise]"}onNext(t){if(!this.firstValueSet){this.firstValue=t;this.firstValueSet=true}}onError(t){this.state="rejected";this.rejection=t;for(const e of this.rejectionCallbacks){Le((()=>e(t)))}}onCompletion(){this.state="fulfilled";for(const t of this.fulfillmentCallbacks){Le((()=>t(this.firstValue)))}}then(t,e){const n=t||_e;const r=e||He;let o=false;return new Promise(((t,e)=>{const s=n=>{if(o)return;o=true;try{t(r(n))}catch(t){e(t)}};const i=e=>{try{t(n(e))}catch(t){s(t)}};if(!this.initHasRun){this.subscribe({error:s})}if(this.state==="fulfilled"){return t(n(this.firstValue))}if(this.state==="rejected"){o=true;return t(r(this.rejection))}this.fulfillmentCallbacks.push(i);this.rejectionCallbacks.push(s)}))}catch(t){return this.then(undefined,t)}finally(t){const e=t||Ue;return this.then((t=>{e();return t}),(()=>e()))}static from(t){if(Ge(t)){return new Ye((e=>{const n=t=>{e.next(t);e.complete()};const r=t=>{e.error(t)};t.then(n,r)}))}else{return super.from(t)}}}qe=Symbol.toStringTag;function Je(t){return t&&typeof t==="object"&&t[we]}var Qe;(function(t){t["cancel"]="cancel";t["run"]="run"})(Qe||(Qe={}));var Ze;(function(t){t["error"]="error";t["init"]="init";t["result"]="result";t["running"]="running";t["uncaughtError"]="uncaughtError"})(Ze||(Ze={}));const Ke=Ut("threads:master:messages");let Xe=1;const tn=t=>Array.from(new Set(t));const en=t=>t&&t.type===Ze.error;const nn=t=>t&&t.type===Ze.result;const rn=t=>t&&t.type===Ze.running;function on(t,e){return new ae((n=>{let r;let o=false;const s=()=>{t.removeEventListener("message",i);t.removeEventListener("error",c);t.removeEventListener("exit",a)};const i=t=>{Ke("Message from worker:",t.data);if(!t.data||t.data.uid!==e)return;if(rn(t.data)){r=t.data.resultType}else if(nn(t.data)){if(r==="promise"){if(typeof t.data.payload!=="undefined"){n.next(Ae(t.data.payload))}o=true;n.complete();s()}else{if(typeof t.data.payload!=="undefined"){n.next(Ae(t.data.payload))}if(t.data.complete){o=true;n.complete();s()}}}else if(en(t.data)){const e=Ae(t.data.error);o=true;n.error(e);s()}};const c=t=>{if(o)return;o=true;const e=t&&t.data instanceof Error?t.data:Error(String(t&&t.data||"Worker errored before the job completed."));n.error(e);s()};const a=t=>{if(o)return;o=true;const e=t?t.data:undefined;n.error(Error(`Worker terminated before the job completed (exit code: ${e}).`));s()};t.addEventListener("message",i);t.addEventListener("error",c);t.addEventListener("exit",a);return()=>{if(r==="observable"||!r){const n={type:Qe.cancel,uid:e};t.postMessage(n)}s()}}))}function sn(t){if(t.length===0){return{args:[],transferables:[]}}const e=[];const n=[];for(const r of t){if(Je(r)){e.push(Ve(r.send));n.push(...r.transferables)}else{e.push(Ve(r))}}return{args:e,transferables:n.length===0?n:tn(n)}}function cn(t,e){return(...n)=>{const r=Xe++;const{args:o,transferables:s}=sn(n);const i={type:Qe.run,uid:r,method:e,args:o};Ke("Sending command to run function to worker:",i);try{t.postMessage(i,s)}catch(t){if($e(t)){const e=new Re(`Cannot send arguments to the worker thread: a value is not structured-cloneable. `+`Functions, class instances and other non-serializable values cannot be passed to a thread. `+`Original error: ${t.message}`,t);return Ye.from(Promise.reject(e))}return Ye.from(Promise.reject(t))}return Ye.from(fe(on(t,r)))}}function an(t,e){const n={};for(const r of e){n[r]=cn(t,r)}return n}var un=undefined&&undefined.__awaiter||function(t,e,n,r){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,s){function i(t){try{a(r.next(t))}catch(t){s(t)}}function c(t){try{a(r["throw"](t))}catch(t){s(t)}}function a(t){t.done?n(t.value):o(t.value).then(i,c)}a((r=r.apply(t,e||[])).next())}))};const ln=Ut("threads:master:messages");const fn=Ut("threads:master:spawn");const hn=Ut("threads:master:thread-utils");const dn=t=>t&&t.type==="init";const mn=t=>t&&t.type==="uncaughtError";const pn=typeof process!=="undefined"&&typeof process.env!=="undefined"&&process.env.THREADS_WORKER_INIT_TIMEOUT?Number.parseInt(process.env.THREADS_WORKER_INIT_TIMEOUT,10):1e4;function vn(t,e,n){return un(this,void 0,void 0,(function*(){let r;const o=new Promise(((t,o)=>{r=setTimeout((()=>o(Error(n))),e)}));try{return yield Promise.race([t,o])}finally{clearTimeout(r)}}))}function wn(t){return new Promise(((e,n)=>{const r=o=>{ln("Message from worker before finishing initialization:",o.data);if(dn(o.data)){t.removeEventListener("message",r);e(o.data)}else if(mn(o.data)){t.removeEventListener("message",r);n(Ae(o.data.error))}};t.addEventListener("message",r)}))}function yn(t,e){return new ae((n=>{const r=t=>{const e={type:We.message,data:t.data};n.next(e)};const o=t=>{hn("Unhandled promise rejection event in thread:",t);const e={type:We.internalError,error:Error(t.reason)};n.next(e)};t.addEventListener("message",r);t.addEventListener("unhandledrejection",o);e.then((()=>{const e={type:We.termination};t.removeEventListener("message",r);t.removeEventListener("unhandledrejection",o);n.next(e);n.complete()}))}))}function gn(t){const[e,n]=Be();const r=()=>un(this,void 0,void 0,(function*(){hn("Terminating worker");yield t.terminate();n()}));return{terminate:r,termination:e}}function bn(t,e,n,r){const o=n.filter((t=>t.type===We.internalError)).map((t=>t.error));return Object.assign(t,{[me]:o,[pe]:n,[ve]:r,[ye]:e})}function Cn(t,e){return un(this,void 0,void 0,(function*(){var e,n;fn("Initializing new thread");const r=pn;let o;try{o=yield vn(wn(t),r,`Timeout: Did not receive an init message from worker after ${r}ms. Make sure the worker calls expose().`)}catch(r){yield Promise.resolve((n=(e=t).terminate)===null||n===void 0?void 0:n.call(e)).catch((()=>undefined));throw r}const s=o.exposed;const{termination:i,terminate:c}=gn(t);const a=yn(t,i);if(s.type==="function"){const e=cn(t);return bn(e,t,a,c)}else if(s.type==="module"){const e=an(t,s.methods);return bn(e,t,a,c)}else{const t=s.type;throw Error(`Worker init message states unexpected type of expose(): ${t}`)}}))}Tt().blob;const xn=Tt().default;if(typeof global!=="undefined"){global.Worker=xn}else if(typeof window!=="undefined"){window.Worker=xn}const kn=new URL("./png-decoder.worker.js",import.meta.url);let Fn;const Mn=1;function Sn(){var t;if(typeof window!=="undefined"){const e=(t=window.navigator.hardwareConcurrency)!==null&&t!==void 0?t:8;return Math.ceil(e/4)}else{return Mn}}function jn(){if(Fn==null){const t=Sn();console.debug(`Spawning PNG worker pool [size=${t}]`);Fn=Ne((()=>Cn(new Worker(kn))),{size:t})}return Fn}const Pn=async t=>{const e=jn();return e.queue((e=>e(t)))};function In(t,n){const r=e.magnitude(t);const o=n.radius/r;return e.scale(o,t)}function Nn(t,n,r){const o=e.subtract(r,t);const s=e.dot(n,o);const i=e.magnitudeSquared(n);const c=s/i;const a=e.scale(c,n);return e.add(a,t)}class En{constructor(t,e,n,r,o,s,i,c,a,u=y.create()){this.correlationIds=t;this.temporalRefinementCorrelationId=e;this.sequenceNumber=n;this.dimensions=r;this.image=o;this.scene=s;this.depthBufferBytes=i;this.featureMapBytes=c;this.partialFrame=a;this.id=u}getId(){return this.id}async depthBuffer(){if(this.cachedDepthBuffer==null){this.cachedDepthBuffer=this.depthBufferBytes!=null?this.decodeDepthBuffer(new Uint8Array(this.depthBufferBytes)):Promise.resolve(undefined)}return this.cachedDepthBuffer}async decodeDepthBuffer(t){const e=await Pn(t);return lt.fromPng(e,this.scene.camera,this.image.imageAttr)}async featureMap(){if(this.cachedFeatureMap==null){this.cachedFeatureMap=this.featureMapBytes!=null?this.decodeFeatureMap(new Uint8Array(this.featureMapBytes)):Promise.resolve(undefined)}return this.cachedFeatureMap}async decodeFeatureMap(t){const e=await Pn(t);return xt.fromPng(e,this.image.imageAttr)}copy({correlationIds:t,temporalRefinementCorrelationId:e,sequenceNumber:n,dimensions:r,image:o,scene:s,depthBufferBytes:i,featureMapBytes:c,partialFrame:a}){return new En(t!==null&&t!==void 0?t:this.correlationIds,e!==null&&e!==void 0?e:this.temporalRefinementCorrelationId,n!==null&&n!==void 0?n:this.sequenceNumber,r!==null&&r!==void 0?r:this.dimensions,o!==null&&o!==void 0?o:this.image,s!==null&&s!==void 0?s:this.scene,i!==null&&i!==void 0?i:this.depthBufferBytes,c!==null&&c!==void 0?c:this.featureMapBytes,a!==null&&a!==void 0?a:this.partialFrame,this.id)}}class Tn{constructor(t,e){this.imageAttr=t;this.imageBytes=e}}class Dn{constructor(t,e,n,r,o,s,i,c){this.camera=t;this.boundingBox=e;this.crossSection=n;this.worldOrientation=r;this.hasChanged=o;this.sceneViewSummary=s;this.modelViewId=i;this.itemModelView=c}copy({camera:t,boundingBox:e,crossSection:n,worldOrientation:r,hasChanged:o,sceneViewSummary:s,modelViewId:i,itemModelView:c}){return new Dn(t!==null&&t!==void 0?t:this.camera,e!==null&&e!==void 0?e:this.boundingBox,n!==null&&n!==void 0?n:this.crossSection,r!==null&&r!==void 0?r:this.worldOrientation,o!==null&&o!==void 0?o:this.hasChanged,s!==null&&s!==void 0?s:this.sceneViewSummary,i!==null&&i!==void 0?i:this.modelViewId,c!==null&&c!==void 0?c:this.itemModelView)}}class On{constructor(t,e,n,r,o,s){this.position=t;this.lookAt=e;this.up=n;this.near=r;this.far=o;this.aspectRatio=s}get direction(){return e.normalize(this.viewVector)}get viewVector(){return e.subtract(this.lookAt,this.position)}get worldMatrix(){return this.computeCameraMatrices().worldMatrix}get viewMatrix(){return this.computeCameraMatrices().viewMatrix}get projectionMatrix(){return this.computeCameraMatrices().projectionMatrix}get projectionMatrixInverse(){return this.computeCameraMatrices().projectionMatrixInverse}get projectionViewMatrix(){return this.computeCameraMatrices().projectionViewMatrix}static fromBoundingBox(t,e,r){var o;const{near:s,far:i}=et(e,t);if(G(t)){const o=n.create(e);const c=In(t.viewVector,o);const a=Nn(t.lookAt,c,o.center);return new Vn(c,a,t.up,s,i,r,t.fovHeight,t.rotationPoint)}else{return new An(t.position,t.lookAt,t.up,s,i,r,(o=t.fovY)!==null&&o!==void 0?o:45)}}isOrthographic(){return false}isPerspective(){return false}isPointBehindNear(t){const{position:n,direction:r,near:o}=this;const s=e.dot(e.subtract(t,n),r);return s<o}intersectLineWithNear(t){const{position:n,direction:r,near:o}=this;const s=e.subtract(t.start,n);const a=e.subtract(t.end,n);const u=i.create({start:s,end:a});const l=c.create({normal:r,constant:-o});const f=c.intersectLine(l,u);return f!=null?e.add(f,n):undefined}computeCameraMatrices(){if(this.cameraMatrices==null){return{viewMatrix:a.makeIdentity(),worldMatrix:a.makeIdentity(),projectionMatrix:a.makeIdentity(),projectionMatrixInverse:a.makeIdentity(),projectionViewMatrix:a.makeIdentity()}}return this.cameraMatrices}updateCameraMatrices(t){this.cameraMatrices=t;return this.cameraMatrices}}class An extends On{constructor(t,e,n,r,o,s,i){super(t,e,n,r,o,s);this.position=t;this.lookAt=e;this.up=n;this.near=r;this.far=o;this.aspectRatio=s;this.fovY=i}toOrthographic(t){return On.fromBoundingBox(Z(this,t),t,this.aspectRatio)}isPerspective(){return true}computeCameraMatrices(){if(this.cameraMatrices==null){const t=a.makeLookAtView(this.position,this.lookAt,this.up);const e=a.invert(t);const n=a.makePerspective(this.near,this.far,this.fovY,this.aspectRatio);const r=a.invert(n);const o=a.multiply(t,n);return super.updateCameraMatrices({viewMatrix:t,worldMatrix:e,projectionMatrix:n,projectionMatrixInverse:r,projectionViewMatrix:o})}return this.cameraMatrices}}class Vn extends On{constructor(t,n,r,o,s,i,c,a){super(e.add(n,e.negate(t)),n,r,o,s,i);this.lookAt=n;this.up=r;this.near=o;this.far=s;this.aspectRatio=i;this.fovHeight=c;this.rotationPoint=a;this.top=c*.5;this.bottom=-this.top;this.right=this.top*i;this.left=-this.right}toPerspective(t){return On.fromBoundingBox(K(this),t,this.aspectRatio)}isOrthographic(){return true}computeCameraMatrices(){if(this.cameraMatrices==null){const t=a.makeLookAtView(this.position,this.lookAt,this.up);const e=a.invert(t);const n=a.makeOrthographic(this.left,this.right,this.bottom,this.top,this.near,this.far);const r=a.invert(n);const o=a.multiply(t,n);return super.updateCameraMatrices({viewMatrix:t,worldMatrix:e,projectionMatrix:n,projectionMatrixInverse:r,projectionViewMatrix:o})}return this.cameraMatrices}}class zn{constructor(t,e){this.y=t;this.z=e}get matrix(){const t=this.z;const n=this.y;const r=e.cross(n,t);return a.makeBasis(r,n,t)}}zn.DEFAULT=new zn(e.up(),e.back());class Bn{constructor(t,e){this.position=t;this.up=e}transformMatrix(t){const n=e.multiplyByTransformMatrixColumnMajor(this.position,t);const r=e.multiplyByTransformMatrixColumnMajor(this.up,t);return new Bn(n,r)}}Bn.FRONT=new Bn(e.back(),e.up());Bn.RIGHT=new Bn(e.right(),e.up());Bn.LEFT=new Bn(e.left(),e.up());Bn.BACK=new Bn(e.forward(),e.up());Bn.TOP=new Bn(e.up(),e.forward());Bn.BOTTOM=new Bn(e.down(),e.back());Bn.TOP_FRONT_RIGHT=new Bn(e.add(e.back(),e.up(),e.left()),e.up());Bn.TOP_FRONT_LEFT=new Bn(e.add(e.back(),e.up(),e.right()),e.up());Bn.BOTTOM_FRONT_RIGHT=new Bn(e.add(e.back(),e.down(),e.left()),e.up());Bn.BOTTOM_FRONT_LEFT=new Bn(e.add(e.back(),e.down(),e.right()),e.up());Bn.TOP_BACK_LEFT=new Bn(e.add(e.forward(),e.up(),e.right()),e.up());Bn.TOP_BACK_RIGHT=new Bn(e.add(e.forward(),e.up(),e.left()),e.up());Bn.BOTTOM_BACK_LEFT=new Bn(e.add(e.forward(),e.down(),e.right()),e.up());Bn.BOTTOM_BACK_RIGHT=new Bn(e.add(e.forward(),e.down(),e.left()),e.up());Bn.TOP_FRONT=new Bn(e.add(e.back(),e.up()),e.up());Bn.BOTTOM_FRONT=new Bn(e.add(e.back(),e.down()),e.up());Bn.FRONT_RIGHT=new Bn(e.add(e.back(),e.left()),e.up());Bn.FRONT_LEFT=new Bn(e.add(e.back(),e.right()),e.up());Bn.TOP_BACK=new Bn(e.add(e.forward(),e.up()),e.up());Bn.BOTTOM_BACK=new Bn(e.add(e.forward(),e.down()),e.up());Bn.BACK_LEFT=new Bn(e.add(e.forward(),e.right()),e.up());Bn.BACK_RIGHT=new Bn(e.add(e.forward(),e.left()),e.up());Bn.TOP_LEFT=new Bn(e.add(e.up(),e.right()),e.up());Bn.TOP_RIGHT=new Bn(e.add(e.up(),e.left()),e.up());Bn.BOTTOM_LEFT=new Bn(e.add(e.down(),e.right()),e.up());Bn.BOTTOM_RIGHT=new Bn(e.add(e.down(),e.left()),e.up());const Wn=v.defineMapper(v.read(v.requiredProp("x"),v.requiredProp("y")),(([t,e])=>r.create(t,e)));const Rn=v.defineMapper(v.read(v.requiredProp("width"),v.requiredProp("height")),(([t,e])=>u.create(t,e)));const $n=v.defineMapper(v.read(v.requiredProp("x"),v.requiredProp("y"),v.requiredProp("width"),v.requiredProp("height")),(([t,e,n,r])=>s.create(t,e,n,r)));const qn=v.defineMapper(v.read(v.requiredProp("x"),v.requiredProp("y"),v.requiredProp("z")),(([t,n,r])=>e.create(t,n,r)));const Un=v.defineMapper(v.read(v.requiredProp("xmin"),v.requiredProp("ymin"),v.requiredProp("zmin"),v.requiredProp("xmax"),v.requiredProp("ymax"),v.requiredProp("zmax")),(([t,n,r,o,s,i])=>l.create(e.create(t,n,r),e.create(o,s,i))));const _n=v.defineMapper(v.read(v.requiredProp("d"),v.mapRequiredProp("normal",qn)),(([t,e])=>c.create({normal:e,constant:t})));const Ln=v.defineMapper(v.read(v.requiredProp("x"),v.requiredProp("y"),v.requiredProp("z"),v.requiredProp("w")),(([t,e,n,r])=>f.create({x:t,y:e,z:n,w:r})));const Hn=v.defineMapper(v.read(v.mapRequiredProp("r0",Ln),v.mapRequiredProp("r1",Ln),v.mapRequiredProp("r2",Ln),v.mapRequiredProp("r3",Ln)),(([t,e,n,r])=>a.transpose(a.fromValues(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,n.x,n.y,n.z,n.w,r.x,r.y,r.z,r.w))));const Gn=v.defineMapper(v.read(v.requiredProp("r"),v.requiredProp("g"),v.requiredProp("b")),(([t,e,n])=>w.create(t,e,n)));const Yn=v.defineMapper((t=>{function e(t){return{r:t.r,g:t.g,b:t.b}}if(typeof t==="string"){const n=w.fromHexString(t);return n!=null?e(n):{errors:["String is not a valid color."]}}else if(typeof t==="number"){return e(w.fromNumber(t))}else{return e(t)}}),(t=>t));tr();const Jn=tr();const Qn=tr();const Zn=er();const Kn=er();const Xn=er();function tr(){return v.defineMapper((t=>t!=null?{value:t}:undefined),(t=>t))}function er(){return v.defineMapper((t=>(t===null||t===void 0?void 0:t.value)||undefined),(t=>t))}const nr=v.defineMapper(v.read(v.mapProp("position",v.compose(v.required("position"),qn)),v.mapProp("lookAt",v.compose(v.required("lookAt"),qn)),v.mapProp("up",v.compose(v.required("up"),qn)),v.getProp("fovY")),(([t,e,n,r])=>({position:t,lookAt:e,up:n,fovY:(r===null||r===void 0?void 0:r.value)!=null?r.value:45})));const rr=v.defineMapper(v.read(v.mapProp("viewVector",v.compose(v.required("viewVector"),qn)),v.mapProp("lookAt",v.compose(v.required("lookAt"),qn)),v.mapProp("up",v.compose(v.required("up"),qn)),v.mapProp("fovHeight",v.required("fovHeight"))),(([t,e,n,r])=>({viewVector:t,lookAt:e,up:n,fovHeight:r})));const or=v.defineMapper(v.read(v.mapProp("position",v.ifDefined(qn)),v.mapProp("lookAt",v.ifDefined(qn)),v.mapProp("up",v.ifDefined(qn)),v.mapProp("perspective",v.ifDefined(nr)),v.mapProp("orthographic",v.ifDefined(rr))),(([t,n,r,o,s])=>{var i;return(i=o!==null&&o!==void 0?o:s)!==null&&i!==void 0?i:{position:t!==null&&t!==void 0?t:e.back(),lookAt:n!==null&&n!==void 0?n:e.origin(),up:r!==null&&r!==void 0?r:e.up(),fovY:45}}));const sr=v.defineMapper(v.read(v.mapProp("normal",v.compose(v.required("normal"),qn)),v.requiredProp("offset")),(([t,e])=>({normal:t,offset:e})));const ir=v.defineMapper(v.read(v.mapProp("frameDimensions",v.compose(v.required("frameDimensions"),Rn)),v.mapProp("imageRect",v.compose(v.required("imageRect"),$n)),v.mapProp("scaleFactor",v.required("scaleFactor"))),(([t,e,n])=>({frameDimensions:t,imageRect:e,imageScale:n})));const cr=v.defineMapper(v.read(v.mapProp("sectionPlanes",v.compose(v.required("sectionPlanes"),v.mapArray(sr))),v.mapProp("highlightColor",v.ifDefined(Gn))),(([t,e])=>ot({sectionPlanes:t,highlightColor:e||undefined})));const ar=v.defineMapper(v.read(v.requiredProp("count"),v.mapProp("boundingBox",v.ifDefined(Un))),(([t,e])=>({count:t,boundingBox:e!==null&&e!==void 0?e:undefined})));const ur=v.defineMapper(v.read(v.mapProp("visibleSummary",v.ifDefined(ar)),v.mapProp("selectedVisibleSummary",v.ifDefined(ar))),(([t,e])=>ct({visibleSummary:t!==null&&t!==void 0?t:undefined,selectedVisibleSummary:e!==null&&e!==void 0?e:undefined})));const lr=v.defineMapper(v.read(v.mapProp("modelViewId",v.ifDefined(j)),v.mapProp("sceneItemId",v.ifDefined(j))),(([t,e])=>it({modelViewId:t!==null&&t!==void 0?t:undefined,sceneItemId:e!==null&&e!==void 0?e:undefined})));const fr=v.defineMapper(v.read(v.mapProp("imageAttributes",v.compose(v.required("imageAttributes"),ir))),(([t])=>t));const hr=v.defineMapper(v.read(fr,v.mapProp("image",v.required("image"))),(([t,e])=>new Tn(t,e)));const dr=v.defineMapper(v.read(v.mapRequiredProp("camera",or),v.mapRequiredProp("visibleBoundingBox",Un),v.mapRequiredProp("crossSectioning",cr),v.requiredProp("hasChanged"),v.mapRequiredProp("displayListSummary",ur),v.mapProp("modelViewId",v.ifDefined(P)),v.mapProp("itemModelView",v.ifDefined(lr))),(([t,e,n,r,o,s,i])=>({camera:t,boundingBox:e,crossSectioning:n,hasChanged:r,displayListSummary:o,modelViewId:s!==null&&s!==void 0?s:undefined,itemModelView:i!==null&&i!==void 0?i:undefined})));const mr=v.defineMapper(v.read(v.mapProp("sceneAttributes",v.compose(v.required("sceneAttributes"),dr))),(([t])=>t));const pr=v.defineMapper(v.read(mr,fr),(([t,e])=>On.fromBoundingBox(t.camera,t.boundingBox,u.aspectRatio(e.frameDimensions))));function vr(t){return v.defineMapper(v.read(mr,pr),(([e,n])=>new Dn(n,e.boundingBox,e.crossSectioning,t,e.hasChanged,e.displayListSummary,e.modelViewId,e.itemModelView)))}function wr(t){return v.defineMapper(v.read(v.mapProp("frameCorrelationIds",(t=>t!=null?t:[])),v.requiredProp("sequenceNumber"),v.compose(fr,v.getProp("frameDimensions")),vr(t),hr,v.mapProp("depthBuffer",Kn),v.mapProp("featureMap",Kn),v.mapProp("temporalRefinementCorrelationId",(t=>t!=null?j(t):null)),v.mapProp("partialFrame",v.ifDefined(Zn))),(([t,e,n,r,o,s,i,c,a])=>new En(t,c||"",e,n,o,r,s,i,a!==null&&a!==void 0?a:false)))}function yr(t){return v.ifInvalidThrow(wr(t))}const gr=v.defineMapper(v.compose(v.required("orientation"),v.read(v.mapProp("up",v.compose(v.required("up"),qn)),v.mapProp("front",v.compose(v.required("front"),qn)))),(([t,e])=>new zn(t,e)));v.ifInvalidThrow(gr);const br=v.defineMapper(v.read(v.mapRequiredProp("imageAttributes",ir),v.requiredProp("stencilBuffer"),v.mapRequiredProp("depthBuffer",v.compose(Kn,v.required("depthBuffer")))),(([t,e,n])=>({imageAttributes:t,stencilBuffer:e,depthBuffer:n})));const Cr=kr("stencilBuffer",br);const xr=v.ifInvalidThrow(Cr);function kr(t,e){return v.mapRequiredProp(t,e)}const Fr=v.defineMapper(v.read(v.requiredProp("token"),v.requiredProp("expiresIn")),(([t,e])=>q.create(t,e)));const Mr=v.defineMapper(v.read(v.compose(v.requiredProp("startStream"),v.mapRequiredProp("streamId",j)),v.compose(v.requiredProp("startStream"),v.mapRequiredProp("sceneId",j)),v.compose(v.requiredProp("startStream"),v.mapRequiredProp("sceneViewId",j)),v.compose(v.requiredProp("startStream"),v.mapRequiredProp("sessionId",j)),v.compose(v.requiredProp("startStream"),v.mapRequiredProp("worldOrientation",gr)),v.compose(v.requiredProp("startStream"),v.mapRequiredProp("token",Fr))),(([t,e,n,r,o,s])=>({streamId:t,sceneId:e,sceneViewId:n,sessionId:r,worldOrientation:o,token:s})));const Sr=v.ifInvalidThrow(Mr);const jr=v.defineMapper(v.read(v.compose(v.requiredProp("reconnect"),v.mapRequiredProp("token",Fr))),(([t])=>({token:t})));const Pr=v.ifInvalidThrow(jr);const Ir=v.defineMapper(v.compose(v.requiredProp("refreshToken"),v.requiredProp("token"),Fr),(t=>t));const Nr=v.ifInvalidThrow(Ir);const Er=v.defineMapper(v.compose(v.requiredProp("syncTime"),v.requiredProp("replyTime"),v.read(v.requiredProp("seconds"),v.requiredProp("nanos"))),(([t,e])=>m({seconds:t,nanos:e})));const Tr=v.ifInvalidThrow(Er);const Dr=v.defineMapper(v.ifDefined(v.getProp("next")),(t=>t!=null?t:undefined));const Or=v.defineMapper((t=>{switch(t){case"all":return{enabled:{value:true},frameType:d.protobuf.stream.FrameType.FRAME_TYPE_ALL};case"final":return{enabled:{value:true},frameType:d.protobuf.stream.FrameType.FRAME_TYPE_FINAL};default:return{enabled:{value:false},frameType:d.protobuf.stream.FrameType.FRAME_TYPE_INVALID}}}),(t=>t));const Ar=v.defineMapper(v.read(v.ifDefined(v.getProp("opacity"))),(([t])=>({opacity:{value:h(t!==null&&t!==void 0?t:0,0,1)}})));const Vr=v.defineMapper(v.read(v.ifDefined(v.getProp("width")),v.ifDefined(v.mapProp("color",v.ifDefined(Yn)))),(([t,e])=>({lineWidth:t,lineColor:e})));const zr=v.defineMapper(v.read(v.ifDefined(v.mapProp("color",v.ifDefined(Yn))),v.ifDefined(v.mapProp("opacity",Jn)),v.ifDefined(v.getProp("lineWidth"))),(([t,e,n])=>{if(t||e||n){return{color:t,opacity:e,lineWidth:n}}else return undefined}));const Br=v.defineMapper(v.read(v.ifDefined(v.mapProp("highlightColor",v.ifDefined(Yn))),v.ifDefined(v.mapProp("occludedOpacity",Jn)),v.ifDefined(v.mapProp("outline",v.ifDefined(Vr)))),(([t,e,n])=>({highlightColor:t,occludedOpacity:e,outline:n})));const Wr=v.defineMapper((t=>!!t),(t=>t));const Rr=v.defineMapper((t=>t!==null&&t!==void 0?t:""),(t=>t));const $r=v.defineMapper(v.read(v.ifDefined(v.mapProp("frameBackgroundColor",v.ifDefined(Yn)))),(([t])=>({frameBackgroundColor:t})));const qr=v.defineMapper(v.read(v.ifDefined(v.mapProp("streamKeyToCompare",v.ifDefined(Qn)))),(([t])=>({streamKeyToCompare:t})));const Ur=v.defineMapper(v.read(v.ifDefined(v.mapProp("endCapEnabled",(t=>!!t))),v.ifDefined(v.mapProp("endCapColor",v.ifDefined(Yn)))),(([t,e])=>({endCapEnabled:t,endCapColor:e})));const _r=v.defineMapper(v.read(v.mapProp("depthBuffers",Or),v.mapProp("phantom",Ar),v.mapProp("noDefaultLights",Wr),v.mapProp("featureLines",Vr),v.mapProp("featureHighlighting",Br),v.mapProp("featureMaps",Or),v.mapProp("experimentalRenderingOptions",Rr),v.mapProp("selectionHighlighting",zr),v.mapProp("frames",$r),v.mapProp("sceneComparison",qr),v.mapProp("crossSectioning",Ur)),(([t,e,n,r,o,s,i,c,a,u,l])=>{const f={depthBuffers:t,phantomItems:e,noDefaultLights:n,featureLines:r,featureHighlighting:o,featureMaps:s,experimentalRenderingOptions:i,selectionHighlighting:c,frames:a,sceneComparison:u,crossSectioningAttributes:l};return f}));export{bt as A,Yn as B,C,yt as D,Jn as E,On as F,yr as G,Sr as H,Pr as I,Tr as J,Nr as K,at as L,x as M,Z as N,zn as O,K as P,U as Q,Y as R,Bn as S,et as T,In as U,or as V,I as W,_n as X,En as a,Tn as b,st as c,Dn as d,Vn as e,tt as f,An as g,Ct as h,xr as i,Pn as j,lt as k,F as l,M as m,Xn as n,qn as o,k as p,Wn as q,Gn as r,Dr as s,X as t,Nn as u,S as v,Hn as w,Zn as x,Un as y,_r as z};
5
+ //# sourceMappingURL=p-BhKTTmpL.js.map