@itwin/core-common 5.1.0-dev.9 → 5.2.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 (240) hide show
  1. package/CHANGELOG.md +91 -1
  2. package/lib/cjs/BackgroundMapSettings.d.ts +2 -2
  3. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  4. package/lib/cjs/ChangesetProps.d.ts +28 -0
  5. package/lib/cjs/ChangesetProps.d.ts.map +1 -1
  6. package/lib/cjs/ChangesetProps.js.map +1 -1
  7. package/lib/cjs/ClipStyle.d.ts +1 -1
  8. package/lib/cjs/ClipStyle.d.ts.map +1 -1
  9. package/lib/cjs/ClipStyle.js.map +1 -1
  10. package/lib/cjs/CommonLoggerCategory.d.ts +2 -0
  11. package/lib/cjs/CommonLoggerCategory.d.ts.map +1 -1
  12. package/lib/cjs/CommonLoggerCategory.js +2 -0
  13. package/lib/cjs/CommonLoggerCategory.js.map +1 -1
  14. package/lib/cjs/ConcurrentQuery.d.ts +8 -23
  15. package/lib/cjs/ConcurrentQuery.d.ts.map +1 -1
  16. package/lib/cjs/ConcurrentQuery.js +1 -11
  17. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  18. package/lib/cjs/ContextRealityModel.d.ts +8 -8
  19. package/lib/cjs/ContextRealityModel.js +8 -8
  20. package/lib/cjs/ContextRealityModel.js.map +1 -1
  21. package/lib/cjs/ElementProps.d.ts +64 -54
  22. package/lib/cjs/ElementProps.d.ts.map +1 -1
  23. package/lib/cjs/ElementProps.js +6 -6
  24. package/lib/cjs/ElementProps.js.map +1 -1
  25. package/lib/cjs/EntityProps.d.ts +10 -10
  26. package/lib/cjs/EntityProps.d.ts.map +1 -1
  27. package/lib/cjs/EntityProps.js +4 -2
  28. package/lib/cjs/EntityProps.js.map +1 -1
  29. package/lib/cjs/Fonts.d.ts +2 -2
  30. package/lib/cjs/Fonts.js +1 -1
  31. package/lib/cjs/Fonts.js.map +1 -1
  32. package/lib/cjs/GeoCoordinateServices.d.ts +1 -1
  33. package/lib/cjs/GeoCoordinateServices.js +1 -1
  34. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  35. package/lib/cjs/GeometryParams.d.ts +3 -1
  36. package/lib/cjs/GeometryParams.d.ts.map +1 -1
  37. package/lib/cjs/GeometryParams.js +3 -1
  38. package/lib/cjs/GeometryParams.js.map +1 -1
  39. package/lib/cjs/GraphicParams.d.ts +1 -0
  40. package/lib/cjs/GraphicParams.d.ts.map +1 -1
  41. package/lib/cjs/GraphicParams.js +1 -0
  42. package/lib/cjs/GraphicParams.js.map +1 -1
  43. package/lib/cjs/IModel.d.ts +3 -3
  44. package/lib/cjs/IModel.js.map +1 -1
  45. package/lib/cjs/ITwinCoreErrors.d.ts +1 -1
  46. package/lib/cjs/ITwinCoreErrors.d.ts.map +1 -1
  47. package/lib/cjs/ITwinCoreErrors.js.map +1 -1
  48. package/lib/cjs/MassProperties.d.ts +2 -2
  49. package/lib/cjs/MassProperties.js.map +1 -1
  50. package/lib/cjs/MaterialProps.d.ts +6 -3
  51. package/lib/cjs/MaterialProps.d.ts.map +1 -1
  52. package/lib/cjs/MaterialProps.js.map +1 -1
  53. package/lib/cjs/RenderSchedule.d.ts +14 -0
  54. package/lib/cjs/RenderSchedule.d.ts.map +1 -1
  55. package/lib/cjs/RenderSchedule.js +4 -0
  56. package/lib/cjs/RenderSchedule.js.map +1 -1
  57. package/lib/cjs/RenderTexture.d.ts +1 -1
  58. package/lib/cjs/RenderTexture.d.ts.map +1 -1
  59. package/lib/cjs/RenderTexture.js.map +1 -1
  60. package/lib/cjs/TerrainSettings.d.ts +1 -1
  61. package/lib/cjs/TerrainSettings.d.ts.map +1 -1
  62. package/lib/cjs/TerrainSettings.js.map +1 -1
  63. package/lib/cjs/annotation/TextAnnotation.d.ts +78 -2
  64. package/lib/cjs/annotation/TextAnnotation.d.ts.map +1 -1
  65. package/lib/cjs/annotation/TextAnnotation.js +63 -10
  66. package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
  67. package/lib/cjs/annotation/TextBlock.d.ts +179 -44
  68. package/lib/cjs/annotation/TextBlock.d.ts.map +1 -1
  69. package/lib/cjs/annotation/TextBlock.js +210 -57
  70. package/lib/cjs/annotation/TextBlock.js.map +1 -1
  71. package/lib/cjs/annotation/TextBlockGeometryProps.d.ts +1 -1
  72. package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
  73. package/lib/cjs/annotation/TextBlockLayoutResult.d.ts +1 -1
  74. package/lib/cjs/annotation/TextBlockLayoutResult.d.ts.map +1 -1
  75. package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
  76. package/lib/cjs/annotation/TextStyle.d.ts +115 -34
  77. package/lib/cjs/annotation/TextStyle.d.ts.map +1 -1
  78. package/lib/cjs/annotation/TextStyle.js +118 -37
  79. package/lib/cjs/annotation/TextStyle.js.map +1 -1
  80. package/lib/cjs/geometry/AdditionalTransform.d.ts +4 -0
  81. package/lib/cjs/geometry/AdditionalTransform.d.ts.map +1 -1
  82. package/lib/cjs/geometry/AdditionalTransform.js +9 -0
  83. package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
  84. package/lib/cjs/geometry/ElementGeometry.d.ts +1 -1
  85. package/lib/cjs/geometry/ElementGeometry.d.ts.map +1 -1
  86. package/lib/cjs/geometry/ElementGeometry.js +2 -2
  87. package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
  88. package/lib/cjs/internal/BackendTypes.d.ts +3 -3
  89. package/lib/cjs/internal/BackendTypes.d.ts.map +1 -1
  90. package/lib/cjs/internal/BackendTypes.js.map +1 -1
  91. package/lib/cjs/internal/RenderMesh.d.ts +19 -5
  92. package/lib/cjs/internal/RenderMesh.d.ts.map +1 -1
  93. package/lib/cjs/internal/RenderMesh.js +11 -8
  94. package/lib/cjs/internal/RenderMesh.js.map +1 -1
  95. package/lib/cjs/internal/cross-package.d.ts +1 -1
  96. package/lib/cjs/internal/cross-package.d.ts.map +1 -1
  97. package/lib/cjs/internal/cross-package.js.map +1 -1
  98. package/lib/cjs/rpc/IModelReadRpcInterface.d.ts +1 -1
  99. package/lib/cjs/rpc/IModelReadRpcInterface.d.ts.map +1 -1
  100. package/lib/cjs/rpc/IModelReadRpcInterface.js +1 -1
  101. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  102. package/lib/cjs/rpc/SnapshotIModelRpcInterface.d.ts +4 -4
  103. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +4 -4
  104. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  105. package/lib/cjs/rpc/core/RpcConstants.d.ts +6 -6
  106. package/lib/cjs/rpc/core/RpcConstants.d.ts.map +1 -1
  107. package/lib/cjs/rpc/core/RpcConstants.js +6 -6
  108. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  109. package/lib/cjs/rpc/web/OpenAPI.d.ts +1 -1
  110. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  111. package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
  112. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +2 -2
  113. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  114. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  115. package/lib/cjs/tile/IModelTileIO.js +2 -2
  116. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  117. package/lib/cjs/tile/TileMetadata.d.ts +6 -2
  118. package/lib/cjs/tile/TileMetadata.d.ts.map +1 -1
  119. package/lib/cjs/tile/TileMetadata.js +10 -4
  120. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  121. package/lib/esm/BackgroundMapSettings.d.ts +2 -2
  122. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  123. package/lib/esm/ChangesetProps.d.ts +28 -0
  124. package/lib/esm/ChangesetProps.d.ts.map +1 -1
  125. package/lib/esm/ChangesetProps.js.map +1 -1
  126. package/lib/esm/ClipStyle.d.ts +1 -1
  127. package/lib/esm/ClipStyle.d.ts.map +1 -1
  128. package/lib/esm/ClipStyle.js.map +1 -1
  129. package/lib/esm/CommonLoggerCategory.d.ts +2 -0
  130. package/lib/esm/CommonLoggerCategory.d.ts.map +1 -1
  131. package/lib/esm/CommonLoggerCategory.js +2 -0
  132. package/lib/esm/CommonLoggerCategory.js.map +1 -1
  133. package/lib/esm/ConcurrentQuery.d.ts +8 -23
  134. package/lib/esm/ConcurrentQuery.d.ts.map +1 -1
  135. package/lib/esm/ConcurrentQuery.js +1 -11
  136. package/lib/esm/ConcurrentQuery.js.map +1 -1
  137. package/lib/esm/ContextRealityModel.d.ts +8 -8
  138. package/lib/esm/ContextRealityModel.js +8 -8
  139. package/lib/esm/ContextRealityModel.js.map +1 -1
  140. package/lib/esm/ElementProps.d.ts +64 -54
  141. package/lib/esm/ElementProps.d.ts.map +1 -1
  142. package/lib/esm/ElementProps.js +6 -6
  143. package/lib/esm/ElementProps.js.map +1 -1
  144. package/lib/esm/EntityProps.d.ts +10 -10
  145. package/lib/esm/EntityProps.d.ts.map +1 -1
  146. package/lib/esm/EntityProps.js +4 -2
  147. package/lib/esm/EntityProps.js.map +1 -1
  148. package/lib/esm/Fonts.d.ts +2 -2
  149. package/lib/esm/Fonts.js +1 -1
  150. package/lib/esm/Fonts.js.map +1 -1
  151. package/lib/esm/GeoCoordinateServices.d.ts +1 -1
  152. package/lib/esm/GeoCoordinateServices.js +1 -1
  153. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  154. package/lib/esm/GeometryParams.d.ts +3 -1
  155. package/lib/esm/GeometryParams.d.ts.map +1 -1
  156. package/lib/esm/GeometryParams.js +3 -1
  157. package/lib/esm/GeometryParams.js.map +1 -1
  158. package/lib/esm/GraphicParams.d.ts +1 -0
  159. package/lib/esm/GraphicParams.d.ts.map +1 -1
  160. package/lib/esm/GraphicParams.js +1 -0
  161. package/lib/esm/GraphicParams.js.map +1 -1
  162. package/lib/esm/IModel.d.ts +3 -3
  163. package/lib/esm/IModel.js.map +1 -1
  164. package/lib/esm/ITwinCoreErrors.d.ts +1 -1
  165. package/lib/esm/ITwinCoreErrors.d.ts.map +1 -1
  166. package/lib/esm/ITwinCoreErrors.js.map +1 -1
  167. package/lib/esm/MassProperties.d.ts +2 -2
  168. package/lib/esm/MassProperties.js.map +1 -1
  169. package/lib/esm/MaterialProps.d.ts +6 -3
  170. package/lib/esm/MaterialProps.d.ts.map +1 -1
  171. package/lib/esm/MaterialProps.js.map +1 -1
  172. package/lib/esm/RenderSchedule.d.ts +14 -0
  173. package/lib/esm/RenderSchedule.d.ts.map +1 -1
  174. package/lib/esm/RenderSchedule.js +4 -0
  175. package/lib/esm/RenderSchedule.js.map +1 -1
  176. package/lib/esm/RenderTexture.d.ts +1 -1
  177. package/lib/esm/RenderTexture.d.ts.map +1 -1
  178. package/lib/esm/RenderTexture.js.map +1 -1
  179. package/lib/esm/TerrainSettings.d.ts +1 -1
  180. package/lib/esm/TerrainSettings.d.ts.map +1 -1
  181. package/lib/esm/TerrainSettings.js.map +1 -1
  182. package/lib/esm/annotation/TextAnnotation.d.ts +78 -2
  183. package/lib/esm/annotation/TextAnnotation.d.ts.map +1 -1
  184. package/lib/esm/annotation/TextAnnotation.js +63 -10
  185. package/lib/esm/annotation/TextAnnotation.js.map +1 -1
  186. package/lib/esm/annotation/TextBlock.d.ts +179 -44
  187. package/lib/esm/annotation/TextBlock.d.ts.map +1 -1
  188. package/lib/esm/annotation/TextBlock.js +207 -56
  189. package/lib/esm/annotation/TextBlock.js.map +1 -1
  190. package/lib/esm/annotation/TextBlockGeometryProps.d.ts +1 -1
  191. package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
  192. package/lib/esm/annotation/TextBlockLayoutResult.d.ts +1 -1
  193. package/lib/esm/annotation/TextBlockLayoutResult.d.ts.map +1 -1
  194. package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
  195. package/lib/esm/annotation/TextStyle.d.ts +115 -34
  196. package/lib/esm/annotation/TextStyle.d.ts.map +1 -1
  197. package/lib/esm/annotation/TextStyle.js +116 -34
  198. package/lib/esm/annotation/TextStyle.js.map +1 -1
  199. package/lib/esm/geometry/AdditionalTransform.d.ts +4 -0
  200. package/lib/esm/geometry/AdditionalTransform.d.ts.map +1 -1
  201. package/lib/esm/geometry/AdditionalTransform.js +10 -1
  202. package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
  203. package/lib/esm/geometry/ElementGeometry.d.ts +1 -1
  204. package/lib/esm/geometry/ElementGeometry.d.ts.map +1 -1
  205. package/lib/esm/geometry/ElementGeometry.js +2 -2
  206. package/lib/esm/geometry/ElementGeometry.js.map +1 -1
  207. package/lib/esm/internal/BackendTypes.d.ts +3 -3
  208. package/lib/esm/internal/BackendTypes.d.ts.map +1 -1
  209. package/lib/esm/internal/BackendTypes.js.map +1 -1
  210. package/lib/esm/internal/RenderMesh.d.ts +19 -5
  211. package/lib/esm/internal/RenderMesh.d.ts.map +1 -1
  212. package/lib/esm/internal/RenderMesh.js +11 -8
  213. package/lib/esm/internal/RenderMesh.js.map +1 -1
  214. package/lib/esm/internal/cross-package.d.ts +1 -1
  215. package/lib/esm/internal/cross-package.d.ts.map +1 -1
  216. package/lib/esm/internal/cross-package.js.map +1 -1
  217. package/lib/esm/rpc/IModelReadRpcInterface.d.ts +1 -1
  218. package/lib/esm/rpc/IModelReadRpcInterface.d.ts.map +1 -1
  219. package/lib/esm/rpc/IModelReadRpcInterface.js +1 -1
  220. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  221. package/lib/esm/rpc/SnapshotIModelRpcInterface.d.ts +4 -4
  222. package/lib/esm/rpc/SnapshotIModelRpcInterface.js +4 -4
  223. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  224. package/lib/esm/rpc/core/RpcConstants.d.ts +6 -6
  225. package/lib/esm/rpc/core/RpcConstants.d.ts.map +1 -1
  226. package/lib/esm/rpc/core/RpcConstants.js +6 -6
  227. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  228. package/lib/esm/rpc/web/OpenAPI.d.ts +1 -1
  229. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  230. package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
  231. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +2 -2
  232. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  233. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  234. package/lib/esm/tile/IModelTileIO.js +2 -2
  235. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  236. package/lib/esm/tile/TileMetadata.d.ts +6 -2
  237. package/lib/esm/tile/TileMetadata.d.ts.map +1 -1
  238. package/lib/esm/tile/TileMetadata.js +10 -4
  239. package/lib/esm/tile/TileMetadata.js.map +1 -1
  240. package/package.json +9 -8
@@ -1 +1 @@
1
- {"version":3,"file":"ConcurrentQuery.js","sourceRoot":"","sources":["../../src/ConcurrentQuery.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAAuH;AACvH,wDAAwD;AACxD,yCAAmC;AAEnC;;;;;;GAMG;AACH,IAAY,cAcX;AAdD,WAAY,cAAc;IACxB;;OAEG;IACH,qFAAqB,CAAA;IACrB;;OAEG;IACH,yFAAuB,CAAA;IACvB;;;OAGG;IACH,+EAAkB,CAAA;AACpB,CAAC,EAdW,cAAc,8BAAd,cAAc,QAczB;AAmID,cAAc;AACd,MAAa,mBAAmB;IACH;IAA3B,YAA2B,WAAyB,EAAE;QAA3B,aAAQ,GAAR,QAAQ,CAAmB;IAAI,CAAC;IACpD,UAAU,KAAmB,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3D;;;;;OAKG;IACI,WAAW,CAAC,GAAW;QAC5B,IAAI,CAAC,QAAQ,CAAC,QAAQ,GAAG,GAAG,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD;;;;OAIG;IACI,eAAe,CAAC,GAAW;QAChC,IAAI,CAAC,QAAQ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C,MAAiB,IAAK,gBAAgB,CAAC,KAAgB,EAAE,CAAC;YACtE,MAAM,IAAI,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC5C,CAAC;QACD,IAAI,QAAQ,CAAC,MAAM,KAAK,gBAAgB,CAAC,MAAM,EAAE,CAAC;YAChD,MAAM,IAAI,YAAY,CAAC,QAAQ,EAAE,OAAO,EAAE,uBAAQ,CAAC,mBAAmB,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;CACF;AAZD,oCAYC","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 iModels\n */\nimport { BentleyError, CompressedId64Set, DbResult, Id64, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { Point2d, Point3d } from \"@itwin/core-geometry\";\nimport { Base64 } from \"js-base64\";\n\n/**\n * Specifies the format of the rows returned by the `query` and `restartQuery` methods of\n * [IModelConnection]($frontend), [IModelDb]($backend), and [ECDb]($backend).\n *\n * @public\n * @extensions\n */\nexport enum QueryRowFormat {\n /** Each row is an object in which each non-null column value can be accessed by its name as defined in the ECSql.\n * Null values are omitted.\n */\n UseECSqlPropertyNames,\n /** Each row is an array of values accessed by an index corresponding to the property's position in the ECSql SELECT statement.\n * Null values are included if they are followed by a non-null column, but trailing null values at the end of the array are omitted.\n */\n UseECSqlPropertyIndexes,\n /** Each row is an object in which each non-null column value can be accessed by a [remapped property name]($docs/learning/ECSqlRowFormat.md).\n * This format is backwards-compatible with the format produced by iTwin.js 2.x. Null values are omitted.\n * @depreacted in 4.11. Switch to UseECSqlPropertyIndexes for best performance, and UseECSqlPropertyNames if you want a JSON object as the result.\n */\n UseJsPropertyNames,\n}\n\n/**\n * Specify limit or range of rows to return\n * @public\n * @extensions\n * */\nexport interface QueryLimit {\n /** Number of rows to return */\n count?: number;\n /** Offset from which to return rows */\n offset?: number;\n}\n\n/** @public */\nexport interface QueryPropertyMetaData {\n /** The class name is set to empty if the property is a generated one, otherwise, it is the name of the ECClass that the property is contained within. */\n className: string;\n /** Access string is the property's alias if the property is a generated one, otherwise it is the ECSQL property path. */\n accessString?: string;\n /** True if the property is a generated one. False, if the property directly refers to one of the classes in the FROM or JOIN clauses.\n * Note: Using a column alias always generates a property. So in the ECSQL <c>SELECT AssetID, Length * Breadth AS Area FROM myschema.Cubicle</c> the first column (AssetID) would not be a generated property, but the second (Area) would be.\n */\n generated: boolean;\n /** The index of the property value if the result is formatted as an array */\n index: number;\n /** The JSON name is the property's alias if the property is a generated one, otherwise, it is the ECSQL property path for the system property.\n * The JSON names are unique and _%d is added for duplicate property JSON names to make them unique.\n */\n jsonName: string;\n /** The name is the property's alias if the property is a generated one, otherwise, it is the name of the property. */\n name: string;\n /** If this property is a PrimitiveECProperty, extend type is the extended type name of this property, if it is not defined locally will be inherited from base property if one exists, otherwise extend type is set to an empty string.\n * @deprecated in 4.11 Use extendedType instead\n */\n extendType: string;\n /** If this property is a PrimitiveECProperty, extended type is the extended type name of this property, if it is not defined locally will be inherited from base property if one exists, otherwise extended type will be undefined. */\n extendedType?: string;\n /** The type name is set to 'navigation' if the property is a navigation property, otherwise, it is the type name for the property. */\n typeName: string;\n}\n\n/** @beta */\nexport interface DbRuntimeStats {\n cpuTime: number;\n totalTime: number;\n timeLimit: number;\n memLimit: number;\n memUsed: number;\n prepareTime: number;\n}\n\n/**\n * Quota hint for the query.\n * @public\n * @extensions\n * */\nexport interface QueryQuota {\n /** Max time allowed in seconds. This is hint and may not be honoured but help in prioritize request */\n time?: number;\n /** Max memory allowed in bytes. This is hint and may not be honoured but help in prioritize request */\n memory?: number;\n}\n\n/**\n * Config for all request made to concurrent query engine.\n * @public\n * @extensions\n */\nexport interface BaseReaderOptions {\n /** Determine priority of this query default to 0, used as hint and can be overriden by backend. */\n priority?: number;\n /** If specified cancel last query (if any) with same restart token and queue the new query */\n restartToken?: string;\n /** For editing apps this can be set to true and all query will run on primary connection\n * his may cause slow queries execution but the most recent data changes will be visitable via query\n */\n usePrimaryConn?: boolean;\n /** Restrict time or memory for query but use as hint and may be changed base on backend settings */\n quota?: QueryQuota;\n /**\n * @internal\n * Allow query to be be deferred by milliseconds specified. This parameter is ignore by default unless\n * concurrent query is configure to honour it.\n */\n delay?: number;\n /**\n * @internal\n */\n testingArgs?: TestingArgs;\n}\n\n/**\n * ECSql query config\n * @public\n * @extensions\n * */\nexport interface QueryOptions extends BaseReaderOptions {\n /**\n * default to false. It abbreviate blobs to single bytes. This help cases where wildcard is\n * used in select clause. Use BlobReader api to read individual blob specially if its of large size.\n * */\n abbreviateBlobs?: boolean;\n /**\n * default to false. It will suppress error and will not log it. Useful in cases where we expect query\n * can fail.\n */\n suppressLogErrors?: boolean;\n /** This is used internally. If true it query will return meta data about query. */\n includeMetaData?: boolean;\n /** Limit range of rows returned by query*/\n limit?: QueryLimit;\n /**\n * Convert ECClassId, SourceECClassId, TargetECClassId and RelClassId to respective name.\n * When true, XXXXClassId property will be returned as className.\n * @deprecated in 4.11 Use ecsql function ec_classname to get class name instead.\n * */\n convertClassIdsToClassNames?: boolean;\n /**\n * Determine row format.\n */\n rowFormat?: QueryRowFormat;\n}\n/** @beta */\nexport type BlobRange = QueryLimit;\n\n/** @beta */\nexport interface BlobOptions extends BaseReaderOptions {\n range?: BlobRange;\n}\n\n/** @public */\nexport class QueryOptionsBuilder {\n public constructor(private _options: QueryOptions = {}) { }\n public getOptions(): QueryOptions { return this._options; }\n /**\n * @internal\n * Allow to set priority of query. Query will be inserted int queue base on priority value. This value will be ignored if concurrent query is configured with ignored priority is true.\n * @param val integer value which can be negative as well. By default its zero.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setPriority(val: number) {\n this._options.priority = val;\n return this;\n }\n /**\n * Allow to set restart token. If restart token is set then any other query(s) in queue with same token is cancelled if its not already executed.\n * @param val A string token identifying a use case in which previous query with same token is cancelled.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setRestartToken(val: string) {\n this._options.restartToken = val;\n return this;\n }\n /**\n * Allow to set quota restriction for query. Its a hint and may be overriden or ignored by concurrent query manager.\n * @param val @type QueryQuota Specify time and memory that can be used by a query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setQuota(val: QueryQuota) {\n this._options.quota = val;\n return this;\n }\n /**\n * Force a query to be executed synchronously against primary connection. This option is ignored if provided by frontend.\n * @param val A boolean value to force use primary connection on main thread to execute query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setUsePrimaryConnection(val: boolean) {\n this._options.usePrimaryConn = val;\n return this;\n }\n /**\n * By default all blobs are abbreviated to save memory and network bandwidth. If set to false, all blob data will be returned by query as is.\n * Use @type BlobReader to access blob data more efficiently.\n * @param val A boolean value, if set to false will return complete blob type property data. This could cost time and network bandwidth.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setAbbreviateBlobs(val: boolean) {\n this._options.abbreviateBlobs = val;\n return this;\n }\n /**\n * When query fail to prepare it will log error. This setting will suppress log errors in case where query come from user typing it and its expected to fail often.\n * @param val A boolean value, if set to true, any error logging will be suppressed.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setSuppressLogErrors(val: boolean) {\n this._options.suppressLogErrors = val;\n return this;\n }\n /**\n * If set ECClassId, SourceECClassId and TargetECClassId system properties will return qualified name of class instead of a @typedef Id64String.\n * @param val A boolean value.\n * @returns @type QueryOptionsBuilder for fluent interface.\n * @deprecated in 4.11 Use ecsql function ec_classname to get class name instead.\n */\n public setConvertClassIdsToNames(val: boolean) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._options.convertClassIdsToClassNames = val;\n return this;\n }\n /**\n * Specify limit for query. Limit determine number of rows and offset in result-set.\n * @param val Specify count and offset from within the result-set of a ECSQL query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setLimit(val: QueryLimit) {\n this._options.limit = val;\n return this;\n }\n /**\n * Specify row format returned by concurrent query manager.\n * @param val @enum QueryRowFormat specifying format for result.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setRowFormat(val: QueryRowFormat) {\n this._options.rowFormat = val;\n return this;\n }\n /**\n * @internal\n * Defers execution of query in queue by specified milliseconds. This parameter is ignored by default unless concurrent query is configure to not ignore it.\n * @param val Number of milliseconds.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setDelay(val: number) {\n this._options.delay = val;\n return this;\n }\n /**\n * @internal\n * Use for testing internal logic. This parameter is ignored by default unless concurrent query is configure to not ignore it.\n * @param val Testing arguments.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setTestingArgs(val: TestingArgs) {\n this._options.testingArgs = val;\n return this;\n }\n}\n/** @beta */\nexport class BlobOptionsBuilder {\n public constructor(private _options: BlobOptions = {}) { }\n public getOptions(): BlobOptions { return this._options; }\n /**\n * @internal\n * Allow to set priority of blob request. Blob request will be inserted int queue base on priority value. This value will be ignored if concurrent query is configured with ignored priority is true.\n * @param val integer value which can be negative as well. By default its zero.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setPriority(val: number) {\n this._options.priority = val;\n return this;\n }\n /**\n * Allow to set restart token. If restart token is set then any other blob request in queue with same token is cancelled if its not already executed.\n * @param val A string token identifying a use case in which previous blob request with same token is cancelled.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setRestartToken(val: string) {\n this._options.restartToken = val;\n return this;\n }\n /**\n * Allow to set quota restriction for blob request. Its a hint and may be overriden or ignored by concurrent query manager.\n * @param val @type QueryQuota Specify time and memory that can be used by a query.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setQuota(val: QueryQuota) {\n this._options.quota = val;\n return this;\n }\n /**\n * Force a blob request to be executed synchronously against primary connection. This option is ignored if provided by frontend.\n * @param val A boolean value to force use primary connection on main thread to execute blob request.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setUsePrimaryConnection(val: boolean) {\n this._options.usePrimaryConn = val;\n return this;\n }\n /**\n * Specify range with in the blob that need to be returned.\n * @param val Specify offset and count of bytes that need to be returned.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setRange(val: BlobRange) {\n this._options.range = val;\n return this;\n }\n /**\n * @internal\n * Defers execution of blob request in queue by specified milliseconds. This parameter is ignored by default unless concurrent query is configure to not ignore it.\n * @param val Number of milliseconds.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setDelay(val: number) {\n this._options.delay = val;\n return this;\n }\n}\n\n/** @internal */\nexport enum QueryParamType {\n Boolean = 0,\n Double = 1,\n Id = 2,\n IdSet = 3,\n Integer = 4,\n Long = 5,\n Null = 6,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n Point2d = 7,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n Point3d = 8,\n String = 9,\n Blob = 10,\n Struct = 11,\n}\n\n/**\n * Bind values to an ECSQL query.\n *\n * All binding class methods accept an `indexOrName` parameter as a `string | number` type and a value to bind to it.\n * A binding must be mapped either by a positional index or a string/name. See the examples below.\n *\n * @example\n * Parameter By Index:\n * ```sql\n * SELECT a, v FROM test.Foo WHERE a=? AND b=?\n * ```\n * The first `?` is index 1 and the second `?` is index 2. The parameter index starts with 1 and not 0.\n *\n * @example\n * Parameter By Name:\n * ```sql\n * SELECT a, v FROM test.Foo WHERE a=:name_a AND b=:name_b\n * ```\n * Using \"name_a\" as the `indexOrName` will bind the provided value to `name_a` in the query. And the same goes for\n * using \"name_b\" and the `name_b` binding respectively.\n *\n * @see\n * - [ECSQL Parameters]($docs/learning/ECSQL.md#ecsql-parameters)\n * - [ECSQL Parameter Types]($docs/learning/ECSQLParameterTypes)\n * - [ECSQL Code Examples]($docs/learning/backend/ECSQLCodeExamples#parameter-bindings)\n *\n * @public\n */\nexport class QueryBinder {\n private _args = {};\n private verify(indexOrName: string | number) {\n if (typeof indexOrName === \"number\") {\n if (indexOrName < 1)\n throw new Error(\"expect index to be >= 1\");\n return;\n }\n if (!/^[a-zA-Z_]+\\w*$/i.test(indexOrName)) {\n throw new Error(\"expect named parameter to meet identifier specification\");\n }\n }\n\n /**\n * Bind boolean value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Boolean value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindBoolean(indexOrName: string | number, val: boolean) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true,\n value: {\n type: QueryParamType.Boolean,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind blob value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Blob value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindBlob(indexOrName: string | number, val: Uint8Array) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n const base64 = Base64.fromUint8Array(val);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Blob,\n value: base64,\n },\n });\n return this;\n }\n\n /**\n * Bind double value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Double value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindDouble(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Double,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @typedef Id64String value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @typedef Id64String value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindId(indexOrName: string | number, val: Id64String) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Id,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @type OrderedId64Iterable to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type OrderedId64Iterable value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindIdSet(indexOrName: string | number, val: OrderedId64Iterable) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n OrderedId64Iterable.uniqueIterator(val);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.IdSet,\n value: CompressedId64Set.sortAndCompress(OrderedId64Iterable.uniqueIterator(val)),\n },\n });\n return this;\n }\n\n /**\n * Bind integer to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Integer value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindInt(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Integer,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind struct to ECSQL statement. Struct specified as object.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val struct value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindStruct(indexOrName: string | number, val: object) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Struct,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind long to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Long value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindLong(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Long,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind string to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val String value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindString(indexOrName: string | number, val: string) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.String,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind null to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindNull(indexOrName: string | number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Null,\n value: null,\n },\n });\n return this;\n }\n\n /**\n * Bind @type Point2d to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type Point2d value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindPoint2d(indexOrName: string | number, val: Point2d) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Point2d,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @type Point3d to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type Point3d value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindPoint3d(indexOrName: string | number, val: Point3d) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Point3d,\n value: val,\n },\n });\n return this;\n }\n\n private static bind(params: QueryBinder, nameOrId: string | number, val: any) {\n if (typeof val === \"boolean\") {\n params.bindBoolean(nameOrId, val);\n } else if (typeof val === \"number\") {\n params.bindDouble(nameOrId, val);\n } else if (typeof val === \"string\") {\n params.bindString(nameOrId, val);\n } else if (val instanceof Uint8Array) {\n params.bindBlob(nameOrId, val);\n } else if (val instanceof Point2d) {\n params.bindPoint2d(nameOrId, val);\n } else if (val instanceof Point3d) {\n params.bindPoint3d(nameOrId, val);\n } else if (val instanceof Array && val.length > 0 && typeof val[0] === \"string\" && Id64.isValidId64(val[0])) {\n params.bindIdSet(nameOrId, val);\n } else if (typeof val === \"undefined\" || val === null) {\n params.bindNull(nameOrId);\n } else if (typeof val === \"object\" && !Array.isArray(val)) {\n params.bindStruct(nameOrId, val);\n } else {\n throw new Error(\"unsupported type\");\n }\n }\n\n /**\n * Allow bulk bind either parameters by index as value array or by parameter names as object.\n * @param args if array of values is provided then array index is used as index. If object is provided then object property name is used as parameter name of reach value.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public static from(args: any[] | object | undefined): QueryBinder {\n const params = new QueryBinder();\n if (typeof args === \"undefined\")\n return params;\n\n if (Array.isArray(args)) {\n let i = 1;\n for (const val of args) {\n this.bind(params, i++, val);\n }\n } else {\n for (const prop of Object.getOwnPropertyNames(args)) {\n this.bind(params, prop, (args as any)[prop]);\n }\n }\n return params;\n }\n\n public serialize(): object {\n return this._args;\n }\n}\n\n/** @internal */\nexport enum DbRequestKind {\n BlobIO = 0,\n ECSql = 1\n}\n\n/** @internal */\nexport enum DbResponseKind {\n BlobIO = DbRequestKind.BlobIO,\n ECSql = DbRequestKind.ECSql,\n NoResult = 2\n}\n\n/** @internal */\nexport enum DbResponseStatus {\n Done = 1, /* query ran to completion. */\n Cancel = 2, /* Requested by user.*/\n Partial = 3, /* query was running but ran out of quota.*/\n Timeout = 4, /* query time quota expired while it was in queue.*/\n QueueFull = 5, /* could not submit the query as queue was full.*/\n ShuttingDown = 6, /* Shutdown is in progress. */\n Error = 100, /* generic error*/\n Error_ECSql_PreparedFailed = Error + 1, /* ecsql prepared failed*/\n Error_ECSql_StepFailed = Error + 2, /* ecsql step failed*/\n Error_ECSql_RowToJsonFailed = Error + 3, /* ecsql failed to serialized row to json.*/\n Error_ECSql_BindingFailed = Error + 4, /* ecsql binding failed.*/\n Error_BlobIO_OpenFailed = Error + 5, /* class or property or instance specified was not found or property as not of type blob.*/\n Error_BlobIO_OutOfRange = Error + 6, /* range specified is invalid based on size of blob.*/\n}\n\n/** @internal */\nexport interface TestingArgs {\n interrupt?: boolean\n}\n\n/** @internal */\nexport enum DbValueFormat {\n ECSqlNames = 0,\n JsNames = 1\n}\n\n/** @internal */\nexport interface DbRequest extends BaseReaderOptions {\n kind?: DbRequestKind;\n testingArgs?: TestingArgs\n}\n\n/** @internal */\nexport interface DbQueryRequest extends DbRequest, QueryOptions {\n valueFormat?: DbValueFormat;\n query: string;\n args?: object;\n}\n\n/** @internal */\nexport interface DbBlobRequest extends DbRequest, BlobOptions {\n className: string;\n accessString: string;\n instanceId: Id64String;\n}\n\n/** @internal */\nexport interface DbResponse {\n stats: DbRuntimeStats;\n status: DbResponseStatus;\n kind: DbResponseKind;\n error?: string;\n}\n\n/** @internal */\nexport interface DbQueryResponse extends DbResponse {\n meta: QueryPropertyMetaData[];\n data: any[];\n rowCount: number;\n}\n\n/** @internal */\nexport interface DbBlobResponse extends DbResponse {\n data?: Uint8Array;\n rawBlobSize: number;\n}\n\n/** @public */\nexport class DbQueryError extends BentleyError {\n public constructor(public readonly response: any, public readonly request?: any, rc?: DbResult) {\n super(rc ?? DbResult.BE_SQLITE_ERROR, response.error, { response, request });\n }\n public static throwIfError(response: any, request?: any) {\n if ((response.status as number) >= (DbResponseStatus.Error as number)) {\n throw new DbQueryError(response, request);\n }\n if (response.status === DbResponseStatus.Cancel) {\n throw new DbQueryError(response, request, DbResult.BE_SQLITE_INTERRUPT);\n }\n }\n}\n\n/** @internal */\nexport interface DbRequestExecutor<TRequest extends DbRequest, TResponse extends DbResponse> {\n execute(request: TRequest): Promise<TResponse>;\n}\n\n/** @internal */\nexport interface DbQueryConfig {\n globalQuota?: QueryQuota;\n /** For testing */\n ignoreDelay?: boolean;\n /** Priority of request is ignored */\n ignorePriority?: boolean;\n /** Max queue size after which queries are rejected with error QueueFull */\n requestQueueSize?: number;\n /** Number of worker thread, default to 4 */\n workerThreads?: number;\n doNotUsePrimaryConnToPrepare?: boolean;\n /** After no activity for given time concurrenty query will automatically shutdown */\n autoShutdowWhenIdlelForSeconds?: number;\n /** Maximum number of statement cache per worker. Default to 40 */\n statementCacheSizePerWorker?: number;\n /* Monitor poll interval in milliseconds. Its responsable for cancelling queries that pass quota. It can be set between 1000 and Max time quota for query */\n monitorPollInterval?: number;\n /** Set memory map io for each worker connection size in bytes. Default to zero mean do not use mmap io */\n memoryMapFileSize?: number;\n /** Used by test to simulate certain test cases. Its is false by default. */\n allowTestingArgs?: boolean;\n}\n"]}
1
+ {"version":3,"file":"ConcurrentQuery.js","sourceRoot":"","sources":["../../src/ConcurrentQuery.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,sDAAuH;AACvH,wDAAwD;AACxD,yCAAmC;AAEnC;;;;;;GAMG;AACH,IAAY,cAcX;AAdD,WAAY,cAAc;IACxB;;OAEG;IACH,qFAAqB,CAAA;IACrB;;OAEG;IACH,yFAAuB,CAAA;IACvB;;;OAGG;IACH,+EAAkB,CAAA;AACpB,CAAC,EAdW,cAAc,8BAAd,cAAc,QAczB;AA+HD,cAAc;AACd,MAAa,mBAAmB;IACH;IAA3B,YAA2B,WAAyB,EAAE;QAA3B,aAAQ,GAAR,QAAQ,CAAmB;IAAI,CAAC;IACpD,UAAU,KAAmB,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3D;;;;;OAKG;IACI,WAAW,CAAC,GAAW;QAC5B,IAAI,CAAC,QAAQ,CAAC,QAAQ,GAAG,GAAG,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD;;;;OAIG;IACI,eAAe,CAAC,GAAW;QAChC,IAAI,CAAC,QAAQ,CAAC,YAAY,GAAG,GAAG,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IACD;;;;OAIG;IACI,QAAQ,CAAC,GAAe;QAC7B,IAAI,CAAC,QAAQ,CAAC,KAAK,GAAG,GAAG,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IACD;;;;OAIG;IACI,uBAAuB,CAAC,GAAY;QACzC,IAAI,CAAC,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,IAAY,gBAcX;AAdD,WAAY,gBAAgB;IAC1B,uDAAQ,CAAA;IACR,2DAAU,CAAA;IACV,6DAAW,CAAA;IACX,6DAAW,CAAA;IACX,iEAAa,CAAA;IACb,uEAAgB,CAAA;IAChB,2DAAW,CAAA;IACX,qGAAsC,CAAA;IACtC,6FAAkC,CAAA;IAClC,uGAAuC,CAAA;IACvC,mGAAqC,CAAA;IACrC,+FAAmC,CAAA;IACnC,+FAAmC,CAAA;AACrC,CAAC,EAdW,gBAAgB,gCAAhB,gBAAgB,QAc3B;AAED,gBAAgB;AAChB,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,6DAAc,CAAA;IACd,uDAAW,CAAA;AACb,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AA0CD,cAAc;AACd,MAAa,YAAa,SAAQ,2BAAY;IACT;IAA+B;IAAlE,YAAmC,QAAa,EAAkB,OAAa,EAAE,EAAa;QAC5F,KAAK,CAAC,EAAE,IAAI,uBAAQ,CAAC,eAAe,EAAE,QAAQ,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC;QAD5C,aAAQ,GAAR,QAAQ,CAAK;QAAkB,YAAO,GAAP,OAAO,CAAM;IAE/E,CAAC;IACM,MAAM,CAAC,YAAY,CAAC,QAAa,EAAE,OAAa;QACrD,IAAK,QAAQ,CAAC,MAAiB,IAAK,gBAAgB,CAAC,KAAgB,EAAE,CAAC;YACtE,MAAM,IAAI,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC5C,CAAC;QACD,IAAI,QAAQ,CAAC,MAAM,KAAK,gBAAgB,CAAC,MAAM,EAAE,CAAC;YAChD,MAAM,IAAI,YAAY,CAAC,QAAQ,EAAE,OAAO,EAAE,uBAAQ,CAAC,mBAAmB,CAAC,CAAC;QAC1E,CAAC;IACH,CAAC;CACF;AAZD,oCAYC","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 iModels\n */\nimport { BentleyError, CompressedId64Set, DbResult, Id64, Id64String, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { Point2d, Point3d } from \"@itwin/core-geometry\";\nimport { Base64 } from \"js-base64\";\n\n/**\n * Specifies the format of the rows returned by the `query` and `restartQuery` methods of\n * [IModelConnection]($frontend), [IModelDb]($backend), and [ECDb]($backend).\n *\n * @public\n * @extensions\n */\nexport enum QueryRowFormat {\n /** Each row is an object in which each non-null column value can be accessed by its name as defined in the ECSql.\n * Null values are omitted.\n */\n UseECSqlPropertyNames,\n /** Each row is an array of values accessed by an index corresponding to the property's position in the ECSql SELECT statement.\n * Null values are included if they are followed by a non-null column, but trailing null values at the end of the array are omitted.\n */\n UseECSqlPropertyIndexes,\n /** Each row is an object in which each non-null column value can be accessed by a [remapped property name]($docs/learning/ECSqlRowFormat.md).\n * This format is backwards-compatible with the format produced by iTwin.js 2.x. Null values are omitted.\n * @depreacted in 4.11. Switch to UseECSqlPropertyIndexes for best performance, and UseECSqlPropertyNames if you want a JSON object as the result.\n */\n UseJsPropertyNames,\n}\n\n/**\n * Specify limit or range of rows to return\n * @public\n * @extensions\n * */\nexport interface QueryLimit {\n /** Number of rows to return */\n count?: number;\n /** Offset from which to return rows */\n offset?: number;\n}\n\n/** @public */\nexport interface QueryPropertyMetaData {\n /** The class name is set to empty if the property is a generated one, otherwise, it is the name of the ECClass that the property is contained within. */\n className: string;\n /** Access string is the property's alias if the property is a generated one, otherwise it is the ECSQL property path. */\n accessString?: string;\n /** True if the property is a generated one. False, if the property directly refers to one of the classes in the FROM or JOIN clauses.\n * Note: Using a column alias always generates a property. So in the ECSQL <c>SELECT AssetID, Length * Breadth AS Area FROM myschema.Cubicle</c> the first column (AssetID) would not be a generated property, but the second (Area) would be.\n */\n generated: boolean;\n /** The index of the property value if the result is formatted as an array */\n index: number;\n /** The JSON name is the property's alias if the property is a generated one, otherwise, it is the ECSQL property path for the system property.\n * The JSON names are unique and _%d is added for duplicate property JSON names to make them unique.\n */\n jsonName: string;\n /** The name is the property's alias if the property is a generated one, otherwise, it is the name of the property. */\n name: string;\n /** If this property is a PrimitiveECProperty, extend type is the extended type name of this property, if it is not defined locally will be inherited from base property if one exists, otherwise extend type is set to an empty string.\n * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use extendedType instead\n */\n extendType: string;\n /** If this property is a PrimitiveECProperty, extended type is the extended type name of this property, if it is not defined locally will be inherited from base property if one exists, otherwise extended type will be undefined. */\n extendedType?: string;\n /** The type name is set to 'navigation' if the property is a navigation property, otherwise, it is the type name for the property. */\n typeName: string;\n}\n\n/** @beta */\nexport interface DbRuntimeStats {\n cpuTime: number;\n totalTime: number;\n timeLimit: number;\n memLimit: number;\n memUsed: number;\n prepareTime: number;\n}\n\n/**\n * Quota hint for the query.\n * @public\n * @extensions\n * */\nexport interface QueryQuota {\n /** Max time allowed in seconds. This is hint and may not be honoured but help in prioritize request */\n time?: number;\n /** Max memory allowed in bytes. This is hint and may not be honoured but help in prioritize request */\n memory?: number;\n}\n\n/**\n * Config for all request made to concurrent query engine.\n * @public\n * @extensions\n */\nexport interface BaseReaderOptions {\n /** Determine priority of this query default to 0, used as hint and can be overriden by backend. */\n priority?: number;\n /** If specified cancel last query (if any) with same restart token and queue the new query */\n restartToken?: string;\n /** For editing apps this can be set to true and all query will run on primary connection\n * his may cause slow queries execution but the most recent data changes will be visitable via query\n */\n usePrimaryConn?: boolean;\n /** Restrict time or memory for query but use as hint and may be changed base on backend settings */\n quota?: QueryQuota;\n /**\n * @internal\n * Allow query to be be deferred by milliseconds specified. This parameter is ignore by default unless\n * concurrent query is configure to honour it.\n */\n delay?: number;\n}\n\n/**\n * ECSql query config\n * @public\n * @extensions\n * */\nexport interface QueryOptions extends BaseReaderOptions {\n /**\n * default to false. It abbreviate blobs to single bytes. This help cases where wildcard is\n * used in select clause. Use BlobReader api to read individual blob specially if its of large size.\n * */\n abbreviateBlobs?: boolean;\n /**\n * default to false. It will suppress error and will not log it. Useful in cases where we expect query\n * can fail.\n */\n suppressLogErrors?: boolean;\n /** This is used internally. If true it query will return meta data about query. */\n includeMetaData?: boolean;\n /** Limit range of rows returned by query*/\n limit?: QueryLimit;\n /**\n * Convert ECClassId, SourceECClassId, TargetECClassId and RelClassId to respective name.\n * When true, XXXXClassId property will be returned as className.\n * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use ecsql function ec_classname to get class name instead.\n * */\n convertClassIdsToClassNames?: boolean;\n /**\n * Determine row format.\n */\n rowFormat?: QueryRowFormat;\n}\n/** @beta */\nexport type BlobRange = QueryLimit;\n\n/** @beta */\nexport interface BlobOptions extends BaseReaderOptions {\n range?: BlobRange;\n}\n\n/** @public */\nexport class QueryOptionsBuilder {\n public constructor(private _options: QueryOptions = {}) { }\n public getOptions(): QueryOptions { return this._options; }\n /**\n * @internal\n * Allow to set priority of query. Query will be inserted int queue base on priority value. This value will be ignored if concurrent query is configured with ignored priority is true.\n * @param val integer value which can be negative as well. By default its zero.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setPriority(val: number) {\n this._options.priority = val;\n return this;\n }\n /**\n * Allow to set restart token. If restart token is set then any other query(s) in queue with same token is cancelled if its not already executed.\n * @param val A string token identifying a use case in which previous query with same token is cancelled.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setRestartToken(val: string) {\n this._options.restartToken = val;\n return this;\n }\n /**\n * Allow to set quota restriction for query. Its a hint and may be overriden or ignored by concurrent query manager.\n * @param val @type QueryQuota Specify time and memory that can be used by a query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setQuota(val: QueryQuota) {\n this._options.quota = val;\n return this;\n }\n /**\n * Force a query to be executed synchronously against primary connection. This option is ignored if provided by frontend.\n * @param val A boolean value to force use primary connection on main thread to execute query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setUsePrimaryConnection(val: boolean) {\n this._options.usePrimaryConn = val;\n return this;\n }\n /**\n * By default all blobs are abbreviated to save memory and network bandwidth. If set to false, all blob data will be returned by query as is.\n * Use @type BlobReader to access blob data more efficiently.\n * @param val A boolean value, if set to false will return complete blob type property data. This could cost time and network bandwidth.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setAbbreviateBlobs(val: boolean) {\n this._options.abbreviateBlobs = val;\n return this;\n }\n /**\n * When query fail to prepare it will log error. This setting will suppress log errors in case where query come from user typing it and its expected to fail often.\n * @param val A boolean value, if set to true, any error logging will be suppressed.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setSuppressLogErrors(val: boolean) {\n this._options.suppressLogErrors = val;\n return this;\n }\n /**\n * If set ECClassId, SourceECClassId and TargetECClassId system properties will return qualified name of class instead of a @typedef Id64String.\n * @param val A boolean value.\n * @returns @type QueryOptionsBuilder for fluent interface.\n * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use ecsql function ec_classname to get class name instead.\n */\n public setConvertClassIdsToNames(val: boolean) {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._options.convertClassIdsToClassNames = val;\n return this;\n }\n /**\n * Specify limit for query. Limit determine number of rows and offset in result-set.\n * @param val Specify count and offset from within the result-set of a ECSQL query.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setLimit(val: QueryLimit) {\n this._options.limit = val;\n return this;\n }\n /**\n * Specify row format returned by concurrent query manager.\n * @param val @enum QueryRowFormat specifying format for result.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setRowFormat(val: QueryRowFormat) {\n this._options.rowFormat = val;\n return this;\n }\n /**\n * @internal\n * Defers execution of query in queue by specified milliseconds. This parameter is ignored by default unless concurrent query is configure to not ignore it.\n * @param val Number of milliseconds.\n * @returns @type QueryOptionsBuilder for fluent interface.\n */\n public setDelay(val: number) {\n this._options.delay = val;\n return this;\n }\n}\n/** @beta */\nexport class BlobOptionsBuilder {\n public constructor(private _options: BlobOptions = {}) { }\n public getOptions(): BlobOptions { return this._options; }\n /**\n * @internal\n * Allow to set priority of blob request. Blob request will be inserted int queue base on priority value. This value will be ignored if concurrent query is configured with ignored priority is true.\n * @param val integer value which can be negative as well. By default its zero.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setPriority(val: number) {\n this._options.priority = val;\n return this;\n }\n /**\n * Allow to set restart token. If restart token is set then any other blob request in queue with same token is cancelled if its not already executed.\n * @param val A string token identifying a use case in which previous blob request with same token is cancelled.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setRestartToken(val: string) {\n this._options.restartToken = val;\n return this;\n }\n /**\n * Allow to set quota restriction for blob request. Its a hint and may be overriden or ignored by concurrent query manager.\n * @param val @type QueryQuota Specify time and memory that can be used by a query.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setQuota(val: QueryQuota) {\n this._options.quota = val;\n return this;\n }\n /**\n * Force a blob request to be executed synchronously against primary connection. This option is ignored if provided by frontend.\n * @param val A boolean value to force use primary connection on main thread to execute blob request.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setUsePrimaryConnection(val: boolean) {\n this._options.usePrimaryConn = val;\n return this;\n }\n /**\n * Specify range with in the blob that need to be returned.\n * @param val Specify offset and count of bytes that need to be returned.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setRange(val: BlobRange) {\n this._options.range = val;\n return this;\n }\n /**\n * @internal\n * Defers execution of blob request in queue by specified milliseconds. This parameter is ignored by default unless concurrent query is configure to not ignore it.\n * @param val Number of milliseconds.\n * @returns @type BlobOptionsBuilder for fluent interface.\n */\n public setDelay(val: number) {\n this._options.delay = val;\n return this;\n }\n}\n\n/** @internal */\nexport enum QueryParamType {\n Boolean = 0,\n Double = 1,\n Id = 2,\n IdSet = 3,\n Integer = 4,\n Long = 5,\n Null = 6,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n Point2d = 7,\n // eslint-disable-next-line @typescript-eslint/no-shadow\n Point3d = 8,\n String = 9,\n Blob = 10,\n Struct = 11,\n}\n\n/**\n * Bind values to an ECSQL query.\n *\n * All binding class methods accept an `indexOrName` parameter as a `string | number` type and a value to bind to it.\n * A binding must be mapped either by a positional index or a string/name. See the examples below.\n *\n * @example\n * Parameter By Index:\n * ```sql\n * SELECT a, v FROM test.Foo WHERE a=? AND b=?\n * ```\n * The first `?` is index 1 and the second `?` is index 2. The parameter index starts with 1 and not 0.\n *\n * @example\n * Parameter By Name:\n * ```sql\n * SELECT a, v FROM test.Foo WHERE a=:name_a AND b=:name_b\n * ```\n * Using \"name_a\" as the `indexOrName` will bind the provided value to `name_a` in the query. And the same goes for\n * using \"name_b\" and the `name_b` binding respectively.\n *\n * @see\n * - [ECSQL Parameters]($docs/learning/ECSQL.md#ecsql-parameters)\n * - [ECSQL Parameter Types]($docs/learning/ECSQLParameterTypes)\n * - [ECSQL Code Examples]($docs/learning/backend/ECSQLCodeExamples#parameter-bindings)\n *\n * @public\n */\nexport class QueryBinder {\n private _args = {};\n private verify(indexOrName: string | number) {\n if (typeof indexOrName === \"number\") {\n if (indexOrName < 1)\n throw new Error(\"expect index to be >= 1\");\n return;\n }\n if (!/^[a-zA-Z_]+\\w*$/i.test(indexOrName)) {\n throw new Error(\"expect named parameter to meet identifier specification\");\n }\n }\n\n /**\n * Bind boolean value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Boolean value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindBoolean(indexOrName: string | number, val: boolean) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true,\n value: {\n type: QueryParamType.Boolean,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind blob value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Blob value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindBlob(indexOrName: string | number, val: Uint8Array) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n const base64 = Base64.fromUint8Array(val);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Blob,\n value: base64,\n },\n });\n return this;\n }\n\n /**\n * Bind double value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Double value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindDouble(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Double,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @typedef Id64String value to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @typedef Id64String value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindId(indexOrName: string | number, val: Id64String) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Id,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @type OrderedId64Iterable to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type OrderedId64Iterable value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindIdSet(indexOrName: string | number, val: OrderedId64Iterable) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n OrderedId64Iterable.uniqueIterator(val);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.IdSet,\n value: CompressedId64Set.sortAndCompress(OrderedId64Iterable.uniqueIterator(val)),\n },\n });\n return this;\n }\n\n /**\n * Bind integer to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Integer value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindInt(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Integer,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind struct to ECSQL statement. Struct specified as object.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val struct value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindStruct(indexOrName: string | number, val: object) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Struct,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind long to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val Long value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindLong(indexOrName: string | number, val: number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Long,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind string to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val String value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindString(indexOrName: string | number, val: string) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.String,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind null to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindNull(indexOrName: string | number) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Null,\n value: null,\n },\n });\n return this;\n }\n\n /**\n * Bind @type Point2d to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type Point2d value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindPoint2d(indexOrName: string | number, val: Point2d) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Point2d,\n value: val,\n },\n });\n return this;\n }\n\n /**\n * Bind @type Point3d to ECSQL statement.\n * @param indexOrName Specify parameter index or its name used in ECSQL statement.\n * @param val @type Point3d value to bind to ECSQL statement.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public bindPoint3d(indexOrName: string | number, val: Point3d) {\n this.verify(indexOrName);\n const name = String(indexOrName);\n Object.defineProperty(this._args, name, {\n enumerable: true, value: {\n type: QueryParamType.Point3d,\n value: val,\n },\n });\n return this;\n }\n\n private static bind(params: QueryBinder, nameOrId: string | number, val: any) {\n if (typeof val === \"boolean\") {\n params.bindBoolean(nameOrId, val);\n } else if (typeof val === \"number\") {\n params.bindDouble(nameOrId, val);\n } else if (typeof val === \"string\") {\n params.bindString(nameOrId, val);\n } else if (val instanceof Uint8Array) {\n params.bindBlob(nameOrId, val);\n } else if (val instanceof Point2d) {\n params.bindPoint2d(nameOrId, val);\n } else if (val instanceof Point3d) {\n params.bindPoint3d(nameOrId, val);\n } else if (val instanceof Array && val.length > 0 && typeof val[0] === \"string\" && Id64.isValidId64(val[0])) {\n params.bindIdSet(nameOrId, val);\n } else if (typeof val === \"undefined\" || val === null) {\n params.bindNull(nameOrId);\n } else if (typeof val === \"object\" && !Array.isArray(val)) {\n params.bindStruct(nameOrId, val);\n } else {\n throw new Error(\"unsupported type\");\n }\n }\n\n /**\n * Allow bulk bind either parameters by index as value array or by parameter names as object.\n * @param args if array of values is provided then array index is used as index. If object is provided then object property name is used as parameter name of reach value.\n * @returns @type QueryBinder to allow fluent interface.\n */\n public static from(args: any[] | object | undefined): QueryBinder {\n const params = new QueryBinder();\n if (typeof args === \"undefined\")\n return params;\n\n if (Array.isArray(args)) {\n let i = 1;\n for (const val of args) {\n this.bind(params, i++, val);\n }\n } else {\n for (const prop of Object.getOwnPropertyNames(args)) {\n this.bind(params, prop, (args as any)[prop]);\n }\n }\n return params;\n }\n\n public serialize(): object {\n return this._args;\n }\n}\n\n/** @internal */\nexport enum DbRequestKind {\n BlobIO = 0,\n ECSql = 1\n}\n\n/** @internal */\nexport enum DbResponseKind {\n BlobIO = DbRequestKind.BlobIO,\n ECSql = DbRequestKind.ECSql,\n NoResult = 2\n}\n\n/** @internal */\nexport enum DbResponseStatus {\n Done = 1, /* query ran to completion. */\n Cancel = 2, /* Requested by user.*/\n Partial = 3, /* query was running but ran out of quota.*/\n Timeout = 4, /* query time quota expired while it was in queue.*/\n QueueFull = 5, /* could not submit the query as queue was full.*/\n ShuttingDown = 6, /* Shutdown is in progress. */\n Error = 100, /* generic error*/\n Error_ECSql_PreparedFailed = Error + 1, /* ecsql prepared failed*/\n Error_ECSql_StepFailed = Error + 2, /* ecsql step failed*/\n Error_ECSql_RowToJsonFailed = Error + 3, /* ecsql failed to serialized row to json.*/\n Error_ECSql_BindingFailed = Error + 4, /* ecsql binding failed.*/\n Error_BlobIO_OpenFailed = Error + 5, /* class or property or instance specified was not found or property as not of type blob.*/\n Error_BlobIO_OutOfRange = Error + 6, /* range specified is invalid based on size of blob.*/\n}\n\n/** @internal */\nexport enum DbValueFormat {\n ECSqlNames = 0,\n JsNames = 1\n}\n\n/** @internal */\nexport interface DbRequest extends BaseReaderOptions {\n kind?: DbRequestKind;\n}\n\n/** @internal */\nexport interface DbQueryRequest extends DbRequest, QueryOptions {\n valueFormat?: DbValueFormat;\n query: string;\n args?: object;\n}\n\n/** @internal */\nexport interface DbBlobRequest extends DbRequest, BlobOptions {\n className: string;\n accessString: string;\n instanceId: Id64String;\n}\n\n/** @internal */\nexport interface DbResponse {\n stats: DbRuntimeStats;\n status: DbResponseStatus;\n kind: DbResponseKind;\n error?: string;\n}\n\n/** @internal */\nexport interface DbQueryResponse extends DbResponse {\n meta: QueryPropertyMetaData[];\n data: any[];\n rowCount: number;\n}\n\n/** @internal */\nexport interface DbBlobResponse extends DbResponse {\n data?: Uint8Array;\n rawBlobSize: number;\n}\n\n/** @public */\nexport class DbQueryError extends BentleyError {\n public constructor(public readonly response: any, public readonly request?: any, rc?: DbResult) {\n super(rc ?? DbResult.BE_SQLITE_ERROR, response.error, { response, request });\n }\n public static throwIfError(response: any, request?: any) {\n if ((response.status as number) >= (DbResponseStatus.Error as number)) {\n throw new DbQueryError(response, request);\n }\n if (response.status === DbResponseStatus.Cancel) {\n throw new DbQueryError(response, request, DbResult.BE_SQLITE_INTERRUPT);\n }\n }\n}\n\n/** @internal */\nexport interface DbRequestExecutor<TRequest extends DbRequest, TResponse extends DbResponse> {\n execute(request: TRequest): Promise<TResponse>;\n}\n\n/** @internal */\nexport interface DbQueryConfig {\n globalQuota?: QueryQuota;\n /** For testing */\n ignoreDelay?: boolean;\n /** Priority of request is ignored */\n ignorePriority?: boolean;\n /** Max queue size after which queries are rejected with error QueueFull */\n requestQueueSize?: number;\n /** Number of worker thread, default to 4 */\n workerThreads?: number;\n /** Use thread connection to prepare the statement */\n doNotUsePrimaryConnToPrepare?: boolean;\n /** After no activity for given time concurrent query will automatically shutdown */\n autoShutdownWhenIdleForSeconds?: number;\n /** Maximum number of statement cache per worker. Default to 40 */\n statementCacheSizePerWorker?: number;\n /* Monitor poll interval in milliseconds. Its responsible for cancelling queries that pass quota. It can be set between 1000 and Max time quota for query */\n monitorPollInterval?: number;\n /** Set memory map io for each worker connection size in bytes. Default to zero mean do not use mmap io */\n memoryMapFileSize?: number;\n /** How often to measure progress of a running ECSql statement which is used to enforced time limit */\n progressOpCount?: number;\n}\n"]}
@@ -21,22 +21,22 @@ export interface OrbitGtBlobProps {
21
21
  */
22
22
  export declare enum RealityDataProvider {
23
23
  /**
24
- * This is the legacy mode where the access to the 3d tiles is harcoded in ContextRealityModelProps.tilesetUrl property.
25
- * It was use to support RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles
26
- * You should use other mode when possible
24
+ * This is the legacy mode where the access to the 3d tiles is hardcoded in ContextRealityModelProps.tilesetUrl property.
25
+ * It was used to support RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles
26
+ * You should use other modes when possible
27
27
  * @see [[RealityDataSource.createKeyFromUrl]] that will try to detect provider from an URL
28
28
  */
29
29
  TilesetUrl = "TilesetUrl",
30
30
  /**
31
- * This is the legacy mode where the access to the 3d tiles is harcoded in ContextRealityModelProps.OrbitGtBlob property.
32
- * It was use to support OrbitPointCloud (OPC) from other server than ContextShare
33
- * You should use other mode when possible
31
+ * This is the legacy mode where the access to the 3d tiles is hardcoded in ContextRealityModelProps.OrbitGtBlob property.
32
+ * It was used to support OrbitPointCloud (OPC) from other server than ContextShare
33
+ * You should use other modes when possible
34
34
  * @see [[RealityDataSource.createKeyFromOrbitGtBlobProps]] that will try to detect provider from an URL
35
35
  */
36
36
  OrbitGtBlob = "OrbitGtBlob",
37
37
  /**
38
- * Will provide access url from realityDataId and iTwinId on contextShare for 3dTile storage format or OPC storage format
39
- * This provider support all type of 3dTile storage fomat and OrbitPointCloud: RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles, OPC
38
+ * Will provide access url from realityDataId and iTwinId on contextShare for 3dTile storage format or OPC storage format
39
+ * This provider supports all types of 3dTile storage format and OrbitPointCloud: RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles, OPC
40
40
  * @see [[RealityDataFormat]].
41
41
  */
42
42
  ContextShare = "ContextShare",
@@ -19,22 +19,22 @@ const RealityModelDisplaySettings_1 = require("./RealityModelDisplaySettings");
19
19
  var RealityDataProvider;
20
20
  (function (RealityDataProvider) {
21
21
  /**
22
- * This is the legacy mode where the access to the 3d tiles is harcoded in ContextRealityModelProps.tilesetUrl property.
23
- * It was use to support RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles
24
- * You should use other mode when possible
22
+ * This is the legacy mode where the access to the 3d tiles is hardcoded in ContextRealityModelProps.tilesetUrl property.
23
+ * It was used to support RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles
24
+ * You should use other modes when possible
25
25
  * @see [[RealityDataSource.createKeyFromUrl]] that will try to detect provider from an URL
26
26
  */
27
27
  RealityDataProvider["TilesetUrl"] = "TilesetUrl";
28
28
  /**
29
- * This is the legacy mode where the access to the 3d tiles is harcoded in ContextRealityModelProps.OrbitGtBlob property.
30
- * It was use to support OrbitPointCloud (OPC) from other server than ContextShare
31
- * You should use other mode when possible
29
+ * This is the legacy mode where the access to the 3d tiles is hardcoded in ContextRealityModelProps.OrbitGtBlob property.
30
+ * It was used to support OrbitPointCloud (OPC) from other server than ContextShare
31
+ * You should use other modes when possible
32
32
  * @see [[RealityDataSource.createKeyFromOrbitGtBlobProps]] that will try to detect provider from an URL
33
33
  */
34
34
  RealityDataProvider["OrbitGtBlob"] = "OrbitGtBlob";
35
35
  /**
36
- * Will provide access url from realityDataId and iTwinId on contextShare for 3dTile storage format or OPC storage format
37
- * This provider support all type of 3dTile storage fomat and OrbitPointCloud: RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles, OPC
36
+ * Will provide access url from realityDataId and iTwinId on contextShare for 3dTile storage format or OPC storage format
37
+ * This provider supports all types of 3dTile storage format and OrbitPointCloud: RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles, OPC
38
38
  * @see [[RealityDataFormat]].
39
39
  */
40
40
  RealityDataProvider["ContextShare"] = "ContextShare";
@@ -1 +1 @@
1
- {"version":3,"file":"ContextRealityModel.js","sourceRoot":"","sources":["../../src/ContextRealityModel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAsD;AACtD,yDAA+E;AAC/E,qDAAmG;AACnG,mEAAkH;AAClH,+EAAsG;AAatG;;GAEG;AACH,IAAY,mBAyBX;AAzBD,WAAY,mBAAmB;IAC7B;;;;;OAKG;IACH,gDAAyB,CAAA;IACzB;;;;;OAKG;IACH,kDAA2B,CAAA;IAC3B;;;;OAIG;IACH,oDAA6B,CAAA;IAC7B;;OAEG;IACH,wDAAiC,CAAA;AACnC,CAAC,EAzBW,mBAAmB,mCAAnB,mBAAmB,QAyB9B;AAED;;GAEG;AACH,IAAY,iBASX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,KAA0B;QACpG,IAAI,CAAC,wBAAwB,CAAC,UAAU,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC5D,CAAC;IAEO,sBAAsB,CAAC,SAAkB,EAAE,KAA0B;QAC3E,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IACvD,CAAC;CACF;AAlND,oDAkNC","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 DisplayStyles\n */\n\nimport { assert, BeEvent } from \"@itwin/core-bentley\";\nimport { FeatureAppearance, FeatureAppearanceProps } from \"./FeatureSymbology\";\nimport { PlanarClipMaskMode, PlanarClipMaskProps, PlanarClipMaskSettings } from \"./PlanarClipMask\";\nimport { SpatialClassifierProps, SpatialClassifiers, SpatialClassifiersContainer } from \"./SpatialClassification\";\nimport { RealityModelDisplayProps, RealityModelDisplaySettings } from \"./RealityModelDisplaySettings\";\n\n/** JSON representation of the blob properties for an OrbitGt property cloud.\n * @alpha\n */\nexport interface OrbitGtBlobProps {\n rdsUrl?: string;\n containerName: string;\n blobFileName: string;\n sasToken: string;\n accountName: string;\n}\n\n/** Identify the Reality Data service provider\n * @beta\n */\nexport enum RealityDataProvider {\n /**\n * This is the legacy mode where the access to the 3d tiles is harcoded in ContextRealityModelProps.tilesetUrl property.\n * It was use to support RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles\n * You should use other mode when possible\n * @see [[RealityDataSource.createKeyFromUrl]] that will try to detect provider from an URL\n */\n TilesetUrl = \"TilesetUrl\",\n /**\n * This is the legacy mode where the access to the 3d tiles is harcoded in ContextRealityModelProps.OrbitGtBlob property.\n * It was use to support OrbitPointCloud (OPC) from other server than ContextShare\n * You should use other mode when possible\n * @see [[RealityDataSource.createKeyFromOrbitGtBlobProps]] that will try to detect provider from an URL\n */\n OrbitGtBlob = \"OrbitGtBlob\",\n /**\n * Will provide access url from realityDataId and iTwinId on contextShare for 3dTile storage format or OPC storage format\n * This provider support all type of 3dTile storage fomat and OrbitPointCloud: RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles, OPC\n * @see [[RealityDataFormat]].\n */\n ContextShare = \"ContextShare\",\n /**\n * Will provide Open Street Map Building (OSM) from Cesium Ion (in 3dTile format)\n */\n CesiumIonAsset = \"CesiumIonAsset\",\n}\n\n/** Identify the Reality Data storage format\n * @beta\n */\nexport enum RealityDataFormat {\n /**\n * 3dTile supported formats; RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles\n * */\n ThreeDTile = \"ThreeDTile\",\n /**\n * Orbit Point Cloud (OPC) storage format (RealityDataType.OPC)\n */\n OPC = \"OPC\",\n}\n\n/** Utility function for RealityDataFormat\n * @beta\n */\nexport namespace RealityDataFormat {\n /**\n * Try to extract the RealityDataFormat from the url\n * @param tilesetUrl the reality data attachment url\n * @returns the extracted RealityDataFormat or ThreeDTile by default if not found\n */\n export function fromUrl(tilesetUrl: string): RealityDataFormat {\n let format = RealityDataFormat.ThreeDTile;\n if (tilesetUrl.includes(\".opc\"))\n format = RealityDataFormat.OPC;\n return format;\n }\n}\n\n/**\n * Key used by RealityDataSource to identify provider and reality data format\n * This key identify one and only one reality data source on the provider\n * @beta\n */\nexport interface RealityDataSourceKey {\n /**\n * The provider that supplies the access to reality data source for displaying the reality model\n * @see [[RealityDataProvider]] for default supported value;\n */\n provider: string;\n /**\n * The format used by the provider to store the reality data\n * @see [[RealityDataFormat]] for default supported value;\n */\n format: string;\n /** The reality data id that identify a reality data for the provider */\n id: string;\n /** The context id that was used when reality data was attached - if none provided, current session iTwinId will be used */\n iTwinId?: string;\n}\n/**\n * RealityDataSourceKey utility functions\n * @beta */\nexport namespace RealityDataSourceKey {\n /** Utility function to convert a RealityDataSourceKey into its string representation */\n export function convertToString(rdSourceKey: RealityDataSourceKey): string {\n return `${rdSourceKey.provider}:${rdSourceKey.format}:${rdSourceKey.id}:${rdSourceKey?.iTwinId}`;\n }\n /** Utility function to compare two RealityDataSourceKey, we consider it equal even if itwinId is different */\n export function isEqual(key1: RealityDataSourceKey, key2: RealityDataSourceKey): boolean {\n if ((key1.provider === RealityDataProvider.CesiumIonAsset) && key2.provider === RealityDataProvider.CesiumIonAsset)\n return true; // ignore other properties for CesiumIonAsset, id is hidden\n if ((key1.provider === key2.provider) && (key1.format === key2.format) && (key1.id === key2.id)) {\n // && (key1?.iTwinId === key2?.iTwinId)) -> ignore iTwinId, consider it is the same reality data\n return true;\n }\n return false;\n }\n}\n\n/** JSON representation of the reality data reference attachment properties.\n * @beta\n*/\nexport interface RealityDataSourceProps {\n /** The source key that identify a reality data for the provider. */\n sourceKey: RealityDataSourceKey;\n}\n\n/** JSON representation of a [[ContextRealityModel]].\n * @public\n * @extensions\n */\nexport interface ContextRealityModelProps {\n /** See [[ContextRealityModel.rdSourceKey]].\n * @beta\n */\n rdSourceKey?: RealityDataSourceKey;\n /** The URL that supplies the 3d tiles for displaying the reality model. */\n tilesetUrl: string;\n /** See [[ContextRealityModel.orbitGtBlob]].\n * @alpha\n */\n orbitGtBlob?: OrbitGtBlobProps;\n /** See [[ContextRealityModel.realityDataId]]. */\n realityDataId?: string;\n /** An optional, user-friendly name for the reality model suitable for display in a user interface. */\n name?: string;\n /** An optional, user-friendly description of the reality model suitable for display in a user interface. */\n description?: string;\n /** See [[ContextRealityModel.classifiers]]. */\n classifiers?: SpatialClassifierProps[];\n /** See [[ContextRealityModel.planarClipMask]]. */\n planarClipMask?: PlanarClipMaskProps;\n /** See [[ContextRealityModel.appearanceOverrides]]. */\n appearanceOverrides?: FeatureAppearanceProps;\n /** See [[ContextRealityModel.displaySettings]].\n * @beta\n */\n displaySettings?: RealityModelDisplayProps;\n /** See [[ContextRealityModel.invisible]].\n * @beta\n */\n invisible?: boolean;\n}\n\n/** @public */\nexport namespace ContextRealityModelProps {\n /** Produce a deep copy of `input`. */\n export function clone(input: ContextRealityModelProps): ContextRealityModelProps {\n // Spread operator is shallow, and includes `undefined` properties and empty strings.\n // We want to make deep copies, omit undefined properties and empty strings, and require tilesetUrl to be defined.\n const output: ContextRealityModelProps = { tilesetUrl: input.tilesetUrl ?? \"\" };\n\n if (input.rdSourceKey)\n output.rdSourceKey = { ...input.rdSourceKey };\n\n if (input.name)\n output.name = input.name;\n\n if (input.realityDataId)\n output.realityDataId = input.realityDataId;\n\n if (input.description)\n output.description = input.description;\n\n if (input.orbitGtBlob)\n output.orbitGtBlob = { ...input.orbitGtBlob };\n\n if (input.appearanceOverrides) {\n output.appearanceOverrides = { ...input.appearanceOverrides };\n if (input.appearanceOverrides.rgb)\n output.appearanceOverrides.rgb = { ...input.appearanceOverrides.rgb };\n }\n\n if (input.displaySettings) {\n output.displaySettings = { ...input.displaySettings };\n if (input.displaySettings.pointCloud)\n output.displaySettings.pointCloud = { ...output.displaySettings.pointCloud };\n }\n\n if (input.planarClipMask)\n output.planarClipMask = { ...input.planarClipMask };\n\n if (input.classifiers)\n output.classifiers = input.classifiers.map((x) => { return { ...x, flags: { ...x.flags } }; });\n\n if (input.invisible)\n output.invisible = input.invisible;\n\n return output;\n }\n}\n\n/** A reality model not associated with a [GeometricModel]($backend) but instead defined in a [DisplayStyle]($backend) or [DisplayStyleState]($frontend).\n * Such reality models are displayed to provide context to the view and can be freely attached and detached at display time.\n * @see [this interactive example](https://www.itwinjs.org/sample-showcase/?group=Viewer&sample=reality-data-sample)\n * @see [[DisplayStyleSettings.contextRealityModels]] to define context reality models for a display style.\n * @public\n */\nexport class ContextRealityModel {\n /** @internal */\n protected readonly _props: ContextRealityModelProps;\n /**\n * The reality data source key identify the reality data provider and storage format.\n * It takes precedence over tilesetUrl and orbitGtBlob when present and can be use to actually replace these properties.\n * @beta\n */\n public readonly rdSourceKey?: RealityDataSourceKey;\n /** A name suitable for display in a user interface. By default, an empty string. */\n public readonly name: string;\n /** The URL that supplies the 3d tiles for displaying the reality model. */\n public readonly url: string;\n /** A description of the model suitable for display in a user interface. By default, an empty string. */\n public readonly description: string;\n /** An optional identifier that, if present, can be used to elide a request to the reality data service. */\n public readonly realityDataId?: string;\n\n private _invisible: boolean;\n private readonly _classifiers: SpatialClassifiers;\n /** @alpha */\n public readonly orbitGtBlob?: Readonly<OrbitGtBlobProps>;\n protected _appearanceOverrides?: FeatureAppearance;\n /** @beta */\n protected _displaySettings: RealityModelDisplaySettings;\n protected _planarClipMask?: PlanarClipMaskSettings;\n /** Event dispatched just before assignment to [[planarClipMaskSettings]]. */\n public readonly onPlanarClipMaskChanged = new BeEvent<(newSettings: PlanarClipMaskSettings | undefined, model: ContextRealityModel) => void>();\n /** Event dispatched just before assignment to [[appearanceOverrides]]. */\n public readonly onAppearanceOverridesChanged = new BeEvent<(newOverrides: FeatureAppearance | undefined, model: ContextRealityModel) => void>();\n /** Event dispatched just before assignment to [[displaySettings]].\n * @beta\n */\n public readonly onDisplaySettingsChanged = new BeEvent<(newSettings: RealityModelDisplaySettings, model: ContextRealityModel) => void>();\n /** Event dispatched just before a model become invisible\n * @beta\n */\n public readonly onInvisibleChanged = new BeEvent<(invisible: boolean, model: ContextRealityModel) => void>();\n\n /** Construct a new context reality model.\n * @param props JSON representation of the reality model, which will be kept in sync with changes made via the ContextRealityModel's methods.\n * @param options Options to customize how the reality model is created.\n */\n public constructor(props: ContextRealityModelProps, options?: { createClassifiers: (container: SpatialClassifiersContainer) => SpatialClassifiers }) {\n this._props = props;\n this.rdSourceKey = props.rdSourceKey;\n this.name = props.name ?? \"\";\n this.url = props.tilesetUrl ?? \"\";\n this.orbitGtBlob = props.orbitGtBlob;\n this.realityDataId = props.realityDataId;\n this.description = props.description ?? \"\";\n this._invisible = props.invisible ?? false;\n this._appearanceOverrides = props.appearanceOverrides ? FeatureAppearance.fromJSON(props.appearanceOverrides) : undefined;\n this._displaySettings = RealityModelDisplaySettings.fromJSON(props.displaySettings);\n\n if (props.planarClipMask && props.planarClipMask.mode !== PlanarClipMaskMode.None)\n this._planarClipMask = PlanarClipMaskSettings.fromJSON(props.planarClipMask);\n\n if (options?.createClassifiers) {\n this._classifiers = options.createClassifiers(props);\n } else {\n this._classifiers = new SpatialClassifiers(props);\n }\n }\n\n /** A set of [[SpatialClassifier]]s, of which one at any given time can be used to classify the reality model. */\n public get classifiers(): SpatialClassifiers {\n return this._classifiers;\n }\n\n /** Optionally describes how the geometry of the reality model can be masked by other models. */\n public get planarClipMaskSettings(): PlanarClipMaskSettings | undefined {\n return this._planarClipMask;\n }\n public set planarClipMaskSettings(settings: PlanarClipMaskSettings | undefined) {\n this.onPlanarClipMaskChanged.raiseEvent(settings, this);\n if (!settings)\n delete this._props.planarClipMask;\n else\n this._props.planarClipMask = settings.toJSON();\n\n this._planarClipMask = settings;\n }\n\n /** Overrides applied to the appearance of the reality model. Only the rgb, transparency, nonLocatable, and emphasized properties are applicable - the rest are ignored. */\n public get appearanceOverrides(): FeatureAppearance | undefined {\n return this._appearanceOverrides;\n }\n public set appearanceOverrides(overrides: FeatureAppearance | undefined) {\n this.onAppearanceOverridesChanged.raiseEvent(overrides, this);\n if (!overrides)\n delete this._props.appearanceOverrides;\n else\n this._props.appearanceOverrides = overrides.toJSON();\n\n this._appearanceOverrides = overrides;\n }\n\n /** Settings controlling how this reality model is displayed in a [Viewport]($frontend).\n * @beta\n */\n public get displaySettings(): RealityModelDisplaySettings {\n return this._displaySettings;\n }\n public set displaySettings(settings: RealityModelDisplaySettings) {\n this.onDisplaySettingsChanged.raiseEvent(settings, this);\n this._props.displaySettings = settings.toJSON();\n this._displaySettings = settings;\n }\n\n /** If true, reality model is not drawn.\n * @beta\n */\n public get invisible(): boolean {\n return this._invisible;\n }\n public set invisible(invisible: boolean) {\n if (invisible !== this.invisible) {\n this.onInvisibleChanged.raiseEvent(invisible, this);\n }\n\n this._props.invisible = invisible;\n this._invisible = invisible;\n }\n\n /** Convert this model to its JSON representation. */\n public toJSON(): ContextRealityModelProps {\n return ContextRealityModelProps.clone(this._props);\n }\n\n /** Returns true if [[name]] and [[url]] match the specified name and url. */\n public matchesNameAndUrl(name: string, url: string): boolean {\n return this.name === name && this.url === url;\n }\n}\n\n/** An object that can store the JSON representation of a list of [[ContextRealityModel]]s.\n * @see [[ContextRealityModels]].\n * @see [[DisplayStyleSettingsProps.contextRealityModels]].\n * @public\n * @extensions\n */\nexport interface ContextRealityModelsContainer {\n /** The list of reality models. */\n contextRealityModels?: ContextRealityModelProps[];\n /** @internal used for type discrimination with ContextRealityModelsArgs. */\n container?: never;\n}\n\n/** Arguments supplied to the constructor of [[ContextRealityModels]].\n * @public\n */\nexport interface ContextRealityModelsArgs {\n /** The object that holds the JSON representation of the list of context reality models. */\n container: ContextRealityModelsContainer;\n /** Optional function used to instantiate each [[ContextRealityModel]] in the list. */\n createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel;\n /** If true, the list will not be populated by the constructor. Instead, the caller is responsible for calling [[ContextRealityModels.populate]] exactly once after construction.\n * This is chiefly intended for use internally by the [DisplayStyleState]($frontend) constructor.\n */\n deferPopulating?: boolean;\n}\n\n/** A list of [[ContextRealityModel]]s attached to a [[DisplayStyleSettings]]. The list may be presented to the user with the name and description of each model.\n * The list is automatically synchronized with the underlying JSON representation provided by the input [[ContextRealityModelsContainer]].\n * @see [this interactive example](https://www.itwinjs.org/sample-showcase/?group=Viewer&sample=reality-data-sample)\n * @see [[DisplayStyleSettings.contextRealityModels]].\n * @public\n */\nexport class ContextRealityModels {\n private readonly _container: ContextRealityModelsContainer;\n private readonly _createModel: (props: ContextRealityModelProps) => ContextRealityModel;\n private readonly _models: ContextRealityModel[] = [];\n /** Event dispatched just before [[ContextRealityModel.planarClipMaskSettings]] is modified for one of the reality models. */\n public readonly onPlanarClipMaskChanged = new BeEvent<(model: ContextRealityModel, newSettings: PlanarClipMaskSettings | undefined) => void>();\n /** Event dispatched just before [[ContextRealityModel.appearanceOverrides]] is modified for one of the reality models. */\n public readonly onAppearanceOverridesChanged = new BeEvent<(model: ContextRealityModel, newOverrides: FeatureAppearance | undefined) => void>();\n /** Event dispatched just before [[ContextRealityModel.displaySettings]] is modified for one of the reality models.\n * @beta\n */\n public readonly onDisplaySettingsChanged = new BeEvent<(model: ContextRealityModel, newSettings: RealityModelDisplaySettings) => void>();\n /** Event dispatched just before [[ContextRealityModel.invisible]] is modified for one of the reality models.\n * @beta\n */\n public readonly onInvisibleChanged = new BeEvent<(model: ContextRealityModel, invisible: boolean) => void>();\n /** Event dispatched when a model is [[add]]ed, [[delete]]d, [[replace]]d, or [[update]]d. */\n public readonly onChanged = new BeEvent<(previousModel: ContextRealityModel | undefined, newModel: ContextRealityModel | undefined) => void>();\n\n /** Construct a new list of reality models from its JSON representation. The list will be initialized from `container.contextRealityModels` and that JSON representation\n * will be kept in sync with changes made to the list. The caller should not directly modify `container.contextRealityModels` or its contents as that will cause the list\n * to become out of sync with the JSON representation.\n * @param container The object that holds the JSON representation of the list.\n * @param createContextRealityModel Optional function used to instantiate each [[ContextRealityModel]] in the list.\n */\n public constructor(container: ContextRealityModelsContainer, createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel);\n\n /** Construct a new list of reality models from its JSON representation. The list will be initialized from `args.container.contextRealityModels` and that JSON representation\n * will be kept in sync with changes made to the list. The caller should not directly modify `container.contextRealityModels` or its contents as that will cause the list\n * to become out of sync with the JSON representation.\n * @param args Specifies the container and optionally customizes how the list of models is populated.\n */\n public constructor(args: ContextRealityModelsArgs);\n\n /** @internal */\n public constructor(arg0: ContextRealityModelsContainer | ContextRealityModelsArgs, createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel) {\n let container: ContextRealityModelsContainer;\n let defer = false;\n if (arg0.container) {\n container = arg0.container;\n createContextRealityModel = arg0.createContextRealityModel;\n defer = true === arg0.deferPopulating;\n } else {\n container = arg0;\n }\n\n this._container = container;\n this._createModel = createContextRealityModel ?? ((props) => new ContextRealityModel(props));\n\n if (!defer)\n this.populate();\n }\n\n /** @internal needs to be invoked after DisplayStyleSettings constructor by DisplayStyleState constructor.*/\n /** Populate the list of [[models]] from the container that was supplied to the constructor.\n * This should only be invoked once, and only if [[ContextRealityModelsArgs.deferPopulating]] was specified as `true` when calling the constructor.\n * @public\n */\n public populate(): void {\n assert(this._models.length === 0, \"do not call ContextRealityModels.populate more than once\");\n const models = this._container.contextRealityModels;\n if (models)\n for (const model of models)\n this._models.push(this.createModel(model));\n }\n\n /** The read-only list of reality models. */\n public get models(): ReadonlyArray<ContextRealityModel> {\n return this._models;\n }\n\n /** Append a new reality model to the list.\n * @param The JSON representation of the reality model.\n * @returns the newly-added reality model.\n */\n public add(props: ContextRealityModelProps): ContextRealityModel {\n if (!this._container.contextRealityModels)\n this._container.contextRealityModels = [];\n\n props = ContextRealityModelProps.clone(props);\n const model = this.createModel(props);\n\n this.onChanged.raiseEvent(undefined, model);\n\n this._models.push(model);\n this._container.contextRealityModels.push(props);\n\n return model;\n }\n\n /** Remove the specified reality model from the list.\n * @param model The reality model to remove.\n * @returns true if the model was removed, or false if the model was not present in the list.\n */\n public delete(model: ContextRealityModel): boolean {\n const index = this._models.indexOf(model);\n if (-1 === index)\n return false;\n\n assert(undefined !== this._container.contextRealityModels);\n assert(index < this._container.contextRealityModels.length);\n\n this.dropEventListeners(model);\n this.onChanged.raiseEvent(model, undefined);\n\n this._models.splice(index, 1);\n if (this.models.length === 0)\n this._container.contextRealityModels = undefined;\n else\n this._container.contextRealityModels.splice(index, 1);\n\n return true;\n }\n\n /** Remove all reality models from the list. */\n public clear(): void {\n for (const model of this.models) {\n this.dropEventListeners(model);\n this.onChanged.raiseEvent(model, undefined);\n }\n\n this._container.contextRealityModels = undefined;\n this._models.length = 0;\n }\n\n /** Replace a reality model in the list.\n * @param toReplace The reality model to be replaced.\n * @param replaceWith The JSON representation of the replacement reality model.\n * @returns the newly-created reality model that replaced `toReplace`.\n * @throws Error if `toReplace` is not present in the list\n * @note The replacement occupies the same index in the list as `toReplace` did.\n */\n public replace(toReplace: ContextRealityModel, replaceWith: ContextRealityModelProps): ContextRealityModel {\n const index = this._models.indexOf(toReplace);\n if (-1 === index)\n throw new Error(\"ContextRealityModel not present in list.\");\n\n assert(undefined !== this._container.contextRealityModels);\n assert(index < this._container.contextRealityModels.length);\n\n replaceWith = ContextRealityModelProps.clone(replaceWith);\n const model = this.createModel(replaceWith);\n\n this.onChanged.raiseEvent(toReplace, model);\n this.dropEventListeners(toReplace);\n\n this._models[index] = model;\n this._container.contextRealityModels[index] = replaceWith;\n\n return model;\n }\n\n /** Change selected properties of a reality model.\n * @param toUpdate The reality model whose properties are to be modified.\n * @param updateProps The properties to change.\n * @returns The updated reality model, identical to `toUpdate` except for properties explicitly supplied by `updateProps`.\n * @throws Error if `toUpdate` is not present in the list.\n */\n public update(toUpdate: ContextRealityModel, updateProps: Partial<ContextRealityModelProps>): ContextRealityModel {\n const props = {\n ...toUpdate.toJSON(),\n ...updateProps,\n };\n\n // Partial<> makes it possible to pass `undefined` for tilesetUrl...preserve previous URL in that case.\n if (undefined === props.tilesetUrl)\n props.tilesetUrl = toUpdate.url;\n\n return this.replace(toUpdate, props);\n }\n\n private createModel(props: ContextRealityModelProps): ContextRealityModel {\n const model = this._createModel(props);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onPlanarClipMaskChanged.addListener(this.handlePlanarClipMaskChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onAppearanceOverridesChanged.addListener(this.handleAppearanceOverridesChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onDisplaySettingsChanged.addListener(this.handleDisplaySettingsChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onInvisibleChanged.addListener(this.handleInvisibleChanged, this);\n return model;\n }\n\n private dropEventListeners(model: ContextRealityModel): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onPlanarClipMaskChanged.removeListener(this.handlePlanarClipMaskChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onAppearanceOverridesChanged.removeListener(this.handleAppearanceOverridesChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onDisplaySettingsChanged.removeListener(this.handleDisplaySettingsChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onInvisibleChanged.removeListener(this.handleInvisibleChanged, this);\n }\n\n private handlePlanarClipMaskChanged(mask: PlanarClipMaskSettings | undefined, model: ContextRealityModel): void {\n this.onPlanarClipMaskChanged.raiseEvent(model, mask);\n }\n\n private handleAppearanceOverridesChanged(app: FeatureAppearance | undefined, model: ContextRealityModel): void {\n this.onAppearanceOverridesChanged.raiseEvent(model, app);\n }\n\n private handleDisplaySettingsChanged(settings: RealityModelDisplaySettings, model: ContextRealityModel): void {\n this.onDisplaySettingsChanged.raiseEvent(model, settings);\n }\n\n private handleInvisibleChanged(invisible: boolean, model: ContextRealityModel): void {\n this.onInvisibleChanged.raiseEvent(model, invisible);\n }\n}\n"]}
1
+ {"version":3,"file":"ContextRealityModel.js","sourceRoot":"","sources":["../../src/ContextRealityModel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAsD;AACtD,yDAA+E;AAC/E,qDAAmG;AACnG,mEAAkH;AAClH,+EAAsG;AAatG;;GAEG;AACH,IAAY,mBAyBX;AAzBD,WAAY,mBAAmB;IAC7B;;;;;OAKG;IACH,gDAAyB,CAAA;IACzB;;;;;OAKG;IACH,kDAA2B,CAAA;IAC3B;;;;OAIG;IACH,oDAA6B,CAAA;IAC7B;;OAEG;IACH,wDAAiC,CAAA;AACnC,CAAC,EAzBW,mBAAmB,mCAAnB,mBAAmB,QAyB9B;AAED;;GAEG;AACH,IAAY,iBASX;AATD,WAAY,iBAAiB;IAC3B;;SAEK;IACL,8CAAyB,CAAA;IACzB;;MAEE;IACF,gCAAW,CAAA;AACb,CAAC,EATW,iBAAiB,iCAAjB,iBAAiB,QAS5B;AAED;;GAEG;AACH,WAAiB,iBAAiB;IAChC;;;;OAIG;IACH,SAAgB,OAAO,CAA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AAC,CAAC;IACvD,CAAC;CACF;AAlND,oDAkNC","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 DisplayStyles\n */\n\nimport { assert, BeEvent } from \"@itwin/core-bentley\";\nimport { FeatureAppearance, FeatureAppearanceProps } from \"./FeatureSymbology\";\nimport { PlanarClipMaskMode, PlanarClipMaskProps, PlanarClipMaskSettings } from \"./PlanarClipMask\";\nimport { SpatialClassifierProps, SpatialClassifiers, SpatialClassifiersContainer } from \"./SpatialClassification\";\nimport { RealityModelDisplayProps, RealityModelDisplaySettings } from \"./RealityModelDisplaySettings\";\n\n/** JSON representation of the blob properties for an OrbitGt property cloud.\n * @alpha\n */\nexport interface OrbitGtBlobProps {\n rdsUrl?: string;\n containerName: string;\n blobFileName: string;\n sasToken: string;\n accountName: string;\n}\n\n/** Identify the Reality Data service provider\n * @beta\n */\nexport enum RealityDataProvider {\n /**\n * This is the legacy mode where the access to the 3d tiles is hardcoded in ContextRealityModelProps.tilesetUrl property.\n * It was used to support RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles\n * You should use other modes when possible\n * @see [[RealityDataSource.createKeyFromUrl]] that will try to detect provider from an URL\n */\n TilesetUrl = \"TilesetUrl\",\n /**\n * This is the legacy mode where the access to the 3d tiles is hardcoded in ContextRealityModelProps.OrbitGtBlob property.\n * It was used to support OrbitPointCloud (OPC) from other server than ContextShare\n * You should use other modes when possible\n * @see [[RealityDataSource.createKeyFromOrbitGtBlobProps]] that will try to detect provider from an URL\n */\n OrbitGtBlob = \"OrbitGtBlob\",\n /**\n * Will provide access url from realityDataId and iTwinId on contextShare for 3dTile storage format or OPC storage format\n * This provider supports all types of 3dTile storage format and OrbitPointCloud: RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles, OPC\n * @see [[RealityDataFormat]].\n */\n ContextShare = \"ContextShare\",\n /**\n * Will provide Open Street Map Building (OSM) from Cesium Ion (in 3dTile format)\n */\n CesiumIonAsset = \"CesiumIonAsset\",\n}\n\n/** Identify the Reality Data storage format\n * @beta\n */\nexport enum RealityDataFormat {\n /**\n * 3dTile supported formats; RealityMesh3DTiles, Terrain3DTiles, Cesium3DTiles\n * */\n ThreeDTile = \"ThreeDTile\",\n /**\n * Orbit Point Cloud (OPC) storage format (RealityDataType.OPC)\n */\n OPC = \"OPC\",\n}\n\n/** Utility function for RealityDataFormat\n * @beta\n */\nexport namespace RealityDataFormat {\n /**\n * Try to extract the RealityDataFormat from the url\n * @param tilesetUrl the reality data attachment url\n * @returns the extracted RealityDataFormat or ThreeDTile by default if not found\n */\n export function fromUrl(tilesetUrl: string): RealityDataFormat {\n let format = RealityDataFormat.ThreeDTile;\n if (tilesetUrl.includes(\".opc\"))\n format = RealityDataFormat.OPC;\n return format;\n }\n}\n\n/**\n * Key used by RealityDataSource to identify provider and reality data format\n * This key identify one and only one reality data source on the provider\n * @beta\n */\nexport interface RealityDataSourceKey {\n /**\n * The provider that supplies the access to reality data source for displaying the reality model\n * @see [[RealityDataProvider]] for default supported value;\n */\n provider: string;\n /**\n * The format used by the provider to store the reality data\n * @see [[RealityDataFormat]] for default supported value;\n */\n format: string;\n /** The reality data id that identify a reality data for the provider */\n id: string;\n /** The context id that was used when reality data was attached - if none provided, current session iTwinId will be used */\n iTwinId?: string;\n}\n/**\n * RealityDataSourceKey utility functions\n * @beta */\nexport namespace RealityDataSourceKey {\n /** Utility function to convert a RealityDataSourceKey into its string representation */\n export function convertToString(rdSourceKey: RealityDataSourceKey): string {\n return `${rdSourceKey.provider}:${rdSourceKey.format}:${rdSourceKey.id}:${rdSourceKey?.iTwinId}`;\n }\n /** Utility function to compare two RealityDataSourceKey, we consider it equal even if itwinId is different */\n export function isEqual(key1: RealityDataSourceKey, key2: RealityDataSourceKey): boolean {\n if ((key1.provider === RealityDataProvider.CesiumIonAsset) && key2.provider === RealityDataProvider.CesiumIonAsset)\n return true; // ignore other properties for CesiumIonAsset, id is hidden\n if ((key1.provider === key2.provider) && (key1.format === key2.format) && (key1.id === key2.id)) {\n // && (key1?.iTwinId === key2?.iTwinId)) -> ignore iTwinId, consider it is the same reality data\n return true;\n }\n return false;\n }\n}\n\n/** JSON representation of the reality data reference attachment properties.\n * @beta\n*/\nexport interface RealityDataSourceProps {\n /** The source key that identify a reality data for the provider. */\n sourceKey: RealityDataSourceKey;\n}\n\n/** JSON representation of a [[ContextRealityModel]].\n * @public\n * @extensions\n */\nexport interface ContextRealityModelProps {\n /** See [[ContextRealityModel.rdSourceKey]].\n * @beta\n */\n rdSourceKey?: RealityDataSourceKey;\n /** The URL that supplies the 3d tiles for displaying the reality model. */\n tilesetUrl: string;\n /** See [[ContextRealityModel.orbitGtBlob]].\n * @alpha\n */\n orbitGtBlob?: OrbitGtBlobProps;\n /** See [[ContextRealityModel.realityDataId]]. */\n realityDataId?: string;\n /** An optional, user-friendly name for the reality model suitable for display in a user interface. */\n name?: string;\n /** An optional, user-friendly description of the reality model suitable for display in a user interface. */\n description?: string;\n /** See [[ContextRealityModel.classifiers]]. */\n classifiers?: SpatialClassifierProps[];\n /** See [[ContextRealityModel.planarClipMask]]. */\n planarClipMask?: PlanarClipMaskProps;\n /** See [[ContextRealityModel.appearanceOverrides]]. */\n appearanceOverrides?: FeatureAppearanceProps;\n /** See [[ContextRealityModel.displaySettings]].\n * @beta\n */\n displaySettings?: RealityModelDisplayProps;\n /** See [[ContextRealityModel.invisible]].\n * @beta\n */\n invisible?: boolean;\n}\n\n/** @public */\nexport namespace ContextRealityModelProps {\n /** Produce a deep copy of `input`. */\n export function clone(input: ContextRealityModelProps): ContextRealityModelProps {\n // Spread operator is shallow, and includes `undefined` properties and empty strings.\n // We want to make deep copies, omit undefined properties and empty strings, and require tilesetUrl to be defined.\n const output: ContextRealityModelProps = { tilesetUrl: input.tilesetUrl ?? \"\" };\n\n if (input.rdSourceKey)\n output.rdSourceKey = { ...input.rdSourceKey };\n\n if (input.name)\n output.name = input.name;\n\n if (input.realityDataId)\n output.realityDataId = input.realityDataId;\n\n if (input.description)\n output.description = input.description;\n\n if (input.orbitGtBlob)\n output.orbitGtBlob = { ...input.orbitGtBlob };\n\n if (input.appearanceOverrides) {\n output.appearanceOverrides = { ...input.appearanceOverrides };\n if (input.appearanceOverrides.rgb)\n output.appearanceOverrides.rgb = { ...input.appearanceOverrides.rgb };\n }\n\n if (input.displaySettings) {\n output.displaySettings = { ...input.displaySettings };\n if (input.displaySettings.pointCloud)\n output.displaySettings.pointCloud = { ...output.displaySettings.pointCloud };\n }\n\n if (input.planarClipMask)\n output.planarClipMask = { ...input.planarClipMask };\n\n if (input.classifiers)\n output.classifiers = input.classifiers.map((x) => { return { ...x, flags: { ...x.flags } }; });\n\n if (input.invisible)\n output.invisible = input.invisible;\n\n return output;\n }\n}\n\n/** A reality model not associated with a [GeometricModel]($backend) but instead defined in a [DisplayStyle]($backend) or [DisplayStyleState]($frontend).\n * Such reality models are displayed to provide context to the view and can be freely attached and detached at display time.\n * @see [this interactive example](https://www.itwinjs.org/sample-showcase/?group=Viewer&sample=reality-data-sample)\n * @see [[DisplayStyleSettings.contextRealityModels]] to define context reality models for a display style.\n * @public\n */\nexport class ContextRealityModel {\n /** @internal */\n protected readonly _props: ContextRealityModelProps;\n /**\n * The reality data source key identify the reality data provider and storage format.\n * It takes precedence over tilesetUrl and orbitGtBlob when present and can be use to actually replace these properties.\n * @beta\n */\n public readonly rdSourceKey?: RealityDataSourceKey;\n /** A name suitable for display in a user interface. By default, an empty string. */\n public readonly name: string;\n /** The URL that supplies the 3d tiles for displaying the reality model. */\n public readonly url: string;\n /** A description of the model suitable for display in a user interface. By default, an empty string. */\n public readonly description: string;\n /** An optional identifier that, if present, can be used to elide a request to the reality data service. */\n public readonly realityDataId?: string;\n\n private _invisible: boolean;\n private readonly _classifiers: SpatialClassifiers;\n /** @alpha */\n public readonly orbitGtBlob?: Readonly<OrbitGtBlobProps>;\n protected _appearanceOverrides?: FeatureAppearance;\n /** @beta */\n protected _displaySettings: RealityModelDisplaySettings;\n protected _planarClipMask?: PlanarClipMaskSettings;\n /** Event dispatched just before assignment to [[planarClipMaskSettings]]. */\n public readonly onPlanarClipMaskChanged = new BeEvent<(newSettings: PlanarClipMaskSettings | undefined, model: ContextRealityModel) => void>();\n /** Event dispatched just before assignment to [[appearanceOverrides]]. */\n public readonly onAppearanceOverridesChanged = new BeEvent<(newOverrides: FeatureAppearance | undefined, model: ContextRealityModel) => void>();\n /** Event dispatched just before assignment to [[displaySettings]].\n * @beta\n */\n public readonly onDisplaySettingsChanged = new BeEvent<(newSettings: RealityModelDisplaySettings, model: ContextRealityModel) => void>();\n /** Event dispatched just before a model become invisible\n * @beta\n */\n public readonly onInvisibleChanged = new BeEvent<(invisible: boolean, model: ContextRealityModel) => void>();\n\n /** Construct a new context reality model.\n * @param props JSON representation of the reality model, which will be kept in sync with changes made via the ContextRealityModel's methods.\n * @param options Options to customize how the reality model is created.\n */\n public constructor(props: ContextRealityModelProps, options?: { createClassifiers: (container: SpatialClassifiersContainer) => SpatialClassifiers }) {\n this._props = props;\n this.rdSourceKey = props.rdSourceKey;\n this.name = props.name ?? \"\";\n this.url = props.tilesetUrl ?? \"\";\n this.orbitGtBlob = props.orbitGtBlob;\n this.realityDataId = props.realityDataId;\n this.description = props.description ?? \"\";\n this._invisible = props.invisible ?? false;\n this._appearanceOverrides = props.appearanceOverrides ? FeatureAppearance.fromJSON(props.appearanceOverrides) : undefined;\n this._displaySettings = RealityModelDisplaySettings.fromJSON(props.displaySettings);\n\n if (props.planarClipMask && props.planarClipMask.mode !== PlanarClipMaskMode.None)\n this._planarClipMask = PlanarClipMaskSettings.fromJSON(props.planarClipMask);\n\n if (options?.createClassifiers) {\n this._classifiers = options.createClassifiers(props);\n } else {\n this._classifiers = new SpatialClassifiers(props);\n }\n }\n\n /** A set of [[SpatialClassifier]]s, of which one at any given time can be used to classify the reality model. */\n public get classifiers(): SpatialClassifiers {\n return this._classifiers;\n }\n\n /** Optionally describes how the geometry of the reality model can be masked by other models. */\n public get planarClipMaskSettings(): PlanarClipMaskSettings | undefined {\n return this._planarClipMask;\n }\n public set planarClipMaskSettings(settings: PlanarClipMaskSettings | undefined) {\n this.onPlanarClipMaskChanged.raiseEvent(settings, this);\n if (!settings)\n delete this._props.planarClipMask;\n else\n this._props.planarClipMask = settings.toJSON();\n\n this._planarClipMask = settings;\n }\n\n /** Overrides applied to the appearance of the reality model. Only the rgb, transparency, nonLocatable, and emphasized properties are applicable - the rest are ignored. */\n public get appearanceOverrides(): FeatureAppearance | undefined {\n return this._appearanceOverrides;\n }\n public set appearanceOverrides(overrides: FeatureAppearance | undefined) {\n this.onAppearanceOverridesChanged.raiseEvent(overrides, this);\n if (!overrides)\n delete this._props.appearanceOverrides;\n else\n this._props.appearanceOverrides = overrides.toJSON();\n\n this._appearanceOverrides = overrides;\n }\n\n /** Settings controlling how this reality model is displayed in a [Viewport]($frontend).\n * @beta\n */\n public get displaySettings(): RealityModelDisplaySettings {\n return this._displaySettings;\n }\n public set displaySettings(settings: RealityModelDisplaySettings) {\n this.onDisplaySettingsChanged.raiseEvent(settings, this);\n this._props.displaySettings = settings.toJSON();\n this._displaySettings = settings;\n }\n\n /** If true, reality model is not drawn.\n * @beta\n */\n public get invisible(): boolean {\n return this._invisible;\n }\n public set invisible(invisible: boolean) {\n if (invisible !== this.invisible) {\n this.onInvisibleChanged.raiseEvent(invisible, this);\n }\n\n this._props.invisible = invisible;\n this._invisible = invisible;\n }\n\n /** Convert this model to its JSON representation. */\n public toJSON(): ContextRealityModelProps {\n return ContextRealityModelProps.clone(this._props);\n }\n\n /** Returns true if [[name]] and [[url]] match the specified name and url. */\n public matchesNameAndUrl(name: string, url: string): boolean {\n return this.name === name && this.url === url;\n }\n}\n\n/** An object that can store the JSON representation of a list of [[ContextRealityModel]]s.\n * @see [[ContextRealityModels]].\n * @see [[DisplayStyleSettingsProps.contextRealityModels]].\n * @public\n * @extensions\n */\nexport interface ContextRealityModelsContainer {\n /** The list of reality models. */\n contextRealityModels?: ContextRealityModelProps[];\n /** @internal used for type discrimination with ContextRealityModelsArgs. */\n container?: never;\n}\n\n/** Arguments supplied to the constructor of [[ContextRealityModels]].\n * @public\n */\nexport interface ContextRealityModelsArgs {\n /** The object that holds the JSON representation of the list of context reality models. */\n container: ContextRealityModelsContainer;\n /** Optional function used to instantiate each [[ContextRealityModel]] in the list. */\n createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel;\n /** If true, the list will not be populated by the constructor. Instead, the caller is responsible for calling [[ContextRealityModels.populate]] exactly once after construction.\n * This is chiefly intended for use internally by the [DisplayStyleState]($frontend) constructor.\n */\n deferPopulating?: boolean;\n}\n\n/** A list of [[ContextRealityModel]]s attached to a [[DisplayStyleSettings]]. The list may be presented to the user with the name and description of each model.\n * The list is automatically synchronized with the underlying JSON representation provided by the input [[ContextRealityModelsContainer]].\n * @see [this interactive example](https://www.itwinjs.org/sample-showcase/?group=Viewer&sample=reality-data-sample)\n * @see [[DisplayStyleSettings.contextRealityModels]].\n * @public\n */\nexport class ContextRealityModels {\n private readonly _container: ContextRealityModelsContainer;\n private readonly _createModel: (props: ContextRealityModelProps) => ContextRealityModel;\n private readonly _models: ContextRealityModel[] = [];\n /** Event dispatched just before [[ContextRealityModel.planarClipMaskSettings]] is modified for one of the reality models. */\n public readonly onPlanarClipMaskChanged = new BeEvent<(model: ContextRealityModel, newSettings: PlanarClipMaskSettings | undefined) => void>();\n /** Event dispatched just before [[ContextRealityModel.appearanceOverrides]] is modified for one of the reality models. */\n public readonly onAppearanceOverridesChanged = new BeEvent<(model: ContextRealityModel, newOverrides: FeatureAppearance | undefined) => void>();\n /** Event dispatched just before [[ContextRealityModel.displaySettings]] is modified for one of the reality models.\n * @beta\n */\n public readonly onDisplaySettingsChanged = new BeEvent<(model: ContextRealityModel, newSettings: RealityModelDisplaySettings) => void>();\n /** Event dispatched just before [[ContextRealityModel.invisible]] is modified for one of the reality models.\n * @beta\n */\n public readonly onInvisibleChanged = new BeEvent<(model: ContextRealityModel, invisible: boolean) => void>();\n /** Event dispatched when a model is [[add]]ed, [[delete]]d, [[replace]]d, or [[update]]d. */\n public readonly onChanged = new BeEvent<(previousModel: ContextRealityModel | undefined, newModel: ContextRealityModel | undefined) => void>();\n\n /** Construct a new list of reality models from its JSON representation. The list will be initialized from `container.contextRealityModels` and that JSON representation\n * will be kept in sync with changes made to the list. The caller should not directly modify `container.contextRealityModels` or its contents as that will cause the list\n * to become out of sync with the JSON representation.\n * @param container The object that holds the JSON representation of the list.\n * @param createContextRealityModel Optional function used to instantiate each [[ContextRealityModel]] in the list.\n */\n public constructor(container: ContextRealityModelsContainer, createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel);\n\n /** Construct a new list of reality models from its JSON representation. The list will be initialized from `args.container.contextRealityModels` and that JSON representation\n * will be kept in sync with changes made to the list. The caller should not directly modify `container.contextRealityModels` or its contents as that will cause the list\n * to become out of sync with the JSON representation.\n * @param args Specifies the container and optionally customizes how the list of models is populated.\n */\n public constructor(args: ContextRealityModelsArgs);\n\n /** @internal */\n public constructor(arg0: ContextRealityModelsContainer | ContextRealityModelsArgs, createContextRealityModel?: (props: ContextRealityModelProps) => ContextRealityModel) {\n let container: ContextRealityModelsContainer;\n let defer = false;\n if (arg0.container) {\n container = arg0.container;\n createContextRealityModel = arg0.createContextRealityModel;\n defer = true === arg0.deferPopulating;\n } else {\n container = arg0;\n }\n\n this._container = container;\n this._createModel = createContextRealityModel ?? ((props) => new ContextRealityModel(props));\n\n if (!defer)\n this.populate();\n }\n\n /** @internal needs to be invoked after DisplayStyleSettings constructor by DisplayStyleState constructor.*/\n /** Populate the list of [[models]] from the container that was supplied to the constructor.\n * This should only be invoked once, and only if [[ContextRealityModelsArgs.deferPopulating]] was specified as `true` when calling the constructor.\n * @public\n */\n public populate(): void {\n assert(this._models.length === 0, \"do not call ContextRealityModels.populate more than once\");\n const models = this._container.contextRealityModels;\n if (models)\n for (const model of models)\n this._models.push(this.createModel(model));\n }\n\n /** The read-only list of reality models. */\n public get models(): ReadonlyArray<ContextRealityModel> {\n return this._models;\n }\n\n /** Append a new reality model to the list.\n * @param The JSON representation of the reality model.\n * @returns the newly-added reality model.\n */\n public add(props: ContextRealityModelProps): ContextRealityModel {\n if (!this._container.contextRealityModels)\n this._container.contextRealityModels = [];\n\n props = ContextRealityModelProps.clone(props);\n const model = this.createModel(props);\n\n this.onChanged.raiseEvent(undefined, model);\n\n this._models.push(model);\n this._container.contextRealityModels.push(props);\n\n return model;\n }\n\n /** Remove the specified reality model from the list.\n * @param model The reality model to remove.\n * @returns true if the model was removed, or false if the model was not present in the list.\n */\n public delete(model: ContextRealityModel): boolean {\n const index = this._models.indexOf(model);\n if (-1 === index)\n return false;\n\n assert(undefined !== this._container.contextRealityModels);\n assert(index < this._container.contextRealityModels.length);\n\n this.dropEventListeners(model);\n this.onChanged.raiseEvent(model, undefined);\n\n this._models.splice(index, 1);\n if (this.models.length === 0)\n this._container.contextRealityModels = undefined;\n else\n this._container.contextRealityModels.splice(index, 1);\n\n return true;\n }\n\n /** Remove all reality models from the list. */\n public clear(): void {\n for (const model of this.models) {\n this.dropEventListeners(model);\n this.onChanged.raiseEvent(model, undefined);\n }\n\n this._container.contextRealityModels = undefined;\n this._models.length = 0;\n }\n\n /** Replace a reality model in the list.\n * @param toReplace The reality model to be replaced.\n * @param replaceWith The JSON representation of the replacement reality model.\n * @returns the newly-created reality model that replaced `toReplace`.\n * @throws Error if `toReplace` is not present in the list\n * @note The replacement occupies the same index in the list as `toReplace` did.\n */\n public replace(toReplace: ContextRealityModel, replaceWith: ContextRealityModelProps): ContextRealityModel {\n const index = this._models.indexOf(toReplace);\n if (-1 === index)\n throw new Error(\"ContextRealityModel not present in list.\");\n\n assert(undefined !== this._container.contextRealityModels);\n assert(index < this._container.contextRealityModels.length);\n\n replaceWith = ContextRealityModelProps.clone(replaceWith);\n const model = this.createModel(replaceWith);\n\n this.onChanged.raiseEvent(toReplace, model);\n this.dropEventListeners(toReplace);\n\n this._models[index] = model;\n this._container.contextRealityModels[index] = replaceWith;\n\n return model;\n }\n\n /** Change selected properties of a reality model.\n * @param toUpdate The reality model whose properties are to be modified.\n * @param updateProps The properties to change.\n * @returns The updated reality model, identical to `toUpdate` except for properties explicitly supplied by `updateProps`.\n * @throws Error if `toUpdate` is not present in the list.\n */\n public update(toUpdate: ContextRealityModel, updateProps: Partial<ContextRealityModelProps>): ContextRealityModel {\n const props = {\n ...toUpdate.toJSON(),\n ...updateProps,\n };\n\n // Partial<> makes it possible to pass `undefined` for tilesetUrl...preserve previous URL in that case.\n if (undefined === props.tilesetUrl)\n props.tilesetUrl = toUpdate.url;\n\n return this.replace(toUpdate, props);\n }\n\n private createModel(props: ContextRealityModelProps): ContextRealityModel {\n const model = this._createModel(props);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onPlanarClipMaskChanged.addListener(this.handlePlanarClipMaskChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onAppearanceOverridesChanged.addListener(this.handleAppearanceOverridesChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onDisplaySettingsChanged.addListener(this.handleDisplaySettingsChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onInvisibleChanged.addListener(this.handleInvisibleChanged, this);\n return model;\n }\n\n private dropEventListeners(model: ContextRealityModel): void {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onPlanarClipMaskChanged.removeListener(this.handlePlanarClipMaskChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onAppearanceOverridesChanged.removeListener(this.handleAppearanceOverridesChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onDisplaySettingsChanged.removeListener(this.handleDisplaySettingsChanged, this);\n // eslint-disable-next-line @typescript-eslint/unbound-method\n model.onInvisibleChanged.removeListener(this.handleInvisibleChanged, this);\n }\n\n private handlePlanarClipMaskChanged(mask: PlanarClipMaskSettings | undefined, model: ContextRealityModel): void {\n this.onPlanarClipMaskChanged.raiseEvent(model, mask);\n }\n\n private handleAppearanceOverridesChanged(app: FeatureAppearance | undefined, model: ContextRealityModel): void {\n this.onAppearanceOverridesChanged.raiseEvent(model, app);\n }\n\n private handleDisplaySettingsChanged(settings: RealityModelDisplaySettings, model: ContextRealityModel): void {\n this.onDisplaySettingsChanged.raiseEvent(model, settings);\n }\n\n private handleInvisibleChanged(invisible: boolean, model: ContextRealityModel): void {\n this.onInvisibleChanged.raiseEvent(model, invisible);\n }\n}\n"]}