@itwin/core-common 5.5.0-dev.1 → 5.5.0-dev.2

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 (345) hide show
  1. package/lib/cjs/AmbientOcclusion.js.map +1 -1
  2. package/lib/cjs/AnalysisStyle.js.map +1 -1
  3. package/lib/cjs/Atmosphere.js.map +1 -1
  4. package/lib/cjs/AuthorizationClient.js.map +1 -1
  5. package/lib/cjs/BackgroundMapProvider.js.map +1 -1
  6. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  7. package/lib/cjs/Base64EncodedString.js.map +1 -1
  8. package/lib/cjs/BlobReader.js.map +1 -1
  9. package/lib/cjs/BriefcaseTypes.js.map +1 -1
  10. package/lib/cjs/Camera.js.map +1 -1
  11. package/lib/cjs/CatalogIModel.js.map +1 -1
  12. package/lib/cjs/CesiumIonAssets.js.map +1 -1
  13. package/lib/cjs/ChangedElements.js.map +1 -1
  14. package/lib/cjs/ChangedEntities.js.map +1 -1
  15. package/lib/cjs/ChangesetProps.js.map +1 -1
  16. package/lib/cjs/ClipStyle.js.map +1 -1
  17. package/lib/cjs/Code.js.map +1 -1
  18. package/lib/cjs/ColorByName.js.map +1 -1
  19. package/lib/cjs/ColorDef.js.map +1 -1
  20. package/lib/cjs/CommonLoggerCategory.js.map +1 -1
  21. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  22. package/lib/cjs/ContextRealityModel.js.map +1 -1
  23. package/lib/cjs/ContourDisplay.js.map +1 -1
  24. package/lib/cjs/DisplayStyleSettings.js.map +1 -1
  25. package/lib/cjs/ECSchemaProps.js.map +1 -1
  26. package/lib/cjs/ECSqlReader.js.map +1 -1
  27. package/lib/cjs/ECSqlTypes.js.map +1 -1
  28. package/lib/cjs/ElementMesh.js.map +1 -1
  29. package/lib/cjs/ElementProps.js.map +1 -1
  30. package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
  31. package/lib/cjs/EntityProps.js.map +1 -1
  32. package/lib/cjs/EntityReference.js.map +1 -1
  33. package/lib/cjs/Environment.js.map +1 -1
  34. package/lib/cjs/FeatureIndex.js.map +1 -1
  35. package/lib/cjs/FeatureSymbology.js.map +1 -1
  36. package/lib/cjs/FeatureTable.js.map +1 -1
  37. package/lib/cjs/Fonts.js.map +1 -1
  38. package/lib/cjs/Frustum.js.map +1 -1
  39. package/lib/cjs/GenericInstanceFilter.js.map +1 -1
  40. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  41. package/lib/cjs/GeometryContainment.js.map +1 -1
  42. package/lib/cjs/GeometryParams.js.map +1 -1
  43. package/lib/cjs/GeometrySummary.js.map +1 -1
  44. package/lib/cjs/Gradient.js.map +1 -1
  45. package/lib/cjs/GraphicParams.js.map +1 -1
  46. package/lib/cjs/GroundPlane.js.map +1 -1
  47. package/lib/cjs/HSLColor.js.map +1 -1
  48. package/lib/cjs/HSVColor.js.map +1 -1
  49. package/lib/cjs/HiddenLine.js.map +1 -1
  50. package/lib/cjs/Hilite.js.map +1 -1
  51. package/lib/cjs/IModel.js.map +1 -1
  52. package/lib/cjs/IModelError.js.map +1 -1
  53. package/lib/cjs/IModelVersion.js.map +1 -1
  54. package/lib/cjs/ITwinCoreErrors.js.map +1 -1
  55. package/lib/cjs/Image.js.map +1 -1
  56. package/lib/cjs/IpcAppProps.js.map +1 -1
  57. package/lib/cjs/LightSettings.js.map +1 -1
  58. package/lib/cjs/LinePixels.js.map +1 -1
  59. package/lib/cjs/Localization.js.map +1 -1
  60. package/lib/cjs/MapImagerySettings.js.map +1 -1
  61. package/lib/cjs/MapLayerSettings.js.map +1 -1
  62. package/lib/cjs/MassProperties.js.map +1 -1
  63. package/lib/cjs/MaterialProps.js.map +1 -1
  64. package/lib/cjs/ModelClipGroup.js.map +1 -1
  65. package/lib/cjs/ModelGeometryChanges.js.map +1 -1
  66. package/lib/cjs/ModelProps.js.map +1 -1
  67. package/lib/cjs/NativeAppProps.js.map +1 -1
  68. package/lib/cjs/OctEncodedNormal.js.map +1 -1
  69. package/lib/cjs/PlanProjectionSettings.js.map +1 -1
  70. package/lib/cjs/PlanarClipMask.js.map +1 -1
  71. package/lib/cjs/QPoint.js.map +1 -1
  72. package/lib/cjs/RealityDataAccessProps.js.map +1 -1
  73. package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
  74. package/lib/cjs/RenderMaterial.js.map +1 -1
  75. package/lib/cjs/RenderPolyline.js.map +1 -1
  76. package/lib/cjs/RenderTexture.js.map +1 -1
  77. package/lib/cjs/RgbColor.js.map +1 -1
  78. package/lib/cjs/RpcInterface.js.map +1 -1
  79. package/lib/cjs/RpcManager.js.map +1 -1
  80. package/lib/cjs/SessionProps.js.map +1 -1
  81. package/lib/cjs/SkyBox.js.map +1 -1
  82. package/lib/cjs/SolarCalculate.js.map +1 -1
  83. package/lib/cjs/SolarShadows.js.map +1 -1
  84. package/lib/cjs/SpatialClassification.js.map +1 -1
  85. package/lib/cjs/SubCategoryAppearance.js.map +1 -1
  86. package/lib/cjs/SubCategoryOverride.js.map +1 -1
  87. package/lib/cjs/TerrainSettings.js.map +1 -1
  88. package/lib/cjs/TextureMapping.js.map +1 -1
  89. package/lib/cjs/TextureProps.js.map +1 -1
  90. package/lib/cjs/ThematicDisplay.js.map +1 -1
  91. package/lib/cjs/Thumbnail.js.map +1 -1
  92. package/lib/cjs/TileProps.js.map +1 -1
  93. package/lib/cjs/Tween.js.map +1 -1
  94. package/lib/cjs/TxnAction.js.map +1 -1
  95. package/lib/cjs/ViewDetails.js.map +1 -1
  96. package/lib/cjs/ViewFlags.js.map +1 -1
  97. package/lib/cjs/ViewProps.js.map +1 -1
  98. package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
  99. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  100. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  101. package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
  102. package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
  103. package/lib/cjs/annotation/TextField.js.map +1 -1
  104. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  105. package/lib/cjs/core-common.js.map +1 -1
  106. package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
  107. package/lib/cjs/domains/GenericElementProps.js.map +1 -1
  108. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  109. package/lib/cjs/geometry/AreaPattern.js.map +1 -1
  110. package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
  111. package/lib/cjs/geometry/Cartographic.js.map +1 -1
  112. package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
  113. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  114. package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
  115. package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
  116. package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
  117. package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
  118. package/lib/cjs/geometry/GeometryStream.js.map +1 -1
  119. package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
  120. package/lib/cjs/geometry/LineStyle.js.map +1 -1
  121. package/lib/cjs/geometry/Placement.js.map +1 -1
  122. package/lib/cjs/geometry/Projection.js.map +1 -1
  123. package/lib/cjs/geometry/TextString.js.map +1 -1
  124. package/lib/cjs/internal/BackendTypes.js.map +1 -1
  125. package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
  126. package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
  127. package/lib/cjs/internal/RenderMesh.js.map +1 -1
  128. package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
  129. package/lib/cjs/internal/Snapping.js.map +1 -1
  130. package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -1
  131. package/lib/cjs/internal/cross-package.js.map +1 -1
  132. package/lib/cjs/ipc/IpcSession.js.map +1 -1
  133. package/lib/cjs/ipc/IpcSocket.js.map +1 -1
  134. package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
  135. package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
  136. package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
  137. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  138. package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
  139. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  140. package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
  141. package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
  142. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  143. package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
  144. package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
  145. package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
  146. package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
  147. package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
  148. package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
  149. package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
  150. package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
  151. package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
  152. package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
  153. package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
  154. package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
  155. package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  156. package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  157. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  158. package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
  159. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  160. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  161. package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
  162. package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  163. package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
  164. package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
  165. package/lib/cjs/tile/ElementGraphics.js.map +1 -1
  166. package/lib/cjs/tile/GltfTileIO.js.map +1 -1
  167. package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
  168. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  169. package/lib/cjs/tile/PntsTileIO.js.map +1 -1
  170. package/lib/cjs/tile/TileIO.js.map +1 -1
  171. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  172. package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
  173. package/lib/esm/AmbientOcclusion.js.map +1 -1
  174. package/lib/esm/AnalysisStyle.js.map +1 -1
  175. package/lib/esm/Atmosphere.js.map +1 -1
  176. package/lib/esm/AuthorizationClient.js.map +1 -1
  177. package/lib/esm/BackgroundMapProvider.js.map +1 -1
  178. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  179. package/lib/esm/Base64EncodedString.js.map +1 -1
  180. package/lib/esm/BlobReader.js.map +1 -1
  181. package/lib/esm/BriefcaseTypes.js.map +1 -1
  182. package/lib/esm/Camera.js.map +1 -1
  183. package/lib/esm/CatalogIModel.js.map +1 -1
  184. package/lib/esm/CesiumIonAssets.js.map +1 -1
  185. package/lib/esm/ChangedElements.js.map +1 -1
  186. package/lib/esm/ChangedEntities.js.map +1 -1
  187. package/lib/esm/ChangesetProps.js.map +1 -1
  188. package/lib/esm/ClipStyle.js.map +1 -1
  189. package/lib/esm/Code.js.map +1 -1
  190. package/lib/esm/ColorByName.js.map +1 -1
  191. package/lib/esm/ColorDef.js.map +1 -1
  192. package/lib/esm/CommonLoggerCategory.js.map +1 -1
  193. package/lib/esm/ConcurrentQuery.js.map +1 -1
  194. package/lib/esm/ContextRealityModel.js.map +1 -1
  195. package/lib/esm/ContourDisplay.js.map +1 -1
  196. package/lib/esm/DisplayStyleSettings.js.map +1 -1
  197. package/lib/esm/ECSchemaProps.js.map +1 -1
  198. package/lib/esm/ECSqlReader.js.map +1 -1
  199. package/lib/esm/ECSqlTypes.js.map +1 -1
  200. package/lib/esm/ElementMesh.js.map +1 -1
  201. package/lib/esm/ElementProps.js.map +1 -1
  202. package/lib/esm/EmphasizeElementsProps.js.map +1 -1
  203. package/lib/esm/EntityProps.js.map +1 -1
  204. package/lib/esm/EntityReference.js.map +1 -1
  205. package/lib/esm/Environment.js.map +1 -1
  206. package/lib/esm/FeatureIndex.js.map +1 -1
  207. package/lib/esm/FeatureSymbology.js.map +1 -1
  208. package/lib/esm/FeatureTable.js.map +1 -1
  209. package/lib/esm/Fonts.js.map +1 -1
  210. package/lib/esm/Frustum.js.map +1 -1
  211. package/lib/esm/GenericInstanceFilter.js.map +1 -1
  212. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  213. package/lib/esm/GeometryContainment.js.map +1 -1
  214. package/lib/esm/GeometryParams.js.map +1 -1
  215. package/lib/esm/GeometrySummary.js.map +1 -1
  216. package/lib/esm/Gradient.js.map +1 -1
  217. package/lib/esm/GraphicParams.js.map +1 -1
  218. package/lib/esm/GroundPlane.js.map +1 -1
  219. package/lib/esm/HSLColor.js.map +1 -1
  220. package/lib/esm/HSVColor.js.map +1 -1
  221. package/lib/esm/HiddenLine.js.map +1 -1
  222. package/lib/esm/Hilite.js.map +1 -1
  223. package/lib/esm/IModel.js.map +1 -1
  224. package/lib/esm/IModelError.js.map +1 -1
  225. package/lib/esm/IModelVersion.js.map +1 -1
  226. package/lib/esm/ITwinCoreErrors.js.map +1 -1
  227. package/lib/esm/Image.js.map +1 -1
  228. package/lib/esm/IpcAppProps.js.map +1 -1
  229. package/lib/esm/LightSettings.js.map +1 -1
  230. package/lib/esm/LinePixels.js.map +1 -1
  231. package/lib/esm/Localization.js.map +1 -1
  232. package/lib/esm/MapImagerySettings.js.map +1 -1
  233. package/lib/esm/MapLayerSettings.js.map +1 -1
  234. package/lib/esm/MassProperties.js.map +1 -1
  235. package/lib/esm/MaterialProps.js.map +1 -1
  236. package/lib/esm/ModelClipGroup.js.map +1 -1
  237. package/lib/esm/ModelGeometryChanges.js.map +1 -1
  238. package/lib/esm/ModelProps.js.map +1 -1
  239. package/lib/esm/NativeAppProps.js.map +1 -1
  240. package/lib/esm/OctEncodedNormal.js.map +1 -1
  241. package/lib/esm/PlanProjectionSettings.js.map +1 -1
  242. package/lib/esm/PlanarClipMask.js.map +1 -1
  243. package/lib/esm/QPoint.js.map +1 -1
  244. package/lib/esm/RealityDataAccessProps.js.map +1 -1
  245. package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
  246. package/lib/esm/RenderMaterial.js.map +1 -1
  247. package/lib/esm/RenderPolyline.js.map +1 -1
  248. package/lib/esm/RenderTexture.js.map +1 -1
  249. package/lib/esm/RgbColor.js.map +1 -1
  250. package/lib/esm/RpcInterface.js.map +1 -1
  251. package/lib/esm/RpcManager.js.map +1 -1
  252. package/lib/esm/SessionProps.js.map +1 -1
  253. package/lib/esm/SkyBox.js.map +1 -1
  254. package/lib/esm/SolarCalculate.js.map +1 -1
  255. package/lib/esm/SolarShadows.js.map +1 -1
  256. package/lib/esm/SpatialClassification.js.map +1 -1
  257. package/lib/esm/SubCategoryAppearance.js.map +1 -1
  258. package/lib/esm/SubCategoryOverride.js.map +1 -1
  259. package/lib/esm/TerrainSettings.js.map +1 -1
  260. package/lib/esm/TextureMapping.js.map +1 -1
  261. package/lib/esm/TextureProps.js.map +1 -1
  262. package/lib/esm/ThematicDisplay.js.map +1 -1
  263. package/lib/esm/Thumbnail.js.map +1 -1
  264. package/lib/esm/TileProps.js.map +1 -1
  265. package/lib/esm/Tween.js.map +1 -1
  266. package/lib/esm/TxnAction.js.map +1 -1
  267. package/lib/esm/ViewDetails.js.map +1 -1
  268. package/lib/esm/ViewFlags.js.map +1 -1
  269. package/lib/esm/ViewProps.js.map +1 -1
  270. package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
  271. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  272. package/lib/esm/annotation/TextBlock.js.map +1 -1
  273. package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
  274. package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
  275. package/lib/esm/annotation/TextField.js.map +1 -1
  276. package/lib/esm/annotation/TextStyle.js.map +1 -1
  277. package/lib/esm/core-common.js.map +1 -1
  278. package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
  279. package/lib/esm/domains/GenericElementProps.js.map +1 -1
  280. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  281. package/lib/esm/geometry/AreaPattern.js.map +1 -1
  282. package/lib/esm/geometry/BoundingSphere.js.map +1 -1
  283. package/lib/esm/geometry/Cartographic.js.map +1 -1
  284. package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
  285. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  286. package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
  287. package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
  288. package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
  289. package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
  290. package/lib/esm/geometry/GeometryStream.js.map +1 -1
  291. package/lib/esm/geometry/ImageGraphic.js.map +1 -1
  292. package/lib/esm/geometry/LineStyle.js.map +1 -1
  293. package/lib/esm/geometry/Placement.js.map +1 -1
  294. package/lib/esm/geometry/Projection.js.map +1 -1
  295. package/lib/esm/geometry/TextString.js.map +1 -1
  296. package/lib/esm/internal/BackendTypes.js.map +1 -1
  297. package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
  298. package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
  299. package/lib/esm/internal/RenderMesh.js.map +1 -1
  300. package/lib/esm/internal/RenderTextureParams.js.map +1 -1
  301. package/lib/esm/internal/Snapping.js.map +1 -1
  302. package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -1
  303. package/lib/esm/internal/cross-package.js.map +1 -1
  304. package/lib/esm/ipc/IpcSession.js.map +1 -1
  305. package/lib/esm/ipc/IpcSocket.js.map +1 -1
  306. package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
  307. package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
  308. package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
  309. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  310. package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
  311. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  312. package/lib/esm/rpc/TestRpcManager.js.map +1 -1
  313. package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
  314. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  315. package/lib/esm/rpc/core/RpcControl.js.map +1 -1
  316. package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
  317. package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
  318. package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
  319. package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
  320. package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
  321. package/lib/esm/rpc/core/RpcPush.js.map +1 -1
  322. package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
  323. package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
  324. package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
  325. package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
  326. package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
  327. package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
  328. package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
  329. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  330. package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
  331. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  332. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  333. package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
  334. package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
  335. package/lib/esm/tile/B3dmTileIO.js.map +1 -1
  336. package/lib/esm/tile/CompositeTileIO.js.map +1 -1
  337. package/lib/esm/tile/ElementGraphics.js.map +1 -1
  338. package/lib/esm/tile/GltfTileIO.js.map +1 -1
  339. package/lib/esm/tile/I3dmTileIO.js.map +1 -1
  340. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  341. package/lib/esm/tile/PntsTileIO.js.map +1 -1
  342. package/lib/esm/tile/TileIO.js.map +1 -1
  343. package/lib/esm/tile/TileMetadata.js.map +1 -1
  344. package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
  345. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"TextString.js","sourceRoot":"","sources":["../../../src/geometry/TextString.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAAuI;AAuCvI;;;;GAIG;AACH,MAAa,UAAU;IACrB,kBAAkB;IACX,IAAI,CAAS;IACpB,6FAA6F;IACtF,IAAI,CAAS;IACpB,4BAA4B;IACrB,MAAM,CAAS;IACtB,2CAA2C;IACpC,WAAW,CAAU;IAC5B,kCAAkC;IAC3B,IAAI,CAAW;IACtB,oCAAoC;IAC7B,MAAM,CAAW;IACxB,uCAAuC;IAChC,SAAS,CAAW;IAC3B,+CAA+C;IAC/B,MAAM,CAAU;IAChC,+CAA+C;IAC/B,QAAQ,CAAqB;IAC7C,IAAW,KAAK,KAAK,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAExF,YAAmB,KAAsB;QACvC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MA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C,UAAU,EAAE,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;QACnF,MAAM,MAAM,GAAG,IAAI,wBAAQ,EAAE,CAAC;QAC9B,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,uBAAuB,CAAC,MAAM,CAAC;YACtD,OAAO,KAAK,CAAC;QACf,MAAM,WAAW,GAAG,kCAAkB,CAAC,kBAAkB,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAC/E,IAAI,SAAS,KAAK,WAAW;YAC3B,OAAO,KAAK,CAAC;QACf,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;QACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC;QACvC,IAAI,SAAS,GAAG,OAAO,IAAI,QAAQ,GAAG,OAAO;YAC3C,OAAO,KAAK,CAAC;QACf,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC/B,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC;QACxB,IAAI,CAAC,WAAW,GAAG,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC;QACjF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA1ED,gCA0EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n\r\nimport { Point2d, Point3d, Range2d, Transform, Vector3d, XYZProps, YawPitchRollAngles, YawPitchRollProps } from \"@itwin/core-geometry\";\r\nimport { FontId } from \"../Fonts\";\r\n\r\n/**\r\n * Optional cached text layout information used to support legacy proxy graphics.\r\n * @beta\r\n */\r\nexport interface TextStringGlyphData {\r\n glyphIds: number[];\r\n glyphOrigins: Point2d[];\r\n range: Range2d;\r\n}\r\n\r\n/** Properties for a TextString class.\r\n * @see [[GeometryStreamEntryProps]]\r\n * @public\r\n * @extensions\r\n */\r\nexport interface TextStringProps {\r\n /** text string */\r\n text: string;\r\n /** FontId for the TextString. FontIds are mapped to font names and types via the FontMap */\r\n font: FontId;\r\n /* text height */\r\n height: number;\r\n /* width / height ratio. Default is 1.0 */\r\n widthFactor?: number;\r\n /** bold text. Default is false */\r\n bold?: boolean;\r\n /** italic text. Default is false */\r\n italic?: boolean;\r\n /** underline text. Default is false */\r\n underline?: boolean;\r\n /** Optional position relative to element's placement. Default is 0,0,0 */\r\n origin?: XYZProps;\r\n /** Optional rotation relative to element's placement. Default is identity matrix */\r\n rotation?: YawPitchRollProps;\r\n}\r\n\r\n/** A single line of text, all with the same font, styles (underline, bold, italic), and size.\r\n * This class also holds the origin and direction for the text.\r\n * A paragraph is composed of one or more instances of TextStrings.\r\n * @public\r\n */\r\nexport class TextString {\r\n /** Text string */\r\n public text: string;\r\n /** FontId for this TextString. FontIds are mapped to font names and types via the FontMap */\r\n public font: FontId;\r\n /* text height, in meters */\r\n public height: number;\r\n /* width / height ratio. Default is 1.0 */\r\n public widthFactor?: number;\r\n /** bold text. Default is false */\r\n public bold?: boolean;\r\n /** italic text. Default is false */\r\n public italic?: boolean;\r\n /** underline text. Default is false */\r\n public underline?: boolean;\r\n /** position relative to element's placement */\r\n public readonly origin: Point3d;\r\n /** Rotation relative to element's placement */\r\n public readonly rotation: YawPitchRollAngles;\r\n public get width() { return this.height * (this.widthFactor ? this.widthFactor : 1.0); }\r\n\r\n public constructor(props: TextStringProps) {\r\n this.text = props.text;\r\n this.font = props.font;\r\n this.height = props.height;\r\n this.widthFactor = props.widthFactor;\r\n this.bold = props.bold;\r\n this.italic = props.italic;\r\n this.underline = props.underline;\r\n this.origin = Point3d.fromJSON(props.origin);\r\n this.rotation = YawPitchRollAngles.fromJSON(props.rotation);\r\n }\r\n\r\n public toJSON(): TextStringProps {\r\n const props: TextStringProps = {\r\n text: this.text,\r\n font: this.font,\r\n height: this.height,\r\n widthFactor: this.widthFactor,\r\n bold: this.bold,\r\n italic: this.italic,\r\n underline: this.underline,\r\n };\r\n\r\n if (!this.origin.isAlmostZero) {\r\n props.origin = this.origin.toJSON();\r\n }\r\n\r\n if (!this.rotation.isIdentity()) {\r\n props.rotation = this.rotation.toJSON();\r\n }\r\n\r\n return props;\r\n }\r\n\r\n public transformInPlace(transform: Transform): boolean {\r\n const newOrigin = transform.multiplyPoint3d(this.origin, this.origin);\r\n const newTransform = this.rotation.toMatrix3d().multiplyMatrixTransform(transform);\r\n const scales = new Vector3d();\r\n if (!newTransform.matrix.normalizeColumnsInPlace(scales))\r\n return false;\r\n const newRotation = YawPitchRollAngles.createFromMatrix3d(newTransform.matrix);\r\n if (undefined === newRotation)\r\n return false;\r\n const newHeight = this.height * scales.y;\r\n const newWidth = this.width * scales.x;\r\n if (newHeight < 1.0e-10 || newWidth < 1.0e-10)\r\n return false;\r\n this.origin.setFrom(newOrigin);\r\n this.rotation.setFrom(newRotation);\r\n this.height = newHeight;\r\n this.widthFactor = (newHeight === newWidth ? undefined : (newWidth / newHeight));\r\n return true;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"TextString.js","sourceRoot":"","sources":["../../../src/geometry/TextString.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAAuI;AAuCvI;;;;GAIG;AACH,MAAa,UAAU;IACrB,kBAAkB;IACX,IAAI,CAAS;IACpB,6FAA6F;IACtF,IAAI,CAAS;IACpB,4BAA4B;IACrB,MAAM,CAAS;IACtB,2CAA2C;IACpC,WAAW,CAAU;IAC5B,kCAAkC;IAC3B,IAAI,CAAW;IACtB,oCAAoC;IAC7B,MAAM,CAAW;IACxB,uCAAuC;IAChC,SAAS,CAAW;I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C,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC;QACjF,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA1ED,gCA0EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n\nimport { Point2d, Point3d, Range2d, Transform, Vector3d, XYZProps, YawPitchRollAngles, YawPitchRollProps } from \"@itwin/core-geometry\";\nimport { FontId } from \"../Fonts\";\n\n/**\n * Optional cached text layout information used to support legacy proxy graphics.\n * @beta\n */\nexport interface TextStringGlyphData {\n glyphIds: number[];\n glyphOrigins: Point2d[];\n range: Range2d;\n}\n\n/** Properties for a TextString class.\n * @see [[GeometryStreamEntryProps]]\n * @public\n * @extensions\n */\nexport interface TextStringProps {\n /** text string */\n text: string;\n /** FontId for the TextString. FontIds are mapped to font names and types via the FontMap */\n font: FontId;\n /* text height */\n height: number;\n /* width / height ratio. Default is 1.0 */\n widthFactor?: number;\n /** bold text. Default is false */\n bold?: boolean;\n /** italic text. Default is false */\n italic?: boolean;\n /** underline text. Default is false */\n underline?: boolean;\n /** Optional position relative to element's placement. Default is 0,0,0 */\n origin?: XYZProps;\n /** Optional rotation relative to element's placement. Default is identity matrix */\n rotation?: YawPitchRollProps;\n}\n\n/** A single line of text, all with the same font, styles (underline, bold, italic), and size.\n * This class also holds the origin and direction for the text.\n * A paragraph is composed of one or more instances of TextStrings.\n * @public\n */\nexport class TextString {\n /** Text string */\n public text: string;\n /** FontId for this TextString. FontIds are mapped to font names and types via the FontMap */\n public font: FontId;\n /* text height, in meters */\n public height: number;\n /* width / height ratio. Default is 1.0 */\n public widthFactor?: number;\n /** bold text. Default is false */\n public bold?: boolean;\n /** italic text. Default is false */\n public italic?: boolean;\n /** underline text. Default is false */\n public underline?: boolean;\n /** position relative to element's placement */\n public readonly origin: Point3d;\n /** Rotation relative to element's placement */\n public readonly rotation: YawPitchRollAngles;\n public get width() { return this.height * (this.widthFactor ? this.widthFactor : 1.0); }\n\n public constructor(props: TextStringProps) {\n this.text = props.text;\n this.font = props.font;\n this.height = props.height;\n this.widthFactor = props.widthFactor;\n this.bold = props.bold;\n this.italic = props.italic;\n this.underline = props.underline;\n this.origin = Point3d.fromJSON(props.origin);\n this.rotation = YawPitchRollAngles.fromJSON(props.rotation);\n }\n\n public toJSON(): TextStringProps {\n const props: TextStringProps = {\n text: this.text,\n font: this.font,\n height: this.height,\n widthFactor: this.widthFactor,\n bold: this.bold,\n italic: this.italic,\n underline: this.underline,\n };\n\n if (!this.origin.isAlmostZero) {\n props.origin = this.origin.toJSON();\n }\n\n if (!this.rotation.isIdentity()) {\n props.rotation = this.rotation.toJSON();\n }\n\n return props;\n }\n\n public transformInPlace(transform: Transform): boolean {\n const newOrigin = transform.multiplyPoint3d(this.origin, this.origin);\n const newTransform = this.rotation.toMatrix3d().multiplyMatrixTransform(transform);\n const scales = new Vector3d();\n if (!newTransform.matrix.normalizeColumnsInPlace(scales))\n return false;\n const newRotation = YawPitchRollAngles.createFromMatrix3d(newTransform.matrix);\n if (undefined === newRotation)\n return false;\n const newHeight = this.height * scales.y;\n const newWidth = this.width * scales.x;\n if (newHeight < 1.0e-10 || newWidth < 1.0e-10)\n return false;\n this.origin.setFrom(newOrigin);\n this.rotation.setFrom(newRotation);\n this.height = newHeight;\n this.widthFactor = (newHeight === newWidth ? undefined : (newWidth / newHeight));\n return true;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BackendTypes.js","sourceRoot":"","sources":["../../../src/internal/BackendTypes.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utils\r\n */\r\n\r\nimport type { Readable, Writable } from \"stream\"; // Must be \"import type\" to avoid webpack polyfill errors\r\nimport type { Buffer } from \"buffer\"; // Must be \"import type\" to avoid webpack polyfill errors\r\n\r\n/*\r\nIMPORTANT:\r\nThis is a temporary source file for backwards compatibility only.\r\nDo not add any new types to this file.\r\nAll types here will be removed in 4.0\r\n*/\r\n\r\n/** BackendReadable and BackendWritable are not tagged internal for deprecated public RPC APIs which reference these types. */\r\n/** @public @deprecated in 3.4.5 - might be removed in next major version. This type was mistakenly made public in the common scope. */\r\nexport type BackendReadable = Readable;\r\n\r\n/** @public @deprecated in 3.4.5 - might be removed in next major version. This type was mistakenly made public in the common scope. */\r\nexport type BackendWritable = Writable;\r\n\r\n/** @internal @deprecated in 3.4.5 - might be removed in next major version. This type was mistakenly made public in the common scope. */\r\nexport type BackendBuffer = Buffer;\r\n"]}
1
+ {"version":3,"file":"BackendTypes.js","sourceRoot":"","sources":["../../../src/internal/BackendTypes.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Utils\n */\n\nimport type { Readable, Writable } from \"stream\"; // Must be \"import type\" to avoid webpack polyfill errors\nimport type { Buffer } from \"buffer\"; // Must be \"import type\" to avoid webpack polyfill errors\n\n/*\nIMPORTANT:\nThis is a temporary source file for backwards compatibility only.\nDo not add any new types to this file.\nAll types here will be removed in 4.0\n*/\n\n/** BackendReadable and BackendWritable are not tagged internal for deprecated public RPC APIs which reference these types. */\n/** @public @deprecated in 3.4.5 - might be removed in next major version. This type was mistakenly made public in the common scope. */\nexport type BackendReadable = Readable;\n\n/** @public @deprecated in 3.4.5 - might be removed in next major version. This type was mistakenly made public in the common scope. */\nexport type BackendWritable = Writable;\n\n/** @internal @deprecated in 3.4.5 - might be removed in next major version. This type was mistakenly made public in the common scope. */\nexport type BackendBuffer = Buffer;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"PackedFeatureTable.js","sourceRoot":"","sources":["../../../src/internal/PackedFeatureTable.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAwYH,kDASC;AA/YD,sDAE6B;AAC7B,kDAA2J;AAC3J,sDAAkD;AAElD;;;;GAIG;AACH,MAAa,kBAAkB;IACb,IAAI,CAAc;IAClB,YAAY,CAAa;IACzB,gBAAgB,CAAkB;IAClC,WAAW,CAAS;IACpB,UAAU,CAAU;IACpB,IAAI,CAAY;IACzB,gBAAgB,CAAa;IAEpC,IAAW,UAAU,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IAEhE;;;OAGG;IACH,YAAmB,IAAiB,EAAE,OAAmB,EAAE,WAAmB,EAAE,IAAe,EAAE,gBAA4B;QAC3H,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;QAC5B,IAAI,CAAC,gBAAgB,GAAG,mBAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACpD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QAEzC,QAAQ,IAAI,CAAC,WAAW,EAAE,CAAC;YACzB,KAAK,CAAC;gBACJ,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;gBACxB,MAAM;YACR,KAAK,CAAC;gBACJ,IAAI,CAAC,UAAU,GAAG,2BAAY,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,2BAAY,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;gBACpF,MAAM;YACR;gBACE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;gBACvB,MAAM;QACV,C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,KAAyB,EAAE,aAA4B,EAAE,SAAiB;IAC1G,IAAA,qBAAM,EAAC,SAAS,GAAG,CAAC,CAAC,CAAC;IAEtB,IAAI,OAAO,CAAC;IACZ,MAAM,aAAa,GAAG,4BAAa,CAAC,eAAe,EAAE,CAAC;IACtD,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;QACpD,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;QACtC,IAAA,qBAAM,EAAC,MAAM,IAAI,SAAS,CAAC,CAAC;QAC5B,IAAI,CAAC,KAAK,MAAM,EAAE,CAAC;YACjB,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC;gBAC/B,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;YAC7H,CAAC;YAED,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC;QAClC,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport {\r\n assert, expectDefined, Id64, Id64String, UintArray,\r\n} from \"@itwin/core-bentley\";\r\nimport { BatchType, ComputeNodeId, Feature, FeatureTable, ModelFeature, PackedFeature, PackedFeatureWithIndex, RenderFeatureTable } from \"../FeatureTable\";\r\nimport { GeometryClass } from \"../GeometryParams\";\r\n\r\n/**\r\n * An immutable, packed representation of a [[FeatureTable]]. The features are packed into a single array of 32-bit integer values,\r\n * wherein each feature occupies 3 32-bit integers.\r\n * @internal\r\n */\r\nexport class PackedFeatureTable implements RenderFeatureTable {\r\n public readonly data: Uint32Array;\r\n public readonly batchModelId: Id64String;\r\n public readonly batchModelIdPair: Id64.Uint32Pair;\r\n public readonly numFeatures: number;\r\n public readonly anyDefined: boolean;\r\n public readonly type: BatchType;\r\n public animationNodeIds?: UintArray;\r\n\r\n public get byteLength(): number { return this.data.byteLength; }\r\n\r\n /** Construct a PackedFeatureTable from the packed binary data.\r\n * This is used internally when deserializing Tiles in iMdl format.\r\n * @internal\r\n */\r\n public constructor(data: Uint32Array, modelId: Id64String, numFeatures: number, type: BatchType, animationNodeIds?: UintArray) {\r\n this.data = data;\r\n this.batchModelId = modelId;\r\n this.batchModelIdPair = Id64.getUint32Pair(modelId);\r\n this.numFeatures = numFeatures;\r\n this.type = type;\r\n this.animationNodeIds = animationNodeIds;\r\n\r\n switch (this.numFeatures) {\r\n case 0:\r\n this.anyDefined = false;\r\n break;\r\n case 1:\r\n this.anyDefined = ModelFeature.isDefined(this.getFeature(0, ModelFeature.create()));\r\n break;\r\n default:\r\n this.anyDefined = true;\r\n break;\r\n }\r\n\r\n assert(this.data.length >= this._subCategoriesOffset);\r\n assert(undefined === this.animationNodeIds || this.animationNodeIds.length === this.numFeatures);\r\n }\r\n\r\n /** Create a packed feature table from a [[FeatureTable]]. */\r\n public static pack(featureTable: FeatureTable): PackedFeatureTable {\r\n // We must determine how many subcategories we have ahead of time to compute the size of the Uint32Array, as\r\n // the array cannot be resized after it is created.\r\n // We are not too worried about this as FeatureTables created on the front-end will contain few if any features; those obtained from the\r\n // back-end arrive within tiles already in the packed format.\r\n const subcategories = new Map<string, number>();\r\n for (const iv of featureTable.getArray()) {\r\n const found = subcategories.get(iv.value.subCategoryId.toString());\r\n if (undefined === found)\r\n subcategories.set(iv.value.subCategoryId, subcategories.size);\r\n }\r\n\r\n // We need 3 32-bit integers per feature, plus 2 32-bit integers per subcategory.\r\n const subCategoriesOffset = 3 * featureTable.length;\r\n const nUint32s = subCategoriesOffset + 2 * subcategories.size;\r\n const uint32s = new Uint32Array(nUint32s);\r\n\r\n for (const iv of featureTable.getArray()) {\r\n const feature = iv.value;\r\n const index = iv.index * 3;\r\n\r\n let subCategoryIndex = expectDefined(subcategories.get(feature.subCategoryId));\r\n assert(undefined !== subCategoryIndex); // we inserted it above...\r\n subCategoryIndex |= (feature.geometryClass << 24);\r\n\r\n uint32s[index + 0] = Id64.getLowerUint32(feature.elementId);\r\n uint32s[index + 1] = Id64.getUpperUint32(feature.elementId);\r\n uint32s[index + 2] = subCategoryIndex;\r\n }\r\n\r\n subcategories.forEach((index: number, id: string, _map) => {\r\n const index32 = subCategoriesOffset + 2 * index;\r\n uint32s[index32 + 0] = Id64.getLowerUint32(id);\r\n uint32s[index32 + 1] = Id64.getUpperUint32(id);\r\n });\r\n\r\n return new PackedFeatureTable(uint32s, featureTable.modelId, featureTable.length, featureTable.type);\r\n }\r\n\r\n /** Retrieve the Feature associated with the specified index. */\r\n public getFeature(featureIndex: number, result: ModelFeature): ModelFeature {\r\n const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);\r\n return ModelFeature.unpack(packed, result, this.batchModelId);\r\n }\r\n\r\n /** Returns the Feature associated with the specified index, or undefined if the index is out of range. */\r\n public findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined {\r\n return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;\r\n }\r\n\r\n /** @internal */\r\n public getElementIdPair(featureIndex: number, out?: Id64.Uint32Pair): Id64.Uint32Pair {\r\n out = out ?? { lower: 0, upper: 0 };\r\n assert(featureIndex < this.numFeatures);\r\n const offset = 3 * featureIndex;\r\n out.lower = this.data[offset];\r\n out.upper = this.data[offset + 1];\r\n return out;\r\n }\r\n\r\n /** @internal */\r\n public getSubCategoryIdPair(featureIndex: number): Id64.Uint32Pair {\r\n const index = 3 * featureIndex;\r\n let subCatIndex = this.data[index + 2];\r\n subCatIndex = (subCatIndex & 0x00ffffff) >>> 0;\r\n subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;\r\n return { lower: this.data[subCatIndex], upper: this.data[subCatIndex + 1] };\r\n }\r\n\r\n /** @internal */\r\n public getAnimationNodeId(featureIndex: number): number {\r\n return undefined !== this.animationNodeIds && featureIndex < this.numFeatures ? this.animationNodeIds[featureIndex] : 0;\r\n }\r\n\r\n /** @internal */\r\n public getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature {\r\n assert(featureIndex < this.numFeatures);\r\n\r\n const index32 = 3 * featureIndex;\r\n result.elementId.lower = this.data[index32];\r\n result.elementId.upper = this.data[index32 + 1];\r\n\r\n const subCatIndexAndClass = this.data[index32 + 2];\r\n result.geometryClass = (subCatIndexAndClass >>> 24) & 0xff;\r\n\r\n let subCatIndex = (subCatIndexAndClass & 0x00ffffff) >>> 0;\r\n subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;\r\n result.subCategoryId.lower = this.data[subCatIndex];\r\n result.subCategoryId.upper = this.data[subCatIndex + 1];\r\n\r\n result.animationNodeId = this.getAnimationNodeId(featureIndex);\r\n result.modelId.lower = this.batchModelIdPair.lower;\r\n result.modelId.upper = this.batchModelIdPair.upper;\r\n\r\n return result;\r\n }\r\n\r\n public getModelIdPair(_featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\r\n out.lower = this.batchModelIdPair.lower;\r\n out.upper = this.batchModelIdPair.upper;\r\n return out;\r\n }\r\n\r\n /** Returns the element ID of the Feature associated with the specified index, or undefined if the index is out of range. */\r\n public findElementId(featureIndex: number): Id64String | undefined {\r\n if (featureIndex >= this.numFeatures)\r\n return undefined;\r\n else\r\n return this.readId(3 * featureIndex);\r\n }\r\n\r\n /** Return true if this table contains exactly 1 feature. */\r\n public get isUniform(): boolean { return 1 === this.numFeatures; }\r\n\r\n /** If this table contains exactly 1 feature, return it. */\r\n public getUniform(result: ModelFeature): ModelFeature | undefined {\r\n return this.isUniform ? this.getFeature(0, result) : undefined;\r\n }\r\n\r\n public get isVolumeClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\r\n public get isPlanarClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\r\n public get isClassifier(): boolean { return this.isVolumeClassifier || this.isPlanarClassifier; }\r\n\r\n /** Unpack the features into a [[FeatureTable]]. */\r\n public unpack(): FeatureTable {\r\n const table = new FeatureTable(this.numFeatures, this.batchModelId);\r\n const feature = ModelFeature.create();\r\n for (let i = 0; i < this.numFeatures; i++) {\r\n this.getFeature(i, feature);\r\n table.insertWithIndex(new Feature(feature.elementId, feature.subCategoryId, feature.geometryClass), i);\r\n }\r\n\r\n return table;\r\n }\r\n\r\n public populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void {\r\n assert(undefined === this.animationNodeIds);\r\n this.animationNodeIds = populateAnimationNodeIds(this, computeNodeId, maxNodeId);\r\n }\r\n\r\n public * iterator(output: PackedFeatureWithIndex): Iterator<PackedFeatureWithIndex> {\r\n for (let i = 0; i < this.numFeatures; i++) {\r\n this.getPackedFeature(i, output);\r\n output.index = i;\r\n yield output;\r\n }\r\n }\r\n\r\n public iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex> {\r\n return {\r\n [Symbol.iterator]: () => this.iterator(output),\r\n };\r\n }\r\n\r\n private get _subCategoriesOffset(): number { return this.numFeatures * 3; }\r\n\r\n private readId(offset32: number): Id64String {\r\n return Id64.fromUint32Pair(this.data[offset32], this.data[offset32 + 1]);\r\n }\r\n}\r\n\r\ninterface PackedFeatureModelEntry {\r\n lastFeatureIndex: number;\r\n idLower: number;\r\n idUpper: number;\r\n}\r\n\r\nconst scratchPackedFeatureModelEntry = { lastFeatureIndex: -1, idLower: -1, idUpper: -1 };\r\n\r\n/** A table of model Ids associated with a [[MultiModelPackedFeatureTable]].\r\n * The feature indices in the packed feature table are grouped together by model, such that the first N features belong to model 1, the next M features to model 2, and so on.\r\n * The model table itself consists of one entry per model, where each entry looks like:\r\n * indexOfLastFeatureInModel: u32\r\n * modelId: u64\r\n * The modelId associated with a feature can therefore be derived by finding the entry in the model table with the highest indexOfLastFeatureInModel no greater than the feature index.\r\n * This lookup can be optimized using binary search.\r\n * Moreover, while iterating the feature table in sequence, the model table can be iterated in parallel so that no per-feature lookup of model Id is required.\r\n * @internal\r\n */\r\nexport class PackedFeatureModelTable {\r\n private readonly _data: Uint32Array;\r\n\r\n public constructor(data: Uint32Array) {\r\n this._data = data;\r\n assert(this._data.length % 3 === 0);\r\n }\r\n\r\n /** The number of models in the table. */\r\n public get length(): number {\r\n return this._data.length / 3;\r\n }\r\n\r\n public get byteLength(): number {\r\n return this._data.byteLength;\r\n }\r\n\r\n private getLastFeatureIndex(modelIndex: number): number {\r\n return this._data[modelIndex * 3];\r\n }\r\n\r\n public getEntry(modelIndex: number, result: PackedFeatureModelEntry): PackedFeatureModelEntry {\r\n if (modelIndex >= this.length) {\r\n result.idLower = result.idUpper = 0;\r\n result.lastFeatureIndex = Number.MAX_SAFE_INTEGER;\r\n return result;\r\n }\r\n\r\n const index = modelIndex * 3;\r\n result.lastFeatureIndex = this._data[index + 0];\r\n result.idLower = this._data[index + 1];\r\n result.idUpper = this._data[index + 2];\r\n return result;\r\n }\r\n\r\n /** Get the Id of the model associated with the specified feature, or an invalid Id if the feature is not associated with any model. */\r\n public getModelIdPair(featureIndex: number, result?: Id64.Uint32Pair): Id64.Uint32Pair {\r\n if (!result)\r\n result = { lower: 0, upper: 0 };\r\n else\r\n result.lower = result.upper = 0;\r\n\r\n let first = 0;\r\n const last = this.length;\r\n let count = last;\r\n while (count > 0) {\r\n const step = Math.floor(count / 2);\r\n const mid = first + step;\r\n const lastFeatureIndex = this.getLastFeatureIndex(mid);\r\n if (featureIndex > lastFeatureIndex) {\r\n first = mid + 1;\r\n count -= step + 1;\r\n } else {\r\n count = step;\r\n }\r\n }\r\n\r\n if (first < last) {\r\n result.lower = this._data[first * 3 + 1];\r\n result.upper = this._data[first * 3 + 2];\r\n }\r\n\r\n return result;\r\n }\r\n}\r\n\r\n/** A PackedFeatureTable with a PackedFeatureModelTable appended to it, capable of storing features belonging to more than one model.\r\n * @internal\r\n */\r\nexport class MultiModelPackedFeatureTable implements RenderFeatureTable {\r\n private readonly _features: PackedFeatureTable;\r\n private readonly _models: PackedFeatureModelTable;\r\n\r\n public constructor(features: PackedFeatureTable, models: PackedFeatureModelTable) {\r\n this._features = features;\r\n this._models = models;\r\n }\r\n\r\n public static create(data: Uint32Array, batchModelId: Id64String, numFeatures: number, type: BatchType, numSubCategories: number): MultiModelPackedFeatureTable {\r\n const modelTableOffset = 3 * numFeatures + 2 * numSubCategories;\r\n const featureData = data.subarray(0, modelTableOffset);\r\n const features = new PackedFeatureTable(featureData, batchModelId, numFeatures, type);\r\n\r\n const modelData = data.subarray(modelTableOffset);\r\n const models = new PackedFeatureModelTable(modelData);\r\n\r\n return new MultiModelPackedFeatureTable(features, models);\r\n }\r\n\r\n public get batchModelId() { return this._features.batchModelId; }\r\n public get batchModelIdPair() { return this._features.batchModelIdPair; }\r\n public get numFeatures() { return this._features.numFeatures; }\r\n public get type() { return this._features.type; }\r\n public get animationNodeIds(): UintArray | undefined { return this._features.animationNodeIds; }\r\n public set animationNodeIds(ids: UintArray | undefined) { this._features.animationNodeIds = ids; }\r\n\r\n public get byteLength() {\r\n return this._features.byteLength + this._models.byteLength;\r\n }\r\n\r\n public getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature {\r\n this._features.getPackedFeature(featureIndex, result);\r\n this._models.getModelIdPair(featureIndex, result.modelId);\r\n return result;\r\n }\r\n\r\n public getFeature(featureIndex: number, result: ModelFeature): ModelFeature {\r\n const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);\r\n return ModelFeature.unpack(packed, result);\r\n }\r\n\r\n public findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined {\r\n return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;\r\n }\r\n\r\n public getElementIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\r\n return this._features.getElementIdPair(featureIndex, out);\r\n }\r\n\r\n public getModelIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\r\n this._models.getModelIdPair(featureIndex, out);\r\n return out;\r\n }\r\n\r\n public findElementId(featureIndex: number): Id64String | undefined {\r\n return this._features.findElementId(featureIndex);\r\n }\r\n\r\n public * iterator(output: PackedFeatureWithIndex): Iterator<PackedFeatureWithIndex> {\r\n // Rather than perform a binary search on the model table to find each feature's model Id, traverse the model table in parallel with the feature table.\r\n let modelIndex = 0;\r\n const modelEntry = this._models.getEntry(modelIndex, scratchPackedFeatureModelEntry);\r\n\r\n for (let featureIndex = 0; featureIndex < this.numFeatures; featureIndex++) {\r\n if (featureIndex > modelEntry.lastFeatureIndex)\r\n this._models.getEntry(++modelIndex, modelEntry);\r\n\r\n this._features.getPackedFeature(featureIndex, output);\r\n output.modelId.lower = modelEntry.idLower;\r\n output.modelId.upper = modelEntry.idUpper;\r\n output.index = featureIndex;\r\n yield output;\r\n }\r\n }\r\n\r\n public iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex> {\r\n return {\r\n [Symbol.iterator]: () => this.iterator(output),\r\n };\r\n }\r\n\r\n public getAnimationNodeId(featureIndex: number): number {\r\n return this._features.getAnimationNodeId(featureIndex);\r\n }\r\n\r\n public populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void {\r\n this._features.animationNodeIds = populateAnimationNodeIds(this, computeNodeId, maxNodeId);\r\n }\r\n}\r\n\r\nexport function createPackedFeature(): PackedFeature {\r\n const pair = { upper: 0, lower: 0 };\r\n return {\r\n modelId: { ...pair },\r\n elementId: { ...pair },\r\n subCategoryId: { ...pair },\r\n geometryClass: GeometryClass.Primary,\r\n animationNodeId: 0,\r\n };\r\n}\r\n\r\nconst scratchPackedFeature = createPackedFeature();\r\n\r\nfunction populateAnimationNodeIds(table: RenderFeatureTable, computeNodeId: ComputeNodeId, maxNodeId: number): UintArray | undefined {\r\n assert(maxNodeId > 0);\r\n\r\n let nodeIds;\r\n const outputFeature = PackedFeature.createWithIndex();\r\n for (const feature of table.iterable(outputFeature)) {\r\n const nodeId = computeNodeId(feature);\r\n assert(nodeId <= maxNodeId);\r\n if (0 !== nodeId) {\r\n if (!nodeIds) {\r\n const size = table.numFeatures;\r\n nodeIds = maxNodeId < 0x100 ? new Uint8Array(size) : (maxNodeId < 0x10000 ? new Uint16Array(size) : new Uint32Array(size));\r\n }\r\n\r\n nodeIds[feature.index] = nodeId;\r\n }\r\n }\r\n\r\n return nodeIds;\r\n}\r\n\r\n"]}
1
+ {"version":3,"file":"PackedFeatureTable.js","sourceRoot":"","sources":["../../../src/internal/PackedFeatureTable.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAwYH,kDASC;AA/YD,sDAE6B;AAC7B,kDAA2J;AAC3J,sDAAkD;AAElD;;;;GAIG;AACH,MAAa,kBAAkB;IACb,IAAI,CAAc;IAClB,YAAY,CAAa;IACzB,gBAAgB,CAAkB;IAClC,WAAW,CAAS;IACpB,UAAU,CAAU;IACpB,IAAI,CAAY;IACzB,gBAAgB,CAAa;IAEpC,IAAW,UAAU,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;IAEhE;;;OAGG;IACH,YAAmB,IAAiB,EAAE,OAAmB,EAAE,WAAmB,EAAE,IAAe,EAAE,gBAA4B;QAC3H,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;QAC5B,IAAI,CAAC,gBAAgB,GAAG,mBAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACpD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,gBAAgB,GAAG,gBA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------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport {\n assert, expectDefined, Id64, Id64String, UintArray,\n} from \"@itwin/core-bentley\";\nimport { BatchType, ComputeNodeId, Feature, FeatureTable, ModelFeature, PackedFeature, PackedFeatureWithIndex, RenderFeatureTable } from \"../FeatureTable\";\nimport { GeometryClass } from \"../GeometryParams\";\n\n/**\n * An immutable, packed representation of a [[FeatureTable]]. The features are packed into a single array of 32-bit integer values,\n * wherein each feature occupies 3 32-bit integers.\n * @internal\n */\nexport class PackedFeatureTable implements RenderFeatureTable {\n public readonly data: Uint32Array;\n public readonly batchModelId: Id64String;\n public readonly batchModelIdPair: Id64.Uint32Pair;\n public readonly numFeatures: number;\n public readonly anyDefined: boolean;\n public readonly type: BatchType;\n public animationNodeIds?: UintArray;\n\n public get byteLength(): number { return this.data.byteLength; }\n\n /** Construct a PackedFeatureTable from the packed binary data.\n * This is used internally when deserializing Tiles in iMdl format.\n * @internal\n */\n public constructor(data: Uint32Array, modelId: Id64String, numFeatures: number, type: BatchType, animationNodeIds?: UintArray) {\n this.data = data;\n this.batchModelId = modelId;\n this.batchModelIdPair = Id64.getUint32Pair(modelId);\n this.numFeatures = numFeatures;\n this.type = type;\n this.animationNodeIds = animationNodeIds;\n\n switch (this.numFeatures) {\n case 0:\n this.anyDefined = false;\n break;\n case 1:\n this.anyDefined = ModelFeature.isDefined(this.getFeature(0, ModelFeature.create()));\n break;\n default:\n this.anyDefined = true;\n break;\n }\n\n assert(this.data.length >= this._subCategoriesOffset);\n assert(undefined === this.animationNodeIds || this.animationNodeIds.length === this.numFeatures);\n }\n\n /** Create a packed feature table from a [[FeatureTable]]. */\n public static pack(featureTable: FeatureTable): PackedFeatureTable {\n // We must determine how many subcategories we have ahead of time to compute the size of the Uint32Array, as\n // the array cannot be resized after it is created.\n // We are not too worried about this as FeatureTables created on the front-end will contain few if any features; those obtained from the\n // back-end arrive within tiles already in the packed format.\n const subcategories = new Map<string, number>();\n for (const iv of featureTable.getArray()) {\n const found = subcategories.get(iv.value.subCategoryId.toString());\n if (undefined === found)\n subcategories.set(iv.value.subCategoryId, subcategories.size);\n }\n\n // We need 3 32-bit integers per feature, plus 2 32-bit integers per subcategory.\n const subCategoriesOffset = 3 * featureTable.length;\n const nUint32s = subCategoriesOffset + 2 * subcategories.size;\n const uint32s = new Uint32Array(nUint32s);\n\n for (const iv of featureTable.getArray()) {\n const feature = iv.value;\n const index = iv.index * 3;\n\n let subCategoryIndex = expectDefined(subcategories.get(feature.subCategoryId));\n assert(undefined !== subCategoryIndex); // we inserted it above...\n subCategoryIndex |= (feature.geometryClass << 24);\n\n uint32s[index + 0] = Id64.getLowerUint32(feature.elementId);\n uint32s[index + 1] = Id64.getUpperUint32(feature.elementId);\n uint32s[index + 2] = subCategoryIndex;\n }\n\n subcategories.forEach((index: number, id: string, _map) => {\n const index32 = subCategoriesOffset + 2 * index;\n uint32s[index32 + 0] = Id64.getLowerUint32(id);\n uint32s[index32 + 1] = Id64.getUpperUint32(id);\n });\n\n return new PackedFeatureTable(uint32s, featureTable.modelId, featureTable.length, featureTable.type);\n }\n\n /** Retrieve the Feature associated with the specified index. */\n public getFeature(featureIndex: number, result: ModelFeature): ModelFeature {\n const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);\n return ModelFeature.unpack(packed, result, this.batchModelId);\n }\n\n /** Returns the Feature associated with the specified index, or undefined if the index is out of range. */\n public findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined {\n return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;\n }\n\n /** @internal */\n public getElementIdPair(featureIndex: number, out?: Id64.Uint32Pair): Id64.Uint32Pair {\n out = out ?? { lower: 0, upper: 0 };\n assert(featureIndex < this.numFeatures);\n const offset = 3 * featureIndex;\n out.lower = this.data[offset];\n out.upper = this.data[offset + 1];\n return out;\n }\n\n /** @internal */\n public getSubCategoryIdPair(featureIndex: number): Id64.Uint32Pair {\n const index = 3 * featureIndex;\n let subCatIndex = this.data[index + 2];\n subCatIndex = (subCatIndex & 0x00ffffff) >>> 0;\n subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;\n return { lower: this.data[subCatIndex], upper: this.data[subCatIndex + 1] };\n }\n\n /** @internal */\n public getAnimationNodeId(featureIndex: number): number {\n return undefined !== this.animationNodeIds && featureIndex < this.numFeatures ? this.animationNodeIds[featureIndex] : 0;\n }\n\n /** @internal */\n public getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature {\n assert(featureIndex < this.numFeatures);\n\n const index32 = 3 * featureIndex;\n result.elementId.lower = this.data[index32];\n result.elementId.upper = this.data[index32 + 1];\n\n const subCatIndexAndClass = this.data[index32 + 2];\n result.geometryClass = (subCatIndexAndClass >>> 24) & 0xff;\n\n let subCatIndex = (subCatIndexAndClass & 0x00ffffff) >>> 0;\n subCatIndex = subCatIndex * 2 + this._subCategoriesOffset;\n result.subCategoryId.lower = this.data[subCatIndex];\n result.subCategoryId.upper = this.data[subCatIndex + 1];\n\n result.animationNodeId = this.getAnimationNodeId(featureIndex);\n result.modelId.lower = this.batchModelIdPair.lower;\n result.modelId.upper = this.batchModelIdPair.upper;\n\n return result;\n }\n\n public getModelIdPair(_featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\n out.lower = this.batchModelIdPair.lower;\n out.upper = this.batchModelIdPair.upper;\n return out;\n }\n\n /** Returns the element ID of the Feature associated with the specified index, or undefined if the index is out of range. */\n public findElementId(featureIndex: number): Id64String | undefined {\n if (featureIndex >= this.numFeatures)\n return undefined;\n else\n return this.readId(3 * featureIndex);\n }\n\n /** Return true if this table contains exactly 1 feature. */\n public get isUniform(): boolean { return 1 === this.numFeatures; }\n\n /** If this table contains exactly 1 feature, return it. */\n public getUniform(result: ModelFeature): ModelFeature | undefined {\n return this.isUniform ? this.getFeature(0, result) : undefined;\n }\n\n public get isVolumeClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\n public get isPlanarClassifier(): boolean { return BatchType.VolumeClassifier === this.type; }\n public get isClassifier(): boolean { return this.isVolumeClassifier || this.isPlanarClassifier; }\n\n /** Unpack the features into a [[FeatureTable]]. */\n public unpack(): FeatureTable {\n const table = new FeatureTable(this.numFeatures, this.batchModelId);\n const feature = ModelFeature.create();\n for (let i = 0; i < this.numFeatures; i++) {\n this.getFeature(i, feature);\n table.insertWithIndex(new Feature(feature.elementId, feature.subCategoryId, feature.geometryClass), i);\n }\n\n return table;\n }\n\n public populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void {\n assert(undefined === this.animationNodeIds);\n this.animationNodeIds = populateAnimationNodeIds(this, computeNodeId, maxNodeId);\n }\n\n public * iterator(output: PackedFeatureWithIndex): Iterator<PackedFeatureWithIndex> {\n for (let i = 0; i < this.numFeatures; i++) {\n this.getPackedFeature(i, output);\n output.index = i;\n yield output;\n }\n }\n\n public iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex> {\n return {\n [Symbol.iterator]: () => this.iterator(output),\n };\n }\n\n private get _subCategoriesOffset(): number { return this.numFeatures * 3; }\n\n private readId(offset32: number): Id64String {\n return Id64.fromUint32Pair(this.data[offset32], this.data[offset32 + 1]);\n }\n}\n\ninterface PackedFeatureModelEntry {\n lastFeatureIndex: number;\n idLower: number;\n idUpper: number;\n}\n\nconst scratchPackedFeatureModelEntry = { lastFeatureIndex: -1, idLower: -1, idUpper: -1 };\n\n/** A table of model Ids associated with a [[MultiModelPackedFeatureTable]].\n * The feature indices in the packed feature table are grouped together by model, such that the first N features belong to model 1, the next M features to model 2, and so on.\n * The model table itself consists of one entry per model, where each entry looks like:\n * indexOfLastFeatureInModel: u32\n * modelId: u64\n * The modelId associated with a feature can therefore be derived by finding the entry in the model table with the highest indexOfLastFeatureInModel no greater than the feature index.\n * This lookup can be optimized using binary search.\n * Moreover, while iterating the feature table in sequence, the model table can be iterated in parallel so that no per-feature lookup of model Id is required.\n * @internal\n */\nexport class PackedFeatureModelTable {\n private readonly _data: Uint32Array;\n\n public constructor(data: Uint32Array) {\n this._data = data;\n assert(this._data.length % 3 === 0);\n }\n\n /** The number of models in the table. */\n public get length(): number {\n return this._data.length / 3;\n }\n\n public get byteLength(): number {\n return this._data.byteLength;\n }\n\n private getLastFeatureIndex(modelIndex: number): number {\n return this._data[modelIndex * 3];\n }\n\n public getEntry(modelIndex: number, result: PackedFeatureModelEntry): PackedFeatureModelEntry {\n if (modelIndex >= this.length) {\n result.idLower = result.idUpper = 0;\n result.lastFeatureIndex = Number.MAX_SAFE_INTEGER;\n return result;\n }\n\n const index = modelIndex * 3;\n result.lastFeatureIndex = this._data[index + 0];\n result.idLower = this._data[index + 1];\n result.idUpper = this._data[index + 2];\n return result;\n }\n\n /** Get the Id of the model associated with the specified feature, or an invalid Id if the feature is not associated with any model. */\n public getModelIdPair(featureIndex: number, result?: Id64.Uint32Pair): Id64.Uint32Pair {\n if (!result)\n result = { lower: 0, upper: 0 };\n else\n result.lower = result.upper = 0;\n\n let first = 0;\n const last = this.length;\n let count = last;\n while (count > 0) {\n const step = Math.floor(count / 2);\n const mid = first + step;\n const lastFeatureIndex = this.getLastFeatureIndex(mid);\n if (featureIndex > lastFeatureIndex) {\n first = mid + 1;\n count -= step + 1;\n } else {\n count = step;\n }\n }\n\n if (first < last) {\n result.lower = this._data[first * 3 + 1];\n result.upper = this._data[first * 3 + 2];\n }\n\n return result;\n }\n}\n\n/** A PackedFeatureTable with a PackedFeatureModelTable appended to it, capable of storing features belonging to more than one model.\n * @internal\n */\nexport class MultiModelPackedFeatureTable implements RenderFeatureTable {\n private readonly _features: PackedFeatureTable;\n private readonly _models: PackedFeatureModelTable;\n\n public constructor(features: PackedFeatureTable, models: PackedFeatureModelTable) {\n this._features = features;\n this._models = models;\n }\n\n public static create(data: Uint32Array, batchModelId: Id64String, numFeatures: number, type: BatchType, numSubCategories: number): MultiModelPackedFeatureTable {\n const modelTableOffset = 3 * numFeatures + 2 * numSubCategories;\n const featureData = data.subarray(0, modelTableOffset);\n const features = new PackedFeatureTable(featureData, batchModelId, numFeatures, type);\n\n const modelData = data.subarray(modelTableOffset);\n const models = new PackedFeatureModelTable(modelData);\n\n return new MultiModelPackedFeatureTable(features, models);\n }\n\n public get batchModelId() { return this._features.batchModelId; }\n public get batchModelIdPair() { return this._features.batchModelIdPair; }\n public get numFeatures() { return this._features.numFeatures; }\n public get type() { return this._features.type; }\n public get animationNodeIds(): UintArray | undefined { return this._features.animationNodeIds; }\n public set animationNodeIds(ids: UintArray | undefined) { this._features.animationNodeIds = ids; }\n\n public get byteLength() {\n return this._features.byteLength + this._models.byteLength;\n }\n\n public getPackedFeature(featureIndex: number, result: PackedFeature): PackedFeature {\n this._features.getPackedFeature(featureIndex, result);\n this._models.getModelIdPair(featureIndex, result.modelId);\n return result;\n }\n\n public getFeature(featureIndex: number, result: ModelFeature): ModelFeature {\n const packed = this.getPackedFeature(featureIndex, scratchPackedFeature);\n return ModelFeature.unpack(packed, result);\n }\n\n public findFeature(featureIndex: number, result: ModelFeature): ModelFeature | undefined {\n return featureIndex < this.numFeatures ? this.getFeature(featureIndex, result) : undefined;\n }\n\n public getElementIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\n return this._features.getElementIdPair(featureIndex, out);\n }\n\n public getModelIdPair(featureIndex: number, out: Id64.Uint32Pair): Id64.Uint32Pair {\n this._models.getModelIdPair(featureIndex, out);\n return out;\n }\n\n public findElementId(featureIndex: number): Id64String | undefined {\n return this._features.findElementId(featureIndex);\n }\n\n public * iterator(output: PackedFeatureWithIndex): Iterator<PackedFeatureWithIndex> {\n // Rather than perform a binary search on the model table to find each feature's model Id, traverse the model table in parallel with the feature table.\n let modelIndex = 0;\n const modelEntry = this._models.getEntry(modelIndex, scratchPackedFeatureModelEntry);\n\n for (let featureIndex = 0; featureIndex < this.numFeatures; featureIndex++) {\n if (featureIndex > modelEntry.lastFeatureIndex)\n this._models.getEntry(++modelIndex, modelEntry);\n\n this._features.getPackedFeature(featureIndex, output);\n output.modelId.lower = modelEntry.idLower;\n output.modelId.upper = modelEntry.idUpper;\n output.index = featureIndex;\n yield output;\n }\n }\n\n public iterable(output: PackedFeatureWithIndex): Iterable<PackedFeatureWithIndex> {\n return {\n [Symbol.iterator]: () => this.iterator(output),\n };\n }\n\n public getAnimationNodeId(featureIndex: number): number {\n return this._features.getAnimationNodeId(featureIndex);\n }\n\n public populateAnimationNodeIds(computeNodeId: ComputeNodeId, maxNodeId: number): void {\n this._features.animationNodeIds = populateAnimationNodeIds(this, computeNodeId, maxNodeId);\n }\n}\n\nexport function createPackedFeature(): PackedFeature {\n const pair = { upper: 0, lower: 0 };\n return {\n modelId: { ...pair },\n elementId: { ...pair },\n subCategoryId: { ...pair },\n geometryClass: GeometryClass.Primary,\n animationNodeId: 0,\n };\n}\n\nconst scratchPackedFeature = createPackedFeature();\n\nfunction populateAnimationNodeIds(table: RenderFeatureTable, computeNodeId: ComputeNodeId, maxNodeId: number): UintArray | undefined {\n assert(maxNodeId > 0);\n\n let nodeIds;\n const outputFeature = PackedFeature.createWithIndex();\n for (const feature of table.iterable(outputFeature)) {\n const nodeId = computeNodeId(feature);\n assert(nodeId <= maxNodeId);\n if (0 !== nodeId) {\n if (!nodeIds) {\n const size = table.numFeatures;\n nodeIds = maxNodeId < 0x100 ? new Uint8Array(size) : (maxNodeId < 0x10000 ? new Uint16Array(size) : new Uint32Array(size));\n }\n\n nodeIds[feature.index] = nodeId;\n }\n }\n\n return nodeIds;\n}\n\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RenderMaterialParams.js","sourceRoot":"","sources":["../../../src/internal/RenderMaterialParams.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH,SAAS,sBAAsB,CAAC,KAAa;IAC3C,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAA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AG,YAAY,CAAC;QAC3C,cAAc,CAAC,aAAa,GAAG,aAAa,CAAC;QAC7C,cAAc,CAAC,aAAa,GAAG,aAAa,CAAC;QAC7C,cAAc,CAAC,YAAY,GAAG,YAAY,CAAC;QAC3C,cAAc,CAAC,cAAc,GAAG,UAAU,CAAC;QAC3C,OAAO,cAAc,CAAC;IACxB,CAAC;;AAnDH,oDAoDC;AAED,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { ColorDef } from \"../ColorDef\";\r\nimport { TextureMapping } from \"../TextureMapping\";\r\n\r\nfunction clampToNormalizedRange(value: number): number {\r\n return Math.max(0.0, Math.min(1.0, value));\r\n}\r\n\r\n/** Params for use in old CreateMaterial functions. Use [CreateRenderMaterialArgs]($frontend) instead.\r\n * @internal\r\n*/\r\nexport class RenderMaterialParams {\r\n /** If the material originates from a Material element in the [[IModel]], the Id of that element. */\r\n public key?: string;\r\n /** Diffuse color, or undefined if this material does not override the surface's own color. */\r\n public diffuseColor?: ColorDef;\r\n /** Specular color. Defaults to white if undefined. */\r\n public specularColor?: ColorDef;\r\n /** Currently unused. @alpha */\r\n public emissiveColor?: ColorDef;\r\n /** Currently unused. @alpha */\r\n public reflectColor?: ColorDef;\r\n /** Optional pattern mapping applied to the surface. */\r\n public textureMapping?: TextureMapping;\r\n /** Diffuse weight in [0..1] */\r\n public diffuse: number = 0.6;\r\n /** Specular weight in [0..1] */\r\n public specular: number = 0.4;\r\n public specularExponent: number = 13.5;\r\n /** Currently unused. @alpha */\r\n public reflect: number = 0.0;\r\n /** Currently unused. @alpha */\r\n public refract: number = 1.0;\r\n /** Currently unused. @alpha */\r\n public ambient: number = .3;\r\n /** Currently unused. @alpha */\r\n public shadows = true;\r\n private _alpha?: number;\r\n\r\n public constructor(key?: string) { this.key = key; }\r\n\r\n /** Obtain an immutable instance of a RenderMaterial with all default properties. */\r\n public static readonly defaults = new RenderMaterialParams();\r\n\r\n /** A value from 0.0 (fully-transparent) to 1.0 (fully-opaque) controlling the transparency of surfaces to which this material is applied;\r\n * or undefined if this material does not override surface transparency.\r\n */\r\n public get alpha(): number | undefined { return this._alpha; }\r\n public set alpha(alpha: number | undefined) {\r\n this._alpha = undefined !== alpha ? clampToNormalizedRange(alpha) : undefined;\r\n }\r\n\r\n /** Create a RenderMaterial params object using specified key and ColorDef values, as well as an optional texture mapping. */\r\n public static fromColors(key?: string, diffuseColor?: ColorDef, specularColor?: ColorDef, emissiveColor?: ColorDef, reflectColor?: ColorDef, textureMap?: TextureMapping): RenderMaterialParams {\r\n const materialParams = new RenderMaterialParams();\r\n materialParams.key = key;\r\n materialParams.diffuseColor = diffuseColor;\r\n materialParams.specularColor = specularColor;\r\n materialParams.emissiveColor = emissiveColor;\r\n materialParams.reflectColor = reflectColor;\r\n materialParams.textureMapping = textureMap;\r\n return materialParams;\r\n }\r\n}\r\n\r\nObject.freeze(RenderMaterialParams.defaults);\r\n"]}
1
+ {"version":3,"file":"RenderMaterialParams.js","sourceRoot":"","sources":["../../../src/internal/RenderMaterialParams.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH,SAAS,sBAAsB,CAAC,KAAa;IAC3C,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED;;EAEE;AACF,MAAa,oBAAoB;IAC/B,oGAAoG;IAC7F,GAAG,CAAU;IACpB,8FAA8F;IACvF,YAAY,CAAY;IAC/B,sDAAsD;IAC/C,aAAa,CAAY;IAChC,+BAA+B;IACxB,aAAa,CAAY;IAChC,+BAA+B;IACxB,YAAY,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oDC;AAED,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { ColorDef } from \"../ColorDef\";\nimport { TextureMapping } from \"../TextureMapping\";\n\nfunction clampToNormalizedRange(value: number): number {\n return Math.max(0.0, Math.min(1.0, value));\n}\n\n/** Params for use in old CreateMaterial functions. Use [CreateRenderMaterialArgs]($frontend) instead.\n * @internal\n*/\nexport class RenderMaterialParams {\n /** If the material originates from a Material element in the [[IModel]], the Id of that element. */\n public key?: string;\n /** Diffuse color, or undefined if this material does not override the surface's own color. */\n public diffuseColor?: ColorDef;\n /** Specular color. Defaults to white if undefined. */\n public specularColor?: ColorDef;\n /** Currently unused. @alpha */\n public emissiveColor?: ColorDef;\n /** Currently unused. @alpha */\n public reflectColor?: ColorDef;\n /** Optional pattern mapping applied to the surface. */\n public textureMapping?: TextureMapping;\n /** Diffuse weight in [0..1] */\n public diffuse: number = 0.6;\n /** Specular weight in [0..1] */\n public specular: number = 0.4;\n public specularExponent: number = 13.5;\n /** Currently unused. @alpha */\n public reflect: number = 0.0;\n /** Currently unused. @alpha */\n public refract: number = 1.0;\n /** Currently unused. @alpha */\n public ambient: number = .3;\n /** Currently unused. @alpha */\n public shadows = true;\n private _alpha?: number;\n\n public constructor(key?: string) { this.key = key; }\n\n /** Obtain an immutable instance of a RenderMaterial with all default properties. */\n public static readonly defaults = new RenderMaterialParams();\n\n /** A value from 0.0 (fully-transparent) to 1.0 (fully-opaque) controlling the transparency of surfaces to which this material is applied;\n * or undefined if this material does not override surface transparency.\n */\n public get alpha(): number | undefined { return this._alpha; }\n public set alpha(alpha: number | undefined) {\n this._alpha = undefined !== alpha ? clampToNormalizedRange(alpha) : undefined;\n }\n\n /** Create a RenderMaterial params object using specified key and ColorDef values, as well as an optional texture mapping. */\n public static fromColors(key?: string, diffuseColor?: ColorDef, specularColor?: ColorDef, emissiveColor?: ColorDef, reflectColor?: ColorDef, textureMap?: TextureMapping): RenderMaterialParams {\n const materialParams = new RenderMaterialParams();\n materialParams.key = key;\n materialParams.diffuseColor = diffuseColor;\n materialParams.specularColor = specularColor;\n materialParams.emissiveColor = emissiveColor;\n materialParams.reflectColor = reflectColor;\n materialParams.textureMapping = textureMap;\n return materialParams;\n }\n}\n\nObject.freeze(RenderMaterialParams.defaults);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RenderMesh.js","sourceRoot":"","sources":["../../../src/internal/RenderMesh.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH,gBAAgB;AAChB,MAAa,YAAY;IACP,OAAO,CAAkB;IAEzC,YAAmB,UAA2B,EAAE;QAC9C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IACjC,CAAC;IAEM,QAAQ,CAAC,KAAa;QAC3B,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QACzB,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,KAAK;YAC/D,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;IAEM,KAAK,KAAK,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;CAC5C;AAdD,oCAcC;AAKD,gBAAgB;AAChB,MAAa,QAAQ;IACZ,OAAO,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAExB,YAAmB,MAAe,EAAE,MAAe;QACjD,IAAI,SAAS,KAAK,MAAM,IAAI,SAAS,KAAK,MAAM;YAC9C,OAAO;QACT,IAAI,MAAM,GAAG,MAAM,EAAE,CAAC;YACpB,IAAI,CAAC,OAAO,CAAC,CAA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AC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;CAC5C;AAfD,4CAeC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\n\r\nimport { ColorDef } from \"../ColorDef\";\r\nimport { LinePixels } from \"../LinePixels\";\r\nimport { OctEncodedNormalPair } from \"../OctEncodedNormal\";\r\nimport { PolylineIndices } from \"../RenderPolyline\";\r\n\r\n/** @internal */\r\nexport class MeshPolyline {\r\n public readonly indices: PolylineIndices;\r\n\r\n public constructor(indices: PolylineIndices = []) {\r\n this.indices = indices.slice();\r\n }\r\n\r\n public addIndex(index: number) {\r\n const { indices } = this;\r\n if (indices.length === 0 || indices[indices.length - 1] !== index)\r\n indices.push(index);\r\n }\r\n\r\n public clear() { this.indices.length = 0; }\r\n}\r\n\r\n/** @internal */\r\nexport type MeshPolylineList = MeshPolyline[];\r\n\r\n/** @internal */\r\nexport class MeshEdge {\r\n public indices = [0, 0];\r\n\r\n public constructor(index0?: number, index1?: number) {\r\n if (undefined === index0 || undefined === index1)\r\n return;\r\n if (index0 < index1) {\r\n this.indices[0] = index0;\r\n this.indices[1] = index1;\r\n } else {\r\n this.indices[0] = index1;\r\n this.indices[1] = index0;\r\n }\r\n }\r\n\r\n public compareTo(other: MeshEdge): number {\r\n let diff = this.indices[0] - other.indices[0];\r\n if (0 === diff)\r\n diff = this.indices[1] - other.indices[1];\r\n\r\n return diff;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport interface EdgeAppearanceOverrides {\r\n color?: ColorDef;\r\n linePixels?: LinePixels;\r\n width?: number;\r\n}\r\n\r\n/** @internal */\r\nexport interface MeshPolylineGroup {\r\n polylines: MeshPolyline[];\r\n appearance?: EdgeAppearanceOverrides;\r\n}\r\n\r\n/** @internal */\r\nexport class MeshEdges {\r\n public visible: MeshEdge[] = [];\r\n public silhouette: MeshEdge[] = [];\r\n public appearance?: EdgeAppearanceOverrides;\r\n public polylineGroups: MeshPolylineGroup[] = [];\r\n public silhouetteNormals: OctEncodedNormalPair[] = [];\r\n public constructor() { }\r\n}\r\n\r\n/** @internal */\r\nexport class EdgeArgs {\r\n public edges?: MeshEdge[];\r\n\r\n public init(meshEdges?: MeshEdges): boolean {\r\n this.clear();\r\n if (undefined !== meshEdges && 0 < meshEdges.visible.length)\r\n this.edges = meshEdges.visible;\r\n\r\n return this.isValid;\r\n }\r\n\r\n public clear(): void { this.edges = undefined; }\r\n public get isValid(): boolean { return 0 < this.numEdges; }\r\n public get numEdges() { return undefined !== this.edges ? this.edges.length : 0; }\r\n}\r\n\r\n/** @internal */\r\nexport class SilhouetteEdgeArgs extends EdgeArgs {\r\n public normals?: OctEncodedNormalPair[];\r\n\r\n public override init(meshEdges?: MeshEdges) {\r\n this.clear();\r\n if (undefined !== meshEdges && 0 < meshEdges.silhouette.length) {\r\n this.edges = meshEdges.silhouette;\r\n this.normals = meshEdges.silhouetteNormals;\r\n }\r\n\r\n return this.isValid;\r\n }\r\n\r\n public override clear() {\r\n this.normals = undefined;\r\n super.clear();\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class PolylineEdgeArgs {\r\n public groups?: MeshPolylineGroup[];\r\n\r\n public constructor(groups?: MeshPolylineGroup[]) {\r\n this.init(groups);\r\n }\r\n\r\n public init(groups?: MeshPolylineGroup[]): boolean {\r\n this.groups = groups?.filter((group) => group.polylines.length > 0);\r\n return this.isValid;\r\n }\r\n\r\n public get numGroups() { return this.groups?.length ?? 0; }\r\n public get isValid() { return this.numGroups > 0; }\r\n public clear() { this.groups = undefined; }\r\n}\r\n"]}
1
+ {"version":3,"file":"RenderMesh.js","sourceRoot":"","sources":["../../../src/internal/RenderMesh.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH,gBAAgB;AAChB,MAAa,YAAY;IACP,OA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C;QAED,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAEe,KAAK;QACnB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QACzB,KAAK,CAAC,KAAK,EAAE,CAAC;IAChB,CAAC;CACF;AAjBD,gDAiBC;AAED,gBAAgB;AAChB,MAAa,gBAAgB;IACpB,MAAM,CAAuB;IAEpC,YAAmB,MAA4B;QAC7C,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC;IAEM,IAAI,CAAC,MAA4B;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,IAAW,SAAS,KAAK,OAAO,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC;IAC3D,IAAW,OAAO,KAAK,OAAO,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC;IAC5C,KAAK,KAAK,IAAI,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;CAC5C;AAfD,4CAeC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\n\nimport { ColorDef } from \"../ColorDef\";\nimport { LinePixels } from \"../LinePixels\";\nimport { OctEncodedNormalPair } from \"../OctEncodedNormal\";\nimport { PolylineIndices } from \"../RenderPolyline\";\n\n/** @internal */\nexport class MeshPolyline {\n public readonly indices: PolylineIndices;\n\n public constructor(indices: PolylineIndices = []) {\n this.indices = indices.slice();\n }\n\n public addIndex(index: number) {\n const { indices } = this;\n if (indices.length === 0 || indices[indices.length - 1] !== index)\n indices.push(index);\n }\n\n public clear() { this.indices.length = 0; }\n}\n\n/** @internal */\nexport type MeshPolylineList = MeshPolyline[];\n\n/** @internal */\nexport class MeshEdge {\n public indices = [0, 0];\n\n public constructor(index0?: number, index1?: number) {\n if (undefined === index0 || undefined === index1)\n return;\n if (index0 < index1) {\n this.indices[0] = index0;\n this.indices[1] = index1;\n } else {\n this.indices[0] = index1;\n this.indices[1] = index0;\n }\n }\n\n public compareTo(other: MeshEdge): number {\n let diff = this.indices[0] - other.indices[0];\n if (0 === diff)\n diff = this.indices[1] - other.indices[1];\n\n return diff;\n }\n}\n\n/** @internal */\nexport interface EdgeAppearanceOverrides {\n color?: ColorDef;\n linePixels?: LinePixels;\n width?: number;\n}\n\n/** @internal */\nexport interface MeshPolylineGroup {\n polylines: MeshPolyline[];\n appearance?: EdgeAppearanceOverrides;\n}\n\n/** @internal */\nexport class MeshEdges {\n public visible: MeshEdge[] = [];\n public silhouette: MeshEdge[] = [];\n public appearance?: EdgeAppearanceOverrides;\n public polylineGroups: MeshPolylineGroup[] = [];\n public silhouetteNormals: OctEncodedNormalPair[] = [];\n public constructor() { }\n}\n\n/** @internal */\nexport class EdgeArgs {\n public edges?: MeshEdge[];\n\n public init(meshEdges?: MeshEdges): boolean {\n this.clear();\n if (undefined !== meshEdges && 0 < meshEdges.visible.length)\n this.edges = meshEdges.visible;\n\n return this.isValid;\n }\n\n public clear(): void { this.edges = undefined; }\n public get isValid(): boolean { return 0 < this.numEdges; }\n public get numEdges() { return undefined !== this.edges ? this.edges.length : 0; }\n}\n\n/** @internal */\nexport class SilhouetteEdgeArgs extends EdgeArgs {\n public normals?: OctEncodedNormalPair[];\n\n public override init(meshEdges?: MeshEdges) {\n this.clear();\n if (undefined !== meshEdges && 0 < meshEdges.silhouette.length) {\n this.edges = meshEdges.silhouette;\n this.normals = meshEdges.silhouetteNormals;\n }\n\n return this.isValid;\n }\n\n public override clear() {\n this.normals = undefined;\n super.clear();\n }\n}\n\n/** @internal */\nexport class PolylineEdgeArgs {\n public groups?: MeshPolylineGroup[];\n\n public constructor(groups?: MeshPolylineGroup[]) {\n this.init(groups);\n }\n\n public init(groups?: MeshPolylineGroup[]): boolean {\n this.groups = groups?.filter((group) => group.polylines.length > 0);\n return this.isValid;\n }\n\n public get numGroups() { return this.groups?.length ?? 0; }\n public get isValid() { return this.numGroups > 0; }\n public clear() { this.groups = undefined; }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RenderTextureParams.js","sourceRoot":"","sources":["../../../src/internal/RenderTextureParams.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,oDAAiD;AAEjD;;;GAGG;AACH,MAAa,mBAAmB;IAC9B;;MAEE;IACc,GAAG,CAAU;IAC7B,qCAAqC;IACrB,IAAI,CAAqB;IACzC;;OAEG;IACa,OAAO,CAAU;IAEjC,YAAmB,GAAY,EAAE,OAA2B,6BAAa,CAAC,IAAI,CAAC,MAAM,EAAE,UAAmB,KAAK;QAC7G,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,IAAW,aAAa,KAAc,OAAO,6BAAa,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5F,IAAW,OAAO,KAAc,OAAO,6BAAa,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChF,IAAW,QAAQ,KAAc,OAAO,6BAAa,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;CACnF;AArBD,kDAqBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Rendering\r\n */\r\nimport { RenderTexture } from \"../RenderTexture\";\r\n\r\n/** Parameters used to construct a [[RenderTexture]] in old RenderTexture functions.\r\n * Use RenderSystem.createTexture and CreateTextureArgs instead.\r\n * @internal\r\n */\r\nexport class RenderTextureParams {\r\n /** A string uniquely identifying this texture within the context of an [[IModel]]. Typically this is the element Id of the corresponding [Texture]($backend) element.\r\n * Textures created on the front-end generally have no key.\r\n */\r\n public readonly key?: string;\r\n /** Indicates the type of texture. */\r\n public readonly type: RenderTexture.Type;\r\n /** Indicates that some object is managing the lifetime of this texture and will take care of calling its dispose function appropriately.\r\n * An unowned texture associated with a [RenderGraphic]($frontend) will be disposed when the RenderGraphic is disposed.\r\n */\r\n public readonly isOwned: boolean;\r\n\r\n public constructor(key?: string, type: RenderTexture.Type = RenderTexture.Type.Normal, isOwned: boolean = false) {\r\n this.key = key;\r\n this.type = type;\r\n this.isOwned = isOwned;\r\n }\r\n\r\n public get isTileSection(): boolean { return RenderTexture.Type.TileSection === this.type; }\r\n public get isGlyph(): boolean { return RenderTexture.Type.Glyph === this.type; }\r\n public get isSkyBox(): boolean { return RenderTexture.Type.SkyBox === this.type; }\r\n}"]}
1
+ {"version":3,"file":"RenderTextureParams.js","sourceRoot":"","sources":["../../../src/internal/RenderTextureParams.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,oDAAiD;AAEjD;;;GAGG;AACH,MAAa,mBAAmB;IAC9B;;MAEE;IACc,GAAG,CAAU;IAC7B,qCAAqC;IACrB,IAAI,CAAqB;IACzC;;OAEG;IACa,OAAO,CAAU;IAEjC,YAAmB,GAAY,EAAE,OAA2B,6BAAa,CAAC,IAAI,CAAC,MAAM,EAAE,UAAmB,KAAK;QAC7G,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,IAAW,aAAa,KAAc,OAAO,6BAAa,CAAC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5F,IAAW,OAAO,KAAc,OAAO,6BAAa,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChF,IAAW,QAAQ,KAAc,OAAO,6BAAa,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;CACnF;AArBD,kDAqBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Rendering\n */\nimport { RenderTexture } from \"../RenderTexture\";\n\n/** Parameters used to construct a [[RenderTexture]] in old RenderTexture functions.\n * Use RenderSystem.createTexture and CreateTextureArgs instead.\n * @internal\n */\nexport class RenderTextureParams {\n /** A string uniquely identifying this texture within the context of an [[IModel]]. Typically this is the element Id of the corresponding [Texture]($backend) element.\n * Textures created on the front-end generally have no key.\n */\n public readonly key?: string;\n /** Indicates the type of texture. */\n public readonly type: RenderTexture.Type;\n /** Indicates that some object is managing the lifetime of this texture and will take care of calling its dispose function appropriately.\n * An unowned texture associated with a [RenderGraphic]($frontend) will be disposed when the RenderGraphic is disposed.\n */\n public readonly isOwned: boolean;\n\n public constructor(key?: string, type: RenderTexture.Type = RenderTexture.Type.Normal, isOwned: boolean = false) {\n this.key = key;\n this.type = type;\n this.isOwned = isOwned;\n }\n\n public get isTileSection(): boolean { return RenderTexture.Type.TileSection === this.type; }\n public get isGlyph(): boolean { return RenderTexture.Type.Glyph === this.type; }\n public get isSkyBox(): boolean { return RenderTexture.Type.SkyBox === this.type; }\n}"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Snapping.js","sourceRoot":"","sources":["../../../src/internal/Snapping.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n\r\nimport { Id64Array, Id64String } from \"@itwin/core-bentley\";\r\nimport { Matrix4dProps, TransformProps, XYZProps } from \"@itwin/core-geometry\";\r\nimport { GeometryStreamProps } from \"../geometry/GeometryStream\";\r\nimport { GeometryClass } from \"../GeometryParams\";\r\nimport { ViewFlagProps } from \"../ViewFlags\";\r\n\r\n/** Information required to request a *snap* to a pickable decoration from the front end to the back end.\r\n * @internal RPC glue.\r\n */\r\nexport interface DecorationGeometryProps {\r\n readonly id: Id64String;\r\n readonly geometryStream: GeometryStreamProps;\r\n}\r\n\r\n/** Information required to request a *snap* to an element from the front end to the back end.\r\n * Includes the viewing parameters so that snap can be relative to the view direction, viewing mode, etc.\r\n * @internal RPC glue.\r\n */\r\nexport interface SnapRequestProps {\r\n id: Id64String;\r\n testPoint: XYZProps;\r\n closePoint: XYZProps;\r\n worldToView: Matrix4dProps;\r\n viewFlags?: ViewFlagProps;\r\n snapModes?: number[];\r\n snapAperture?: number;\r\n snapDivisor?: number;\r\n subCategoryId?: Id64String;\r\n geometryClass?: GeometryClass;\r\n intersectCandidates?: Id64Array;\r\n decorationGeometry?: DecorationGeometryProps[];\r\n /** A transform to be applied to the snap geometry.\r\n * testPoint, closePoint, and worldToView are in \"world\" coordinates (the coordinates of the viewport's iModel).\r\n * The snap geometry is in \"model\" coordinates (the coordinates of the iModel to which we're snapping).\r\n * In normal cases these are the same iModel. They may differ when people draw multiple iModels into the same viewport.\r\n */\r\n modelToWorld?: TransformProps;\r\n}\r\n\r\n/** Information returned from the back end to the front end holding the result of a *snap* operation.\r\n * @internal RPC glue.\r\n */\r\nexport interface SnapResponseProps {\r\n status: number;\r\n snapMode?: number;\r\n heat?: number;\r\n geomType?: number;\r\n parentGeomType?: number;\r\n hitPoint?: XYZProps;\r\n snapPoint?: XYZProps;\r\n normal?: XYZProps;\r\n curve?: any;\r\n intersectCurve?: any;\r\n intersectId?: string;\r\n}\r\n"]}
1
+ {"version":3,"file":"Snapping.js","sourceRoot":"","sources":["../../../src/internal/Snapping.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n\nimport { Id64Array, Id64String } from \"@itwin/core-bentley\";\nimport { Matrix4dProps, TransformProps, XYZProps } from \"@itwin/core-geometry\";\nimport { GeometryStreamProps } from \"../geometry/GeometryStream\";\nimport { GeometryClass } from \"../GeometryParams\";\nimport { ViewFlagProps } from \"../ViewFlags\";\n\n/** Information required to request a *snap* to a pickable decoration from the front end to the back end.\n * @internal RPC glue.\n */\nexport interface DecorationGeometryProps {\n readonly id: Id64String;\n readonly geometryStream: GeometryStreamProps;\n}\n\n/** Information required to request a *snap* to an element from the front end to the back end.\n * Includes the viewing parameters so that snap can be relative to the view direction, viewing mode, etc.\n * @internal RPC glue.\n */\nexport interface SnapRequestProps {\n id: Id64String;\n testPoint: XYZProps;\n closePoint: XYZProps;\n worldToView: Matrix4dProps;\n viewFlags?: ViewFlagProps;\n snapModes?: number[];\n snapAperture?: number;\n snapDivisor?: number;\n subCategoryId?: Id64String;\n geometryClass?: GeometryClass;\n intersectCandidates?: Id64Array;\n decorationGeometry?: DecorationGeometryProps[];\n /** A transform to be applied to the snap geometry.\n * testPoint, closePoint, and worldToView are in \"world\" coordinates (the coordinates of the viewport's iModel).\n * The snap geometry is in \"model\" coordinates (the coordinates of the iModel to which we're snapping).\n * In normal cases these are the same iModel. They may differ when people draw multiple iModels into the same viewport.\n */\n modelToWorld?: TransformProps;\n}\n\n/** Information returned from the back end to the front end holding the result of a *snap* operation.\n * @internal RPC glue.\n */\nexport interface SnapResponseProps {\n status: number;\n snapMode?: number;\n heat?: number;\n geomType?: number;\n parentGeomType?: number;\n hitPoint?: XYZProps;\n snapPoint?: XYZProps;\n normal?: XYZProps;\n curve?: any;\n intersectCurve?: any;\n intersectId?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FieldFormatter.js","sourceRoot":"","sources":["../../../../src/internal/annotations/FieldFormatter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;AA8F/F,4CAGC;AAGD,4DAEC;AAlFD,MAAM,UAAU,GAAmD;IACjE,gEAAgE;IAChE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAEjD,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;IAErE,gEAAgE;IAChE,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAEnD,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC5D,gEAAgE;IAChE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAClD,gEAAgE;IAChE,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACnD,gEAAgE;IAChE,aAAa,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAA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,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;IACtB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,mEAAmE;AACnE,SAAS,gBAAgB,CAAC,CAAsB;IAC9C,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC;QAClD,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACzB,MAAM,CAAC,GAAI,CAAS,CAAC,CAAC,CAAC;QACvB,IAAI,SAAS,KAAK,CAAC,EAAE,CAAC;YACpB,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChB,CAAC;QAED,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;IACjC,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,gBAAgB;AAChB,SAAgB,gBAAgB,CAAC,KAAiB,EAAE,OAAuC;IACzF,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACjE,CAAC;AAED,gBAAgB;AAChB,SAAgB,wBAAwB,CAAC,IAAY;IACnD,OAAO,IAAI,IAAI,UAAU,CAAC;AAC5B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport { XAndY, XYAndZ } from \"@itwin/core-geometry\";\r\nimport { DateTimeFieldFormatOptions, FieldFormatOptions, FieldPropertyType } from \"../../annotation/TextField\";\r\n\r\n/** A FieldPropertyPath must ultimately resolve to one of these primitive types.\r\n * @internal\r\n */\r\nexport type FieldPrimitiveValue = boolean | number | string | Date | XAndY | XYAndZ | Uint8Array;\r\n\r\n/** Resolved value of a field.\r\n * @internal\r\n */\r\nexport interface FieldValue {\r\n value: FieldPrimitiveValue;\r\n type: FieldPropertyType;\r\n}\r\n\r\ntype FieldFormatter = (value: FieldPrimitiveValue, options: FieldFormatOptions | undefined) => string | undefined;\r\n\r\nconst formatters: { [type: string]: FieldFormatter | undefined } = {\r\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\r\n \"string\": (v, o) => formatString(v.toString(), o),\r\n\r\n \"datetime\": (v, o) => formatString(formatDateTime(v, o?.dateTime), o),\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\r\n \"quantity\": (v, o) => formatString(v.toString(), o),\r\n \r\n \"coordinate\": (v, o) => formatString(formatPointBasic(v), o),\r\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\r\n \"boolean\": (v, o) => formatString(v.toString(), o),\r\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\r\n \"int-enum\": (v, o) => formatString(v.toString(), o),\r\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\r\n \"string-enum\": (v, o) => formatString(v.toString(), o),\r\n};\r\n\r\nfunction formatString(s: string | undefined, o?: FieldFormatOptions): string | undefined {\r\n if (undefined === s || !o) {\r\n return s;\r\n }\r\n\r\n switch (o.case) {\r\n case \"upper\":\r\n s = s.toUpperCase();\r\n break;\r\n case \"lower\":\r\n s = s.toLowerCase();\r\n break;\r\n }\r\n\r\n if (o.prefix || o.suffix) {\r\n s = `${o.prefix ?? \"\"}${s}${o.suffix ?? \"\"}`;\r\n }\r\n\r\n return s;\r\n}\r\n\r\nfunction formatDateTime(v: FieldPrimitiveValue, o?: DateTimeFieldFormatOptions): string | undefined {\r\n if (!(v instanceof Date))\r\n return undefined;\r\n\r\n if (!isNaN(v.getTime())) {\r\n if (o?.formatOptions) {\r\n const locale = o.locale ?? \"en-US\";\r\n if (!Intl.DateTimeFormat.supportedLocalesOf([locale], { localeMatcher: \"lookup\" }).includes(locale)) {\r\n return undefined;\r\n }\r\n\r\n const formatter = new Intl.DateTimeFormat(locale, o.formatOptions);\r\n return formatter.format(v);\r\n }\r\n return v.toString();\r\n }\r\n return undefined;\r\n}\r\n\r\n// ###TODO replace this with actual quantity coordinate formatting.\r\nfunction formatPointBasic(v: FieldPrimitiveValue): string | undefined {\r\n if (typeof v === \"object\" && \"x\" in v && \"y\" in v) {\r\n const parts = [v.x, v.y];\r\n const z = (v as any).z;\r\n if (undefined !== z) {\r\n parts.push(z);\r\n }\r\n\r\n return `(${parts.join(\", \")})`;\r\n }\r\n\r\n return undefined;\r\n}\r\n\r\n/** @internal */\r\nexport function formatFieldValue(value: FieldValue, options: FieldFormatOptions | undefined): string | undefined {\r\n const formatter = formatters[value.type];\r\n return formatter ? formatter(value.value, options) : undefined;\r\n}\r\n\r\n/** @internal */\r\nexport function isKnownFieldPropertyType(type: string): type is FieldPropertyType {\r\n return type in formatters;\r\n}\r\n\r\n"]}
1
+ {"version":3,"file":"FieldFormatter.js","sourceRoot":"","sources":["../../../../src/internal/annotations/FieldFormatter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;AA8F/F,4CAGC;AAGD,4DAEC;AAlFD,MAAM,UAAU,GAAmD;IACjE,gEAAgE;IAChE,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAEjD,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;IAErE,gEAAgE;IAChE,UAAU,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ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AI,CAAC,CAAC;IACzC,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACjE,CAAC;AAED,gBAAgB;AAChB,SAAgB,wBAAwB,CAAC,IAAY;IACnD,OAAO,IAAI,IAAI,UAAU,CAAC;AAC5B,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nimport { XAndY, XYAndZ } from \"@itwin/core-geometry\";\nimport { DateTimeFieldFormatOptions, FieldFormatOptions, FieldPropertyType } from \"../../annotation/TextField\";\n\n/** A FieldPropertyPath must ultimately resolve to one of these primitive types.\n * @internal\n */\nexport type FieldPrimitiveValue = boolean | number | string | Date | XAndY | XYAndZ | Uint8Array;\n\n/** Resolved value of a field.\n * @internal\n */\nexport interface FieldValue {\n value: FieldPrimitiveValue;\n type: FieldPropertyType;\n}\n\ntype FieldFormatter = (value: FieldPrimitiveValue, options: FieldFormatOptions | undefined) => string | undefined;\n\nconst formatters: { [type: string]: FieldFormatter | undefined } = {\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n \"string\": (v, o) => formatString(v.toString(), o),\n\n \"datetime\": (v, o) => formatString(formatDateTime(v, o?.dateTime), o),\n\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n \"quantity\": (v, o) => formatString(v.toString(), o),\n \n \"coordinate\": (v, o) => formatString(formatPointBasic(v), o),\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n \"boolean\": (v, o) => formatString(v.toString(), o),\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n \"int-enum\": (v, o) => formatString(v.toString(), o),\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n \"string-enum\": (v, o) => formatString(v.toString(), o),\n};\n\nfunction formatString(s: string | undefined, o?: FieldFormatOptions): string | undefined {\n if (undefined === s || !o) {\n return s;\n }\n\n switch (o.case) {\n case \"upper\":\n s = s.toUpperCase();\n break;\n case \"lower\":\n s = s.toLowerCase();\n break;\n }\n\n if (o.prefix || o.suffix) {\n s = `${o.prefix ?? \"\"}${s}${o.suffix ?? \"\"}`;\n }\n\n return s;\n}\n\nfunction formatDateTime(v: FieldPrimitiveValue, o?: DateTimeFieldFormatOptions): string | undefined {\n if (!(v instanceof Date))\n return undefined;\n\n if (!isNaN(v.getTime())) {\n if (o?.formatOptions) {\n const locale = o.locale ?? \"en-US\";\n if (!Intl.DateTimeFormat.supportedLocalesOf([locale], { localeMatcher: \"lookup\" }).includes(locale)) {\n return undefined;\n }\n\n const formatter = new Intl.DateTimeFormat(locale, o.formatOptions);\n return formatter.format(v);\n }\n return v.toString();\n }\n return undefined;\n}\n\n// ###TODO replace this with actual quantity coordinate formatting.\nfunction formatPointBasic(v: FieldPrimitiveValue): string | undefined {\n if (typeof v === \"object\" && \"x\" in v && \"y\" in v) {\n const parts = [v.x, v.y];\n const z = (v as any).z;\n if (undefined !== z) {\n parts.push(z);\n }\n\n return `(${parts.join(\", \")})`;\n }\n\n return undefined;\n}\n\n/** @internal */\nexport function formatFieldValue(value: FieldValue, options: FieldFormatOptions | undefined): string | undefined {\n const formatter = formatters[value.type];\n return formatter ? formatter(value.value, options) : undefined;\n}\n\n/** @internal */\nexport function isKnownFieldPropertyType(type: string): type is FieldPropertyType {\n return type in formatters;\n}\n\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"cross-package.js","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAG/F,2CAEsB;AADU,sGAAA,QAAQ,OAAA;AAAE,sGAAA,QAAQ,OAAA;AAAE,uGAAA,SAAS,OAAA;AAAE,0GAAA,YAAY,OAAA;AAAyB,8GAAA,gBAAgB,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AAExI,2DAE8B;AAD5B,kIAAA,4BAA4B,OAAA;AAAE,6HAAA,uBAAuB,OAAA;AAAE,wHAAA,kBAAkB,OAAA;AAG3E,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,+DAAqI;AAAjF,kHAAA,gBAAgB,OAAA;AAAE,0HAAA,wBAAwB,OAAA","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nexport type { DecorationGeometryProps, SnapRequestProps, SnapResponseProps } from \"./Snapping\";\r\nexport {\r\n type EdgeAppearanceOverrides, EdgeArgs, MeshEdge, MeshEdges, MeshPolyline, type MeshPolylineList, PolylineEdgeArgs, SilhouetteEdgeArgs\r\n} from \"./RenderMesh\";\r\nexport {\r\n MultiModelPackedFeatureTable, PackedFeatureModelTable, PackedFeatureTable\r\n} from \"./PackedFeatureTable\";\r\nexport type { BackendReadable, BackendWritable, BackendBuffer } from \"./BackendTypes\";\r\nexport { RenderMaterialParams } from \"./RenderMaterialParams\";\r\nexport { RenderTextureParams } from \"./RenderTextureParams\";\r\nexport { type FieldPrimitiveValue, type FieldValue, formatFieldValue, isKnownFieldPropertyType } from \"./annotations/FieldFormatter\";\r\n"]}
1
+ {"version":3,"file":"cross-package.js","sourceRoot":"","sources":["../../../src/internal/cross-package.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAG/F,2CAEsB;AADU,sGAAA,QAAQ,OAAA;AAAE,sGAAA,QAAQ,OAAA;AAAE,uGAAA,SAAS,OAAA;AAAE,0GAAA,YAAY,OAAA;AAAyB,8GAAA,gBAAgB,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AAExI,2DAE8B;AAD5B,kIAAA,4BAA4B,OAAA;AAAE,6HAAA,uBAAuB,OAAA;AAAE,wHAAA,kBAAkB,OAAA;AAG3E,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAC5B,+DAAqI;AAAjF,kHAAA,gBAAgB,OAAA;AAAE,0HAAA,wBAAwB,OAAA","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\nexport type { DecorationGeometryProps, SnapRequestProps, SnapResponseProps } from \"./Snapping\";\nexport {\n type EdgeAppearanceOverrides, EdgeArgs, MeshEdge, MeshEdges, MeshPolyline, type MeshPolylineList, PolylineEdgeArgs, SilhouetteEdgeArgs\n} from \"./RenderMesh\";\nexport {\n MultiModelPackedFeatureTable, PackedFeatureModelTable, PackedFeatureTable\n} from \"./PackedFeatureTable\";\nexport type { BackendReadable, BackendWritable, BackendBuffer } from \"./BackendTypes\";\nexport { RenderMaterialParams } from \"./RenderMaterialParams\";\nexport { RenderTextureParams } from \"./RenderTextureParams\";\nexport { type FieldPrimitiveValue, type FieldValue, formatFieldValue, isKnownFieldPropertyType } from \"./annotations/FieldFormatter\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IpcSession.js","sourceRoot":"","sources":["../../../src/ipc/IpcSession.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gBAAgB;AACH,QAAA,iBAAiB,GAAG;IAC/B,WAAW,EAAE,2BAA2B;CAChC,CAAC;AAUX,gBAAgB;AAChB,MAAsB,UAAU;IACtB,MAAM,CAAC,OAAO,CAAc;IAC7B,MAAM,KAAK,MAAM,KAA6B,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAEpE,MAAM,CAAC,KAAK,CAAC,OAAmB;QACrC,IAAI,IAAI,CAAC,OAAO;YACd,OAAO;QAET,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,MAAM,CAAC,IAAI;QAChB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;IAC3B,CAAC;CAGF;AAhBD,gCAgBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module IpcSocket\r\n */\r\n\r\n/** @internal */\r\nexport const rpcOverIpcStrings = {\r\n channelName: \"itwinjs-core/rpc-over-ipc\",\r\n} as const;\r\n\r\n/** @internal */\r\nexport interface InterceptedRpcRequest {\r\n definition: { interfaceName: string, interfaceVersion: string };\r\n operation: string;\r\n parameters: any[];\r\n context: { [index: string]: string };\r\n}\r\n\r\n/** @internal */\r\nexport abstract class IpcSession {\r\n private static _active?: IpcSession;\r\n public static get active(): IpcSession | undefined { return this._active; }\r\n\r\n public static start(session: IpcSession) {\r\n if (this._active)\r\n return;\r\n\r\n this._active = session;\r\n }\r\n\r\n public static stop() {\r\n this._active = undefined;\r\n }\r\n\r\n public abstract handleRpc(info: InterceptedRpcRequest): Promise<any>;\r\n}\r\n"]}
1
+ {"version":3,"file":"IpcSession.js","sourceRoot":"","sources":["../../../src/ipc/IpcSession.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gBAAgB;AACH,QAAA,iBAAiB,GAAG;IAC/B,WAAW,EAAE,2BAA2B;CAChC,CAAC;AAUX,gBAAgB;AAChB,MAAsB,UAAU;IACtB,MAAM,CAAC,OAAO,CAAc;IAC7B,MAAM,KAAK,MAAM,KAA6B,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAEpE,MAAM,CAAC,KAAK,CAAC,OAAmB;QACrC,IAAI,IAAI,CAAC,OAAO;YACd,OAAO;QAET,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAEM,MAAM,CAAC,IAAI;QAChB,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;IAC3B,CAAC;CAGF;AAhBD,gCAgBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IpcSocket\n */\n\n/** @internal */\nexport const rpcOverIpcStrings = {\n channelName: \"itwinjs-core/rpc-over-ipc\",\n} as const;\n\n/** @internal */\nexport interface InterceptedRpcRequest {\n definition: { interfaceName: string, interfaceVersion: string };\n operation: string;\n parameters: any[];\n context: { [index: string]: string };\n}\n\n/** @internal */\nexport abstract class IpcSession {\n private static _active?: IpcSession;\n public static get active(): IpcSession | undefined { return this._active; }\n\n public static start(session: IpcSession) {\n if (this._active)\n return;\n\n this._active = session;\n }\n\n public static stop() {\n this._active = undefined;\n }\n\n public abstract handleRpc(info: InterceptedRpcRequest): Promise<any>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IpcSocket.js","sourceRoot":"","sources":["../../../src/ipc/IpcSocket.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;KAGK;AACE,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,SAAS,OAAO,EAAE,CAAC;AAAvD,QAAA,YAAY,gBAA2C","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module IpcSocket\r\n */\r\n\r\n/**\r\n * The prefix for all IpcSocket channels to disambiguate from system channels.\r\n * @internal\r\n * */\r\nexport const iTwinChannel = (channel: string) => `itwin.${channel}`;\r\n\r\n/**\r\n * A function to handle an Ipc message.\r\n * @public\r\n */\r\nexport type IpcListener = (evt: Event, ...args: any[]) => void;\r\n\r\n/**\r\n * Function returned when establishing an Ipc `receive` listener or `invoke` handler. Call this method to remove the listener/handler.\r\n * @public\r\n * @extensions\r\n */\r\nexport type RemoveFunction = () => void;\r\n\r\n/**\r\n * Payload of an IpcInvoke response. The presence of `error` indicates that the backend threw an exception and the\r\n * frontend will re-throw an Error with the content of the exception\r\n * Otherwise the `result` member holds the response.\r\n * @internal */\r\nexport type IpcInvokeReturn = { result: any, error?: never } | { result?: never, error: unknown }\r\n\r\n/**\r\n * An inter-process socket connection between a single [IModelHost]($backend) on the backend (the node process), and an [IModelApp]($frontend) on\r\n * the frontend (the browser process.) Each side will implement this interface to form a two way connection. The frontend and backend\r\n * processes connected through an IpcSocket don't necessarily have to be on the same computer, but often are.\r\n * @public\r\n*/\r\nexport interface IpcSocket {\r\n /**\r\n * Send a message over the socket.\r\n * @param channel The name of the channel for the message. Must begin with the [[iTwinChannel]] prefix.\r\n * @param data The optional data of the message.\r\n * @note `data` is serialized with the [Structured Clone Algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm), so only\r\n * primitive types and `ArrayBuffers` are allowed.\r\n */\r\n send: (channel: string, ...data: any[]) => void;\r\n /**\r\n * Establish a handler to receive messages for a channel through a socket.\r\n * @param channel The name of the channel for the messages. Must begin with the [[iTwinChannel]] prefix.\r\n * @param listener A function called when messages are sent over `channel`\r\n * @note returns A function to call to remove the listener.\r\n */\r\n addListener: (channel: string, listener: IpcListener) => RemoveFunction;\r\n /**\r\n * Remove a previously registered listener\r\n * @param channel The name of the channel for the listener previously registered with [[addListener]]\r\n * @param listener The function passed to [[addListener]]\r\n */\r\n removeListener: (channel: string, listener: IpcListener) => void;\r\n}\r\n\r\n/**\r\n * Interface for the frontend (browser) side of a socket connection. Frontends may invoke methods implemented on the backend.\r\n * @public\r\n */\r\nexport interface IpcSocketFrontend extends IpcSocket {\r\n /**\r\n * Send a message to the backend via `channel` and expect a result asynchronously.\r\n * @param channel The name of the channel for the method. Must begin with the [[iTwinChannel]] prefix.\r\n * @see Electron [ipcRenderer.invoke](https://www.electronjs.org/docs/api/ipc-renderer) documentation for details.\r\n * Note that this interface *may* be implemented via Electron for desktop apps, or via\r\n * [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) for mobile or web-based\r\n * Ipc connections. In either case, the Electron documentation provides the specifications for how it works.\r\n * @note `args` are serialized with the [Structured Clone Algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm), so only\r\n * primitive types and `ArrayBuffers` are allowed.\r\n */\r\n invoke: (channel: string, ...args: any[]) => Promise<any>;\r\n}\r\n\r\n/**\r\n * Interface for the backend (Node.js) side of a socket connection. Backends provide the implementation\r\n * of methods that are invoked from the frontend.\r\n * @public\r\n */\r\nexport interface IpcSocketBackend extends IpcSocket {\r\n /**\r\n * Establish a backend implementation of an Ipc interface for a channel.\r\n * @param channel The name of the channel for this handler. Must begin with the [[iTwinChannel]] prefix.\r\n * @param handler A function that supplies the implementation for methods invoked over `channel` via [[IpcSocketFrontend.invoke]]\r\n * @note returns A function to call to remove the handler.\r\n */\r\n handle: (channel: string, handler: (...args: any[]) => Promise<any>) => RemoveFunction;\r\n}\r\n\r\n"]}
1
+ {"version":3,"file":"IpcSocket.js","sourceRoot":"","sources":["../../../src/ipc/IpcSocket.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;KAGK;AACE,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,SAAS,OAAO,EAAE,CAAC;AAAvD,QAAA,YAAY,gBAA2C","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IpcSocket\n */\n\n/**\n * The prefix for all IpcSocket channels to disambiguate from system channels.\n * @internal\n * */\nexport const iTwinChannel = (channel: string) => `itwin.${channel}`;\n\n/**\n * A function to handle an Ipc message.\n * @public\n */\nexport type IpcListener = (evt: Event, ...args: any[]) => void;\n\n/**\n * Function returned when establishing an Ipc `receive` listener or `invoke` handler. Call this method to remove the listener/handler.\n * @public\n * @extensions\n */\nexport type RemoveFunction = () => void;\n\n/**\n * Payload of an IpcInvoke response. The presence of `error` indicates that the backend threw an exception and the\n * frontend will re-throw an Error with the content of the exception\n * Otherwise the `result` member holds the response.\n * @internal */\nexport type IpcInvokeReturn = { result: any, error?: never } | { result?: never, error: unknown }\n\n/**\n * An inter-process socket connection between a single [IModelHost]($backend) on the backend (the node process), and an [IModelApp]($frontend) on\n * the frontend (the browser process.) Each side will implement this interface to form a two way connection. The frontend and backend\n * processes connected through an IpcSocket don't necessarily have to be on the same computer, but often are.\n * @public\n*/\nexport interface IpcSocket {\n /**\n * Send a message over the socket.\n * @param channel The name of the channel for the message. Must begin with the [[iTwinChannel]] prefix.\n * @param data The optional data of the message.\n * @note `data` is serialized with the [Structured Clone Algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm), so only\n * primitive types and `ArrayBuffers` are allowed.\n */\n send: (channel: string, ...data: any[]) => void;\n /**\n * Establish a handler to receive messages for a channel through a socket.\n * @param channel The name of the channel for the messages. Must begin with the [[iTwinChannel]] prefix.\n * @param listener A function called when messages are sent over `channel`\n * @note returns A function to call to remove the listener.\n */\n addListener: (channel: string, listener: IpcListener) => RemoveFunction;\n /**\n * Remove a previously registered listener\n * @param channel The name of the channel for the listener previously registered with [[addListener]]\n * @param listener The function passed to [[addListener]]\n */\n removeListener: (channel: string, listener: IpcListener) => void;\n}\n\n/**\n * Interface for the frontend (browser) side of a socket connection. Frontends may invoke methods implemented on the backend.\n * @public\n */\nexport interface IpcSocketFrontend extends IpcSocket {\n /**\n * Send a message to the backend via `channel` and expect a result asynchronously.\n * @param channel The name of the channel for the method. Must begin with the [[iTwinChannel]] prefix.\n * @see Electron [ipcRenderer.invoke](https://www.electronjs.org/docs/api/ipc-renderer) documentation for details.\n * Note that this interface *may* be implemented via Electron for desktop apps, or via\n * [WebSockets](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API) for mobile or web-based\n * Ipc connections. In either case, the Electron documentation provides the specifications for how it works.\n * @note `args` are serialized with the [Structured Clone Algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm), so only\n * primitive types and `ArrayBuffers` are allowed.\n */\n invoke: (channel: string, ...args: any[]) => Promise<any>;\n}\n\n/**\n * Interface for the backend (Node.js) side of a socket connection. Backends provide the implementation\n * of methods that are invoked from the frontend.\n * @public\n */\nexport interface IpcSocketBackend extends IpcSocket {\n /**\n * Establish a backend implementation of an Ipc interface for a channel.\n * @param channel The name of the channel for this handler. Must begin with the [[iTwinChannel]] prefix.\n * @param handler A function that supplies the implementation for methods invoked over `channel` via [[IpcSocketFrontend.invoke]]\n * @note returns A function to call to remove the handler.\n */\n handle: (channel: string, handler: (...args: any[]) => Promise<any>) => RemoveFunction;\n}\n\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IpcWebSocket.js","sourceRoot":"","sources":["../../../src/ipc/IpcWebSocket.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH,gBAAgB;AAChB,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,qEAAI,CAAA;IACJ,qEAAI,CAAA;IACJ,yEAAM,CAAA;IACN,6EAAQ,CAAA;IACR,6EAAQ,CAAA;IACR,+EAAS,CAAA;AACX,CAAC,EAPW,uBAAuB,uCAAvB,uBAAuB,QAOlC;AAaD,gBAAgB;AAChB,IAAiB,mBAAmB,CAYnC;AAZD,WAAiB,mBAAmB;IAClC,SAAgB,QAAQ;QACtB,OAAO,EAAE,IAAI,EAAE,uBAAuB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC;IACpG,CAAC;IAFe,4BAAQ,WAEvB,CAAA;IAED,SAAgB,SAAS;QACvB,OAAO,EAAE,I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S,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;gBAEnE,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC;oBAC1B,IAAI,EAAE,uBAAuB,CAAC,QAAQ;oBACtC,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,QAAQ,EAAE,OAAO,CAAC,OAAO;oBACzB,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,CAAC,CAAC;iBACb,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;CACF;AAzDD,kDAyDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module IpcSocket\r\n */\r\n\r\nimport { IpcListener, IpcSocket, IpcSocketBackend, IpcSocketFrontend, RemoveFunction } from \"./IpcSocket\";\r\nimport { IpcWebSocketTransport } from \"./IpcWebSocketTransport\";\r\n\r\n/** @internal */\r\nexport enum IpcWebSocketMessageType {\r\n Send,\r\n Push,\r\n Invoke,\r\n Response,\r\n Internal,\r\n Duplicate\r\n}\r\n\r\n/** @internal */\r\nexport interface IpcWebSocketMessage {\r\n type: IpcWebSocketMessageType;\r\n request?: number;\r\n response?: number;\r\n channel: string;\r\n method?: string;\r\n data?: any[];\r\n sequence: number;\r\n}\r\n\r\n/** @internal */\r\nexport namespace IpcWebSocketMessage {\r\n export function internal(): IpcWebSocketMessage {\r\n return { type: IpcWebSocketMessageType.Internal, channel: \"\", sequence: Number.MIN_SAFE_INTEGER };\r\n }\r\n\r\n export function duplicate(): IpcWebSocketMessage {\r\n return { type: IpcWebSocketMessageType.Duplicate, channel: \"\", sequence: Number.MIN_SAFE_INTEGER };\r\n }\r\n\r\n export function skip(message: IpcWebSocketMessage): boolean {\r\n return message.type === IpcWebSocketMessageType.Internal || message.type === IpcWebSocketMessageType.Duplicate;\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport abstract class IpcWebSocket implements IpcSocket {\r\n public static transport: IpcWebSocketTransport;\r\n public static receivers: Set<(evt: Event, message: IpcWebSocketMessage) => void> = new Set();\r\n\r\n protected _channels = new Map<string, Set<IpcListener>>();\r\n\r\n public constructor() {\r\n IpcWebSocket.receivers.add(async (e, m) => this.broadcast(e, m));\r\n }\r\n\r\n public abstract send(channel: string, ...data: any[]): void;\r\n\r\n public addListener(channel: string, listener: IpcListener): RemoveFunction {\r\n let listeners = this._channels.get(channel);\r\n if (!listeners) {\r\n listeners = new Set();\r\n this._channels.set(channel, listeners);\r\n }\r\n\r\n if (!listeners.has(listener))\r\n listeners.add(listener);\r\n\r\n return () => listeners.delete(listener);\r\n }\r\n\r\n public removeListener(channel: string, listener: IpcListener) {\r\n this._channels.get(channel)?.delete(listener);\r\n }\r\n\r\n private async broadcast(evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Send && message.type !== IpcWebSocketMessageType.Push)\r\n return;\r\n\r\n const handlers = this._channels.get(message.channel);\r\n if (!handlers)\r\n return;\r\n\r\n let arg = message.data;\r\n if (typeof (arg) === \"undefined\")\r\n arg = [];\r\n\r\n for (const handler of handlers)\r\n handler(evt, ...arg);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class IpcWebSocketFrontend extends IpcWebSocket implements IpcSocketFrontend {\r\n private _nextRequest = 0;\r\n private _pendingRequests = new Map<number, (response: any) => void>();\r\n\r\n public constructor() {\r\n super();\r\n IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));\r\n }\r\n\r\n public send(channel: string, ...data: any[]): void {\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Send, channel, data, sequence: -1 });\r\n }\r\n\r\n public async invoke(channel: string, methodName: string, ...args: any[]): Promise<any> {\r\n const requestId = ++this._nextRequest;\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Invoke, channel, method: methodName, data: args, request: requestId, sequence: -1 });\r\n\r\n return new Promise((resolve) => {\r\n this._pendingRequests.set(requestId, resolve);\r\n });\r\n }\r\n\r\n private async dispatch(_evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Response || !message.response)\r\n return;\r\n\r\n const pendingHandler = this._pendingRequests.get(message.response);\r\n if (!pendingHandler)\r\n return;\r\n\r\n this._pendingRequests.delete(message.response);\r\n pendingHandler(message.data);\r\n }\r\n}\r\n\r\n/** @internal */\r\nexport class IpcWebSocketBackend extends IpcWebSocket implements IpcSocketBackend {\r\n private _handlers = new Map<string, (event: Event, methodName: string, ...args: any[]) => Promise<any>>();\r\n private _processingQueue: IpcWebSocketMessage[] = [];\r\n\r\n public constructor() {\r\n super();\r\n IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));\r\n }\r\n\r\n public send(channel: string, ...data: any[]): void {\r\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Push, channel, data, sequence: -1 });\r\n }\r\n\r\n public handle(channel: string, handler: (event: Event, methodName: string, ...args: any[]) => Promise<any>): RemoveFunction {\r\n this._handlers.set(channel, handler);\r\n\r\n return () => {\r\n if (this._handlers.get(channel) === handler)\r\n this._handlers.delete(channel);\r\n };\r\n }\r\n\r\n private async dispatch(_evt: Event, message: IpcWebSocketMessage) {\r\n if (message.type !== IpcWebSocketMessageType.Invoke)\r\n return;\r\n\r\n this._processingQueue.push(message);\r\n await this.processMessages();\r\n }\r\n\r\n private async processMessages() {\r\n if (!this._processingQueue.length) {\r\n return;\r\n }\r\n\r\n const message = this._processingQueue.shift();\r\n if (message && message.method) {\r\n const handler = this._handlers.get(message.channel);\r\n if (handler) {\r\n let args = message.data;\r\n if (typeof (args) === \"undefined\")\r\n args = [];\r\n\r\n const response = await handler({} as any, message.method, ...args);\r\n\r\n IpcWebSocket.transport.send({\r\n type: IpcWebSocketMessageType.Response,\r\n channel: message.channel,\r\n response: message.request,\r\n data: response,\r\n sequence: -1,\r\n });\r\n }\r\n }\r\n\r\n await this.processMessages();\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"IpcWebSocket.js","sourceRoot":"","sources":["../../../src/ipc/IpcWebSocket.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH,gBAAgB;AAChB,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,qEAAI,CAAA;IACJ,qEAAI,CAAA;IACJ,yEAAM,CAAA;IACN,6EAAQ,CAAA;IACR,6EAAQ,CAAA;IACR,+EAAS,CAAA;AACX,CAAC,EAPW,uBAAuB,uCAAvB,uBAAuB,QAOlC;AAaD,gBAAgB;AAChB,IAAiB,mBAAmB,CAYnC;AAZD,WAAiB,mBAAmB;IAClC,SAAgB,QAAQ;QACtB,OAAO,EAAE,IAAI,EAAE,uBAAuB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC;IACpG,CAAC;IAFe,4BAAQ,WAEvB,CAAA;IAED,SAAgB,SAAS;QACvB,OAAO,EAAE,IAAI,EAAE,uBAAuB,CAAC,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC;IACrG,CAAC;IAFe,6BAAS,YAExB,CAAA;IAED,SAAgB,IAAI,CAAC,OAA4B;QAC/C,OAAO,OAAO,CAAC,IAAI,KAAK,uBAAuB,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,KAAK,uBAAuB,CAAC,SAAS,CAAC;IACjH,CAAC;IAFe,wBAAI,OAEnB,CAAA;AACH,CAAC,EAZgB,mBAAmB,mCAAnB,mBAAmB,QAYnC;AAED,gBAAgB;AAChB,MAAsB,YAAY;IACzB,MAAM,CAAC,SAAS,CAAwB;IACxC,MAAM,CAAC,SAAS,GAA4D,IAAI,GAAG,EAAE,CAAC;IAEnF,SAAS,GAAG,IAAI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OAAO,CAAC,IAAI,KAAK,uBAAuB,CAAC,MAAM;YACjD,OAAO;QAET,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;IAEO,KAAK,CAAC,eAAe;QAC3B,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC;YAClC,OAAO;QACT,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC;QAC9C,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YAC9B,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACpD,IAAI,OAAO,EAAE,CAAC;gBACZ,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;gBACxB,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,WAAW;oBAC/B,IAAI,GAAG,EAAE,CAAC;gBAEZ,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,EAAS,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;gBAEnE,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC;oBAC1B,IAAI,EAAE,uBAAuB,CAAC,QAAQ;oBACtC,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,QAAQ,EAAE,OAAO,CAAC,OAAO;oBACzB,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,CAAC,CAAC;iBACb,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;CACF;AAzDD,kDAyDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IpcSocket\n */\n\nimport { IpcListener, IpcSocket, IpcSocketBackend, IpcSocketFrontend, RemoveFunction } from \"./IpcSocket\";\nimport { IpcWebSocketTransport } from \"./IpcWebSocketTransport\";\n\n/** @internal */\nexport enum IpcWebSocketMessageType {\n Send,\n Push,\n Invoke,\n Response,\n Internal,\n Duplicate\n}\n\n/** @internal */\nexport interface IpcWebSocketMessage {\n type: IpcWebSocketMessageType;\n request?: number;\n response?: number;\n channel: string;\n method?: string;\n data?: any[];\n sequence: number;\n}\n\n/** @internal */\nexport namespace IpcWebSocketMessage {\n export function internal(): IpcWebSocketMessage {\n return { type: IpcWebSocketMessageType.Internal, channel: \"\", sequence: Number.MIN_SAFE_INTEGER };\n }\n\n export function duplicate(): IpcWebSocketMessage {\n return { type: IpcWebSocketMessageType.Duplicate, channel: \"\", sequence: Number.MIN_SAFE_INTEGER };\n }\n\n export function skip(message: IpcWebSocketMessage): boolean {\n return message.type === IpcWebSocketMessageType.Internal || message.type === IpcWebSocketMessageType.Duplicate;\n }\n}\n\n/** @internal */\nexport abstract class IpcWebSocket implements IpcSocket {\n public static transport: IpcWebSocketTransport;\n public static receivers: Set<(evt: Event, message: IpcWebSocketMessage) => void> = new Set();\n\n protected _channels = new Map<string, Set<IpcListener>>();\n\n public constructor() {\n IpcWebSocket.receivers.add(async (e, m) => this.broadcast(e, m));\n }\n\n public abstract send(channel: string, ...data: any[]): void;\n\n public addListener(channel: string, listener: IpcListener): RemoveFunction {\n let listeners = this._channels.get(channel);\n if (!listeners) {\n listeners = new Set();\n this._channels.set(channel, listeners);\n }\n\n if (!listeners.has(listener))\n listeners.add(listener);\n\n return () => listeners.delete(listener);\n }\n\n public removeListener(channel: string, listener: IpcListener) {\n this._channels.get(channel)?.delete(listener);\n }\n\n private async broadcast(evt: Event, message: IpcWebSocketMessage) {\n if (message.type !== IpcWebSocketMessageType.Send && message.type !== IpcWebSocketMessageType.Push)\n return;\n\n const handlers = this._channels.get(message.channel);\n if (!handlers)\n return;\n\n let arg = message.data;\n if (typeof (arg) === \"undefined\")\n arg = [];\n\n for (const handler of handlers)\n handler(evt, ...arg);\n }\n}\n\n/** @internal */\nexport class IpcWebSocketFrontend extends IpcWebSocket implements IpcSocketFrontend {\n private _nextRequest = 0;\n private _pendingRequests = new Map<number, (response: any) => void>();\n\n public constructor() {\n super();\n IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));\n }\n\n public send(channel: string, ...data: any[]): void {\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Send, channel, data, sequence: -1 });\n }\n\n public async invoke(channel: string, methodName: string, ...args: any[]): Promise<any> {\n const requestId = ++this._nextRequest;\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Invoke, channel, method: methodName, data: args, request: requestId, sequence: -1 });\n\n return new Promise((resolve) => {\n this._pendingRequests.set(requestId, resolve);\n });\n }\n\n private async dispatch(_evt: Event, message: IpcWebSocketMessage) {\n if (message.type !== IpcWebSocketMessageType.Response || !message.response)\n return;\n\n const pendingHandler = this._pendingRequests.get(message.response);\n if (!pendingHandler)\n return;\n\n this._pendingRequests.delete(message.response);\n pendingHandler(message.data);\n }\n}\n\n/** @internal */\nexport class IpcWebSocketBackend extends IpcWebSocket implements IpcSocketBackend {\n private _handlers = new Map<string, (event: Event, methodName: string, ...args: any[]) => Promise<any>>();\n private _processingQueue: IpcWebSocketMessage[] = [];\n\n public constructor() {\n super();\n IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));\n }\n\n public send(channel: string, ...data: any[]): void {\n IpcWebSocket.transport.send({ type: IpcWebSocketMessageType.Push, channel, data, sequence: -1 });\n }\n\n public handle(channel: string, handler: (event: Event, methodName: string, ...args: any[]) => Promise<any>): RemoveFunction {\n this._handlers.set(channel, handler);\n\n return () => {\n if (this._handlers.get(channel) === handler)\n this._handlers.delete(channel);\n };\n }\n\n private async dispatch(_evt: Event, message: IpcWebSocketMessage) {\n if (message.type !== IpcWebSocketMessageType.Invoke)\n return;\n\n this._processingQueue.push(message);\n await this.processMessages();\n }\n\n private async processMessages() {\n if (!this._processingQueue.length) {\n return;\n }\n\n const message = this._processingQueue.shift();\n if (message && message.method) {\n const handler = this._handlers.get(message.channel);\n if (handler) {\n let args = message.data;\n if (typeof (args) === \"undefined\")\n args = [];\n\n const response = await handler({} as any, message.method, ...args);\n\n IpcWebSocket.transport.send({\n type: IpcWebSocketMessageType.Response,\n channel: message.channel,\n response: message.request,\n data: response,\n sequence: -1,\n });\n }\n }\n\n await this.processMessages();\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IpcWebSocketTransport.js","sourceRoot":"","sources":["../../../src/ipc/IpcWebSocketTransport.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,iDAAqD;AAErD,SAAS,QAAQ,CAAC,GAAQ;IACxB,OAAO,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,UAAU,IAAI,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC9I,CAAC;AAED,IAAI,KAAK,GAAU,EAAE,CAAC;AAEtB,gBAAgB;AAChB,MAAsB,qBAAqB;IACjC,QAAQ,CAAU;IAClB,SAAS,GAAU,EAAE,CAAC;IACtB,YAAY,GAAG,CAAC,CAAC;IAIf,MAAM,CAAC,IAAS;QACxB,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,WAAW,IAAI,IAAI,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7F,CAAC;IAES,KAAK,CAAC,cAAc,CAAC,IAAS,EAAE,UAAe;QACvD,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;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,OAAO,EAAE,CAAC;YACjB,CAAC;iBAAM,CAAC;gBACN,MAAM;YACR,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC,OAAO,CAAC;IACvB,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,UAAe;QACjC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;IAEM,OAAO,GAAG,GAAG,EAAE,GAAG,CAAC,CAAC;IACpB,QAAQ,CAAS;IACjB,SAAS,GAAG,KAAK,CAAC;IAClB,OAAO,CAA+B;IAE7C,YAAoB,OAA4B;QAC9C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QAEjC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,WAAW,EAAuB,CAAC;QAChE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,IAAI,CAAC,OAAO,GAAG,GAAG,EAAE;YAClB,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,kCAAmB,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;YACzE,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC,CAAC;IACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module IpcSocket\r\n */\r\n\r\nimport { IpcWebSocketMessage } from \"./IpcWebSocket\";\r\n\r\nfunction isBuffer(val: any): boolean {\r\n return val && typeof (val.constructor) !== \"undefined\" && typeof (val.constructor.isBuffer) === \"function\" && val.constructor.isBuffer(val);\r\n}\r\n\r\nlet parts: any[] = [];\r\n\r\n/** @internal */\r\nexport abstract class IpcWebSocketTransport {\r\n private _partial?: string;\r\n private _received: any[] = [];\r\n private _outstanding = 0;\r\n\r\n public abstract send(message: IpcWebSocketMessage): void;\r\n\r\n protected unwrap(data: any) {\r\n return (typeof (Blob) !== \"undefined\" && data instanceof Blob) ? data.arrayBuffer() : data;\r\n }\r\n\r\n protected async notifyIncoming(data: any, connection: any): Promise<IpcWebSocketMessage> {\r\n if (this._partial) {\r\n this._received.push(data);\r\n --this._outstanding;\r\n\r\n if (this._outstanding === 0) {\r\n const partial = this._partial;\r\n const received = this._received;\r\n this._partial = undefined;\r\n this._received = [];\r\n await Promise.all(received.map(async (v, i, a) => a[i] = await this.unwrap(v)));\r\n\r\n parts = received;\r\n const message: IpcWebSocketMessage = JSON.parse(partial, reviver);\r\n parts.length = 0;\r\n\r\n return InSentOrder.deliver(message, connection);\r\n } else {\r\n return IpcWebSocketMessage.internal();\r\n }\r\n } else {\r\n const [serialized, followers] = JSON.parse(data);\r\n\r\n if (followers) {\r\n this._partial = serialized;\r\n this._outstanding = followers;\r\n return IpcWebSocketMessage.internal();\r\n } else {\r\n const message: IpcWebSocketMessage = JSON.parse(serialized, reviver);\r\n return InSentOrder.deliver(message, connection);\r\n }\r\n }\r\n }\r\n\r\n protected serialize(data: IpcWebSocketMessage): any[] {\r\n parts.length = 0;\r\n const objects = JSON.stringify(data, replacer);\r\n const value = [JSON.stringify([objects, parts.length]), ...parts];\r\n parts.length = 0;\r\n return value;\r\n }\r\n\r\n protected notifyClose(connection: any) {\r\n InSentOrder.close(connection);\r\n }\r\n}\r\n\r\ninterface Marker { ipc: \"binary\", type: number, index: number }\r\nconst types = [Uint8Array, Int8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, DataView];\r\nfunction identify(value: any) {\r\n return isBuffer(value) ? 0 : types.indexOf(value.constructor);\r\n}\r\n\r\nfunction lookup(value: Marker) {\r\n return types[value.type];\r\n}\r\n\r\nfunction replacer(this: any, _key: string, value: any) {\r\n const asBinary = replaceBinary(value);\r\n if (asBinary) {\r\n return asBinary;\r\n }\r\n\r\n return value;\r\n}\r\n\r\nfunction reviver(_key: string, value: any) {\r\n if (typeof (value) === \"object\" && value !== null && value.hasOwnProperty(\"ipc\") && value.ipc === \"binary\") {\r\n return reviveBinary(value);\r\n }\r\n\r\n return value;\r\n}\r\n\r\nfunction replaceBinary(value: any): Marker | undefined {\r\n if (ArrayBuffer.isView(value) || isBuffer(value)) {\r\n const index = parts.push(value) - 1;\r\n const type = identify(value);\r\n return { ipc: \"binary\", type, index };\r\n } else {\r\n return undefined;\r\n }\r\n}\r\n\r\nfunction reviveBinary(value: Marker): ArrayBufferView {\r\n const constructor = lookup(value);\r\n const part = parts[value.index];\r\n return new constructor(part);\r\n}\r\n\r\nfunction makePromise<T>() {\r\n let resolve: (value: T | PromiseLike<T>) => void = () => { };\r\n let reject: (reason?: any) => void = () => { };\r\n const promise = new Promise<T>((res, rej) => {\r\n resolve = res;\r\n reject = rej;\r\n });\r\n\r\n return { promise, resolve, reject };\r\n}\r\n\r\n/* Reconstructing the sequence in which messages were sent is necessary since\r\n the binary data for a message has to be awaited in IpcWebSocketTransport.unwrap. */\r\nclass InSentOrder {\r\n private static _connections: Map<any, { queue: InSentOrder[], last: number }> = new Map();\r\n\r\n public static async deliver(message: IpcWebSocketMessage, connection: any): Promise<IpcWebSocketMessage> {\r\n let context = this._connections.get(connection);\r\n if (!context) {\r\n context = { queue: [], last: -1 };\r\n this._connections.set(connection, context);\r\n }\r\n\r\n const entry = new InSentOrder(message);\r\n context.queue.push(entry);\r\n context.queue.sort((a, b) => a.sequence - b.sequence);\r\n\r\n while (context.queue.length !== 0) {\r\n const next = context.queue[0];\r\n const duplicate = next.sequence <= context.last;\r\n const match = next.sequence === (context.last + 1);\r\n\r\n if (duplicate) {\r\n next.duplicate = true;\r\n } else if (match) {\r\n ++context.last;\r\n }\r\n\r\n if (duplicate || match) {\r\n context.queue.shift();\r\n next.release();\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n return entry.message;\r\n }\r\n\r\n public static close(connection: any) {\r\n this._connections.delete(connection);\r\n }\r\n\r\n public release = () => { };\r\n public sequence: number;\r\n public duplicate = false;\r\n public message: Promise<IpcWebSocketMessage>;\r\n\r\n private constructor(message: IpcWebSocketMessage) {\r\n this.sequence = message.sequence;\r\n\r\n const { promise, resolve } = makePromise<IpcWebSocketMessage>();\r\n this.message = promise;\r\n\r\n this.release = () => {\r\n const value = this.duplicate ? IpcWebSocketMessage.duplicate() : message;\r\n resolve(value);\r\n };\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"IpcWebSocketTransport.js","sourceRoot":"","sources":["../../../src/ipc/IpcWebSocketTransport.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,iDAAqD;AAErD,SAAS,QAAQ,CAAC,GAAQ;IACxB,OAAO,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,WAAW,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,UAAU,IAAI,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAC9I,CAAC;AAED,IAAI,KAAK,GAAU,EAAE,CAAC;AAEtB,gBAAgB;AAChB,MAAsB,qBAAqB;IACjC,QAAQ,CAAU;IAClB,SAAS,GAAU,EAAE,CAAC;IACtB,YAAY,GAAG,CAAC,CAAC;IAIf,MAAM,CAAC,IAAS;QACxB,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,WAAW,IAAI,IAAI,YAAY,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7F,CAAC;IAES,KAAK,CAAC,cAAc,CAAC,IAAS,EAAE,UAAe;QACvD,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1B,EAAE,IAAI,CAAC,YAAY,CAAC;YAEpB,IAAI,IAAI,CAAC,YAAY,KA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,CAAC;QAED,OAAO,KAAK,CAAC,OAAO,CAAC;IACvB,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,UAAe;QACjC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;IAEM,OAAO,GAAG,GAAG,EAAE,GAAG,CAAC,CAAC;IACpB,QAAQ,CAAS;IACjB,SAAS,GAAG,KAAK,CAAC;IAClB,OAAO,CAA+B;IAE7C,YAAoB,OAA4B;QAC9C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QAEjC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,WAAW,EAAuB,CAAC;QAChE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,IAAI,CAAC,OAAO,GAAG,GAAG,EAAE;YAClB,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,kCAAmB,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;YACzE,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC,CAAC;IACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IpcSocket\n */\n\nimport { IpcWebSocketMessage } from \"./IpcWebSocket\";\n\nfunction isBuffer(val: any): boolean {\n return val && typeof (val.constructor) !== \"undefined\" && typeof (val.constructor.isBuffer) === \"function\" && val.constructor.isBuffer(val);\n}\n\nlet parts: any[] = [];\n\n/** @internal */\nexport abstract class IpcWebSocketTransport {\n private _partial?: string;\n private _received: any[] = [];\n private _outstanding = 0;\n\n public abstract send(message: IpcWebSocketMessage): void;\n\n protected unwrap(data: any) {\n return (typeof (Blob) !== \"undefined\" && data instanceof Blob) ? data.arrayBuffer() : data;\n }\n\n protected async notifyIncoming(data: any, connection: any): Promise<IpcWebSocketMessage> {\n if (this._partial) {\n this._received.push(data);\n --this._outstanding;\n\n if (this._outstanding === 0) {\n const partial = this._partial;\n const received = this._received;\n this._partial = undefined;\n this._received = [];\n await Promise.all(received.map(async (v, i, a) => a[i] = await this.unwrap(v)));\n\n parts = received;\n const message: IpcWebSocketMessage = JSON.parse(partial, reviver);\n parts.length = 0;\n\n return InSentOrder.deliver(message, connection);\n } else {\n return IpcWebSocketMessage.internal();\n }\n } else {\n const [serialized, followers] = JSON.parse(data);\n\n if (followers) {\n this._partial = serialized;\n this._outstanding = followers;\n return IpcWebSocketMessage.internal();\n } else {\n const message: IpcWebSocketMessage = JSON.parse(serialized, reviver);\n return InSentOrder.deliver(message, connection);\n }\n }\n }\n\n protected serialize(data: IpcWebSocketMessage): any[] {\n parts.length = 0;\n const objects = JSON.stringify(data, replacer);\n const value = [JSON.stringify([objects, parts.length]), ...parts];\n parts.length = 0;\n return value;\n }\n\n protected notifyClose(connection: any) {\n InSentOrder.close(connection);\n }\n}\n\ninterface Marker { ipc: \"binary\", type: number, index: number }\nconst types = [Uint8Array, Int8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, DataView];\nfunction identify(value: any) {\n return isBuffer(value) ? 0 : types.indexOf(value.constructor);\n}\n\nfunction lookup(value: Marker) {\n return types[value.type];\n}\n\nfunction replacer(this: any, _key: string, value: any) {\n const asBinary = replaceBinary(value);\n if (asBinary) {\n return asBinary;\n }\n\n return value;\n}\n\nfunction reviver(_key: string, value: any) {\n if (typeof (value) === \"object\" && value !== null && value.hasOwnProperty(\"ipc\") && value.ipc === \"binary\") {\n return reviveBinary(value);\n }\n\n return value;\n}\n\nfunction replaceBinary(value: any): Marker | undefined {\n if (ArrayBuffer.isView(value) || isBuffer(value)) {\n const index = parts.push(value) - 1;\n const type = identify(value);\n return { ipc: \"binary\", type, index };\n } else {\n return undefined;\n }\n}\n\nfunction reviveBinary(value: Marker): ArrayBufferView {\n const constructor = lookup(value);\n const part = parts[value.index];\n return new constructor(part);\n}\n\nfunction makePromise<T>() {\n let resolve: (value: T | PromiseLike<T>) => void = () => { };\n let reject: (reason?: any) => void = () => { };\n const promise = new Promise<T>((res, rej) => {\n resolve = res;\n reject = rej;\n });\n\n return { promise, resolve, reject };\n}\n\n/* Reconstructing the sequence in which messages were sent is necessary since\n the binary data for a message has to be awaited in IpcWebSocketTransport.unwrap. */\nclass InSentOrder {\n private static _connections: Map<any, { queue: InSentOrder[], last: number }> = new Map();\n\n public static async deliver(message: IpcWebSocketMessage, connection: any): Promise<IpcWebSocketMessage> {\n let context = this._connections.get(connection);\n if (!context) {\n context = { queue: [], last: -1 };\n this._connections.set(connection, context);\n }\n\n const entry = new InSentOrder(message);\n context.queue.push(entry);\n context.queue.sort((a, b) => a.sequence - b.sequence);\n\n while (context.queue.length !== 0) {\n const next = context.queue[0];\n const duplicate = next.sequence <= context.last;\n const match = next.sequence === (context.last + 1);\n\n if (duplicate) {\n next.duplicate = true;\n } else if (match) {\n ++context.last;\n }\n\n if (duplicate || match) {\n context.queue.shift();\n next.release();\n } else {\n break;\n }\n }\n\n return entry.message;\n }\n\n public static close(connection: any) {\n this._connections.delete(connection);\n }\n\n public release = () => { };\n public sequence: number;\n public duplicate = false;\n public message: Promise<IpcWebSocketMessage>;\n\n private constructor(message: IpcWebSocketMessage) {\n this.sequence = message.sequence;\n\n const { promise, resolve } = makePromise<IpcWebSocketMessage>();\n this.message = promise;\n\n this.release = () => {\n const value = this.duplicate ? IpcWebSocketMessage.duplicate() : message;\n resolve(value);\n };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"DevToolsRpcInterface.js","sourceRoot":"","sources":["../../../src/rpc/DevToolsRpcInterface.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,kDAA+C;AAC/C,8CAA2C;AAE3C;;GAEG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,+DAAQ,CAAA;IAER,oFAAoF;IACpF,6EAAe,CAAA;AACjB,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B;AAED;;;GAGG;AACH,MAAsB,oBAAqB,SAAQ,2BAAY;IAC7D,oEAAoE;IAC7D,MAAM,CAAC,SAAS,KAA2B,OAAO,uBAAU,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAElH,2CAA2C;IACpC,MAAM,CAAU,aAAa,GAAG,sBAAsB,CAAC;IAE9D;;OAEG;IACI,MAAM,CAAC,gBAAgB,GAAG,OAAO,CAAC;IAEzC;;;gGAG4F;IAC5F,iEAAiE;IAC1D,KAAK,CAAC,IAAI,CAAC,YAA4B,IAAsB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAErG,qEAAqE;IAC9D,KAAK,CAAC,KAAK,CAAC,YAA4B,EAAE,QAA8B,IAAkB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAElI,uEAAuE;IAChE,KAAK,CAAC,QAAQ,CAAC,YAA4B;QAChD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACrD,QAAQ,CAAC,aAAa,GAAG,MAAM,uBAAU,CAAC,0BAA0B,EAAE,CAAC;QACvE,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,gFAAgF;IACzE,KAAK,CAAC,WAAW,CAAC,YAA4B,EAAE,eAAuB,EAAE,SAAmB,IAAmC,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;;AA9BzK,oDA+BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module RpcInterface\r\n */\r\n\r\nimport { LogLevel } from \"@itwin/core-bentley\";\r\nimport { IModelRpcProps } from \"../IModel\";\r\nimport { RpcInterface } from \"../RpcInterface\";\r\nimport { RpcManager } from \"../RpcManager\";\r\n\r\n/** Options to get the backend statistics\r\n * @internal\r\n */\r\nexport enum DevToolsStatsOptions {\r\n None = 0,\r\n\r\n /** All unitized values are setup as formatted strings with the appropriate units */\r\n FormatUnits = 1,\r\n}\r\n\r\n/** The purpose of this class is to house RPC methods for developer tools.\r\n * Note that this should NOT be used in production environments.\r\n * @internal\r\n */\r\nexport abstract class DevToolsRpcInterface extends RpcInterface {\r\n /** Returns the IModelReadRpcInterface instance for the frontend. */\r\n public static getClient(): DevToolsRpcInterface { return RpcManager.getClientForInterface(DevToolsRpcInterface); }\r\n\r\n /** The immutable name of the interface. */\r\n public static readonly interfaceName = \"DevToolsRpcInterface\";\r\n\r\n /** The semantic version of the interface.\r\n * @note The DevToolsRpcInterface will remain at 0.x since it is for testing only and not intended for production.\r\n */\r\n public static interfaceVersion = \"0.7.0\";\r\n\r\n /*===========================================================================================\r\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\r\n NOTE: Please consult the README in this folder for the semantic versioning rules.\r\n ==========================================================================================*/\r\n // Sends a ping and returns true if the backend received the ping\r\n public async ping(_iModelToken: IModelRpcProps): Promise<boolean> { return this.forward(arguments); }\r\n\r\n // Returns JSON object with backend performance and memory statistics\r\n public async stats(_iModelToken: IModelRpcProps, _options: DevToolsStatsOptions): Promise<any> { return this.forward(arguments); }\r\n\r\n // Returns JSON object with backend versions (application and iModelJs)\r\n public async versions(_iModelToken: IModelRpcProps): Promise<any> {\r\n const versions = await this.forward(arguments) || {};\r\n versions.availableRpcs = await RpcManager.describeAvailableEndpoints();\r\n return versions;\r\n }\r\n\r\n // Sets a new log level for the specified category and returns the old log level\r\n public async setLogLevel(_iModelToken: IModelRpcProps, _loggerCategory: string, _logLevel: LogLevel): Promise<LogLevel | undefined> { return this.forward(arguments); }\r\n}\r\n"]}
1
+ {"version":3,"file":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CAAC;;AA9BzK,oDA+BC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module RpcInterface\n */\n\nimport { LogLevel } from \"@itwin/core-bentley\";\nimport { IModelRpcProps } from \"../IModel\";\nimport { RpcInterface } from \"../RpcInterface\";\nimport { RpcManager } from \"../RpcManager\";\n\n/** Options to get the backend statistics\n * @internal\n */\nexport enum DevToolsStatsOptions {\n None = 0,\n\n /** All unitized values are setup as formatted strings with the appropriate units */\n FormatUnits = 1,\n}\n\n/** The purpose of this class is to house RPC methods for developer tools.\n * Note that this should NOT be used in production environments.\n * @internal\n */\nexport abstract class DevToolsRpcInterface extends RpcInterface {\n /** Returns the IModelReadRpcInterface instance for the frontend. */\n public static getClient(): DevToolsRpcInterface { return RpcManager.getClientForInterface(DevToolsRpcInterface); }\n\n /** The immutable name of the interface. */\n public static readonly interfaceName = \"DevToolsRpcInterface\";\n\n /** The semantic version of the interface.\n * @note The DevToolsRpcInterface will remain at 0.x since it is for testing only and not intended for production.\n */\n public static interfaceVersion = \"0.7.0\";\n\n /*===========================================================================================\n NOTE: Any add/remove/change to the methods below requires an update of the interface version.\n NOTE: Please consult the README in this folder for the semantic versioning rules.\n ==========================================================================================*/\n // Sends a ping and returns true if the backend received the ping\n public async ping(_iModelToken: IModelRpcProps): Promise<boolean> { return this.forward(arguments); }\n\n // Returns JSON object with backend performance and memory statistics\n public async stats(_iModelToken: IModelRpcProps, _options: DevToolsStatsOptions): Promise<any> { return this.forward(arguments); }\n\n // Returns JSON object with backend versions (application and iModelJs)\n public async versions(_iModelToken: IModelRpcProps): Promise<any> {\n const versions = await this.forward(arguments) || {};\n versions.availableRpcs = await RpcManager.describeAvailableEndpoints();\n return versions;\n }\n\n // Sets a new log level for the specified category and returns the old log level\n public async setLogLevel(_iModelToken: IModelRpcProps, _loggerCategory: string, _logLevel: LogLevel): Promise<LogLevel | undefined> { return this.forward(arguments); }\n}\n"]}