@itwin/core-common 5.0.0-dev.99 → 5.0.0

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 (170) hide show
  1. package/CHANGELOG.md +80 -1
  2. package/lib/cjs/BackgroundMapSettings.d.ts +2 -2
  3. package/lib/cjs/BackgroundMapSettings.js.map +1 -1
  4. package/lib/cjs/CatalogIModel.d.ts +152 -0
  5. package/lib/cjs/CatalogIModel.d.ts.map +1 -0
  6. package/lib/cjs/CatalogIModel.js +30 -0
  7. package/lib/cjs/CatalogIModel.js.map +1 -0
  8. package/lib/cjs/CesiumIonAssets.d.ts +23 -0
  9. package/lib/cjs/CesiumIonAssets.d.ts.map +1 -0
  10. package/lib/cjs/CesiumIonAssets.js +32 -0
  11. package/lib/cjs/CesiumIonAssets.js.map +1 -0
  12. package/lib/cjs/ClipStyle.d.ts +1 -1
  13. package/lib/cjs/ClipStyle.d.ts.map +1 -1
  14. package/lib/cjs/ClipStyle.js.map +1 -1
  15. package/lib/cjs/ConcurrentQuery.d.ts +3 -3
  16. package/lib/cjs/ConcurrentQuery.js +1 -1
  17. package/lib/cjs/ConcurrentQuery.js.map +1 -1
  18. package/lib/cjs/ContourDisplay.d.ts +9 -0
  19. package/lib/cjs/ContourDisplay.d.ts.map +1 -1
  20. package/lib/cjs/ContourDisplay.js +19 -15
  21. package/lib/cjs/ContourDisplay.js.map +1 -1
  22. package/lib/cjs/ElementProps.d.ts +42 -42
  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.js +2 -2
  27. package/lib/cjs/EntityProps.js.map +1 -1
  28. package/lib/cjs/Fonts.d.ts +2 -2
  29. package/lib/cjs/Fonts.js +1 -1
  30. package/lib/cjs/Fonts.js.map +1 -1
  31. package/lib/cjs/GeoCoordinateServices.d.ts +1 -1
  32. package/lib/cjs/GeoCoordinateServices.js +1 -1
  33. package/lib/cjs/GeoCoordinateServices.js.map +1 -1
  34. package/lib/cjs/ITwinCoreErrors.d.ts +87 -8
  35. package/lib/cjs/ITwinCoreErrors.d.ts.map +1 -1
  36. package/lib/cjs/ITwinCoreErrors.js +74 -12
  37. package/lib/cjs/ITwinCoreErrors.js.map +1 -1
  38. package/lib/cjs/MapLayerSettings.d.ts +4 -2
  39. package/lib/cjs/MapLayerSettings.d.ts.map +1 -1
  40. package/lib/cjs/MapLayerSettings.js +4 -2
  41. package/lib/cjs/MapLayerSettings.js.map +1 -1
  42. package/lib/cjs/MassProperties.d.ts +2 -2
  43. package/lib/cjs/MassProperties.js.map +1 -1
  44. package/lib/cjs/MaterialProps.d.ts +1 -1
  45. package/lib/cjs/MaterialProps.js.map +1 -1
  46. package/lib/cjs/RenderSchedule.d.ts +5 -0
  47. package/lib/cjs/RenderSchedule.d.ts.map +1 -1
  48. package/lib/cjs/RenderSchedule.js +14 -0
  49. package/lib/cjs/RenderSchedule.js.map +1 -1
  50. package/lib/cjs/RenderTexture.d.ts +1 -1
  51. package/lib/cjs/RenderTexture.d.ts.map +1 -1
  52. package/lib/cjs/RenderTexture.js.map +1 -1
  53. package/lib/cjs/TerrainSettings.d.ts +1 -13
  54. package/lib/cjs/TerrainSettings.d.ts.map +1 -1
  55. package/lib/cjs/TerrainSettings.js +3 -15
  56. package/lib/cjs/TerrainSettings.js.map +1 -1
  57. package/lib/cjs/core-common.d.ts +2 -0
  58. package/lib/cjs/core-common.d.ts.map +1 -1
  59. package/lib/cjs/core-common.js +2 -0
  60. package/lib/cjs/core-common.js.map +1 -1
  61. package/lib/cjs/internal/BackendTypes.d.ts +3 -3
  62. package/lib/cjs/internal/BackendTypes.d.ts.map +1 -1
  63. package/lib/cjs/internal/BackendTypes.js.map +1 -1
  64. package/lib/cjs/rpc/IModelReadRpcInterface.d.ts +1 -1
  65. package/lib/cjs/rpc/IModelReadRpcInterface.d.ts.map +1 -1
  66. package/lib/cjs/rpc/IModelReadRpcInterface.js +1 -1
  67. package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
  68. package/lib/cjs/rpc/SnapshotIModelRpcInterface.d.ts +4 -4
  69. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +4 -4
  70. package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  71. package/lib/cjs/rpc/core/RpcConstants.d.ts +6 -6
  72. package/lib/cjs/rpc/core/RpcConstants.d.ts.map +1 -1
  73. package/lib/cjs/rpc/core/RpcConstants.js +6 -6
  74. package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
  75. package/lib/cjs/rpc/web/OpenAPI.d.ts +1 -1
  76. package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
  77. package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +2 -2
  78. package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
  79. package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
  80. package/lib/cjs/tile/IModelTileIO.js +2 -2
  81. package/lib/cjs/tile/IModelTileIO.js.map +1 -1
  82. package/lib/cjs/tile/TileMetadata.d.ts +6 -2
  83. package/lib/cjs/tile/TileMetadata.d.ts.map +1 -1
  84. package/lib/cjs/tile/TileMetadata.js +10 -4
  85. package/lib/cjs/tile/TileMetadata.js.map +1 -1
  86. package/lib/esm/BackgroundMapSettings.d.ts +2 -2
  87. package/lib/esm/BackgroundMapSettings.js.map +1 -1
  88. package/lib/esm/CatalogIModel.d.ts +152 -0
  89. package/lib/esm/CatalogIModel.d.ts.map +1 -0
  90. package/lib/esm/CatalogIModel.js +27 -0
  91. package/lib/esm/CatalogIModel.js.map +1 -0
  92. package/lib/esm/CesiumIonAssets.d.ts +23 -0
  93. package/lib/esm/CesiumIonAssets.d.ts.map +1 -0
  94. package/lib/esm/CesiumIonAssets.js +29 -0
  95. package/lib/esm/CesiumIonAssets.js.map +1 -0
  96. package/lib/esm/ClipStyle.d.ts +1 -1
  97. package/lib/esm/ClipStyle.d.ts.map +1 -1
  98. package/lib/esm/ClipStyle.js.map +1 -1
  99. package/lib/esm/ConcurrentQuery.d.ts +3 -3
  100. package/lib/esm/ConcurrentQuery.js +1 -1
  101. package/lib/esm/ConcurrentQuery.js.map +1 -1
  102. package/lib/esm/ContourDisplay.d.ts +9 -0
  103. package/lib/esm/ContourDisplay.d.ts.map +1 -1
  104. package/lib/esm/ContourDisplay.js +20 -16
  105. package/lib/esm/ContourDisplay.js.map +1 -1
  106. package/lib/esm/ElementProps.d.ts +42 -42
  107. package/lib/esm/ElementProps.js +6 -6
  108. package/lib/esm/ElementProps.js.map +1 -1
  109. package/lib/esm/EntityProps.d.ts +10 -10
  110. package/lib/esm/EntityProps.js +2 -2
  111. package/lib/esm/EntityProps.js.map +1 -1
  112. package/lib/esm/Fonts.d.ts +2 -2
  113. package/lib/esm/Fonts.js +1 -1
  114. package/lib/esm/Fonts.js.map +1 -1
  115. package/lib/esm/GeoCoordinateServices.d.ts +1 -1
  116. package/lib/esm/GeoCoordinateServices.js +1 -1
  117. package/lib/esm/GeoCoordinateServices.js.map +1 -1
  118. package/lib/esm/ITwinCoreErrors.d.ts +87 -8
  119. package/lib/esm/ITwinCoreErrors.d.ts.map +1 -1
  120. package/lib/esm/ITwinCoreErrors.js +73 -11
  121. package/lib/esm/ITwinCoreErrors.js.map +1 -1
  122. package/lib/esm/MapLayerSettings.d.ts +4 -2
  123. package/lib/esm/MapLayerSettings.d.ts.map +1 -1
  124. package/lib/esm/MapLayerSettings.js +4 -2
  125. package/lib/esm/MapLayerSettings.js.map +1 -1
  126. package/lib/esm/MassProperties.d.ts +2 -2
  127. package/lib/esm/MassProperties.js.map +1 -1
  128. package/lib/esm/MaterialProps.d.ts +1 -1
  129. package/lib/esm/MaterialProps.js.map +1 -1
  130. package/lib/esm/RenderSchedule.d.ts +5 -0
  131. package/lib/esm/RenderSchedule.d.ts.map +1 -1
  132. package/lib/esm/RenderSchedule.js +14 -0
  133. package/lib/esm/RenderSchedule.js.map +1 -1
  134. package/lib/esm/RenderTexture.d.ts +1 -1
  135. package/lib/esm/RenderTexture.d.ts.map +1 -1
  136. package/lib/esm/RenderTexture.js.map +1 -1
  137. package/lib/esm/TerrainSettings.d.ts +1 -13
  138. package/lib/esm/TerrainSettings.d.ts.map +1 -1
  139. package/lib/esm/TerrainSettings.js +1 -13
  140. package/lib/esm/TerrainSettings.js.map +1 -1
  141. package/lib/esm/core-common.d.ts +2 -0
  142. package/lib/esm/core-common.d.ts.map +1 -1
  143. package/lib/esm/core-common.js +2 -0
  144. package/lib/esm/core-common.js.map +1 -1
  145. package/lib/esm/internal/BackendTypes.d.ts +3 -3
  146. package/lib/esm/internal/BackendTypes.d.ts.map +1 -1
  147. package/lib/esm/internal/BackendTypes.js.map +1 -1
  148. package/lib/esm/rpc/IModelReadRpcInterface.d.ts +1 -1
  149. package/lib/esm/rpc/IModelReadRpcInterface.d.ts.map +1 -1
  150. package/lib/esm/rpc/IModelReadRpcInterface.js +1 -1
  151. package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
  152. package/lib/esm/rpc/SnapshotIModelRpcInterface.d.ts +4 -4
  153. package/lib/esm/rpc/SnapshotIModelRpcInterface.js +4 -4
  154. package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
  155. package/lib/esm/rpc/core/RpcConstants.d.ts +6 -6
  156. package/lib/esm/rpc/core/RpcConstants.d.ts.map +1 -1
  157. package/lib/esm/rpc/core/RpcConstants.js +6 -6
  158. package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
  159. package/lib/esm/rpc/web/OpenAPI.d.ts +1 -1
  160. package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
  161. package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +2 -2
  162. package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
  163. package/lib/esm/tile/IModelTileIO.d.ts +2 -2
  164. package/lib/esm/tile/IModelTileIO.js +2 -2
  165. package/lib/esm/tile/IModelTileIO.js.map +1 -1
  166. package/lib/esm/tile/TileMetadata.d.ts +6 -2
  167. package/lib/esm/tile/TileMetadata.d.ts.map +1 -1
  168. package/lib/esm/tile/TileMetadata.js +10 -4
  169. package/lib/esm/tile/TileMetadata.js.map +1 -1
  170. package/package.json +6 -6
@@ -55,7 +55,7 @@ export interface QueryPropertyMetaData {
55
55
  /** The name is the property's alias if the property is a generated one, otherwise, it is the name of the property. */
56
56
  name: string;
57
57
  /** 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.
58
- * @deprecated in 4.11 Use extendedType instead
58
+ * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use extendedType instead
59
59
  */
60
60
  extendType: string;
61
61
  /** 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. */
@@ -133,7 +133,7 @@ export interface QueryOptions extends BaseReaderOptions {
133
133
  /**
134
134
  * Convert ECClassId, SourceECClassId, TargetECClassId and RelClassId to respective name.
135
135
  * When true, XXXXClassId property will be returned as className.
136
- * @deprecated in 4.11 Use ecsql function ec_classname to get class name instead.
136
+ * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use ecsql function ec_classname to get class name instead.
137
137
  * */
138
138
  convertClassIdsToClassNames?: boolean;
139
139
  /**
@@ -194,7 +194,7 @@ export declare class QueryOptionsBuilder {
194
194
  * If set ECClassId, SourceECClassId and TargetECClassId system properties will return qualified name of class instead of a @typedef Id64String.
195
195
  * @param val A boolean value.
196
196
  * @returns @type QueryOptionsBuilder for fluent interface.
197
- * @deprecated in 4.11 Use ecsql function ec_classname to get class name instead.
197
+ * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use ecsql function ec_classname to get class name instead.
198
198
  */
199
199
  setConvertClassIdsToNames(val: boolean): this;
200
200
  /**
@@ -101,7 +101,7 @@ class QueryOptionsBuilder {
101
101
  * If set ECClassId, SourceECClassId and TargetECClassId system properties will return qualified name of class instead of a @typedef Id64String.
102
102
  * @param val A boolean value.
103
103
  * @returns @type QueryOptionsBuilder for fluent interface.
104
- * @deprecated in 4.11 Use ecsql function ec_classname to get class name instead.
104
+ * @deprecated in 4.11 - will not be removed until after 2026-06-13. Use ecsql function ec_classname to get class name instead.
105
105
  */
106
106
  setConvertClassIdsToNames(val) {
107
107
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -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,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,IA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E,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}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EAAa,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;AAOD,gBAAgB;AAChB,IAAY,aAGX;AAHD,WAAY,aAAa;IACvB,6DAAc,CAAA;IACd,uDAAW,CAAA;AACb,CAAC,EAHW,aAAa,6BAAb,aAAa,QAGxB;AA2CD,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 * @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 - 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 * @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"]}
@@ -37,6 +37,8 @@ export declare class ContourStyle {
37
37
  readonly pattern: LinePixels;
38
38
  /** Returns true if `this` and `other` are logically equivalent. */
39
39
  equals(other: ContourStyle): boolean;
40
+ /** Perform ordered comparison between this and another contour style. */
41
+ compare(other: ContourStyle): number;
40
42
  /** Performs ordered comparison of two contour styles.
41
43
  * @param lhs First contour style to compare
42
44
  * @param rhs Second contour style to compare
@@ -96,7 +98,10 @@ export declare class Contour {
96
98
  /** If true, show underlying geometry along with the associated contours. If false, only show the contours, not the underlying geometry. Defaults to true. */
97
99
  readonly showGeometry: boolean;
98
100
  static readonly defaults: Contour;
101
+ /** Returns true if `this` is logically equivalent to `other`. */
99
102
  equals(other: Contour): boolean;
103
+ /** Performs ordered comparison between this and another contour. */
104
+ compare(other: Contour): number;
100
105
  /** Performs ordered comparison of two contours.
101
106
  * @param lhs First contour to compare
102
107
  * @param rhs Second contour to compare
@@ -154,6 +159,8 @@ export declare class ContourGroup {
154
159
  get isDefaultGroup(): boolean;
155
160
  /** Returns true if `this` and `other` contain the exact same set of subcategories. */
156
161
  subCategoriesEqual(other: ContourGroup): boolean;
162
+ /** Perform ordered comparison between this and another contour group. */
163
+ compare(other: ContourGroup): number;
157
164
  /** Returns true if `this` and `other` are logically equivalent, having the same styling, name, and set of subcategories. */
158
165
  equals(other: ContourGroup | undefined): boolean;
159
166
  private constructor();
@@ -199,6 +206,8 @@ export declare class ContourDisplay {
199
206
  * for display purposes.
200
207
  */
201
208
  static readonly maxContourGroups = 5;
209
+ /** Perform ordered comparison between this and another `ContourDisplay`. */
210
+ compare(other: ContourDisplay): number;
202
211
  /** Returns true if `this` and `other` are logically equivalent, having the same groups and styling. */
203
212
  equals(other: ContourDisplay): boolean;
204
213
  private constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"ContourDisplay.d.ts","sourceRoot":"","sources":["../../src/ContourDisplay.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAmC,iBAAiB,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACvI,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAErD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,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AM,MAAM,wBAAwB,GAAG,uBAAuB,CAAC,cAAc,CAAC,CAAC;AAE/E;;;;GAIG;AACH,qBAAa,cAAc;IACzB;;;OAGG;IACH,SAAgB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvC;;OAEG;IACH,SAAgB,eAAe,EAAE,OAAO,CAAC;IACzC;;OAEG;IACH,gBAAuB,gBAAgB,KAAK;IAE5C,4EAA4E;IACrE,OAAO,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM;IAI7C,uGAAuG;IAChG,MAAM,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO;IAa7C,OAAO;WAKO,QAAQ,CAAC,KAAK,CAAC,EAAE,mBAAmB;IAiB3C,MAAM,IAAI,mBAAmB;IAYpC,wHAAwH;WAC1G,MAAM,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,cAAc;IAI/E,yFAAyF;IAClF,mBAAmB,CAAC,eAAe,EAAE,OAAO,GAAG,cAAc;IAIpE;;OAEG;IACI,KAAK,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,cAAc;CAM/E"}
@@ -33,6 +33,10 @@ class ContourStyle {
33
33
  }
34
34
  return true;
35
35
  }
36
+ /** Perform ordered comparison between this and another contour style. */
37
+ compare(other) {
38
+ return ContourStyle.compare(this, other);
39
+ }
36
40
  /** Performs ordered comparison of two contour styles.
37
41
  * @param lhs First contour style to compare
38
42
  * @param rhs Second contour style to compare
@@ -109,11 +113,13 @@ class Contour {
109
113
  /** If true, show underlying geometry along with the associated contours. If false, only show the contours, not the underlying geometry. Defaults to true. */
110
114
  showGeometry;
111
115
  static defaults = new Contour({});
116
+ /** Returns true if `this` is logically equivalent to `other`. */
112
117
  equals(other) {
113
- if (!this.majorStyle.equals(other.majorStyle) || !this.minorStyle.equals(other.minorStyle) || this.minorInterval !== other.minorInterval || this.majorIntervalCount !== other.majorIntervalCount || this.showGeometry !== other.showGeometry) {
114
- return false;
115
- }
116
- return true;
118
+ return this.compare(other) === 0;
119
+ }
120
+ /** Performs ordered comparison between this and another contour. */
121
+ compare(other) {
122
+ return Contour.compare(this, other);
117
123
  }
118
124
  /** Performs ordered comparison of two contours.
119
125
  * @param lhs First contour to compare
@@ -204,19 +210,13 @@ class ContourGroup {
204
210
  subCategoriesEqual(other) {
205
211
  return this._subCategories === other._subCategories;
206
212
  }
213
+ /** Perform ordered comparison between this and another contour group. */
214
+ compare(other) {
215
+ return (0, core_bentley_1.compareStrings)(this.name, other.name) || (0, core_bentley_1.compareStrings)(this._subCategories, other._subCategories) || this.contourDef.compare(other.contourDef);
216
+ }
207
217
  /** Returns true if `this` and `other` are logically equivalent, having the same styling, name, and set of subcategories. */
208
218
  equals(other) {
209
- if (this === undefined && other === undefined)
210
- return true;
211
- if (this === undefined || other === undefined)
212
- return false;
213
- if (!this.contourDef.equals(other.contourDef))
214
- return false;
215
- if (this._subCategories !== other._subCategories)
216
- return false;
217
- if (this.name !== other.name)
218
- return false;
219
- return true;
219
+ return undefined !== other && this.compare(other) === 0;
220
220
  }
221
221
  constructor(props) {
222
222
  this.contourDef = props?.contourDef ?? Contour.fromJSON();
@@ -274,6 +274,10 @@ class ContourDisplay {
274
274
  * for display purposes.
275
275
  */
276
276
  static maxContourGroups = 5;
277
+ /** Perform ordered comparison between this and another `ContourDisplay`. */
278
+ compare(other) {
279
+ return (0, core_bentley_1.compareBooleans)(this.displayContours, other.displayContours) || (0, core_bentley_1.compareArrays)(this.groups, other.groups, (lhs, rhs) => lhs.compare(rhs));
280
+ }
277
281
  /** Returns true if `this` and `other` are logically equivalent, having the same groups and styling. */
278
282
  equals(other) {
279
283
  if (this.displayContours !== other.displayContours)
@@ -1 +1 @@
1
- {"version":3,"file":"ContourDisplay.js","sourceRoot":"","sources":["../../src/ContourDisplay.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuI;AACvI,6CAA0C;AAC1C,yCAAqD;AAoBrD;;;;GAI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C,CAAC,CAAC;IACL,CAAC;IAEM,MAAM;QACX,MAAM,KAAK,GAAwB,EAAE,CAAC;QAEtC,KAAK,CAAC,MAAM,GAAG,EAAE,CAAC;QAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC5C,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;QAC5C,CAAC;QAED,KAAK,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;QAC7C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,wHAAwH;IACjH,MAAM,CAAC,MAAM,CAAC,KAAyC;QAC5D,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,cAAc,EAAE,CAAC;IACxD,CAAC;IAED,yFAAyF;IAClF,mBAAmB,CAAC,eAAwB;QACjD,OAAO,eAAe,KAAK,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;IAC/G,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,YAAgD;QAC3D,IAAI,CAAC,YAAY;YACf,OAAO,IAAI,CAAC;QAEd,OAAO,cAAc,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,YAAY,EAAE,CAAC,CAAC;IAC7D,CAAC;;AAjFH,wCAkFC","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 Symbology\n */\n\nimport { compareBooleans, compareNumbers, CompressedId64Set, NonFunctionPropertiesOf, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { LinePixels } from \"./LinePixels\";\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\n\n/** JSON representation of a [[ContourStyle]].\n * @public\n */\nexport interface ContourStyleProps {\n /** See [[ContourStyle.color]]. */\n color?: RgbColorProps;\n /** See [[ContourStyle.pixelWidth]]. */\n pixelWidth?: number;\n /** See [[ContourStyle.pattern]]. */\n pattern?: LinePixels;\n}\n\n/** A type containing all of the properties of [[ContourStyle]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[ContourStyle.create]] and [[ContourStyle.clone]].\n * @public\n */\nexport type ContourStyleProperties = NonFunctionPropertiesOf<ContourStyle>;\n\n/** The style settings used by either a minor or major contour.\n * @see [[Contour.majorStyle]]\n * @see [[Contour.minorStyle]]\n * @public\n */\nexport class ContourStyle {\n /** The color in which to draw the contour lines. Default: black. */\n public readonly color: RgbColor;\n /** The width in screen pixels of the contour lines.\n * Useful values range between 1 and 8.5, in increments of 0.5. Other values will be rounded to meet these criteria.\n * Default: 1.0.\n */\n public readonly pixelWidth: number;\n /** The pattern for a major or minor contour line. Defaults to [[LinePixels.Solid]]. */\n public readonly pattern: LinePixels;\n\n /** Returns true if `this` and `other` are logically equivalent. */\n public equals(other: ContourStyle): boolean {\n if (!this.color.equals(other.color) || this.pixelWidth !== other.pixelWidth || this.pattern !== other.pattern) {\n return false;\n }\n return true;\n }\n\n /** Performs ordered comparison of two contour styles.\n * @param lhs First contour style to compare\n * @param rhs Second contour style to compare\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\n * @public\n */\n public static compare(lhs: ContourStyle, rhs: ContourStyle): number {\n let diff = 0;\n if ((diff = lhs.color.compareTo(rhs.color)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.pixelWidth, rhs.pixelWidth)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.pattern, rhs.pattern)) !== 0)\n return diff;\n\n return diff;\n }\n\n private constructor(props?: Partial<ContourStyleProperties>) {\n this.color = props?.color ?? RgbColor.fromJSON({r: 0, g: 0, b: 0});\n this.pixelWidth = props?.pixelWidth ?? 1;\n this.pattern = props?.pattern ?? LinePixels.Solid;\n }\n\n public static fromJSON(props?: ContourStyleProps) {\n if (!props)\n return new ContourStyle();\n\n return new this({\n color: props?.color ? RgbColor.fromJSON(props.color) : undefined,\n pixelWidth: props?.pixelWidth,\n pattern: props?.pattern,\n });\n }\n\n public toJSON(): ContourStyleProps {\n const props: ContourStyleProps = {};\n\n if (!this.color.equals(RgbColor.fromJSON({r: 0, g: 0, b: 0})))\n props.color = this.color.toJSON();\n\n if (1 !== this.pixelWidth)\n props.pixelWidth = this.pixelWidth;\n\n if (0 !== this.pattern)\n props.pattern = this.pattern;\n\n return props;\n }\n\n /** Create a new ContourStyle. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourStyleProperties>): ContourStyle {\n return props ? new this(props) : new ContourStyle();\n }\n\n /** Create a copy of this ContourStyle, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourStyleProperties>): ContourStyle {\n if (!changedProps)\n return this;\n\n return ContourStyle.create({ ...this, ...changedProps });\n }\n}\n\n/** JSON representation of a [[Contour]].\n * @public\n */\nexport interface ContourProps {\n /** See [[Contour.majorStyle]]. */\n majorStyle?: ContourStyleProps;\n /** See [[Contour.minor]]. */\n minorStyle?: ContourStyleProps;\n /** See [[Contour.minorInterval]]. */\n minorInterval?: number;\n /** See [[Contour.majorIntervalCount]]. */\n majorIntervalCount?: number;\n /** See [[Contour.showGeometry]] */\n showGeometry?: boolean;\n}\n\n/** A type containing all of the properties of [[Contour]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[Contour.create]] and [[Contour.clone]].\n * @public\n */\nexport type ContourProperties = NonFunctionPropertiesOf<Contour>;\n\n/** Describes how to generate and style contour lines for geometry within a single [[ContourGroup]].\n * Contours provide a way to visualize elevation within a 3d scene by drawing lines at fixed intervals along the z-axis.\n * There are actually 2 kinds of contour lines: major and minor. Each kind can be styled independently.\n * A contour line is generated every [[minorInterval]] meters. Every `nth` line will be a *major* contour, where `n` = [[majorIntervalCount]]; the intervening lines will\n * all be *minor* contours.\n * For example, with a [[majorIntervalCount]] of `1`, every contour will be major; of `2`, every other contour will be major; and of `3`, there will be two minor contours in between\n * each major contour.\n *\n * @public\n */\nexport class Contour {\n /** Settings that describe how a major contour is styled. Defaults to an instantation of [[ContourStyle]] using `pixelWidth` of 2 and default values for the other properties. */\n public readonly majorStyle: ContourStyle;\n /** Settings that describe how a minor contour is styled. Defaults to an instantation of [[ContourStyle]] using default values for the properties. */\n public readonly minorStyle: ContourStyle;\n /** The interval for the minor contour occurrence in meters; these can be specified as fractional. Defaults to 1. If a value <= 0 is specified, this will be treated as 1 meter. */\n public readonly minorInterval: number;\n /** The count of minor contour intervals that define a major interval (integer > 0). A value of 1 means no minor contours will be shown, only major contours. Defaults to 5. If a value < 1 is specified, this will be treated as 1. If a non-integer value is specified, it will be treated as if it were rounded to the nearest integer. */\n public readonly majorIntervalCount: number;\n /** If true, show underlying geometry along with the associated contours. If false, only show the contours, not the underlying geometry. Defaults to true. */\n public readonly showGeometry: boolean;\n\n public static readonly defaults = new Contour({});\n\n public equals(other: Contour): boolean {\n if (!this.majorStyle.equals(other.majorStyle) || !this.minorStyle.equals(other.minorStyle) || this.minorInterval !== other.minorInterval || this.majorIntervalCount !== other.majorIntervalCount || this.showGeometry !== other.showGeometry) {\n return false;\n }\n return true;\n }\n\n /** Performs ordered comparison of two contours.\n * @param lhs First contour to compare\n * @param rhs Second contour to compare\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\n */\n public static compare(lhs: Contour, rhs: Contour): number {\n return ContourStyle.compare(lhs.majorStyle, rhs.majorStyle)\n || ContourStyle.compare(lhs.minorStyle, rhs.minorStyle)\n || compareNumbers(lhs.minorInterval, rhs.minorInterval)\n || compareNumbers(lhs.majorIntervalCount, rhs.majorIntervalCount)\n || compareBooleans(lhs.showGeometry, rhs.showGeometry);\n }\n\n private constructor(props?: Partial<ContourProperties>) {\n this.majorStyle = props?.majorStyle ?? ContourStyle.fromJSON({ pixelWidth: 2 });\n this.minorStyle = props?.minorStyle ?? ContourStyle.fromJSON();\n this.minorInterval = props?.minorInterval ?? 1;\n this.majorIntervalCount = props?.majorIntervalCount ?? 5;\n this.showGeometry = props?.showGeometry ?? true;\n }\n\n public static fromJSON(props?: ContourProps) {\n if (!props)\n return new Contour();\n\n return new this({\n majorStyle: props?.majorStyle ? ContourStyle.fromJSON(props.majorStyle) : undefined,\n minorStyle: props?.minorStyle ? ContourStyle.fromJSON(props.minorStyle) : undefined,\n minorInterval: props?.minorInterval,\n majorIntervalCount: props?.majorIntervalCount,\n showGeometry: props?.showGeometry,\n });\n }\n\n public toJSON(): ContourProps {\n const props: ContourProps = {};\n\n if (!this.majorStyle.equals(ContourStyle.fromJSON({ pixelWidth: 2 })))\n props.majorStyle = this.majorStyle.toJSON();\n\n if (!this.minorStyle.equals(ContourStyle.fromJSON()))\n props.minorStyle = this.minorStyle.toJSON();\n\n if (1 !== this.minorInterval)\n props.minorInterval = this.minorInterval;\n\n if (5 !== this.majorIntervalCount)\n props.majorIntervalCount = this.majorIntervalCount;\n\n if (true !== this.showGeometry)\n props.showGeometry = this.showGeometry;\n\n return props;\n }\n\n /** Create a new Contour. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourProperties>): Contour {\n return props ? new this(props) : new Contour();\n }\n\n /** Create a copy of this Contour, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourProperties>): Contour {\n if (!changedProps)\n return this;\n\n return Contour.create({ ...this, ...changedProps });\n }\n}\n\n/** JSON representation of a [[ContourGroup]].\n * @public\n */\nexport interface ContourGroupProps {\n /** See [[ContourGroup.contourDef]]. */\n contourDef?: ContourProps;\n /** See [[ContourGroup.subCategories]]. */\n subCategories?: CompressedId64Set;\n /** See [[ContourGroup.name]]. */\n name?: string;\n}\n\n/** A type containing all of the properties of [[ContourGroup]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[ContourGroup.create]] and [[ContourGroup.clone]].\n * @public\n */\nexport type ContourGroupProperties = NonFunctionPropertiesOf<ContourGroup>;\n\n/** Defines a group of objects to which to apply [[Contour]] lines in a particular style.\n * The [[ContourDisplay]] settings can contain multiple groups.\n * Each group is described by a set of [SubCategory]($backend)'s; all geometry belonging to any of those subcategories belongs to the group.\n * An empty set of subcategories indicates that this is a default group, implicitly containing all subcategories that are not explicitly included in another group.\n * Each group has an optional, non-user-facing name that applications can use to assign semantics to particular groups.\n * @public\n */\nexport class ContourGroup {\n private _subCategories: CompressedId64Set;\n\n /** Describes the appearance of all of the contours applied to geometry belonging to this group. */\n public readonly contourDef: Contour;\n /** An optional, non-user-facing name that applications can use to assign semantics to particular groups.\n * Default: an empty string.\n */\n public readonly name: string;\n\n /** The set of subcategories belonging to this group, or an empty set if this is a default group. If more than one empty set exists in the [[ContourDisplay]] object's `groups` array, the last entry in that array is used for rendering the default styling.\n * @see [[isDefaultGroup]] to test if this is a default group.\n */\n public get subCategories(): OrderedId64Iterable {\n return CompressedId64Set.iterable(this._subCategories);\n }\n\n /** Returns true if [[subCategories]] is an empty set, indicating that any subcategory not included in any other [[ContourGroup]] is implicitly\n * included in this group.\n */\n public get isDefaultGroup(): boolean {\n return OrderedId64Iterable.isEmptySet(this._subCategories);\n }\n\n /** Returns true if `this` and `other` contain the exact same set of subcategories. */\n public subCategoriesEqual(other: ContourGroup): boolean {\n return this._subCategories === other._subCategories;\n }\n\n /** Returns true if `this` and `other` are logically equivalent, having the same styling, name, and set of subcategories. */\n public equals(other: ContourGroup | undefined): boolean {\n if (this === undefined && other === undefined)\n return true;\n if (this === undefined || other === undefined)\n return false;\n if (!this.contourDef.equals(other.contourDef))\n return false;\n if (this._subCategories !== other._subCategories)\n return false;\n if (this.name !== other.name)\n return false;\n return true;\n }\n\n private constructor(props?: Partial<ContourGroupProperties>) {\n this.contourDef = props?.contourDef ?? Contour.fromJSON();\n this._subCategories = props?.subCategories ? CompressedId64Set.sortAndCompress(props.subCategories) : \"\";\n this.name = props?.name ?? \"\";\n }\n\n public static fromJSON(props?: ContourGroupProps) {\n if (!props)\n return new ContourGroup();\n\n return new this({\n contourDef: props?.contourDef ? Contour.fromJSON(props.contourDef) : undefined,\n name: props?.name,\n subCategories: props?.subCategories ? CompressedId64Set.iterable(props.subCategories) : undefined,\n });\n }\n\n public toJSON(): ContourGroupProps {\n const props: ContourGroupProps = {};\n\n if (!this.contourDef.equals(Contour.defaults))\n props.contourDef = this.contourDef.toJSON();\n\n if (this.name)\n props.name = this.name;\n\n props.subCategories = this._subCategories;\n return props;\n }\n\n /** Create a new ContourGroup. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourGroupProperties>): ContourGroup {\n return props ? new this(props) : new ContourGroup();\n }\n\n /** Create a copy of this ContourGroup, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourGroupProperties>): ContourGroup {\n if (!changedProps)\n return this;\n\n return ContourGroup.create({ ...this, ...changedProps });\n }\n}\n\n/** JSON representation of [[ContourDisplay]] settings.\n * @public\n */\nexport interface ContourDisplayProps {\n /** See [[ContourDisplay.groups]]. */\n groups?: ContourGroupProps[];\n /** See [[ContourDisplay.displayContours]]. */\n displayContours?: boolean;\n}\n\n/** A type containing all of the properties of [[ContourDisplay]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[ContourDisplay.create]] and [[ContourDisplay.clone]].\n * @public\n */\nexport type ContourDisplayProperties = NonFunctionPropertiesOf<ContourDisplay>;\n\n/** Settings that specify how to apply [contour lines]($docs/learning/display/ContourDisplay.md) to groups of geometry\n * within a 3d scene.\n * @see [[DisplayStyle3dSettings.contours]] to associate contour settings with a display style.\n * @public\n */\nexport class ContourDisplay {\n /** A list of the groups, each describing their own specific contour display settings. Defaults to an empty array.\n * @note The display system supports no more than [[ContourDisplay.maxContourGroups]]. Entries in this array exceeding that maximum will\n * have no effect on the display of contour lines.\n */\n public readonly groups: ContourGroup[];\n /** Whether to display the contour lines described by these settings. Default: false.\n * @see [[withDisplayContours]] to change this flag.\n */\n public readonly displayContours: boolean;\n /** The maximum number of contour groups that the system will allow. Any contour groups added to the [[groups]] array beyond this number will be ignored\n * for display purposes.\n */\n public static readonly maxContourGroups = 5;\n\n /** Returns true if `this` and `other` are logically equivalent, having the same groups and styling. */\n public equals(other: ContourDisplay): boolean {\n if (this.displayContours !== other.displayContours)\n return false;\n if (this.groups.length !== other.groups.length)\n return false;\n for (let index = 0, len = this.groups.length; index < len && index < ContourDisplay.maxContourGroups; ++index) {\n const match = this.groups[index].equals(other.groups[index]);\n if (!match)\n return false;\n }\n return true;\n }\n\n private constructor(props?: Partial<ContourDisplayProperties>) {\n this.displayContours = props?.displayContours ?? false;\n this.groups = props?.groups ?? [];\n }\n\n public static fromJSON(props?: ContourDisplayProps) {\n if (!props)\n return new ContourDisplay();\n\n const groups: ContourGroup[] = [];\n if (undefined !== props && undefined !== props.groups) {\n for (let n = 0; n < props.groups.length; n++) {\n groups[n] = ContourGroup.fromJSON(props.groups[n]);\n }\n }\n\n return new this({\n displayContours: props?.displayContours,\n groups: props.groups ? groups : undefined,\n });\n }\n\n public toJSON(): ContourDisplayProps {\n const props: ContourDisplayProps = {};\n\n props.groups = [];\n for (let n = 0; n < this.groups.length; n++) {\n props.groups[n] = this.groups[n].toJSON();\n }\n\n props.displayContours = this.displayContours;\n return props;\n }\n\n /** Create a new ContourDisplay. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourDisplayProperties>): ContourDisplay {\n return props ? new this(props) : new ContourDisplay();\n }\n\n /** Create a copy of these settings, changing the `displayContours` flag as specified. */\n public withDisplayContours(displayContours: boolean): ContourDisplay {\n return displayContours === this.displayContours ? this : ContourDisplay.create({ ...this, displayContours });\n }\n\n /** Create a copy of this ContourDisplay, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourDisplayProperties>): ContourDisplay {\n if (!changedProps)\n return this;\n\n return ContourDisplay.create({ ...this, ...changedProps });\n }\n}\n"]}
1
+ {"version":3,"file":"ContourDisplay.js","sourceRoot":"","sources":["../../src/ContourDisplay.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAsK;AACtK,6CAA0C;AAC1C,yCAAqD;AAoBrD;;;;GAIG;AACH,MAAa,YAAY;IACvB,oEAAoE;IACpD,KAAK,CAAW;IAChC;;;OAGG;IACa,UAAU,CAAS;IACnC,uFAAuF;IACvE,OAAO,CAAa;IAEpC,mEAAmE;IAC5D,MAAM,CAAC,KAAmB;QAC/B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU,IAAI,IAAI,CAAC,OAAO,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;YAC9G,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,yEAAyE;IAClE,OAAO,CAAC,KAAmB;QAChC,OAAO,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,OAAO,CAAC,GAAiB,EAAE,GAAiB;QACxD,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC;YAC/C,OAAO,IAAI,CAAC;QACd,IA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;IACxD,CAAC;IAED,yFAAyF;IAClF,mBAAmB,CAAC,eAAwB;QACjD,OAAO,eAAe,KAAK,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;IAC/G,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,YAAgD;QAC3D,IAAI,CAAC,YAAY;YACf,OAAO,IAAI,CAAC;QAEd,OAAO,cAAc,CAAC,MAAM,CAAC,EAAE,GAAG,IAAI,EAAE,GAAG,YAAY,EAAE,CAAC,CAAC;IAC7D,CAAC;;AAtFH,wCAuFC","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 Symbology\n */\n\nimport { compareArrays, compareBooleans, compareNumbers, compareStrings, CompressedId64Set, NonFunctionPropertiesOf, OrderedId64Iterable } from \"@itwin/core-bentley\";\nimport { LinePixels } from \"./LinePixels\";\nimport { RgbColor, RgbColorProps } from \"./RgbColor\";\n\n/** JSON representation of a [[ContourStyle]].\n * @public\n */\nexport interface ContourStyleProps {\n /** See [[ContourStyle.color]]. */\n color?: RgbColorProps;\n /** See [[ContourStyle.pixelWidth]]. */\n pixelWidth?: number;\n /** See [[ContourStyle.pattern]]. */\n pattern?: LinePixels;\n}\n\n/** A type containing all of the properties of [[ContourStyle]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[ContourStyle.create]] and [[ContourStyle.clone]].\n * @public\n */\nexport type ContourStyleProperties = NonFunctionPropertiesOf<ContourStyle>;\n\n/** The style settings used by either a minor or major contour.\n * @see [[Contour.majorStyle]]\n * @see [[Contour.minorStyle]]\n * @public\n */\nexport class ContourStyle {\n /** The color in which to draw the contour lines. Default: black. */\n public readonly color: RgbColor;\n /** The width in screen pixels of the contour lines.\n * Useful values range between 1 and 8.5, in increments of 0.5. Other values will be rounded to meet these criteria.\n * Default: 1.0.\n */\n public readonly pixelWidth: number;\n /** The pattern for a major or minor contour line. Defaults to [[LinePixels.Solid]]. */\n public readonly pattern: LinePixels;\n\n /** Returns true if `this` and `other` are logically equivalent. */\n public equals(other: ContourStyle): boolean {\n if (!this.color.equals(other.color) || this.pixelWidth !== other.pixelWidth || this.pattern !== other.pattern) {\n return false;\n }\n return true;\n }\n\n /** Perform ordered comparison between this and another contour style. */\n public compare(other: ContourStyle): number {\n return ContourStyle.compare(this, other);\n }\n\n /** Performs ordered comparison of two contour styles.\n * @param lhs First contour style to compare\n * @param rhs Second contour style to compare\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\n * @public\n */\n public static compare(lhs: ContourStyle, rhs: ContourStyle): number {\n let diff = 0;\n if ((diff = lhs.color.compareTo(rhs.color)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.pixelWidth, rhs.pixelWidth)) !== 0)\n return diff;\n if ((diff = compareNumbers(lhs.pattern, rhs.pattern)) !== 0)\n return diff;\n\n return diff;\n }\n\n private constructor(props?: Partial<ContourStyleProperties>) {\n this.color = props?.color ?? RgbColor.fromJSON({r: 0, g: 0, b: 0});\n this.pixelWidth = props?.pixelWidth ?? 1;\n this.pattern = props?.pattern ?? LinePixels.Solid;\n }\n\n public static fromJSON(props?: ContourStyleProps) {\n if (!props)\n return new ContourStyle();\n\n return new this({\n color: props?.color ? RgbColor.fromJSON(props.color) : undefined,\n pixelWidth: props?.pixelWidth,\n pattern: props?.pattern,\n });\n }\n\n public toJSON(): ContourStyleProps {\n const props: ContourStyleProps = {};\n\n if (!this.color.equals(RgbColor.fromJSON({r: 0, g: 0, b: 0})))\n props.color = this.color.toJSON();\n\n if (1 !== this.pixelWidth)\n props.pixelWidth = this.pixelWidth;\n\n if (0 !== this.pattern)\n props.pattern = this.pattern;\n\n return props;\n }\n\n /** Create a new ContourStyle. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourStyleProperties>): ContourStyle {\n return props ? new this(props) : new ContourStyle();\n }\n\n /** Create a copy of this ContourStyle, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourStyleProperties>): ContourStyle {\n if (!changedProps)\n return this;\n\n return ContourStyle.create({ ...this, ...changedProps });\n }\n}\n\n/** JSON representation of a [[Contour]].\n * @public\n */\nexport interface ContourProps {\n /** See [[Contour.majorStyle]]. */\n majorStyle?: ContourStyleProps;\n /** See [[Contour.minor]]. */\n minorStyle?: ContourStyleProps;\n /** See [[Contour.minorInterval]]. */\n minorInterval?: number;\n /** See [[Contour.majorIntervalCount]]. */\n majorIntervalCount?: number;\n /** See [[Contour.showGeometry]] */\n showGeometry?: boolean;\n}\n\n/** A type containing all of the properties of [[Contour]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[Contour.create]] and [[Contour.clone]].\n * @public\n */\nexport type ContourProperties = NonFunctionPropertiesOf<Contour>;\n\n/** Describes how to generate and style contour lines for geometry within a single [[ContourGroup]].\n * Contours provide a way to visualize elevation within a 3d scene by drawing lines at fixed intervals along the z-axis.\n * There are actually 2 kinds of contour lines: major and minor. Each kind can be styled independently.\n * A contour line is generated every [[minorInterval]] meters. Every `nth` line will be a *major* contour, where `n` = [[majorIntervalCount]]; the intervening lines will\n * all be *minor* contours.\n * For example, with a [[majorIntervalCount]] of `1`, every contour will be major; of `2`, every other contour will be major; and of `3`, there will be two minor contours in between\n * each major contour.\n *\n * @public\n */\nexport class Contour {\n /** Settings that describe how a major contour is styled. Defaults to an instantation of [[ContourStyle]] using `pixelWidth` of 2 and default values for the other properties. */\n public readonly majorStyle: ContourStyle;\n /** Settings that describe how a minor contour is styled. Defaults to an instantation of [[ContourStyle]] using default values for the properties. */\n public readonly minorStyle: ContourStyle;\n /** The interval for the minor contour occurrence in meters; these can be specified as fractional. Defaults to 1. If a value <= 0 is specified, this will be treated as 1 meter. */\n public readonly minorInterval: number;\n /** The count of minor contour intervals that define a major interval (integer > 0). A value of 1 means no minor contours will be shown, only major contours. Defaults to 5. If a value < 1 is specified, this will be treated as 1. If a non-integer value is specified, it will be treated as if it were rounded to the nearest integer. */\n public readonly majorIntervalCount: number;\n /** If true, show underlying geometry along with the associated contours. If false, only show the contours, not the underlying geometry. Defaults to true. */\n public readonly showGeometry: boolean;\n\n public static readonly defaults = new Contour({});\n\n /** Returns true if `this` is logically equivalent to `other`. */\n public equals(other: Contour): boolean {\n return this.compare(other) === 0;\n }\n\n /** Performs ordered comparison between this and another contour. */\n public compare(other: Contour): number {\n return Contour.compare(this, other);\n }\n\n /** Performs ordered comparison of two contours.\n * @param lhs First contour to compare\n * @param rhs Second contour to compare\n * @returns 0 if lhs is equivalent to rhs, a negative number if lhs compares less than rhs, or a positive number if lhs compares greater than rhs.\n */\n public static compare(lhs: Contour, rhs: Contour): number {\n return ContourStyle.compare(lhs.majorStyle, rhs.majorStyle)\n || ContourStyle.compare(lhs.minorStyle, rhs.minorStyle)\n || compareNumbers(lhs.minorInterval, rhs.minorInterval)\n || compareNumbers(lhs.majorIntervalCount, rhs.majorIntervalCount)\n || compareBooleans(lhs.showGeometry, rhs.showGeometry);\n }\n\n private constructor(props?: Partial<ContourProperties>) {\n this.majorStyle = props?.majorStyle ?? ContourStyle.fromJSON({ pixelWidth: 2 });\n this.minorStyle = props?.minorStyle ?? ContourStyle.fromJSON();\n this.minorInterval = props?.minorInterval ?? 1;\n this.majorIntervalCount = props?.majorIntervalCount ?? 5;\n this.showGeometry = props?.showGeometry ?? true;\n }\n\n public static fromJSON(props?: ContourProps) {\n if (!props)\n return new Contour();\n\n return new this({\n majorStyle: props?.majorStyle ? ContourStyle.fromJSON(props.majorStyle) : undefined,\n minorStyle: props?.minorStyle ? ContourStyle.fromJSON(props.minorStyle) : undefined,\n minorInterval: props?.minorInterval,\n majorIntervalCount: props?.majorIntervalCount,\n showGeometry: props?.showGeometry,\n });\n }\n\n public toJSON(): ContourProps {\n const props: ContourProps = {};\n\n if (!this.majorStyle.equals(ContourStyle.fromJSON({ pixelWidth: 2 })))\n props.majorStyle = this.majorStyle.toJSON();\n\n if (!this.minorStyle.equals(ContourStyle.fromJSON()))\n props.minorStyle = this.minorStyle.toJSON();\n\n if (1 !== this.minorInterval)\n props.minorInterval = this.minorInterval;\n\n if (5 !== this.majorIntervalCount)\n props.majorIntervalCount = this.majorIntervalCount;\n\n if (true !== this.showGeometry)\n props.showGeometry = this.showGeometry;\n\n return props;\n }\n\n /** Create a new Contour. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourProperties>): Contour {\n return props ? new this(props) : new Contour();\n }\n\n /** Create a copy of this Contour, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourProperties>): Contour {\n if (!changedProps)\n return this;\n\n return Contour.create({ ...this, ...changedProps });\n }\n}\n\n/** JSON representation of a [[ContourGroup]].\n * @public\n */\nexport interface ContourGroupProps {\n /** See [[ContourGroup.contourDef]]. */\n contourDef?: ContourProps;\n /** See [[ContourGroup.subCategories]]. */\n subCategories?: CompressedId64Set;\n /** See [[ContourGroup.name]]. */\n name?: string;\n}\n\n/** A type containing all of the properties of [[ContourGroup]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[ContourGroup.create]] and [[ContourGroup.clone]].\n * @public\n */\nexport type ContourGroupProperties = NonFunctionPropertiesOf<ContourGroup>;\n\n/** Defines a group of objects to which to apply [[Contour]] lines in a particular style.\n * The [[ContourDisplay]] settings can contain multiple groups.\n * Each group is described by a set of [SubCategory]($backend)'s; all geometry belonging to any of those subcategories belongs to the group.\n * An empty set of subcategories indicates that this is a default group, implicitly containing all subcategories that are not explicitly included in another group.\n * Each group has an optional, non-user-facing name that applications can use to assign semantics to particular groups.\n * @public\n */\nexport class ContourGroup {\n private _subCategories: CompressedId64Set;\n\n /** Describes the appearance of all of the contours applied to geometry belonging to this group. */\n public readonly contourDef: Contour;\n /** An optional, non-user-facing name that applications can use to assign semantics to particular groups.\n * Default: an empty string.\n */\n public readonly name: string;\n\n /** The set of subcategories belonging to this group, or an empty set if this is a default group. If more than one empty set exists in the [[ContourDisplay]] object's `groups` array, the last entry in that array is used for rendering the default styling.\n * @see [[isDefaultGroup]] to test if this is a default group.\n */\n public get subCategories(): OrderedId64Iterable {\n return CompressedId64Set.iterable(this._subCategories);\n }\n\n /** Returns true if [[subCategories]] is an empty set, indicating that any subcategory not included in any other [[ContourGroup]] is implicitly\n * included in this group.\n */\n public get isDefaultGroup(): boolean {\n return OrderedId64Iterable.isEmptySet(this._subCategories);\n }\n\n /** Returns true if `this` and `other` contain the exact same set of subcategories. */\n public subCategoriesEqual(other: ContourGroup): boolean {\n return this._subCategories === other._subCategories;\n }\n\n /** Perform ordered comparison between this and another contour group. */\n public compare(other: ContourGroup): number {\n return compareStrings(this.name, other.name) || compareStrings(this._subCategories, other._subCategories) || this.contourDef.compare(other.contourDef);\n }\n\n /** Returns true if `this` and `other` are logically equivalent, having the same styling, name, and set of subcategories. */\n public equals(other: ContourGroup | undefined): boolean {\n return undefined !== other && this.compare(other) === 0;\n }\n\n private constructor(props?: Partial<ContourGroupProperties>) {\n this.contourDef = props?.contourDef ?? Contour.fromJSON();\n this._subCategories = props?.subCategories ? CompressedId64Set.sortAndCompress(props.subCategories) : \"\";\n this.name = props?.name ?? \"\";\n }\n\n public static fromJSON(props?: ContourGroupProps) {\n if (!props)\n return new ContourGroup();\n\n return new this({\n contourDef: props?.contourDef ? Contour.fromJSON(props.contourDef) : undefined,\n name: props?.name,\n subCategories: props?.subCategories ? CompressedId64Set.iterable(props.subCategories) : undefined,\n });\n }\n\n public toJSON(): ContourGroupProps {\n const props: ContourGroupProps = {};\n\n if (!this.contourDef.equals(Contour.defaults))\n props.contourDef = this.contourDef.toJSON();\n\n if (this.name)\n props.name = this.name;\n\n props.subCategories = this._subCategories;\n return props;\n }\n\n /** Create a new ContourGroup. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourGroupProperties>): ContourGroup {\n return props ? new this(props) : new ContourGroup();\n }\n\n /** Create a copy of this ContourGroup, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourGroupProperties>): ContourGroup {\n if (!changedProps)\n return this;\n\n return ContourGroup.create({ ...this, ...changedProps });\n }\n}\n\n/** JSON representation of [[ContourDisplay]] settings.\n * @public\n */\nexport interface ContourDisplayProps {\n /** See [[ContourDisplay.groups]]. */\n groups?: ContourGroupProps[];\n /** See [[ContourDisplay.displayContours]]. */\n displayContours?: boolean;\n}\n\n/** A type containing all of the properties of [[ContourDisplay]] with none of the methods and with the `readonly` modifiers removed.\n * Used by [[ContourDisplay.create]] and [[ContourDisplay.clone]].\n * @public\n */\nexport type ContourDisplayProperties = NonFunctionPropertiesOf<ContourDisplay>;\n\n/** Settings that specify how to apply [contour lines]($docs/learning/display/ContourDisplay.md) to groups of geometry\n * within a 3d scene.\n * @see [[DisplayStyle3dSettings.contours]] to associate contour settings with a display style.\n * @public\n */\nexport class ContourDisplay {\n /** A list of the groups, each describing their own specific contour display settings. Defaults to an empty array.\n * @note The display system supports no more than [[ContourDisplay.maxContourGroups]]. Entries in this array exceeding that maximum will\n * have no effect on the display of contour lines.\n */\n public readonly groups: ContourGroup[];\n /** Whether to display the contour lines described by these settings. Default: false.\n * @see [[withDisplayContours]] to change this flag.\n */\n public readonly displayContours: boolean;\n /** The maximum number of contour groups that the system will allow. Any contour groups added to the [[groups]] array beyond this number will be ignored\n * for display purposes.\n */\n public static readonly maxContourGroups = 5;\n\n /** Perform ordered comparison between this and another `ContourDisplay`. */\n public compare(other: ContourDisplay): number {\n return compareBooleans(this.displayContours, other.displayContours) || compareArrays(this.groups, other.groups, (lhs, rhs) => lhs.compare(rhs));\n }\n\n /** Returns true if `this` and `other` are logically equivalent, having the same groups and styling. */\n public equals(other: ContourDisplay): boolean {\n if (this.displayContours !== other.displayContours)\n return false;\n if (this.groups.length !== other.groups.length)\n return false;\n for (let index = 0, len = this.groups.length; index < len && index < ContourDisplay.maxContourGroups; ++index) {\n const match = this.groups[index].equals(other.groups[index]);\n if (!match)\n return false;\n }\n return true;\n }\n\n private constructor(props?: Partial<ContourDisplayProperties>) {\n this.displayContours = props?.displayContours ?? false;\n this.groups = props?.groups ?? [];\n }\n\n public static fromJSON(props?: ContourDisplayProps) {\n if (!props)\n return new ContourDisplay();\n\n const groups: ContourGroup[] = [];\n if (undefined !== props && undefined !== props.groups) {\n for (let n = 0; n < props.groups.length; n++) {\n groups[n] = ContourGroup.fromJSON(props.groups[n]);\n }\n }\n\n return new this({\n displayContours: props?.displayContours,\n groups: props.groups ? groups : undefined,\n });\n }\n\n public toJSON(): ContourDisplayProps {\n const props: ContourDisplayProps = {};\n\n props.groups = [];\n for (let n = 0; n < this.groups.length; n++) {\n props.groups[n] = this.groups[n].toJSON();\n }\n\n props.displayContours = this.displayContours;\n return props;\n }\n\n /** Create a new ContourDisplay. Any properties not specified by `props` will be initialized to their default values. */\n public static create(props?: Partial<ContourDisplayProperties>): ContourDisplay {\n return props ? new this(props) : new ContourDisplay();\n }\n\n /** Create a copy of these settings, changing the `displayContours` flag as specified. */\n public withDisplayContours(displayContours: boolean): ContourDisplay {\n return displayContours === this.displayContours ? this : ContourDisplay.create({ ...this, displayContours });\n }\n\n /** Create a copy of this ContourDisplay, identical except for any properties specified by `changedProps`.\n * Any properties of `changedProps` explicitly set to `undefined` will be reset to their default values.\n */\n public clone(changedProps?: Partial<ContourDisplayProperties>): ContourDisplay {\n if (!changedProps)\n return this;\n\n return ContourDisplay.create({ ...this, ...changedProps });\n }\n}\n"]}