@itwin/rpcinterface-full-stack-tests 5.1.0-dev.61 → 5.1.0-dev.64

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.
@@ -72823,8 +72823,7 @@ class WhiteOnWhiteReversalSettings {
72823
72823
  "use strict";
72824
72824
  __webpack_require__.r(__webpack_exports__);
72825
72825
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
72826
- /* harmony export */ TextAnnotation: () => (/* binding */ TextAnnotation),
72827
- /* harmony export */ textAnnotationFrameShapes: () => (/* binding */ textAnnotationFrameShapes)
72826
+ /* harmony export */ TextAnnotation: () => (/* binding */ TextAnnotation)
72828
72827
  /* harmony export */ });
72829
72828
  /* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
72830
72829
  /* harmony import */ var _TextBlock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TextBlock */ "../../core/common/lib/esm/annotation/TextBlock.js");
@@ -72837,10 +72836,6 @@ __webpack_require__.r(__webpack_exports__);
72837
72836
  */
72838
72837
 
72839
72838
 
72840
- /** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]
72841
- * @beta
72842
- */
72843
- const textAnnotationFrameShapes = ["none", "line", "rectangle", "circle", "equilateralTriangle", "diamond", "square", "pentagon", "hexagon", "octagon", "capsule", "roundedRectangle"];
72844
72839
  /**
72845
72840
  * Represents a formatted block of text positioned in 2d or 3d space.
72846
72841
  * [TextAnnotation2d]($backend) and [TextAnnotation3d]($backend) elements store a single TextAnnotation from which their geometric representation is generated.
@@ -72865,16 +72860,13 @@ class TextAnnotation {
72865
72860
  anchor;
72866
72861
  /** An offset applied to the anchor point that can be used to position annotations within the same geometry stream relative to one another. */
72867
72862
  offset;
72868
- /** The frame settings of the text annotation. */
72869
- frame;
72870
72863
  /** The leaders of the text annotation. */
72871
72864
  leaders;
72872
- constructor(offset, angles, textBlock, anchor, frame, leaders) {
72865
+ constructor(offset, angles, textBlock, anchor, leaders) {
72873
72866
  this.offset = offset;
72874
72867
  this.orientation = angles;
72875
72868
  this.textBlock = textBlock;
72876
72869
  this.anchor = anchor;
72877
- this.frame = frame;
72878
72870
  this.leaders = leaders;
72879
72871
  }
72880
72872
  /** Creates a new TextAnnotation. */
@@ -72883,11 +72875,8 @@ class TextAnnotation {
72883
72875
  const angles = args?.orientation ?? new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.YawPitchRollAngles();
72884
72876
  const textBlock = args?.textBlock ?? _TextBlock__WEBPACK_IMPORTED_MODULE_1__.TextBlock.createEmpty();
72885
72877
  const anchor = args?.anchor ?? { vertical: "top", horizontal: "left" };
72886
- // If the user supplies a frame, but doesn't supply a shape, default the shape to "rectangle"
72887
- const shape = args?.frame?.shape ?? "rectangle";
72888
- const frame = args?.frame ? { shape, ...args.frame } : undefined;
72889
72878
  const leaders = args?.leaders ?? undefined;
72890
- return new TextAnnotation(offset, angles, textBlock, anchor, frame, leaders);
72879
+ return new TextAnnotation(offset, angles, textBlock, anchor, leaders);
72891
72880
  }
72892
72881
  /**
72893
72882
  * Creates a new TextAnnotation instance from its JSON representation.
@@ -72898,7 +72887,6 @@ class TextAnnotation {
72898
72887
  orientation: props?.orientation ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.YawPitchRollAngles.fromJSON(props.orientation) : undefined,
72899
72888
  textBlock: props?.textBlock ? _TextBlock__WEBPACK_IMPORTED_MODULE_1__.TextBlock.create(props.textBlock) : undefined,
72900
72889
  anchor: props?.anchor ? { ...props.anchor } : undefined,
72901
- frame: props?.frame ? { shape: "rectangle", ...props.frame } : undefined,
72902
72890
  leaders: props?.leaders ? props.leaders.map((leader) => ({
72903
72891
  startPoint: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Point3d.fromJSON(leader.startPoint),
72904
72892
  attachment: leader.attachment,
@@ -72912,7 +72900,7 @@ class TextAnnotation {
72912
72900
  */
72913
72901
  toJSON() {
72914
72902
  const props = {};
72915
- // Even if the text block is empty, we want to record its style name and overrides, e.g.,
72903
+ // Even if the text block is empty, we want to record its style ID and overrides, e.g.,
72916
72904
  // so the user can pick up where they left off editing it next time.
72917
72905
  props.textBlock = this.textBlock.toJSON();
72918
72906
  if (!this.offset.isZero) {
@@ -72924,8 +72912,6 @@ class TextAnnotation {
72924
72912
  if (this.anchor.vertical !== "top" || this.anchor.horizontal !== "left") {
72925
72913
  props.anchor = { ...this.anchor };
72926
72914
  }
72927
- // Default frame to "none"
72928
- props.frame = this.frame ? { ...this.frame } : undefined;
72929
72915
  props.leaders = this.leaders?.map((leader) => ({
72930
72916
  startPoint: leader.startPoint.toJSON(),
72931
72917
  attachment: leader.attachment,
@@ -72939,16 +72925,23 @@ class TextAnnotation {
72939
72925
  * at the bottom left, then the transform will be relative to the bottom-left corner of `textBlockExtents`.
72940
72926
  * The text block will be rotated around the fixed anchor point according to [[orientation]], then translated by [[offset]].
72941
72927
  * The anchor point will coincide with (0, 0, 0) unless an [[offset]] is present.
72928
+ * 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.
72942
72929
  * @param boundingBox A box fully containing the [[textBlock]]. This range should include the margins.
72930
+ * @param scaleFactor A factor by which to scale the annotation. Default: 1 (no scaling).
72943
72931
  * @see [[computeAnchorPoint]] to compute the transform's anchor point.
72944
72932
  * @see [computeLayoutTextBlockResult]($backend) to lay out a `TextBlock`.
72945
72933
  */
72946
- computeTransform(boundingBox) {
72934
+ computeTransform(boundingBox, scaleFactor = 1) {
72947
72935
  const anchorPt = this.computeAnchorPoint(boundingBox);
72948
72936
  const matrix = this.orientation.toMatrix3d();
72949
- const rotation = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createFixedPointAndMatrix(anchorPt, matrix);
72937
+ const transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createIdentity();
72950
72938
  const translation = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createTranslation(this.offset.minus(anchorPt));
72951
- return translation.multiplyTransformTransform(rotation, rotation);
72939
+ const scaleTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createScaleAboutPoint(anchorPt, scaleFactor);
72940
+ const rotation = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createFixedPointAndMatrix(anchorPt, matrix);
72941
+ transform.multiplyTransformTransform(translation, transform);
72942
+ transform.multiplyTransformTransform(scaleTransform, transform);
72943
+ transform.multiplyTransformTransform(rotation, transform);
72944
+ return transform;
72952
72945
  }
72953
72946
  /** Compute the anchor point of this annotation as specified by [[anchor]].
72954
72947
  * @param boundingBox A box fully containing the [[textBlock]].
@@ -73009,12 +73002,6 @@ class TextAnnotation {
73009
73002
  !this.offset.isAlmostEqual(other.offset) ||
73010
73003
  !this.textBlock.equals(other.textBlock))
73011
73004
  return false;
73012
- const framesMatch = this.frame?.shape === other.frame?.shape
73013
- && this.frame?.fill === other.frame?.fill
73014
- && this.frame?.border === other.frame?.border
73015
- && this.frame?.borderWeight === other.frame?.borderWeight;
73016
- if (!framesMatch)
73017
- return false;
73018
73005
  return this.areLeadersEqual(this.leaders, other.leaders);
73019
73006
  }
73020
73007
  }
@@ -73040,6 +73027,7 @@ __webpack_require__.r(__webpack_exports__);
73040
73027
  /* harmony export */ TextBlockComponent: () => (/* binding */ TextBlockComponent),
73041
73028
  /* harmony export */ TextRun: () => (/* binding */ TextRun)
73042
73029
  /* harmony export */ });
73030
+ /* harmony import */ var _TextStyle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TextStyle */ "../../core/common/lib/esm/annotation/TextStyle.js");
73043
73031
  /*---------------------------------------------------------------------------------------------
73044
73032
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
73045
73033
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -73047,29 +73035,18 @@ __webpack_require__.r(__webpack_exports__);
73047
73035
  /** @packageDocumentation
73048
73036
  * @module Annotation
73049
73037
  */
73038
+
73050
73039
  /** Abstract representation of any of the building blocks that make up a [[TextBlock]] document - namely [[Run]]s, [[Paragraph]]s, and [[TextBlock]] itself.
73051
- * Each component can specify a [[TextStyle]] that formats its contents and optional [[styleOverrides]] to customize that formatting.
73040
+ * The [[TextBlock]] can specify an [AnnotationTextStyle]($backend) that formats its contents. Each component can specify an optional [[styleOverrides]] to customize that formatting.
73052
73041
  * @beta
73053
73042
  */
73054
73043
  class TextBlockComponent {
73055
- _styleName;
73056
73044
  _styleOverrides;
73057
73045
  /** @internal */
73058
73046
  constructor(props) {
73059
- this._styleName = props.styleName;
73060
- this._styleOverrides = { ...props.styleOverrides };
73061
- }
73062
- /** The name of the [[TextStyle]] that provides the base formatting for the contents of this component.
73063
- * @note Assigning to this property is equivalent to calling [[applyStyle]] with default [[ApplyTextStyleOptions]], which propagates the style change to all of
73064
- * the components sub-components and clears any [[styleOverrides]].
73065
- */
73066
- get styleName() {
73067
- return this._styleName;
73068
- }
73069
- set styleName(styleName) {
73070
- this.applyStyle(styleName);
73047
+ this._styleOverrides = _TextStyle__WEBPACK_IMPORTED_MODULE_0__.TextStyleSettings.cloneProps(props?.styleOverrides ?? {});
73071
73048
  }
73072
- /** Deviations in individual properties of the [[TextStyle]] specified by [[styleName]].
73049
+ /** Deviations in individual properties of the [[TextStyleSettings]] in the [AnnotationTextStyle]($backend) specified by `styleId` on the [[TextBlock]].
73073
73050
  * For example, if the style uses the "Arial" font, you can override that by settings `styleOverrides.fontName` to "Comic Sans".
73074
73051
  * @see [[clearStyleOverrides]] to reset this to an empty object.
73075
73052
  */
@@ -73077,20 +73054,13 @@ class TextBlockComponent {
73077
73054
  return this._styleOverrides;
73078
73055
  }
73079
73056
  set styleOverrides(overrides) {
73080
- this._styleOverrides = { ...overrides };
73057
+ this._styleOverrides = _TextStyle__WEBPACK_IMPORTED_MODULE_0__.TextStyleSettings.cloneProps(overrides);
73081
73058
  }
73082
- /** Reset any [[styleOverrides]] applied to this component's [[TextStyle]]. */
73083
- clearStyleOverrides() {
73059
+ /** Reset any [[styleOverrides]] applied to this component. */
73060
+ clearStyleOverrides(_options) {
73084
73061
  this.styleOverrides = {};
73085
73062
  }
73086
- /** Apply the [[TextStyle]] specified by `styleName` to this component, optionally preserving [[styleOverrides]] and/or preventing propagation to sub-components. */
73087
- applyStyle(styleName, options) {
73088
- this._styleName = styleName;
73089
- if (!(options?.preserveOverrides)) {
73090
- this.clearStyleOverrides();
73091
- }
73092
- }
73093
- /** Returns true if [[styleOverrides]] specifies any deviations from this component's base [[TextStyle]]. */
73063
+ /** Returns true if [[styleOverrides]] specifies any deviations from the [[TextBlock]]'s [AnnotationTextStyle]($backend). */
73094
73064
  get overridesStyle() {
73095
73065
  return Object.keys(this.styleOverrides).length > 0;
73096
73066
  }
@@ -73105,15 +73075,14 @@ class TextBlockComponent {
73105
73075
  /** Convert this component to its JSON representation. */
73106
73076
  toJSON() {
73107
73077
  return {
73108
- styleName: this.styleName,
73109
- styleOverrides: { ...this.styleOverrides },
73078
+ styleOverrides: _TextStyle__WEBPACK_IMPORTED_MODULE_0__.TextStyleSettings.cloneProps(this.styleOverrides),
73110
73079
  };
73111
73080
  }
73112
73081
  /** Returns true if `this` is equivalent to `other`. */
73113
73082
  equals(other) {
73114
73083
  const myKeys = Object.keys(this.styleOverrides);
73115
73084
  const yrKeys = Object.keys(other._styleOverrides);
73116
- if (this.styleName !== other.styleName || myKeys.length !== yrKeys.length) {
73085
+ if (myKeys.length !== yrKeys.length) {
73117
73086
  return false;
73118
73087
  }
73119
73088
  for (const name of myKeys) {
@@ -73157,8 +73126,8 @@ class TextRun extends TextBlockComponent {
73157
73126
  baselineShift;
73158
73127
  constructor(props) {
73159
73128
  super(props);
73160
- this.content = props.content ?? "";
73161
- this.baselineShift = props.baselineShift ?? "none";
73129
+ this.content = props?.content ?? "";
73130
+ this.baselineShift = props?.baselineShift ?? "none";
73162
73131
  }
73163
73132
  clone() {
73164
73133
  return new TextRun(this.toJSON());
@@ -73195,8 +73164,8 @@ class FractionRun extends TextBlockComponent {
73195
73164
  denominator;
73196
73165
  constructor(props) {
73197
73166
  super(props);
73198
- this.numerator = props.numerator ?? "";
73199
- this.denominator = props.denominator ?? "";
73167
+ this.numerator = props?.numerator ?? "";
73168
+ this.denominator = props?.denominator ?? "";
73200
73169
  }
73201
73170
  toJSON() {
73202
73171
  return {
@@ -73292,7 +73261,7 @@ class Paragraph extends TextBlockComponent {
73292
73261
  runs;
73293
73262
  constructor(props) {
73294
73263
  super(props);
73295
- this.runs = props.runs?.map((run) => Run.fromJSON(run)) ?? [];
73264
+ this.runs = props?.runs?.map((run) => Run.fromJSON(run)) ?? [];
73296
73265
  }
73297
73266
  toJSON() {
73298
73267
  return {
@@ -73307,13 +73276,16 @@ class Paragraph extends TextBlockComponent {
73307
73276
  clone() {
73308
73277
  return new Paragraph(this.toJSON());
73309
73278
  }
73310
- /** Apply the specified style to this [[Paragraph]], and - unless [[ApplyTextStyleOptions.preventPropagation]] is `true` - to all of its [[runs]]. */
73311
- applyStyle(styleName, options) {
73312
- super.applyStyle(styleName, options);
73313
- if (!(options?.preventPropagation)) {
73314
- for (const run of this.runs) {
73315
- run.applyStyle(styleName, options);
73316
- }
73279
+ /**
73280
+ * Clears any [[styleOverrides]] applied to this Paragraph.
73281
+ * Will also clear [[styleOverrides]] from all child components unless [[ClearTextStyleOptions.preserveChildrenOverrides]] is `true`.
73282
+ */
73283
+ clearStyleOverrides(options) {
73284
+ super.clearStyleOverrides();
73285
+ if (options?.preserveChildrenOverrides)
73286
+ return;
73287
+ for (const run of this.runs) {
73288
+ run.clearStyleOverrides();
73317
73289
  }
73318
73290
  }
73319
73291
  /** Compute a string representation of this paragraph by concatenating the string representations of all of its [[runs]]. */
@@ -73338,6 +73310,11 @@ class Paragraph extends TextBlockComponent {
73338
73310
  * @beta
73339
73311
  */
73340
73312
  class TextBlock extends TextBlockComponent {
73313
+ /** The ID of the [AnnotationTextStyle]($backend) that provides the base formatting for the contents of this TextBlock.
73314
+ * @note Assigning to this property retains all style overrides on the TextBlock and its child components.
73315
+ * Call [[clearStyleOverrides]] to clear the TextBlock's and optionally all children's style overrides.
73316
+ */
73317
+ styleId;
73341
73318
  /** The width of the document in meters. Lines that would exceed this width are instead wrapped around to the next line if possible.
73342
73319
  * A value less than or equal to zero indicates no wrapping is to be applied.
73343
73320
  * Default: 0
@@ -73351,6 +73328,7 @@ class TextBlock extends TextBlockComponent {
73351
73328
  paragraphs;
73352
73329
  constructor(props) {
73353
73330
  super(props);
73331
+ this.styleId = props.styleId;
73354
73332
  this.width = props.width ?? 0;
73355
73333
  this.justification = props.justification ?? "left";
73356
73334
  // Assign default margins if not provided
@@ -73365,6 +73343,7 @@ class TextBlock extends TextBlockComponent {
73365
73343
  toJSON() {
73366
73344
  return {
73367
73345
  ...super.toJSON(),
73346
+ styleId: this.styleId,
73368
73347
  width: this.width,
73369
73348
  justification: this.justification,
73370
73349
  margins: this.margins,
@@ -73375,9 +73354,9 @@ class TextBlock extends TextBlockComponent {
73375
73354
  static create(props) {
73376
73355
  return new TextBlock(props);
73377
73356
  }
73378
- /** Create an empty text block containing no [[paragraphs]] and an empty [[styleName]]. */
73357
+ /** Create an empty text block containing no [[paragraphs]] and an empty [[styleId]]. */
73379
73358
  static createEmpty() {
73380
- return TextBlock.create({ styleName: "" });
73359
+ return TextBlock.create({ styleId: "" });
73381
73360
  }
73382
73361
  /** Returns true if every paragraph in this text block is empty. */
73383
73362
  get isEmpty() {
@@ -73386,13 +73365,16 @@ class TextBlock extends TextBlockComponent {
73386
73365
  clone() {
73387
73366
  return new TextBlock(this.toJSON());
73388
73367
  }
73389
- /** Apply the specified style to this block and - unless [[ApplyTextStyleOptions.preventPropagation]] is `true` - to all of its [[paragraphs]]. */
73390
- applyStyle(styleName, options) {
73391
- super.applyStyle(styleName, options);
73392
- if (!(options?.preventPropagation)) {
73393
- for (const paragraph of this.paragraphs) {
73394
- paragraph.applyStyle(styleName, options);
73395
- }
73368
+ /**
73369
+ * Clears any [[styleOverrides]] applied to this TextBlock.
73370
+ * Will also clear [[styleOverrides]] from all child components unless [[ClearTextStyleOptions.preserveChildrenOverrides]] is `true`.
73371
+ */
73372
+ clearStyleOverrides(options) {
73373
+ super.clearStyleOverrides();
73374
+ if (options?.preserveChildrenOverrides)
73375
+ return;
73376
+ for (const paragraph of this.paragraphs) {
73377
+ paragraph.clearStyleOverrides();
73396
73378
  }
73397
73379
  }
73398
73380
  /** Compute a string representation of the document's contents by concatenating the string representations of each of its [[paragraphs]], separated by [[TextBlockStringifyOptions.paragraphBreak]]. */
@@ -73400,14 +73382,17 @@ class TextBlock extends TextBlockComponent {
73400
73382
  return this.paragraphs.map((x) => x.stringify(options)).join(options?.paragraphBreak ?? " ");
73401
73383
  }
73402
73384
  /** Add and return a new paragraph.
73403
- * If [[paragraphs]] is not empty, the style and overrides of the last [[Paragraph]] in the block will be applied to the new paragraph; otherwise,
73404
- * the paragraph will inherit this block's style with no overrides.
73385
+ * By default, the paragraph will be created with no [[styleOverrides]], so that it inherits the style of this block.
73386
+ * @param seedFromLast If true and [[paragraphs]] is not empty, the new paragraph will inherit the style overrides of the last [[Paragraph]] in this block.
73405
73387
  */
73406
- appendParagraph() {
73407
- const seed = this.paragraphs[0];
73388
+ appendParagraph(seedFromLast = false) {
73389
+ let styleOverrides = {};
73390
+ if (seedFromLast && this.paragraphs.length > 0) {
73391
+ const seed = this.paragraphs[this.paragraphs.length - 1];
73392
+ styleOverrides = { ...seed.styleOverrides };
73393
+ }
73408
73394
  const paragraph = Paragraph.create({
73409
- styleName: seed?.styleName ?? this.styleName,
73410
- styleOverrides: seed?.styleOverrides ?? undefined,
73395
+ styleOverrides
73411
73396
  });
73412
73397
  this.paragraphs.push(paragraph);
73413
73398
  return paragraph;
@@ -73423,6 +73408,9 @@ class TextBlock extends TextBlockComponent {
73423
73408
  if (!(other instanceof TextBlock)) {
73424
73409
  return false;
73425
73410
  }
73411
+ if (this.styleId !== other.styleId || !super.equals(other)) {
73412
+ return false;
73413
+ }
73426
73414
  if (this.width !== other.width || this.justification !== other.justification || this.paragraphs.length !== other.paragraphs.length) {
73427
73415
  return false;
73428
73416
  }
@@ -73485,9 +73473,10 @@ __webpack_require__.r(__webpack_exports__);
73485
73473
  "use strict";
73486
73474
  __webpack_require__.r(__webpack_exports__);
73487
73475
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
73488
- /* harmony export */ TextStyle: () => (/* binding */ TextStyle),
73489
- /* harmony export */ TextStyleSettings: () => (/* binding */ TextStyleSettings)
73476
+ /* harmony export */ TextStyleSettings: () => (/* binding */ TextStyleSettings),
73477
+ /* harmony export */ textAnnotationFrameShapes: () => (/* binding */ textAnnotationFrameShapes)
73490
73478
  /* harmony export */ });
73479
+ /* harmony import */ var _ColorDef__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ColorDef */ "../../core/common/lib/esm/ColorDef.js");
73491
73480
  /*---------------------------------------------------------------------------------------------
73492
73481
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
73493
73482
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -73495,8 +73484,25 @@ __webpack_require__.r(__webpack_exports__);
73495
73484
  /** @packageDocumentation
73496
73485
  * @module Annotation
73497
73486
  */
73487
+
73488
+ /** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]
73489
+ * @beta
73490
+ */
73491
+ const textAnnotationFrameShapes = ["none", "line", "rectangle", "circle", "equilateralTriangle", "diamond", "square", "pentagon", "hexagon", "octagon", "capsule", "roundedRectangle"];
73492
+ ;
73493
+ function deepFreeze(obj) {
73494
+ if (obj === null || typeof obj !== "object" || Object.isFrozen(obj))
73495
+ return;
73496
+ Object.getOwnPropertyNames(obj).forEach((prop) => {
73497
+ const value = obj[prop];
73498
+ if (value && typeof value === "object") {
73499
+ deepFreeze(value);
73500
+ }
73501
+ });
73502
+ Object.freeze(obj);
73503
+ }
73498
73504
  /** A description of the formatting to be applied to a [[TextBlockComponent]].
73499
- * Named instances of these settings can be stored as [[TextStyle]]s in a [Workspace]($backend).
73505
+ * Named instances of these settings can be stored as [AnnotationTextStyle]($backend)s in an iModel.
73500
73506
  * @note This is an immutable type. Use [[clone]] to create a modified copy.
73501
73507
  * @see [[TextStyleSettingsProps]] for documentation of each of the settings.
73502
73508
  * @beta
@@ -73504,7 +73510,7 @@ __webpack_require__.r(__webpack_exports__);
73504
73510
  class TextStyleSettings {
73505
73511
  /** The color of the text. */
73506
73512
  color;
73507
- /** The name of a font stored in a [Workspace]($backend), used to draw the contents of a [[TextRun]].
73513
+ /** The name of a font stored in an iModel, used to draw the contents of a [[TextRun]].
73508
73514
  */
73509
73515
  fontName;
73510
73516
  /** The height each line of text, in meters. Many other settings use the line height as the basis for computing their own values.
@@ -73554,7 +73560,9 @@ class TextStyleSettings {
73554
73560
  * These are equally spaced from the left edge of the TextBlock. Default is 4 meters.
73555
73561
  */
73556
73562
  tabInterval;
73557
- /** A fully-populated JSON representation of the default settings. */
73563
+ /** The frame settings of the [[TextAnnotation]]. */
73564
+ frame;
73565
+ /** A fully-populated JSON representation of the default settings. A real `fontName` must be provided before use. */
73558
73566
  static defaultProps = {
73559
73567
  color: "subcategory",
73560
73568
  fontName: "",
@@ -73571,13 +73579,19 @@ class TextStyleSettings {
73571
73579
  superScriptScale: 2 / 3,
73572
73580
  widthFactor: 1,
73573
73581
  leader: {
73574
- color: "subcategory",
73582
+ color: "inherit",
73575
73583
  wantElbow: false,
73576
73584
  elbowLength: 1.0,
73577
73585
  terminatorHeightFactor: 1.0,
73578
73586
  terminatorWidthFactor: 1.0,
73579
73587
  },
73580
73588
  tabInterval: 4,
73589
+ frame: {
73590
+ shape: "none",
73591
+ fill: "none",
73592
+ border: _ColorDef__WEBPACK_IMPORTED_MODULE_0__.ColorDef.black.toJSON(),
73593
+ borderWeight: 1,
73594
+ },
73581
73595
  };
73582
73596
  /** Settings initialized to all default values. */
73583
73597
  static defaults = new TextStyleSettings({});
@@ -73608,11 +73622,30 @@ class TextStyleSettings {
73608
73622
  };
73609
73623
  this.leader = Object.freeze(leader);
73610
73624
  this.tabInterval = props.tabInterval ?? defaults.tabInterval;
73625
+ const frame = {
73626
+ shape: props.frame?.shape ?? defaults.frame.shape,
73627
+ fill: props.frame?.fill ?? defaults.frame.fill,
73628
+ border: props.frame?.border ?? defaults.frame.border,
73629
+ borderWeight: props.frame?.borderWeight ?? defaults.frame.borderWeight,
73630
+ };
73631
+ // Cast to indicate to TypeScript that the frame properties are all defined
73632
+ this.frame = Object.freeze(frame);
73611
73633
  }
73612
73634
  /** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */
73613
73635
  clone(alteredProps) {
73614
73636
  return alteredProps ? new TextStyleSettings(alteredProps, this) : this;
73615
73637
  }
73638
+ /** Creates a deep copy of the `TextStyleSettingsProps`. */
73639
+ static cloneProps(props) {
73640
+ const copy = { ...props };
73641
+ if (props.leader) {
73642
+ copy.leader = { ...props.leader };
73643
+ }
73644
+ if (props.frame) {
73645
+ copy.frame = { ...props.frame };
73646
+ }
73647
+ return copy;
73648
+ }
73616
73649
  /** Create settings from their JSON representation. */
73617
73650
  static fromJSON(props) {
73618
73651
  return props ? new TextStyleSettings(props) : TextStyleSettings.defaults;
@@ -73629,47 +73662,49 @@ class TextStyleSettings {
73629
73662
  && this.leader.elbowLength === other.elbowLength && this.leader.terminatorHeightFactor === other.terminatorHeightFactor
73630
73663
  && this.leader.terminatorWidthFactor === other.terminatorWidthFactor;
73631
73664
  }
73665
+ frameEquals(other) {
73666
+ return this.frame?.shape === other.shape
73667
+ && this.frame?.fill === other.fill
73668
+ && this.frame?.border === other.border
73669
+ && this.frame?.borderWeight === other.borderWeight;
73670
+ }
73632
73671
  equals(other) {
73633
73672
  return this.color === other.color && this.fontName === other.fontName
73634
73673
  && this.lineHeight === other.lineHeight && this.lineSpacingFactor === other.lineSpacingFactor && this.widthFactor === other.widthFactor
73635
73674
  && this.isBold === other.isBold && this.isItalic === other.isItalic && this.isUnderlined === other.isUnderlined
73636
73675
  && this.stackedFractionType === other.stackedFractionType && this.stackedFractionScale === other.stackedFractionScale
73637
73676
  && this.subScriptOffsetFactor === other.subScriptOffsetFactor && this.subScriptScale === other.subScriptScale
73638
- && this.superScriptOffsetFactor === other.superScriptOffsetFactor
73639
- && this.superScriptScale === other.superScriptScale
73640
- && this.tabInterval === other.tabInterval && this.leaderEquals(other.leader);
73641
- }
73642
- }
73643
- Object.freeze(TextStyleSettings.defaultProps);
73644
- Object.freeze(TextStyleSettings.defaults);
73645
- /** A named, immutable [[TextStyleSettings]] stored in a [Workspace]($backend).
73646
- * @see [[TextBlockComponent.styleName]] to define the text style for a component of a [[TextBlock]].
73647
- * @note This is an immutable type. Use [[clone]] to create a modified copy.
73648
- * @beta
73649
- */
73650
- class TextStyle {
73651
- name;
73652
- settings;
73653
- constructor(name, settings) {
73654
- this.name = name;
73655
- this.settings = settings;
73656
- }
73657
- /** Create a style from its JSON representation. */
73658
- static fromJSON(json) {
73659
- return TextStyle.create(json.name, TextStyleSettings.fromJSON(json.settings));
73677
+ && this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale
73678
+ && this.tabInterval === other.tabInterval
73679
+ && this.leaderEquals(other.leader)
73680
+ && this.frameEquals(other.frame);
73660
73681
  }
73661
- /** Create a new style. */
73662
- static create(name, settings) {
73663
- return new TextStyle(name, settings);
73664
- }
73665
- /** Create a copy of this style with the same name, and settings modified according to the properties defined by `alteredSettings`. */
73666
- clone(alteredSettings) {
73667
- return TextStyle.create(this.name, this.settings.clone(alteredSettings));
73668
- }
73669
- equals(other) {
73670
- return this.name === other.name && this.settings.equals(other.settings);
73682
+ /**
73683
+ * Returns a list of validation errors for this instance.
73684
+ *
73685
+ * A TextStyleSettings object may contain values that are invalid in all contexts.
73686
+ * If this method returns any error strings, using the settings will likely result in rendering failures or runtime exceptions.
73687
+ *
73688
+ * 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.
73689
+ *
73690
+ * @returns An array of error strings describing the invalid values, or an empty array if the settings are valid.
73691
+ */
73692
+ getValidationErrors() {
73693
+ const errorMessages = [];
73694
+ if (this.fontName.trim() === "") {
73695
+ errorMessages.push("fontName must be provided");
73696
+ }
73697
+ if (this.lineHeight <= 0) {
73698
+ errorMessages.push("lineHeight must be greater than 0");
73699
+ }
73700
+ if (this.stackedFractionScale <= 0) {
73701
+ errorMessages.push("stackedFractionScale must be greater than 0");
73702
+ }
73703
+ return errorMessages;
73671
73704
  }
73672
73705
  }
73706
+ deepFreeze(TextStyleSettings.defaultProps);
73707
+ deepFreeze(TextStyleSettings.defaults);
73673
73708
 
73674
73709
 
73675
73710
  /***/ }),
@@ -74002,7 +74037,6 @@ __webpack_require__.r(__webpack_exports__);
74002
74037
  /* harmony export */ TextBlockComponent: () => (/* reexport safe */ _annotation_TextBlock__WEBPACK_IMPORTED_MODULE_3__.TextBlockComponent),
74003
74038
  /* harmony export */ TextRun: () => (/* reexport safe */ _annotation_TextBlock__WEBPACK_IMPORTED_MODULE_3__.TextRun),
74004
74039
  /* harmony export */ TextString: () => (/* reexport safe */ _geometry_TextString__WEBPACK_IMPORTED_MODULE_56__.TextString),
74005
- /* harmony export */ TextStyle: () => (/* reexport safe */ _annotation_TextStyle__WEBPACK_IMPORTED_MODULE_6__.TextStyle),
74006
74040
  /* harmony export */ TextStyleSettings: () => (/* reexport safe */ _annotation_TextStyle__WEBPACK_IMPORTED_MODULE_6__.TextStyleSettings),
74007
74041
  /* harmony export */ TextureMapUnits: () => (/* reexport safe */ _MaterialProps__WEBPACK_IMPORTED_MODULE_83__.TextureMapUnits),
74008
74042
  /* harmony export */ TextureMapping: () => (/* reexport safe */ _TextureMapping__WEBPACK_IMPORTED_MODULE_111__.TextureMapping),
@@ -74075,7 +74109,7 @@ __webpack_require__.r(__webpack_exports__);
74075
74109
  /* harmony export */ readElementMeshes: () => (/* reexport safe */ _ElementMesh__WEBPACK_IMPORTED_MODULE_29__.readElementMeshes),
74076
74110
  /* harmony export */ readTileContentDescription: () => (/* reexport safe */ _tile_TileMetadata__WEBPACK_IMPORTED_MODULE_157__.readTileContentDescription),
74077
74111
  /* harmony export */ rpcOverIpcStrings: () => (/* reexport safe */ _ipc_IpcSession__WEBPACK_IMPORTED_MODULE_75__.rpcOverIpcStrings),
74078
- /* harmony export */ textAnnotationFrameShapes: () => (/* reexport safe */ _annotation_TextAnnotation__WEBPACK_IMPORTED_MODULE_2__.textAnnotationFrameShapes),
74112
+ /* harmony export */ textAnnotationFrameShapes: () => (/* reexport safe */ _annotation_TextStyle__WEBPACK_IMPORTED_MODULE_6__.textAnnotationFrameShapes),
74079
74113
  /* harmony export */ tileFormatFromNumber: () => (/* reexport safe */ _tile_TileIO__WEBPACK_IMPORTED_MODULE_156__.tileFormatFromNumber)
74080
74114
  /* harmony export */ });
74081
74115
  /* harmony import */ var _AmbientOcclusion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AmbientOcclusion */ "../../core/common/lib/esm/AmbientOcclusion.js");
@@ -106863,7 +106897,7 @@ class AccuDraw {
106863
106897
  applyDistanceRoundOff(distance, vp) {
106864
106898
  if (!this._distanceRoundOff.active || !this._distanceRoundOff.units.size)
106865
106899
  return undefined;
106866
- let roundValue = this._distanceRoundOff.units.values().next().value;
106900
+ let roundValue = this._distanceRoundOff.units.values().next().value ?? 0;
106867
106901
  if (this._distanceRoundOff.units.size > 1) {
106868
106902
  // NOTE: Set isn't ordered, find smallest entry...
106869
106903
  this._distanceRoundOff.units.forEach((thisRoundValue) => {
@@ -106887,7 +106921,7 @@ class AccuDraw {
106887
106921
  applyAngleRoundOff(angle, distance, vp) {
106888
106922
  if (!this._angleRoundOff.active || !this._angleRoundOff.units.size)
106889
106923
  return undefined;
106890
- let roundValue = this._angleRoundOff.units.values().next().value;
106924
+ let roundValue = this._angleRoundOff.units.values().next().value ?? 0;
106891
106925
  if (this._angleRoundOff.units.size > 1) {
106892
106926
  // NOTE: Set isn't ordered, find smallest entry...
106893
106927
  this._angleRoundOff.units.forEach((thisRoundValue) => {
@@ -108400,6 +108434,8 @@ class AccuSnap {
108400
108434
  this.errorKey = out.reason;
108401
108435
  this.errorIcon.deactivate();
108402
108436
  const vp = ev.viewport;
108437
+ if (undefined === vp)
108438
+ return;
108403
108439
  let errorSprite;
108404
108440
  switch (out.snapStatus) {
108405
108441
  case _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.FilteredByApp:
@@ -108784,8 +108820,10 @@ class AccuSnap {
108784
108820
  // points not on the grid. This causes them to be "pulled" off the grid when they are accepted. On
108785
108821
  // the other hand, when NOT locating, we need to use the raw point so we can snap to elements
108786
108822
  // away from the grid.
108787
- const testPoint = this.isLocateEnabled ? ev.point : ev.rawPoint;
108788
108823
  const vp = ev.viewport;
108824
+ if (undefined === vp)
108825
+ return _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.NoElements;
108826
+ const testPoint = this.isLocateEnabled ? ev.point : ev.rawPoint;
108789
108827
  const picker = _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.picker;
108790
108828
  const options = _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.locateManager.options.clone(); // Copy to avoid changing out from under active Tool...
108791
108829
  // NOTE: Since TestHit will use the same HitSource as the input hit we only need to sets this for DoPick...
@@ -108827,6 +108865,8 @@ class AccuSnap {
108827
108865
  }
108828
108866
  }
108829
108867
  const thisList = this.aSnapHits;
108868
+ if (undefined === thisList)
108869
+ return undefined;
108830
108870
  let thisHit;
108831
108871
  let firstRejected;
108832
108872
  const filterResponse = new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.LocateResponse();
@@ -108860,7 +108900,7 @@ class AccuSnap {
108860
108900
  // if we don't have any more candidate hits, get a new list at the current location
108861
108901
  if (!this.aSnapHits || (0 === this.aSnapHits.length)) {
108862
108902
  out.snapStatus = this.findHits(ev);
108863
- hit = (_ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success !== out.snapStatus) ? undefined : await this.getAccuSnapDetail(this.aSnapHits, out);
108903
+ hit = (_ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success !== out.snapStatus || undefined === this.aSnapHits) ? undefined : await this.getAccuSnapDetail(this.aSnapHits, out);
108864
108904
  }
108865
108905
  else {
108866
108906
  // drop the current hit from the list and then retest the list (without the dropped hit) to find the new snap
@@ -108887,13 +108927,16 @@ class AccuSnap {
108887
108927
  */
108888
108928
  async onMotion(ev) {
108889
108929
  this.clearToolTip(ev);
108930
+ const vp = ev.viewport;
108931
+ if (undefined === vp)
108932
+ return;
108890
108933
  const out = new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.LocateResponse();
108891
108934
  out.snapStatus = _ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Disabled;
108892
108935
  let hit;
108893
108936
  if (this.isActive) {
108894
108937
  if (this._doSnapping) {
108895
108938
  out.snapStatus = this.findHits(ev);
108896
- hit = (_ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success !== out.snapStatus) ? undefined : await this.getAccuSnapDetail(this.aSnapHits, out);
108939
+ hit = (_ElementLocateManager__WEBPACK_IMPORTED_MODULE_2__.SnapStatus.Success !== out.snapStatus || undefined === this.aSnapHits) ? undefined : await this.getAccuSnapDetail(this.aSnapHits, out);
108897
108940
  if (!this._doSnapping)
108898
108941
  hit = undefined; // Snap no longer requested...
108899
108942
  }
@@ -108908,7 +108951,7 @@ class AccuSnap {
108908
108951
  this.setCurrHit(hit);
108909
108952
  // set up active error before calling displayToolTip to indicate error or show locate message...
108910
108953
  this.showSnapError(out, ev);
108911
- this.displayToolTip(ev.viewPoint, ev.viewport, ev.rawPoint);
108954
+ this.displayToolTip(ev.viewPoint, vp, ev.rawPoint);
108912
108955
  if (undefined !== this.touchCursor && _tools_Tool__WEBPACK_IMPORTED_MODULE_6__.InputSource.Mouse === ev.inputSource) {
108913
108956
  this.touchCursor = undefined;
108914
108957
  _IModelApp__WEBPACK_IMPORTED_MODULE_4__.IModelApp.viewManager.invalidateDecorationsAllViews();
@@ -109506,7 +109549,7 @@ class AuxCoordSystem2dState extends AuxCoordSystemState {
109506
109549
  super(props, iModel);
109507
109550
  this.origin = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.fromJSON(props.origin);
109508
109551
  this.angle = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asDouble(props.angle);
109509
- 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));
109552
+ 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();
109510
109553
  }
109511
109554
  toJSON() {
109512
109555
  const val = super.toJSON();
@@ -178405,7 +178448,7 @@ var RealityTreeId;
178405
178448
  function compareWithoutModelId(lhs, rhs) {
178406
178449
  return (compareRealityDataSourceKeys(lhs.rdSourceKey, rhs.rdSourceKey) ||
178407
178450
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareBooleans)(lhs.deduplicateVertices, rhs.deduplicateVertices) ||
178408
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareBooleansOrUndefined)(lhs.produceGeometry, rhs.produceGeometry) ||
178451
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStringsOrUndefined)(lhs.produceGeometry, rhs.produceGeometry) ||
178409
178452
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStringsOrUndefined)(lhs.maskModelIds, rhs.maskModelIds) ||
178410
178453
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.comparePossiblyUndefined)((ltf, rtf) => compareTransforms(ltf, rtf), lhs.transform, rhs.transform));
178411
178454
  }
@@ -178599,10 +178642,11 @@ class RealityModelTileTreeParams {
178599
178642
  loader;
178600
178643
  rootTile;
178601
178644
  baseUrl;
178645
+ reprojectGeometry;
178602
178646
  get location() { return this.loader.tree.location; }
178603
178647
  get yAxisUp() { return this.loader.tree.yAxisUp; }
178604
178648
  get priority() { return this.loader.priority; }
178605
- constructor(tileTreeId, iModel, modelId, loader, gcsConverterAvailable, rootToEcef, baseUrl) {
178649
+ constructor(tileTreeId, iModel, modelId, loader, gcsConverterAvailable, rootToEcef, baseUrl, reprojectGeometry) {
178606
178650
  this.gcsConverterAvailable = gcsConverterAvailable;
178607
178651
  this.rootToEcef = rootToEcef;
178608
178652
  this.loader = loader;
@@ -178618,6 +178662,7 @@ class RealityModelTileTreeParams {
178618
178662
  usesGeometricError: loader.tree.usesGeometricError,
178619
178663
  });
178620
178664
  this.baseUrl = baseUrl;
178665
+ this.reprojectGeometry = reprojectGeometry;
178621
178666
  }
178622
178667
  }
178623
178668
  class RealityModelTileProps {
@@ -178724,7 +178769,7 @@ class RealityModelTileLoader extends _tile_internal__WEBPACK_IMPORTED_MODULE_8__
178724
178769
  _viewFlagOverrides;
178725
178770
  _deduplicateVertices;
178726
178771
  constructor(tree, batchedIdMap, opts) {
178727
- super(opts?.produceGeometry ?? false);
178772
+ super(opts?.produceGeometry);
178728
178773
  this.tree = tree;
178729
178774
  this._batchedIdMap = batchedIdMap;
178730
178775
  this._deduplicateVertices = opts?.deduplicateVertices ?? false;
@@ -178956,9 +179001,9 @@ class RealityModelTileTree extends _tile_internal__WEBPACK_IMPORTED_MODULE_8__.R
178956
179001
  const props = await getTileTreeProps(rdSource, tilesetToDb, iModel);
178957
179002
  const loader = new RealityModelTileLoader(props, new _tile_internal__WEBPACK_IMPORTED_MODULE_8__.BatchedTileIdMap(iModel), opts);
178958
179003
  const gcsConverterAvailable = await (0,_tile_internal__WEBPACK_IMPORTED_MODULE_8__.getGcsConverterAvailable)(iModel);
178959
- //The full tileset url is needed so that it includes the url's search parameters if any are present
179004
+ // The full tileset url is needed so that it includes the url's search parameters if any are present
178960
179005
  const baseUrl = rdSource instanceof _RealityDataSourceTilesetUrlImpl__WEBPACK_IMPORTED_MODULE_9__.RealityDataSourceTilesetUrlImpl ? rdSource.getTilesetUrl() : undefined;
178961
- const params = new RealityModelTileTreeParams(tileTreeId, iModel, modelId, loader, gcsConverterAvailable, props.tilesetToEcef, baseUrl);
179006
+ const params = new RealityModelTileTreeParams(tileTreeId, iModel, modelId, loader, gcsConverterAvailable, props.tilesetToEcef, baseUrl, opts?.produceGeometry === "reproject");
178962
179007
  return new RealityModelTileTree(params);
178963
179008
  }
178964
179009
  return undefined;
@@ -179052,14 +179097,14 @@ class RealityTreeReference extends RealityModelTileTree.Reference {
179052
179097
  get treeOwner() {
179053
179098
  return realityTreeSupplier.getOwner(this.createTreeId(this.modelId), this.iModel);
179054
179099
  }
179055
- _createGeometryTreeReference() {
179100
+ _createGeometryTreeReference(options) {
179056
179101
  const ref = new RealityTreeReference({
179057
179102
  iModel: this.iModel,
179058
179103
  modelId: this.modelId,
179059
179104
  source: this._source,
179060
179105
  rdSourceKey: this._rdSourceKey,
179061
179106
  name: this._name,
179062
- produceGeometry: true,
179107
+ produceGeometry: options?.reprojectGeometry ? "reproject" : "yes",
179063
179108
  getDisplaySettings: () => _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RealityModelDisplaySettings.defaults,
179064
179109
  });
179065
179110
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== ref.collectTileGeometry);
@@ -179290,7 +179335,7 @@ class RealityTileLoader {
179290
179335
  const blob = data;
179291
179336
  const streamBuffer = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.ByteStream.fromUint8Array(blob);
179292
179337
  const realityTile = tile;
179293
- return this._produceGeometry ? this.loadGeometryFromStream(realityTile, streamBuffer, system) : this.loadGraphicsFromStream(realityTile, streamBuffer, system, isCanceled);
179338
+ return (this._produceGeometry && this._produceGeometry !== "no") ? this.loadGeometryFromStream(realityTile, streamBuffer, system) : this.loadGraphicsFromStream(realityTile, streamBuffer, system, isCanceled);
179294
179339
  }
179295
179340
  _getFormat(streamBuffer) {
179296
179341
  const position = streamBuffer.curPos;
@@ -179306,7 +179351,15 @@ class RealityTileLoader {
179306
179351
  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());
179307
179352
  if (reader)
179308
179353
  reader.defaultWrapMode = _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_6__.GltfWrapMode.ClampToEdge;
179309
- return { geometry: reader?.readGltfAndCreateGeometry(tile.tree.iModelTransform) };
179354
+ const geom = reader?.readGltfAndCreateGeometry(tile.tree.iModelTransform);
179355
+ const xForm = tile.reprojectionTransform;
179356
+ if (tile.tree.reprojectGeometry && geom?.polyfaces && xForm) {
179357
+ const polyfaces = geom.polyfaces.map((pf) => pf.cloneTransformed(xForm));
179358
+ return { geometry: { polyfaces } };
179359
+ }
179360
+ else {
179361
+ return { geometry: geom };
179362
+ }
179310
179363
  }
179311
179364
  async loadGraphicsFromStream(tile, streamBuffer, system, isCanceled) {
179312
179365
  const format = this._getFormat(streamBuffer);
@@ -190250,6 +190303,12 @@ class RealityTile extends _internal__WEBPACK_IMPORTED_MODULE_5__.Tile {
190250
190303
  /** @internal */
190251
190304
  _copyright;
190252
190305
  /** @internal */
190306
+ tree;
190307
+ /** @internal */
190308
+ get reprojectionTransform() {
190309
+ return this._reprojectionTransform;
190310
+ }
190311
+ /** @internal */
190253
190312
  constructor(props, tree) {
190254
190313
  super(props, tree);
190255
190314
  this.transformToRoot = props.transformToRoot;
@@ -190258,6 +190317,7 @@ class RealityTile extends _internal__WEBPACK_IMPORTED_MODULE_5__.Tile {
190258
190317
  this.rangeCorners = props.rangeCorners;
190259
190318
  this.region = props.region;
190260
190319
  this._geometricError = props.geometricError;
190320
+ this.tree = tree;
190261
190321
  if (undefined === this.transformToRoot)
190262
190322
  return;
190263
190323
  // Can transform be non-rigid?? -- if so would have to handle (readonly) radius.
@@ -190918,6 +190978,9 @@ class RealityTileTree extends _internal__WEBPACK_IMPORTED_MODULE_6__.TileTree {
190918
190978
  _ecefToDb;
190919
190979
  /** @internal */
190920
190980
  baseUrl;
190981
+ /** If set to true, tile geometry will be reprojected using the tile's reprojection transform when geometry is collected.
190982
+ * @internal */
190983
+ reprojectGeometry;
190921
190984
  /** @internal */
190922
190985
  constructor(params) {
190923
190986
  super(params);
@@ -190936,6 +190999,7 @@ class RealityTileTree extends _internal__WEBPACK_IMPORTED_MODULE_6__.TileTree {
190936
190999
  }
190937
191000
  }
190938
191001
  this.baseUrl = params.baseUrl;
191002
+ this.reprojectGeometry = params.reprojectGeometry;
190939
191003
  }
190940
191004
  /** The mapping of per-feature JSON properties from this tile tree's batch table, if one is defined.
190941
191005
  * @beta
@@ -194301,6 +194365,10 @@ var TileGraphicType;
194301
194365
  * @extensions
194302
194366
  */
194303
194367
  class TileTreeReference /* implements RenderMemory.Consumer */ {
194368
+ /** If set to true, tile geometry will be reprojected using the tile's reprojection transform when geometry is collected from the referenced TileTree.
194369
+ * @internal
194370
+ */
194371
+ reprojectGeometry;
194304
194372
  /** Force a new tree owner / tile tree to be created for the current tile tree reference
194305
194373
  * @internal
194306
194374
  */
@@ -194496,7 +194564,7 @@ class TileTreeReference /* implements RenderMemory.Consumer */ {
194496
194564
  * Return `undefined` if geometry collection is not supported.
194497
194565
  * @see [[createGeometryTreeReference]].
194498
194566
  */
194499
- _createGeometryTreeReference() {
194567
+ _createGeometryTreeReference(_options) {
194500
194568
  return undefined;
194501
194569
  }
194502
194570
  /** If defined, supplies the implementation of [[GeometryTileTreeReference.collectTileGeometry]].
@@ -194521,12 +194589,14 @@ class TileTreeReference /* implements RenderMemory.Consumer */ {
194521
194589
  * Currently, only terrain and reality model tiles support geometry collection.
194522
194590
  * @note Do not override this method - override [[_createGeometryTreeReference]] instead.
194523
194591
  */
194524
- createGeometryTreeReference() {
194592
+ createGeometryTreeReference(options) {
194525
194593
  if (this.collectTileGeometry) {
194526
194594
  // Unclear why compiler doesn't detect that `this` satisfies the GeometryTileTreeReference interface...it must be looking only at the types, not this particular instance.
194527
- return this;
194595
+ const ref = this;
194596
+ ref.reprojectGeometry = options?.reprojectGeometry;
194597
+ return ref;
194528
194598
  }
194529
- return this._createGeometryTreeReference();
194599
+ return this._createGeometryTreeReference(options);
194530
194600
  }
194531
194601
  /** Create a [[TileTreeReference]] that displays a pre-defined [[RenderGraphic]].
194532
194602
  * The reference can be used to add dynamic content to a [[Viewport]]'s scene as a [[TiledGraphicsProvider]], as in the following example:
@@ -202422,6 +202492,8 @@ class ViewClipTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_8__.Primitive
202422
202492
  zHigh = projection;
202423
202493
  }
202424
202494
  }
202495
+ if (undefined === zLow || undefined === zHigh)
202496
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range1d.createNull();
202425
202497
  return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range1d.createXX(zLow, zHigh);
202426
202498
  }
202427
202499
  /** @internal */
@@ -202730,8 +202802,11 @@ class ViewClipByShapeTool extends ViewClipTool {
202730
202802
  points.push(pt.clone());
202731
202803
  if (undefined === this._matrix)
202732
202804
  return points;
202805
+ const vp = ev.viewport;
202806
+ if (undefined === vp)
202807
+ return points;
202733
202808
  const normal = this._matrix.getColumn(2);
202734
- let currentPt = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToPlaneInView(ev.point, points[0], normal, ev.viewport, true);
202809
+ let currentPt = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToPlaneInView(ev.point, points[0], normal, vp, true);
202735
202810
  if (undefined === currentPt)
202736
202811
  currentPt = ev.point.clone();
202737
202812
  if (2 === points.length && !ev.isControlKey) {
@@ -202740,7 +202815,7 @@ class ViewClipByShapeTool extends ViewClipTool {
202740
202815
  xDir.normalizeInPlace();
202741
202816
  const yDir = xDir.crossProduct(normal);
202742
202817
  yDir.normalizeInPlace();
202743
- const cornerPt = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToLineInView(currentPt, points[1], yDir, ev.viewport, true);
202818
+ const cornerPt = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToLineInView(currentPt, points[1], yDir, vp, true);
202744
202819
  if (undefined !== cornerPt) {
202745
202820
  points.push(cornerPt);
202746
202821
  cornerPt.plusScaled(xDir, -xLen, currentPt);
@@ -202807,7 +202882,8 @@ class ViewClipByShapeTool extends ViewClipTool {
202807
202882
  return _Tool__WEBPACK_IMPORTED_MODULE_9__.EventHandled.No;
202808
202883
  const currPt = ev.point.clone();
202809
202884
  if (this._points.length > 0) {
202810
- const planePt = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToPlaneInView(currPt, this._points[0], this._matrix.getColumn(2), ev.viewport, true);
202885
+ const vp = ev.viewport;
202886
+ const planePt = (vp ? _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToPlaneInView(currPt, this._points[0], this._matrix.getColumn(2), vp, true) : undefined);
202811
202887
  if (undefined !== planePt)
202812
202888
  currPt.setFrom(planePt);
202813
202889
  }
@@ -203333,6 +203409,8 @@ class ViewClipDecoration extends _EditManipulator__WEBPACK_IMPORTED_MODULE_7__.E
203333
203409
  if (compressed.length < clipShape.polygon.length) {
203334
203410
  clip = clip.clone();
203335
203411
  clipShape = ViewClipTool.isSingleClipShape(clip);
203412
+ if (undefined === clipShape)
203413
+ return false;
203336
203414
  clipShape.setPolygon(compressed);
203337
203415
  this._clipView.view.setViewClip(clip);
203338
203416
  }
@@ -203735,7 +203813,7 @@ class ViewClipDecoration extends _EditManipulator__WEBPACK_IMPORTED_MODULE_7__.E
203735
203813
  if (this._clipView !== vp)
203736
203814
  return;
203737
203815
  if (undefined !== this._clipShape) {
203738
- 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);
203816
+ 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);
203739
203817
  }
203740
203818
  else if (undefined !== this._clipPlanes) {
203741
203819
  if (undefined !== this._clipPlanesLoops)
@@ -203780,9 +203858,12 @@ class ViewClipDecoration extends _EditManipulator__WEBPACK_IMPORTED_MODULE_7__.E
203780
203858
  }
203781
203859
  }
203782
203860
  }
203783
- else if (undefined !== this._controls[iFace].floatingOrigin && vp.isPointVisibleXY(this._controls[iFace].floatingOrigin, _CoordSystem__WEBPACK_IMPORTED_MODULE_4__.CoordSystem.World, 0.1)) {
203784
- this._controls[iFace].origin.setFrom(this._controls[iFace].floatingOrigin);
203785
- this._controls[iFace].floatingOrigin = undefined;
203861
+ else {
203862
+ const floatingOrigin = this._controls[iFace].floatingOrigin;
203863
+ if (undefined !== floatingOrigin && vp.isPointVisibleXY(floatingOrigin, _CoordSystem__WEBPACK_IMPORTED_MODULE_4__.CoordSystem.World, 0.1)) {
203864
+ this._controls[iFace].origin.setFrom(this._controls[iFace].floatingOrigin);
203865
+ this._controls[iFace].floatingOrigin = undefined;
203866
+ }
203786
203867
  }
203787
203868
  }
203788
203869
  const anchorRay = ViewClipTool.getClipRayTransformed(this._controls[iFace].origin, this._controls[iFace].direction, undefined !== this._clipShape ? this._clipShape.transformFromClip : undefined);
@@ -204349,6 +204430,8 @@ class ElementAgenda {
204349
204430
  return;
204350
204431
  }
204351
204432
  const group = this.groupMarks.pop();
204433
+ if (undefined === group)
204434
+ return;
204352
204435
  this.setEntriesHiliteState(false, group.start, this.length); // make sure removed entries aren't left hilited...
204353
204436
  this.elements.splice(group.start);
204354
204437
  }
@@ -205471,8 +205554,11 @@ class IdleTool extends _Tool__WEBPACK_IMPORTED_MODULE_1__.InteractiveTool {
205471
205554
  return _Tool__WEBPACK_IMPORTED_MODULE_1__.EventHandled.Yes;
205472
205555
  }
205473
205556
  else if (ev.isDoubleTap) {
205557
+ const vp = ev.viewport;
205558
+ if (undefined === vp)
205559
+ return _Tool__WEBPACK_IMPORTED_MODULE_1__.EventHandled.No;
205474
205560
  // Fit view on single finger double tap.
205475
- const tool = new _ViewTool__WEBPACK_IMPORTED_MODULE_2__.FitViewTool(ev.viewport, true);
205561
+ const tool = new _ViewTool__WEBPACK_IMPORTED_MODULE_2__.FitViewTool(vp, true);
205476
205562
  return await tool.run() ? _Tool__WEBPACK_IMPORTED_MODULE_1__.EventHandled.Yes : _Tool__WEBPACK_IMPORTED_MODULE_1__.EventHandled.No;
205477
205563
  }
205478
205564
  return _Tool__WEBPACK_IMPORTED_MODULE_1__.EventHandled.No;
@@ -206045,7 +206131,8 @@ class MeasureDistanceTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Pr
206045
206131
  if (undefined !== snap) {
206046
206132
  if (undefined !== snap.primitive) {
206047
206133
  const locDetail = snap.primitive.closestPoint(point, false);
206048
- 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)))) {
206134
+ const snapPlane = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Plane3dByOriginAndUnitNormal.create(point, undefined !== snap.normal ? snap.normal : normal);
206135
+ if (undefined !== locDetail && (_HitDetail__WEBPACK_IMPORTED_MODULE_5__.HitGeomType.Segment === snap.geomType || (snapPlane && snap.primitive.isInPlane(snapPlane)))) {
206049
206136
  const locRay = snap.primitive.fractionToPointAndUnitTangent(locDetail.fraction);
206050
206137
  tangent.setFrom(locRay.direction);
206051
206138
  if (undefined !== snap.normal)
@@ -206565,7 +206652,8 @@ class MeasureAreaByPointsTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9_
206565
206652
  return _Tool__WEBPACK_IMPORTED_MODULE_10__.EventHandled.No;
206566
206653
  const currPt = ev.point.clone();
206567
206654
  if (this._points.length > 0) {
206568
- const planePt = _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToPlaneInView(currPt, this._points[0], this._matrix.getColumn(2), ev.viewport, true);
206655
+ const vp = ev.viewport;
206656
+ const planePt = (vp ? _AccuDraw__WEBPACK_IMPORTED_MODULE_3__.AccuDrawHintBuilder.projectPointToPlaneInView(currPt, this._points[0], this._matrix.getColumn(2), vp, true) : undefined);
206569
206657
  if (undefined !== planePt)
206570
206658
  currPt.setFrom(planePt);
206571
206659
  }
@@ -207067,8 +207155,9 @@ class PrimitiveTool extends _Tool__WEBPACK_IMPORTED_MODULE_4__.InteractiveTool {
207067
207155
  if (view.isSpatialView() && this.targetView.view.isSpatialView())
207068
207156
  return true; // No specific target, two spatial views are considered compatible.
207069
207157
  let allowView = false;
207158
+ const targetView = this.targetView;
207070
207159
  view.forEachModel((model) => {
207071
- if (!allowView && this.targetView.view.viewsModel(model.id))
207160
+ if (!allowView && targetView.view.viewsModel(model.id))
207072
207161
  allowView = true;
207073
207162
  });
207074
207163
  return allowView; // Accept if this view shares a model in common with target.
@@ -209025,11 +209114,15 @@ class CurrentInputState {
209025
209114
  }
209026
209115
  updateDownPoint(ev) { this.button[ev.button].downUorPt = ev.point; }
209027
209116
  onButtonDown(button) {
209028
- const viewPt = this.viewport.worldToView(this.button[button].downRawPt);
209029
- const center = this.viewport.npcToView(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.NpcCenter);
209030
- viewPt.z = center.z;
209117
+ let isDoubleClick = false;
209031
209118
  const now = Date.now();
209032
- 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));
209119
+ const vp = this.viewport;
209120
+ if (undefined !== vp) {
209121
+ const viewPt = vp.worldToView(this.button[button].downRawPt);
209122
+ const center = vp.npcToView(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.NpcCenter);
209123
+ viewPt.z = center.z;
209124
+ 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));
209125
+ }
209033
209126
  this.button[button].init(this.point, this.rawPoint, now, true, isDoubleClick, false, this.inputSource);
209034
209127
  this.lastButton = button;
209035
209128
  }
@@ -209108,10 +209201,13 @@ class CurrentInputState {
209108
209201
  return false;
209109
209202
  if ((Date.now() - state.downTime) <= _ToolSettings__WEBPACK_IMPORTED_MODULE_14__.ToolSettings.startDragDelay.milliseconds)
209110
209203
  return false;
209111
- const viewPt = this.viewport.worldToView(state.downRawPt);
209204
+ const vp = this.viewport;
209205
+ if (undefined === vp)
209206
+ return false;
209207
+ const viewPt = vp.worldToView(state.downRawPt);
209112
209208
  const deltaX = Math.abs(this._viewPoint.x - viewPt.x);
209113
209209
  const deltaY = Math.abs(this._viewPoint.y - viewPt.y);
209114
- return ((deltaX + deltaY) > this.viewport.pixelsFromInches(_ToolSettings__WEBPACK_IMPORTED_MODULE_14__.ToolSettings.startDragDistanceInches));
209210
+ return ((deltaX + deltaY) > vp.pixelsFromInches(_ToolSettings__WEBPACK_IMPORTED_MODULE_14__.ToolSettings.startDragDistanceInches));
209115
209211
  }
209116
209212
  }
209117
209213
  /** Controls the operation of [[Tool]]s, administering the current [[ViewTool]], [[PrimitiveTool]], and [[IdleTool]] and forwarding events to the appropriate tool.
@@ -209278,9 +209374,11 @@ class ToolAdmin {
209278
209374
  ToolAdmin._toolEvents = ToolAdmin._toolEvents.filter((ev) => ev.vp !== vp);
209279
209375
  }
209280
209376
  getMousePosition(event) {
209377
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
209281
209378
  return event.vp.mousePosFromEvent(event.ev);
209282
209379
  }
209283
209380
  getMouseMovement(event) {
209381
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
209284
209382
  return event.vp.mouseMovementFromEvent(event.ev);
209285
209383
  }
209286
209384
  getMouseButton(button) {
@@ -209292,6 +209390,7 @@ class ToolAdmin {
209292
209390
  }
209293
209391
  async onMouseButton(event, isDown) {
209294
209392
  const ev = event.ev;
209393
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
209295
209394
  const vp = event.vp;
209296
209395
  const pos = this.getMousePosition(event);
209297
209396
  const button = this.getMouseButton(ev.button);
@@ -209301,7 +209400,7 @@ class ToolAdmin {
209301
209400
  async onWheel(event) {
209302
209401
  const ev = event.ev;
209303
209402
  const vp = event.vp;
209304
- if (this.filterViewport(vp))
209403
+ if (undefined === vp || this.filterViewport(vp))
209305
209404
  return _Tool__WEBPACK_IMPORTED_MODULE_13__.EventHandled.Yes;
209306
209405
  const current = this.currentInputState;
209307
209406
  current.setKeyQualifiers(ev);
@@ -209334,7 +209433,9 @@ class ToolAdmin {
209334
209433
  return _Tool__WEBPACK_IMPORTED_MODULE_13__.EventHandled.Yes;
209335
209434
  }
209336
209435
  async sendTapEvent(touchEv) {
209337
- touchEv.viewport.setAnimator();
209436
+ const vp = touchEv.viewport;
209437
+ if (undefined !== vp)
209438
+ vp.setAnimator();
209338
209439
  const overlayHit = this.pickCanvasDecoration(touchEv);
209339
209440
  if (undefined !== overlayHit && undefined !== overlayHit.onMouseButton && overlayHit.onMouseButton(touchEv))
209340
209441
  return _Tool__WEBPACK_IMPORTED_MODULE_13__.EventHandled.Yes;
@@ -209361,7 +209462,7 @@ class ToolAdmin {
209361
209462
  async onTouch(event) {
209362
209463
  const touchEvent = event.ev;
209363
209464
  const vp = event.vp;
209364
- if (this.filterViewport(vp))
209465
+ if (undefined === vp || this.filterViewport(vp))
209365
209466
  return;
209366
209467
  const ev = new _Tool__WEBPACK_IMPORTED_MODULE_13__.BeTouchEvent({ touchEvent });
209367
209468
  const current = this.currentInputState;
@@ -209500,6 +209601,7 @@ class ToolAdmin {
209500
209601
  case "mouseup": return this.onMouseButton(event, false);
209501
209602
  case "mousemove": return this.onMouseMove(event);
209502
209603
  case "mouseover": return this.onMouseEnter(event);
209604
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
209503
209605
  case "mouseout": return this.onMouseLeave(event.vp);
209504
209606
  case "wheel": return this.onWheel(event);
209505
209607
  case "keydown": return this.onKeyTransition(event, true);
@@ -209676,6 +209778,8 @@ class ToolAdmin {
209676
209778
  }
209677
209779
  pickCanvasDecoration(ev) {
209678
209780
  const vp = ev.viewport;
209781
+ if (undefined === vp)
209782
+ return undefined;
209679
209783
  const decoration = (undefined === this.viewTool) ? vp.pickCanvasDecoration(ev.viewPoint) : undefined;
209680
209784
  this.setCanvasDecoration(vp, decoration, ev);
209681
209785
  return decoration;
@@ -209801,6 +209905,8 @@ class ToolAdmin {
209801
209905
  }
209802
209906
  async onMouseMove(event) {
209803
209907
  const vp = event.vp;
209908
+ if (undefined === vp)
209909
+ return;
209804
209910
  const pos = this.getMousePosition(event);
209805
209911
  const mov = this.getMouseMovement(event);
209806
209912
  // Sometimes the mouse goes down in a view, but we lose focus while its down so we never receive the up event.
@@ -210352,30 +210458,48 @@ class ToolAdmin {
210352
210458
  setAdjustedDataPoint(ev) { this.currentInputState.adjustLastDataPoint(ev); }
210353
210459
  /** Can be called by tools that wish to emulate mouse button down/up events for onTouchTap. */
210354
210460
  async convertTouchTapToButtonDownAndUp(ev, button = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeButton.Data) {
210461
+ const vp = ev.viewport;
210462
+ if (undefined === vp)
210463
+ return;
210355
210464
  const pt2d = ev.viewPoint;
210356
- await this.onButtonDown(ev.viewport, pt2d, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
210357
- return this.onButtonUp(ev.viewport, pt2d, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
210465
+ await this.onButtonDown(vp, pt2d, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
210466
+ return this.onButtonUp(vp, pt2d, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
210358
210467
  }
210359
210468
  /** Can be called by tools that wish to emulate moving the mouse with a button depressed for onTouchMoveStart.
210360
210469
  * @note Calls the tool's onMouseStartDrag method from onMotion.
210361
210470
  */
210362
210471
  async convertTouchMoveStartToButtonDownAndMotion(startEv, ev, button = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeButton.Data) {
210363
- await this.onButtonDown(startEv.viewport, startEv.viewPoint, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
210364
- return this.onMotion(ev.viewport, ev.viewPoint, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch, true);
210472
+ const startVp = startEv.viewport;
210473
+ if (undefined === startVp)
210474
+ return;
210475
+ const vp = ev.viewport;
210476
+ if (undefined === vp)
210477
+ return;
210478
+ await this.onButtonDown(startVp, startEv.viewPoint, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
210479
+ return this.onMotion(vp, ev.viewPoint, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch, true);
210365
210480
  }
210366
210481
  /** Can be called by tools that wish to emulate pressing the mouse button for onTouchStart or onTouchMoveStart. */
210367
210482
  async convertTouchStartToButtonDown(ev, button = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeButton.Data) {
210368
- return this.onButtonDown(ev.viewport, ev.viewPoint, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
210483
+ const vp = ev.viewport;
210484
+ if (undefined === vp)
210485
+ return;
210486
+ return this.onButtonDown(vp, ev.viewPoint, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
210369
210487
  }
210370
210488
  /** Can be called by tools that wish to emulate releasing the mouse button for onTouchEnd or onTouchComplete.
210371
210489
  * @note Calls the tool's onMouseEndDrag method if convertTouchMoveStartToButtonDownAndMotion was called for onTouchMoveStart.
210372
210490
  */
210373
210491
  async convertTouchEndToButtonUp(ev, button = _Tool__WEBPACK_IMPORTED_MODULE_13__.BeButton.Data) {
210374
- return this.onButtonUp(ev.viewport, ev.viewPoint, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
210492
+ const vp = ev.viewport;
210493
+ if (undefined === vp)
210494
+ return;
210495
+ return this.onButtonUp(vp, ev.viewPoint, button, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
210375
210496
  }
210376
210497
  /** Can be called by tools that wish to emulate a mouse motion event for onTouchMove. */
210377
210498
  async convertTouchMoveToMotion(ev) {
210378
- return this.onMotion(ev.viewport, ev.viewPoint, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
210499
+ const vp = ev.viewport;
210500
+ if (undefined === vp)
210501
+ return;
210502
+ return this.onMotion(vp, ev.viewPoint, _Tool__WEBPACK_IMPORTED_MODULE_13__.InputSource.Touch);
210379
210503
  }
210380
210504
  /** Can be called by tools to invoke their [[InteractiveTool.onDynamicFrame]] method without requiring a motion event. */
210381
210505
  simulateMotionEvent() {
@@ -211080,11 +211204,13 @@ class ViewingToolHandle {
211080
211204
  }
211081
211205
  // if we have a valid depth point, set the focus distance to
211082
211206
  changeFocusFromDepthPoint() {
211083
- if (undefined !== this._depthPoint) {
211084
- const view = this.viewTool.viewport.view;
211085
- if (view.is3d() && view.isCameraOn)
211086
- view.changeFocusFromPoint(this._depthPoint); // set the focus distance to the depth point
211087
- }
211207
+ if (undefined === this._depthPoint)
211208
+ return;
211209
+ const view = this.viewTool.viewport?.view;
211210
+ if (undefined === view)
211211
+ return;
211212
+ if (view.is3d() && view.isCameraOn)
211213
+ view.changeFocusFromPoint(this._depthPoint); // set the focus distance to the depth point
211088
211214
  }
211089
211215
  }
211090
211216
  /** @internal */
@@ -211574,11 +211700,15 @@ class ViewManip extends ViewTool {
211574
211700
  return inDynamics || (doUpdate && hitHandle.checkOneShot());
211575
211701
  }
211576
211702
  lensAngleMatches(angle, tolerance) {
211577
- const cameraView = this.viewport.view;
211703
+ const cameraView = this.viewport?.view;
211704
+ if (undefined === cameraView)
211705
+ return false;
211578
211706
  return !cameraView.is3d() ? false : Math.abs(cameraView.calcLensAngle().radians - angle.radians) < tolerance;
211579
211707
  }
211580
211708
  get isZUp() {
211581
- const view = this.viewport.view;
211709
+ const view = this.viewport?.view;
211710
+ if (undefined === view)
211711
+ return true;
211582
211712
  const viewX = view.getXVector();
211583
211713
  const viewY = view.getXVector();
211584
211714
  const zVec = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ();
@@ -211721,9 +211851,12 @@ class ViewTargetCenter extends ViewingToolHandle {
211721
211851
  testHandleForHit(ptScreen, out) {
211722
211852
  if (this.viewTool.isDraggingRequired)
211723
211853
  return false; // Target center handle is not movable in this mode, but it's still nice to display the point we're rotating about...
211724
- const targetPt = this.viewTool.viewport.worldToView(this.viewTool.targetCenterWorld);
211854
+ const vp = this.viewTool.viewport;
211855
+ if (undefined === vp)
211856
+ return false;
211857
+ const targetPt = vp.worldToView(this.viewTool.targetCenterWorld);
211725
211858
  const distance = targetPt.distanceXY(ptScreen);
211726
- const locateThreshold = this.viewTool.viewport.pixelsFromInches(0.15);
211859
+ const locateThreshold = vp.pixelsFromInches(0.15);
211727
211860
  if (distance > locateThreshold)
211728
211861
  return false;
211729
211862
  out.distance = distance;
@@ -211800,7 +211933,10 @@ class HandleWithInertia extends ViewingToolHandle {
211800
211933
  doManipulation(ev, inDynamics) {
211801
211934
  if (_ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.viewingInertia.enabled && !inDynamics && undefined !== this._inertiaVec)
211802
211935
  return this.beginAnimation();
211803
- const thisPtNpc = ev.viewport.worldToNpc(ev.point);
211936
+ const vp = ev.viewport;
211937
+ if (undefined === vp)
211938
+ return false;
211939
+ const thisPtNpc = vp.worldToNpc(ev.point);
211804
211940
  thisPtNpc.z = this._lastPtNpc.z;
211805
211941
  this._inertiaVec = undefined;
211806
211942
  if (this._lastPtNpc.isAlmostEqual(thisPtNpc, 1.0e-10))
@@ -211813,7 +211949,9 @@ class HandleWithInertia extends ViewingToolHandle {
211813
211949
  this._duration = _ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.viewingInertia.duration;
211814
211950
  if (this._duration.isTowardsFuture) { // ensure duration is towards future. Otherwise, don't start animation
211815
211951
  this._end = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeTimePoint.fromNow(this._duration);
211816
- this.viewTool.viewport.setAnimator(this);
211952
+ const vp = this.viewTool.viewport;
211953
+ if (undefined !== vp)
211954
+ vp.setAnimator(this);
211817
211955
  }
211818
211956
  return true;
211819
211957
  }
@@ -211827,7 +211965,10 @@ class HandleWithInertia extends ViewingToolHandle {
211827
211965
  const pt = this._lastPtNpc.plusScaled(this._inertiaVec, remaining);
211828
211966
  // if we're not moving any more, or if the duration has elapsed, we're done
211829
211967
  if (remaining <= 0 || (this._lastPtNpc.minus(pt).magnitudeSquared() < .000001)) {
211830
- this.viewTool.viewport.saveViewUndo();
211968
+ const vp = this.viewTool.viewport;
211969
+ if (undefined === vp)
211970
+ return false;
211971
+ vp.saveViewUndo();
211831
211972
  return true; // remove this as the animator
211832
211973
  }
211833
211974
  this.perform(pt); // perform the viewing operation
@@ -211841,10 +211982,12 @@ class ViewPan extends HandleWithInertia {
211841
211982
  get handleType() { return ViewHandleType.Pan; }
211842
211983
  getHandleCursor() { return this.viewTool.inHandleModify ? _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.viewManager.grabbingCursor : _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.viewManager.grabCursor; }
211843
211984
  firstPoint(ev) {
211985
+ this._inertiaVec = undefined;
211844
211986
  const tool = this.viewTool;
211845
211987
  const vp = tool.viewport;
211988
+ if (undefined === vp)
211989
+ return false;
211846
211990
  vp.worldToNpc(ev.point, this._lastPtNpc);
211847
- this._inertiaVec = undefined;
211848
211991
  // if the camera is on, we need to find the element under the starting point to get the z
211849
211992
  if (this.needDepthPoint(ev, false)) {
211850
211993
  this.pickDepthPoint(ev);
@@ -211866,6 +212009,8 @@ class ViewPan extends HandleWithInertia {
211866
212009
  perform(thisPtNpc) {
211867
212010
  const tool = this.viewTool;
211868
212011
  const vp = tool.viewport;
212012
+ if (undefined === vp)
212013
+ return false;
211869
212014
  const view = vp.view;
211870
212015
  const lastWorld = vp.npcToWorld(this._lastPtNpc);
211871
212016
  const thisWorld = vp.npcToWorld(thisPtNpc);
@@ -211884,7 +212029,10 @@ class ViewPan extends HandleWithInertia {
211884
212029
  }
211885
212030
  /** @internal */
211886
212031
  needDepthPoint(ev, _isPreview) {
211887
- return ev.viewport.isCameraOn && _Tool__WEBPACK_IMPORTED_MODULE_18__.CoordSource.User === ev.coordsFrom;
212032
+ const vp = ev.viewport;
212033
+ if (undefined === vp)
212034
+ return false;
212035
+ return vp.isCameraOn && _Tool__WEBPACK_IMPORTED_MODULE_18__.CoordSource.User === ev.coordsFrom;
211888
212036
  }
211889
212037
  }
211890
212038
  /** ViewingToolHandle for performing the "rotate view" operation */
@@ -211903,6 +212051,8 @@ class ViewRotate extends HandleWithInertia {
211903
212051
  this._inertiaVec = undefined;
211904
212052
  const tool = this.viewTool;
211905
212053
  const vp = ev.viewport;
212054
+ if (undefined === vp)
212055
+ return false;
211906
212056
  this.pickDepthPoint(ev);
211907
212057
  if (undefined !== this._depthPoint)
211908
212058
  tool.setTargetCenterWorld(this._depthPoint, false, false);
@@ -211917,6 +212067,8 @@ class ViewRotate extends HandleWithInertia {
211917
212067
  perform(ptNpc) {
211918
212068
  const tool = this.viewTool;
211919
212069
  const vp = tool.viewport;
212070
+ if (undefined === vp)
212071
+ return false;
211920
212072
  if (this._anchorPtNpc.isAlmostEqual(ptNpc, 1.0e-2)) // too close to anchor pt
211921
212073
  ptNpc.setFrom(this._anchorPtNpc);
211922
212074
  const currentFrustum = vp.getFrustum(_CoordSystem__WEBPACK_IMPORTED_MODULE_6__.CoordSystem.World, false);
@@ -211952,8 +212104,8 @@ class ViewRotate extends HandleWithInertia {
211952
212104
  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);
211953
212105
  // Movement in screen y == rotation about screen X...
211954
212106
  const yAxis = vp.rotation.getRow(0);
211955
- 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;
211956
- 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;
212107
+ 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;
212108
+ 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;
211957
212109
  const worldRMatrix = yRMatrix.multiplyMatrixMatrix(xRMatrix);
211958
212110
  const result = worldRMatrix.getAxisAndAngleOfRotation();
211959
212111
  angle = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(-result.angle.radians);
@@ -211984,11 +212136,14 @@ class ViewRotate extends HandleWithInertia {
211984
212136
  }
211985
212137
  /** @internal */
211986
212138
  needDepthPoint(ev, _isPreview) {
211987
- return (!this.viewTool.targetCenterLocked && ev.viewport.view.allow3dManipulations());
212139
+ const vp = ev.viewport;
212140
+ if (undefined === vp)
212141
+ return false;
212142
+ return (!this.viewTool.targetCenterLocked && vp.view.allow3dManipulations());
211988
212143
  }
211989
212144
  /** @internal */
211990
212145
  adjustDepthPoint(isValid, vp, plane, source) {
211991
- if (vp.viewingGlobe && this.viewTool.isPointVisible(vp.iModel.ecefLocation.earthCenter)) {
212146
+ if (vp.viewingGlobe && vp.iModel.ecefLocation && this.viewTool.isPointVisible(vp.iModel.ecefLocation.earthCenter)) {
211992
212147
  plane.getOriginRef().setFrom(vp.iModel.ecefLocation.earthCenter);
211993
212148
  plane.getNormalRef().setFrom(vp.view.getZVector());
211994
212149
  return true;
@@ -212015,6 +212170,8 @@ class ViewLook extends ViewingToolHandle {
212015
212170
  firstPoint(ev) {
212016
212171
  const tool = this.viewTool;
212017
212172
  const vp = ev.viewport;
212173
+ if (undefined === vp)
212174
+ return true;
212018
212175
  const view = vp.view;
212019
212176
  if (!view || !view.is3d() || !view.allow3dManipulations())
212020
212177
  return false;
@@ -212039,11 +212196,13 @@ class ViewLook extends ViewingToolHandle {
212039
212196
  doManipulation(ev, _inDynamics) {
212040
212197
  const tool = this.viewTool;
212041
212198
  const viewport = tool.viewport;
212199
+ if (undefined === viewport)
212200
+ return false;
212042
212201
  if (ev.viewport !== viewport)
212043
212202
  return false;
212044
212203
  const worldTransform = this.getLookTransform(viewport, this._firstPtView, ev.viewPoint);
212045
212204
  const frustum = this._frustum.transformBy(worldTransform);
212046
- this.viewTool.viewport.setupViewFromFrustum(frustum);
212205
+ viewport.setupViewFromFrustum(frustum);
212047
212206
  return true;
212048
212207
  }
212049
212208
  getLookTransform(vp, firstPt, currPt) {
@@ -212116,7 +212275,8 @@ class AnimatedHandle extends ViewingToolHandle {
212116
212275
  }
212117
212276
  this._lastPtView.setFrom(this._anchorPtView);
212118
212277
  this._lastMotionTime = Date.now();
212119
- tool.viewport.setAnimator(this);
212278
+ if (undefined !== tool.viewport)
212279
+ tool.viewport.setAnimator(this);
212120
212280
  return true;
212121
212281
  }
212122
212282
  getDirection() {
@@ -212125,10 +212285,13 @@ class AnimatedHandle extends ViewingToolHandle {
212125
212285
  return dir.magnitudeSquared() < this._deadZone ? undefined : dir; // dead zone around starting point
212126
212286
  }
212127
212287
  getInputVector() {
212288
+ const vp = this.viewTool.viewport;
212289
+ if (undefined === vp)
212290
+ return undefined;
212128
212291
  const dir = this.getDirection();
212129
212292
  if (undefined === dir)
212130
212293
  return undefined;
212131
- const viewRect = this.viewTool.viewport.viewRect;
212294
+ const viewRect = vp.viewRect;
212132
212295
  return new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d(dir.x * (2.0 / viewRect.width), dir.y * (2.0 / viewRect.height));
212133
212296
  }
212134
212297
  onReinitialize() {
@@ -212204,6 +212367,8 @@ class ViewScroll extends AnimatedHandle {
212204
212367
  dist.scaleInPlace(_ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.scrollSpeed * this.getElapsedTime());
212205
212368
  const tool = this.viewTool;
212206
212369
  const viewport = tool.viewport;
212370
+ if (undefined === viewport)
212371
+ return false;
212207
212372
  if (viewport.isCameraOn) {
212208
212373
  const points = new Array(2);
212209
212374
  points[0] = this._anchorPtView.clone();
@@ -212224,7 +212389,10 @@ class ViewScroll extends AnimatedHandle {
212224
212389
  }
212225
212390
  /** @internal */
212226
212391
  needDepthPoint(ev, _isPreview) {
212227
- return ev.viewport.isCameraOn && _Tool__WEBPACK_IMPORTED_MODULE_18__.CoordSource.User === ev.coordsFrom;
212392
+ const vp = ev.viewport;
212393
+ if (undefined === vp)
212394
+ return false;
212395
+ return vp.isCameraOn && _Tool__WEBPACK_IMPORTED_MODULE_18__.CoordSource.User === ev.coordsFrom;
212228
212396
  }
212229
212397
  }
212230
212398
  /** ViewingToolHandle for performing the "zoom view" operation */
@@ -212274,6 +212442,8 @@ class ViewZoom extends ViewingToolHandle {
212274
212442
  }
212275
212443
  firstPoint(ev) {
212276
212444
  const vp = ev.viewport;
212445
+ if (undefined === vp)
212446
+ return false;
212277
212447
  this.viewTool.inDynamicUpdate = true;
212278
212448
  if (this.needDepthPoint(ev, false)) {
212279
212449
  this.pickDepthPoint(ev);
@@ -212318,6 +212488,8 @@ class ViewZoom extends ViewingToolHandle {
212318
212488
  if (undefined === this._startFrust || undefined === this.getDirection()) // on anchor point?
212319
212489
  return false;
212320
212490
  const viewport = this.viewTool.viewport;
212491
+ if (undefined === viewport)
212492
+ return false;
212321
212493
  const view = viewport.view;
212322
212494
  const thisPtNpc = viewport.viewToNpc(this._lastPtView);
212323
212495
  const dist = this._anchorPtNpc.minus(thisPtNpc);
@@ -212344,7 +212516,10 @@ class ViewZoom extends ViewingToolHandle {
212344
212516
  }
212345
212517
  /** @internal */
212346
212518
  needDepthPoint(ev, _isPreview) {
212347
- return ev.viewport.isCameraOn && _Tool__WEBPACK_IMPORTED_MODULE_18__.CoordSource.User === ev.coordsFrom;
212519
+ const vp = ev.viewport;
212520
+ if (undefined === vp)
212521
+ return false;
212522
+ return vp.isCameraOn && _Tool__WEBPACK_IMPORTED_MODULE_18__.CoordSource.User === ev.coordsFrom;
212348
212523
  }
212349
212524
  }
212350
212525
  /** @internal */
@@ -212408,11 +212583,17 @@ class NavigateMotion {
212408
212583
  const yAngle = -(accumulator.y / yExtent) * Math.PI;
212409
212584
  const viewRot = vp.rotation;
212410
212585
  const invViewRot = viewRot.inverse();
212586
+ if (undefined === invViewRot)
212587
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
212411
212588
  const pitchAngle = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(this.modifyPitchAngleToPreventInversion(yAngle));
212412
212589
  const pitchMatrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitX(), pitchAngle);
212590
+ if (undefined === pitchMatrix)
212591
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
212413
212592
  const pitchTimesView = pitchMatrix.multiplyMatrixMatrix(viewRot);
212414
212593
  const inverseViewTimesPitchTimesView = invViewRot.multiplyMatrixMatrix(pitchTimesView);
212415
212594
  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));
212595
+ if (undefined === yawMatrix)
212596
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
212416
212597
  const yawTimesInverseViewTimesPitchTimesView = yawMatrix.multiplyMatrixMatrix(inverseViewTimesPitchTimesView);
212417
212598
  return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createFixedPointAndMatrix(view.getEyePoint(), yawTimesInverseViewTimesPitchTimesView, result);
212418
212599
  }
@@ -212423,11 +212604,17 @@ class NavigateMotion {
212423
212604
  return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
212424
212605
  const viewRot = vp.rotation;
212425
212606
  const invViewRot = viewRot.inverse();
212607
+ if (undefined === invViewRot)
212608
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
212426
212609
  const pitchAngle = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(this.modifyPitchAngleToPreventInversion(pitchRate * this._seconds));
212427
212610
  const pitchMatrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Matrix3d.createRotationAroundVector(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitX(), pitchAngle);
212611
+ if (undefined === pitchMatrix)
212612
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
212428
212613
  const pitchTimesView = pitchMatrix.multiplyMatrixMatrix(viewRot);
212429
212614
  const inverseViewTimesPitchTimesView = invViewRot.multiplyMatrixMatrix(pitchTimesView);
212430
212615
  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));
212616
+ if (undefined === yawMatrix)
212617
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createIdentity();
212431
212618
  const yawTimesInverseViewTimesPitchTimesView = yawMatrix.multiplyMatrixMatrix(inverseViewTimesPitchTimesView);
212432
212619
  return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createFixedPointAndMatrix(view.getEyePoint(), yawTimesInverseViewTimesPitchTimesView, result);
212433
212620
  }
@@ -212485,6 +212672,8 @@ class NavigateMotion {
212485
212672
  if (!view.is3d() || !view.isCameraOn)
212486
212673
  return;
212487
212674
  const angles = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.YawPitchRollAngles.createFromMatrix3d(this.viewport.rotation);
212675
+ if (undefined === angles)
212676
+ return;
212488
212677
  angles.pitch.setRadians(0); // reset pitch to zero
212489
212678
  _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createFixedPointAndMatrix(view.getEyePoint(), angles.toMatrix3d(), this.transform);
212490
212679
  }
@@ -212497,7 +212686,7 @@ class ViewNavigate extends AnimatedHandle {
212497
212686
  getMaxAngularVelocity() { return Math.PI / 4; }
212498
212687
  getNavigateMode() {
212499
212688
  const state = _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.toolAdmin.currentInputState;
212500
- return (state.isShiftDown || !this.viewTool.viewport.isCameraOn) ? 0 /* NavigateMode.Pan */ :
212689
+ return (state.isShiftDown || (false === this.viewTool.viewport?.isCameraOn)) ? 0 /* NavigateMode.Pan */ :
212501
212690
  state.isControlDown ? 1 /* NavigateMode.Look */ : 2 /* NavigateMode.Travel */;
212502
212691
  }
212503
212692
  // called in animation loop
@@ -212507,6 +212696,8 @@ class ViewNavigate extends AnimatedHandle {
212507
212696
  const motion = this.getNavigateMotion(this.getElapsedTime());
212508
212697
  if (undefined !== motion) {
212509
212698
  const vp = this.viewTool.viewport;
212699
+ if (undefined === vp)
212700
+ return false;
212510
212701
  const frust = vp.getWorldFrustum();
212511
212702
  frust.multiply(motion.transform);
212512
212703
  vp.setupViewFromFrustum(frust);
@@ -212578,6 +212769,7 @@ class ViewLookAndMove extends ViewNavigate {
212578
212769
  _pointerLockKeyEngagementListener;
212579
212770
  constructor(viewManip) {
212580
212771
  super(viewManip);
212772
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
212581
212773
  this._navigateMotion = new NavigateMotion(this.viewTool.viewport);
212582
212774
  }
212583
212775
  get handleType() { return ViewHandleType.LookAndMove; }
@@ -212700,10 +212892,10 @@ class ViewLookAndMove extends ViewNavigate {
212700
212892
  getMaxAngularVelocityY() { return this.getMaxAngularVelocity(); }
212701
212893
  getLinearVelocity() {
212702
212894
  const positionInput = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
212703
- const vp = this.viewTool.viewport;
212704
212895
  const position = this.getTouchStartPosition(this._touchStartL);
212705
212896
  if (undefined !== position) {
212706
- const outerRadius = this.getTouchControlRadius(vp);
212897
+ const vp = this.viewTool.viewport;
212898
+ const outerRadius = vp ? this.getTouchControlRadius(vp) : 1;
212707
212899
  const offset = this.getTouchOffset(this._touchStartL, outerRadius);
212708
212900
  const inputL = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d(offset.x * (1.0 / outerRadius), offset.y * (1.0 / outerRadius));
212709
212901
  positionInput.x = inputL.x * this.getMaxLinearVelocity();
@@ -212718,10 +212910,10 @@ class ViewLookAndMove extends ViewNavigate {
212718
212910
  }
212719
212911
  getAngularVelocity() {
212720
212912
  const angularInput = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.create();
212721
- const vp = this.viewTool.viewport;
212722
212913
  const position = this.getTouchStartPosition(this._touchStartR);
212723
212914
  if (undefined !== position) {
212724
- const outerRadius = this.getTouchControlRadius(vp);
212915
+ const vp = this.viewTool.viewport;
212916
+ const outerRadius = vp ? this.getTouchControlRadius(vp) : 1;
212725
212917
  const offset = this.getTouchOffset(this._touchStartR, outerRadius);
212726
212918
  const inputA = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d(offset.x * (1.0 / outerRadius), offset.y * (1.0 / outerRadius));
212727
212919
  angularInput.x = inputA.x * -this.getMaxAngularVelocityX();
@@ -212974,7 +213166,8 @@ class ViewLookAndMove extends ViewNavigate {
212974
213166
  if (tool.inDynamicUpdate)
212975
213167
  return;
212976
213168
  tool.changeViewport(vp);
212977
- tool.viewport.setAnimator(this);
213169
+ if (undefined !== tool.viewport)
213170
+ tool.viewport.setAnimator(this);
212978
213171
  tool.inDynamicUpdate = true;
212979
213172
  tool.inHandleModify = true;
212980
213173
  vp.npcToView(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.NpcCenter, this._anchorPtView);
@@ -213139,6 +213332,8 @@ class ViewLookAndMove extends ViewNavigate {
213139
213332
  const position = this.getTouchStartPosition(touchStart);
213140
213333
  if (undefined === position)
213141
213334
  return offset;
213335
+ if (undefined === touchStart?.viewport)
213336
+ return offset;
213142
213337
  const lastTouch = _Tool__WEBPACK_IMPORTED_MODULE_18__.BeTouchEvent.findTouchById(this._touchLast.touchEvent.targetTouches, touchStart.touchEvent.changedTouches[0].identifier);
213143
213338
  if (undefined === lastTouch)
213144
213339
  return offset;
@@ -213354,6 +213549,7 @@ class ViewWalk extends ViewNavigate {
213354
213549
  _navigateMotion;
213355
213550
  constructor(viewManip) {
213356
213551
  super(viewManip);
213552
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
213357
213553
  this._navigateMotion = new NavigateMotion(this.viewTool.viewport);
213358
213554
  }
213359
213555
  get handleType() { return ViewHandleType.Walk; }
@@ -213388,6 +213584,7 @@ class ViewFly extends ViewNavigate {
213388
213584
  _navigateMotion;
213389
213585
  constructor(viewManip) {
213390
213586
  super(viewManip);
213587
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
213391
213588
  this._navigateMotion = new NavigateMotion(this.viewTool.viewport);
213392
213589
  }
213393
213590
  get handleType() { return ViewHandleType.Fly; }
@@ -213954,6 +214151,8 @@ class WindowAreaTool extends ViewTool {
213954
214151
  }
213955
214152
  computeWindowCorners() {
213956
214153
  const vp = this.viewport;
214154
+ if (undefined === vp)
214155
+ return undefined;
213957
214156
  const corners = this._corners;
213958
214157
  corners[0].setFrom(this._firstPtWorld);
213959
214158
  corners[1].setFrom(this._secondPtWorld);
@@ -214042,13 +214241,15 @@ class WindowAreaTool extends ViewTool {
214042
214241
  const corners = this.computeWindowCorners();
214043
214242
  if (undefined === corners)
214044
214243
  return;
214045
- let delta;
214046
214244
  const vp = this.viewport;
214245
+ if (undefined === vp)
214246
+ return;
214047
214247
  const view = vp.view;
214048
214248
  vp.viewToWorldArray(corners);
214049
214249
  const opts = {
214050
214250
  onExtentsError: (stat) => view.outputStatusMessage(stat),
214051
214251
  };
214252
+ let delta;
214052
214253
  let globalAlignment;
214053
214254
  if (view.is3d() && view.isCameraOn) {
214054
214255
  const windowArray = [corners[0].clone(), corners[1].clone()];
@@ -214120,7 +214321,10 @@ class DefaultViewTouchTool extends ViewManip {
214120
214321
  const vec = this._lastPtView.minus(pt);
214121
214322
  // if we're not moving any more, or if the duration has elapsed, we're done
214122
214323
  if (remaining <= 0 || (vec.magnitudeSquared() < .000001)) {
214123
- this.viewport.saveViewUndo();
214324
+ const vp = this.viewport;
214325
+ if (undefined === vp)
214326
+ return false;
214327
+ vp.saveViewUndo();
214124
214328
  return true; // remove this as the animator
214125
214329
  }
214126
214330
  this._lastPtView.setFrom(pt);
@@ -214136,6 +214340,8 @@ class DefaultViewTouchTool extends ViewManip {
214136
214340
  }
214137
214341
  onStart(ev) {
214138
214342
  const vp = this.viewport;
214343
+ if (undefined === vp)
214344
+ return;
214139
214345
  vp.getWorldFrustum(this._frustum);
214140
214346
  const visiblePoint = vp.pickNearestVisibleGeometry(ev.rawPoint);
214141
214347
  if (undefined !== visiblePoint) {
@@ -214158,8 +214364,10 @@ class DefaultViewTouchTool extends ViewManip {
214158
214364
  if (undefined === ev || 0.0 === this._startDistance)
214159
214365
  return 1.0;
214160
214366
  const vp = this.viewport;
214367
+ if (undefined === vp)
214368
+ return 1.0;
214161
214369
  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);
214162
- const threshold = this.viewport.pixelsFromInches(_ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.touchZoomChangeThresholdInches);
214370
+ const threshold = vp.pixelsFromInches(_ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.touchZoomChangeThresholdInches);
214163
214371
  if (0.0 === distance || Math.abs(this._startDistance - distance) < threshold)
214164
214372
  return 1.0;
214165
214373
  // Remove inertia if the viewing operation includes zoom, only use it for pan and rotate.
@@ -214171,6 +214379,8 @@ class DefaultViewTouchTool extends ViewManip {
214171
214379
  if (undefined === ev || ev.touchCount < 2 || this._rotate2dDisabled)
214172
214380
  return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(0.0);
214173
214381
  const vp = this.viewport;
214382
+ if (undefined === vp)
214383
+ return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createDegrees(0.0);
214174
214384
  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));
214175
214385
  const rotation = this._startDirection.angleTo(direction);
214176
214386
  if (undefined === this._rotate2dThreshold) {
@@ -214190,15 +214400,18 @@ class DefaultViewTouchTool extends ViewManip {
214190
214400
  }
214191
214401
  handle2dPan() {
214192
214402
  const screenDist = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point2d.create(this._startPtView.x - this._lastPtView.x, this._startPtView.y - this._lastPtView.y);
214193
- this.viewport.scroll(screenDist, { noSaveInUndo: true });
214403
+ if (undefined !== this.viewport)
214404
+ this.viewport.scroll(screenDist, { noSaveInUndo: true });
214194
214405
  }
214195
214406
  handle2dRotateZoom(ev) {
214196
214407
  const vp = this.viewport;
214408
+ if (undefined === vp)
214409
+ return;
214197
214410
  const rotation = this.computeRotation(ev);
214198
214411
  const zoomRatio = this.computeZoomRatio(ev);
214199
214412
  const targetWorld = vp.viewToWorld(this._lastPtView);
214200
214413
  const translateTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createTranslation(this._startPtWorld.minus(targetWorld));
214201
- 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));
214414
+ 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);
214202
214415
  const scaleTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createScaleAboutPoint(this._startPtWorld, zoomRatio);
214203
214416
  const transform = translateTransform.multiplyTransformTransform(rotationTransform);
214204
214417
  scaleTransform.multiplyTransformTransform(transform, transform);
@@ -214207,6 +214420,8 @@ class DefaultViewTouchTool extends ViewManip {
214207
214420
  }
214208
214421
  handle3dRotate() {
214209
214422
  const vp = this.viewport;
214423
+ if (undefined === vp)
214424
+ return;
214210
214425
  const viewRect = vp.viewRect;
214211
214426
  const xExtent = viewRect.width;
214212
214427
  const yExtent = viewRect.height;
@@ -214214,8 +214429,8 @@ class DefaultViewTouchTool extends ViewManip {
214214
214429
  const yDelta = this._lastPtView.y - this._startPtView.y;
214215
214430
  const xAxis = _ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.preserveWorldUp ? _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Vector3d.unitZ() : vp.rotation.getRow(1);
214216
214431
  const yAxis = vp.rotation.getRow(0);
214217
- 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;
214218
- 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;
214432
+ 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;
214433
+ 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;
214219
214434
  const worldRMatrix = yRMatrix.multiplyMatrixMatrix(xRMatrix);
214220
214435
  const result = worldRMatrix.getAxisAndAngleOfRotation();
214221
214436
  const radians = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.createRadians(-result.angle.radians);
@@ -214229,6 +214444,8 @@ class DefaultViewTouchTool extends ViewManip {
214229
214444
  }
214230
214445
  handle3dPanZoom(ev) {
214231
214446
  const vp = this.viewport;
214447
+ if (undefined === vp)
214448
+ return;
214232
214449
  const zoomRatio = this.computeZoomRatio(ev);
214233
214450
  if (vp.isCameraOn) {
214234
214451
  const targetWorld = vp.viewToWorld(this._lastPtView);
@@ -214287,6 +214504,8 @@ class DefaultViewTouchTool extends ViewManip {
214287
214504
  }
214288
214505
  perform(ev) {
214289
214506
  const vp = this.viewport;
214507
+ if (undefined === vp)
214508
+ return;
214290
214509
  vp.setupViewFromFrustum(this._frustum);
214291
214510
  const singleTouch = this._singleTouch;
214292
214511
  return (!this._only2dManipulations && vp.view.allow3dManipulations()) ?
@@ -214309,7 +214528,8 @@ class DefaultViewTouchTool extends ViewManip {
214309
214528
  this._duration = _ToolSettings__WEBPACK_IMPORTED_MODULE_20__.ToolSettings.viewingInertia.duration;
214310
214529
  if (this._duration.isTowardsFuture) { // ensure duration is towards future. Otherwise, don't start animation
214311
214530
  this._end = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeTimePoint.fromNow(this._duration);
214312
- this.viewport.setAnimator(this);
214531
+ if (undefined !== this.viewport)
214532
+ this.viewport.setAnimator(this);
214313
214533
  }
214314
214534
  }
214315
214535
  return this.exitTool();
@@ -334643,18 +334863,18 @@ class Settings {
334643
334863
  }
334644
334864
  }
334645
334865
  toString() {
334646
- return `Configurations:
334647
- backend location: ${this.Backend.location},
334648
- backend name: ${this.Backend.name},
334649
- backend version: ${this.Backend.version},
334650
- oidc client id: ${this.oidcClientId},
334651
- oidc scopes: ${this.oidcScopes},
334652
- applicationId: ${this.gprid},
334653
- log level: ${this.logLevel},
334654
- testing iModelTileRpcTests: ${this.runiModelTileRpcTests},
334655
- testing PresentationRpcTest: ${this.runPresentationRpcTests},
334656
- testing iModelReadRpcTests: ${this.runiModelReadRpcTests},
334657
- testing DevToolsRpcTests: ${this.runDevToolsRpcTests},
334866
+ return `Configurations:
334867
+ backend location: ${this.Backend.location},
334868
+ backend name: ${this.Backend.name},
334869
+ backend version: ${this.Backend.version},
334870
+ oidc client id: ${this.oidcClientId},
334871
+ oidc scopes: ${this.oidcScopes},
334872
+ applicationId: ${this.gprid},
334873
+ log level: ${this.logLevel},
334874
+ testing iModelTileRpcTests: ${this.runiModelTileRpcTests},
334875
+ testing PresentationRpcTest: ${this.runPresentationRpcTests},
334876
+ testing iModelReadRpcTests: ${this.runiModelReadRpcTests},
334877
+ testing DevToolsRpcTests: ${this.runDevToolsRpcTests},
334658
334878
  testing iModelWriteRpcTests: ${this.runiModelWriteRpcTests}`;
334659
334879
  }
334660
334880
  }
@@ -334868,7 +335088,7 @@ class TestContext {
334868
335088
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
334869
335089
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
334870
335090
  await core_frontend_1.NoRenderApp.startup({
334871
- applicationVersion: "5.1.0-dev.61",
335091
+ applicationVersion: "5.1.0-dev.64",
334872
335092
  applicationId: this.settings.gprid,
334873
335093
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
334874
335094
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -359957,7 +360177,7 @@ var loadLanguages = instance.loadLanguages;
359957
360177
  /***/ ((module) => {
359958
360178
 
359959
360179
  "use strict";
359960
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.61","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"}}');
360180
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.64","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"}}');
359961
360181
 
359962
360182
  /***/ }),
359963
360183