@itwin/core-i18n 3.4.0-dev.48 → 3.4.0-dev.55
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.
|
@@ -11208,9 +11208,9 @@ Browser.type = 'languageDetector';
|
|
|
11208
11208
|
|
|
11209
11209
|
/***/ }),
|
|
11210
11210
|
|
|
11211
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next@21.9.
|
|
11211
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next@21.9.2/node_modules/i18next/dist/cjs/i18next.js":
|
|
11212
11212
|
/*!****************************************************************************************************!*\
|
|
11213
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next@21.9.
|
|
11213
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next@21.9.2/node_modules/i18next/dist/cjs/i18next.js ***!
|
|
11214
11214
|
\****************************************************************************************************/
|
|
11215
11215
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
11216
11216
|
|
|
@@ -11332,6 +11332,13 @@ var Logger = function () {
|
|
|
11332
11332
|
prefix: "".concat(this.prefix, ":").concat(moduleName, ":")
|
|
11333
11333
|
}), this.options));
|
|
11334
11334
|
}
|
|
11335
|
+
}, {
|
|
11336
|
+
key: "clone",
|
|
11337
|
+
value: function clone(options) {
|
|
11338
|
+
options = options || this.options;
|
|
11339
|
+
options.prefix = options.prefix || this.prefix;
|
|
11340
|
+
return new Logger(this.logger, options);
|
|
11341
|
+
}
|
|
11335
11342
|
}]);
|
|
11336
11343
|
|
|
11337
11344
|
return Logger;
|
|
@@ -12880,7 +12887,12 @@ var Interpolator = function () {
|
|
|
12880
12887
|
var optionsString = "{".concat(c[1]);
|
|
12881
12888
|
key = c[0];
|
|
12882
12889
|
optionsString = this.interpolate(optionsString, clonedOptions);
|
|
12883
|
-
|
|
12890
|
+
var matchedSingleQuotes = optionsString.match(/'/g);
|
|
12891
|
+
var matchedDoubleQuotes = optionsString.match(/"/g);
|
|
12892
|
+
|
|
12893
|
+
if (matchedSingleQuotes && matchedSingleQuotes.length % 2 === 0 && !matchedDoubleQuotes || matchedDoubleQuotes.length % 2 !== 0) {
|
|
12894
|
+
optionsString = optionsString.replace(/'/g, '"');
|
|
12895
|
+
}
|
|
12884
12896
|
|
|
12885
12897
|
try {
|
|
12886
12898
|
clonedOptions = JSON.parse(optionsString);
|
|
@@ -13970,6 +13982,11 @@ var I18n = function (_EventEmitter) {
|
|
|
13970
13982
|
});
|
|
13971
13983
|
|
|
13972
13984
|
var clone = new I18n(mergedOptions);
|
|
13985
|
+
|
|
13986
|
+
if (options.debug !== undefined || options.prefix !== undefined) {
|
|
13987
|
+
clone.logger = clone.logger.clone(options);
|
|
13988
|
+
}
|
|
13989
|
+
|
|
13973
13990
|
var membersToCopy = ['store', 'services', 'language'];
|
|
13974
13991
|
membersToCopy.forEach(function (m) {
|
|
13975
13992
|
clone[m] = _this8[m];
|
|
@@ -16921,12 +16938,22 @@ class ByteStream {
|
|
|
16921
16938
|
get isAtTheEnd() { return this.curPos === this.length; }
|
|
16922
16939
|
/** The current read position as an index into the stream of bytes. */
|
|
16923
16940
|
get curPos() { return this._curPos; }
|
|
16924
|
-
set curPos(pos) {
|
|
16941
|
+
set curPos(pos) {
|
|
16942
|
+
this._curPos = pos;
|
|
16943
|
+
(0,_Assert__WEBPACK_IMPORTED_MODULE_0__.assert)(!this.isPastTheEnd);
|
|
16944
|
+
}
|
|
16925
16945
|
/** Adds the specified number of bytes to the current read position */
|
|
16926
|
-
advance(numBytes) {
|
|
16946
|
+
advance(numBytes) {
|
|
16947
|
+
this.curPos = (this.curPos + numBytes);
|
|
16948
|
+
return !this.isPastTheEnd;
|
|
16949
|
+
}
|
|
16927
16950
|
/** Subtracts the specified number of bytes from the current read position */
|
|
16928
|
-
rewind(numBytes) {
|
|
16929
|
-
|
|
16951
|
+
rewind(numBytes) {
|
|
16952
|
+
if (this.curPos - numBytes < 0)
|
|
16953
|
+
return false;
|
|
16954
|
+
this.curPos = this.curPos - numBytes;
|
|
16955
|
+
return true;
|
|
16956
|
+
}
|
|
16930
16957
|
/** Resets the current read position to the beginning of the stream */
|
|
16931
16958
|
reset() { this.curPos = 0; }
|
|
16932
16959
|
/** Read a unsigned 8-bit integer from the current read position and advance by 1 byte. */
|
|
@@ -17053,11 +17080,17 @@ function compareWithTolerance(a, b, tolerance = 0.1) {
|
|
|
17053
17080
|
return 0;
|
|
17054
17081
|
}
|
|
17055
17082
|
/** @public */
|
|
17056
|
-
function compareNumbers(a, b) {
|
|
17083
|
+
function compareNumbers(a, b) {
|
|
17084
|
+
return a - b;
|
|
17085
|
+
}
|
|
17057
17086
|
/** @public */
|
|
17058
|
-
function compareBooleans(a, b) {
|
|
17087
|
+
function compareBooleans(a, b) {
|
|
17088
|
+
return a !== b ? (a < b ? -1 : 1) : 0;
|
|
17089
|
+
}
|
|
17059
17090
|
/** @public */
|
|
17060
|
-
function compareStrings(a, b) {
|
|
17091
|
+
function compareStrings(a, b) {
|
|
17092
|
+
return a === b ? 0 : (a < b ? -1 : 1);
|
|
17093
|
+
}
|
|
17061
17094
|
/** @public */
|
|
17062
17095
|
function comparePossiblyUndefined(compareDefined, lhs, rhs) {
|
|
17063
17096
|
if (undefined === lhs)
|
|
@@ -17068,11 +17101,17 @@ function comparePossiblyUndefined(compareDefined, lhs, rhs) {
|
|
|
17068
17101
|
return compareDefined(lhs, rhs);
|
|
17069
17102
|
}
|
|
17070
17103
|
/** @public */
|
|
17071
|
-
function compareStringsOrUndefined(lhs, rhs) {
|
|
17104
|
+
function compareStringsOrUndefined(lhs, rhs) {
|
|
17105
|
+
return comparePossiblyUndefined(compareStrings, lhs, rhs);
|
|
17106
|
+
}
|
|
17072
17107
|
/** @public */
|
|
17073
|
-
function compareNumbersOrUndefined(lhs, rhs) {
|
|
17108
|
+
function compareNumbersOrUndefined(lhs, rhs) {
|
|
17109
|
+
return comparePossiblyUndefined(compareNumbers, lhs, rhs);
|
|
17110
|
+
}
|
|
17074
17111
|
/** @public */
|
|
17075
|
-
function compareBooleansOrUndefined(lhs, rhs) {
|
|
17112
|
+
function compareBooleansOrUndefined(lhs, rhs) {
|
|
17113
|
+
return comparePossiblyUndefined(compareBooleans, lhs, rhs);
|
|
17114
|
+
}
|
|
17076
17115
|
/** Compare two possibly-undefined values for equality. If both are undefined, the comparison is performed by the supplied `areEqual` function.
|
|
17077
17116
|
* @public
|
|
17078
17117
|
*/
|
|
@@ -18280,18 +18319,24 @@ var Id64;
|
|
|
18280
18319
|
* @see [[Id64.isInvalid]]
|
|
18281
18320
|
* @see [[Id64.isValidId64]]
|
|
18282
18321
|
*/
|
|
18283
|
-
function isValid(id) {
|
|
18322
|
+
function isValid(id) {
|
|
18323
|
+
return Id64.invalid !== id;
|
|
18324
|
+
}
|
|
18284
18325
|
Id64.isValid = isValid;
|
|
18285
18326
|
/** Returns true if the input is a well-formed [[Id64String]] representing a valid Id.
|
|
18286
18327
|
* @see [[Id64.isValid]]
|
|
18287
18328
|
* @see [[Id64.isId64]]
|
|
18288
18329
|
*/
|
|
18289
|
-
function isValidId64(id) {
|
|
18330
|
+
function isValidId64(id) {
|
|
18331
|
+
return Id64.invalid !== id && Id64.isId64(id);
|
|
18332
|
+
}
|
|
18290
18333
|
Id64.isValidId64 = isValidId64;
|
|
18291
18334
|
/** Returns true if the input is a well-formed [[Id64String]] representing an invalid Id.
|
|
18292
18335
|
* @see [[Id64.isValid]]
|
|
18293
18336
|
*/
|
|
18294
|
-
function isInvalid(id) {
|
|
18337
|
+
function isInvalid(id) {
|
|
18338
|
+
return Id64.invalid === id;
|
|
18339
|
+
}
|
|
18295
18340
|
Id64.isInvalid = isInvalid;
|
|
18296
18341
|
/** A specialized replacement for Set<Id64String> optimized for performance-critical code which represents large sets of [[Id64]]s as pairs of
|
|
18297
18342
|
* 32-bit integers.
|
|
@@ -18467,10 +18512,14 @@ var Guid;
|
|
|
18467
18512
|
/** Determine whether the input string is "guid-like". That is, it follows the 8-4-4-4-12 pattern. This does not enforce
|
|
18468
18513
|
* that the string is actually in valid UUID format.
|
|
18469
18514
|
*/
|
|
18470
|
-
function isGuid(value) {
|
|
18515
|
+
function isGuid(value) {
|
|
18516
|
+
return uuidPattern.test(value);
|
|
18517
|
+
}
|
|
18471
18518
|
Guid.isGuid = isGuid;
|
|
18472
18519
|
/** Determine whether the input string is a valid V4 Guid string */
|
|
18473
|
-
function isV4Guid(value) {
|
|
18520
|
+
function isV4Guid(value) {
|
|
18521
|
+
return /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$/.test(value);
|
|
18522
|
+
}
|
|
18474
18523
|
Guid.isV4Guid = isV4Guid;
|
|
18475
18524
|
/** Create a new V4 Guid value */
|
|
18476
18525
|
function createValue() {
|
|
@@ -18661,40 +18710,52 @@ var JsonUtils;
|
|
|
18661
18710
|
* @param defaultVal default value if json cannot be converted to boolean
|
|
18662
18711
|
* @returns the value of json as a boolean, or default value
|
|
18663
18712
|
*/
|
|
18664
|
-
function asBool(json, defaultVal = false) {
|
|
18713
|
+
function asBool(json, defaultVal = false) {
|
|
18714
|
+
return isNullOrUndefined(json) ? defaultVal : !!json;
|
|
18715
|
+
}
|
|
18665
18716
|
JsonUtils.asBool = asBool;
|
|
18666
18717
|
/** Get a value as an integer.
|
|
18667
18718
|
* @param json the input JSON object
|
|
18668
18719
|
* @param defaultVal default value if json cannot be converted to integer
|
|
18669
18720
|
* @returns the value of json as an integer, or default value
|
|
18670
18721
|
*/
|
|
18671
|
-
function asInt(json, defaultVal = 0) {
|
|
18722
|
+
function asInt(json, defaultVal = 0) {
|
|
18723
|
+
return (typeof json === "number") ? Math.trunc(json) : defaultVal;
|
|
18724
|
+
}
|
|
18672
18725
|
JsonUtils.asInt = asInt;
|
|
18673
18726
|
/** Get a value as a double.
|
|
18674
18727
|
* @param json the input JSON object
|
|
18675
18728
|
* @param defaultVal default value if json cannot be converted to double
|
|
18676
18729
|
* @returns the value of json as a double, or default value
|
|
18677
18730
|
*/
|
|
18678
|
-
function asDouble(json, defaultVal = 0) {
|
|
18731
|
+
function asDouble(json, defaultVal = 0) {
|
|
18732
|
+
return (typeof json === "number") ? json : defaultVal;
|
|
18733
|
+
}
|
|
18679
18734
|
JsonUtils.asDouble = asDouble;
|
|
18680
18735
|
/** Get a value as a string.
|
|
18681
18736
|
* @param json the input JSON object
|
|
18682
18737
|
* @param defaultVal default value if json cannot be converted to string
|
|
18683
18738
|
* @returns the value of json as a string, or default value
|
|
18684
18739
|
*/
|
|
18685
|
-
function asString(json, defaultVal = "") {
|
|
18740
|
+
function asString(json, defaultVal = "") {
|
|
18741
|
+
return isNullOrUndefined(json) ? defaultVal : json.toString();
|
|
18742
|
+
}
|
|
18686
18743
|
JsonUtils.asString = asString;
|
|
18687
18744
|
/** Get a value as an array.
|
|
18688
18745
|
* @param json the input JSON object
|
|
18689
18746
|
* @returns the input JSON object if it is an array, otherwise undefined
|
|
18690
18747
|
*/
|
|
18691
|
-
function asArray(json) {
|
|
18748
|
+
function asArray(json) {
|
|
18749
|
+
return Array.isArray(json) ? json : undefined;
|
|
18750
|
+
}
|
|
18692
18751
|
JsonUtils.asArray = asArray;
|
|
18693
18752
|
/** Get a value as an object.
|
|
18694
18753
|
* @param json the input JSON object
|
|
18695
18754
|
* @returns the input JSON object if it is an object, otherwise undefined
|
|
18696
18755
|
*/
|
|
18697
|
-
function asObject(json) {
|
|
18756
|
+
function asObject(json) {
|
|
18757
|
+
return "object" === typeof json ? json : undefined;
|
|
18758
|
+
}
|
|
18698
18759
|
JsonUtils.asObject = asObject;
|
|
18699
18760
|
/** Set or remove a number on a json object, given a key name, a value, and a default value. Sets `json[key] = val` if val is *not* equal to the default,
|
|
18700
18761
|
* otherwise `delete json[key]`. This is used to omit values from JSON strings that are of known defaults.
|
|
@@ -18703,10 +18764,12 @@ var JsonUtils;
|
|
|
18703
18764
|
* @param val the value to set
|
|
18704
18765
|
* @param defaultVal the default value.
|
|
18705
18766
|
*/
|
|
18706
|
-
function setOrRemoveNumber(json, key, val, defaultVal) {
|
|
18707
|
-
|
|
18708
|
-
|
|
18709
|
-
|
|
18767
|
+
function setOrRemoveNumber(json, key, val, defaultVal) {
|
|
18768
|
+
if (val === defaultVal)
|
|
18769
|
+
delete json[key];
|
|
18770
|
+
else
|
|
18771
|
+
json[key] = val;
|
|
18772
|
+
}
|
|
18710
18773
|
JsonUtils.setOrRemoveNumber = setOrRemoveNumber;
|
|
18711
18774
|
/** Set or remove a boolean on a json object, given a key name, a value, and a default value. Sets `json[key] = val` if val is *not* equal to the default,
|
|
18712
18775
|
* otherwise `delete json[key]`. This is used to omit values from JSON strings that are of known defaults.
|
|
@@ -18715,10 +18778,12 @@ var JsonUtils;
|
|
|
18715
18778
|
* @param val the value to set
|
|
18716
18779
|
* @param defaultVal the default value.
|
|
18717
18780
|
*/
|
|
18718
|
-
function setOrRemoveBoolean(json, key, val, defaultVal) {
|
|
18719
|
-
|
|
18720
|
-
|
|
18721
|
-
|
|
18781
|
+
function setOrRemoveBoolean(json, key, val, defaultVal) {
|
|
18782
|
+
if (val === defaultVal)
|
|
18783
|
+
delete json[key];
|
|
18784
|
+
else
|
|
18785
|
+
json[key] = val;
|
|
18786
|
+
}
|
|
18722
18787
|
JsonUtils.setOrRemoveBoolean = setOrRemoveBoolean;
|
|
18723
18788
|
/** Determine if a Javascript object is equivalent to `{}`.
|
|
18724
18789
|
* @param json The JSON object to test.
|
|
@@ -18736,7 +18801,9 @@ var JsonUtils;
|
|
|
18736
18801
|
return undefined === json || isEmptyObject(json);
|
|
18737
18802
|
}
|
|
18738
18803
|
JsonUtils.isEmptyObjectOrUndefined = isEmptyObjectOrUndefined;
|
|
18739
|
-
function isNullOrUndefined(json) {
|
|
18804
|
+
function isNullOrUndefined(json) {
|
|
18805
|
+
return null === json || undefined === json;
|
|
18806
|
+
}
|
|
18740
18807
|
/** Determine if the input is a non-empty Javascript object.
|
|
18741
18808
|
* @param value The value to test.
|
|
18742
18809
|
* @returns true if `value` is an Object with at least one key.
|
|
@@ -18760,7 +18827,7 @@ var JsonUtils;
|
|
|
18760
18827
|
// if it's an array, convert each member.
|
|
18761
18828
|
if (Array.isArray(val)) {
|
|
18762
18829
|
const arr = new Array(val.length);
|
|
18763
|
-
val.forEach((el, i) =>
|
|
18830
|
+
val.forEach((el, i) => arr[i] = toObject(el));
|
|
18764
18831
|
return arr;
|
|
18765
18832
|
}
|
|
18766
18833
|
// Convert each property
|
|
@@ -19525,7 +19592,10 @@ class OneAtATimeAction {
|
|
|
19525
19592
|
/** Ctor for OneAtATimePromise.
|
|
19526
19593
|
* @param run The method that performs an action that creates the Promise.
|
|
19527
19594
|
*/
|
|
19528
|
-
constructor(run, msg = "abandoned") {
|
|
19595
|
+
constructor(run, msg = "abandoned") {
|
|
19596
|
+
this._run = run;
|
|
19597
|
+
this.msg = msg;
|
|
19598
|
+
}
|
|
19529
19599
|
/** Add a new request to this OneAtATimePromise. The request will only run when no other outstanding requests are active.
|
|
19530
19600
|
* @note Callers of this method *must* handle AbandonedError rejections.
|
|
19531
19601
|
*/
|
|
@@ -20144,7 +20214,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
20144
20214
|
* @returns the input value.
|
|
20145
20215
|
* @public
|
|
20146
20216
|
*/
|
|
20147
|
-
function shallowClone(value) {
|
|
20217
|
+
function shallowClone(value) {
|
|
20218
|
+
return value;
|
|
20219
|
+
}
|
|
20148
20220
|
/**
|
|
20149
20221
|
* Given a sorted array, computes the position at which the specified value should be inserted into the array so that the array remains sorted.
|
|
20150
20222
|
* @param value The value whose position is to be computed.
|
|
@@ -20926,7 +20998,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
20926
20998
|
/** @internal */
|
|
20927
20999
|
var Utf8ToString;
|
|
20928
21000
|
(function (Utf8ToString) {
|
|
20929
|
-
function inRange(a, min, max) {
|
|
21001
|
+
function inRange(a, min, max) {
|
|
21002
|
+
return min <= a && a <= max;
|
|
21003
|
+
}
|
|
20930
21004
|
function utf8Handler(bytes) {
|
|
20931
21005
|
let codePoint = 0;
|
|
20932
21006
|
let bytesSeen = 0;
|
|
@@ -21204,9 +21278,15 @@ class StopWatch {
|
|
|
21204
21278
|
/** Get the elapsed time, in seconds, between start() and stop() on this timer. */
|
|
21205
21279
|
get elapsedSeconds() { return this.elapsed.seconds; }
|
|
21206
21280
|
/** Start the stopwatch. Any future time measurements will be based on this new value. */
|
|
21207
|
-
start() {
|
|
21281
|
+
start() {
|
|
21282
|
+
this.reset();
|
|
21283
|
+
this._start = BeTimePoint.now();
|
|
21284
|
+
}
|
|
21208
21285
|
/** Stop the stopwatch so that the duration can be viewed later. */
|
|
21209
|
-
stop() {
|
|
21286
|
+
stop() {
|
|
21287
|
+
this._stop = BeTimePoint.now();
|
|
21288
|
+
return this.elapsed;
|
|
21289
|
+
}
|
|
21210
21290
|
/** Clear the StopWatch */
|
|
21211
21291
|
reset() { this._start = this._stop = undefined; }
|
|
21212
21292
|
}
|
|
@@ -21355,6 +21435,152 @@ class Tracing {
|
|
|
21355
21435
|
}
|
|
21356
21436
|
|
|
21357
21437
|
|
|
21438
|
+
/***/ }),
|
|
21439
|
+
|
|
21440
|
+
/***/ "../bentley/lib/esm/TypedArrayBuilder.js":
|
|
21441
|
+
/*!***********************************************!*\
|
|
21442
|
+
!*** ../bentley/lib/esm/TypedArrayBuilder.js ***!
|
|
21443
|
+
\***********************************************/
|
|
21444
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
21445
|
+
|
|
21446
|
+
"use strict";
|
|
21447
|
+
__webpack_require__.r(__webpack_exports__);
|
|
21448
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
21449
|
+
/* harmony export */ "TypedArrayBuilder": () => (/* binding */ TypedArrayBuilder),
|
|
21450
|
+
/* harmony export */ "Uint16ArrayBuilder": () => (/* binding */ Uint16ArrayBuilder),
|
|
21451
|
+
/* harmony export */ "Uint32ArrayBuilder": () => (/* binding */ Uint32ArrayBuilder),
|
|
21452
|
+
/* harmony export */ "Uint8ArrayBuilder": () => (/* binding */ Uint8ArrayBuilder)
|
|
21453
|
+
/* harmony export */ });
|
|
21454
|
+
/* harmony import */ var _Assert__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Assert */ "../bentley/lib/esm/Assert.js");
|
|
21455
|
+
/*---------------------------------------------------------------------------------------------
|
|
21456
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
21457
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
21458
|
+
*--------------------------------------------------------------------------------------------*/
|
|
21459
|
+
/** @packageDocumentation
|
|
21460
|
+
* @module Collections
|
|
21461
|
+
*/
|
|
21462
|
+
|
|
21463
|
+
/** Incrementally builds a [TypedArray] of unsigned 8-, 16-, or 32-bit integers.
|
|
21464
|
+
* Sometimes you wish to populate a `TypedArray`, but you don't know how many elements you will need.
|
|
21465
|
+
* `TypedArray` requires you to specify the size upon construction, and does not permit you to change the size later.
|
|
21466
|
+
*
|
|
21467
|
+
* `TypedArrayBuilder` manages a `TypedArray`, permitting you to [[push]] and [[append]] elements to it. It exposes two "size" properties":
|
|
21468
|
+
* - [[capacity]], the number of elements it has currently allocated space for - i.e., the length of the underlying TypedArray; and
|
|
21469
|
+
* - [[length]], the number of elements that have so far been added to it, which is never bigger than [[capacity]].
|
|
21470
|
+
* When [[capacity]] is exceeded, a new, bigger TypedArray is allocated and the contents of the previous array are copied over to it.
|
|
21471
|
+
*
|
|
21472
|
+
* Once you've finished adding elements, you can obtain the finished `TypedArray` via [[toTypedArray]].
|
|
21473
|
+
* @see [[Uint8ArrayBuilder]], [[Uint16ArrayBuilder]], and [[Uint32ArrayBuilder]] to build specific types of arrays.
|
|
21474
|
+
* @public
|
|
21475
|
+
*/
|
|
21476
|
+
class TypedArrayBuilder {
|
|
21477
|
+
/** Constructs a new builder from the specified options, with a [[length]] of zero. */
|
|
21478
|
+
constructor(constructor, options) {
|
|
21479
|
+
var _a, _b;
|
|
21480
|
+
this._constructor = constructor;
|
|
21481
|
+
this._data = new constructor((_a = options === null || options === void 0 ? void 0 : options.initialCapacity) !== null && _a !== void 0 ? _a : 0);
|
|
21482
|
+
this.growthFactor = Math.max(1.0, (_b = options === null || options === void 0 ? void 0 : options.growthFactor) !== null && _b !== void 0 ? _b : 1.5);
|
|
21483
|
+
this._length = 0;
|
|
21484
|
+
}
|
|
21485
|
+
/** The number of elements currently in the array. */
|
|
21486
|
+
get length() {
|
|
21487
|
+
return this._length;
|
|
21488
|
+
}
|
|
21489
|
+
/** The number of elements that can fit into the memory currently allocated for the array. */
|
|
21490
|
+
get capacity() {
|
|
21491
|
+
return this._data.length;
|
|
21492
|
+
}
|
|
21493
|
+
/** Like [TypedArray.at](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/at),
|
|
21494
|
+
* returns the element at the specified index, with negative integers counting back from the end of the array.
|
|
21495
|
+
* @note It is your responsibility to ensure the index falls within the bounds of the array.
|
|
21496
|
+
*/
|
|
21497
|
+
at(index) {
|
|
21498
|
+
if (index < 0)
|
|
21499
|
+
index = this.length - index;
|
|
21500
|
+
const value = this._data[index];
|
|
21501
|
+
(0,_Assert__WEBPACK_IMPORTED_MODULE_0__.assert)(value !== undefined, "index out of bounds");
|
|
21502
|
+
return value;
|
|
21503
|
+
}
|
|
21504
|
+
/** Ensure that [[capacity]] is at least equal to `newCapacity`.
|
|
21505
|
+
* This is used internally by methods like [[push]] and [[append]] to ensure the array has room for the element(s) to be added.
|
|
21506
|
+
* It can also be useful when you know you intend to add some number of additional elements, to minimize reallocations.
|
|
21507
|
+
*
|
|
21508
|
+
* If `newCapacity` is not greater than the current [[capacity]], this function does nothing.
|
|
21509
|
+
* Otherwise, it allocates a new `TypedArray` with room for `newCapacity * growthFactor` elements, and copies the contents of the previous `TypedArray` into it.
|
|
21510
|
+
* [[length]] remains unchanged; [[capacity]] reflects the size of the new TypeArray.
|
|
21511
|
+
*/
|
|
21512
|
+
ensureCapacity(newCapacity) {
|
|
21513
|
+
if (this.capacity >= newCapacity)
|
|
21514
|
+
return this.capacity;
|
|
21515
|
+
(0,_Assert__WEBPACK_IMPORTED_MODULE_0__.assert)(this.growthFactor >= 1.0);
|
|
21516
|
+
newCapacity = Math.ceil(newCapacity * this.growthFactor);
|
|
21517
|
+
const prevData = this._data;
|
|
21518
|
+
this._data = new this._constructor(newCapacity);
|
|
21519
|
+
this._data.set(prevData, 0);
|
|
21520
|
+
(0,_Assert__WEBPACK_IMPORTED_MODULE_0__.assert)(this.capacity === newCapacity);
|
|
21521
|
+
return this.capacity;
|
|
21522
|
+
}
|
|
21523
|
+
/** Append the specified value, resizing if necessary. */
|
|
21524
|
+
push(value) {
|
|
21525
|
+
this.ensureCapacity(this.length + 1);
|
|
21526
|
+
this._data[this.length] = value;
|
|
21527
|
+
++this._length;
|
|
21528
|
+
}
|
|
21529
|
+
/** Append an array of values, resizing (at most once) if necessary. */
|
|
21530
|
+
append(values) {
|
|
21531
|
+
const newLength = this.length + values.length;
|
|
21532
|
+
this.ensureCapacity(newLength);
|
|
21533
|
+
this._data.set(values, this.length);
|
|
21534
|
+
this._length = newLength;
|
|
21535
|
+
}
|
|
21536
|
+
/** Obtain the finished array.
|
|
21537
|
+
* @param includeUnusedCapacity If true, the length of the returned array will be equal to [[capacity]], with extra bytes initialized to zero; otherwise, the
|
|
21538
|
+
* returned array's length will be equal to [[length]].
|
|
21539
|
+
*/
|
|
21540
|
+
toTypedArray(includeUnusedCapacity = false) {
|
|
21541
|
+
if (includeUnusedCapacity)
|
|
21542
|
+
return this._data;
|
|
21543
|
+
const subarray = this._data.subarray(0, this.length);
|
|
21544
|
+
(0,_Assert__WEBPACK_IMPORTED_MODULE_0__.assert)(subarray instanceof this._constructor);
|
|
21545
|
+
(0,_Assert__WEBPACK_IMPORTED_MODULE_0__.assert)(subarray.buffer === this._data.buffer);
|
|
21546
|
+
return subarray;
|
|
21547
|
+
}
|
|
21548
|
+
}
|
|
21549
|
+
/** A [[TypedArrayBuilder]] for producing a [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array).
|
|
21550
|
+
* @public
|
|
21551
|
+
*/
|
|
21552
|
+
class Uint8ArrayBuilder extends TypedArrayBuilder {
|
|
21553
|
+
/** @see [[TypedArrayBuilder]] constructor. */
|
|
21554
|
+
constructor(options) {
|
|
21555
|
+
super(Uint8Array, options);
|
|
21556
|
+
}
|
|
21557
|
+
}
|
|
21558
|
+
/** A [[TypedArrayBuilder]] for producing a [Uint16Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array).
|
|
21559
|
+
* @public
|
|
21560
|
+
*/
|
|
21561
|
+
class Uint16ArrayBuilder extends TypedArrayBuilder {
|
|
21562
|
+
/** @see [[TypedArrayBuilder]] constructor. */
|
|
21563
|
+
constructor(options) {
|
|
21564
|
+
super(Uint16Array, options);
|
|
21565
|
+
}
|
|
21566
|
+
}
|
|
21567
|
+
/** A [[TypedArrayBuilder]] for producing a [Uint32Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array).
|
|
21568
|
+
* @public
|
|
21569
|
+
*/
|
|
21570
|
+
class Uint32ArrayBuilder extends TypedArrayBuilder {
|
|
21571
|
+
/** @see [[TypedArrayBuilder]] constructor. */
|
|
21572
|
+
constructor(options) {
|
|
21573
|
+
super(Uint32Array, options);
|
|
21574
|
+
}
|
|
21575
|
+
/** Obtain a view of the finished array as an array of bytes. */
|
|
21576
|
+
toUint8Array(includeUnusedCapacity = false) {
|
|
21577
|
+
if (includeUnusedCapacity)
|
|
21578
|
+
return new Uint8Array(this._data.buffer);
|
|
21579
|
+
return new Uint8Array(this._data.buffer, 0, this.length * 4);
|
|
21580
|
+
}
|
|
21581
|
+
}
|
|
21582
|
+
|
|
21583
|
+
|
|
21358
21584
|
/***/ }),
|
|
21359
21585
|
|
|
21360
21586
|
/***/ "../bentley/lib/esm/UnexpectedErrors.js":
|
|
@@ -21400,13 +21626,16 @@ class UnexpectedErrors {
|
|
|
21400
21626
|
*/
|
|
21401
21627
|
static handle(error, notifyTelemetry = true) {
|
|
21402
21628
|
this._handler(error);
|
|
21403
|
-
if (notifyTelemetry)
|
|
21629
|
+
if (notifyTelemetry) {
|
|
21404
21630
|
this._telemetry.forEach((telemetry) => {
|
|
21405
21631
|
try {
|
|
21406
21632
|
telemetry(error);
|
|
21407
21633
|
}
|
|
21408
|
-
catch (_) {
|
|
21634
|
+
catch (_) {
|
|
21635
|
+
// ignore errors from telemetry trackers
|
|
21636
|
+
}
|
|
21409
21637
|
});
|
|
21638
|
+
}
|
|
21410
21639
|
}
|
|
21411
21640
|
/** establish a new global *unexpected error* handler.
|
|
21412
21641
|
* @param handler the new global handler. You may provide your own function or use one of the static members of this class.
|
|
@@ -21582,10 +21811,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21582
21811
|
/* harmony export */ "SuccessCategory": () => (/* reexport safe */ _StatusCategory__WEBPACK_IMPORTED_MODULE_6__.SuccessCategory),
|
|
21583
21812
|
/* harmony export */ "Tracing": () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_30__.Tracing),
|
|
21584
21813
|
/* harmony export */ "TransientIdSequence": () => (/* reexport safe */ _Id__WEBPACK_IMPORTED_MODULE_14__.TransientIdSequence),
|
|
21585
|
-
/* harmony export */ "
|
|
21586
|
-
/* harmony export */ "
|
|
21814
|
+
/* harmony export */ "TypedArrayBuilder": () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_31__.TypedArrayBuilder),
|
|
21815
|
+
/* harmony export */ "Uint16ArrayBuilder": () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_31__.Uint16ArrayBuilder),
|
|
21816
|
+
/* harmony export */ "Uint32ArrayBuilder": () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_31__.Uint32ArrayBuilder),
|
|
21817
|
+
/* harmony export */ "Uint8ArrayBuilder": () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_31__.Uint8ArrayBuilder),
|
|
21818
|
+
/* harmony export */ "UnexpectedErrors": () => (/* reexport safe */ _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_32__.UnexpectedErrors),
|
|
21819
|
+
/* harmony export */ "YieldManager": () => (/* reexport safe */ _YieldManager__WEBPACK_IMPORTED_MODULE_34__.YieldManager),
|
|
21587
21820
|
/* harmony export */ "areEqualPossiblyUndefined": () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_10__.areEqualPossiblyUndefined),
|
|
21588
|
-
/* harmony export */ "asInstanceOf": () => (/* reexport safe */
|
|
21821
|
+
/* harmony export */ "asInstanceOf": () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_33__.asInstanceOf),
|
|
21589
21822
|
/* harmony export */ "assert": () => (/* reexport safe */ _Assert__WEBPACK_IMPORTED_MODULE_1__.assert),
|
|
21590
21823
|
/* harmony export */ "base64StringToUint8Array": () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_28__.base64StringToUint8Array),
|
|
21591
21824
|
/* harmony export */ "compareBooleans": () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_10__.compareBooleans),
|
|
@@ -21599,7 +21832,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21599
21832
|
/* harmony export */ "dispose": () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_13__.dispose),
|
|
21600
21833
|
/* harmony export */ "disposeArray": () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_13__.disposeArray),
|
|
21601
21834
|
/* harmony export */ "isIDisposable": () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_13__.isIDisposable),
|
|
21602
|
-
/* harmony export */ "isInstanceOf": () => (/* reexport safe */
|
|
21835
|
+
/* harmony export */ "isInstanceOf": () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_33__.isInstanceOf),
|
|
21603
21836
|
/* harmony export */ "isProperSubclassOf": () => (/* reexport safe */ _ClassUtils__WEBPACK_IMPORTED_MODULE_9__.isProperSubclassOf),
|
|
21604
21837
|
/* harmony export */ "isSubclassOf": () => (/* reexport safe */ _ClassUtils__WEBPACK_IMPORTED_MODULE_9__.isSubclassOf),
|
|
21605
21838
|
/* harmony export */ "lowerBound": () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.lowerBound),
|
|
@@ -21640,9 +21873,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21640
21873
|
/* harmony import */ var _StringUtils__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./StringUtils */ "../bentley/lib/esm/StringUtils.js");
|
|
21641
21874
|
/* harmony import */ var _Time__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Time */ "../bentley/lib/esm/Time.js");
|
|
21642
21875
|
/* harmony import */ var _Tracing__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Tracing */ "../bentley/lib/esm/Tracing.js");
|
|
21643
|
-
/* harmony import */ var
|
|
21644
|
-
/* harmony import */ var
|
|
21645
|
-
/* harmony import */ var
|
|
21876
|
+
/* harmony import */ var _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./TypedArrayBuilder */ "../bentley/lib/esm/TypedArrayBuilder.js");
|
|
21877
|
+
/* harmony import */ var _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./UnexpectedErrors */ "../bentley/lib/esm/UnexpectedErrors.js");
|
|
21878
|
+
/* harmony import */ var _UtilityTypes__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./UtilityTypes */ "../bentley/lib/esm/UtilityTypes.js");
|
|
21879
|
+
/* harmony import */ var _YieldManager__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./YieldManager */ "../bentley/lib/esm/YieldManager.js");
|
|
21646
21880
|
/*---------------------------------------------------------------------------------------------
|
|
21647
21881
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
21648
21882
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -21679,6 +21913,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21679
21913
|
|
|
21680
21914
|
|
|
21681
21915
|
|
|
21916
|
+
|
|
21682
21917
|
|
|
21683
21918
|
|
|
21684
21919
|
/** @docs-package-description
|
|
@@ -21798,9 +22033,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
21798
22033
|
};
|
|
21799
22034
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
21800
22035
|
exports.ITwinLocalization = void 0;
|
|
21801
|
-
const i18next_1 = __importDefault(__webpack_require__(/*! i18next */ "../../common/temp/node_modules/.pnpm/i18next@21.9.
|
|
22036
|
+
const i18next_1 = __importDefault(__webpack_require__(/*! i18next */ "../../common/temp/node_modules/.pnpm/i18next@21.9.2/node_modules/i18next/dist/cjs/i18next.js"));
|
|
21802
22037
|
const i18next_browser_languagedetector_1 = __importDefault(__webpack_require__(/*! i18next-browser-languagedetector */ "../../common/temp/node_modules/.pnpm/i18next-browser-languagedetector@6.1.5/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js"));
|
|
21803
|
-
const i18next_http_backend_1 = __importDefault(__webpack_require__(/*! i18next-http-backend */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.
|
|
22038
|
+
const i18next_http_backend_1 = __importDefault(__webpack_require__(/*! i18next-http-backend */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.4/node_modules/i18next-http-backend/cjs/index.js"));
|
|
21804
22039
|
const core_bentley_1 = __webpack_require__(/*! @itwin/core-bentley */ "../bentley/lib/esm/core-bentley.js");
|
|
21805
22040
|
const DEFAULT_MAX_RETRIES = 1; // a low number prevents wasted time and potential timeouts when requesting localization files throws an error
|
|
21806
22041
|
/** Supplies localizations for iTwin.js
|
|
@@ -22327,9 +22562,9 @@ module.exports = _unsupportedIterableToArray, module.exports.__esModule = true,
|
|
|
22327
22562
|
|
|
22328
22563
|
/***/ }),
|
|
22329
22564
|
|
|
22330
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.
|
|
22565
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.4/node_modules/i18next-http-backend/cjs/getFetch.js":
|
|
22331
22566
|
/*!*************************************************************************************************************************!*\
|
|
22332
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.
|
|
22567
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.4/node_modules/i18next-http-backend/cjs/getFetch.js ***!
|
|
22333
22568
|
\*************************************************************************************************************************/
|
|
22334
22569
|
/***/ ((module, exports, __webpack_require__) => {
|
|
22335
22570
|
|
|
@@ -22339,6 +22574,8 @@ if (typeof fetch === 'function') {
|
|
|
22339
22574
|
fetchApi = __webpack_require__.g.fetch
|
|
22340
22575
|
} else if (typeof window !== 'undefined' && window.fetch) {
|
|
22341
22576
|
fetchApi = window.fetch
|
|
22577
|
+
} else {
|
|
22578
|
+
fetchApi = fetch
|
|
22342
22579
|
}
|
|
22343
22580
|
}
|
|
22344
22581
|
|
|
@@ -22352,9 +22589,9 @@ if ( true && (typeof window === 'undefined' || typeof window.document === 'undef
|
|
|
22352
22589
|
|
|
22353
22590
|
/***/ }),
|
|
22354
22591
|
|
|
22355
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.
|
|
22592
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.4/node_modules/i18next-http-backend/cjs/index.js":
|
|
22356
22593
|
/*!**********************************************************************************************************************!*\
|
|
22357
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.
|
|
22594
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.4/node_modules/i18next-http-backend/cjs/index.js ***!
|
|
22358
22595
|
\**********************************************************************************************************************/
|
|
22359
22596
|
/***/ ((module, exports, __webpack_require__) => {
|
|
22360
22597
|
|
|
@@ -22366,9 +22603,9 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
22366
22603
|
}));
|
|
22367
22604
|
exports["default"] = void 0;
|
|
22368
22605
|
|
|
22369
|
-
var _utils = __webpack_require__(/*! ./utils.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.
|
|
22606
|
+
var _utils = __webpack_require__(/*! ./utils.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.4/node_modules/i18next-http-backend/cjs/utils.js");
|
|
22370
22607
|
|
|
22371
|
-
var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.
|
|
22608
|
+
var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.4/node_modules/i18next-http-backend/cjs/request.js"));
|
|
22372
22609
|
|
|
22373
22610
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22374
22611
|
|
|
@@ -22577,9 +22814,9 @@ module.exports = exports.default;
|
|
|
22577
22814
|
|
|
22578
22815
|
/***/ }),
|
|
22579
22816
|
|
|
22580
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.
|
|
22817
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.4/node_modules/i18next-http-backend/cjs/request.js":
|
|
22581
22818
|
/*!************************************************************************************************************************!*\
|
|
22582
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.
|
|
22819
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.4/node_modules/i18next-http-backend/cjs/request.js ***!
|
|
22583
22820
|
\************************************************************************************************************************/
|
|
22584
22821
|
/***/ ((module, exports, __webpack_require__) => {
|
|
22585
22822
|
|
|
@@ -22591,9 +22828,9 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
22591
22828
|
}));
|
|
22592
22829
|
exports["default"] = void 0;
|
|
22593
22830
|
|
|
22594
|
-
var _utils = __webpack_require__(/*! ./utils.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.
|
|
22831
|
+
var _utils = __webpack_require__(/*! ./utils.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.4/node_modules/i18next-http-backend/cjs/utils.js");
|
|
22595
22832
|
|
|
22596
|
-
var fetchNode = _interopRequireWildcard(__webpack_require__(/*! ./getFetch.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.
|
|
22833
|
+
var fetchNode = _interopRequireWildcard(__webpack_require__(/*! ./getFetch.js */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.4/node_modules/i18next-http-backend/cjs/getFetch.js"));
|
|
22597
22834
|
|
|
22598
22835
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
22599
22836
|
|
|
@@ -22608,6 +22845,8 @@ if (typeof fetch === 'function') {
|
|
|
22608
22845
|
fetchApi = __webpack_require__.g.fetch;
|
|
22609
22846
|
} else if (typeof window !== 'undefined' && window.fetch) {
|
|
22610
22847
|
fetchApi = window.fetch;
|
|
22848
|
+
} else {
|
|
22849
|
+
fetchApi = fetch;
|
|
22611
22850
|
}
|
|
22612
22851
|
}
|
|
22613
22852
|
|
|
@@ -22649,6 +22888,22 @@ var addQueryString = function addQueryString(url, params) {
|
|
|
22649
22888
|
return url;
|
|
22650
22889
|
};
|
|
22651
22890
|
|
|
22891
|
+
var fetchIt = function fetchIt(url, fetchOptions, callback) {
|
|
22892
|
+
fetchApi(url, fetchOptions).then(function (response) {
|
|
22893
|
+
if (!response.ok) return callback(response.statusText || 'Error', {
|
|
22894
|
+
status: response.status
|
|
22895
|
+
});
|
|
22896
|
+
response.text().then(function (data) {
|
|
22897
|
+
callback(null, {
|
|
22898
|
+
status: response.status,
|
|
22899
|
+
data: data
|
|
22900
|
+
});
|
|
22901
|
+
}).catch(callback);
|
|
22902
|
+
}).catch(callback);
|
|
22903
|
+
};
|
|
22904
|
+
|
|
22905
|
+
var omitFetchOptions = false;
|
|
22906
|
+
|
|
22652
22907
|
var requestWithFetch = function requestWithFetch(options, url, payload, callback) {
|
|
22653
22908
|
if (options.queryStringParams) {
|
|
22654
22909
|
url = addQueryString(url, options.queryStringParams);
|
|
@@ -22656,21 +22911,30 @@ var requestWithFetch = function requestWithFetch(options, url, payload, callback
|
|
|
22656
22911
|
|
|
22657
22912
|
var headers = (0, _utils.defaults)({}, typeof options.customHeaders === 'function' ? options.customHeaders() : options.customHeaders);
|
|
22658
22913
|
if (payload) headers['Content-Type'] = 'application/json';
|
|
22659
|
-
|
|
22914
|
+
var reqOptions = typeof options.requestOptions === 'function' ? options.requestOptions(payload) : options.requestOptions;
|
|
22915
|
+
var fetchOptions = (0, _utils.defaults)({
|
|
22660
22916
|
method: payload ? 'POST' : 'GET',
|
|
22661
22917
|
body: payload ? options.stringify(payload) : undefined,
|
|
22662
22918
|
headers: headers
|
|
22663
|
-
},
|
|
22664
|
-
|
|
22665
|
-
|
|
22666
|
-
|
|
22667
|
-
|
|
22668
|
-
|
|
22669
|
-
|
|
22670
|
-
|
|
22919
|
+
}, omitFetchOptions ? {} : reqOptions);
|
|
22920
|
+
|
|
22921
|
+
try {
|
|
22922
|
+
fetchIt(url, fetchOptions, callback);
|
|
22923
|
+
} catch (e) {
|
|
22924
|
+
if (!reqOptions || Object.keys(reqOptions).length === 0 || !e.message || e.message.indexOf('not implemented') < 0) {
|
|
22925
|
+
return callback(e);
|
|
22926
|
+
}
|
|
22927
|
+
|
|
22928
|
+
try {
|
|
22929
|
+
Object.keys(reqOptions).forEach(function (opt) {
|
|
22930
|
+
delete fetchOptions[opt];
|
|
22671
22931
|
});
|
|
22672
|
-
|
|
22673
|
-
|
|
22932
|
+
fetchIt(url, fetchOptions, callback);
|
|
22933
|
+
omitFetchOptions = true;
|
|
22934
|
+
} catch (err) {
|
|
22935
|
+
callback(err);
|
|
22936
|
+
}
|
|
22937
|
+
}
|
|
22674
22938
|
};
|
|
22675
22939
|
|
|
22676
22940
|
var requestWithXmlHttpRequest = function requestWithXmlHttpRequest(options, url, payload, callback) {
|
|
@@ -22744,6 +23008,8 @@ var request = function request(options, url, payload, callback) {
|
|
|
22744
23008
|
if ((0, _utils.hasXMLHttpRequest)() || typeof ActiveXObject === 'function') {
|
|
22745
23009
|
return requestWithXmlHttpRequest(options, url, payload, callback);
|
|
22746
23010
|
}
|
|
23011
|
+
|
|
23012
|
+
callback(new Error('No fetch and no xhr implementation found!'));
|
|
22747
23013
|
};
|
|
22748
23014
|
|
|
22749
23015
|
var _default = request;
|
|
@@ -22752,9 +23018,9 @@ module.exports = exports.default;
|
|
|
22752
23018
|
|
|
22753
23019
|
/***/ }),
|
|
22754
23020
|
|
|
22755
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.
|
|
23021
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.4/node_modules/i18next-http-backend/cjs/utils.js":
|
|
22756
23022
|
/*!**********************************************************************************************************************!*\
|
|
22757
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.
|
|
23023
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@1.4.4/node_modules/i18next-http-backend/cjs/utils.js ***!
|
|
22758
23024
|
\**********************************************************************************************************************/
|
|
22759
23025
|
/***/ ((__unused_webpack_module, exports) => {
|
|
22760
23026
|
|