@itwin/rpcinterface-full-stack-tests 5.15.0-dev.9 → 5.16.0-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/bundled-tests.js +728 -653
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_4_5_2__loaders_gl_core_4_5_2_node_modu-bbc95a.bundled-tests.js.map +1 -1
- package/lib/frontend/IModelConnection.test.js.map +1 -1
- package/lib/frontend/Views.test.js.map +1 -1
- package/package.json +14 -16
- package/lib/dist/vendors-common_temp_node_modules_pnpm_cross-fetch_4_1_0_node_modules_cross-fetch_dist_browser-44272f.bundled-tests.js +0 -698
- package/lib/dist/vendors-common_temp_node_modules_pnpm_cross-fetch_4_1_0_node_modules_cross-fetch_dist_browser-44272f.bundled-tests.js.map +0 -1
|
@@ -38476,6 +38476,7 @@ function assert(condition, message) {
|
|
|
38476
38476
|
"use strict";
|
|
38477
38477
|
__webpack_require__.r(__webpack_exports__);
|
|
38478
38478
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38479
|
+
/* harmony export */ BeAsyncEvent: () => (/* binding */ BeAsyncEvent),
|
|
38479
38480
|
/* harmony export */ BeEvent: () => (/* binding */ BeEvent),
|
|
38480
38481
|
/* harmony export */ BeEventList: () => (/* binding */ BeEventList),
|
|
38481
38482
|
/* harmony export */ BeUiEvent: () => (/* binding */ BeUiEvent),
|
|
@@ -38563,8 +38564,13 @@ class BeEvent {
|
|
|
38563
38564
|
dropped = true;
|
|
38564
38565
|
}
|
|
38565
38566
|
else {
|
|
38567
|
+
const listener = context.listener;
|
|
38568
|
+
if (context.once) {
|
|
38569
|
+
context.listener = undefined;
|
|
38570
|
+
dropped = true;
|
|
38571
|
+
}
|
|
38566
38572
|
try {
|
|
38567
|
-
|
|
38573
|
+
listener.apply(context.scope, args);
|
|
38568
38574
|
}
|
|
38569
38575
|
catch (e) {
|
|
38570
38576
|
_UnexpectedErrors__WEBPACK_IMPORTED_MODULE_0__.UnexpectedErrors.handle(e);
|
|
@@ -38573,10 +38579,6 @@ class BeEvent {
|
|
|
38573
38579
|
// listener was removed during its own callback
|
|
38574
38580
|
dropped = true;
|
|
38575
38581
|
}
|
|
38576
|
-
else if (context.once) {
|
|
38577
|
-
context.listener = undefined;
|
|
38578
|
-
dropped = true;
|
|
38579
|
-
}
|
|
38580
38582
|
}
|
|
38581
38583
|
}
|
|
38582
38584
|
this._emitDepth--;
|
|
@@ -38620,8 +38622,6 @@ class BeUiEvent extends BeEvent {
|
|
|
38620
38622
|
*/
|
|
38621
38623
|
class BeUnorderedEvent {
|
|
38622
38624
|
_listeners = new Set();
|
|
38623
|
-
_emitDepth = 0;
|
|
38624
|
-
_hasTombstones = false;
|
|
38625
38625
|
/** The number of listeners currently subscribed to the event.
|
|
38626
38626
|
* @note During `raiseEvent()`, this may include listeners that have been removed or are one-shot
|
|
38627
38627
|
* but are awaiting deferred cleanup. The count is accurate outside of `raiseEvent()`.
|
|
@@ -38651,43 +38651,26 @@ class BeUnorderedEvent {
|
|
|
38651
38651
|
}
|
|
38652
38652
|
/** Remove a specific context entry, deferring during emit. */
|
|
38653
38653
|
_removeCtx(ctx) {
|
|
38654
|
-
|
|
38655
|
-
ctx.listener = undefined; // tombstone for deferred cleanup
|
|
38656
|
-
this._hasTombstones = true;
|
|
38657
|
-
}
|
|
38658
|
-
else {
|
|
38659
|
-
this._listeners.delete(ctx);
|
|
38660
|
-
}
|
|
38654
|
+
this._listeners.delete(ctx);
|
|
38661
38655
|
}
|
|
38662
38656
|
/**
|
|
38663
38657
|
* Raises the event by calling each registered listener with the supplied arguments.
|
|
38664
38658
|
* @param args This method takes any number of parameters and passes them through to the listeners.
|
|
38665
38659
|
*/
|
|
38666
38660
|
raiseEvent(...args) {
|
|
38667
|
-
this._emitDepth++;
|
|
38668
38661
|
for (const ctx of this._listeners) {
|
|
38669
38662
|
if (!ctx.listener) {
|
|
38670
38663
|
continue;
|
|
38671
38664
|
}
|
|
38665
|
+
if (ctx.once) {
|
|
38666
|
+
this._listeners.delete(ctx);
|
|
38667
|
+
}
|
|
38672
38668
|
try {
|
|
38673
38669
|
ctx.listener.apply(ctx.scope, args);
|
|
38674
38670
|
}
|
|
38675
38671
|
catch (e) {
|
|
38676
38672
|
_UnexpectedErrors__WEBPACK_IMPORTED_MODULE_0__.UnexpectedErrors.handle(e);
|
|
38677
38673
|
}
|
|
38678
|
-
if (ctx.listener && ctx.once) {
|
|
38679
|
-
ctx.listener = undefined;
|
|
38680
|
-
this._hasTombstones = true;
|
|
38681
|
-
}
|
|
38682
|
-
}
|
|
38683
|
-
this._emitDepth--;
|
|
38684
|
-
// Only clean up tombstoned entries when we're back at the outermost emit
|
|
38685
|
-
if (this._hasTombstones && this._emitDepth === 0) {
|
|
38686
|
-
this._hasTombstones = false;
|
|
38687
|
-
for (const ctx of this._listeners) {
|
|
38688
|
-
if (ctx.listener === undefined)
|
|
38689
|
-
this._listeners.delete(ctx);
|
|
38690
|
-
}
|
|
38691
38674
|
}
|
|
38692
38675
|
}
|
|
38693
38676
|
/** Clear all listeners from this BeUnorderedEvent.
|
|
@@ -38703,6 +38686,108 @@ class BeUnorderedUiEvent extends BeUnorderedEvent {
|
|
|
38703
38686
|
/** Raises event with single strongly typed argument. */
|
|
38704
38687
|
emit(args) { this.raiseEvent(args); }
|
|
38705
38688
|
}
|
|
38689
|
+
/**
|
|
38690
|
+
* Manages a set of *listeners* for a particular event and notifies them when the event is raised.
|
|
38691
|
+
* Each listener is async (return a Promise<void>). The listeners may be invoked in series
|
|
38692
|
+
* or concurrently depending on the configuration of the instance.
|
|
38693
|
+
*
|
|
38694
|
+
* Like [[BeUnorderedEvent]], this class uses a `Set` internally to support more performant removal
|
|
38695
|
+
* of old listeners. When a listener is removed during emit, it is marked for deferred removal instead
|
|
38696
|
+
* of mutating the set immediately. Despite the "unordered" implication, items in a `Set` are enumerated
|
|
38697
|
+
* in insertion order, which means that this class invokes the listeners in insertion order.
|
|
38698
|
+
*
|
|
38699
|
+
* Listeners are managed exclusively through the disposal closure returned by [[addListener]] and
|
|
38700
|
+
* [[addOnce]]. There is no `removeListener` or `has` method — callers must capture the returned
|
|
38701
|
+
* closure to unsubscribe.
|
|
38702
|
+
* @beta
|
|
38703
|
+
*/
|
|
38704
|
+
class BeAsyncEvent {
|
|
38705
|
+
_listeners = new Set();
|
|
38706
|
+
_concurrent = false;
|
|
38707
|
+
_promiseRejectionIsUnexpected = false;
|
|
38708
|
+
constructor(options) {
|
|
38709
|
+
if (options?.concurrent)
|
|
38710
|
+
this._concurrent = true;
|
|
38711
|
+
if (options?.promiseRejectionIsUnexpected)
|
|
38712
|
+
this._promiseRejectionIsUnexpected = true;
|
|
38713
|
+
}
|
|
38714
|
+
/** The number of listeners currently subscribed to the event.
|
|
38715
|
+
* @note During `raiseEvent()`, this may include listeners that have been removed or are one-shot
|
|
38716
|
+
* but are awaiting deferred cleanup. The count is accurate outside of `raiseEvent()`.
|
|
38717
|
+
*/
|
|
38718
|
+
get numberOfListeners() { return this._listeners.size; }
|
|
38719
|
+
/**
|
|
38720
|
+
* Registers a Listener to be executed whenever this event is raised.
|
|
38721
|
+
* @param listener The function to be executed when the event is raised.
|
|
38722
|
+
* @param scope An optional object scope to serve as the 'this' pointer when listener is invoked.
|
|
38723
|
+
* @returns A function that will remove this event listener in O(1).
|
|
38724
|
+
*/
|
|
38725
|
+
addListener(listener, scope) {
|
|
38726
|
+
const ctx = { listener, scope, once: false };
|
|
38727
|
+
this._listeners.add(ctx);
|
|
38728
|
+
return () => this._removeCtx(ctx);
|
|
38729
|
+
}
|
|
38730
|
+
/**
|
|
38731
|
+
* Registers a callback function to be executed *only once* when the event is raised.
|
|
38732
|
+
* @param listener The function to be executed once when the event is raised.
|
|
38733
|
+
* @param scope An optional object scope to serve as the `this` pointer in which the listener function will execute.
|
|
38734
|
+
* @returns A function that will remove this event listener in O(1).
|
|
38735
|
+
*/
|
|
38736
|
+
addOnce(listener, scope) {
|
|
38737
|
+
const ctx = { listener, scope, once: true };
|
|
38738
|
+
this._listeners.add(ctx);
|
|
38739
|
+
return () => this._removeCtx(ctx);
|
|
38740
|
+
}
|
|
38741
|
+
/** Remove a specific context entry, deferring during emit. */
|
|
38742
|
+
_removeCtx(ctx) {
|
|
38743
|
+
this._listeners.delete(ctx);
|
|
38744
|
+
}
|
|
38745
|
+
/**
|
|
38746
|
+
* Raises the event by calling each registered listener with the supplied arguments.
|
|
38747
|
+
*
|
|
38748
|
+
* See [[BeAsyncEventOptions]] for options that control the behavior of this method.
|
|
38749
|
+
*
|
|
38750
|
+
* @param args This method takes any number of parameters and passes them through to the listeners.
|
|
38751
|
+
* @returns A Promise that settles when the event invocation is complete.
|
|
38752
|
+
*/
|
|
38753
|
+
async raiseEvent(...args) {
|
|
38754
|
+
const promises = [];
|
|
38755
|
+
// Wrapper to ensure that an exception thrown immediately by a listener is captured as a rejected promise rather than
|
|
38756
|
+
// allowed to propagate as an exception. A well-behaved Promise-returning function should never throw, but
|
|
38757
|
+
// this defends against the poorly-behaved ones. In Node 23+ we could use `Promise.try` instead.
|
|
38758
|
+
const invoke = async (ctx, args) => {
|
|
38759
|
+
if (!ctx.listener)
|
|
38760
|
+
return;
|
|
38761
|
+
await ctx.listener.apply(ctx.scope, args);
|
|
38762
|
+
};
|
|
38763
|
+
for (const ctx of this._listeners) {
|
|
38764
|
+
if (!ctx.listener)
|
|
38765
|
+
continue;
|
|
38766
|
+
if (ctx.once) {
|
|
38767
|
+
// Set guarantees this is safe during iteration.
|
|
38768
|
+
this._listeners.delete(ctx);
|
|
38769
|
+
}
|
|
38770
|
+
let promise = invoke(ctx, args);
|
|
38771
|
+
if (this._promiseRejectionIsUnexpected)
|
|
38772
|
+
promise = promise.catch(reason => _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_0__.UnexpectedErrors.handle(reason));
|
|
38773
|
+
if (this._concurrent)
|
|
38774
|
+
promises.push(promise);
|
|
38775
|
+
else
|
|
38776
|
+
await promise;
|
|
38777
|
+
}
|
|
38778
|
+
if (this._concurrent) {
|
|
38779
|
+
const result = await Promise.allSettled(promises);
|
|
38780
|
+
const firstRejection = result.find(r => r.status === "rejected");
|
|
38781
|
+
if (firstRejection)
|
|
38782
|
+
throw firstRejection.reason;
|
|
38783
|
+
}
|
|
38784
|
+
}
|
|
38785
|
+
/** Clear all listeners from this BeAsyncEvent.
|
|
38786
|
+
* @note If called during `raiseEvent`, remaining listeners in the current iteration are skipped
|
|
38787
|
+
* immediately rather than being tombstoned.
|
|
38788
|
+
*/
|
|
38789
|
+
clear() { this._listeners.clear(); }
|
|
38790
|
+
}
|
|
38706
38791
|
/**
|
|
38707
38792
|
* A list of BeEvent objects, accessible by an event name.
|
|
38708
38793
|
* This class may be used instead of explicitly declaring each BeEvent as a member of a containing class.
|
|
@@ -41259,16 +41344,18 @@ var Id64;
|
|
|
41259
41344
|
Id64.getFirst = getFirst;
|
|
41260
41345
|
/** Return the number of [[Id64String]]s represented by an [[Id64Arg]]. */
|
|
41261
41346
|
function sizeOf(arg) {
|
|
41262
|
-
return typeof arg === "string" ? 1 :
|
|
41347
|
+
return typeof arg === "string" ? 1 : "size" in arg ? arg.size : arg.length;
|
|
41263
41348
|
}
|
|
41264
41349
|
Id64.sizeOf = sizeOf;
|
|
41265
41350
|
/** Returns true if the [[Id64Arg]] contains the specified Id. */
|
|
41266
41351
|
function has(arg, id) {
|
|
41267
|
-
if (typeof arg === "string")
|
|
41352
|
+
if (typeof arg === "string") {
|
|
41268
41353
|
return arg === id;
|
|
41269
|
-
|
|
41270
|
-
|
|
41271
|
-
|
|
41354
|
+
}
|
|
41355
|
+
if ("has" in arg) {
|
|
41356
|
+
return arg.has(id);
|
|
41357
|
+
}
|
|
41358
|
+
return -1 !== arg.indexOf(id);
|
|
41272
41359
|
}
|
|
41273
41360
|
Id64.has = has;
|
|
41274
41361
|
/** The string representation of an invalid Id. */
|
|
@@ -45338,6 +45425,7 @@ class YieldManager {
|
|
|
45338
45425
|
__webpack_require__.r(__webpack_exports__);
|
|
45339
45426
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45340
45427
|
/* harmony export */ AbandonedError: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_22__.AbandonedError),
|
|
45428
|
+
/* harmony export */ BeAsyncEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeAsyncEvent),
|
|
45341
45429
|
/* harmony export */ BeDuration: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_30__.BeDuration),
|
|
45342
45430
|
/* harmony export */ BeEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEvent),
|
|
45343
45431
|
/* harmony export */ BeEventList: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEventList),
|
|
@@ -50901,7 +50989,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
50901
50989
|
/* harmony export */ ECSqlReader: () => (/* binding */ ECSqlReader)
|
|
50902
50990
|
/* harmony export */ });
|
|
50903
50991
|
/* harmony import */ var _ConcurrentQuery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ConcurrentQuery */ "../../core/common/lib/esm/ConcurrentQuery.js");
|
|
50904
|
-
/* harmony import */ var
|
|
50992
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
50993
|
+
/* harmony import */ var _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ECSqlReaderBase */ "../../core/common/lib/esm/ECSqlReaderBase.js");
|
|
50905
50994
|
/*---------------------------------------------------------------------------------------------
|
|
50906
50995
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
50907
50996
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -50911,6 +51000,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
50911
51000
|
*/
|
|
50912
51001
|
|
|
50913
51002
|
|
|
51003
|
+
|
|
50914
51004
|
/**
|
|
50915
51005
|
* Execute ECSQL statements and read the results.
|
|
50916
51006
|
*
|
|
@@ -50933,7 +51023,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
50933
51023
|
* JavaScript object, call [[QueryRowProxy.toRow]] on it.
|
|
50934
51024
|
* @public
|
|
50935
51025
|
*/
|
|
50936
|
-
class ECSqlReader extends
|
|
51026
|
+
class ECSqlReader extends _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_2__.ECSqlReaderBase {
|
|
50937
51027
|
_executor;
|
|
50938
51028
|
query;
|
|
50939
51029
|
static _maxRetryCount = 10;
|
|
@@ -50944,6 +51034,7 @@ class ECSqlReader extends _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_1__.ECSqlRea
|
|
|
50944
51034
|
_globalDone = false;
|
|
50945
51035
|
_param = new _ConcurrentQuery__WEBPACK_IMPORTED_MODULE_0__.QueryBinder().serialize();
|
|
50946
51036
|
_lockArgs = false;
|
|
51037
|
+
_cursorId = "";
|
|
50947
51038
|
_stats = { backendCpuTime: 0, backendTotalTime: 0, backendMemUsed: 0, backendRowsReturned: 0, totalTime: 0, retryCount: 0, prepareTime: 0 };
|
|
50948
51039
|
_options = new _ConcurrentQuery__WEBPACK_IMPORTED_MODULE_0__.QueryOptionsBuilder().getOptions();
|
|
50949
51040
|
/**
|
|
@@ -50975,10 +51066,11 @@ class ECSqlReader extends _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_1__.ECSqlRea
|
|
|
50975
51066
|
* @deprecated in 5.6 - will not be removed until after 2027-04-02. Should not be used. Will be made private in a future release.
|
|
50976
51067
|
*/
|
|
50977
51068
|
reset(options) {
|
|
51069
|
+
this._cursorId = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.Guid.createValue();
|
|
50978
51070
|
if (options) {
|
|
50979
51071
|
this._options = options;
|
|
50980
51072
|
}
|
|
50981
|
-
this._props = new
|
|
51073
|
+
this._props = new _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_2__.PropertyMetaDataMap([]);
|
|
50982
51074
|
this._localRows = [];
|
|
50983
51075
|
this._globalDone = false;
|
|
50984
51076
|
this._globalOffset = 0;
|
|
@@ -50999,6 +51091,7 @@ class ECSqlReader extends _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_1__.ECSqlRea
|
|
|
50999
51091
|
* @deprecated in 5.6 - will not be removed until after 2027-04-02. Should not be used. Will be made private in a future release.
|
|
51000
51092
|
*/
|
|
51001
51093
|
resetBindings() {
|
|
51094
|
+
this._cursorId = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.Guid.createValue();
|
|
51002
51095
|
this._param = new _ConcurrentQuery__WEBPACK_IMPORTED_MODULE_0__.QueryBinder().serialize();
|
|
51003
51096
|
this._lockArgs = false;
|
|
51004
51097
|
}
|
|
@@ -51037,13 +51130,14 @@ class ECSqlReader extends _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_1__.ECSqlRea
|
|
|
51037
51130
|
valueFormat,
|
|
51038
51131
|
query: this.query,
|
|
51039
51132
|
args: this._param,
|
|
51133
|
+
cursorId: this._cursorId,
|
|
51040
51134
|
};
|
|
51041
51135
|
request.includeMetaData = this._props.length > 0 ? false : true;
|
|
51042
51136
|
request.limit = { offset: this._globalOffset, count: this._globalCount < 1 ? -1 : this._globalCount };
|
|
51043
51137
|
const resp = await this.runWithRetry(request);
|
|
51044
51138
|
this._globalDone = resp.status === _ConcurrentQuery__WEBPACK_IMPORTED_MODULE_0__.DbResponseStatus.Done || resp.status === _ConcurrentQuery__WEBPACK_IMPORTED_MODULE_0__.DbResponseStatus.NotOpen;
|
|
51045
51139
|
if (this._props.length === 0 && resp.meta.length > 0) {
|
|
51046
|
-
this._props = new
|
|
51140
|
+
this._props = new _ECSqlReaderBase__WEBPACK_IMPORTED_MODULE_2__.PropertyMetaDataMap(resp.meta);
|
|
51047
51141
|
}
|
|
51048
51142
|
for (const row of resp.data) {
|
|
51049
51143
|
ECSqlReader.replaceBase64WithUint8Array(row);
|
|
@@ -51807,7 +51901,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
51807
51901
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
51808
51902
|
/* harmony export */ EntityMetaData: () => (/* binding */ EntityMetaData),
|
|
51809
51903
|
/* harmony export */ PrimitiveTypeCode: () => (/* binding */ PrimitiveTypeCode),
|
|
51810
|
-
/* harmony export */ PropertyMetaData: () => (/* binding */ PropertyMetaData)
|
|
51904
|
+
/* harmony export */ PropertyMetaData: () => (/* binding */ PropertyMetaData),
|
|
51905
|
+
/* harmony export */ isPersisted: () => (/* binding */ isPersisted)
|
|
51811
51906
|
/* harmony export */ });
|
|
51812
51907
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
51813
51908
|
/* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
|
|
@@ -51822,6 +51917,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
51822
51917
|
|
|
51823
51918
|
|
|
51824
51919
|
|
|
51920
|
+
/** Tests whether an [[EntityProps]] has a valid `id`, narrowing its type to [[Persisted]] if it does.
|
|
51921
|
+
* @public @preview
|
|
51922
|
+
* @extensions
|
|
51923
|
+
*/
|
|
51924
|
+
function isPersisted(entity) {
|
|
51925
|
+
return undefined !== entity.id && _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.isValidId64(entity.id);
|
|
51926
|
+
}
|
|
51825
51927
|
/** The primitive types of an Entity property.
|
|
51826
51928
|
* @beta
|
|
51827
51929
|
*/
|
|
@@ -53700,6 +53802,9 @@ var GeoCoordStatus;
|
|
|
53700
53802
|
* Geoid separation data or vertical datum differential data (such as used by NGVD29 to NAVD88 conversion).
|
|
53701
53803
|
* The horizontal coordinates returned are valid but the elevation ordinate will be returned unchanged or partially changed.
|
|
53702
53804
|
* This status should be somehow reported so actions can be performed to provide the missing information.
|
|
53805
|
+
* A finite elevation, including one equal to the input elevation, is not evidence that vertical conversion succeeded.
|
|
53806
|
+
* Callers requiring converted elevations must reject this result. Horizontal-only callers may use XY while retaining
|
|
53807
|
+
* and reporting this status. A visual fallback must not be presented as a successful vertical conversion.
|
|
53703
53808
|
*/
|
|
53704
53809
|
GeoCoordStatus[GeoCoordStatus["VerticalDatumConvertError"] = 26] = "VerticalDatumConvertError";
|
|
53705
53810
|
/** General inner conversion engine error. Coordinates returned are invalid and should be discarded */
|
|
@@ -65955,6 +66060,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
65955
66060
|
/* harmony export */ isBinaryImageSource: () => (/* reexport safe */ _Image__WEBPACK_IMPORTED_MODULE_69__.isBinaryImageSource),
|
|
65956
66061
|
/* harmony export */ isKnownFieldPropertyType: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_166__.isKnownFieldPropertyType),
|
|
65957
66062
|
/* harmony export */ isKnownTileFormat: () => (/* reexport safe */ _tile_TileIO__WEBPACK_IMPORTED_MODULE_162__.isKnownTileFormat),
|
|
66063
|
+
/* harmony export */ isPersisted: () => (/* reexport safe */ _EntityProps__WEBPACK_IMPORTED_MODULE_34__.isPersisted),
|
|
65958
66064
|
/* harmony export */ isPlacement2dProps: () => (/* reexport safe */ _ElementProps__WEBPACK_IMPORTED_MODULE_32__.isPlacement2dProps),
|
|
65959
66065
|
/* harmony export */ isPlacement3dProps: () => (/* reexport safe */ _ElementProps__WEBPACK_IMPORTED_MODULE_32__.isPlacement3dProps),
|
|
65960
66066
|
/* harmony export */ isPowerOfTwo: () => (/* reexport safe */ _Image__WEBPACK_IMPORTED_MODULE_69__.isPowerOfTwo),
|
|
@@ -76991,7 +77097,7 @@ class IModelReadRpcInterface extends _RpcInterface__WEBPACK_IMPORTED_MODULE_0__.
|
|
|
76991
77097
|
/** The immutable name of the interface. */
|
|
76992
77098
|
static interfaceName = "IModelReadRpcInterface";
|
|
76993
77099
|
/** The semantic version of the interface. */
|
|
76994
|
-
static interfaceVersion = "3.8.
|
|
77100
|
+
static interfaceVersion = "3.8.1";
|
|
76995
77101
|
/*===========================================================================================
|
|
76996
77102
|
NOTE: Any add/remove/change to the methods below requires an update of the interface version.
|
|
76997
77103
|
NOTE: Please consult the README in this folder for the semantic versioning rules.
|
|
@@ -77936,8 +78042,7 @@ class RpcInvocation {
|
|
|
77936
78042
|
return;
|
|
77937
78043
|
for (let i = 0; i !== parameters.length; ++i) {
|
|
77938
78044
|
const parameter = parameters[i];
|
|
77939
|
-
|
|
77940
|
-
if (isToken && this.protocol.checkToken && !this.operation.policy.allowTokenMismatch) {
|
|
78045
|
+
if (this.protocol.checkToken && !this.operation.policy.allowTokenMismatch && RpcInvocation.isTokenParameter(parameter, i)) {
|
|
77941
78046
|
const inflated = this.protocol.inflateToken(parameter, this.request);
|
|
77942
78047
|
parameters[i] = inflated;
|
|
77943
78048
|
if (!RpcInvocation.compareTokens(parameter, inflated)) {
|
|
@@ -77951,9 +78056,20 @@ class RpcInvocation {
|
|
|
77951
78056
|
}
|
|
77952
78057
|
}
|
|
77953
78058
|
}
|
|
78059
|
+
/** Determine whether an operation parameter is an [[IModelRpcProps]]. Every property of the token other than `key` is optional
|
|
78060
|
+
* and all of them are supplied by the caller, so the first parameter is treated as a token if it has *any* of the identifying properties.
|
|
78061
|
+
*/
|
|
78062
|
+
static isTokenParameter(parameter, index) {
|
|
78063
|
+
if (typeof parameter !== "object" || parameter === null || Array.isArray(parameter))
|
|
78064
|
+
return false;
|
|
78065
|
+
const has = (prop) => Object.prototype.hasOwnProperty.call(parameter, prop);
|
|
78066
|
+
if (has("iModelId") && has("iTwinId"))
|
|
78067
|
+
return true;
|
|
78068
|
+
return 0 === index && (has("key") || has("iModelId") || has("iTwinId"));
|
|
78069
|
+
}
|
|
77954
78070
|
static compareTokens(a, b) {
|
|
77955
78071
|
return a.key === b.key &&
|
|
77956
|
-
a.iTwinId === b.iTwinId &&
|
|
78072
|
+
(undefined === a.iTwinId || a.iTwinId === b.iTwinId) &&
|
|
77957
78073
|
a.iModelId === b.iModelId &&
|
|
77958
78074
|
(undefined === a.changeset || (a.changeset.id === b.changeset?.id));
|
|
77959
78075
|
}
|
|
@@ -96516,8 +96632,8 @@ class SchemaView {
|
|
|
96516
96632
|
throw new Error("SchemaView is not mergeable: create it via SchemaView.createMergeable to merge fragments.");
|
|
96517
96633
|
this._mergeContext.mergeBlob(blob);
|
|
96518
96634
|
// A new fragment can add subclasses to an already-present base class, so the derived-class map
|
|
96519
|
-
// must be rebuilt. transitiveBaseCache
|
|
96520
|
-
// before it (dependency order), so an append never adds an ancestor to an already-cached class.
|
|
96635
|
+
// must be rebuilt. transitiveBaseCache and PropertyRef.overriddenProperty stay valid: a class's ancestors
|
|
96636
|
+
// are always merged before it (dependency order), so an append never adds an ancestor to an already-cached class.
|
|
96521
96637
|
this[_storage].derivedClassMap = undefined;
|
|
96522
96638
|
}
|
|
96523
96639
|
// --- Internal helpers used by view objects ---
|
|
@@ -96607,12 +96723,18 @@ class SchemaView {
|
|
|
96607
96723
|
// 1. Base class (recursive, depth-first)
|
|
96608
96724
|
if (cls.baseClassIdx !== -1)
|
|
96609
96725
|
this._collectProperties(cls.baseClassIdx, merged);
|
|
96610
|
-
// 2. Mixins in declaration order
|
|
96726
|
+
// 2. Mixins in declaration order. Each mixin is resolved on its own so its overrides win over its
|
|
96727
|
+
// ancestors, then only adds names not already provided by the base class or an earlier mixin.
|
|
96611
96728
|
for (let i = 0; i < cls.mixinCount; i++) {
|
|
96612
96729
|
const mixinIdx = this[_storage].classMixins[cls.mixinStartIdx + i];
|
|
96613
96730
|
if (mixinIdx === -1 || mixinIdx === undefined)
|
|
96614
96731
|
continue; // safety: dangling mixin ref
|
|
96615
|
-
|
|
96732
|
+
const mixinProperties = new Map();
|
|
96733
|
+
this._collectProperties(mixinIdx, mixinProperties);
|
|
96734
|
+
for (const [nameKey, resolved] of mixinProperties) {
|
|
96735
|
+
if (!merged.has(nameKey))
|
|
96736
|
+
merged.set(nameKey, resolved);
|
|
96737
|
+
}
|
|
96616
96738
|
}
|
|
96617
96739
|
// 3. Own properties - always override
|
|
96618
96740
|
for (let i = 0; i < cls.ownPropCount; i++) {
|
|
@@ -96621,27 +96743,62 @@ class SchemaView {
|
|
|
96621
96743
|
merged.set(nameKey, { ref, classIdx });
|
|
96622
96744
|
}
|
|
96623
96745
|
}
|
|
96624
|
-
|
|
96625
|
-
|
|
96626
|
-
|
|
96627
|
-
|
|
96628
|
-
|
|
96629
|
-
if (
|
|
96630
|
-
|
|
96631
|
-
|
|
96632
|
-
|
|
96633
|
-
|
|
96634
|
-
|
|
96746
|
+
/** Finds the property declaration that a property of the given class overrides.
|
|
96747
|
+
* Searches the base class and its ancestors first, then each mixin in declaration order.
|
|
96748
|
+
*/
|
|
96749
|
+
_findOverriddenProperty(classIdx, nameKey) {
|
|
96750
|
+
const cls = this[_storage].classes[classIdx];
|
|
96751
|
+
if (cls === undefined || cls.type === _SchemaViewInterfaces__WEBPACK_IMPORTED_MODULE_0__.ClassType.View)
|
|
96752
|
+
return undefined;
|
|
96753
|
+
if (cls.baseClassIdx !== -1) {
|
|
96754
|
+
const found = this._findPropertyDeclaration(cls.baseClassIdx, nameKey);
|
|
96755
|
+
if (found !== undefined)
|
|
96756
|
+
return found;
|
|
96757
|
+
}
|
|
96758
|
+
for (let i = 0; i < cls.mixinCount; i++) {
|
|
96759
|
+
const mixinIdx = this[_storage].classMixins[cls.mixinStartIdx + i];
|
|
96760
|
+
if (mixinIdx === -1 || mixinIdx === undefined)
|
|
96635
96761
|
continue; // safety: dangling mixin ref
|
|
96636
|
-
this.
|
|
96762
|
+
const found = this._findPropertyDeclaration(mixinIdx, nameKey);
|
|
96763
|
+
if (found !== undefined)
|
|
96764
|
+
return found;
|
|
96765
|
+
}
|
|
96766
|
+
return undefined;
|
|
96767
|
+
}
|
|
96768
|
+
_findPropertyDeclaration(classIdx, nameKey) {
|
|
96769
|
+
const cls = this[_storage].classes[classIdx];
|
|
96770
|
+
if (cls === undefined)
|
|
96771
|
+
return undefined; // safety: dangling index from excluded schema
|
|
96772
|
+
for (let i = 0; i < cls.ownPropCount; i++) {
|
|
96773
|
+
const ref = this[_storage].propertyRefs[cls.ownPropStart + i];
|
|
96774
|
+
if (this[_storage].lowerStrings[this[_storage].propDefs[ref.defIdx].nameStringIdx] === nameKey)
|
|
96775
|
+
return { ref, classIdx };
|
|
96637
96776
|
}
|
|
96638
|
-
|
|
96639
|
-
|
|
96640
|
-
|
|
96777
|
+
return this._findOverriddenProperty(classIdx, nameKey);
|
|
96778
|
+
}
|
|
96779
|
+
/** Returns the first declaration matching `predicate`, starting with the given declaration and
|
|
96780
|
+
* continuing with the declarations it overrides.
|
|
96781
|
+
* @internal
|
|
96782
|
+
*/
|
|
96783
|
+
findPropertyDefInOverrides(ref, classIdx, predicate) {
|
|
96784
|
+
let current = { ref, classIdx };
|
|
96785
|
+
while (current !== null) {
|
|
96786
|
+
const def = this[_storage].propDefs[current.ref.defIdx];
|
|
96787
|
+
if (predicate(def))
|
|
96788
|
+
return def;
|
|
96789
|
+
current = this._getOverriddenProperty(current.ref, current.classIdx);
|
|
96790
|
+
}
|
|
96791
|
+
return undefined;
|
|
96792
|
+
}
|
|
96793
|
+
/** Returns the declaration the given one overrides, resolving and storing it on the ref on first access.
|
|
96794
|
+
* Caching per ref is sound because a ref belongs to exactly one class; view properties (classIdx -1) never override.
|
|
96795
|
+
*/
|
|
96796
|
+
_getOverriddenProperty(ref, classIdx) {
|
|
96797
|
+
if (ref.overriddenProperty === undefined) {
|
|
96641
96798
|
const nameKey = this[_storage].lowerStrings[this[_storage].propDefs[ref.defIdx].nameStringIdx];
|
|
96642
|
-
|
|
96643
|
-
merged.set(nameKey, { ref, classIdx: mixinIdx });
|
|
96799
|
+
ref.overriddenProperty = classIdx !== -1 ? this._findOverriddenProperty(classIdx, nameKey) ?? null : null;
|
|
96644
96800
|
}
|
|
96801
|
+
return ref.overriddenProperty;
|
|
96645
96802
|
}
|
|
96646
96803
|
/** @internal */
|
|
96647
96804
|
buildDerivedClassMap() {
|
|
@@ -96666,6 +96823,9 @@ class SchemaView {
|
|
|
96666
96823
|
// =====================================================================================
|
|
96667
96824
|
// SchemaView namespace - flyweight view types
|
|
96668
96825
|
// =====================================================================================
|
|
96826
|
+
function hasCategory(def) { return def.categoryIdx !== -1; }
|
|
96827
|
+
function hasKindOfQuantity(def) { return def.koqIdx !== -1; }
|
|
96828
|
+
function isHiddenDef(def) { return def.isHidden; }
|
|
96669
96829
|
/** @beta */
|
|
96670
96830
|
(function (SchemaView) {
|
|
96671
96831
|
/** Lightweight view over a schema in a `SchemaView`. Holds only a view reference and
|
|
@@ -97009,10 +97169,21 @@ class SchemaView {
|
|
|
97009
97169
|
}
|
|
97010
97170
|
get kind() { return this._def.kind; }
|
|
97011
97171
|
get isReadOnly() { return this._def.isReadOnly; }
|
|
97012
|
-
/** Reflects the `HiddenProperty` custom attribute from `CoreCustomAttributes
|
|
97013
|
-
* Properties marked hidden are typically excluded from UI display but remain
|
|
97172
|
+
/** Reflects the `HiddenProperty` custom attribute from `CoreCustomAttributes` on this declaration only;
|
|
97173
|
+
* see `isEffectivelyHidden`. Properties marked hidden are typically excluded from UI display but remain
|
|
97174
|
+
* accessible programmatically. */
|
|
97014
97175
|
get isHidden() { return this._def.isHidden; }
|
|
97015
|
-
/**
|
|
97176
|
+
/** True if this declaration is hidden. If it is not and the property is an override, we take this from the
|
|
97177
|
+
* overridden property. Limitation: `HiddenProperty(Show=true)` reads the same as no `HiddenProperty`, so it does not
|
|
97178
|
+
* unhide a property whose overridden property is hidden. */
|
|
97179
|
+
get isEffectivelyHidden() {
|
|
97180
|
+
if (this._def.isHidden)
|
|
97181
|
+
return true;
|
|
97182
|
+
return this._ctx.findPropertyDefInOverrides(this._ref, this._classIdx, isHiddenDef) !== undefined;
|
|
97183
|
+
}
|
|
97184
|
+
/** Display priority. Higher values should be displayed more prominently. 0 means default.
|
|
97185
|
+
* Not inherited from the overridden property: an omitted priority is stored as 0, which cannot be told
|
|
97186
|
+
* apart from an explicit 0 that overrides a base priority. */
|
|
97016
97187
|
get priority() { return this._ref.priority; }
|
|
97017
97188
|
/** The class that declared or contributed this property through inheritance.
|
|
97018
97189
|
* For own properties, returns the class itself. For inherited properties, returns the
|
|
@@ -97023,11 +97194,21 @@ class SchemaView {
|
|
|
97023
97194
|
get declaringClass() {
|
|
97024
97195
|
return this._classIdx !== -1 ? createClass(this._ctx, this._classIdx) : undefined;
|
|
97025
97196
|
}
|
|
97026
|
-
/** Property category
|
|
97197
|
+
/** Property category. If there is no local category and the property is an override, we take this from
|
|
97198
|
+
* the overridden property. Available on all property kinds. */
|
|
97027
97199
|
get category() {
|
|
97028
|
-
|
|
97200
|
+
let idx = this._def.categoryIdx;
|
|
97201
|
+
if (idx === -1 && this._ctx[_storage].propCategories.length !== 0)
|
|
97202
|
+
idx = this._ctx.findPropertyDefInOverrides(this._ref, this._classIdx, hasCategory)?.categoryIdx ?? -1;
|
|
97029
97203
|
return idx !== -1 ? new PropertyCategory(this._ctx, idx) : undefined;
|
|
97030
97204
|
}
|
|
97205
|
+
/** @internal */
|
|
97206
|
+
get _kindOfQuantity() {
|
|
97207
|
+
let idx = this._def.koqIdx;
|
|
97208
|
+
if (idx === -1 && this._ctx[_storage].koqs.length !== 0)
|
|
97209
|
+
idx = this._ctx.findPropertyDefInOverrides(this._ref, this._classIdx, hasKindOfQuantity)?.koqIdx ?? -1;
|
|
97210
|
+
return idx !== -1 ? new KindOfQuantity(this._ctx, idx) : undefined;
|
|
97211
|
+
}
|
|
97031
97212
|
// Type guards - real type predicates that narrow `this`
|
|
97032
97213
|
/** True for `SchemaView.PrimitiveProperty` and `SchemaView.PrimitiveArrayProperty`.
|
|
97033
97214
|
* Matches ecschema-metadata behavior where `isPrimitive()` includes primitive arrays. */
|
|
@@ -97089,10 +97270,9 @@ class SchemaView {
|
|
|
97089
97270
|
const idx = this._def.enumIdx;
|
|
97090
97271
|
return idx !== -1 ? new Enumeration(this._ctx, idx) : undefined;
|
|
97091
97272
|
}
|
|
97092
|
-
|
|
97093
|
-
|
|
97094
|
-
|
|
97095
|
-
}
|
|
97273
|
+
/** KindOfQuantity. If there is no local KindOfQuantity and the property is an override, we take this
|
|
97274
|
+
* from the overridden property. */
|
|
97275
|
+
get kindOfQuantity() { return this._kindOfQuantity; }
|
|
97096
97276
|
}
|
|
97097
97277
|
SchemaView.PrimitiveProperty = PrimitiveProperty;
|
|
97098
97278
|
/** An array of primitive values. Same primitive/enum fields as `PrimitiveProperty`,
|
|
@@ -97109,10 +97289,9 @@ class SchemaView {
|
|
|
97109
97289
|
const idx = this._def.enumIdx;
|
|
97110
97290
|
return idx !== -1 ? new Enumeration(this._ctx, idx) : undefined;
|
|
97111
97291
|
}
|
|
97112
|
-
|
|
97113
|
-
|
|
97114
|
-
|
|
97115
|
-
}
|
|
97292
|
+
/** KindOfQuantity. If there is no local KindOfQuantity and the property is an override, we take this
|
|
97293
|
+
* from the overridden property. */
|
|
97294
|
+
get kindOfQuantity() { return this._kindOfQuantity; }
|
|
97116
97295
|
get arrayMinOccurs() { return this._def.arrayMinOccurs; }
|
|
97117
97296
|
get arrayMaxOccurs() { return this._def.arrayMaxOccurs; }
|
|
97118
97297
|
}
|
|
@@ -98018,6 +98197,7 @@ function mergeFragmentBlob(ctx, data) {
|
|
|
98018
98197
|
defIdx,
|
|
98019
98198
|
labelStringIdx: pr.labelStringIdx,
|
|
98020
98199
|
priority: pr.priority,
|
|
98200
|
+
overriddenProperty: undefined,
|
|
98021
98201
|
});
|
|
98022
98202
|
}
|
|
98023
98203
|
let sourceConstraintIdx = -1;
|
|
@@ -110829,30 +111009,63 @@ class CoordinateConverter {
|
|
|
110829
111009
|
}
|
|
110830
111010
|
}
|
|
110831
111011
|
/** An object capable of communicating with the backend to convert between coordinates in a geographic coordinate system and coordinates in an [[IModelConnection]]'s own coordinate system.
|
|
111012
|
+
* Conversion results retain the backend's per-point status, including failed vertical conversions. Check each status
|
|
111013
|
+
* before using elevations; [[GeoCoordStatus.VerticalDatumConvertError]] does not provide a reliable converted Z.
|
|
111014
|
+
* Results, including failures, are cached in this converter. Loading grids does not invalidate those cached results.
|
|
111015
|
+
* To retry after resources become available, finish outstanding requests and acquire a fresh converter from
|
|
111016
|
+
* [[GeoServices.getConverter]] instead of reusing the retained instance.
|
|
110832
111017
|
* @see [[GeoServices.getConverter]] to obtain a converter.
|
|
110833
111018
|
* @see [GeographicCRS]($common) for more information about geographic coordinate reference systems.
|
|
110834
111019
|
* @public
|
|
110835
111020
|
*/
|
|
110836
111021
|
class GeoConverter {
|
|
110837
|
-
|
|
110838
|
-
|
|
111022
|
+
_converters;
|
|
111023
|
+
_gcs;
|
|
111024
|
+
_options;
|
|
110839
111025
|
/** Used for removing this converter from GeoServices' cache after all requests are completed.
|
|
110840
111026
|
* @internal
|
|
110841
111027
|
*/
|
|
110842
111028
|
onAllRequestsCompleted = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
110843
111029
|
/** @internal */
|
|
110844
111030
|
constructor(opts) {
|
|
111031
|
+
this._options = opts;
|
|
111032
|
+
this._gcs = opts.getGcs?.();
|
|
111033
|
+
this._converters = this.createConverters();
|
|
111034
|
+
}
|
|
111035
|
+
createConverters() {
|
|
111036
|
+
const opts = this._options;
|
|
110845
111037
|
const isIModelClosed = opts.isIModelClosed;
|
|
110846
|
-
|
|
110847
|
-
|
|
110848
|
-
|
|
110849
|
-
|
|
110850
|
-
|
|
110851
|
-
|
|
110852
|
-
|
|
110853
|
-
|
|
110854
|
-
|
|
110855
|
-
|
|
111038
|
+
return {
|
|
111039
|
+
geoToIModel: new CoordinateConverter({
|
|
111040
|
+
direction: "geoToIModel",
|
|
111041
|
+
isIModelClosed,
|
|
111042
|
+
requestPoints: async (geoCoords) => opts.toIModelCoords({ source: opts.datum, geoCoords }),
|
|
111043
|
+
}),
|
|
111044
|
+
iModelToGeo: new CoordinateConverter({
|
|
111045
|
+
direction: "iModelToGeo",
|
|
111046
|
+
isIModelClosed,
|
|
111047
|
+
requestPoints: async (iModelCoords) => opts.fromIModelCoords({ target: opts.datum, iModelCoords }),
|
|
111048
|
+
}),
|
|
111049
|
+
};
|
|
111050
|
+
}
|
|
111051
|
+
refreshGcs() {
|
|
111052
|
+
const gcs = this._options.getGcs?.();
|
|
111053
|
+
if (gcs !== this._gcs) {
|
|
111054
|
+
this._gcs = gcs;
|
|
111055
|
+
this._converters = this.createConverters();
|
|
111056
|
+
}
|
|
111057
|
+
}
|
|
111058
|
+
async convert(points, direction) {
|
|
111059
|
+
for (;;) {
|
|
111060
|
+
this.refreshGcs();
|
|
111061
|
+
const converter = this._converters[direction];
|
|
111062
|
+
const result = await converter.convert(points);
|
|
111063
|
+
this.refreshGcs();
|
|
111064
|
+
if (converter !== this._converters[direction])
|
|
111065
|
+
continue;
|
|
111066
|
+
this.checkCompletion();
|
|
111067
|
+
return result;
|
|
111068
|
+
}
|
|
110856
111069
|
}
|
|
110857
111070
|
/** Convert the specified geographic coordinates into iModel coordinates. */
|
|
110858
111071
|
async convertToIModelCoords(geoPoints) {
|
|
@@ -110866,8 +111079,7 @@ class GeoConverter {
|
|
|
110866
111079
|
}
|
|
110867
111080
|
/** @internal */
|
|
110868
111081
|
async getIModelCoordinatesFromGeoCoordinates(geoPoints) {
|
|
110869
|
-
const result = await this.
|
|
110870
|
-
this.checkCompletion();
|
|
111082
|
+
const result = await this.convert(geoPoints, "geoToIModel");
|
|
110871
111083
|
return {
|
|
110872
111084
|
iModelCoords: result.points,
|
|
110873
111085
|
fromCache: result.fromCache,
|
|
@@ -110875,20 +111087,20 @@ class GeoConverter {
|
|
|
110875
111087
|
}
|
|
110876
111088
|
/** @internal */
|
|
110877
111089
|
async getGeoCoordinatesFromIModelCoordinates(iModelPoints) {
|
|
110878
|
-
const result = await this.
|
|
110879
|
-
this.checkCompletion();
|
|
111090
|
+
const result = await this.convert(iModelPoints, "iModelToGeo");
|
|
110880
111091
|
return {
|
|
110881
111092
|
geoCoords: result.points,
|
|
110882
111093
|
fromCache: result.fromCache,
|
|
110883
111094
|
};
|
|
110884
111095
|
}
|
|
110885
111096
|
checkCompletion() {
|
|
110886
|
-
if (this.
|
|
111097
|
+
if (this._converters.geoToIModel.isIdle && this._converters.iModelToGeo.isIdle)
|
|
110887
111098
|
this.onAllRequestsCompleted.raiseEvent();
|
|
110888
111099
|
}
|
|
110889
111100
|
/** @internal */
|
|
110890
111101
|
getCachedIModelCoordinatesFromGeoCoordinates(geoPoints) {
|
|
110891
|
-
|
|
111102
|
+
this.refreshGcs();
|
|
111103
|
+
return this._converters.geoToIModel.findCached(geoPoints);
|
|
110892
111104
|
}
|
|
110893
111105
|
}
|
|
110894
111106
|
/** The Geographic Services available for an [[IModelConnection]].
|
|
@@ -110916,6 +111128,7 @@ class GeoServices {
|
|
|
110916
111128
|
static createForIModel(iModel) {
|
|
110917
111129
|
return new GeoServices({
|
|
110918
111130
|
isIModelClosed: () => iModel.isClosed,
|
|
111131
|
+
getGcs: () => iModel.geographicCoordinateSystem,
|
|
110919
111132
|
toIModelCoords: async (request) => {
|
|
110920
111133
|
const rpc = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelReadRpcInterface.getClientForRouting(iModel.routingContext.token);
|
|
110921
111134
|
const response = await rpc.getIModelCoordinatesFromGeoCoordinates(iModel.getRpcProps(), request);
|
|
@@ -113041,6 +113254,25 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
113041
113254
|
async generateElementMeshes(requestProps) {
|
|
113042
113255
|
return _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelReadRpcInterface.getClientForRouting(this.routingContext.token).generateElementMeshes(this.getRpcProps(), requestProps);
|
|
113043
113256
|
}
|
|
113257
|
+
/** Constructs a point after validating raw ordinates, before JSON normalization can conceal NaN.
|
|
113258
|
+
* Omitted ordinates default to zero.
|
|
113259
|
+
* @throws IModelError with GeoServiceStatus.CSMapError if any supplied ordinate is non-finite.
|
|
113260
|
+
* @internal
|
|
113261
|
+
*/
|
|
113262
|
+
static getFiniteGeoPoint(props) {
|
|
113263
|
+
const coordinates = Array.isArray(props) ? props : [props.x, props.y, props.z];
|
|
113264
|
+
for (let index = 0; index < 3; ++index) {
|
|
113265
|
+
// RPC marshaling converts NaN and infinities to null; reject null rather than defaulting it to zero.
|
|
113266
|
+
if (!Number.isFinite(coordinates[index] === undefined ? 0 : coordinates[index])) {
|
|
113267
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(loggerCategory, "Non-finite coordinate returned by geographic conversion", {
|
|
113268
|
+
ordinateIndex: index,
|
|
113269
|
+
coordinates: coordinates.map((ordinate) => String(ordinate)),
|
|
113270
|
+
});
|
|
113271
|
+
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.GeoServiceStatus.CSMapError, "Non-finite coordinate returned by geographic conversion");
|
|
113272
|
+
}
|
|
113273
|
+
}
|
|
113274
|
+
return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point3d.fromJSON(props);
|
|
113275
|
+
}
|
|
113044
113276
|
/** Convert a point in this iModel's Spatial coordinates to a [[Cartographic]] using the Geographic location services for this IModelConnection.
|
|
113045
113277
|
* @param spatial A point in the iModel's spatial coordinates
|
|
113046
113278
|
* @param result If defined, use this for output
|
|
@@ -113059,7 +113291,7 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
113059
113291
|
const geoServiceStatus = (0,_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.mapToGeoServiceStatus)(coordResponse.geoCoords[0].s);
|
|
113060
113292
|
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError(geoServiceStatus, "Error converting spatial to cartographic");
|
|
113061
113293
|
}
|
|
113062
|
-
const longLatHeight =
|
|
113294
|
+
const longLatHeight = IModelConnection.getFiniteGeoPoint(coordResponse.geoCoords[0].p); // x is longitude in degrees, y is latitude in degrees, z is height in meters...
|
|
113063
113295
|
return _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Cartographic.fromDegrees({ longitude: longLatHeight.x, latitude: longLatHeight.y, height: longLatHeight.z }, result);
|
|
113064
113296
|
}
|
|
113065
113297
|
/** Convert a point in this iModel's Spatial coordinates to a [[Cartographic]] using the Geographic location services for this IModelConnection or [[IModel.ecefLocation]].
|
|
@@ -113113,7 +113345,7 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
113113
113345
|
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.GeoCoordStatus.NoGCSDefined:
|
|
113114
113346
|
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.GeoServiceStatus.NoGeoLocation, "iModel is not GeoLocated");
|
|
113115
113347
|
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.GeoCoordStatus.Success:
|
|
113116
|
-
const llh =
|
|
113348
|
+
const llh = IModelConnection.getFiniteGeoPoint(coord.p);
|
|
113117
113349
|
return _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Cartographic.fromDegrees({ longitude: llh.x, latitude: llh.y, height: llh.z });
|
|
113118
113350
|
default:
|
|
113119
113351
|
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError((0,_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.mapToGeoServiceStatus)(coord.s), "Error converting spatial to cartographic");
|
|
@@ -113140,7 +113372,7 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
113140
113372
|
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError(geoServiceStatus, "Error converting cartographic to spatial");
|
|
113141
113373
|
}
|
|
113142
113374
|
result = result ? result : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Point3d.createZero();
|
|
113143
|
-
result.
|
|
113375
|
+
result.setFrom(IModelConnection.getFiniteGeoPoint(coordResponse.iModelCoords[0].p));
|
|
113144
113376
|
return result;
|
|
113145
113377
|
}
|
|
113146
113378
|
/** Convert a [Cartographic]($common) to a point in this iModel's Spatial coordinates using a [[GeoConverter]] or[[IModel.ecefLocation]($common).
|
|
@@ -113190,7 +113422,7 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
|
|
|
113190
113422
|
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.GeoCoordStatus.NoGCSDefined:
|
|
113191
113423
|
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.GeoServiceStatus.NoGeoLocation, "iModel is not GeoLocated");
|
|
113192
113424
|
case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.GeoCoordStatus.Success:
|
|
113193
|
-
return
|
|
113425
|
+
return IModelConnection.getFiniteGeoPoint(coord.p);
|
|
113194
113426
|
default:
|
|
113195
113427
|
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError((0,_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.mapToGeoServiceStatus)(coord.s), "Error converting cartographic to spatial");
|
|
113196
113428
|
}
|
|
@@ -113526,7 +113758,7 @@ class SnapshotConnection extends IModelConnection {
|
|
|
113526
113758
|
/** @internal */
|
|
113527
113759
|
async getDictionaryModel() {
|
|
113528
113760
|
const res = await this._iModel.models.queryProps({ from: "bis.DictionaryModel", wantPrivate: true });
|
|
113529
|
-
if (res.length !== 1
|
|
113761
|
+
if (res.length !== 1)
|
|
113530
113762
|
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelError(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.IModelStatus.BadModel, "bis.DictionaryModel");
|
|
113531
113763
|
return res[0].id;
|
|
113532
113764
|
}
|
|
@@ -137061,6 +137293,7 @@ const extensionExports = {
|
|
|
137061
137293
|
imageBufferToPngDataUrl: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.imageBufferToPngDataUrl,
|
|
137062
137294
|
imageElementFromImageSource: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.imageElementFromImageSource,
|
|
137063
137295
|
imageElementFromUrl: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.imageElementFromUrl,
|
|
137296
|
+
isPersisted: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.isPersisted,
|
|
137064
137297
|
queryTerrainElevationOffset: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.queryTerrainElevationOffset,
|
|
137065
137298
|
readElementGraphics: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.readElementGraphics,
|
|
137066
137299
|
readGltfGraphics: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.readGltfGraphics,
|
|
@@ -174181,9 +174414,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
174181
174414
|
/* harmony import */ var _common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/FrontendLoggerCategory */ "../../core/frontend/lib/esm/common/FrontendLoggerCategory.js");
|
|
174182
174415
|
/* harmony import */ var _DisplayStyleState__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../DisplayStyleState */ "../../core/frontend/lib/esm/DisplayStyleState.js");
|
|
174183
174416
|
/* harmony import */ var _IModelApp__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../IModelApp */ "../../core/frontend/lib/esm/IModelApp.js");
|
|
174184
|
-
/* harmony import */ var
|
|
174185
|
-
/* harmony import */ var
|
|
174186
|
-
/* harmony import */ var
|
|
174417
|
+
/* harmony import */ var _IModelConnection__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../IModelConnection */ "../../core/frontend/lib/esm/IModelConnection.js");
|
|
174418
|
+
/* harmony import */ var _RealityDataSource__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../RealityDataSource */ "../../core/frontend/lib/esm/RealityDataSource.js");
|
|
174419
|
+
/* harmony import */ var _common_internal_render_MeshPrimitives__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../common/internal/render/MeshPrimitives */ "../../core/frontend/lib/esm/common/internal/render/MeshPrimitives.js");
|
|
174420
|
+
/* harmony import */ var _tile_internal__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../tile/internal */ "../../core/frontend/lib/esm/tile/internal.js");
|
|
174187
174421
|
/*---------------------------------------------------------------------------------------------
|
|
174188
174422
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
174189
174423
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -174202,6 +174436,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
174202
174436
|
|
|
174203
174437
|
|
|
174204
174438
|
|
|
174439
|
+
|
|
174205
174440
|
const scratchRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_2__.Range3d.create();
|
|
174206
174441
|
const scratchWorldFrustum = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Frustum();
|
|
174207
174442
|
function compareSourceKeys(lhs, rhs) {
|
|
@@ -174265,7 +174500,7 @@ class OrbitGtTileTreeParams {
|
|
|
174265
174500
|
id;
|
|
174266
174501
|
modelId;
|
|
174267
174502
|
iModel;
|
|
174268
|
-
get priority() { return
|
|
174503
|
+
get priority() { return _tile_internal__WEBPACK_IMPORTED_MODULE_11__.TileLoadPriority.Context; }
|
|
174269
174504
|
constructor(rdSourceKey, iModel, modelId, location) {
|
|
174270
174505
|
this.location = location;
|
|
174271
174506
|
const key = rdSourceKey;
|
|
@@ -174274,7 +174509,7 @@ class OrbitGtTileTreeParams {
|
|
|
174274
174509
|
this.iModel = iModel;
|
|
174275
174510
|
}
|
|
174276
174511
|
}
|
|
174277
|
-
class OrbitGtRootTile extends
|
|
174512
|
+
class OrbitGtRootTile extends _tile_internal__WEBPACK_IMPORTED_MODULE_11__.Tile {
|
|
174278
174513
|
_loadChildren(_resolve, _reject) { }
|
|
174279
174514
|
async requestContent(_isCanceled) { return undefined; }
|
|
174280
174515
|
get channel() { return _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.tileAdmin.channels.getForHttp("itwinjs-orbitgit"); }
|
|
@@ -174347,7 +174582,7 @@ class TileSortProjector {
|
|
|
174347
174582
|
coordinate.z = point.z;
|
|
174348
174583
|
}
|
|
174349
174584
|
}
|
|
174350
|
-
class OrbitGtTileGraphic extends
|
|
174585
|
+
class OrbitGtTileGraphic extends _tile_internal__WEBPACK_IMPORTED_MODULE_11__.TileUsageMarker {
|
|
174351
174586
|
graphic;
|
|
174352
174587
|
constructor(graphic, viewport, time) {
|
|
174353
174588
|
super();
|
|
@@ -174358,7 +174593,7 @@ class OrbitGtTileGraphic extends _tile_internal__WEBPACK_IMPORTED_MODULE_10__.Ti
|
|
|
174358
174593
|
this.graphic[Symbol.dispose]();
|
|
174359
174594
|
}
|
|
174360
174595
|
}
|
|
174361
|
-
class OrbitGtTileTree extends
|
|
174596
|
+
class OrbitGtTileTree extends _tile_internal__WEBPACK_IMPORTED_MODULE_11__.TileTree {
|
|
174362
174597
|
_dataManager;
|
|
174363
174598
|
_centerOffset;
|
|
174364
174599
|
_ecefTransform;
|
|
@@ -174374,7 +174609,7 @@ class OrbitGtTileTree extends _tile_internal__WEBPACK_IMPORTED_MODULE_10__.TileT
|
|
|
174374
174609
|
this._dataManager = _dataManager;
|
|
174375
174610
|
this._centerOffset = _centerOffset;
|
|
174376
174611
|
this._ecefTransform = _ecefTransform;
|
|
174377
|
-
this._layerHandler = new
|
|
174612
|
+
this._layerHandler = new _tile_internal__WEBPACK_IMPORTED_MODULE_11__.LayerTileTreeHandler(this);
|
|
174378
174613
|
this._tileParams = { contentId: "0", range: cloudRange, maximumSize: 256 };
|
|
174379
174614
|
this.rootTile = new OrbitGtRootTile(this._tileParams, this);
|
|
174380
174615
|
}
|
|
@@ -174444,7 +174679,7 @@ class OrbitGtTileTree extends _tile_internal__WEBPACK_IMPORTED_MODULE_10__.TileT
|
|
|
174444
174679
|
range.high.addInPlace(this._centerOffset);
|
|
174445
174680
|
const qParams = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QParams3d.fromRange(range, undefined, (tile.points8 != null) ? _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Quantization.rangeScale8 : _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Quantization.rangeScale16);
|
|
174446
174681
|
const featureTable = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.FeatureTable(1, this.modelId, _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.BatchType.Primary);
|
|
174447
|
-
const features = new
|
|
174682
|
+
const features = new _common_internal_render_MeshPrimitives__WEBPACK_IMPORTED_MODULE_10__.Mesh.Features(featureTable);
|
|
174448
174683
|
const system = _IModelApp__WEBPACK_IMPORTED_MODULE_7__.IModelApp.renderSystem;
|
|
174449
174684
|
const voxelSize = (range.high.x - range.low.x) / 64;
|
|
174450
174685
|
features.add(new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Feature(this.modelId), 1);
|
|
@@ -174519,7 +174754,17 @@ async function computeVerticalDatumShift(geoOrigin, heightAsEllipsoidalDbZ, iMod
|
|
|
174519
174754
|
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_5__.FrontendLoggerCategory.RealityData, `Failed to compute orthometric height correction for point cloud (status ${response.iModelCoords[0].s}); heights will be treated as ellipsoidal`);
|
|
174520
174755
|
return 0;
|
|
174521
174756
|
}
|
|
174522
|
-
|
|
174757
|
+
try {
|
|
174758
|
+
const converted = _IModelConnection__WEBPACK_IMPORTED_MODULE_8__.IModelConnection.getFiniteGeoPoint(response.iModelCoords[0].p);
|
|
174759
|
+
const shift = converted.z - heightAsEllipsoidalDbZ;
|
|
174760
|
+
if (!Number.isFinite(shift))
|
|
174761
|
+
throw new Error("Non-finite orthometric height correction");
|
|
174762
|
+
return shift;
|
|
174763
|
+
}
|
|
174764
|
+
catch {
|
|
174765
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_5__.FrontendLoggerCategory.RealityData, "Non-finite orthometric height correction for point cloud; heights will be treated as ellipsoidal");
|
|
174766
|
+
return 0;
|
|
174767
|
+
}
|
|
174523
174768
|
}
|
|
174524
174769
|
catch (err) {
|
|
174525
174770
|
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_5__.FrontendLoggerCategory.RealityData, err);
|
|
@@ -174549,7 +174794,7 @@ async function computeVerticalDatumShift(geoOrigin, heightAsEllipsoidalDbZ, iMod
|
|
|
174549
174794
|
return isValidSASToken(props.sasToken);
|
|
174550
174795
|
}
|
|
174551
174796
|
async function createOrbitGtTileTree(rdSourceKey, iModel, modelId) {
|
|
174552
|
-
const rdSource = await
|
|
174797
|
+
const rdSource = await _RealityDataSource__WEBPACK_IMPORTED_MODULE_9__.RealityDataSource.fromKey(rdSourceKey, iModel.iTwinId);
|
|
174553
174798
|
const isContextShare = rdSourceKey.provider === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RealityDataProvider.ContextShare;
|
|
174554
174799
|
const isTilestUrl = rdSourceKey.provider === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RealityDataProvider.TilesetUrl;
|
|
174555
174800
|
let blobStringUrl;
|
|
@@ -174568,7 +174813,7 @@ async function computeVerticalDatumShift(geoOrigin, heightAsEllipsoidalDbZ, iMod
|
|
|
174568
174813
|
blobStringUrl = rdSourceKey.id;
|
|
174569
174814
|
}
|
|
174570
174815
|
else {
|
|
174571
|
-
const orbitGtBlobProps =
|
|
174816
|
+
const orbitGtBlobProps = _RealityDataSource__WEBPACK_IMPORTED_MODULE_9__.RealityDataSource.createOrbitGtBlobPropsFromKey(rdSourceKey);
|
|
174572
174817
|
if (orbitGtBlobProps === undefined)
|
|
174573
174818
|
return undefined;
|
|
174574
174819
|
if (!isValidOrbitGtBlobProps(orbitGtBlobProps))
|
|
@@ -174657,7 +174902,7 @@ async function computeVerticalDatumShift(geoOrigin, heightAsEllipsoidalDbZ, iMod
|
|
|
174657
174902
|
/** Supplies a reality data [[TileTree]] from a URL. May be associated with a persistent [[GeometricModelState]], or attached at run-time via a [[ContextOrbitGtState]].
|
|
174658
174903
|
* Exported strictly for tests.
|
|
174659
174904
|
*/
|
|
174660
|
-
class OrbitGtTreeReference extends
|
|
174905
|
+
class OrbitGtTreeReference extends _tile_internal__WEBPACK_IMPORTED_MODULE_11__.RealityModelTileTree.Reference {
|
|
174661
174906
|
treeOwner;
|
|
174662
174907
|
_rdSourceKey;
|
|
174663
174908
|
_modelId;
|
|
@@ -174670,11 +174915,11 @@ class OrbitGtTreeReference extends _tile_internal__WEBPACK_IMPORTED_MODULE_10__.
|
|
|
174670
174915
|
this._rdSourceKey = props.rdSourceKey;
|
|
174671
174916
|
}
|
|
174672
174917
|
else if (props.orbitGtBlob) {
|
|
174673
|
-
this._rdSourceKey =
|
|
174918
|
+
this._rdSourceKey = _RealityDataSource__WEBPACK_IMPORTED_MODULE_9__.RealityDataSource.createKeyFromOrbitGtBlobProps(props.orbitGtBlob);
|
|
174674
174919
|
}
|
|
174675
174920
|
else {
|
|
174676
174921
|
// TODO: Maybe we should throw an exception
|
|
174677
|
-
this._rdSourceKey =
|
|
174922
|
+
this._rdSourceKey = _RealityDataSource__WEBPACK_IMPORTED_MODULE_9__.RealityDataSource.createKeyFromBlobUrl("", _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RealityDataProvider.OrbitGtBlob, _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RealityDataFormat.OPC);
|
|
174678
174923
|
}
|
|
174679
174924
|
// ###TODO find compatible model Id
|
|
174680
174925
|
let modelId = props.modelId;
|
|
@@ -181673,7 +181918,12 @@ var QuantityType;
|
|
|
181673
181918
|
class AlternateUnitLabelsRegistry {
|
|
181674
181919
|
_alternateLabelRegistry = new Map();
|
|
181675
181920
|
addAlternateLabels(key, ...labels) {
|
|
181676
|
-
|
|
181921
|
+
let entry = this._alternateLabelRegistry.get(key);
|
|
181922
|
+
if (!entry) {
|
|
181923
|
+
entry = new Set();
|
|
181924
|
+
this._alternateLabelRegistry.set(key, entry);
|
|
181925
|
+
}
|
|
181926
|
+
labels.forEach((value) => entry.add(value));
|
|
181677
181927
|
}
|
|
181678
181928
|
constructor(defaultAlternates) {
|
|
181679
181929
|
if (defaultAlternates) {
|
|
@@ -182476,7 +182726,7 @@ class QuantityFormatter {
|
|
|
182476
182726
|
const entry = this.quantityTypesRegistry.get(quantityKey);
|
|
182477
182727
|
if (!entry)
|
|
182478
182728
|
throw new Error(`Unable to find registered quantity type with key ${quantityKey}`);
|
|
182479
|
-
return entry.generateParserSpec(this.getFormatPropsByQuantityTypeEntryAndSystem(entry, requestedSystem), this.unitsProvider);
|
|
182729
|
+
return entry.generateParserSpec(this.getFormatPropsByQuantityTypeEntryAndSystem(entry, requestedSystem), this.unitsProvider, this.alternateUnitLabelsProvider);
|
|
182480
182730
|
}
|
|
182481
182731
|
/** Asynchronous Call to get a ParserSpec for a QuantityType.
|
|
182482
182732
|
* @param type One of the built-in quantity types supported.
|
|
@@ -182624,7 +182874,7 @@ class QuantityFormatter {
|
|
|
182624
182874
|
const { persistenceUnitName, formatProps, formatName } = props;
|
|
182625
182875
|
const persistenceUnitProps = await this._unitsProvider.findUnitByName(persistenceUnitName);
|
|
182626
182876
|
const format = await _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.Format.createFromJSON(formatName ?? "temp", this._unitsProvider, formatProps);
|
|
182627
|
-
return _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.ParserSpec.create(format, this._unitsProvider, persistenceUnitProps);
|
|
182877
|
+
return _itwin_core_quantity__WEBPACK_IMPORTED_MODULE_1__.ParserSpec.create(format, this._unitsProvider, persistenceUnitProps, this.alternateUnitLabelsProvider);
|
|
182628
182878
|
}
|
|
182629
182879
|
/**
|
|
182630
182880
|
* @beta
|
|
@@ -183166,6 +183416,9 @@ const UNIT_EXTRA_DATA = [
|
|
|
183166
183416
|
{ name: "Units.CUB_US_SURVEY_FT", altDisplayLabels: ["cf"] },
|
|
183167
183417
|
{ name: "Units.CUB_YRD", altDisplayLabels: ["cy"] },
|
|
183168
183418
|
{ name: "Units.CUB_M", altDisplayLabels: ["cm"] },
|
|
183419
|
+
// Velocity ( base unit m/s )
|
|
183420
|
+
{ name: "Units.KM_PER_HR", altDisplayLabels: ["kph", "kmh"] },
|
|
183421
|
+
{ name: "Units.MPH", altDisplayLabels: ["mph"] },
|
|
183169
183422
|
];
|
|
183170
183423
|
|
|
183171
183424
|
|
|
@@ -316496,7 +316749,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
316496
316749
|
/* harmony export */ });
|
|
316497
316750
|
/* harmony import */ var i18next__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! i18next */ "../../common/temp/node_modules/.pnpm/i18next@21.10.0/node_modules/i18next/dist/esm/i18next.js");
|
|
316498
316751
|
/* harmony import */ var i18next_browser_languagedetector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! i18next-browser-languagedetector */ "../../common/temp/node_modules/.pnpm/i18next-browser-languagedetector@6.1.8/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js");
|
|
316499
|
-
/* harmony import */ var i18next_http_backend__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! i18next-http-backend */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@
|
|
316752
|
+
/* harmony import */ var i18next_http_backend__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! i18next-http-backend */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.5/node_modules/i18next-http-backend/esm/index.js");
|
|
316500
316753
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
316501
316754
|
/*---------------------------------------------------------------------------------------------
|
|
316502
316755
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
@@ -337211,7 +337464,16 @@ class Parser {
|
|
|
337211
337464
|
// Don't add space when the wip token is empty.
|
|
337212
337465
|
continue;
|
|
337213
337466
|
}
|
|
337214
|
-
|
|
337467
|
+
// A slash directly between two label characters (e.g. "km/h") is part of the label, not a division.
|
|
337468
|
+
const nextCharCode = str.charCodeAt(i + 1);
|
|
337469
|
+
const isUnitLabelSlash = charCode === _Constants__WEBPACK_IMPORTED_MODULE_1__.QuantityConstants.CHAR_SLASH &&
|
|
337470
|
+
wipToken.length > 0 &&
|
|
337471
|
+
i + 1 < str.length &&
|
|
337472
|
+
!/\s/.test(str[i - 1]) &&
|
|
337473
|
+
!/\s/.test(str[i + 1]) &&
|
|
337474
|
+
!Parser.isDigitOrDecimalSeparator(nextCharCode, format) &&
|
|
337475
|
+
!isOperator(nextCharCode);
|
|
337476
|
+
if (isCharOperator && !isUnitLabelSlash) {
|
|
337215
337477
|
if (wipToken.length > 0) {
|
|
337216
337478
|
// There is a token is progress, process it now, before adding the new operator token.
|
|
337217
337479
|
tokens.push(new ParseToken(wipToken));
|
|
@@ -344181,7 +344443,7 @@ class TestContext {
|
|
|
344181
344443
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
344182
344444
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
344183
344445
|
await core_frontend_1.NoRenderApp.startup({
|
|
344184
|
-
applicationVersion: "5.
|
|
344446
|
+
applicationVersion: "5.16.0-dev.2",
|
|
344185
344447
|
applicationId: this.settings.gprid,
|
|
344186
344448
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
344187
344449
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -366354,534 +366616,377 @@ const isSafeIterable = (thing) =>
|
|
|
366354
366616
|
|
|
366355
366617
|
/***/ },
|
|
366356
366618
|
|
|
366357
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@
|
|
366358
|
-
/*!**********************************************************************************************************************!*\
|
|
366359
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/index.js ***!
|
|
366360
|
-
\**********************************************************************************************************************/
|
|
366361
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
366362
|
-
|
|
366363
|
-
"use strict";
|
|
366364
|
-
__webpack_require__.r(__webpack_exports__);
|
|
366365
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
366366
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
366367
|
-
/* harmony export */ });
|
|
366368
|
-
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js");
|
|
366369
|
-
/* harmony import */ var _request_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./request.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/request.js");
|
|
366370
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
366371
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
366372
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
366373
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
366374
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
366375
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
366376
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
366377
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
366378
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
366379
|
-
;
|
|
366380
|
-
|
|
366381
|
-
var getDefaults = function getDefaults() {
|
|
366382
|
-
return {
|
|
366383
|
-
loadPath: '/locales/{{lng}}/{{ns}}.json',
|
|
366384
|
-
addPath: '/locales/add/{{lng}}/{{ns}}',
|
|
366385
|
-
parse: function parse(data) {
|
|
366386
|
-
return JSON.parse(data);
|
|
366387
|
-
},
|
|
366388
|
-
stringify: JSON.stringify,
|
|
366389
|
-
parsePayload: function parsePayload(namespace, key, fallbackValue) {
|
|
366390
|
-
return _defineProperty({}, key, fallbackValue || '');
|
|
366391
|
-
},
|
|
366392
|
-
parseLoadPayload: function parseLoadPayload(languages, namespaces) {
|
|
366393
|
-
return undefined;
|
|
366394
|
-
},
|
|
366395
|
-
request: _request_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
366396
|
-
reloadInterval: typeof window !== 'undefined' ? false : 60 * 60 * 1000,
|
|
366397
|
-
customHeaders: {},
|
|
366398
|
-
queryStringParams: {},
|
|
366399
|
-
crossDomain: false,
|
|
366400
|
-
withCredentials: false,
|
|
366401
|
-
overrideMimeType: false,
|
|
366402
|
-
requestOptions: {
|
|
366403
|
-
mode: 'cors',
|
|
366404
|
-
credentials: 'same-origin',
|
|
366405
|
-
cache: 'default'
|
|
366406
|
-
}
|
|
366407
|
-
};
|
|
366408
|
-
};
|
|
366409
|
-
var Backend = function () {
|
|
366410
|
-
function Backend(services) {
|
|
366411
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
366412
|
-
var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
366413
|
-
_classCallCheck(this, Backend);
|
|
366414
|
-
this.services = services;
|
|
366415
|
-
this.options = options;
|
|
366416
|
-
this.allOptions = allOptions;
|
|
366417
|
-
this.type = 'backend';
|
|
366418
|
-
this.init(services, options, allOptions);
|
|
366419
|
-
}
|
|
366420
|
-
return _createClass(Backend, [{
|
|
366421
|
-
key: "init",
|
|
366422
|
-
value: function init(services) {
|
|
366423
|
-
var _this = this;
|
|
366424
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
366425
|
-
var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
366426
|
-
this.services = services;
|
|
366427
|
-
this.options = _objectSpread(_objectSpread(_objectSpread({}, getDefaults()), this.options || {}), options);
|
|
366428
|
-
this.allOptions = allOptions;
|
|
366429
|
-
if (this.services && this.options.reloadInterval) {
|
|
366430
|
-
var timer = setInterval(function () {
|
|
366431
|
-
return _this.reload();
|
|
366432
|
-
}, this.options.reloadInterval);
|
|
366433
|
-
if (_typeof(timer) === 'object' && typeof timer.unref === 'function') timer.unref();
|
|
366434
|
-
}
|
|
366435
|
-
}
|
|
366436
|
-
}, {
|
|
366437
|
-
key: "readMulti",
|
|
366438
|
-
value: function readMulti(languages, namespaces, callback) {
|
|
366439
|
-
this._readAny(languages, languages, namespaces, namespaces, callback);
|
|
366440
|
-
}
|
|
366441
|
-
}, {
|
|
366442
|
-
key: "read",
|
|
366443
|
-
value: function read(language, namespace, callback) {
|
|
366444
|
-
this._readAny([language], language, [namespace], namespace, callback);
|
|
366445
|
-
}
|
|
366446
|
-
}, {
|
|
366447
|
-
key: "_readAny",
|
|
366448
|
-
value: function _readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {
|
|
366449
|
-
var _this2 = this;
|
|
366450
|
-
var loadPath = this.options.loadPath;
|
|
366451
|
-
if (typeof this.options.loadPath === 'function') {
|
|
366452
|
-
loadPath = this.options.loadPath(languages, namespaces);
|
|
366453
|
-
}
|
|
366454
|
-
loadPath = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.makePromise)(loadPath);
|
|
366455
|
-
loadPath.then(function (resolvedLoadPath) {
|
|
366456
|
-
if (!resolvedLoadPath) return callback(null, {});
|
|
366457
|
-
var url = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.interpolateUrl)(resolvedLoadPath, {
|
|
366458
|
-
lng: languages.join('+'),
|
|
366459
|
-
ns: namespaces.join('+')
|
|
366460
|
-
});
|
|
366461
|
-
if (url == null) {
|
|
366462
|
-
var safeLngs = languages.map(_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue).join(', ');
|
|
366463
|
-
var safeNss = namespaces.map(_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue).join(', ');
|
|
366464
|
-
return callback(new Error('i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[' + safeLngs + '] namespaces=[' + safeNss + ']'), false);
|
|
366465
|
-
}
|
|
366466
|
-
_this2.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);
|
|
366467
|
-
});
|
|
366468
|
-
}
|
|
366469
|
-
}, {
|
|
366470
|
-
key: "loadUrl",
|
|
366471
|
-
value: function loadUrl(url, callback, languages, namespaces) {
|
|
366472
|
-
var _this3 = this;
|
|
366473
|
-
var lng = typeof languages === 'string' ? [languages] : languages;
|
|
366474
|
-
var ns = typeof namespaces === 'string' ? [namespaces] : namespaces;
|
|
366475
|
-
var payload = this.options.parseLoadPayload(lng, ns);
|
|
366476
|
-
var safeUrl = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue)((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.redactUrlCredentials)(url));
|
|
366477
|
-
this.options.request(this.options, url, payload, function (err, res) {
|
|
366478
|
-
if (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback('failed loading ' + safeUrl + '; status code: ' + res.status, true);
|
|
366479
|
-
if (res && res.status >= 400 && res.status < 500) return callback('failed loading ' + safeUrl + '; status code: ' + res.status, false);
|
|
366480
|
-
if (!res && err && err.message) {
|
|
366481
|
-
var errorMessage = err.message.toLowerCase();
|
|
366482
|
-
var isNetworkError = ['failed', 'fetch', 'network', 'load'].find(function (term) {
|
|
366483
|
-
return errorMessage.indexOf(term) > -1;
|
|
366484
|
-
});
|
|
366485
|
-
if (isNetworkError) {
|
|
366486
|
-
return callback('failed loading ' + safeUrl + ': ' + (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue)(err.message), true);
|
|
366487
|
-
}
|
|
366488
|
-
}
|
|
366489
|
-
if (err) return callback(err, false);
|
|
366490
|
-
var ret, parseErr;
|
|
366491
|
-
try {
|
|
366492
|
-
if (typeof res.data === 'string') {
|
|
366493
|
-
ret = _this3.options.parse(res.data, languages, namespaces);
|
|
366494
|
-
} else {
|
|
366495
|
-
ret = res.data;
|
|
366496
|
-
}
|
|
366497
|
-
} catch (e) {
|
|
366498
|
-
parseErr = 'failed parsing ' + safeUrl + ' to json';
|
|
366499
|
-
}
|
|
366500
|
-
if (parseErr) return callback(parseErr, false);
|
|
366501
|
-
callback(null, ret);
|
|
366502
|
-
});
|
|
366503
|
-
}
|
|
366504
|
-
}, {
|
|
366505
|
-
key: "create",
|
|
366506
|
-
value: function create(languages, namespace, key, fallbackValue, callback) {
|
|
366507
|
-
var _this4 = this;
|
|
366508
|
-
if (!this.options.addPath) return;
|
|
366509
|
-
if (typeof languages === 'string') languages = [languages];
|
|
366510
|
-
var payload = this.options.parsePayload(namespace, key, fallbackValue);
|
|
366511
|
-
var finished = 0;
|
|
366512
|
-
var dataArray = [];
|
|
366513
|
-
var resArray = [];
|
|
366514
|
-
languages.forEach(function (lng) {
|
|
366515
|
-
var addPath = _this4.options.addPath;
|
|
366516
|
-
if (typeof _this4.options.addPath === 'function') {
|
|
366517
|
-
addPath = _this4.options.addPath(lng, namespace);
|
|
366518
|
-
}
|
|
366519
|
-
var url = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.interpolateUrl)(addPath, {
|
|
366520
|
-
lng: lng,
|
|
366521
|
-
ns: namespace
|
|
366522
|
-
});
|
|
366523
|
-
if (url == null) {
|
|
366524
|
-
finished += 1;
|
|
366525
|
-
if (callback && finished === languages.length) callback(dataArray, resArray);
|
|
366526
|
-
return;
|
|
366527
|
-
}
|
|
366528
|
-
_this4.options.request(_this4.options, url, payload, function (data, res) {
|
|
366529
|
-
finished += 1;
|
|
366530
|
-
dataArray.push(data);
|
|
366531
|
-
resArray.push(res);
|
|
366532
|
-
if (finished === languages.length) {
|
|
366533
|
-
if (typeof callback === 'function') callback(dataArray, resArray);
|
|
366534
|
-
}
|
|
366535
|
-
});
|
|
366536
|
-
});
|
|
366537
|
-
}
|
|
366538
|
-
}, {
|
|
366539
|
-
key: "reload",
|
|
366540
|
-
value: function reload() {
|
|
366541
|
-
var _this5 = this;
|
|
366542
|
-
var _this$services = this.services,
|
|
366543
|
-
backendConnector = _this$services.backendConnector,
|
|
366544
|
-
languageUtils = _this$services.languageUtils,
|
|
366545
|
-
logger = _this$services.logger;
|
|
366546
|
-
var currentLanguage = backendConnector.language;
|
|
366547
|
-
if (currentLanguage && currentLanguage.toLowerCase() === 'cimode') return;
|
|
366548
|
-
var toLoad = [];
|
|
366549
|
-
var append = function append(lng) {
|
|
366550
|
-
var lngs = languageUtils.toResolveHierarchy(lng);
|
|
366551
|
-
lngs.forEach(function (l) {
|
|
366552
|
-
if (toLoad.indexOf(l) < 0) toLoad.push(l);
|
|
366553
|
-
});
|
|
366554
|
-
};
|
|
366555
|
-
append(currentLanguage);
|
|
366556
|
-
if (this.allOptions.preload) this.allOptions.preload.forEach(function (l) {
|
|
366557
|
-
return append(l);
|
|
366558
|
-
});
|
|
366559
|
-
toLoad.forEach(function (lng) {
|
|
366560
|
-
_this5.allOptions.ns.forEach(function (ns) {
|
|
366561
|
-
backendConnector.read(lng, ns, 'read', null, null, function (err, data) {
|
|
366562
|
-
if (err) logger.warn("loading namespace ".concat(ns, " for language ").concat(lng, " failed"), err);
|
|
366563
|
-
if (!err && data) logger.log("loaded namespace ".concat(ns, " for language ").concat(lng), data);
|
|
366564
|
-
backendConnector.loaded("".concat(lng, "|").concat(ns), err, data);
|
|
366565
|
-
});
|
|
366566
|
-
});
|
|
366567
|
-
});
|
|
366568
|
-
}
|
|
366569
|
-
}]);
|
|
366570
|
-
}();
|
|
366571
|
-
Backend.type = 'backend';
|
|
366572
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Backend);
|
|
366573
|
-
|
|
366574
|
-
/***/ },
|
|
366575
|
-
|
|
366576
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/request.js"
|
|
366577
|
-
/*!************************************************************************************************************************!*\
|
|
366578
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/request.js ***!
|
|
366579
|
-
\************************************************************************************************************************/
|
|
366580
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
366581
|
-
|
|
366582
|
-
"use strict";
|
|
366583
|
-
__webpack_require__.r(__webpack_exports__);
|
|
366584
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
366585
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
366586
|
-
/* harmony export */ });
|
|
366587
|
-
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js");
|
|
366588
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
366589
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
366590
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
366591
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
366592
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
366593
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
366594
|
-
;
|
|
366595
|
-
var fetchApi = typeof fetch === 'function' ? fetch : undefined;
|
|
366596
|
-
if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.fetch) {
|
|
366597
|
-
fetchApi = __webpack_require__.g.fetch;
|
|
366598
|
-
} else if (typeof window !== 'undefined' && window.fetch) {
|
|
366599
|
-
fetchApi = window.fetch;
|
|
366600
|
-
}
|
|
366601
|
-
var XmlHttpRequestApi;
|
|
366602
|
-
if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasXMLHttpRequest)()) {
|
|
366603
|
-
if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.XMLHttpRequest) {
|
|
366604
|
-
XmlHttpRequestApi = __webpack_require__.g.XMLHttpRequest;
|
|
366605
|
-
} else if (typeof window !== 'undefined' && window.XMLHttpRequest) {
|
|
366606
|
-
XmlHttpRequestApi = window.XMLHttpRequest;
|
|
366607
|
-
}
|
|
366608
|
-
}
|
|
366609
|
-
var ActiveXObjectApi;
|
|
366610
|
-
if (typeof ActiveXObject === 'function') {
|
|
366611
|
-
if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.ActiveXObject) {
|
|
366612
|
-
ActiveXObjectApi = __webpack_require__.g.ActiveXObject;
|
|
366613
|
-
} else if (typeof window !== 'undefined' && window.ActiveXObject) {
|
|
366614
|
-
ActiveXObjectApi = window.ActiveXObject;
|
|
366615
|
-
}
|
|
366616
|
-
}
|
|
366617
|
-
if (typeof fetchApi !== 'function') fetchApi = undefined;
|
|
366618
|
-
if (!fetchApi && !XmlHttpRequestApi && !ActiveXObjectApi) {
|
|
366619
|
-
try {
|
|
366620
|
-
__webpack_require__.e(/*! import() */ "vendors-common_temp_node_modules_pnpm_cross-fetch_4_1_0_node_modules_cross-fetch_dist_browser-44272f").then(() => (__webpack_require__.t(/*! cross-fetch */ "../../common/temp/node_modules/.pnpm/cross-fetch@4.1.0/node_modules/cross-fetch/dist/browser-ponyfill.js", 19))).then(function (mod) {
|
|
366621
|
-
fetchApi = mod.default;
|
|
366622
|
-
}).catch(function () {});
|
|
366623
|
-
} catch (e) {}
|
|
366624
|
-
}
|
|
366625
|
-
var UNSAFE_KEYS = ['__proto__', 'constructor', 'prototype'];
|
|
366626
|
-
var addQueryString = function addQueryString(url, params) {
|
|
366627
|
-
if (params && _typeof(params) === 'object') {
|
|
366628
|
-
var queryString = '';
|
|
366629
|
-
for (var _i = 0, _Object$keys = Object.keys(params); _i < _Object$keys.length; _i++) {
|
|
366630
|
-
var paramName = _Object$keys[_i];
|
|
366631
|
-
if (UNSAFE_KEYS.indexOf(paramName) > -1) continue;
|
|
366632
|
-
queryString += '&' + encodeURIComponent(paramName) + '=' + encodeURIComponent(params[paramName]);
|
|
366633
|
-
}
|
|
366634
|
-
if (!queryString) return url;
|
|
366635
|
-
url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);
|
|
366636
|
-
}
|
|
366637
|
-
return url;
|
|
366638
|
-
};
|
|
366639
|
-
var fetchIt = function fetchIt(url, fetchOptions, callback, altFetch) {
|
|
366640
|
-
var resolver = function resolver(response) {
|
|
366641
|
-
if (!response.ok) return callback(response.statusText || 'Error', {
|
|
366642
|
-
status: response.status
|
|
366643
|
-
});
|
|
366644
|
-
response.text().then(function (data) {
|
|
366645
|
-
callback(null, {
|
|
366646
|
-
status: response.status,
|
|
366647
|
-
data: data
|
|
366648
|
-
});
|
|
366649
|
-
}).catch(callback);
|
|
366650
|
-
};
|
|
366651
|
-
if (altFetch) {
|
|
366652
|
-
var altResponse = altFetch(url, fetchOptions);
|
|
366653
|
-
if (altResponse instanceof Promise) {
|
|
366654
|
-
altResponse.then(resolver).catch(callback);
|
|
366655
|
-
return;
|
|
366656
|
-
}
|
|
366657
|
-
}
|
|
366658
|
-
if (typeof fetch === 'function') {
|
|
366659
|
-
fetch(url, fetchOptions).then(resolver).catch(callback);
|
|
366660
|
-
} else {
|
|
366661
|
-
fetchApi(url, fetchOptions).then(resolver).catch(callback);
|
|
366662
|
-
}
|
|
366663
|
-
};
|
|
366664
|
-
var requestWithFetch = function requestWithFetch(options, url, payload, callback) {
|
|
366665
|
-
if (options.queryStringParams) {
|
|
366666
|
-
url = addQueryString(url, options.queryStringParams);
|
|
366667
|
-
}
|
|
366668
|
-
var headers = _objectSpread({}, typeof options.customHeaders === 'function' ? options.customHeaders() : options.customHeaders);
|
|
366669
|
-
if (typeof window === 'undefined' && typeof __webpack_require__.g !== 'undefined' && typeof __webpack_require__.g.process !== 'undefined' && __webpack_require__.g.process.versions && __webpack_require__.g.process.versions.node) {
|
|
366670
|
-
headers['User-Agent'] = "i18next-http-backend (node/".concat(__webpack_require__.g.process.version, "; ").concat(__webpack_require__.g.process.platform, " ").concat(__webpack_require__.g.process.arch, ")");
|
|
366671
|
-
}
|
|
366672
|
-
if (payload) headers['Content-Type'] = 'application/json';
|
|
366673
|
-
var reqOptions = typeof options.requestOptions === 'function' ? options.requestOptions(payload) : options.requestOptions;
|
|
366674
|
-
var fetchOptions = _objectSpread({
|
|
366675
|
-
method: payload ? 'POST' : 'GET',
|
|
366676
|
-
body: payload ? options.stringify(payload) : undefined,
|
|
366677
|
-
headers: headers
|
|
366678
|
-
}, options._omitFetchOptions ? {} : reqOptions);
|
|
366679
|
-
var altFetch = typeof options.alternateFetch === 'function' && options.alternateFetch.length >= 1 ? options.alternateFetch : undefined;
|
|
366680
|
-
try {
|
|
366681
|
-
fetchIt(url, fetchOptions, callback, altFetch);
|
|
366682
|
-
} catch (e) {
|
|
366683
|
-
if (!reqOptions || Object.keys(reqOptions).length === 0 || !e.message || e.message.indexOf('not implemented') < 0) {
|
|
366684
|
-
return callback(e);
|
|
366685
|
-
}
|
|
366686
|
-
try {
|
|
366687
|
-
Object.keys(reqOptions).forEach(function (opt) {
|
|
366688
|
-
delete fetchOptions[opt];
|
|
366689
|
-
});
|
|
366690
|
-
fetchIt(url, fetchOptions, callback, altFetch);
|
|
366691
|
-
options._omitFetchOptions = true;
|
|
366692
|
-
} catch (err) {
|
|
366693
|
-
callback(err);
|
|
366694
|
-
}
|
|
366695
|
-
}
|
|
366696
|
-
};
|
|
366697
|
-
var requestWithXmlHttpRequest = function requestWithXmlHttpRequest(options, url, payload, callback) {
|
|
366698
|
-
if (payload && _typeof(payload) === 'object') {
|
|
366699
|
-
payload = addQueryString('', payload).slice(1);
|
|
366700
|
-
}
|
|
366701
|
-
if (options.queryStringParams) {
|
|
366702
|
-
url = addQueryString(url, options.queryStringParams);
|
|
366703
|
-
}
|
|
366704
|
-
try {
|
|
366705
|
-
var x = XmlHttpRequestApi ? new XmlHttpRequestApi() : new ActiveXObjectApi('MSXML2.XMLHTTP.3.0');
|
|
366706
|
-
x.open(payload ? 'POST' : 'GET', url, 1);
|
|
366707
|
-
if (!options.crossDomain) {
|
|
366708
|
-
x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
|
366709
|
-
}
|
|
366710
|
-
x.withCredentials = !!options.withCredentials;
|
|
366711
|
-
if (payload) {
|
|
366712
|
-
x.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
366713
|
-
}
|
|
366714
|
-
if (x.overrideMimeType) {
|
|
366715
|
-
x.overrideMimeType('application/json');
|
|
366716
|
-
}
|
|
366717
|
-
var h = options.customHeaders;
|
|
366718
|
-
h = typeof h === 'function' ? h() : h;
|
|
366719
|
-
if (h) {
|
|
366720
|
-
for (var _i2 = 0, _Object$keys2 = Object.keys(h); _i2 < _Object$keys2.length; _i2++) {
|
|
366721
|
-
var i = _Object$keys2[_i2];
|
|
366722
|
-
if (UNSAFE_KEYS.indexOf(i) > -1) continue;
|
|
366723
|
-
x.setRequestHeader(i, h[i]);
|
|
366724
|
-
}
|
|
366725
|
-
}
|
|
366726
|
-
x.onreadystatechange = function () {
|
|
366727
|
-
x.readyState > 3 && callback(x.status >= 400 ? x.statusText : null, {
|
|
366728
|
-
status: x.status,
|
|
366729
|
-
data: x.responseText
|
|
366730
|
-
});
|
|
366731
|
-
};
|
|
366732
|
-
x.send(payload);
|
|
366733
|
-
} catch (e) {
|
|
366734
|
-
console && console.log(e);
|
|
366735
|
-
}
|
|
366736
|
-
};
|
|
366737
|
-
var request = function request(options, url, payload, callback) {
|
|
366738
|
-
if (typeof payload === 'function') {
|
|
366739
|
-
callback = payload;
|
|
366740
|
-
payload = undefined;
|
|
366741
|
-
}
|
|
366742
|
-
callback = callback || function () {};
|
|
366743
|
-
if (fetchApi && url.indexOf('file:') !== 0) {
|
|
366744
|
-
return requestWithFetch(options, url, payload, callback);
|
|
366745
|
-
}
|
|
366746
|
-
if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasXMLHttpRequest)() || typeof ActiveXObject === 'function') {
|
|
366747
|
-
return requestWithXmlHttpRequest(options, url, payload, callback);
|
|
366748
|
-
}
|
|
366749
|
-
callback(new Error('No fetch and no xhr implementation found!'));
|
|
366750
|
-
};
|
|
366751
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (request);
|
|
366752
|
-
|
|
366753
|
-
/***/ },
|
|
366754
|
-
|
|
366755
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js"
|
|
366619
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.5/node_modules/i18next-http-backend/esm/index.js"
|
|
366756
366620
|
/*!**********************************************************************************************************************!*\
|
|
366757
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@
|
|
366621
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.5/node_modules/i18next-http-backend/esm/index.js ***!
|
|
366758
366622
|
\**********************************************************************************************************************/
|
|
366759
366623
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
366760
366624
|
|
|
366761
366625
|
"use strict";
|
|
366762
366626
|
__webpack_require__.r(__webpack_exports__);
|
|
366763
366627
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
366764
|
-
/* harmony export */
|
|
366765
|
-
/* harmony export */ hasXMLHttpRequest: () => (/* binding */ hasXMLHttpRequest),
|
|
366766
|
-
/* harmony export */ interpolate: () => (/* binding */ interpolate),
|
|
366767
|
-
/* harmony export */ interpolateUrl: () => (/* binding */ interpolateUrl),
|
|
366768
|
-
/* harmony export */ isSafeLangUrlSegment: () => (/* binding */ isSafeLangUrlSegment),
|
|
366769
|
-
/* harmony export */ isSafeNsUrlSegment: () => (/* binding */ isSafeNsUrlSegment),
|
|
366770
|
-
/* harmony export */ isSafeUrlSegment: () => (/* binding */ isSafeUrlSegment),
|
|
366771
|
-
/* harmony export */ makePromise: () => (/* binding */ makePromise),
|
|
366772
|
-
/* harmony export */ redactUrlCredentials: () => (/* binding */ redactUrlCredentials),
|
|
366773
|
-
/* harmony export */ sanitizeLogValue: () => (/* binding */ sanitizeLogValue)
|
|
366628
|
+
/* harmony export */ "default": () => (/* binding */ Backend)
|
|
366774
366629
|
/* harmony export */ });
|
|
366775
|
-
|
|
366776
|
-
|
|
366777
|
-
|
|
366778
|
-
|
|
366779
|
-
|
|
366780
|
-
|
|
366781
|
-
|
|
366782
|
-
|
|
366783
|
-
|
|
366784
|
-
each.call(slice.call(arguments, 1), function (source) {
|
|
366785
|
-
if (source) {
|
|
366786
|
-
for (var _i = 0, _Object$keys = Object.keys(source); _i < _Object$keys.length; _i++) {
|
|
366787
|
-
var prop = _Object$keys[_i];
|
|
366788
|
-
if (UNSAFE_KEYS.indexOf(prop) > -1) continue;
|
|
366789
|
-
if (obj[prop] === undefined) obj[prop] = source[prop];
|
|
366790
|
-
}
|
|
366791
|
-
}
|
|
366792
|
-
});
|
|
366793
|
-
return obj;
|
|
366794
|
-
}
|
|
366630
|
+
//#region lib/utils.js
|
|
366631
|
+
const arr = [];
|
|
366632
|
+
arr.forEach;
|
|
366633
|
+
arr.slice;
|
|
366634
|
+
const UNSAFE_KEYS$1 = [
|
|
366635
|
+
"__proto__",
|
|
366636
|
+
"constructor",
|
|
366637
|
+
"prototype"
|
|
366638
|
+
];
|
|
366795
366639
|
function isSafeUrlSegmentBase(v) {
|
|
366796
|
-
|
|
366797
|
-
|
|
366798
|
-
|
|
366799
|
-
|
|
366800
|
-
|
|
366801
|
-
|
|
366802
|
-
|
|
366803
|
-
|
|
366640
|
+
if (typeof v !== "string") return false;
|
|
366641
|
+
if (v.length === 0 || v.length > 128) return false;
|
|
366642
|
+
if (UNSAFE_KEYS$1.indexOf(v) > -1) return false;
|
|
366643
|
+
if (v.indexOf("..") > -1) return false;
|
|
366644
|
+
if (v.indexOf("\\") > -1) return false;
|
|
366645
|
+
if (/[?#%:&=;\s]/.test(v)) return false;
|
|
366646
|
+
if (/[\x00-\x1F\x7F]/.test(v)) return false;
|
|
366647
|
+
return true;
|
|
366804
366648
|
}
|
|
366805
366649
|
function isSafeLangUrlSegment(v) {
|
|
366806
|
-
|
|
366807
|
-
|
|
366808
|
-
|
|
366650
|
+
if (!isSafeUrlSegmentBase(v)) return false;
|
|
366651
|
+
if (v.indexOf("/") > -1 || v.indexOf("@") > -1) return false;
|
|
366652
|
+
return true;
|
|
366809
366653
|
}
|
|
366810
366654
|
function isSafeNsUrlSegment(v) {
|
|
366811
|
-
|
|
366655
|
+
if (!isSafeUrlSegmentBase(v)) return false;
|
|
366656
|
+
if (v.indexOf("//") > -1) return false;
|
|
366657
|
+
return true;
|
|
366812
366658
|
}
|
|
366813
|
-
|
|
366814
|
-
|
|
366815
|
-
|
|
366816
|
-
ns: isSafeNsUrlSegment
|
|
366659
|
+
const SAFETY_CHECK_BY_KEY = {
|
|
366660
|
+
lng: isSafeLangUrlSegment,
|
|
366661
|
+
ns: isSafeNsUrlSegment
|
|
366817
366662
|
};
|
|
366818
366663
|
function sanitizeLogValue(v) {
|
|
366819
|
-
|
|
366820
|
-
|
|
366664
|
+
if (typeof v !== "string") return v;
|
|
366665
|
+
return v.replace(/[\r\n\x00-\x1F\x7F]/g, " ");
|
|
366821
366666
|
}
|
|
366822
366667
|
function redactUrlCredentials(u) {
|
|
366823
|
-
|
|
366824
|
-
|
|
366825
|
-
|
|
366826
|
-
|
|
366827
|
-
|
|
366828
|
-
|
|
366829
|
-
|
|
366830
|
-
|
|
366831
|
-
|
|
366832
|
-
|
|
366833
|
-
|
|
366834
|
-
|
|
366668
|
+
if (typeof u !== "string" || u.length === 0) return u;
|
|
366669
|
+
try {
|
|
366670
|
+
const parsed = new URL(u);
|
|
366671
|
+
if (parsed.username || parsed.password) {
|
|
366672
|
+
parsed.username = "";
|
|
366673
|
+
parsed.password = "";
|
|
366674
|
+
return parsed.toString();
|
|
366675
|
+
}
|
|
366676
|
+
return u;
|
|
366677
|
+
} catch (e) {
|
|
366678
|
+
return u.replace(/(\/\/)[^/@\s]+@/g, "$1");
|
|
366679
|
+
}
|
|
366835
366680
|
}
|
|
366836
366681
|
function hasXMLHttpRequest() {
|
|
366837
|
-
|
|
366682
|
+
return typeof XMLHttpRequest === "function" || typeof XMLHttpRequest === "object";
|
|
366838
366683
|
}
|
|
366684
|
+
/**
|
|
366685
|
+
* Determine whether the given `maybePromise` is a Promise.
|
|
366686
|
+
*
|
|
366687
|
+
* @param {*} maybePromise
|
|
366688
|
+
*
|
|
366689
|
+
* @returns {Boolean}
|
|
366690
|
+
*/
|
|
366839
366691
|
function isPromise(maybePromise) {
|
|
366840
|
-
|
|
366692
|
+
return !!maybePromise && typeof maybePromise.then === "function";
|
|
366841
366693
|
}
|
|
366694
|
+
/**
|
|
366695
|
+
* Convert any value to a Promise than will resolve to this value.
|
|
366696
|
+
*
|
|
366697
|
+
* @param {*} maybePromise
|
|
366698
|
+
*
|
|
366699
|
+
* @returns {Promise}
|
|
366700
|
+
*/
|
|
366842
366701
|
function makePromise(maybePromise) {
|
|
366843
|
-
|
|
366844
|
-
|
|
366845
|
-
}
|
|
366846
|
-
return Promise.resolve(maybePromise);
|
|
366847
|
-
}
|
|
366848
|
-
var interpolationRegexp = /\{\{(.+?)\}\}/g;
|
|
366849
|
-
function interpolate(str, data) {
|
|
366850
|
-
return str.replace(interpolationRegexp, function (match, key) {
|
|
366851
|
-
var k = key.trim();
|
|
366852
|
-
if (UNSAFE_KEYS.indexOf(k) > -1) return match;
|
|
366853
|
-
var value = data[k];
|
|
366854
|
-
return value != null ? value : match;
|
|
366855
|
-
});
|
|
366702
|
+
if (isPromise(maybePromise)) return maybePromise;
|
|
366703
|
+
return Promise.resolve(maybePromise);
|
|
366856
366704
|
}
|
|
366705
|
+
const interpolationRegexp = /\{\{(.+?)\}\}/g;
|
|
366706
|
+
const LEADING_DOUBLE_SLASH = /^[/\\]{2}/;
|
|
366857
366707
|
function interpolateUrl(str, data) {
|
|
366858
|
-
|
|
366859
|
-
|
|
366860
|
-
|
|
366861
|
-
|
|
366862
|
-
|
|
366863
|
-
|
|
366864
|
-
|
|
366865
|
-
|
|
366866
|
-
|
|
366867
|
-
|
|
366868
|
-
|
|
366869
|
-
|
|
366870
|
-
|
|
366871
|
-
|
|
366872
|
-
|
|
366873
|
-
|
|
366874
|
-
|
|
366875
|
-
|
|
366876
|
-
|
|
366877
|
-
|
|
366878
|
-
|
|
366879
|
-
|
|
366880
|
-
|
|
366881
|
-
|
|
366882
|
-
|
|
366883
|
-
|
|
366884
|
-
|
|
366708
|
+
let unsafe = false;
|
|
366709
|
+
const result = str.replace(interpolationRegexp, (match, key) => {
|
|
366710
|
+
const k = key.trim();
|
|
366711
|
+
if (UNSAFE_KEYS$1.indexOf(k) > -1) return match;
|
|
366712
|
+
const value = data[k];
|
|
366713
|
+
if (value == null) return match;
|
|
366714
|
+
const check = SAFETY_CHECK_BY_KEY[k] || isSafeLangUrlSegment;
|
|
366715
|
+
const segments = String(value).split("+");
|
|
366716
|
+
for (const seg of segments) if (!check(seg)) {
|
|
366717
|
+
unsafe = true;
|
|
366718
|
+
return match;
|
|
366719
|
+
}
|
|
366720
|
+
return segments.join("+");
|
|
366721
|
+
});
|
|
366722
|
+
if (unsafe) return null;
|
|
366723
|
+
if (LEADING_DOUBLE_SLASH.test(result) && !LEADING_DOUBLE_SLASH.test(str)) return null;
|
|
366724
|
+
return result;
|
|
366725
|
+
}
|
|
366726
|
+
//#endregion
|
|
366727
|
+
//#region lib/request.js
|
|
366728
|
+
const g = typeof globalThis !== "undefined" ? globalThis : typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : typeof window !== "undefined" ? window : void 0;
|
|
366729
|
+
let fetchApi;
|
|
366730
|
+
if (typeof fetch === "function") fetchApi = fetch;
|
|
366731
|
+
else if (g && typeof g.fetch === "function") fetchApi = g.fetch;
|
|
366732
|
+
const XmlHttpRequestApi = hasXMLHttpRequest() && g ? g.XMLHttpRequest : void 0;
|
|
366733
|
+
const ActiveXObjectApi = typeof ActiveXObject === "function" && g ? g.ActiveXObject : void 0;
|
|
366734
|
+
const UNSAFE_KEYS = [
|
|
366735
|
+
"__proto__",
|
|
366736
|
+
"constructor",
|
|
366737
|
+
"prototype"
|
|
366738
|
+
];
|
|
366739
|
+
const addQueryString = (url, params) => {
|
|
366740
|
+
if (params && typeof params === "object") {
|
|
366741
|
+
let queryString = "";
|
|
366742
|
+
for (const paramName of Object.keys(params)) {
|
|
366743
|
+
if (UNSAFE_KEYS.indexOf(paramName) > -1) continue;
|
|
366744
|
+
queryString += "&" + encodeURIComponent(paramName) + "=" + encodeURIComponent(params[paramName]);
|
|
366745
|
+
}
|
|
366746
|
+
if (!queryString) return url;
|
|
366747
|
+
url = url + (url.indexOf("?") !== -1 ? "&" : "?") + queryString.slice(1);
|
|
366748
|
+
}
|
|
366749
|
+
return url;
|
|
366750
|
+
};
|
|
366751
|
+
const fetchIt = (url, fetchOptions, callback, altFetch) => {
|
|
366752
|
+
const resolver = (response) => {
|
|
366753
|
+
if (!response.ok) return callback(response.statusText || "Error", { status: response.status });
|
|
366754
|
+
response.text().then((data) => {
|
|
366755
|
+
callback(null, {
|
|
366756
|
+
status: response.status,
|
|
366757
|
+
data
|
|
366758
|
+
});
|
|
366759
|
+
}).catch(callback);
|
|
366760
|
+
};
|
|
366761
|
+
if (altFetch) {
|
|
366762
|
+
const altResponse = altFetch(url, fetchOptions);
|
|
366763
|
+
if (altResponse instanceof Promise) {
|
|
366764
|
+
altResponse.then(resolver).catch(callback);
|
|
366765
|
+
return;
|
|
366766
|
+
}
|
|
366767
|
+
}
|
|
366768
|
+
if (typeof fetch === "function") fetch(url, fetchOptions).then(resolver).catch(callback);
|
|
366769
|
+
else fetchApi(url, fetchOptions).then(resolver).catch(callback);
|
|
366770
|
+
};
|
|
366771
|
+
const requestWithFetch = (options, url, payload, callback) => {
|
|
366772
|
+
if (options.queryStringParams) url = addQueryString(url, options.queryStringParams);
|
|
366773
|
+
const headers = { ...typeof options.customHeaders === "function" ? options.customHeaders() : options.customHeaders };
|
|
366774
|
+
if (typeof window === "undefined" && typeof __webpack_require__.g !== "undefined" && typeof __webpack_require__.g.process !== "undefined" && __webpack_require__.g.process.versions && __webpack_require__.g.process.versions.node) headers["User-Agent"] = `i18next-http-backend (node/${__webpack_require__.g.process.version}; ${__webpack_require__.g.process.platform} ${__webpack_require__.g.process.arch})`;
|
|
366775
|
+
if (payload) headers["Content-Type"] = "application/json";
|
|
366776
|
+
const reqOptions = typeof options.requestOptions === "function" ? options.requestOptions(payload) : options.requestOptions;
|
|
366777
|
+
const fetchOptions = {
|
|
366778
|
+
method: payload ? "POST" : "GET",
|
|
366779
|
+
body: payload ? options.stringify(payload) : void 0,
|
|
366780
|
+
headers,
|
|
366781
|
+
...options._omitFetchOptions ? {} : reqOptions
|
|
366782
|
+
};
|
|
366783
|
+
const altFetch = typeof options.alternateFetch === "function" && options.alternateFetch.length >= 1 ? options.alternateFetch : void 0;
|
|
366784
|
+
try {
|
|
366785
|
+
fetchIt(url, fetchOptions, callback, altFetch);
|
|
366786
|
+
} catch (e) {
|
|
366787
|
+
if (!reqOptions || Object.keys(reqOptions).length === 0 || !e.message || e.message.indexOf("not implemented") < 0) return callback(e);
|
|
366788
|
+
try {
|
|
366789
|
+
Object.keys(reqOptions).forEach((opt) => {
|
|
366790
|
+
delete fetchOptions[opt];
|
|
366791
|
+
});
|
|
366792
|
+
fetchIt(url, fetchOptions, callback, altFetch);
|
|
366793
|
+
options._omitFetchOptions = true;
|
|
366794
|
+
} catch (err) {
|
|
366795
|
+
callback(err);
|
|
366796
|
+
}
|
|
366797
|
+
}
|
|
366798
|
+
};
|
|
366799
|
+
const requestWithXmlHttpRequest = (options, url, payload, callback) => {
|
|
366800
|
+
if (payload && typeof payload === "object") payload = addQueryString("", payload).slice(1);
|
|
366801
|
+
if (options.queryStringParams) url = addQueryString(url, options.queryStringParams);
|
|
366802
|
+
try {
|
|
366803
|
+
const x = XmlHttpRequestApi ? new XmlHttpRequestApi() : new ActiveXObjectApi("MSXML2.XMLHTTP.3.0");
|
|
366804
|
+
x.open(payload ? "POST" : "GET", url, 1);
|
|
366805
|
+
if (!options.crossDomain) x.setRequestHeader("X-Requested-With", "XMLHttpRequest");
|
|
366806
|
+
x.withCredentials = !!options.withCredentials;
|
|
366807
|
+
if (payload) x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
|
366808
|
+
if (x.overrideMimeType) x.overrideMimeType("application/json");
|
|
366809
|
+
let h = options.customHeaders;
|
|
366810
|
+
h = typeof h === "function" ? h() : h;
|
|
366811
|
+
if (h) for (const i of Object.keys(h)) {
|
|
366812
|
+
if (UNSAFE_KEYS.indexOf(i) > -1) continue;
|
|
366813
|
+
x.setRequestHeader(i, h[i]);
|
|
366814
|
+
}
|
|
366815
|
+
x.onreadystatechange = () => {
|
|
366816
|
+
x.readyState > 3 && callback(x.status >= 400 ? x.statusText : null, {
|
|
366817
|
+
status: x.status,
|
|
366818
|
+
data: x.responseText
|
|
366819
|
+
});
|
|
366820
|
+
};
|
|
366821
|
+
x.send(payload);
|
|
366822
|
+
} catch (e) {
|
|
366823
|
+
console && console.log(e);
|
|
366824
|
+
}
|
|
366825
|
+
};
|
|
366826
|
+
const request = (options, url, payload, callback) => {
|
|
366827
|
+
if (typeof payload === "function") {
|
|
366828
|
+
callback = payload;
|
|
366829
|
+
payload = void 0;
|
|
366830
|
+
}
|
|
366831
|
+
callback = callback || (() => {});
|
|
366832
|
+
if (fetchApi && url.indexOf("file:") !== 0) return requestWithFetch(options, url, payload, callback);
|
|
366833
|
+
if (hasXMLHttpRequest() || typeof ActiveXObject === "function") return requestWithXmlHttpRequest(options, url, payload, callback);
|
|
366834
|
+
callback(/* @__PURE__ */ new Error("No fetch and no xhr implementation found!"));
|
|
366835
|
+
};
|
|
366836
|
+
//#endregion
|
|
366837
|
+
//#region lib/index.js
|
|
366838
|
+
const getDefaults = () => {
|
|
366839
|
+
return {
|
|
366840
|
+
loadPath: "/locales/{{lng}}/{{ns}}.json",
|
|
366841
|
+
addPath: "/locales/add/{{lng}}/{{ns}}",
|
|
366842
|
+
parse: (data) => JSON.parse(data),
|
|
366843
|
+
stringify: JSON.stringify,
|
|
366844
|
+
parsePayload: (namespace, key, fallbackValue) => ({ [key]: fallbackValue || "" }),
|
|
366845
|
+
parseLoadPayload: (languages, namespaces) => void 0,
|
|
366846
|
+
request,
|
|
366847
|
+
reloadInterval: typeof window !== "undefined" ? false : 3600 * 1e3,
|
|
366848
|
+
customHeaders: {},
|
|
366849
|
+
queryStringParams: {},
|
|
366850
|
+
crossDomain: false,
|
|
366851
|
+
withCredentials: false,
|
|
366852
|
+
overrideMimeType: false,
|
|
366853
|
+
requestOptions: {
|
|
366854
|
+
mode: "cors",
|
|
366855
|
+
credentials: "same-origin",
|
|
366856
|
+
cache: "default"
|
|
366857
|
+
}
|
|
366858
|
+
};
|
|
366859
|
+
};
|
|
366860
|
+
var Backend = class {
|
|
366861
|
+
constructor(services, options = {}, allOptions = {}) {
|
|
366862
|
+
this.services = services;
|
|
366863
|
+
this.options = options;
|
|
366864
|
+
this.allOptions = allOptions;
|
|
366865
|
+
this.type = "backend";
|
|
366866
|
+
this.init(services, options, allOptions);
|
|
366867
|
+
}
|
|
366868
|
+
init(services, options = {}, allOptions = {}) {
|
|
366869
|
+
this.services = services;
|
|
366870
|
+
this.options = {
|
|
366871
|
+
...getDefaults(),
|
|
366872
|
+
...this.options || {},
|
|
366873
|
+
...options
|
|
366874
|
+
};
|
|
366875
|
+
this.allOptions = allOptions;
|
|
366876
|
+
if (this.services && this.options.reloadInterval) {
|
|
366877
|
+
const timer = setInterval(() => this.reload(), this.options.reloadInterval);
|
|
366878
|
+
if (typeof timer === "object" && typeof timer.unref === "function") timer.unref();
|
|
366879
|
+
}
|
|
366880
|
+
}
|
|
366881
|
+
readMulti(languages, namespaces, callback) {
|
|
366882
|
+
this._readAny(languages, languages, namespaces, namespaces, callback);
|
|
366883
|
+
}
|
|
366884
|
+
read(language, namespace, callback) {
|
|
366885
|
+
this._readAny([language], language, [namespace], namespace, callback);
|
|
366886
|
+
}
|
|
366887
|
+
_readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {
|
|
366888
|
+
let loadPath = this.options.loadPath;
|
|
366889
|
+
if (typeof this.options.loadPath === "function") loadPath = this.options.loadPath(languages, namespaces);
|
|
366890
|
+
loadPath = makePromise(loadPath);
|
|
366891
|
+
loadPath.then((resolvedLoadPath) => {
|
|
366892
|
+
if (!resolvedLoadPath) return callback(null, {});
|
|
366893
|
+
const url = interpolateUrl(resolvedLoadPath, {
|
|
366894
|
+
lng: languages.join("+"),
|
|
366895
|
+
ns: namespaces.join("+")
|
|
366896
|
+
});
|
|
366897
|
+
if (url == null) {
|
|
366898
|
+
const safeLngs = languages.map(sanitizeLogValue).join(", ");
|
|
366899
|
+
const safeNss = namespaces.map(sanitizeLogValue).join(", ");
|
|
366900
|
+
return callback(/* @__PURE__ */ new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[" + safeLngs + "] namespaces=[" + safeNss + "]"), false);
|
|
366901
|
+
}
|
|
366902
|
+
this.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);
|
|
366903
|
+
}, (err) => callback(err, false));
|
|
366904
|
+
}
|
|
366905
|
+
loadUrl(url, callback, languages, namespaces) {
|
|
366906
|
+
const lng = typeof languages === "string" ? [languages] : languages;
|
|
366907
|
+
const ns = typeof namespaces === "string" ? [namespaces] : namespaces;
|
|
366908
|
+
const payload = this.options.parseLoadPayload(lng, ns);
|
|
366909
|
+
const safeUrl = sanitizeLogValue(redactUrlCredentials(url));
|
|
366910
|
+
this.options.request(this.options, url, payload, (err, res) => {
|
|
366911
|
+
if (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback("failed loading " + safeUrl + "; status code: " + res.status, true);
|
|
366912
|
+
if (res && res.status >= 400 && res.status < 500) return callback("failed loading " + safeUrl + "; status code: " + res.status, false);
|
|
366913
|
+
if (!res && err && err.message) {
|
|
366914
|
+
const errorMessage = err.message.toLowerCase();
|
|
366915
|
+
if ([
|
|
366916
|
+
"failed",
|
|
366917
|
+
"fetch",
|
|
366918
|
+
"network",
|
|
366919
|
+
"load"
|
|
366920
|
+
].find((term) => errorMessage.indexOf(term) > -1)) return callback("failed loading " + safeUrl + ": " + sanitizeLogValue(err.message), true);
|
|
366921
|
+
}
|
|
366922
|
+
if (err) return callback(err, false);
|
|
366923
|
+
let ret, parseErr;
|
|
366924
|
+
try {
|
|
366925
|
+
if (typeof res.data === "string") ret = this.options.parse(res.data, languages, namespaces);
|
|
366926
|
+
else ret = res.data;
|
|
366927
|
+
} catch (e) {
|
|
366928
|
+
parseErr = "failed parsing " + safeUrl + " to json";
|
|
366929
|
+
}
|
|
366930
|
+
if (parseErr) return callback(parseErr, false);
|
|
366931
|
+
callback(null, ret);
|
|
366932
|
+
});
|
|
366933
|
+
}
|
|
366934
|
+
create(languages, namespace, key, fallbackValue, callback) {
|
|
366935
|
+
if (!this.options.addPath) return;
|
|
366936
|
+
if (typeof languages === "string") languages = [languages];
|
|
366937
|
+
const payload = this.options.parsePayload(namespace, key, fallbackValue);
|
|
366938
|
+
let finished = 0;
|
|
366939
|
+
const dataArray = [];
|
|
366940
|
+
const resArray = [];
|
|
366941
|
+
languages.forEach((lng) => {
|
|
366942
|
+
let addPath = this.options.addPath;
|
|
366943
|
+
if (typeof this.options.addPath === "function") addPath = this.options.addPath(lng, namespace);
|
|
366944
|
+
const url = interpolateUrl(addPath, {
|
|
366945
|
+
lng,
|
|
366946
|
+
ns: namespace
|
|
366947
|
+
});
|
|
366948
|
+
if (url == null) {
|
|
366949
|
+
finished += 1;
|
|
366950
|
+
if (callback && finished === languages.length) callback(dataArray, resArray);
|
|
366951
|
+
return;
|
|
366952
|
+
}
|
|
366953
|
+
this.options.request(this.options, url, payload, (data, res) => {
|
|
366954
|
+
finished += 1;
|
|
366955
|
+
dataArray.push(data);
|
|
366956
|
+
resArray.push(res);
|
|
366957
|
+
if (finished === languages.length) {
|
|
366958
|
+
if (typeof callback === "function") callback(dataArray, resArray);
|
|
366959
|
+
}
|
|
366960
|
+
});
|
|
366961
|
+
});
|
|
366962
|
+
}
|
|
366963
|
+
reload() {
|
|
366964
|
+
const { backendConnector, languageUtils, logger } = this.services;
|
|
366965
|
+
const currentLanguage = backendConnector.language;
|
|
366966
|
+
if (currentLanguage && currentLanguage.toLowerCase() === "cimode") return;
|
|
366967
|
+
const toLoad = [];
|
|
366968
|
+
const append = (lng) => {
|
|
366969
|
+
languageUtils.toResolveHierarchy(lng).forEach((l) => {
|
|
366970
|
+
if (toLoad.indexOf(l) < 0) toLoad.push(l);
|
|
366971
|
+
});
|
|
366972
|
+
};
|
|
366973
|
+
append(currentLanguage);
|
|
366974
|
+
if (this.allOptions.preload) this.allOptions.preload.forEach((l) => append(l));
|
|
366975
|
+
toLoad.forEach((lng) => {
|
|
366976
|
+
this.allOptions.ns.forEach((ns) => {
|
|
366977
|
+
backendConnector.read(lng, ns, "read", null, null, (err, data) => {
|
|
366978
|
+
if (err) logger.warn(`loading namespace ${ns} for language ${lng} failed`, err);
|
|
366979
|
+
if (!err && data) logger.log(`loaded namespace ${ns} for language ${lng}`, data);
|
|
366980
|
+
backendConnector.loaded(`${lng}|${ns}`, err, data);
|
|
366981
|
+
});
|
|
366982
|
+
});
|
|
366983
|
+
});
|
|
366984
|
+
}
|
|
366985
|
+
};
|
|
366986
|
+
Backend.type = "backend";
|
|
366987
|
+
//#endregion
|
|
366988
|
+
|
|
366989
|
+
|
|
366885
366990
|
|
|
366886
366991
|
/***/ },
|
|
366887
366992
|
|
|
@@ -370950,7 +371055,7 @@ class WMS {
|
|
|
370950
371055
|
(module) {
|
|
370951
371056
|
|
|
370952
371057
|
"use strict";
|
|
370953
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.
|
|
371058
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.16.0-dev.2","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 build:workers && npm run -s copy:draco","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:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./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 && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","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 build:test-worker && vitest --run","cover":"npm run build:test-worker && vitest --run","build:test-worker":"vite build --config ./src/test/worker/vite.config.mts 1>&2","build:workers":"rimraf lib/workers/webpack && vite build --config ./src/workers/ImdlParser/vite.config.mts 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":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.12","@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/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/node":"~20.17.0","@types/sinon":"^17.0.2","@vitest/browser-playwright":"^4.1.10","@vitest/coverage-v8":"^4.1.10","cpx2":"^8.0.0","eslint":"^9.31.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","typescript":"~5.6.2","vite":"^6.4.4","vitest":"^4.1.10"},"//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/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^4.4.5","@loaders.gl/draco":"^4.4.5","fuse.js":"^3.3.0","wms-capabilities":"0.6.0"}}');
|
|
370954
371059
|
|
|
370955
371060
|
/***/ },
|
|
370956
371061
|
|
|
@@ -371022,36 +371127,6 @@ module.exports = /*#__PURE__*/JSON.parse('{"$schema":"../../../node_modules/@itw
|
|
|
371022
371127
|
/******/ return getter;
|
|
371023
371128
|
/******/ };
|
|
371024
371129
|
/******/
|
|
371025
|
-
/******/ /* webpack/runtime/create fake namespace object */
|
|
371026
|
-
/******/ (() => {
|
|
371027
|
-
/******/ const getProto = Object.getPrototypeOf;
|
|
371028
|
-
/******/ let leafPrototypes;
|
|
371029
|
-
/******/ // create a fake namespace object
|
|
371030
|
-
/******/ // mode & 1: value is a module id, require it
|
|
371031
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
371032
|
-
/******/ // mode & 4: return value when already ns object
|
|
371033
|
-
/******/ // mode & 16: return value when it's Promise-like
|
|
371034
|
-
/******/ // mode & 8|1: behave like require
|
|
371035
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
371036
|
-
/******/ if(mode & 1) value = this(value);
|
|
371037
|
-
/******/ if(mode & 8) return value;
|
|
371038
|
-
/******/ if(typeof value === 'object' && value) {
|
|
371039
|
-
/******/ if((mode & 4) && value.__esModule) return value;
|
|
371040
|
-
/******/ if((mode & 16) && typeof value.then === 'function') return value;
|
|
371041
|
-
/******/ }
|
|
371042
|
-
/******/ const ns = Object.create(null);
|
|
371043
|
-
/******/ __webpack_require__.r(ns);
|
|
371044
|
-
/******/ const def = {};
|
|
371045
|
-
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
|
|
371046
|
-
/******/ for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {
|
|
371047
|
-
/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
|
|
371048
|
-
/******/ }
|
|
371049
|
-
/******/ def['default'] = () => (value);
|
|
371050
|
-
/******/ __webpack_require__.d(ns, def);
|
|
371051
|
-
/******/ return ns;
|
|
371052
|
-
/******/ };
|
|
371053
|
-
/******/ })();
|
|
371054
|
-
/******/
|
|
371055
371130
|
/******/ /* webpack/runtime/define property getters */
|
|
371056
371131
|
/******/ // define getter/value functions for harmony exports
|
|
371057
371132
|
/******/ __webpack_require__.d = (exports, definition) => {
|