@itwin/ecschema-rpcinterface-tests 5.1.0-dev.60 → 5.1.0-dev.62

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.
@@ -30841,6 +30841,7 @@ var PrimitiveTypeCode;
30841
30841
  * @beta
30842
30842
  * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use the `Property` class from @itwin/ecschema-metadata` instead.
30843
30843
  */
30844
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
30844
30845
  class PropertyMetaData {
30845
30846
  primitiveType;
30846
30847
  structName;
@@ -30926,6 +30927,7 @@ class PropertyMetaData {
30926
30927
  * @beta
30927
30928
  * @deprecated in 5.0 - will not be removed until after 2026-06-13. Use `EntityClass` class from `@itwin/ecschema-metadata` instead.
30928
30929
  */
30930
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
30929
30931
  class EntityMetaData {
30930
30932
  /** The Id of the class in the [[IModelDb]] from which the metadata was obtained. */
30931
30933
  classId;
@@ -43186,8 +43188,7 @@ class WhiteOnWhiteReversalSettings {
43186
43188
  "use strict";
43187
43189
  __webpack_require__.r(__webpack_exports__);
43188
43190
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
43189
- /* harmony export */ TextAnnotation: () => (/* binding */ TextAnnotation),
43190
- /* harmony export */ textAnnotationFrameShapes: () => (/* binding */ textAnnotationFrameShapes)
43191
+ /* harmony export */ TextAnnotation: () => (/* binding */ TextAnnotation)
43191
43192
  /* harmony export */ });
43192
43193
  /* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
43193
43194
  /* harmony import */ var _TextBlock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TextBlock */ "../../core/common/lib/esm/annotation/TextBlock.js");
@@ -43200,10 +43201,6 @@ __webpack_require__.r(__webpack_exports__);
43200
43201
  */
43201
43202
 
43202
43203
 
43203
- /** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]
43204
- * @beta
43205
- */
43206
- const textAnnotationFrameShapes = ["none", "line", "rectangle", "circle", "equilateralTriangle", "diamond", "square", "pentagon", "hexagon", "octagon", "capsule", "roundedRectangle"];
43207
43204
  /**
43208
43205
  * Represents a formatted block of text positioned in 2d or 3d space.
43209
43206
  * [TextAnnotation2d]($backend) and [TextAnnotation3d]($backend) elements store a single TextAnnotation from which their geometric representation is generated.
@@ -43228,16 +43225,13 @@ class TextAnnotation {
43228
43225
  anchor;
43229
43226
  /** An offset applied to the anchor point that can be used to position annotations within the same geometry stream relative to one another. */
43230
43227
  offset;
43231
- /** The frame settings of the text annotation. */
43232
- frame;
43233
43228
  /** The leaders of the text annotation. */
43234
43229
  leaders;
43235
- constructor(offset, angles, textBlock, anchor, frame, leaders) {
43230
+ constructor(offset, angles, textBlock, anchor, leaders) {
43236
43231
  this.offset = offset;
43237
43232
  this.orientation = angles;
43238
43233
  this.textBlock = textBlock;
43239
43234
  this.anchor = anchor;
43240
- this.frame = frame;
43241
43235
  this.leaders = leaders;
43242
43236
  }
43243
43237
  /** Creates a new TextAnnotation. */
@@ -43246,11 +43240,8 @@ class TextAnnotation {
43246
43240
  const angles = args?.orientation ?? new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.YawPitchRollAngles();
43247
43241
  const textBlock = args?.textBlock ?? _TextBlock__WEBPACK_IMPORTED_MODULE_1__.TextBlock.createEmpty();
43248
43242
  const anchor = args?.anchor ?? { vertical: "top", horizontal: "left" };
43249
- // If the user supplies a frame, but doesn't supply a shape, default the shape to "rectangle"
43250
- const shape = args?.frame?.shape ?? "rectangle";
43251
- const frame = args?.frame ? { shape, ...args.frame } : undefined;
43252
43243
  const leaders = args?.leaders ?? undefined;
43253
- return new TextAnnotation(offset, angles, textBlock, anchor, frame, leaders);
43244
+ return new TextAnnotation(offset, angles, textBlock, anchor, leaders);
43254
43245
  }
43255
43246
  /**
43256
43247
  * Creates a new TextAnnotation instance from its JSON representation.
@@ -43261,7 +43252,6 @@ class TextAnnotation {
43261
43252
  orientation: props?.orientation ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.YawPitchRollAngles.fromJSON(props.orientation) : undefined,
43262
43253
  textBlock: props?.textBlock ? _TextBlock__WEBPACK_IMPORTED_MODULE_1__.TextBlock.create(props.textBlock) : undefined,
43263
43254
  anchor: props?.anchor ? { ...props.anchor } : undefined,
43264
- frame: props?.frame ? { shape: "rectangle", ...props.frame } : undefined,
43265
43255
  leaders: props?.leaders ? props.leaders.map((leader) => ({
43266
43256
  startPoint: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Point3d.fromJSON(leader.startPoint),
43267
43257
  attachment: leader.attachment,
@@ -43275,7 +43265,7 @@ class TextAnnotation {
43275
43265
  */
43276
43266
  toJSON() {
43277
43267
  const props = {};
43278
- // Even if the text block is empty, we want to record its style name and overrides, e.g.,
43268
+ // Even if the text block is empty, we want to record its style ID and overrides, e.g.,
43279
43269
  // so the user can pick up where they left off editing it next time.
43280
43270
  props.textBlock = this.textBlock.toJSON();
43281
43271
  if (!this.offset.isZero) {
@@ -43287,8 +43277,6 @@ class TextAnnotation {
43287
43277
  if (this.anchor.vertical !== "top" || this.anchor.horizontal !== "left") {
43288
43278
  props.anchor = { ...this.anchor };
43289
43279
  }
43290
- // Default frame to "none"
43291
- props.frame = this.frame ? { ...this.frame } : undefined;
43292
43280
  props.leaders = this.leaders?.map((leader) => ({
43293
43281
  startPoint: leader.startPoint.toJSON(),
43294
43282
  attachment: leader.attachment,
@@ -43302,16 +43290,23 @@ class TextAnnotation {
43302
43290
  * at the bottom left, then the transform will be relative to the bottom-left corner of `textBlockExtents`.
43303
43291
  * The text block will be rotated around the fixed anchor point according to [[orientation]], then translated by [[offset]].
43304
43292
  * The anchor point will coincide with (0, 0, 0) unless an [[offset]] is present.
43293
+ * If a scale factor is specified, the transform will also scale the annotation by that factor. Usually, this should come from the [[Drawing]] containing the annotation.
43305
43294
  * @param boundingBox A box fully containing the [[textBlock]]. This range should include the margins.
43295
+ * @param scaleFactor A factor by which to scale the annotation. Default: 1 (no scaling).
43306
43296
  * @see [[computeAnchorPoint]] to compute the transform's anchor point.
43307
43297
  * @see [computeLayoutTextBlockResult]($backend) to lay out a `TextBlock`.
43308
43298
  */
43309
- computeTransform(boundingBox) {
43299
+ computeTransform(boundingBox, scaleFactor = 1) {
43310
43300
  const anchorPt = this.computeAnchorPoint(boundingBox);
43311
43301
  const matrix = this.orientation.toMatrix3d();
43312
- const rotation = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createFixedPointAndMatrix(anchorPt, matrix);
43302
+ const transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createIdentity();
43313
43303
  const translation = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createTranslation(this.offset.minus(anchorPt));
43314
- return translation.multiplyTransformTransform(rotation, rotation);
43304
+ const scaleTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createScaleAboutPoint(anchorPt, scaleFactor);
43305
+ const rotation = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createFixedPointAndMatrix(anchorPt, matrix);
43306
+ transform.multiplyTransformTransform(translation, transform);
43307
+ transform.multiplyTransformTransform(scaleTransform, transform);
43308
+ transform.multiplyTransformTransform(rotation, transform);
43309
+ return transform;
43315
43310
  }
43316
43311
  /** Compute the anchor point of this annotation as specified by [[anchor]].
43317
43312
  * @param boundingBox A box fully containing the [[textBlock]].
@@ -43372,12 +43367,6 @@ class TextAnnotation {
43372
43367
  !this.offset.isAlmostEqual(other.offset) ||
43373
43368
  !this.textBlock.equals(other.textBlock))
43374
43369
  return false;
43375
- const framesMatch = this.frame?.shape === other.frame?.shape
43376
- && this.frame?.fill === other.frame?.fill
43377
- && this.frame?.border === other.frame?.border
43378
- && this.frame?.borderWeight === other.frame?.borderWeight;
43379
- if (!framesMatch)
43380
- return false;
43381
43370
  return this.areLeadersEqual(this.leaders, other.leaders);
43382
43371
  }
43383
43372
  }
@@ -43403,6 +43392,7 @@ __webpack_require__.r(__webpack_exports__);
43403
43392
  /* harmony export */ TextBlockComponent: () => (/* binding */ TextBlockComponent),
43404
43393
  /* harmony export */ TextRun: () => (/* binding */ TextRun)
43405
43394
  /* harmony export */ });
43395
+ /* harmony import */ var _TextStyle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TextStyle */ "../../core/common/lib/esm/annotation/TextStyle.js");
43406
43396
  /*---------------------------------------------------------------------------------------------
43407
43397
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
43408
43398
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -43410,29 +43400,18 @@ __webpack_require__.r(__webpack_exports__);
43410
43400
  /** @packageDocumentation
43411
43401
  * @module Annotation
43412
43402
  */
43403
+
43413
43404
  /** Abstract representation of any of the building blocks that make up a [[TextBlock]] document - namely [[Run]]s, [[Paragraph]]s, and [[TextBlock]] itself.
43414
- * Each component can specify a [[TextStyle]] that formats its contents and optional [[styleOverrides]] to customize that formatting.
43405
+ * The [[TextBlock]] can specify an [AnnotationTextStyle]($backend) that formats its contents. Each component can specify an optional [[styleOverrides]] to customize that formatting.
43415
43406
  * @beta
43416
43407
  */
43417
43408
  class TextBlockComponent {
43418
- _styleName;
43419
43409
  _styleOverrides;
43420
43410
  /** @internal */
43421
43411
  constructor(props) {
43422
- this._styleName = props.styleName;
43423
- this._styleOverrides = { ...props.styleOverrides };
43424
- }
43425
- /** The name of the [[TextStyle]] that provides the base formatting for the contents of this component.
43426
- * @note Assigning to this property is equivalent to calling [[applyStyle]] with default [[ApplyTextStyleOptions]], which propagates the style change to all of
43427
- * the components sub-components and clears any [[styleOverrides]].
43428
- */
43429
- get styleName() {
43430
- return this._styleName;
43431
- }
43432
- set styleName(styleName) {
43433
- this.applyStyle(styleName);
43412
+ this._styleOverrides = _TextStyle__WEBPACK_IMPORTED_MODULE_0__.TextStyleSettings.cloneProps(props?.styleOverrides ?? {});
43434
43413
  }
43435
- /** Deviations in individual properties of the [[TextStyle]] specified by [[styleName]].
43414
+ /** Deviations in individual properties of the [[TextStyleSettings]] in the [AnnotationTextStyle]($backend) specified by `styleId` on the [[TextBlock]].
43436
43415
  * For example, if the style uses the "Arial" font, you can override that by settings `styleOverrides.fontName` to "Comic Sans".
43437
43416
  * @see [[clearStyleOverrides]] to reset this to an empty object.
43438
43417
  */
@@ -43440,20 +43419,13 @@ class TextBlockComponent {
43440
43419
  return this._styleOverrides;
43441
43420
  }
43442
43421
  set styleOverrides(overrides) {
43443
- this._styleOverrides = { ...overrides };
43422
+ this._styleOverrides = _TextStyle__WEBPACK_IMPORTED_MODULE_0__.TextStyleSettings.cloneProps(overrides);
43444
43423
  }
43445
- /** Reset any [[styleOverrides]] applied to this component's [[TextStyle]]. */
43446
- clearStyleOverrides() {
43424
+ /** Reset any [[styleOverrides]] applied to this component. */
43425
+ clearStyleOverrides(_options) {
43447
43426
  this.styleOverrides = {};
43448
43427
  }
43449
- /** Apply the [[TextStyle]] specified by `styleName` to this component, optionally preserving [[styleOverrides]] and/or preventing propagation to sub-components. */
43450
- applyStyle(styleName, options) {
43451
- this._styleName = styleName;
43452
- if (!(options?.preserveOverrides)) {
43453
- this.clearStyleOverrides();
43454
- }
43455
- }
43456
- /** Returns true if [[styleOverrides]] specifies any deviations from this component's base [[TextStyle]]. */
43428
+ /** Returns true if [[styleOverrides]] specifies any deviations from the [[TextBlock]]'s [AnnotationTextStyle]($backend). */
43457
43429
  get overridesStyle() {
43458
43430
  return Object.keys(this.styleOverrides).length > 0;
43459
43431
  }
@@ -43468,15 +43440,14 @@ class TextBlockComponent {
43468
43440
  /** Convert this component to its JSON representation. */
43469
43441
  toJSON() {
43470
43442
  return {
43471
- styleName: this.styleName,
43472
- styleOverrides: { ...this.styleOverrides },
43443
+ styleOverrides: _TextStyle__WEBPACK_IMPORTED_MODULE_0__.TextStyleSettings.cloneProps(this.styleOverrides),
43473
43444
  };
43474
43445
  }
43475
43446
  /** Returns true if `this` is equivalent to `other`. */
43476
43447
  equals(other) {
43477
43448
  const myKeys = Object.keys(this.styleOverrides);
43478
43449
  const yrKeys = Object.keys(other._styleOverrides);
43479
- if (this.styleName !== other.styleName || myKeys.length !== yrKeys.length) {
43450
+ if (myKeys.length !== yrKeys.length) {
43480
43451
  return false;
43481
43452
  }
43482
43453
  for (const name of myKeys) {
@@ -43520,8 +43491,8 @@ class TextRun extends TextBlockComponent {
43520
43491
  baselineShift;
43521
43492
  constructor(props) {
43522
43493
  super(props);
43523
- this.content = props.content ?? "";
43524
- this.baselineShift = props.baselineShift ?? "none";
43494
+ this.content = props?.content ?? "";
43495
+ this.baselineShift = props?.baselineShift ?? "none";
43525
43496
  }
43526
43497
  clone() {
43527
43498
  return new TextRun(this.toJSON());
@@ -43558,8 +43529,8 @@ class FractionRun extends TextBlockComponent {
43558
43529
  denominator;
43559
43530
  constructor(props) {
43560
43531
  super(props);
43561
- this.numerator = props.numerator ?? "";
43562
- this.denominator = props.denominator ?? "";
43532
+ this.numerator = props?.numerator ?? "";
43533
+ this.denominator = props?.denominator ?? "";
43563
43534
  }
43564
43535
  toJSON() {
43565
43536
  return {
@@ -43655,7 +43626,7 @@ class Paragraph extends TextBlockComponent {
43655
43626
  runs;
43656
43627
  constructor(props) {
43657
43628
  super(props);
43658
- this.runs = props.runs?.map((run) => Run.fromJSON(run)) ?? [];
43629
+ this.runs = props?.runs?.map((run) => Run.fromJSON(run)) ?? [];
43659
43630
  }
43660
43631
  toJSON() {
43661
43632
  return {
@@ -43670,13 +43641,16 @@ class Paragraph extends TextBlockComponent {
43670
43641
  clone() {
43671
43642
  return new Paragraph(this.toJSON());
43672
43643
  }
43673
- /** Apply the specified style to this [[Paragraph]], and - unless [[ApplyTextStyleOptions.preventPropagation]] is `true` - to all of its [[runs]]. */
43674
- applyStyle(styleName, options) {
43675
- super.applyStyle(styleName, options);
43676
- if (!(options?.preventPropagation)) {
43677
- for (const run of this.runs) {
43678
- run.applyStyle(styleName, options);
43679
- }
43644
+ /**
43645
+ * Clears any [[styleOverrides]] applied to this Paragraph.
43646
+ * Will also clear [[styleOverrides]] from all child components unless [[ClearTextStyleOptions.preserveChildrenOverrides]] is `true`.
43647
+ */
43648
+ clearStyleOverrides(options) {
43649
+ super.clearStyleOverrides();
43650
+ if (options?.preserveChildrenOverrides)
43651
+ return;
43652
+ for (const run of this.runs) {
43653
+ run.clearStyleOverrides();
43680
43654
  }
43681
43655
  }
43682
43656
  /** Compute a string representation of this paragraph by concatenating the string representations of all of its [[runs]]. */
@@ -43701,6 +43675,11 @@ class Paragraph extends TextBlockComponent {
43701
43675
  * @beta
43702
43676
  */
43703
43677
  class TextBlock extends TextBlockComponent {
43678
+ /** The ID of the [AnnotationTextStyle]($backend) that provides the base formatting for the contents of this TextBlock.
43679
+ * @note Assigning to this property retains all style overrides on the TextBlock and its child components.
43680
+ * Call [[clearStyleOverrides]] to clear the TextBlock's and optionally all children's style overrides.
43681
+ */
43682
+ styleId;
43704
43683
  /** The width of the document in meters. Lines that would exceed this width are instead wrapped around to the next line if possible.
43705
43684
  * A value less than or equal to zero indicates no wrapping is to be applied.
43706
43685
  * Default: 0
@@ -43714,6 +43693,7 @@ class TextBlock extends TextBlockComponent {
43714
43693
  paragraphs;
43715
43694
  constructor(props) {
43716
43695
  super(props);
43696
+ this.styleId = props.styleId;
43717
43697
  this.width = props.width ?? 0;
43718
43698
  this.justification = props.justification ?? "left";
43719
43699
  // Assign default margins if not provided
@@ -43728,6 +43708,7 @@ class TextBlock extends TextBlockComponent {
43728
43708
  toJSON() {
43729
43709
  return {
43730
43710
  ...super.toJSON(),
43711
+ styleId: this.styleId,
43731
43712
  width: this.width,
43732
43713
  justification: this.justification,
43733
43714
  margins: this.margins,
@@ -43738,9 +43719,9 @@ class TextBlock extends TextBlockComponent {
43738
43719
  static create(props) {
43739
43720
  return new TextBlock(props);
43740
43721
  }
43741
- /** Create an empty text block containing no [[paragraphs]] and an empty [[styleName]]. */
43722
+ /** Create an empty text block containing no [[paragraphs]] and an empty [[styleId]]. */
43742
43723
  static createEmpty() {
43743
- return TextBlock.create({ styleName: "" });
43724
+ return TextBlock.create({ styleId: "" });
43744
43725
  }
43745
43726
  /** Returns true if every paragraph in this text block is empty. */
43746
43727
  get isEmpty() {
@@ -43749,13 +43730,16 @@ class TextBlock extends TextBlockComponent {
43749
43730
  clone() {
43750
43731
  return new TextBlock(this.toJSON());
43751
43732
  }
43752
- /** Apply the specified style to this block and - unless [[ApplyTextStyleOptions.preventPropagation]] is `true` - to all of its [[paragraphs]]. */
43753
- applyStyle(styleName, options) {
43754
- super.applyStyle(styleName, options);
43755
- if (!(options?.preventPropagation)) {
43756
- for (const paragraph of this.paragraphs) {
43757
- paragraph.applyStyle(styleName, options);
43758
- }
43733
+ /**
43734
+ * Clears any [[styleOverrides]] applied to this TextBlock.
43735
+ * Will also clear [[styleOverrides]] from all child components unless [[ClearTextStyleOptions.preserveChildrenOverrides]] is `true`.
43736
+ */
43737
+ clearStyleOverrides(options) {
43738
+ super.clearStyleOverrides();
43739
+ if (options?.preserveChildrenOverrides)
43740
+ return;
43741
+ for (const paragraph of this.paragraphs) {
43742
+ paragraph.clearStyleOverrides();
43759
43743
  }
43760
43744
  }
43761
43745
  /** Compute a string representation of the document's contents by concatenating the string representations of each of its [[paragraphs]], separated by [[TextBlockStringifyOptions.paragraphBreak]]. */
@@ -43763,14 +43747,17 @@ class TextBlock extends TextBlockComponent {
43763
43747
  return this.paragraphs.map((x) => x.stringify(options)).join(options?.paragraphBreak ?? " ");
43764
43748
  }
43765
43749
  /** Add and return a new paragraph.
43766
- * If [[paragraphs]] is not empty, the style and overrides of the last [[Paragraph]] in the block will be applied to the new paragraph; otherwise,
43767
- * the paragraph will inherit this block's style with no overrides.
43750
+ * By default, the paragraph will be created with no [[styleOverrides]], so that it inherits the style of this block.
43751
+ * @param seedFromLast If true and [[paragraphs]] is not empty, the new paragraph will inherit the style overrides of the last [[Paragraph]] in this block.
43768
43752
  */
43769
- appendParagraph() {
43770
- const seed = this.paragraphs[0];
43753
+ appendParagraph(seedFromLast = false) {
43754
+ let styleOverrides = {};
43755
+ if (seedFromLast && this.paragraphs.length > 0) {
43756
+ const seed = this.paragraphs[this.paragraphs.length - 1];
43757
+ styleOverrides = { ...seed.styleOverrides };
43758
+ }
43771
43759
  const paragraph = Paragraph.create({
43772
- styleName: seed?.styleName ?? this.styleName,
43773
- styleOverrides: seed?.styleOverrides ?? undefined,
43760
+ styleOverrides
43774
43761
  });
43775
43762
  this.paragraphs.push(paragraph);
43776
43763
  return paragraph;
@@ -43786,6 +43773,9 @@ class TextBlock extends TextBlockComponent {
43786
43773
  if (!(other instanceof TextBlock)) {
43787
43774
  return false;
43788
43775
  }
43776
+ if (this.styleId !== other.styleId || !super.equals(other)) {
43777
+ return false;
43778
+ }
43789
43779
  if (this.width !== other.width || this.justification !== other.justification || this.paragraphs.length !== other.paragraphs.length) {
43790
43780
  return false;
43791
43781
  }
@@ -43848,9 +43838,10 @@ __webpack_require__.r(__webpack_exports__);
43848
43838
  "use strict";
43849
43839
  __webpack_require__.r(__webpack_exports__);
43850
43840
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
43851
- /* harmony export */ TextStyle: () => (/* binding */ TextStyle),
43852
- /* harmony export */ TextStyleSettings: () => (/* binding */ TextStyleSettings)
43841
+ /* harmony export */ TextStyleSettings: () => (/* binding */ TextStyleSettings),
43842
+ /* harmony export */ textAnnotationFrameShapes: () => (/* binding */ textAnnotationFrameShapes)
43853
43843
  /* harmony export */ });
43844
+ /* harmony import */ var _ColorDef__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ColorDef */ "../../core/common/lib/esm/ColorDef.js");
43854
43845
  /*---------------------------------------------------------------------------------------------
43855
43846
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
43856
43847
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -43858,8 +43849,25 @@ __webpack_require__.r(__webpack_exports__);
43858
43849
  /** @packageDocumentation
43859
43850
  * @module Annotation
43860
43851
  */
43852
+
43853
+ /** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]
43854
+ * @beta
43855
+ */
43856
+ const textAnnotationFrameShapes = ["none", "line", "rectangle", "circle", "equilateralTriangle", "diamond", "square", "pentagon", "hexagon", "octagon", "capsule", "roundedRectangle"];
43857
+ ;
43858
+ function deepFreeze(obj) {
43859
+ if (obj === null || typeof obj !== "object" || Object.isFrozen(obj))
43860
+ return;
43861
+ Object.getOwnPropertyNames(obj).forEach((prop) => {
43862
+ const value = obj[prop];
43863
+ if (value && typeof value === "object") {
43864
+ deepFreeze(value);
43865
+ }
43866
+ });
43867
+ Object.freeze(obj);
43868
+ }
43861
43869
  /** A description of the formatting to be applied to a [[TextBlockComponent]].
43862
- * Named instances of these settings can be stored as [[TextStyle]]s in a [Workspace]($backend).
43870
+ * Named instances of these settings can be stored as [AnnotationTextStyle]($backend)s in an iModel.
43863
43871
  * @note This is an immutable type. Use [[clone]] to create a modified copy.
43864
43872
  * @see [[TextStyleSettingsProps]] for documentation of each of the settings.
43865
43873
  * @beta
@@ -43867,7 +43875,7 @@ __webpack_require__.r(__webpack_exports__);
43867
43875
  class TextStyleSettings {
43868
43876
  /** The color of the text. */
43869
43877
  color;
43870
- /** The name of a font stored in a [Workspace]($backend), used to draw the contents of a [[TextRun]].
43878
+ /** The name of a font stored in an iModel, used to draw the contents of a [[TextRun]].
43871
43879
  */
43872
43880
  fontName;
43873
43881
  /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.
@@ -43917,7 +43925,9 @@ class TextStyleSettings {
43917
43925
  * These are equally spaced from the left edge of the TextBlock. Default is 4 meters.
43918
43926
  */
43919
43927
  tabInterval;
43920
- /** A fully-populated JSON representation of the default settings. */
43928
+ /** The frame settings of the [[TextAnnotation]]. */
43929
+ frame;
43930
+ /** A fully-populated JSON representation of the default settings. A real `fontName` must be provided before use. */
43921
43931
  static defaultProps = {
43922
43932
  color: "subcategory",
43923
43933
  fontName: "",
@@ -43934,13 +43944,19 @@ class TextStyleSettings {
43934
43944
  superScriptScale: 2 / 3,
43935
43945
  widthFactor: 1,
43936
43946
  leader: {
43937
- color: "subcategory",
43947
+ color: "inherit",
43938
43948
  wantElbow: false,
43939
43949
  elbowLength: 1.0,
43940
43950
  terminatorHeightFactor: 1.0,
43941
43951
  terminatorWidthFactor: 1.0,
43942
43952
  },
43943
43953
  tabInterval: 4,
43954
+ frame: {
43955
+ shape: "none",
43956
+ fill: "none",
43957
+ border: _ColorDef__WEBPACK_IMPORTED_MODULE_0__.ColorDef.black.toJSON(),
43958
+ borderWeight: 1,
43959
+ },
43944
43960
  };
43945
43961
  /** Settings initialized to all default values. */
43946
43962
  static defaults = new TextStyleSettings({});
@@ -43971,11 +43987,30 @@ class TextStyleSettings {
43971
43987
  };
43972
43988
  this.leader = Object.freeze(leader);
43973
43989
  this.tabInterval = props.tabInterval ?? defaults.tabInterval;
43990
+ const frame = {
43991
+ shape: props.frame?.shape ?? defaults.frame.shape,
43992
+ fill: props.frame?.fill ?? defaults.frame.fill,
43993
+ border: props.frame?.border ?? defaults.frame.border,
43994
+ borderWeight: props.frame?.borderWeight ?? defaults.frame.borderWeight,
43995
+ };
43996
+ // Cast to indicate to TypeScript that the frame properties are all defined
43997
+ this.frame = Object.freeze(frame);
43974
43998
  }
43975
43999
  /** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */
43976
44000
  clone(alteredProps) {
43977
44001
  return alteredProps ? new TextStyleSettings(alteredProps, this) : this;
43978
44002
  }
44003
+ /** Creates a deep copy of the `TextStyleSettingsProps`. */
44004
+ static cloneProps(props) {
44005
+ const copy = { ...props };
44006
+ if (props.leader) {
44007
+ copy.leader = { ...props.leader };
44008
+ }
44009
+ if (props.frame) {
44010
+ copy.frame = { ...props.frame };
44011
+ }
44012
+ return copy;
44013
+ }
43979
44014
  /** Create settings from their JSON representation. */
43980
44015
  static fromJSON(props) {
43981
44016
  return props ? new TextStyleSettings(props) : TextStyleSettings.defaults;
@@ -43992,47 +44027,49 @@ class TextStyleSettings {
43992
44027
  && this.leader.elbowLength === other.elbowLength && this.leader.terminatorHeightFactor === other.terminatorHeightFactor
43993
44028
  && this.leader.terminatorWidthFactor === other.terminatorWidthFactor;
43994
44029
  }
44030
+ frameEquals(other) {
44031
+ return this.frame?.shape === other.shape
44032
+ && this.frame?.fill === other.fill
44033
+ && this.frame?.border === other.border
44034
+ && this.frame?.borderWeight === other.borderWeight;
44035
+ }
43995
44036
  equals(other) {
43996
44037
  return this.color === other.color && this.fontName === other.fontName
43997
44038
  && this.lineHeight === other.lineHeight && this.lineSpacingFactor === other.lineSpacingFactor && this.widthFactor === other.widthFactor
43998
44039
  && this.isBold === other.isBold && this.isItalic === other.isItalic && this.isUnderlined === other.isUnderlined
43999
44040
  && this.stackedFractionType === other.stackedFractionType && this.stackedFractionScale === other.stackedFractionScale
44000
44041
  && this.subScriptOffsetFactor === other.subScriptOffsetFactor && this.subScriptScale === other.subScriptScale
44001
- && this.superScriptOffsetFactor === other.superScriptOffsetFactor
44002
- && this.superScriptScale === other.superScriptScale
44003
- && this.tabInterval === other.tabInterval && this.leaderEquals(other.leader);
44042
+ && this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale
44043
+ && this.tabInterval === other.tabInterval
44044
+ && this.leaderEquals(other.leader)
44045
+ && this.frameEquals(other.frame);
44004
44046
  }
44005
- }
44006
- Object.freeze(TextStyleSettings.defaultProps);
44007
- Object.freeze(TextStyleSettings.defaults);
44008
- /** A named, immutable [[TextStyleSettings]] stored in a [Workspace]($backend).
44009
- * @see [[TextBlockComponent.styleName]] to define the text style for a component of a [[TextBlock]].
44010
- * @note This is an immutable type. Use [[clone]] to create a modified copy.
44011
- * @beta
44012
- */
44013
- class TextStyle {
44014
- name;
44015
- settings;
44016
- constructor(name, settings) {
44017
- this.name = name;
44018
- this.settings = settings;
44019
- }
44020
- /** Create a style from its JSON representation. */
44021
- static fromJSON(json) {
44022
- return TextStyle.create(json.name, TextStyleSettings.fromJSON(json.settings));
44023
- }
44024
- /** Create a new style. */
44025
- static create(name, settings) {
44026
- return new TextStyle(name, settings);
44027
- }
44028
- /** Create a copy of this style with the same name, and settings modified according to the properties defined by `alteredSettings`. */
44029
- clone(alteredSettings) {
44030
- return TextStyle.create(this.name, this.settings.clone(alteredSettings));
44031
- }
44032
- equals(other) {
44033
- return this.name === other.name && this.settings.equals(other.settings);
44047
+ /**
44048
+ * Returns a list of validation errors for this instance.
44049
+ *
44050
+ * A TextStyleSettings object may contain values that are invalid in all contexts.
44051
+ * If this method returns any error strings, using the settings will likely result in rendering failures or runtime exceptions.
44052
+ *
44053
+ * This method only checks for universally invalid values. Additional domain-specific validation may be required depending on the context in which these settings are used.
44054
+ *
44055
+ * @returns An array of error strings describing the invalid values, or an empty array if the settings are valid.
44056
+ */
44057
+ getValidationErrors() {
44058
+ const errorMessages = [];
44059
+ if (this.fontName.trim() === "") {
44060
+ errorMessages.push("fontName must be provided");
44061
+ }
44062
+ if (this.lineHeight <= 0) {
44063
+ errorMessages.push("lineHeight must be greater than 0");
44064
+ }
44065
+ if (this.stackedFractionScale <= 0) {
44066
+ errorMessages.push("stackedFractionScale must be greater than 0");
44067
+ }
44068
+ return errorMessages;
44034
44069
  }
44035
44070
  }
44071
+ deepFreeze(TextStyleSettings.defaultProps);
44072
+ deepFreeze(TextStyleSettings.defaults);
44036
44073
 
44037
44074
 
44038
44075
  /***/ }),
@@ -44365,7 +44402,6 @@ __webpack_require__.r(__webpack_exports__);
44365
44402
  /* harmony export */ TextBlockComponent: () => (/* reexport safe */ _annotation_TextBlock__WEBPACK_IMPORTED_MODULE_3__.TextBlockComponent),
44366
44403
  /* harmony export */ TextRun: () => (/* reexport safe */ _annotation_TextBlock__WEBPACK_IMPORTED_MODULE_3__.TextRun),
44367
44404
  /* harmony export */ TextString: () => (/* reexport safe */ _geometry_TextString__WEBPACK_IMPORTED_MODULE_56__.TextString),
44368
- /* harmony export */ TextStyle: () => (/* reexport safe */ _annotation_TextStyle__WEBPACK_IMPORTED_MODULE_6__.TextStyle),
44369
44405
  /* harmony export */ TextStyleSettings: () => (/* reexport safe */ _annotation_TextStyle__WEBPACK_IMPORTED_MODULE_6__.TextStyleSettings),
44370
44406
  /* harmony export */ TextureMapUnits: () => (/* reexport safe */ _MaterialProps__WEBPACK_IMPORTED_MODULE_83__.TextureMapUnits),
44371
44407
  /* harmony export */ TextureMapping: () => (/* reexport safe */ _TextureMapping__WEBPACK_IMPORTED_MODULE_111__.TextureMapping),
@@ -44438,7 +44474,7 @@ __webpack_require__.r(__webpack_exports__);
44438
44474
  /* harmony export */ readElementMeshes: () => (/* reexport safe */ _ElementMesh__WEBPACK_IMPORTED_MODULE_29__.readElementMeshes),
44439
44475
  /* harmony export */ readTileContentDescription: () => (/* reexport safe */ _tile_TileMetadata__WEBPACK_IMPORTED_MODULE_157__.readTileContentDescription),
44440
44476
  /* harmony export */ rpcOverIpcStrings: () => (/* reexport safe */ _ipc_IpcSession__WEBPACK_IMPORTED_MODULE_75__.rpcOverIpcStrings),
44441
- /* harmony export */ textAnnotationFrameShapes: () => (/* reexport safe */ _annotation_TextAnnotation__WEBPACK_IMPORTED_MODULE_2__.textAnnotationFrameShapes),
44477
+ /* harmony export */ textAnnotationFrameShapes: () => (/* reexport safe */ _annotation_TextStyle__WEBPACK_IMPORTED_MODULE_6__.textAnnotationFrameShapes),
44442
44478
  /* harmony export */ tileFormatFromNumber: () => (/* reexport safe */ _tile_TileIO__WEBPACK_IMPORTED_MODULE_156__.tileFormatFromNumber)
44443
44479
  /* harmony export */ });
44444
44480
  /* harmony import */ var _AmbientOcclusion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AmbientOcclusion */ "../../core/common/lib/esm/AmbientOcclusion.js");
@@ -55001,7 +55037,7 @@ class IModelReadRpcInterface extends _RpcInterface__WEBPACK_IMPORTED_MODULE_0__.
55001
55037
  async getViewStateData(_iModelToken, _viewDefinitionId, _options) { return this.forward(arguments); }
55002
55038
  async readFontJson(_iModelToken) { return this.forward(arguments); } // eslint-disable-line @typescript-eslint/no-deprecated
55003
55039
  async getToolTipMessage(_iModelToken, _elementId) { return this.forward(arguments); }
55004
- /** @deprecated in 3.x - might be removed in next major version. Use ViewStore apis. */
55040
+ /** @deprecated in 3.3.0 - might be removed in next major version. Use ViewStore apis. */
55005
55041
  async getViewThumbnail(_iModelToken, _viewId) { return this.forward(arguments); }
55006
55042
  async getDefaultViewId(_iModelToken) { return this.forward(arguments); }
55007
55043
  async getCustomViewState3dData(_iModelToken, _options) { return this.forward(arguments); }
@@ -67427,6 +67463,7 @@ class ECClass extends _SchemaItem__WEBPACK_IMPORTED_MODULE_9__.SchemaItem {
67427
67463
  else
67428
67464
  correctType = structType;
67429
67465
  if (!correctType)
67466
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
67430
67467
  throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECSchemaStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);
67431
67468
  return correctType;
67432
67469
  }
@@ -67446,6 +67483,7 @@ class ECClass extends _SchemaItem__WEBPACK_IMPORTED_MODULE_9__.SchemaItem {
67446
67483
  else
67447
67484
  correctType = structType;
67448
67485
  if (!correctType)
67486
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
67449
67487
  throw new _Exception__WEBPACK_IMPORTED_MODULE_4__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_4__.ECSchemaStatus.InvalidType, `The provided Struct type, ${structType}, is not a valid StructClass.`);
67450
67488
  return correctType;
67451
67489
  }
@@ -77224,7 +77262,7 @@ class AccuDraw {
77224
77262
  applyDistanceRoundOff(distance, vp) {
77225
77263
  if (!this._distanceRoundOff.active || !this._distanceRoundOff.units.size)
77226
77264
  return undefined;
77227
- let roundValue = this._distanceRoundOff.units.values().next().value;
77265
+ let roundValue = this._distanceRoundOff.units.values().next().value ?? 0;
77228
77266
  if (this._distanceRoundOff.units.size > 1) {
77229
77267
  // NOTE: Set isn't ordered, find smallest entry...
77230
77268
  this._distanceRoundOff.units.forEach((thisRoundValue) => {
@@ -77248,7 +77286,7 @@ class AccuDraw {
77248
77286
  applyAngleRoundOff(angle, distance, vp) {
77249
77287
  if (!this._angleRoundOff.active || !this._angleRoundOff.units.size)
77250
77288
  return undefined;
77251
- let roundValue = this._angleRoundOff.units.values().next().value;
77289
+ let roundValue = this._angleRoundOff.units.values().next().value ?? 0;
77252
77290
  if (this._angleRoundOff.units.size > 1) {
77253
77291
  // NOTE: Set isn't ordered, find smallest entry...
77254
77292
  this._angleRoundOff.units.forEach((thisRoundValue) => {
@@ -78761,6 +78799,8 @@ class AccuSnap {
78761
78799
  this.errorKey = out.reason;
78762
78800
  this.errorIcon.deactivate();
78763
78801
  const vp = ev.viewport;
78802
+ if (undefined === vp)
78803
+ return;
78764
78804
  let errorSprite;
78765
78805
  switch (out.snapStatus) {
78766
78806
  case _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.FilteredByApp:
@@ -79145,8 +79185,10 @@ class AccuSnap {
79145
79185
  // points not on the grid. This causes them to be "pulled" off the grid when they are accepted. On
79146
79186
  // the other hand, when NOT locating, we need to use the raw point so we can snap to elements
79147
79187
  // away from the grid.
79148
- const testPoint = this.isLocateEnabled ? ev.point : ev.rawPoint;
79149
79188
  const vp = ev.viewport;
79189
+ if (undefined === vp)
79190
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoElements;
79191
+ const testPoint = this.isLocateEnabled ? ev.point : ev.rawPoint;
79150
79192
  const picker = _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.picker;
79151
79193
  const options = _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.options.clone(); // Copy to avoid changing out from under active Tool...
79152
79194
  // NOTE: Since TestHit will use the same HitSource as the input hit we only need to sets this for DoPick...
@@ -79188,6 +79230,8 @@ class AccuSnap {
79188
79230
  }
79189
79231
  }
79190
79232
  const thisList = this.aSnapHits;
79233
+ if (undefined === thisList)
79234
+ return undefined;
79191
79235
  let thisHit;
79192
79236
  let firstRejected;
79193
79237
  const filterResponse = new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.LocateResponse();
@@ -79221,7 +79265,7 @@ class AccuSnap {
79221
79265
  // if we don't have any more candidate hits, get a new list at the current location
79222
79266
  if (!this.aSnapHits || (0 === this.aSnapHits.length)) {
79223
79267
  out.snapStatus = this.findHits(ev);
79224
- hit = (_ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success !== out.snapStatus) ? undefined : await this.getAccuSnapDetail(this.aSnapHits, out);
79268
+ hit = (_ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success !== out.snapStatus || undefined === this.aSnapHits) ? undefined : await this.getAccuSnapDetail(this.aSnapHits, out);
79225
79269
  }
79226
79270
  else {
79227
79271
  // drop the current hit from the list and then retest the list (without the dropped hit) to find the new snap
@@ -79248,13 +79292,16 @@ class AccuSnap {
79248
79292
  */
79249
79293
  async onMotion(ev) {
79250
79294
  this.clearToolTip(ev);
79295
+ const vp = ev.viewport;
79296
+ if (undefined === vp)
79297
+ return;
79251
79298
  const out = new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.LocateResponse();
79252
79299
  out.snapStatus = _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Disabled;
79253
79300
  let hit;
79254
79301
  if (this.isActive) {
79255
79302
  if (this._doSnapping) {
79256
79303
  out.snapStatus = this.findHits(ev);
79257
- hit = (_ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success !== out.snapStatus) ? undefined : await this.getAccuSnapDetail(this.aSnapHits, out);
79304
+ hit = (_ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success !== out.snapStatus || undefined === this.aSnapHits) ? undefined : await this.getAccuSnapDetail(this.aSnapHits, out);
79258
79305
  if (!this._doSnapping)
79259
79306
  hit = undefined; // Snap no longer requested...
79260
79307
  }
@@ -79269,7 +79316,7 @@ class AccuSnap {
79269
79316
  this.setCurrHit(hit);
79270
79317
  // set up active error before calling displayToolTip to indicate error or show locate message...
79271
79318
  this.showSnapError(out, ev);
79272
- this.displayToolTip(ev.viewPoint, ev.viewport, ev.rawPoint);
79319
+ this.displayToolTip(ev.viewPoint, vp, ev.rawPoint);
79273
79320
  if (undefined !== this.touchCursor && _tools_Tool__WEBPACK_IMPORTED_MODULE_6__.InputSource.Mouse === ev.inputSource) {
79274
79321
  this.touchCursor = undefined;
79275
79322
  _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.viewManager.invalidateDecorationsAllViews();
@@ -79867,7 +79914,7 @@ class AuxCoordSystem2dState extends AuxCoordSystemState {
79867
79914
  super(props, iModel);
79868
79915
  this.origin = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.fromJSON(props.origin);
79869
79916
  this.angle = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asDouble(props.angle);
79870
- this._rMatrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(this.angle));
79917
+ this._rMatrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(this.angle)) ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createIdentity();
79871
79918
  }
79872
79919
  toJSON() {
79873
79920
  const val = super.toJSON();
@@ -83002,6 +83049,7 @@ class SectionAttachment {
83002
83049
  is3d: true,
83003
83050
  scale: { x: 1, y: 1 },
83004
83051
  },
83052
+ contours: view.getDisplayStyle3d().settings.contours
83005
83053
  };
83006
83054
  this._viewFlagOverrides = { ...view.viewFlags, lighting: false, shadows: false };
83007
83055
  // Save off the original frustum (potentially adjusted by viewport).
@@ -114396,7 +114444,7 @@ class BatchUniforms {
114396
114444
  this._sensors.bindTexture(uniform);
114397
114445
  }
114398
114446
  get wantContourLines() {
114399
- const contours = this._target.plan.contours;
114447
+ const contours = this._target.currentBranch.contourLine;
114400
114448
  return undefined !== contours && contours.displayContours && contours.groups.length > 0;
114401
114449
  }
114402
114450
  bindContourLUT(uniform) {
@@ -114528,6 +114576,7 @@ class BranchStack {
114528
114576
  viewFlags: new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ViewFlags(),
114529
114577
  transform: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity(),
114530
114578
  edgeSettings: _EdgeSettings__WEBPACK_IMPORTED_MODULE_5__.EdgeSettings.create(undefined),
114579
+ contourLine: undefined,
114531
114580
  is3d: true,
114532
114581
  symbologyOverrides: new _render_FeatureSymbology__WEBPACK_IMPORTED_MODULE_3__.FeatureSymbology.Overrides(),
114533
114582
  });
@@ -114556,9 +114605,9 @@ class BranchStack {
114556
114605
  this._stack.pop();
114557
114606
  }
114558
114607
  }
114559
- changeRenderPlan(vf, is3d, hline) {
114608
+ changeRenderPlan(vf, is3d, hline, contour) {
114560
114609
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(1 === this.length);
114561
- this.top.changeRenderPlan(vf, is3d, hline);
114610
+ this.top.changeRenderPlan(vf, is3d, hline, contour);
114562
114611
  }
114563
114612
  setSymbologyOverrides(ovrs) {
114564
114613
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(1 === this.length);
@@ -114621,16 +114670,18 @@ class BranchState {
114621
114670
  get inSectionDrawingAttachment() { return this._opts.inSectionDrawingAttachment; }
114622
114671
  get groupNodeId() { return this._opts.groupNodeId; }
114623
114672
  get disableClipStyle() { return this._opts.disableClipStyle; }
114673
+ get contourLine() { return this._opts.contourLine; }
114624
114674
  get symbologyOverrides() {
114625
114675
  return this._opts.symbologyOverrides;
114626
114676
  }
114627
114677
  set symbologyOverrides(ovrs) {
114628
114678
  this._opts.symbologyOverrides = ovrs;
114629
114679
  }
114630
- changeRenderPlan(viewFlags, is3d, hline) {
114680
+ changeRenderPlan(viewFlags, is3d, hline, contour) {
114631
114681
  this.viewFlags = viewFlags;
114632
114682
  this._opts.is3d = is3d;
114633
114683
  this.edgeSettings.init(hline);
114684
+ this._opts.contourLine = contour;
114634
114685
  }
114635
114686
  /** Create a BranchState from a Branch. Any properties not explicitly specified by the new Branch are inherited from the previous BranchState. */
114636
114687
  static fromBranch(prev, branch) {
@@ -114655,6 +114706,7 @@ class BranchState {
114655
114706
  inSectionDrawingAttachment: branch.inSectionDrawingAttachment ?? prev.inSectionDrawingAttachment,
114656
114707
  groupNodeId: branch.branch.groupNodeId ?? prev.groupNodeId,
114657
114708
  disableClipStyle: branch.disableClipStyle ?? prev.disableClipStyle,
114709
+ contourLine: branch.contourLine ?? prev.contourLine,
114658
114710
  });
114659
114711
  }
114660
114712
  getFeatureAppearance(overrides, elemLo, elemHi, subcatLo, subcatHi, geomClass, modelLo, modelHi, type, animationNodeId) {
@@ -114817,8 +114869,8 @@ class BranchUniforms {
114817
114869
  this._viewClipEnabled = false;
114818
114870
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)((this._target.isReadPixelsInProgress ? 2 : 1) === this._stack.length);
114819
114871
  }
114820
- changeRenderPlan(vf, is3d, hline) {
114821
- this._stack.changeRenderPlan(vf, is3d, hline);
114872
+ changeRenderPlan(vf, is3d, hline, contourLine) {
114873
+ this._stack.changeRenderPlan(vf, is3d, hline, contourLine);
114822
114874
  }
114823
114875
  updateViewClip(clip, style) {
114824
114876
  this.clipStack.setViewClip(clip, style);
@@ -116580,12 +116632,11 @@ class ContourUniforms {
116580
116632
  this._contourDefs[startNdx + offset + 1] = majorIntervalCount < 1.0 ? 1.0 : majorIntervalCount;
116581
116633
  }
116582
116634
  update(target) {
116583
- const plan = target.plan;
116584
- if (this.contourDisplay && plan.contours && this.contourDisplay.equals(plan.contours)) {
116635
+ if (this.contourDisplay && target.currentContours && this.contourDisplay.equals(target.currentContours)) {
116585
116636
  return;
116586
116637
  }
116587
116638
  (0,_Sync__WEBPACK_IMPORTED_MODULE_1__.desync)(this);
116588
- this._contourDisplay = plan.contours;
116639
+ this._contourDisplay = target.currentContours;
116589
116640
  if (undefined === this.contourDisplay)
116590
116641
  return;
116591
116642
  /* uniform packing for contourDefs:
@@ -116675,14 +116726,14 @@ class Contours {
116675
116726
  return target === this.target && this._numFeatures === map.numFeatures;
116676
116727
  }
116677
116728
  matchesSubCategories() {
116678
- if (this._contours === undefined && this.target.plan.contours === undefined)
116729
+ if (this._contours === undefined && this.target.currentContours === undefined)
116679
116730
  return true;
116680
- if (this._contours === undefined || this.target.plan.contours === undefined)
116731
+ if (this._contours === undefined || this.target.currentContours === undefined)
116681
116732
  return false;
116682
- if (this._contours.groups.length !== this.target.plan.contours.groups.length)
116733
+ if (this._contours.groups.length !== this.target.currentContours.groups.length)
116683
116734
  return false;
116684
116735
  for (let index = 0, len = this._contours.groups.length; index < len && index < _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ContourDisplay.maxContourGroups; ++index) {
116685
- if (!this._contours.groups[index].subCategoriesEqual(this.target.plan.contours.groups[index]))
116736
+ if (!this._contours.groups[index].subCategoriesEqual(this.target.currentContours.groups[index]))
116686
116737
  return false;
116687
116738
  }
116688
116739
  return true;
@@ -116696,14 +116747,14 @@ class Contours {
116696
116747
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(width * height * 8 >= this._numFeatures);
116697
116748
  const data = new Uint8Array(width * height * 4);
116698
116749
  const creator = new _Texture__WEBPACK_IMPORTED_MODULE_5__.Texture2DDataUpdater(data);
116699
- this.buildLookupTable(creator, map, this.target.plan.contours);
116750
+ this.buildLookupTable(creator, map, this.target.currentContours);
116700
116751
  this._lut = _Texture__WEBPACK_IMPORTED_MODULE_5__.TextureHandle.createForData(width, height, data, true, _GL__WEBPACK_IMPORTED_MODULE_2__.GL.Texture.WrapMode.ClampToEdge);
116701
116752
  this._lutWidth = width;
116702
116753
  }
116703
116754
  _update(map, lut) {
116704
116755
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(this._numFeatures === map.numFeatures);
116705
116756
  const updater = new _Texture__WEBPACK_IMPORTED_MODULE_5__.Texture2DDataUpdater(lut.dataBytes);
116706
- this.buildLookupTable(updater, map, this.target.plan.contours);
116757
+ this.buildLookupTable(updater, map, this.target.currentContours);
116707
116758
  lut.update(updater);
116708
116759
  }
116709
116760
  buildLookupTable(data, map, contours) {
@@ -116741,7 +116792,7 @@ class Contours {
116741
116792
  constructor(target, options) {
116742
116793
  this.target = target;
116743
116794
  this._options = options;
116744
- this._contours = target.plan.contours;
116795
+ this._contours = target.currentContours;
116745
116796
  }
116746
116797
  static createFromTarget(target, options) {
116747
116798
  return new Contours(target, options);
@@ -116758,7 +116809,7 @@ class Contours {
116758
116809
  update(features) {
116759
116810
  if (this.matchesSubCategories())
116760
116811
  return;
116761
- this._contours = this.target.plan.contours;
116812
+ this._contours = this.target.currentContours;
116762
116813
  // _lut can be undefined if context was lost, (gl.createTexture returns null)
116763
116814
  if (this._lut) {
116764
116815
  this._update(features, this._lut);
@@ -119523,6 +119574,7 @@ class Branch extends Graphic {
119523
119574
  inSectionDrawingAttachment;
119524
119575
  disableClipStyle;
119525
119576
  transformFromExternalIModel;
119577
+ contourLine;
119526
119578
  constructor(branch, localToWorld, viewFlags, opts) {
119527
119579
  super();
119528
119580
  this.branch = branch;
@@ -119539,6 +119591,7 @@ class Branch extends Graphic {
119539
119591
  this.inSectionDrawingAttachment = opts.inSectionDrawingAttachment;
119540
119592
  this.disableClipStyle = opts.disableClipStyle;
119541
119593
  this.transformFromExternalIModel = opts.transformFromIModel;
119594
+ this.contourLine = opts.contours;
119542
119595
  if (opts.hline)
119543
119596
  this.edgeSettings = _EdgeSettings__WEBPACK_IMPORTED_MODULE_6__.EdgeSettings.create(opts.hline);
119544
119597
  if (opts.classifierOrDrape instanceof _PlanarClassifier__WEBPACK_IMPORTED_MODULE_8__.PlanarClassifier)
@@ -126519,7 +126572,7 @@ class Compositor extends SceneCompositor {
126519
126572
  }
126520
126573
  readContours(rect) {
126521
126574
  // Are we actually drawing any contours? If not, don't bother reading an array of all zeroes off the GPU.
126522
- const contours = this.target.plan.contours;
126575
+ const contours = this.target.currentContours;
126523
126576
  if (!contours || !contours.displayContours || contours.groups.length === 0) {
126524
126577
  return undefined;
126525
126578
  }
@@ -126697,6 +126750,7 @@ class Compositor extends SceneCompositor {
126697
126750
  iModel: top.iModel,
126698
126751
  is3d: top.is3d,
126699
126752
  edgeSettings: top.edgeSettings,
126753
+ contourLine: top.contourLine,
126700
126754
  });
126701
126755
  this._vcSetStencilRenderState = new _RenderState__WEBPACK_IMPORTED_MODULE_14__.RenderState();
126702
126756
  this._vcCopyZRenderState = new _RenderState__WEBPACK_IMPORTED_MODULE_14__.RenderState();
@@ -131169,6 +131223,7 @@ class Target extends _render_RenderTarget__WEBPACK_IMPORTED_MODULE_7__.RenderTar
131169
131223
  const drape = this.currentTextureDrape;
131170
131224
  return undefined === drape ? this.currentPlanarClassifier : drape;
131171
131225
  }
131226
+ get currentContours() { return this.currentBranch.contourLine; }
131172
131227
  modelToView(modelPt, result) {
131173
131228
  return this.uniforms.branch.modelViewMatrix.multiplyPoint3dQuietNormalize(modelPt, result);
131174
131229
  }
@@ -131379,7 +131434,7 @@ class Target extends _render_RenderTarget__WEBPACK_IMPORTED_MODULE_7__.RenderTar
131379
131434
  this._wantAmbientOcclusion = false;
131380
131435
  vf = vf.with("ambientOcclusion", false);
131381
131436
  }
131382
- this.uniforms.branch.changeRenderPlan(vf, plan.is3d, plan.hline);
131437
+ this.uniforms.branch.changeRenderPlan(vf, plan.is3d, plan.hline, plan.contours);
131383
131438
  this.changeFrustum(plan.frustum, plan.fraction, plan.is3d);
131384
131439
  this.uniforms.thematic.update(this);
131385
131440
  this.uniforms.contours.update(this);
@@ -131678,6 +131733,7 @@ class Target extends _render_RenderTarget__WEBPACK_IMPORTED_MODULE_7__.RenderTar
131678
131733
  edgeSettings: top.edgeSettings,
131679
131734
  transform: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity(),
131680
131735
  clipVolume: top.clipVolume,
131736
+ contourLine: top.contourLine,
131681
131737
  });
131682
131738
  this.pushState(state);
131683
131739
  // Repopulate the command list, omitting non-pickable decorations and putting transparent stuff into the opaque passes.
@@ -148757,7 +148813,7 @@ var RealityTreeId;
148757
148813
  function compareWithoutModelId(lhs, rhs) {
148758
148814
  return (compareRealityDataSourceKeys(lhs.rdSourceKey, rhs.rdSourceKey) ||
148759
148815
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareBooleans)(lhs.deduplicateVertices, rhs.deduplicateVertices) ||
148760
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareBooleansOrUndefined)(lhs.produceGeometry, rhs.produceGeometry) ||
148816
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStringsOrUndefined)(lhs.produceGeometry, rhs.produceGeometry) ||
148761
148817
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStringsOrUndefined)(lhs.maskModelIds, rhs.maskModelIds) ||
148762
148818
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.comparePossiblyUndefined)((ltf, rtf) => compareTransforms(ltf, rtf), lhs.transform, rhs.transform));
148763
148819
  }
@@ -148951,10 +149007,11 @@ class RealityModelTileTreeParams {
148951
149007
  loader;
148952
149008
  rootTile;
148953
149009
  baseUrl;
149010
+ reprojectGeometry;
148954
149011
  get location() { return this.loader.tree.location; }
148955
149012
  get yAxisUp() { return this.loader.tree.yAxisUp; }
148956
149013
  get priority() { return this.loader.priority; }
148957
- constructor(tileTreeId, iModel, modelId, loader, gcsConverterAvailable, rootToEcef, baseUrl) {
149014
+ constructor(tileTreeId, iModel, modelId, loader, gcsConverterAvailable, rootToEcef, baseUrl, reprojectGeometry) {
148958
149015
  this.gcsConverterAvailable = gcsConverterAvailable;
148959
149016
  this.rootToEcef = rootToEcef;
148960
149017
  this.loader = loader;
@@ -148970,6 +149027,7 @@ class RealityModelTileTreeParams {
148970
149027
  usesGeometricError: loader.tree.usesGeometricError,
148971
149028
  });
148972
149029
  this.baseUrl = baseUrl;
149030
+ this.reprojectGeometry = reprojectGeometry;
148973
149031
  }
148974
149032
  }
148975
149033
  class RealityModelTileProps {
@@ -149076,7 +149134,7 @@ class RealityModelTileLoader extends _tile_internal__WEBPACK_IMPORTED_MODULE_8__
149076
149134
  _viewFlagOverrides;
149077
149135
  _deduplicateVertices;
149078
149136
  constructor(tree, batchedIdMap, opts) {
149079
- super(opts?.produceGeometry ?? false);
149137
+ super(opts?.produceGeometry);
149080
149138
  this.tree = tree;
149081
149139
  this._batchedIdMap = batchedIdMap;
149082
149140
  this._deduplicateVertices = opts?.deduplicateVertices ?? false;
@@ -149308,9 +149366,9 @@ class RealityModelTileTree extends _tile_internal__WEBPACK_IMPORTED_MODULE_8__.R
149308
149366
  const props = await getTileTreeProps(rdSource, tilesetToDb, iModel);
149309
149367
  const loader = new RealityModelTileLoader(props, new _tile_internal__WEBPACK_IMPORTED_MODULE_8__.BatchedTileIdMap(iModel), opts);
149310
149368
  const gcsConverterAvailable = await (0,_tile_internal__WEBPACK_IMPORTED_MODULE_8__.getGcsConverterAvailable)(iModel);
149311
- //The full tileset url is needed so that it includes the url's search parameters if any are present
149369
+ // The full tileset url is needed so that it includes the url's search parameters if any are present
149312
149370
  const baseUrl = rdSource instanceof _RealityDataSourceTilesetUrlImpl__WEBPACK_IMPORTED_MODULE_9__.RealityDataSourceTilesetUrlImpl ? rdSource.getTilesetUrl() : undefined;
149313
- const params = new RealityModelTileTreeParams(tileTreeId, iModel, modelId, loader, gcsConverterAvailable, props.tilesetToEcef, baseUrl);
149371
+ const params = new RealityModelTileTreeParams(tileTreeId, iModel, modelId, loader, gcsConverterAvailable, props.tilesetToEcef, baseUrl, opts?.produceGeometry === "reproject");
149314
149372
  return new RealityModelTileTree(params);
149315
149373
  }
149316
149374
  return undefined;
@@ -149404,14 +149462,14 @@ class RealityTreeReference extends RealityModelTileTree.Reference {
149404
149462
  get treeOwner() {
149405
149463
  return realityTreeSupplier.getOwner(this.createTreeId(this.modelId), this.iModel);
149406
149464
  }
149407
- _createGeometryTreeReference() {
149465
+ _createGeometryTreeReference(options) {
149408
149466
  const ref = new RealityTreeReference({
149409
149467
  iModel: this.iModel,
149410
149468
  modelId: this.modelId,
149411
149469
  source: this._source,
149412
149470
  rdSourceKey: this._rdSourceKey,
149413
149471
  name: this._name,
149414
- produceGeometry: true,
149472
+ produceGeometry: options?.reprojectGeometry ? "reproject" : "yes",
149415
149473
  getDisplaySettings: () => _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RealityModelDisplaySettings.defaults,
149416
149474
  });
149417
149475
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== ref.collectTileGeometry);
@@ -149642,7 +149700,7 @@ class RealityTileLoader {
149642
149700
  const blob = data;
149643
149701
  const streamBuffer = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.ByteStream.fromUint8Array(blob);
149644
149702
  const realityTile = tile;
149645
- return this._produceGeometry ? this.loadGeometryFromStream(realityTile, streamBuffer, system) : this.loadGraphicsFromStream(realityTile, streamBuffer, system, isCanceled);
149703
+ return (this._produceGeometry && this._produceGeometry !== "no") ? this.loadGeometryFromStream(realityTile, streamBuffer, system) : this.loadGraphicsFromStream(realityTile, streamBuffer, system, isCanceled);
149646
149704
  }
149647
149705
  _getFormat(streamBuffer) {
149648
149706
  const position = streamBuffer.curPos;
@@ -149658,7 +149716,15 @@ class RealityTileLoader {
149658
149716
  const reader = _tile_internal__WEBPACK_IMPORTED_MODULE_7__.B3dmReader.create(streamBuffer, iModel, modelId, is3d, tile.contentRange, system, yAxisUp, tile.isLeaf, tile.center, tile.transformToRoot, undefined, this.getBatchIdMap());
149659
149717
  if (reader)
149660
149718
  reader.defaultWrapMode = _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_6__.GltfWrapMode.ClampToEdge;
149661
- return { geometry: reader?.readGltfAndCreateGeometry(tile.tree.iModelTransform) };
149719
+ const geom = reader?.readGltfAndCreateGeometry(tile.tree.iModelTransform);
149720
+ const xForm = tile.reprojectionTransform;
149721
+ if (tile.tree.reprojectGeometry && geom?.polyfaces && xForm) {
149722
+ const polyfaces = geom.polyfaces.map((pf) => pf.cloneTransformed(xForm));
149723
+ return { geometry: { polyfaces } };
149724
+ }
149725
+ else {
149726
+ return { geometry: geom };
149727
+ }
149662
149728
  }
149663
149729
  async loadGraphicsFromStream(tile, streamBuffer, system, isCanceled) {
149664
149730
  const format = this._getFormat(streamBuffer);
@@ -160602,6 +160668,12 @@ class RealityTile extends _internal__WEBPACK_IMPORTED_MODULE_5__.Tile {
160602
160668
  /** @internal */
160603
160669
  _copyright;
160604
160670
  /** @internal */
160671
+ tree;
160672
+ /** @internal */
160673
+ get reprojectionTransform() {
160674
+ return this._reprojectionTransform;
160675
+ }
160676
+ /** @internal */
160605
160677
  constructor(props, tree) {
160606
160678
  super(props, tree);
160607
160679
  this.transformToRoot = props.transformToRoot;
@@ -160610,6 +160682,7 @@ class RealityTile extends _internal__WEBPACK_IMPORTED_MODULE_5__.Tile {
160610
160682
  this.rangeCorners = props.rangeCorners;
160611
160683
  this.region = props.region;
160612
160684
  this._geometricError = props.geometricError;
160685
+ this.tree = tree;
160613
160686
  if (undefined === this.transformToRoot)
160614
160687
  return;
160615
160688
  // Can transform be non-rigid?? -- if so would have to handle (readonly) radius.
@@ -161270,6 +161343,9 @@ class RealityTileTree extends _internal__WEBPACK_IMPORTED_MODULE_6__.TileTree {
161270
161343
  _ecefToDb;
161271
161344
  /** @internal */
161272
161345
  baseUrl;
161346
+ /** If set to true, tile geometry will be reprojected using the tile's reprojection transform when geometry is collected.
161347
+ * @internal */
161348
+ reprojectGeometry;
161273
161349
  /** @internal */
161274
161350
  constructor(params) {
161275
161351
  super(params);
@@ -161288,6 +161364,7 @@ class RealityTileTree extends _internal__WEBPACK_IMPORTED_MODULE_6__.TileTree {
161288
161364
  }
161289
161365
  }
161290
161366
  this.baseUrl = params.baseUrl;
161367
+ this.reprojectGeometry = params.reprojectGeometry;
161291
161368
  }
161292
161369
  /** The mapping of per-feature JSON properties from this tile tree's batch table, if one is defined.
161293
161370
  * @beta
@@ -164653,6 +164730,10 @@ var TileGraphicType;
164653
164730
  * @extensions
164654
164731
  */
164655
164732
  class TileTreeReference /* implements RenderMemory.Consumer */ {
164733
+ /** If set to true, tile geometry will be reprojected using the tile's reprojection transform when geometry is collected from the referenced TileTree.
164734
+ * @internal
164735
+ */
164736
+ reprojectGeometry;
164656
164737
  /** Force a new tree owner / tile tree to be created for the current tile tree reference
164657
164738
  * @internal
164658
164739
  */
@@ -164848,7 +164929,7 @@ class TileTreeReference /* implements RenderMemory.Consumer */ {
164848
164929
  * Return `undefined` if geometry collection is not supported.
164849
164930
  * @see [[createGeometryTreeReference]].
164850
164931
  */
164851
- _createGeometryTreeReference() {
164932
+ _createGeometryTreeReference(_options) {
164852
164933
  return undefined;
164853
164934
  }
164854
164935
  /** If defined, supplies the implementation of [[GeometryTileTreeReference.collectTileGeometry]].
@@ -164873,12 +164954,14 @@ class TileTreeReference /* implements RenderMemory.Consumer */ {
164873
164954
  * Currently, only terrain and reality model tiles support geometry collection.
164874
164955
  * @note Do not override this method - override [[_createGeometryTreeReference]] instead.
164875
164956
  */
164876
- createGeometryTreeReference() {
164957
+ createGeometryTreeReference(options) {
164877
164958
  if (this.collectTileGeometry) {
164878
164959
  // Unclear why compiler doesn't detect that `this` satisfies the GeometryTileTreeReference interface...it must be looking only at the types, not this particular instance.
164879
- return this;
164960
+ const ref = this;
164961
+ ref.reprojectGeometry = options?.reprojectGeometry;
164962
+ return ref;
164880
164963
  }
164881
- return this._createGeometryTreeReference();
164964
+ return this._createGeometryTreeReference(options);
164882
164965
  }
164883
164966
  /** Create a [[TileTreeReference]] that displays a pre-defined [[RenderGraphic]].
164884
164967
  * The reference can be used to add dynamic content to a [[Viewport]]'s scene as a [[TiledGraphicsProvider]], as in the following example:
@@ -172774,6 +172857,8 @@ class ViewClipTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitive
172774
172857
  zHigh = projection;
172775
172858
  }
172776
172859
  }
172860
+ if (undefined === zLow || undefined === zHigh)
172861
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range1d.createNull();
172777
172862
  return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range1d.createXX(zLow, zHigh);
172778
172863
  }
172779
172864
  /** @internal */
@@ -173082,8 +173167,11 @@ class ViewClipByShapeTool extends ViewClipTool {
173082
173167
  points.push(pt.clone());
173083
173168
  if (undefined === this._matrix)
173084
173169
  return points;
173170
+ const vp = ev.viewport;
173171
+ if (undefined === vp)
173172
+ return points;
173085
173173
  const normal = this._matrix.getColumn(2);
173086
- let currentPt = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToPlaneInView(ev.point, points[0], normal, ev.viewport, true);
173174
+ let currentPt = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToPlaneInView(ev.point, points[0], normal, vp, true);
173087
173175
  if (undefined === currentPt)
173088
173176
  currentPt = ev.point.clone();
173089
173177
  if (2 === points.length && !ev.isControlKey) {
@@ -173092,7 +173180,7 @@ class ViewClipByShapeTool extends ViewClipTool {
173092
173180
  xDir.normalizeInPlace();
173093
173181
  const yDir = xDir.crossProduct(normal);
173094
173182
  yDir.normalizeInPlace();
173095
- const cornerPt = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToLineInView(currentPt, points[1], yDir, ev.viewport, true);
173183
+ const cornerPt = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToLineInView(currentPt, points[1], yDir, vp, true);
173096
173184
  if (undefined !== cornerPt) {
173097
173185
  points.push(cornerPt);
173098
173186
  cornerPt.plusScaled(xDir, -xLen, currentPt);
@@ -173159,7 +173247,8 @@ class ViewClipByShapeTool extends ViewClipTool {
173159
173247
  return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.No;
173160
173248
  const currPt = ev.point.clone();
173161
173249
  if (this._points.length > 0) {
173162
- const planePt = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToPlaneInView(currPt, this._points[0], this._matrix.getColumn(2), ev.viewport, true);
173250
+ const vp = ev.viewport;
173251
+ const planePt = (vp ? _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToPlaneInView(currPt, this._points[0], this._matrix.getColumn(2), vp, true) : undefined);
173163
173252
  if (undefined !== planePt)
173164
173253
  currPt.setFrom(planePt);
173165
173254
  }
@@ -173685,6 +173774,8 @@ class ViewClipDecoration extends _EditManipulator__WEBPACK_IMPORTED_MODULE_7__.E
173685
173774
  if (compressed.length < clipShape.polygon.length) {
173686
173775
  clip = clip.clone();
173687
173776
  clipShape = ViewClipTool.isSingleClipShape(clip);
173777
+ if (undefined === clipShape)
173778
+ return false;
173688
173779
  clipShape.setPolygon(compressed);
173689
173780
  this._clipView.view.setViewClip(clip);
173690
173781
  }
@@ -174087,7 +174178,7 @@ class ViewClipDecoration extends _EditManipulator__WEBPACK_IMPORTED_MODULE_7__.E
174087
174178
  if (this._clipView !== vp)
174088
174179
  return;
174089
174180
  if (undefined !== this._clipShape) {
174090
- ViewClipTool.drawClipShape(context, this._clipShape, this._clipShapeExtents, _EditManipulator__WEBPACK_IMPORTED_MODULE_7__.EditManipulator.HandleUtils.adjustForBackgroundColor(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef.white, vp), 3, this._clipId);
174181
+ ViewClipTool.drawClipShape(context, this._clipShape, this._clipShapeExtents ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range1d.createNull(), _EditManipulator__WEBPACK_IMPORTED_MODULE_7__.EditManipulator.HandleUtils.adjustForBackgroundColor(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef.white, vp), 3, this._clipId);
174091
174182
  }
174092
174183
  else if (undefined !== this._clipPlanes) {
174093
174184
  if (undefined !== this._clipPlanesLoops)
@@ -174132,9 +174223,12 @@ class ViewClipDecoration extends _EditManipulator__WEBPACK_IMPORTED_MODULE_7__.E
174132
174223
  }
174133
174224
  }
174134
174225
  }
174135
- else if (undefined !== this._controls[iFace].floatingOrigin && vp.isPointVisibleXY(this._controls[iFace].floatingOrigin, _CoordSystem__WEBPACK_IMPORTED_MODULE_4__.CoordSystem.World, 0.1)) {
174136
- this._controls[iFace].origin.setFrom(this._controls[iFace].floatingOrigin);
174137
- this._controls[iFace].floatingOrigin = undefined;
174226
+ else {
174227
+ const floatingOrigin = this._controls[iFace].floatingOrigin;
174228
+ if (undefined !== floatingOrigin && vp.isPointVisibleXY(floatingOrigin, _CoordSystem__WEBPACK_IMPORTED_MODULE_4__.CoordSystem.World, 0.1)) {
174229
+ this._controls[iFace].origin.setFrom(this._controls[iFace].floatingOrigin);
174230
+ this._controls[iFace].floatingOrigin = undefined;
174231
+ }
174138
174232
  }
174139
174233
  }
174140
174234
  const anchorRay = ViewClipTool.getClipRayTransformed(this._controls[iFace].origin, this._controls[iFace].direction, undefined !== this._clipShape ? this._clipShape.transformFromClip : undefined);
@@ -174701,6 +174795,8 @@ class ElementAgenda {
174701
174795
  return;
174702
174796
  }
174703
174797
  const group = this.groupMarks.pop();
174798
+ if (undefined === group)
174799
+ return;
174704
174800
  this.setEntriesHiliteState(false, group.start, this.length); // make sure removed entries aren't left hilited...
174705
174801
  this.elements.splice(group.start);
174706
174802
  }
@@ -175823,8 +175919,11 @@ class IdleTool extends _Tool__WEBPACK_IMPORTED_MODULE_1__.InteractiveTool {
175823
175919
  return _Tool__WEBPACK_IMPORTED_MODULE_1__.EventHandled.Yes;
175824
175920
  }
175825
175921
  else if (ev.isDoubleTap) {
175922
+ const vp = ev.viewport;
175923
+ if (undefined === vp)
175924
+ return _Tool__WEBPACK_IMPORTED_MODULE_1__.EventHandled.No;
175826
175925
  // Fit view on single finger double tap.
175827
- const tool = new _ViewTool__WEBPACK_IMPORTED_MODULE_2__.FitViewTool(ev.viewport, true);
175926
+ const tool = new _ViewTool__WEBPACK_IMPORTED_MODULE_2__.FitViewTool(vp, true);
175828
175927
  return await tool.run() ? _Tool__WEBPACK_IMPORTED_MODULE_1__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_1__.EventHandled.No;
175829
175928
  }
175830
175929
  return _Tool__WEBPACK_IMPORTED_MODULE_1__.EventHandled.No;
@@ -176397,7 +176496,8 @@ class MeasureDistanceTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Pr
176397
176496
  if (undefined !== snap) {
176398
176497
  if (undefined !== snap.primitive) {
176399
176498
  const locDetail = snap.primitive.closestPoint(point, false);
176400
- if (undefined !== locDetail && (_HitDetail__WEBPACK_IMPORTED_MODULE_5__.HitGeomType.Segment === snap.geomType || snap.primitive.isInPlane(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Plane3dByOriginAndUnitNormal.create(point, undefined !== snap.normal ? snap.normal : normal)))) {
176499
+ const snapPlane = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Plane3dByOriginAndUnitNormal.create(point, undefined !== snap.normal ? snap.normal : normal);
176500
+ if (undefined !== locDetail && (_HitDetail__WEBPACK_IMPORTED_MODULE_5__.HitGeomType.Segment === snap.geomType || (snapPlane && snap.primitive.isInPlane(snapPlane)))) {
176401
176501
  const locRay = snap.primitive.fractionToPointAndUnitTangent(locDetail.fraction);
176402
176502
  tangent.setFrom(locRay.direction);
176403
176503
  if (undefined !== snap.normal)
@@ -176917,7 +177017,8 @@ class MeasureAreaByPointsTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9_
176917
177017
  return _Tool__WEBPACK_IMPORTED_MODULE_10__.EventHandled.No;
176918
177018
  const currPt = ev.point.clone();
176919
177019
  if (this._points.length > 0) {
176920
- const planePt = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToPlaneInView(currPt, this._points[0], this._matrix.getColumn(2), ev.viewport, true);
177020
+ const vp = ev.viewport;
177021
+ const planePt = (vp ? _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToPlaneInView(currPt, this._points[0], this._matrix.getColumn(2), vp, true) : undefined);
176921
177022
  if (undefined !== planePt)
176922
177023
  currPt.setFrom(planePt);
176923
177024
  }
@@ -177419,8 +177520,9 @@ class PrimitiveTool extends _Tool__WEBPACK_IMPORTED_MODULE_4__.InteractiveTool {
177419
177520
  if (view.isSpatialView() && this.targetView.view.isSpatialView())
177420
177521
  return true; // No specific target, two spatial views are considered compatible.
177421
177522
  let allowView = false;
177523
+ const targetView = this.targetView;
177422
177524
  view.forEachModel((model) => {
177423
- if (!allowView && this.targetView.view.viewsModel(model.id))
177525
+ if (!allowView && targetView.view.viewsModel(model.id))
177424
177526
  allowView = true;
177425
177527
  });
177426
177528
  return allowView; // Accept if this view shares a model in common with target.
@@ -179377,11 +179479,15 @@ class CurrentInputState {
179377
179479
  }
179378
179480
  updateDownPoint(ev) { this.button[ev.button].downUorPt = ev.point; }
179379
179481
  onButtonDown(button) {
179380
- const viewPt = this.viewport.worldToView(this.button[button].downRawPt);
179381
- const center = this.viewport.npcToView(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.NpcCenter);
179382
- viewPt.z = center.z;
179482
+ let isDoubleClick = false;
179383
179483
  const now = Date.now();
179384
- const isDoubleClick = ((now - this.button[button].downTime) < _ToolSettings__WEBPACK_IMPORTED_MODULE_14__.ToolSettings.doubleClickTimeout.milliseconds) && (viewPt.distance(this.viewPoint) < this.viewport.pixelsFromInches(_ToolSettings__WEBPACK_IMPORTED_MODULE_14__.ToolSettings.doubleClickToleranceInches));
179484
+ const vp = this.viewport;
179485
+ if (undefined !== vp) {
179486
+ const viewPt = vp.worldToView(this.button[button].downRawPt);
179487
+ const center = vp.npcToView(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.NpcCenter);
179488
+ viewPt.z = center.z;
179489
+ isDoubleClick = ((now - this.button[button].downTime) < _ToolSettings__WEBPACK_IMPORTED_MODULE_14__.ToolSettings.doubleClickTimeout.milliseconds) && (viewPt.distance(this.viewPoint) < vp.pixelsFromInches(_ToolSettings__WEBPACK_IMPORTED_MODULE_14__.ToolSettings.doubleClickToleranceInches));
179490
+ }
179385
179491
  this.button[button].init(this.point, this.rawPoint, now, true, isDoubleClick, false, this.inputSource);
179386
179492
  this.lastButton = button;
179387
179493
  }
@@ -179460,10 +179566,13 @@ class CurrentInputState {
179460
179566
  return false;
179461
179567
  if ((Date.now() - state.downTime) <= _ToolSettings__WEBPACK_IMPORTED_MODULE_14__.ToolSettings.startDragDelay.milliseconds)
179462
179568
  return false;
179463
- const viewPt = this.viewport.worldToView(state.downRawPt);
179569
+ const vp = this.viewport;
179570
+ if (undefined === vp)
179571
+ return false;
179572
+ const viewPt = vp.worldToView(state.downRawPt);
179464
179573
  const deltaX = Math.abs(this._viewPoint.x - viewPt.x);
179465
179574
  const deltaY = Math.abs(this._viewPoint.y - viewPt.y);
179466
- return ((deltaX + deltaY) > this.viewport.pixelsFromInches(_ToolSettings__WEBPACK_IMPORTED_MODULE_14__.ToolSettings.startDragDistanceInches));
179575
+ return ((deltaX + deltaY) > vp.pixelsFromInches(_ToolSettings__WEBPACK_IMPORTED_MODULE_14__.ToolSettings.startDragDistanceInches));
179467
179576
  }
179468
179577
  }
179469
179578
  /** Controls the operation of [[Tool]]s, administering the current [[ViewTool]], [[PrimitiveTool]], and [[IdleTool]] and forwarding events to the appropriate tool.
@@ -179630,9 +179739,11 @@ class ToolAdmin {
179630
179739
  ToolAdmin._toolEvents = ToolAdmin._toolEvents.filter((ev) => ev.vp !== vp);
179631
179740
  }
179632
179741
  getMousePosition(event) {
179742
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
179633
179743
  return event.vp.mousePosFromEvent(event.ev);
179634
179744
  }
179635
179745
  getMouseMovement(event) {
179746
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
179636
179747
  return event.vp.mouseMovementFromEvent(event.ev);
179637
179748
  }
179638
179749
  getMouseButton(button) {
@@ -179644,6 +179755,7 @@ class ToolAdmin {
179644
179755
  }
179645
179756
  async onMouseButton(event, isDown) {
179646
179757
  const ev = event.ev;
179758
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
179647
179759
  const vp = event.vp;
179648
179760
  const pos = this.getMousePosition(event);
179649
179761
  const button = this.getMouseButton(ev.button);
@@ -179653,7 +179765,7 @@ class ToolAdmin {
179653
179765
  async onWheel(event) {
179654
179766
  const ev = event.ev;
179655
179767
  const vp = event.vp;
179656
- if (this.filterViewport(vp))
179768
+ if (undefined === vp || this.filterViewport(vp))
179657
179769
  return _Tool__WEBPACK_IMPORTED_MODULE_13__.EventHandled.Yes;
179658
179770
  const current = this.currentInputState;
179659
179771
  current.setKeyQualifiers(ev);
@@ -179686,7 +179798,9 @@ class ToolAdmin {
179686
179798
  return _Tool__WEBPACK_IMPORTED_MODULE_13__.EventHandled.Yes;
179687
179799
  }
179688
179800
  async sendTapEvent(touchEv) {
179689
- touchEv.viewport.setAnimator();
179801
+ const vp = touchEv.viewport;
179802
+ if (undefined !== vp)
179803
+ vp.setAnimator();
179690
179804
  const overlayHit = this.pickCanvasDecoration(touchEv);
179691
179805
  if (undefined !== overlayHit && undefined !== overlayHit.onMouseButton && overlayHit.onMouseButton(touchEv))
179692
179806
  return _Tool__WEBPACK_IMPORTED_MODULE_13__.EventHandled.Yes;
@@ -179713,7 +179827,7 @@ class ToolAdmin {
179713
179827
  async onTouch(event) {
179714
179828
  const touchEvent = event.ev;
179715
179829
  const vp = event.vp;
179716
- if (this.filterViewport(vp))
179830
+ if (undefined === vp || this.filterViewport(vp))
179717
179831
  return;
179718
179832
  const ev = new _Tool__WEBPACK_IMPORTED_MODULE_13__.BeTouchEvent({ touchEvent });
179719
179833
  const current = this.currentInputState;
@@ -179852,6 +179966,7 @@ class ToolAdmin {
179852
179966
  case "mouseup": return this.onMouseButton(event, false);
179853
179967
  case "mousemove": return this.onMouseMove(event);
179854
179968
  case "mouseover": return this.onMouseEnter(event);
179969
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
179855
179970
  case "mouseout": return this.onMouseLeave(event.vp);
179856
179971
  case "wheel": return this.onWheel(event);
179857
179972
  case "keydown": return this.onKeyTransition(event, true);
@@ -180028,6 +180143,8 @@ class ToolAdmin {
180028
180143
  }
180029
180144
  pickCanvasDecoration(ev) {
180030
180145
  const vp = ev.viewport;
180146
+ if (undefined === vp)
180147
+ return undefined;
180031
180148
  const decoration = (undefined === this.viewTool) ? vp.pickCanvasDecoration(ev.viewPoint) : undefined;
180032
180149
  this.setCanvasDecoration(vp, decoration, ev);
180033
180150
  return decoration;
@@ -180153,6 +180270,8 @@ class ToolAdmin {
180153
180270
  }
180154
180271
  async onMouseMove(event) {
180155
180272
  const vp = event.vp;
180273
+ if (undefined === vp)
180274
+ return;
180156
180275
  const pos = this.getMousePosition(event);
180157
180276
  const mov = this.getMouseMovement(event);
180158
180277
  // Sometimes the mouse goes down in a view, but we lose focus while its down so we never receive the up event.
@@ -180704,30 +180823,48 @@ class ToolAdmin {
180704
180823
  setAdjustedDataPoint(ev) { this.currentInputState.adjustLastDataPoint(ev); }
180705
180824
  /** Can be called by tools that wish to emulate mouse button down/up events for onTouchTap. */
180706
180825
  async convertTouchTapToButtonDownAndUp(ev, button = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeButton.Data) {
180826
+ const vp = ev.viewport;
180827
+ if (undefined === vp)
180828
+ return;
180707
180829
  const pt2d = ev.viewPoint;
180708
- await this.onButtonDown(ev.viewport, pt2d, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
180709
- return this.onButtonUp(ev.viewport, pt2d, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
180830
+ await this.onButtonDown(vp, pt2d, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
180831
+ return this.onButtonUp(vp, pt2d, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
180710
180832
  }
180711
180833
  /** Can be called by tools that wish to emulate moving the mouse with a button depressed for onTouchMoveStart.
180712
180834
  * @note Calls the tool's onMouseStartDrag method from onMotion.
180713
180835
  */
180714
180836
  async convertTouchMoveStartToButtonDownAndMotion(startEv, ev, button = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeButton.Data) {
180715
- await this.onButtonDown(startEv.viewport, startEv.viewPoint, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
180716
- return this.onMotion(ev.viewport, ev.viewPoint, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch, true);
180837
+ const startVp = startEv.viewport;
180838
+ if (undefined === startVp)
180839
+ return;
180840
+ const vp = ev.viewport;
180841
+ if (undefined === vp)
180842
+ return;
180843
+ await this.onButtonDown(startVp, startEv.viewPoint, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
180844
+ return this.onMotion(vp, ev.viewPoint, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch, true);
180717
180845
  }
180718
180846
  /** Can be called by tools that wish to emulate pressing the mouse button for onTouchStart or onTouchMoveStart. */
180719
180847
  async convertTouchStartToButtonDown(ev, button = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeButton.Data) {
180720
- return this.onButtonDown(ev.viewport, ev.viewPoint, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
180848
+ const vp = ev.viewport;
180849
+ if (undefined === vp)
180850
+ return;
180851
+ return this.onButtonDown(vp, ev.viewPoint, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
180721
180852
  }
180722
180853
  /** Can be called by tools that wish to emulate releasing the mouse button for onTouchEnd or onTouchComplete.
180723
180854
  * @note Calls the tool's onMouseEndDrag method if convertTouchMoveStartToButtonDownAndMotion was called for onTouchMoveStart.
180724
180855
  */
180725
180856
  async convertTouchEndToButtonUp(ev, button = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeButton.Data) {
180726
- return this.onButtonUp(ev.viewport, ev.viewPoint, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
180857
+ const vp = ev.viewport;
180858
+ if (undefined === vp)
180859
+ return;
180860
+ return this.onButtonUp(vp, ev.viewPoint, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
180727
180861
  }
180728
180862
  /** Can be called by tools that wish to emulate a mouse motion event for onTouchMove. */
180729
180863
  async convertTouchMoveToMotion(ev) {
180730
- return this.onMotion(ev.viewport, ev.viewPoint, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
180864
+ const vp = ev.viewport;
180865
+ if (undefined === vp)
180866
+ return;
180867
+ return this.onMotion(vp, ev.viewPoint, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
180731
180868
  }
180732
180869
  /** Can be called by tools to invoke their [[InteractiveTool.onDynamicFrame]] method without requiring a motion event. */
180733
180870
  simulateMotionEvent() {
@@ -181432,11 +181569,13 @@ class ViewingToolHandle {
181432
181569
  }
181433
181570
  // if we have a valid depth point, set the focus distance to
181434
181571
  changeFocusFromDepthPoint() {
181435
- if (undefined !== this._depthPoint) {
181436
- const view = this.viewTool.viewport.view;
181437
- if (view.is3d() && view.isCameraOn)
181438
- view.changeFocusFromPoint(this._depthPoint); // set the focus distance to the depth point
181439
- }
181572
+ if (undefined === this._depthPoint)
181573
+ return;
181574
+ const view = this.viewTool.viewport?.view;
181575
+ if (undefined === view)
181576
+ return;
181577
+ if (view.is3d() && view.isCameraOn)
181578
+ view.changeFocusFromPoint(this._depthPoint); // set the focus distance to the depth point
181440
181579
  }
181441
181580
  }
181442
181581
  /** @internal */
@@ -181926,11 +182065,15 @@ class ViewManip extends ViewTool {
181926
182065
  return inDynamics || (doUpdate && hitHandle.checkOneShot());
181927
182066
  }
181928
182067
  lensAngleMatches(angle, tolerance) {
181929
- const cameraView = this.viewport.view;
182068
+ const cameraView = this.viewport?.view;
182069
+ if (undefined === cameraView)
182070
+ return false;
181930
182071
  return !cameraView.is3d() ? false : Math.abs(cameraView.calcLensAngle().radians - angle.radians) < tolerance;
181931
182072
  }
181932
182073
  get isZUp() {
181933
- const view = this.viewport.view;
182074
+ const view = this.viewport?.view;
182075
+ if (undefined === view)
182076
+ return true;
181934
182077
  const viewX = view.getXVector();
181935
182078
  const viewY = view.getXVector();
181936
182079
  const zVec = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ();
@@ -182073,9 +182216,12 @@ class ViewTargetCenter extends ViewingToolHandle {
182073
182216
  testHandleForHit(ptScreen, out) {
182074
182217
  if (this.viewTool.isDraggingRequired)
182075
182218
  return false; // Target center handle is not movable in this mode, but it's still nice to display the point we're rotating about...
182076
- const targetPt = this.viewTool.viewport.worldToView(this.viewTool.targetCenterWorld);
182219
+ const vp = this.viewTool.viewport;
182220
+ if (undefined === vp)
182221
+ return false;
182222
+ const targetPt = vp.worldToView(this.viewTool.targetCenterWorld);
182077
182223
  const distance = targetPt.distanceXY(ptScreen);
182078
- const locateThreshold = this.viewTool.viewport.pixelsFromInches(0.15);
182224
+ const locateThreshold = vp.pixelsFromInches(0.15);
182079
182225
  if (distance > locateThreshold)
182080
182226
  return false;
182081
182227
  out.distance = distance;
@@ -182152,7 +182298,10 @@ class HandleWithInertia extends ViewingToolHandle {
182152
182298
  doManipulation(ev, inDynamics) {
182153
182299
  if (_ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.viewingInertia.enabled && !inDynamics && undefined !== this._inertiaVec)
182154
182300
  return this.beginAnimation();
182155
- const thisPtNpc = ev.viewport.worldToNpc(ev.point);
182301
+ const vp = ev.viewport;
182302
+ if (undefined === vp)
182303
+ return false;
182304
+ const thisPtNpc = vp.worldToNpc(ev.point);
182156
182305
  thisPtNpc.z = this._lastPtNpc.z;
182157
182306
  this._inertiaVec = undefined;
182158
182307
  if (this._lastPtNpc.isAlmostEqual(thisPtNpc, 1.0e-10))
@@ -182165,7 +182314,9 @@ class HandleWithInertia extends ViewingToolHandle {
182165
182314
  this._duration = _ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.viewingInertia.duration;
182166
182315
  if (this._duration.isTowardsFuture) { // ensure duration is towards future. Otherwise, don't start animation
182167
182316
  this._end = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeTimePoint.fromNow(this._duration);
182168
- this.viewTool.viewport.setAnimator(this);
182317
+ const vp = this.viewTool.viewport;
182318
+ if (undefined !== vp)
182319
+ vp.setAnimator(this);
182169
182320
  }
182170
182321
  return true;
182171
182322
  }
@@ -182179,7 +182330,10 @@ class HandleWithInertia extends ViewingToolHandle {
182179
182330
  const pt = this._lastPtNpc.plusScaled(this._inertiaVec, remaining);
182180
182331
  // if we're not moving any more, or if the duration has elapsed, we're done
182181
182332
  if (remaining <= 0 || (this._lastPtNpc.minus(pt).magnitudeSquared() < .000001)) {
182182
- this.viewTool.viewport.saveViewUndo();
182333
+ const vp = this.viewTool.viewport;
182334
+ if (undefined === vp)
182335
+ return false;
182336
+ vp.saveViewUndo();
182183
182337
  return true; // remove this as the animator
182184
182338
  }
182185
182339
  this.perform(pt); // perform the viewing operation
@@ -182193,10 +182347,12 @@ class ViewPan extends HandleWithInertia {
182193
182347
  get handleType() { return ViewHandleType.Pan; }
182194
182348
  getHandleCursor() { return this.viewTool.inHandleModify ? _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.viewManager.grabbingCursor : _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.viewManager.grabCursor; }
182195
182349
  firstPoint(ev) {
182350
+ this._inertiaVec = undefined;
182196
182351
  const tool = this.viewTool;
182197
182352
  const vp = tool.viewport;
182353
+ if (undefined === vp)
182354
+ return false;
182198
182355
  vp.worldToNpc(ev.point, this._lastPtNpc);
182199
- this._inertiaVec = undefined;
182200
182356
  // if the camera is on, we need to find the element under the starting point to get the z
182201
182357
  if (this.needDepthPoint(ev, false)) {
182202
182358
  this.pickDepthPoint(ev);
@@ -182218,6 +182374,8 @@ class ViewPan extends HandleWithInertia {
182218
182374
  perform(thisPtNpc) {
182219
182375
  const tool = this.viewTool;
182220
182376
  const vp = tool.viewport;
182377
+ if (undefined === vp)
182378
+ return false;
182221
182379
  const view = vp.view;
182222
182380
  const lastWorld = vp.npcToWorld(this._lastPtNpc);
182223
182381
  const thisWorld = vp.npcToWorld(thisPtNpc);
@@ -182236,7 +182394,10 @@ class ViewPan extends HandleWithInertia {
182236
182394
  }
182237
182395
  /** @internal */
182238
182396
  needDepthPoint(ev, _isPreview) {
182239
- return ev.viewport.isCameraOn && _Tool__WEBPACK_IMPORTED_MODULE_18__.CoordSource.User === ev.coordsFrom;
182397
+ const vp = ev.viewport;
182398
+ if (undefined === vp)
182399
+ return false;
182400
+ return vp.isCameraOn && _Tool__WEBPACK_IMPORTED_MODULE_18__.CoordSource.User === ev.coordsFrom;
182240
182401
  }
182241
182402
  }
182242
182403
  /** ViewingToolHandle for performing the "rotate view" operation */
@@ -182255,6 +182416,8 @@ class ViewRotate extends HandleWithInertia {
182255
182416
  this._inertiaVec = undefined;
182256
182417
  const tool = this.viewTool;
182257
182418
  const vp = ev.viewport;
182419
+ if (undefined === vp)
182420
+ return false;
182258
182421
  this.pickDepthPoint(ev);
182259
182422
  if (undefined !== this._depthPoint)
182260
182423
  tool.setTargetCenterWorld(this._depthPoint, false, false);
@@ -182269,6 +182432,8 @@ class ViewRotate extends HandleWithInertia {
182269
182432
  perform(ptNpc) {
182270
182433
  const tool = this.viewTool;
182271
182434
  const vp = tool.viewport;
182435
+ if (undefined === vp)
182436
+ return false;
182272
182437
  if (this._anchorPtNpc.isAlmostEqual(ptNpc, 1.0e-2)) // too close to anchor pt
182273
182438
  ptNpc.setFrom(this._anchorPtNpc);
182274
182439
  const currentFrustum = vp.getFrustum(_CoordSystem__WEBPACK_IMPORTED_MODULE_6__.CoordSystem.World, false);
@@ -182304,8 +182469,8 @@ class ViewRotate extends HandleWithInertia {
182304
182469
  const xAxis = _ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.preserveWorldUp && !vp.viewingGlobe ? (undefined !== this._depthPoint ? vp.view.getUpVector(this._depthPoint) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ()) : vp.rotation.getRow(1);
182305
182470
  // Movement in screen y == rotation about screen X...
182306
182471
  const yAxis = vp.rotation.getRow(0);
182307
- const xRMatrix = xDelta ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(xAxis, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(Math.PI / (viewRect.width / xDelta))) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity;
182308
- const yRMatrix = yDelta ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(yAxis, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(Math.PI / (viewRect.height / yDelta))) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity;
182472
+ const xRMatrix = (xDelta ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(xAxis, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(Math.PI / (viewRect.width / xDelta))) : undefined) ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity;
182473
+ const yRMatrix = (yDelta ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(yAxis, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(Math.PI / (viewRect.height / yDelta))) : undefined) ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity;
182309
182474
  const worldRMatrix = yRMatrix.multiplyMatrixMatrix(xRMatrix);
182310
182475
  const result = worldRMatrix.getAxisAndAngleOfRotation();
182311
182476
  angle = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(-result.angle.radians);
@@ -182336,11 +182501,14 @@ class ViewRotate extends HandleWithInertia {
182336
182501
  }
182337
182502
  /** @internal */
182338
182503
  needDepthPoint(ev, _isPreview) {
182339
- return (!this.viewTool.targetCenterLocked && ev.viewport.view.allow3dManipulations());
182504
+ const vp = ev.viewport;
182505
+ if (undefined === vp)
182506
+ return false;
182507
+ return (!this.viewTool.targetCenterLocked && vp.view.allow3dManipulations());
182340
182508
  }
182341
182509
  /** @internal */
182342
182510
  adjustDepthPoint(isValid, vp, plane, source) {
182343
- if (vp.viewingGlobe && this.viewTool.isPointVisible(vp.iModel.ecefLocation.earthCenter)) {
182511
+ if (vp.viewingGlobe && vp.iModel.ecefLocation && this.viewTool.isPointVisible(vp.iModel.ecefLocation.earthCenter)) {
182344
182512
  plane.getOriginRef().setFrom(vp.iModel.ecefLocation.earthCenter);
182345
182513
  plane.getNormalRef().setFrom(vp.view.getZVector());
182346
182514
  return true;
@@ -182367,6 +182535,8 @@ class ViewLook extends ViewingToolHandle {
182367
182535
  firstPoint(ev) {
182368
182536
  const tool = this.viewTool;
182369
182537
  const vp = ev.viewport;
182538
+ if (undefined === vp)
182539
+ return true;
182370
182540
  const view = vp.view;
182371
182541
  if (!view || !view.is3d() || !view.allow3dManipulations())
182372
182542
  return false;
@@ -182391,11 +182561,13 @@ class ViewLook extends ViewingToolHandle {
182391
182561
  doManipulation(ev, _inDynamics) {
182392
182562
  const tool = this.viewTool;
182393
182563
  const viewport = tool.viewport;
182564
+ if (undefined === viewport)
182565
+ return false;
182394
182566
  if (ev.viewport !== viewport)
182395
182567
  return false;
182396
182568
  const worldTransform = this.getLookTransform(viewport, this._firstPtView, ev.viewPoint);
182397
182569
  const frustum = this._frustum.transformBy(worldTransform);
182398
- this.viewTool.viewport.setupViewFromFrustum(frustum);
182570
+ viewport.setupViewFromFrustum(frustum);
182399
182571
  return true;
182400
182572
  }
182401
182573
  getLookTransform(vp, firstPt, currPt) {
@@ -182468,7 +182640,8 @@ class AnimatedHandle extends ViewingToolHandle {
182468
182640
  }
182469
182641
  this._lastPtView.setFrom(this._anchorPtView);
182470
182642
  this._lastMotionTime = Date.now();
182471
- tool.viewport.setAnimator(this);
182643
+ if (undefined !== tool.viewport)
182644
+ tool.viewport.setAnimator(this);
182472
182645
  return true;
182473
182646
  }
182474
182647
  getDirection() {
@@ -182477,10 +182650,13 @@ class AnimatedHandle extends ViewingToolHandle {
182477
182650
  return dir.magnitudeSquared() < this._deadZone ? undefined : dir; // dead zone around starting point
182478
182651
  }
182479
182652
  getInputVector() {
182653
+ const vp = this.viewTool.viewport;
182654
+ if (undefined === vp)
182655
+ return undefined;
182480
182656
  const dir = this.getDirection();
182481
182657
  if (undefined === dir)
182482
182658
  return undefined;
182483
- const viewRect = this.viewTool.viewport.viewRect;
182659
+ const viewRect = vp.viewRect;
182484
182660
  return new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d(dir.x * (2.0 / viewRect.width), dir.y * (2.0 / viewRect.height));
182485
182661
  }
182486
182662
  onReinitialize() {
@@ -182556,6 +182732,8 @@ class ViewScroll extends AnimatedHandle {
182556
182732
  dist.scaleInPlace(_ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.scrollSpeed * this.getElapsedTime());
182557
182733
  const tool = this.viewTool;
182558
182734
  const viewport = tool.viewport;
182735
+ if (undefined === viewport)
182736
+ return false;
182559
182737
  if (viewport.isCameraOn) {
182560
182738
  const points = new Array(2);
182561
182739
  points[0] = this._anchorPtView.clone();
@@ -182576,7 +182754,10 @@ class ViewScroll extends AnimatedHandle {
182576
182754
  }
182577
182755
  /** @internal */
182578
182756
  needDepthPoint(ev, _isPreview) {
182579
- return ev.viewport.isCameraOn && _Tool__WEBPACK_IMPORTED_MODULE_18__.CoordSource.User === ev.coordsFrom;
182757
+ const vp = ev.viewport;
182758
+ if (undefined === vp)
182759
+ return false;
182760
+ return vp.isCameraOn && _Tool__WEBPACK_IMPORTED_MODULE_18__.CoordSource.User === ev.coordsFrom;
182580
182761
  }
182581
182762
  }
182582
182763
  /** ViewingToolHandle for performing the "zoom view" operation */
@@ -182626,6 +182807,8 @@ class ViewZoom extends ViewingToolHandle {
182626
182807
  }
182627
182808
  firstPoint(ev) {
182628
182809
  const vp = ev.viewport;
182810
+ if (undefined === vp)
182811
+ return false;
182629
182812
  this.viewTool.inDynamicUpdate = true;
182630
182813
  if (this.needDepthPoint(ev, false)) {
182631
182814
  this.pickDepthPoint(ev);
@@ -182670,6 +182853,8 @@ class ViewZoom extends ViewingToolHandle {
182670
182853
  if (undefined === this._startFrust || undefined === this.getDirection()) // on anchor point?
182671
182854
  return false;
182672
182855
  const viewport = this.viewTool.viewport;
182856
+ if (undefined === viewport)
182857
+ return false;
182673
182858
  const view = viewport.view;
182674
182859
  const thisPtNpc = viewport.viewToNpc(this._lastPtView);
182675
182860
  const dist = this._anchorPtNpc.minus(thisPtNpc);
@@ -182696,7 +182881,10 @@ class ViewZoom extends ViewingToolHandle {
182696
182881
  }
182697
182882
  /** @internal */
182698
182883
  needDepthPoint(ev, _isPreview) {
182699
- return ev.viewport.isCameraOn && _Tool__WEBPACK_IMPORTED_MODULE_18__.CoordSource.User === ev.coordsFrom;
182884
+ const vp = ev.viewport;
182885
+ if (undefined === vp)
182886
+ return false;
182887
+ return vp.isCameraOn && _Tool__WEBPACK_IMPORTED_MODULE_18__.CoordSource.User === ev.coordsFrom;
182700
182888
  }
182701
182889
  }
182702
182890
  /** @internal */
@@ -182760,11 +182948,17 @@ class NavigateMotion {
182760
182948
  const yAngle = -(accumulator.y / yExtent) * Math.PI;
182761
182949
  const viewRot = vp.rotation;
182762
182950
  const invViewRot = viewRot.inverse();
182951
+ if (undefined === invViewRot)
182952
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
182763
182953
  const pitchAngle = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(this.modifyPitchAngleToPreventInversion(yAngle));
182764
182954
  const pitchMatrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitX(), pitchAngle);
182955
+ if (undefined === pitchMatrix)
182956
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
182765
182957
  const pitchTimesView = pitchMatrix.multiplyMatrixMatrix(viewRot);
182766
182958
  const inverseViewTimesPitchTimesView = invViewRot.multiplyMatrixMatrix(pitchTimesView);
182767
182959
  const yawMatrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(xAngle));
182960
+ if (undefined === yawMatrix)
182961
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
182768
182962
  const yawTimesInverseViewTimesPitchTimesView = yawMatrix.multiplyMatrixMatrix(inverseViewTimesPitchTimesView);
182769
182963
  return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createFixedPointAndMatrix(view.getEyePoint(), yawTimesInverseViewTimesPitchTimesView, result);
182770
182964
  }
@@ -182775,11 +182969,17 @@ class NavigateMotion {
182775
182969
  return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
182776
182970
  const viewRot = vp.rotation;
182777
182971
  const invViewRot = viewRot.inverse();
182972
+ if (undefined === invViewRot)
182973
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
182778
182974
  const pitchAngle = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(this.modifyPitchAngleToPreventInversion(pitchRate * this._seconds));
182779
182975
  const pitchMatrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitX(), pitchAngle);
182976
+ if (undefined === pitchMatrix)
182977
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
182780
182978
  const pitchTimesView = pitchMatrix.multiplyMatrixMatrix(viewRot);
182781
182979
  const inverseViewTimesPitchTimesView = invViewRot.multiplyMatrixMatrix(pitchTimesView);
182782
182980
  const yawMatrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(yawRate * this._seconds));
182981
+ if (undefined === yawMatrix)
182982
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
182783
182983
  const yawTimesInverseViewTimesPitchTimesView = yawMatrix.multiplyMatrixMatrix(inverseViewTimesPitchTimesView);
182784
182984
  return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createFixedPointAndMatrix(view.getEyePoint(), yawTimesInverseViewTimesPitchTimesView, result);
182785
182985
  }
@@ -182837,6 +183037,8 @@ class NavigateMotion {
182837
183037
  if (!view.is3d() || !view.isCameraOn)
182838
183038
  return;
182839
183039
  const angles = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.YawPitchRollAngles.createFromMatrix3d(this.viewport.rotation);
183040
+ if (undefined === angles)
183041
+ return;
182840
183042
  angles.pitch.setRadians(0); // reset pitch to zero
182841
183043
  _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createFixedPointAndMatrix(view.getEyePoint(), angles.toMatrix3d(), this.transform);
182842
183044
  }
@@ -182849,7 +183051,7 @@ class ViewNavigate extends AnimatedHandle {
182849
183051
  getMaxAngularVelocity() { return Math.PI / 4; }
182850
183052
  getNavigateMode() {
182851
183053
  const state = _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.toolAdmin.currentInputState;
182852
- return (state.isShiftDown || !this.viewTool.viewport.isCameraOn) ? 0 /* NavigateMode.Pan */ :
183054
+ return (state.isShiftDown || (false === this.viewTool.viewport?.isCameraOn)) ? 0 /* NavigateMode.Pan */ :
182853
183055
  state.isControlDown ? 1 /* NavigateMode.Look */ : 2 /* NavigateMode.Travel */;
182854
183056
  }
182855
183057
  // called in animation loop
@@ -182859,6 +183061,8 @@ class ViewNavigate extends AnimatedHandle {
182859
183061
  const motion = this.getNavigateMotion(this.getElapsedTime());
182860
183062
  if (undefined !== motion) {
182861
183063
  const vp = this.viewTool.viewport;
183064
+ if (undefined === vp)
183065
+ return false;
182862
183066
  const frust = vp.getWorldFrustum();
182863
183067
  frust.multiply(motion.transform);
182864
183068
  vp.setupViewFromFrustum(frust);
@@ -182930,6 +183134,7 @@ class ViewLookAndMove extends ViewNavigate {
182930
183134
  _pointerLockKeyEngagementListener;
182931
183135
  constructor(viewManip) {
182932
183136
  super(viewManip);
183137
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
182933
183138
  this._navigateMotion = new NavigateMotion(this.viewTool.viewport);
182934
183139
  }
182935
183140
  get handleType() { return ViewHandleType.LookAndMove; }
@@ -183052,10 +183257,10 @@ class ViewLookAndMove extends ViewNavigate {
183052
183257
  getMaxAngularVelocityY() { return this.getMaxAngularVelocity(); }
183053
183258
  getLinearVelocity() {
183054
183259
  const positionInput = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
183055
- const vp = this.viewTool.viewport;
183056
183260
  const position = this.getTouchStartPosition(this._touchStartL);
183057
183261
  if (undefined !== position) {
183058
- const outerRadius = this.getTouchControlRadius(vp);
183262
+ const vp = this.viewTool.viewport;
183263
+ const outerRadius = vp ? this.getTouchControlRadius(vp) : 1;
183059
183264
  const offset = this.getTouchOffset(this._touchStartL, outerRadius);
183060
183265
  const inputL = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d(offset.x * (1.0 / outerRadius), offset.y * (1.0 / outerRadius));
183061
183266
  positionInput.x = inputL.x * this.getMaxLinearVelocity();
@@ -183070,10 +183275,10 @@ class ViewLookAndMove extends ViewNavigate {
183070
183275
  }
183071
183276
  getAngularVelocity() {
183072
183277
  const angularInput = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
183073
- const vp = this.viewTool.viewport;
183074
183278
  const position = this.getTouchStartPosition(this._touchStartR);
183075
183279
  if (undefined !== position) {
183076
- const outerRadius = this.getTouchControlRadius(vp);
183280
+ const vp = this.viewTool.viewport;
183281
+ const outerRadius = vp ? this.getTouchControlRadius(vp) : 1;
183077
183282
  const offset = this.getTouchOffset(this._touchStartR, outerRadius);
183078
183283
  const inputA = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d(offset.x * (1.0 / outerRadius), offset.y * (1.0 / outerRadius));
183079
183284
  angularInput.x = inputA.x * -this.getMaxAngularVelocityX();
@@ -183326,7 +183531,8 @@ class ViewLookAndMove extends ViewNavigate {
183326
183531
  if (tool.inDynamicUpdate)
183327
183532
  return;
183328
183533
  tool.changeViewport(vp);
183329
- tool.viewport.setAnimator(this);
183534
+ if (undefined !== tool.viewport)
183535
+ tool.viewport.setAnimator(this);
183330
183536
  tool.inDynamicUpdate = true;
183331
183537
  tool.inHandleModify = true;
183332
183538
  vp.npcToView(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.NpcCenter, this._anchorPtView);
@@ -183491,6 +183697,8 @@ class ViewLookAndMove extends ViewNavigate {
183491
183697
  const position = this.getTouchStartPosition(touchStart);
183492
183698
  if (undefined === position)
183493
183699
  return offset;
183700
+ if (undefined === touchStart?.viewport)
183701
+ return offset;
183494
183702
  const lastTouch = _Tool__WEBPACK_IMPORTED_MODULE_18__.BeTouchEvent.findTouchById(this._touchLast.touchEvent.targetTouches, touchStart.touchEvent.changedTouches[0].identifier);
183495
183703
  if (undefined === lastTouch)
183496
183704
  return offset;
@@ -183706,6 +183914,7 @@ class ViewWalk extends ViewNavigate {
183706
183914
  _navigateMotion;
183707
183915
  constructor(viewManip) {
183708
183916
  super(viewManip);
183917
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
183709
183918
  this._navigateMotion = new NavigateMotion(this.viewTool.viewport);
183710
183919
  }
183711
183920
  get handleType() { return ViewHandleType.Walk; }
@@ -183740,6 +183949,7 @@ class ViewFly extends ViewNavigate {
183740
183949
  _navigateMotion;
183741
183950
  constructor(viewManip) {
183742
183951
  super(viewManip);
183952
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
183743
183953
  this._navigateMotion = new NavigateMotion(this.viewTool.viewport);
183744
183954
  }
183745
183955
  get handleType() { return ViewHandleType.Fly; }
@@ -184306,6 +184516,8 @@ class WindowAreaTool extends ViewTool {
184306
184516
  }
184307
184517
  computeWindowCorners() {
184308
184518
  const vp = this.viewport;
184519
+ if (undefined === vp)
184520
+ return undefined;
184309
184521
  const corners = this._corners;
184310
184522
  corners[0].setFrom(this._firstPtWorld);
184311
184523
  corners[1].setFrom(this._secondPtWorld);
@@ -184394,13 +184606,15 @@ class WindowAreaTool extends ViewTool {
184394
184606
  const corners = this.computeWindowCorners();
184395
184607
  if (undefined === corners)
184396
184608
  return;
184397
- let delta;
184398
184609
  const vp = this.viewport;
184610
+ if (undefined === vp)
184611
+ return;
184399
184612
  const view = vp.view;
184400
184613
  vp.viewToWorldArray(corners);
184401
184614
  const opts = {
184402
184615
  onExtentsError: (stat) => view.outputStatusMessage(stat),
184403
184616
  };
184617
+ let delta;
184404
184618
  let globalAlignment;
184405
184619
  if (view.is3d() && view.isCameraOn) {
184406
184620
  const windowArray = [corners[0].clone(), corners[1].clone()];
@@ -184472,7 +184686,10 @@ class DefaultViewTouchTool extends ViewManip {
184472
184686
  const vec = this._lastPtView.minus(pt);
184473
184687
  // if we're not moving any more, or if the duration has elapsed, we're done
184474
184688
  if (remaining <= 0 || (vec.magnitudeSquared() < .000001)) {
184475
- this.viewport.saveViewUndo();
184689
+ const vp = this.viewport;
184690
+ if (undefined === vp)
184691
+ return false;
184692
+ vp.saveViewUndo();
184476
184693
  return true; // remove this as the animator
184477
184694
  }
184478
184695
  this._lastPtView.setFrom(pt);
@@ -184488,6 +184705,8 @@ class DefaultViewTouchTool extends ViewManip {
184488
184705
  }
184489
184706
  onStart(ev) {
184490
184707
  const vp = this.viewport;
184708
+ if (undefined === vp)
184709
+ return;
184491
184710
  vp.getWorldFrustum(this._frustum);
184492
184711
  const visiblePoint = vp.pickNearestVisibleGeometry(ev.rawPoint);
184493
184712
  if (undefined !== visiblePoint) {
@@ -184510,8 +184729,10 @@ class DefaultViewTouchTool extends ViewManip {
184510
184729
  if (undefined === ev || 0.0 === this._startDistance)
184511
184730
  return 1.0;
184512
184731
  const vp = this.viewport;
184732
+ if (undefined === vp)
184733
+ return 1.0;
184513
184734
  const distance = (2 === ev.touchCount ? _Tool__WEBPACK_IMPORTED_MODULE_18__.BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[0], vp).distance(_Tool__WEBPACK_IMPORTED_MODULE_18__.BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[1], vp)) : 0.0);
184514
- const threshold = this.viewport.pixelsFromInches(_ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.touchZoomChangeThresholdInches);
184735
+ const threshold = vp.pixelsFromInches(_ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.touchZoomChangeThresholdInches);
184515
184736
  if (0.0 === distance || Math.abs(this._startDistance - distance) < threshold)
184516
184737
  return 1.0;
184517
184738
  // Remove inertia if the viewing operation includes zoom, only use it for pan and rotate.
@@ -184523,6 +184744,8 @@ class DefaultViewTouchTool extends ViewManip {
184523
184744
  if (undefined === ev || ev.touchCount < 2 || this._rotate2dDisabled)
184524
184745
  return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(0.0);
184525
184746
  const vp = this.viewport;
184747
+ if (undefined === vp)
184748
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(0.0);
184526
184749
  const direction = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector2d.createStartEnd(_Tool__WEBPACK_IMPORTED_MODULE_18__.BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[0], vp), _Tool__WEBPACK_IMPORTED_MODULE_18__.BeTouchEvent.getTouchPosition(ev.touchEvent.targetTouches[1], vp));
184527
184750
  const rotation = this._startDirection.angleTo(direction);
184528
184751
  if (undefined === this._rotate2dThreshold) {
@@ -184542,15 +184765,18 @@ class DefaultViewTouchTool extends ViewManip {
184542
184765
  }
184543
184766
  handle2dPan() {
184544
184767
  const screenDist = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.create(this._startPtView.x - this._lastPtView.x, this._startPtView.y - this._lastPtView.y);
184545
- this.viewport.scroll(screenDist, { noSaveInUndo: true });
184768
+ if (undefined !== this.viewport)
184769
+ this.viewport.scroll(screenDist, { noSaveInUndo: true });
184546
184770
  }
184547
184771
  handle2dRotateZoom(ev) {
184548
184772
  const vp = this.viewport;
184773
+ if (undefined === vp)
184774
+ return;
184549
184775
  const rotation = this.computeRotation(ev);
184550
184776
  const zoomRatio = this.computeZoomRatio(ev);
184551
184777
  const targetWorld = vp.viewToWorld(this._lastPtView);
184552
184778
  const translateTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createTranslation(this._startPtWorld.minus(targetWorld));
184553
- const rotationTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createFixedPointAndMatrix(targetWorld, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(vp.view.getZVector(), rotation));
184779
+ const rotationTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createFixedPointAndMatrix(targetWorld, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(vp.view.getZVector(), rotation) ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity);
184554
184780
  const scaleTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createScaleAboutPoint(this._startPtWorld, zoomRatio);
184555
184781
  const transform = translateTransform.multiplyTransformTransform(rotationTransform);
184556
184782
  scaleTransform.multiplyTransformTransform(transform, transform);
@@ -184559,6 +184785,8 @@ class DefaultViewTouchTool extends ViewManip {
184559
184785
  }
184560
184786
  handle3dRotate() {
184561
184787
  const vp = this.viewport;
184788
+ if (undefined === vp)
184789
+ return;
184562
184790
  const viewRect = vp.viewRect;
184563
184791
  const xExtent = viewRect.width;
184564
184792
  const yExtent = viewRect.height;
@@ -184566,8 +184794,8 @@ class DefaultViewTouchTool extends ViewManip {
184566
184794
  const yDelta = this._lastPtView.y - this._startPtView.y;
184567
184795
  const xAxis = _ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.preserveWorldUp ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ() : vp.rotation.getRow(1);
184568
184796
  const yAxis = vp.rotation.getRow(0);
184569
- const xRMatrix = (0.0 !== xDelta) ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(xAxis, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(Math.PI / (xExtent / xDelta))) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity;
184570
- const yRMatrix = (0.0 !== yDelta) ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(yAxis, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(Math.PI / (yExtent / yDelta))) : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity;
184797
+ const xRMatrix = (xDelta ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(xAxis, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(Math.PI / (xExtent / xDelta))) : undefined) ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity;
184798
+ const yRMatrix = (yDelta ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(yAxis, _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(Math.PI / (yExtent / yDelta))) : undefined) ?? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.identity;
184571
184799
  const worldRMatrix = yRMatrix.multiplyMatrixMatrix(xRMatrix);
184572
184800
  const result = worldRMatrix.getAxisAndAngleOfRotation();
184573
184801
  const radians = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(-result.angle.radians);
@@ -184581,6 +184809,8 @@ class DefaultViewTouchTool extends ViewManip {
184581
184809
  }
184582
184810
  handle3dPanZoom(ev) {
184583
184811
  const vp = this.viewport;
184812
+ if (undefined === vp)
184813
+ return;
184584
184814
  const zoomRatio = this.computeZoomRatio(ev);
184585
184815
  if (vp.isCameraOn) {
184586
184816
  const targetWorld = vp.viewToWorld(this._lastPtView);
@@ -184639,6 +184869,8 @@ class DefaultViewTouchTool extends ViewManip {
184639
184869
  }
184640
184870
  perform(ev) {
184641
184871
  const vp = this.viewport;
184872
+ if (undefined === vp)
184873
+ return;
184642
184874
  vp.setupViewFromFrustum(this._frustum);
184643
184875
  const singleTouch = this._singleTouch;
184644
184876
  return (!this._only2dManipulations && vp.view.allow3dManipulations()) ?
@@ -184661,7 +184893,8 @@ class DefaultViewTouchTool extends ViewManip {
184661
184893
  this._duration = _ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.viewingInertia.duration;
184662
184894
  if (this._duration.isTowardsFuture) { // ensure duration is towards future. Otherwise, don't start animation
184663
184895
  this._end = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeTimePoint.fromNow(this._duration);
184664
- this.viewport.setAnimator(this);
184896
+ if (undefined !== this.viewport)
184897
+ this.viewport.setAnimator(this);
184665
184898
  }
184666
184899
  }
184667
184900
  return this.exitTool();
@@ -185371,7 +185604,7 @@ class Geometry {
185371
185604
  static largeCoordinateResult = 1.0e13;
185372
185605
  /**
185373
185606
  * Numeric value that may considered infinite for metric coordinates.
185374
- * @deprecated in 4.x - will not be removed until after 2026-06-13. Use [[largeCoordinateResult]].
185607
+ * @deprecated in 4.9.0 - will not be removed until after 2026-06-13. Use [[largeCoordinateResult]].
185375
185608
  * * This coordinate should be used only as a placeholder indicating "at infinity" -- computing actual
185376
185609
  * points at this coordinate invites numerical problems.
185377
185610
  */
@@ -185382,7 +185615,7 @@ class Geometry {
185382
185615
  }
185383
185616
  /**
185384
185617
  * Test if the absolute value of x is at least [[largeCoordinateResult]].
185385
- * @deprecated in 4.x - will not be removed until after 2026-06-13. Use [[isLargeCoordinateResult]].
185618
+ * @deprecated in 4.9.0 - will not be removed until after 2026-06-13. Use [[isLargeCoordinateResult]].
185386
185619
  */
185387
185620
  static isHugeCoordinate(x) {
185388
185621
  return Geometry.isLargeCoordinateResult(x);
@@ -186349,7 +186582,7 @@ class Geometry {
186349
186582
  /**
186350
186583
  * Clone an array whose members have type `T`, which implements the clone method.
186351
186584
  * * If the clone method returns `undefined`, then `undefined` is forced into the cloned array.
186352
- * @deprecated in 4.x - will not be removed until after 2026-06-13. Use cloneArray.
186585
+ * @deprecated in 4.4.0 - will not be removed until after 2026-06-13. Use cloneArray.
186353
186586
  */
186354
186587
  // eslint-disable-next-line @typescript-eslint/no-deprecated
186355
186588
  static cloneMembers(array) {
@@ -186775,7 +187008,7 @@ class BSpline1dNd {
186775
187008
  * Test if the leading and trailing polygon coordinates are replicated in the manner of a "closed" bspline polygon
186776
187009
  * which has been expanded to act as a normal bspline.
186777
187010
  * @returns true if `degree` leading and trailing polygon blocks match.
186778
- * @deprecated in 4.x - will not be removed until after 2026-06-13. Use `testClosablePolygon` instead.
187011
+ * @deprecated in 4.2.1 - will not be removed until after 2026-06-13. Use `testClosablePolygon` instead.
186779
187012
  */
186780
187013
  testCloseablePolygon(mode) {
186781
187014
  return this.testClosablePolygon(mode);
@@ -189075,7 +189308,7 @@ var UVSelect;
189075
189308
  UVSelect[UVSelect["uDirection"] = 0] = "uDirection";
189076
189309
  /**
189077
189310
  * index of v direction
189078
- * @deprecated in 4.x - will not be removed until after 2026-06-13. Use vDirection instead.
189311
+ * @deprecated in 4.3.0 - will not be removed until after 2026-06-13. Use vDirection instead.
189079
189312
  */
189080
189313
  UVSelect[UVSelect["VDirection"] = 1] = "VDirection";
189081
189314
  /** index of v direction */
@@ -189302,7 +189535,7 @@ class BSpline2dNd extends _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_0__.Geom
189302
189535
  }
189303
189536
  /**
189304
189537
  * sum poles by the weights in the basisBuffer, using poles for given span
189305
- * @deprecated in 4.x - will not be removed until after 2026-06-13. Use sumPoleBufferDerivativesForSpan instead.
189538
+ * @deprecated in 4.3.0 - will not be removed until after 2026-06-13. Use sumPoleBufferDerivativesForSpan instead.
189306
189539
  */
189307
189540
  sumpoleBufferDerivativesForSpan(spanIndexU, spanIndexV) {
189308
189541
  return this.sumPoleBufferDerivativesForSpan(spanIndexU, spanIndexV);
@@ -202662,7 +202895,7 @@ class CurveLocationDetailPair {
202662
202895
  }
202663
202896
  /**
202664
202897
  * Data bundle for a pair of arrays of CurveLocationDetail structures.
202665
- * @deprecated in 4.x - will not be removed until after 2026-06-13. Use CurveLocationDetailPair[] instead.
202898
+ * @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Use CurveLocationDetailPair[] instead.
202666
202899
  * @public
202667
202900
  */
202668
202901
  class CurveLocationDetailArrayPair {
@@ -210648,7 +210881,7 @@ class StrokeOptions {
210648
210881
  maxEdgeLength;
210649
210882
  /**
210650
210883
  * Caller expects convex facets.
210651
- * @deprecated in 4.x - will not be removed until after 2026-06-13. Never used. See [[shouldTriangulate]] and [[maximizeConvexFacets]].
210884
+ * @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Never used. See [[shouldTriangulate]] and [[maximizeConvexFacets]].
210652
210885
  */
210653
210886
  needConvexFacets;
210654
210887
  /** Minimum strokes on a primitive. */
@@ -224916,7 +225149,7 @@ class GrowableXYArray extends _IndexedXYCollection__WEBPACK_IMPORTED_MODULE_0__.
224916
225149
  return result;
224917
225150
  }
224918
225151
  /** Restructure MultiLineStringDataVariant as array of GrowableXYZArray
224919
- * @deprecated in 4.x - will not be removed until after 2026-06-13. Moved to GrowableXYZArray class.
225152
+ * @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Moved to GrowableXYZArray class.
224920
225153
  */
224921
225154
  static createArrayOfGrowableXYZArray(data) {
224922
225155
  return _GrowableXYZArray__WEBPACK_IMPORTED_MODULE_1__.GrowableXYZArray.createArrayOfGrowableXYZArray(data);
@@ -243610,7 +243843,7 @@ class Point4d extends _geometry3d_Plane3d__WEBPACK_IMPORTED_MODULE_0__.Plane3d {
243610
243843
  * extract 4 consecutive numbers from a Float64Array into a Point4d.
243611
243844
  * @param data buffer of numbers
243612
243845
  * @param xIndex first index for x,y,z,w sequence. Assumed to be a valid index!
243613
- * @deprecated in 4.x - will not be removed until after 2026-06-13. Use createFromPacked instead.
243846
+ * @deprecated in 4.3.0 - will not be removed until after 2026-06-13. Use createFromPacked instead.
243614
243847
  */
243615
243848
  static createFromPackedXYZW(data, xIndex = 0, result) {
243616
243849
  return Point4d.create(data[xIndex], data[xIndex + 1], data[xIndex + 2], data[xIndex + 3], result);
@@ -252938,7 +253171,7 @@ class IndexedPolyface extends Polyface {
252938
253171
  }
252939
253172
  /**
252940
253173
  * Clean up the open facet.
252941
- * @deprecated in 4.x - will not be removed until after 2026-06-13. To remove nebulous "open facet" concept from the API. Call [[PolyfaceData.trimAllIndexArrays]]
253174
+ * @deprecated in 4.5.0 - will not be removed until after 2026-06-13. To remove nebulous "open facet" concept from the API. Call [[PolyfaceData.trimAllIndexArrays]]
252942
253175
  * instead.
252943
253176
  */
252944
253177
  cleanupOpenFacet() {
@@ -253088,7 +253321,7 @@ class IndexedPolyface extends Polyface {
253088
253321
  }
253089
253322
  /**
253090
253323
  * Given the index of a facet, return the data pertaining to the face it is a part of.
253091
- * @deprecated in 4.x - will not be removed until after 2026-06-13. Use [[IndexedPolyface.tryGetFaceData]], which verifies the index is in range.
253324
+ * @deprecated in 4.5.0 - will not be removed until after 2026-06-13. Use [[IndexedPolyface.tryGetFaceData]], which verifies the index is in range.
253092
253325
  */
253093
253326
  getFaceDataByFacetIndex(facetIndex) {
253094
253327
  return this.data.face[this._facetToFaceData[facetIndex]];
@@ -254310,7 +254543,7 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
254310
254543
  * Apply stroke counts to curve primitives.
254311
254544
  * * Recursively visit all children of data.
254312
254545
  * * At each primitive, invoke `computeStrokeCountForOptions` method with options from the builder.
254313
- * @deprecated in 4.x - will not be removed until after 2026-06-13. This method does nothing and is unneeded.
254546
+ * @deprecated in 4.8.0 - will not be removed until after 2026-06-13. This method does nothing and is unneeded.
254314
254547
  */
254315
254548
  applyStrokeCountsToCurvePrimitives(data) {
254316
254549
  const options = this._options;
@@ -256349,7 +256582,7 @@ class PolyfaceData {
256349
256582
  }
256350
256583
  /**
256351
256584
  * Resize all data arrays to the specified `length`.
256352
- * @deprecated in 4.x - will not be removed until after 2026-06-13. Because name is misleading. Call [[PolyfaceData.resizeAllArrays]] instead.
256585
+ * @deprecated in 4.5.0 - will not be removed until after 2026-06-13. Because name is misleading. Call [[PolyfaceData.resizeAllArrays]] instead.
256353
256586
  */
256354
256587
  resizeAllDataArrays(length) {
256355
256588
  if (length > this.point.length) {
@@ -257921,7 +258154,7 @@ class PolyfaceQuery {
257921
258154
  });
257922
258155
  return builder.claimPolyface(true);
257923
258156
  }
257924
- /** @deprecated in 4.x - will not be removed until after 2026-06-13. Use [[sweepLineStringToFacetsXYReturnSweptFacets]] instead. */
258157
+ /** @deprecated in 4.7.0 - will not be removed until after 2026-06-13. Use [[sweepLineStringToFacetsXYReturnSweptFacets]] instead. */
257925
258158
  static sweepLinestringToFacetsXYreturnSweptFacets(linestringPoints, polyface) {
257926
258159
  return this.sweepLineStringToFacetsXYReturnSweptFacets(linestringPoints, polyface);
257927
258160
  }
@@ -258024,7 +258257,7 @@ class PolyfaceQuery {
258024
258257
  * * Return collected line segments.
258025
258258
  * * This calls [[sweepLineStringToFacets]] with options created by
258026
258259
  * `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(), false, true, true, true);`
258027
- * @deprecated in 4.x - will not be removed until after 2026-06-13. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
258260
+ * @deprecated in 4.7.0 - will not be removed until after 2026-06-13. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
258028
258261
  */
258029
258262
  static sweepLinestringToFacetsXYReturnLines(linestringPoints, polyface) {
258030
258263
  const options = SweepLineStringToFacetsOptions.create(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ(), _geometry3d_Angle__WEBPACK_IMPORTED_MODULE_2__.Angle.createSmallAngle(), false, true, true, true);
@@ -258034,7 +258267,7 @@ class PolyfaceQuery {
258034
258267
  * Find segments (within the linestring) which project to facets.
258035
258268
  * * Return chains.
258036
258269
  * * This calls [[sweepLineStringToFacets]] with default options.
258037
- * @deprecated in 4.x - will not be removed until after 2026-06-13. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
258270
+ * @deprecated in 4.7.0 - will not be removed until after 2026-06-13. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
258038
258271
  */
258039
258272
  static sweepLinestringToFacetsXYReturnChains(linestringPoints, polyface) {
258040
258273
  return PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface);
@@ -271831,7 +272064,7 @@ class Sample {
271831
272064
  return points;
271832
272065
  }
271833
272066
  // cspell:word creat
271834
- /** @deprecated in 4.x - will not be removed until after 2026-06-13. Use createVerticalStaggerPolygon instead. */
272067
+ /** @deprecated in 4.0.0 - will not be removed until after 2026-06-13. Use createVerticalStaggerPolygon instead. */
271835
272068
  static creatVerticalStaggerPolygon(dy1, dy2, dy3, dy4, ax, ay, dx1, dx4) {
271836
272069
  return this.createVerticalStaggerPolygon(dy1, dy2, dy3, dy4, ax, ay, dx1, dx4);
271837
272070
  }
@@ -304954,10 +305187,10 @@ class Settings {
304954
305187
  });
304955
305188
  }
304956
305189
  toString() {
304957
- return `Configurations:
304958
- oidc client id: ${this.oidcClientId},
304959
- oidc scopes: ${this.oidcScopes},
304960
- applicationId: ${this.gprid},
305190
+ return `Configurations:
305191
+ oidc client id: ${this.oidcClientId},
305192
+ oidc scopes: ${this.oidcScopes},
305193
+ applicationId: ${this.gprid},
304961
305194
  log level: ${this.logLevel}`;
304962
305195
  }
304963
305196
  }
@@ -305434,7 +305667,7 @@ class UiAdmin {
305434
305667
  /** Get the cursor X and Y position. */
305435
305668
  get cursorPosition() { return { x: 0, y: 0 }; }
305436
305669
  /** Create a PointProps object.
305437
- * @deprecated in 4.2.x - will not be removed until after 2026-06-13. Please use @core/geometry [[XAndY]] or a custom implementation.
305670
+ * @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Please use @core/geometry [[XAndY]] or a custom implementation.
305438
305671
  */
305439
305672
  createXAndY(x, y) { return { x, y }; }
305440
305673
  /** Determines if focus is set to Home */
@@ -305737,7 +305970,7 @@ __webpack_require__.r(__webpack_exports__);
305737
305970
  /**
305738
305971
  * Class that define Standard Content Layouts that can be used to specify how the content is arranged in a frontstage.
305739
305972
  * @public
305740
- * @deprecated in 4.10.x - will not be removed until after 2026-06-13. Use `StandardContentLayouts` from `@itwin/appui-react`.
305973
+ * @deprecated in 4.10.0 - will not be removed until after 2026-06-13. Use `StandardContentLayouts` from `@itwin/appui-react`.
305741
305974
  */
305742
305975
  class StandardContentLayouts {
305743
305976
  static singleView = {
@@ -307396,14 +307629,15 @@ __webpack_require__.r(__webpack_exports__);
307396
307629
 
307397
307630
  /** UiSync Event class.
307398
307631
  * @public
307399
- * @deprecated in 4.2.x - will not be removed until after 2026-06-13. Use [[UiSyncEvent]] from @itwin/appui-react.
307632
+ * @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Use [[UiSyncEvent]] from @itwin/appui-react.
307400
307633
  */
307634
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
307401
307635
  class UiSyncEvent extends _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeUiEvent {
307402
307636
  }
307403
307637
  /** This class is used to send eventIds to interested UI components so the component can determine if it needs
307404
307638
  * to refresh its display by calling setState on itself.
307405
307639
  * @public
307406
- * @deprecated in 4.2.x - will not be removed until after 2026-06-13. Use [[SyncUiEventDispatcher]] from @itwin/appui-react.
307640
+ * @deprecated in 4.2.0 - will not be removed until after 2026-06-13. Use [[SyncUiEventDispatcher]] from @itwin/appui-react.
307407
307641
  */
307408
307642
  class UiEventDispatcher {
307409
307643
  _syncEventTimerId;
@@ -317767,7 +318001,7 @@ var loadLanguages = instance.loadLanguages;
317767
318001
  /***/ ((module) => {
317768
318002
 
317769
318003
  "use strict";
317770
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.60","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.3.0","@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
318004
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.62","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/eslint-plugin":"5.2.2-dev.2","@types/chai-as-promised":"^7","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.31.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.3.0","@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
317771
318005
 
317772
318006
  /***/ })
317773
318007