@itwin/rpcinterface-full-stack-tests 5.14.4 → 5.14.5

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.
@@ -316234,7 +316234,7 @@ __webpack_require__.r(__webpack_exports__);
316234
316234
  /* harmony export */ });
316235
316235
  /* 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");
316236
316236
  /* 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");
316237
- /* harmony import */ var i18next_http_backend__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! i18next-http-backend */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/index.js");
316237
+ /* 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.6/node_modules/i18next-http-backend/esm/index.js");
316238
316238
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
316239
316239
  /*---------------------------------------------------------------------------------------------
316240
316240
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
@@ -343905,7 +343905,7 @@ class TestContext {
343905
343905
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
343906
343906
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
343907
343907
  await core_frontend_1.NoRenderApp.startup({
343908
- applicationVersion: "5.14.4",
343908
+ applicationVersion: "5.14.5",
343909
343909
  applicationId: this.settings.gprid,
343910
343910
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
343911
343911
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -366051,534 +366051,382 @@ const isSafeIterable = (thing) =>
366051
366051
 
366052
366052
  /***/ },
366053
366053
 
366054
- /***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/index.js"
366054
+ /***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.6/node_modules/i18next-http-backend/esm/index.js"
366055
366055
  /*!**********************************************************************************************************************!*\
366056
- !*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/index.js ***!
366056
+ !*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.6/node_modules/i18next-http-backend/esm/index.js ***!
366057
366057
  \**********************************************************************************************************************/
366058
366058
  (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
366059
366059
 
366060
366060
  "use strict";
366061
366061
  __webpack_require__.r(__webpack_exports__);
366062
366062
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
366063
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
366063
+ /* harmony export */ "default": () => (/* binding */ Backend)
366064
366064
  /* harmony export */ });
366065
- /* 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");
366066
- /* 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");
366067
- 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); }
366068
- 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; }
366069
- 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; }
366070
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
366071
- 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); } }
366072
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
366073
- 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; }
366074
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
366075
- 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); }
366076
- ;
366077
-
366078
- var getDefaults = function getDefaults() {
366079
- return {
366080
- loadPath: '/locales/{{lng}}/{{ns}}.json',
366081
- addPath: '/locales/add/{{lng}}/{{ns}}',
366082
- parse: function parse(data) {
366083
- return JSON.parse(data);
366084
- },
366085
- stringify: JSON.stringify,
366086
- parsePayload: function parsePayload(namespace, key, fallbackValue) {
366087
- return _defineProperty({}, key, fallbackValue || '');
366088
- },
366089
- parseLoadPayload: function parseLoadPayload(languages, namespaces) {
366090
- return undefined;
366091
- },
366092
- request: _request_js__WEBPACK_IMPORTED_MODULE_1__["default"],
366093
- reloadInterval: typeof window !== 'undefined' ? false : 60 * 60 * 1000,
366094
- customHeaders: {},
366095
- queryStringParams: {},
366096
- crossDomain: false,
366097
- withCredentials: false,
366098
- overrideMimeType: false,
366099
- requestOptions: {
366100
- mode: 'cors',
366101
- credentials: 'same-origin',
366102
- cache: 'default'
366103
- }
366104
- };
366105
- };
366106
- var Backend = function () {
366107
- function Backend(services) {
366108
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
366109
- var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
366110
- _classCallCheck(this, Backend);
366111
- this.services = services;
366112
- this.options = options;
366113
- this.allOptions = allOptions;
366114
- this.type = 'backend';
366115
- this.init(services, options, allOptions);
366116
- }
366117
- return _createClass(Backend, [{
366118
- key: "init",
366119
- value: function init(services) {
366120
- var _this = this;
366121
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
366122
- var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
366123
- this.services = services;
366124
- this.options = _objectSpread(_objectSpread(_objectSpread({}, getDefaults()), this.options || {}), options);
366125
- this.allOptions = allOptions;
366126
- if (this.services && this.options.reloadInterval) {
366127
- var timer = setInterval(function () {
366128
- return _this.reload();
366129
- }, this.options.reloadInterval);
366130
- if (_typeof(timer) === 'object' && typeof timer.unref === 'function') timer.unref();
366131
- }
366132
- }
366133
- }, {
366134
- key: "readMulti",
366135
- value: function readMulti(languages, namespaces, callback) {
366136
- this._readAny(languages, languages, namespaces, namespaces, callback);
366137
- }
366138
- }, {
366139
- key: "read",
366140
- value: function read(language, namespace, callback) {
366141
- this._readAny([language], language, [namespace], namespace, callback);
366142
- }
366143
- }, {
366144
- key: "_readAny",
366145
- value: function _readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {
366146
- var _this2 = this;
366147
- var loadPath = this.options.loadPath;
366148
- if (typeof this.options.loadPath === 'function') {
366149
- loadPath = this.options.loadPath(languages, namespaces);
366150
- }
366151
- loadPath = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.makePromise)(loadPath);
366152
- loadPath.then(function (resolvedLoadPath) {
366153
- if (!resolvedLoadPath) return callback(null, {});
366154
- var url = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.interpolateUrl)(resolvedLoadPath, {
366155
- lng: languages.join('+'),
366156
- ns: namespaces.join('+')
366157
- });
366158
- if (url == null) {
366159
- var safeLngs = languages.map(_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue).join(', ');
366160
- var safeNss = namespaces.map(_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue).join(', ');
366161
- return callback(new Error('i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[' + safeLngs + '] namespaces=[' + safeNss + ']'), false);
366162
- }
366163
- _this2.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);
366164
- });
366165
- }
366166
- }, {
366167
- key: "loadUrl",
366168
- value: function loadUrl(url, callback, languages, namespaces) {
366169
- var _this3 = this;
366170
- var lng = typeof languages === 'string' ? [languages] : languages;
366171
- var ns = typeof namespaces === 'string' ? [namespaces] : namespaces;
366172
- var payload = this.options.parseLoadPayload(lng, ns);
366173
- var safeUrl = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue)((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.redactUrlCredentials)(url));
366174
- this.options.request(this.options, url, payload, function (err, res) {
366175
- if (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback('failed loading ' + safeUrl + '; status code: ' + res.status, true);
366176
- if (res && res.status >= 400 && res.status < 500) return callback('failed loading ' + safeUrl + '; status code: ' + res.status, false);
366177
- if (!res && err && err.message) {
366178
- var errorMessage = err.message.toLowerCase();
366179
- var isNetworkError = ['failed', 'fetch', 'network', 'load'].find(function (term) {
366180
- return errorMessage.indexOf(term) > -1;
366181
- });
366182
- if (isNetworkError) {
366183
- return callback('failed loading ' + safeUrl + ': ' + (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue)(err.message), true);
366184
- }
366185
- }
366186
- if (err) return callback(err, false);
366187
- var ret, parseErr;
366188
- try {
366189
- if (typeof res.data === 'string') {
366190
- ret = _this3.options.parse(res.data, languages, namespaces);
366191
- } else {
366192
- ret = res.data;
366193
- }
366194
- } catch (e) {
366195
- parseErr = 'failed parsing ' + safeUrl + ' to json';
366196
- }
366197
- if (parseErr) return callback(parseErr, false);
366198
- callback(null, ret);
366199
- });
366200
- }
366201
- }, {
366202
- key: "create",
366203
- value: function create(languages, namespace, key, fallbackValue, callback) {
366204
- var _this4 = this;
366205
- if (!this.options.addPath) return;
366206
- if (typeof languages === 'string') languages = [languages];
366207
- var payload = this.options.parsePayload(namespace, key, fallbackValue);
366208
- var finished = 0;
366209
- var dataArray = [];
366210
- var resArray = [];
366211
- languages.forEach(function (lng) {
366212
- var addPath = _this4.options.addPath;
366213
- if (typeof _this4.options.addPath === 'function') {
366214
- addPath = _this4.options.addPath(lng, namespace);
366215
- }
366216
- var url = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.interpolateUrl)(addPath, {
366217
- lng: lng,
366218
- ns: namespace
366219
- });
366220
- if (url == null) {
366221
- finished += 1;
366222
- if (callback && finished === languages.length) callback(dataArray, resArray);
366223
- return;
366224
- }
366225
- _this4.options.request(_this4.options, url, payload, function (data, res) {
366226
- finished += 1;
366227
- dataArray.push(data);
366228
- resArray.push(res);
366229
- if (finished === languages.length) {
366230
- if (typeof callback === 'function') callback(dataArray, resArray);
366231
- }
366232
- });
366233
- });
366234
- }
366235
- }, {
366236
- key: "reload",
366237
- value: function reload() {
366238
- var _this5 = this;
366239
- var _this$services = this.services,
366240
- backendConnector = _this$services.backendConnector,
366241
- languageUtils = _this$services.languageUtils,
366242
- logger = _this$services.logger;
366243
- var currentLanguage = backendConnector.language;
366244
- if (currentLanguage && currentLanguage.toLowerCase() === 'cimode') return;
366245
- var toLoad = [];
366246
- var append = function append(lng) {
366247
- var lngs = languageUtils.toResolveHierarchy(lng);
366248
- lngs.forEach(function (l) {
366249
- if (toLoad.indexOf(l) < 0) toLoad.push(l);
366250
- });
366251
- };
366252
- append(currentLanguage);
366253
- if (this.allOptions.preload) this.allOptions.preload.forEach(function (l) {
366254
- return append(l);
366255
- });
366256
- toLoad.forEach(function (lng) {
366257
- _this5.allOptions.ns.forEach(function (ns) {
366258
- backendConnector.read(lng, ns, 'read', null, null, function (err, data) {
366259
- if (err) logger.warn("loading namespace ".concat(ns, " for language ").concat(lng, " failed"), err);
366260
- if (!err && data) logger.log("loaded namespace ".concat(ns, " for language ").concat(lng), data);
366261
- backendConnector.loaded("".concat(lng, "|").concat(ns), err, data);
366262
- });
366263
- });
366264
- });
366265
- }
366266
- }]);
366267
- }();
366268
- Backend.type = 'backend';
366269
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Backend);
366270
-
366271
- /***/ },
366272
-
366273
- /***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/request.js"
366274
- /*!************************************************************************************************************************!*\
366275
- !*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/request.js ***!
366276
- \************************************************************************************************************************/
366277
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
366278
-
366279
- "use strict";
366280
- __webpack_require__.r(__webpack_exports__);
366281
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
366282
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
366283
- /* harmony export */ });
366284
- /* 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");
366285
- 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; }
366286
- 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; }
366287
- 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; }
366288
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
366289
- 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); }
366290
- 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); }
366291
- ;
366292
- var fetchApi = typeof fetch === 'function' ? fetch : undefined;
366293
- if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.fetch) {
366294
- fetchApi = __webpack_require__.g.fetch;
366295
- } else if (typeof window !== 'undefined' && window.fetch) {
366296
- fetchApi = window.fetch;
366297
- }
366298
- var XmlHttpRequestApi;
366299
- if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasXMLHttpRequest)()) {
366300
- if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.XMLHttpRequest) {
366301
- XmlHttpRequestApi = __webpack_require__.g.XMLHttpRequest;
366302
- } else if (typeof window !== 'undefined' && window.XMLHttpRequest) {
366303
- XmlHttpRequestApi = window.XMLHttpRequest;
366304
- }
366305
- }
366306
- var ActiveXObjectApi;
366307
- if (typeof ActiveXObject === 'function') {
366308
- if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.ActiveXObject) {
366309
- ActiveXObjectApi = __webpack_require__.g.ActiveXObject;
366310
- } else if (typeof window !== 'undefined' && window.ActiveXObject) {
366311
- ActiveXObjectApi = window.ActiveXObject;
366312
- }
366313
- }
366314
- if (typeof fetchApi !== 'function') fetchApi = undefined;
366315
- if (!fetchApi && !XmlHttpRequestApi && !ActiveXObjectApi) {
366316
- try {
366317
- __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) {
366318
- fetchApi = mod.default;
366319
- }).catch(function () {});
366320
- } catch (e) {}
366321
- }
366322
- var UNSAFE_KEYS = ['__proto__', 'constructor', 'prototype'];
366323
- var addQueryString = function addQueryString(url, params) {
366324
- if (params && _typeof(params) === 'object') {
366325
- var queryString = '';
366326
- for (var _i = 0, _Object$keys = Object.keys(params); _i < _Object$keys.length; _i++) {
366327
- var paramName = _Object$keys[_i];
366328
- if (UNSAFE_KEYS.indexOf(paramName) > -1) continue;
366329
- queryString += '&' + encodeURIComponent(paramName) + '=' + encodeURIComponent(params[paramName]);
366330
- }
366331
- if (!queryString) return url;
366332
- url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);
366333
- }
366334
- return url;
366335
- };
366336
- var fetchIt = function fetchIt(url, fetchOptions, callback, altFetch) {
366337
- var resolver = function resolver(response) {
366338
- if (!response.ok) return callback(response.statusText || 'Error', {
366339
- status: response.status
366340
- });
366341
- response.text().then(function (data) {
366342
- callback(null, {
366343
- status: response.status,
366344
- data: data
366345
- });
366346
- }).catch(callback);
366347
- };
366348
- if (altFetch) {
366349
- var altResponse = altFetch(url, fetchOptions);
366350
- if (altResponse instanceof Promise) {
366351
- altResponse.then(resolver).catch(callback);
366352
- return;
366353
- }
366354
- }
366355
- if (typeof fetch === 'function') {
366356
- fetch(url, fetchOptions).then(resolver).catch(callback);
366357
- } else {
366358
- fetchApi(url, fetchOptions).then(resolver).catch(callback);
366359
- }
366360
- };
366361
- var requestWithFetch = function requestWithFetch(options, url, payload, callback) {
366362
- if (options.queryStringParams) {
366363
- url = addQueryString(url, options.queryStringParams);
366364
- }
366365
- var headers = _objectSpread({}, typeof options.customHeaders === 'function' ? options.customHeaders() : options.customHeaders);
366366
- 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) {
366367
- 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, ")");
366368
- }
366369
- if (payload) headers['Content-Type'] = 'application/json';
366370
- var reqOptions = typeof options.requestOptions === 'function' ? options.requestOptions(payload) : options.requestOptions;
366371
- var fetchOptions = _objectSpread({
366372
- method: payload ? 'POST' : 'GET',
366373
- body: payload ? options.stringify(payload) : undefined,
366374
- headers: headers
366375
- }, options._omitFetchOptions ? {} : reqOptions);
366376
- var altFetch = typeof options.alternateFetch === 'function' && options.alternateFetch.length >= 1 ? options.alternateFetch : undefined;
366377
- try {
366378
- fetchIt(url, fetchOptions, callback, altFetch);
366379
- } catch (e) {
366380
- if (!reqOptions || Object.keys(reqOptions).length === 0 || !e.message || e.message.indexOf('not implemented') < 0) {
366381
- return callback(e);
366382
- }
366383
- try {
366384
- Object.keys(reqOptions).forEach(function (opt) {
366385
- delete fetchOptions[opt];
366386
- });
366387
- fetchIt(url, fetchOptions, callback, altFetch);
366388
- options._omitFetchOptions = true;
366389
- } catch (err) {
366390
- callback(err);
366391
- }
366392
- }
366393
- };
366394
- var requestWithXmlHttpRequest = function requestWithXmlHttpRequest(options, url, payload, callback) {
366395
- if (payload && _typeof(payload) === 'object') {
366396
- payload = addQueryString('', payload).slice(1);
366397
- }
366398
- if (options.queryStringParams) {
366399
- url = addQueryString(url, options.queryStringParams);
366400
- }
366401
- try {
366402
- var x = XmlHttpRequestApi ? new XmlHttpRequestApi() : new ActiveXObjectApi('MSXML2.XMLHTTP.3.0');
366403
- x.open(payload ? 'POST' : 'GET', url, 1);
366404
- if (!options.crossDomain) {
366405
- x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
366406
- }
366407
- x.withCredentials = !!options.withCredentials;
366408
- if (payload) {
366409
- x.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
366410
- }
366411
- if (x.overrideMimeType) {
366412
- x.overrideMimeType('application/json');
366413
- }
366414
- var h = options.customHeaders;
366415
- h = typeof h === 'function' ? h() : h;
366416
- if (h) {
366417
- for (var _i2 = 0, _Object$keys2 = Object.keys(h); _i2 < _Object$keys2.length; _i2++) {
366418
- var i = _Object$keys2[_i2];
366419
- if (UNSAFE_KEYS.indexOf(i) > -1) continue;
366420
- x.setRequestHeader(i, h[i]);
366421
- }
366422
- }
366423
- x.onreadystatechange = function () {
366424
- x.readyState > 3 && callback(x.status >= 400 ? x.statusText : null, {
366425
- status: x.status,
366426
- data: x.responseText
366427
- });
366428
- };
366429
- x.send(payload);
366430
- } catch (e) {
366431
- console && console.log(e);
366432
- }
366433
- };
366434
- var request = function request(options, url, payload, callback) {
366435
- if (typeof payload === 'function') {
366436
- callback = payload;
366437
- payload = undefined;
366438
- }
366439
- callback = callback || function () {};
366440
- if (fetchApi && url.indexOf('file:') !== 0) {
366441
- return requestWithFetch(options, url, payload, callback);
366442
- }
366443
- if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasXMLHttpRequest)() || typeof ActiveXObject === 'function') {
366444
- return requestWithXmlHttpRequest(options, url, payload, callback);
366445
- }
366446
- callback(new Error('No fetch and no xhr implementation found!'));
366447
- };
366448
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (request);
366449
-
366450
- /***/ },
366451
-
366452
- /***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js"
366453
- /*!**********************************************************************************************************************!*\
366454
- !*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js ***!
366455
- \**********************************************************************************************************************/
366456
- (__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
366457
-
366458
- "use strict";
366459
- __webpack_require__.r(__webpack_exports__);
366460
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
366461
- /* harmony export */ defaults: () => (/* binding */ defaults),
366462
- /* harmony export */ hasXMLHttpRequest: () => (/* binding */ hasXMLHttpRequest),
366463
- /* harmony export */ interpolate: () => (/* binding */ interpolate),
366464
- /* harmony export */ interpolateUrl: () => (/* binding */ interpolateUrl),
366465
- /* harmony export */ isSafeLangUrlSegment: () => (/* binding */ isSafeLangUrlSegment),
366466
- /* harmony export */ isSafeNsUrlSegment: () => (/* binding */ isSafeNsUrlSegment),
366467
- /* harmony export */ isSafeUrlSegment: () => (/* binding */ isSafeUrlSegment),
366468
- /* harmony export */ makePromise: () => (/* binding */ makePromise),
366469
- /* harmony export */ redactUrlCredentials: () => (/* binding */ redactUrlCredentials),
366470
- /* harmony export */ sanitizeLogValue: () => (/* binding */ sanitizeLogValue)
366471
- /* harmony export */ });
366472
- function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
366473
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
366474
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
366475
- 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); }
366476
- var arr = [];
366477
- var each = arr.forEach;
366478
- var slice = arr.slice;
366479
- var UNSAFE_KEYS = ['__proto__', 'constructor', 'prototype'];
366480
- function defaults(obj) {
366481
- each.call(slice.call(arguments, 1), function (source) {
366482
- if (source) {
366483
- for (var _i = 0, _Object$keys = Object.keys(source); _i < _Object$keys.length; _i++) {
366484
- var prop = _Object$keys[_i];
366485
- if (UNSAFE_KEYS.indexOf(prop) > -1) continue;
366486
- if (obj[prop] === undefined) obj[prop] = source[prop];
366487
- }
366488
- }
366489
- });
366490
- return obj;
366491
- }
366065
+ //#region lib/utils.js
366066
+ const arr = [];
366067
+ arr.forEach;
366068
+ arr.slice;
366069
+ const UNSAFE_KEYS$1 = [
366070
+ "__proto__",
366071
+ "constructor",
366072
+ "prototype"
366073
+ ];
366492
366074
  function isSafeUrlSegmentBase(v) {
366493
- if (typeof v !== 'string') return false;
366494
- if (v.length === 0 || v.length > 128) return false;
366495
- if (UNSAFE_KEYS.indexOf(v) > -1) return false;
366496
- if (v.indexOf('..') > -1) return false;
366497
- if (v.indexOf('\\') > -1) return false;
366498
- if (/[?#%\s@]/.test(v)) return false;
366499
- if (/[\x00-\x1F\x7F]/.test(v)) return false;
366500
- return true;
366075
+ if (typeof v !== "string") return false;
366076
+ if (v.length === 0 || v.length > 128) return false;
366077
+ if (UNSAFE_KEYS$1.indexOf(v) > -1) return false;
366078
+ if (v.indexOf("..") > -1) return false;
366079
+ if (v.indexOf("\\") > -1) return false;
366080
+ if (/[?#%:&=;\s]/.test(v)) return false;
366081
+ if (/[\x00-\x1F\x7F]/.test(v)) return false;
366082
+ return true;
366501
366083
  }
366502
366084
  function isSafeLangUrlSegment(v) {
366503
- if (!isSafeUrlSegmentBase(v)) return false;
366504
- if (v.indexOf('/') > -1) return false;
366505
- return true;
366085
+ if (!isSafeUrlSegmentBase(v)) return false;
366086
+ if (v.indexOf("/") > -1 || v.indexOf("@") > -1) return false;
366087
+ return true;
366506
366088
  }
366507
366089
  function isSafeNsUrlSegment(v) {
366508
- return isSafeUrlSegmentBase(v);
366090
+ if (!isSafeUrlSegmentBase(v)) return false;
366091
+ if (v.indexOf("//") > -1) return false;
366092
+ return true;
366509
366093
  }
366510
- var isSafeUrlSegment = isSafeLangUrlSegment;
366511
- var SAFETY_CHECK_BY_KEY = {
366512
- lng: isSafeLangUrlSegment,
366513
- ns: isSafeNsUrlSegment
366094
+ const SAFETY_CHECK_BY_KEY = {
366095
+ lng: isSafeLangUrlSegment,
366096
+ ns: isSafeNsUrlSegment
366514
366097
  };
366515
366098
  function sanitizeLogValue(v) {
366516
- if (typeof v !== 'string') return v;
366517
- return v.replace(/[\r\n\x00-\x1F\x7F]/g, ' ');
366099
+ if (typeof v !== "string") return v;
366100
+ return v.replace(/[\r\n\x00-\x1F\x7F]/g, " ");
366518
366101
  }
366519
366102
  function redactUrlCredentials(u) {
366520
- if (typeof u !== 'string' || u.length === 0) return u;
366521
- try {
366522
- var parsed = new URL(u);
366523
- if (parsed.username || parsed.password) {
366524
- parsed.username = '';
366525
- parsed.password = '';
366526
- return parsed.toString();
366527
- }
366528
- return u;
366529
- } catch (e) {
366530
- return u.replace(/(\/\/)[^/@\s]+@/g, '$1');
366531
- }
366103
+ if (typeof u !== "string" || u.length === 0) return u;
366104
+ try {
366105
+ const parsed = new URL(u);
366106
+ if (parsed.username || parsed.password) {
366107
+ parsed.username = "";
366108
+ parsed.password = "";
366109
+ return parsed.toString();
366110
+ }
366111
+ return u;
366112
+ } catch (e) {
366113
+ return u.replace(/(\/\/)[^/@\s]+@/g, "$1");
366114
+ }
366532
366115
  }
366533
366116
  function hasXMLHttpRequest() {
366534
- return typeof XMLHttpRequest === 'function' || (typeof XMLHttpRequest === "undefined" ? "undefined" : _typeof(XMLHttpRequest)) === 'object';
366117
+ return typeof XMLHttpRequest === "function" || typeof XMLHttpRequest === "object";
366535
366118
  }
366119
+ /**
366120
+ * Determine whether the given `maybePromise` is a Promise.
366121
+ *
366122
+ * @param {*} maybePromise
366123
+ *
366124
+ * @returns {Boolean}
366125
+ */
366536
366126
  function isPromise(maybePromise) {
366537
- return !!maybePromise && typeof maybePromise.then === 'function';
366127
+ return !!maybePromise && typeof maybePromise.then === "function";
366538
366128
  }
366129
+ /**
366130
+ * Convert any value to a Promise than will resolve to this value.
366131
+ *
366132
+ * @param {*} maybePromise
366133
+ *
366134
+ * @returns {Promise}
366135
+ */
366539
366136
  function makePromise(maybePromise) {
366540
- if (isPromise(maybePromise)) {
366541
- return maybePromise;
366542
- }
366543
- return Promise.resolve(maybePromise);
366544
- }
366545
- var interpolationRegexp = /\{\{(.+?)\}\}/g;
366546
- function interpolate(str, data) {
366547
- return str.replace(interpolationRegexp, function (match, key) {
366548
- var k = key.trim();
366549
- if (UNSAFE_KEYS.indexOf(k) > -1) return match;
366550
- var value = data[k];
366551
- return value != null ? value : match;
366552
- });
366137
+ if (isPromise(maybePromise)) return maybePromise;
366138
+ return Promise.resolve(maybePromise);
366553
366139
  }
366140
+ const interpolationRegexp = /\{\{(.+?)\}\}/g;
366141
+ const LEADING_DOUBLE_SLASH = /^[/\\]{2}/;
366554
366142
  function interpolateUrl(str, data) {
366555
- var unsafe = false;
366556
- var result = str.replace(interpolationRegexp, function (match, key) {
366557
- var k = key.trim();
366558
- if (UNSAFE_KEYS.indexOf(k) > -1) return match;
366559
- var value = data[k];
366560
- if (value == null) return match;
366561
- var check = SAFETY_CHECK_BY_KEY[k] || isSafeLangUrlSegment;
366562
- var segments = String(value).split('+');
366563
- var _iterator = _createForOfIteratorHelper(segments),
366564
- _step;
366565
- try {
366566
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
366567
- var seg = _step.value;
366568
- if (!check(seg)) {
366569
- unsafe = true;
366570
- return match;
366571
- }
366572
- }
366573
- } catch (err) {
366574
- _iterator.e(err);
366575
- } finally {
366576
- _iterator.f();
366577
- }
366578
- return segments.join('+');
366579
- });
366580
- return unsafe ? null : result;
366581
- }
366143
+ let unsafe = false;
366144
+ const result = str.replace(interpolationRegexp, (match, key) => {
366145
+ const k = key.trim();
366146
+ if (UNSAFE_KEYS$1.indexOf(k) > -1) return match;
366147
+ const value = data[k];
366148
+ if (value == null) return match;
366149
+ const check = SAFETY_CHECK_BY_KEY[k] || isSafeLangUrlSegment;
366150
+ const segments = String(value).split("+");
366151
+ for (const seg of segments) if (!check(seg)) {
366152
+ unsafe = true;
366153
+ return match;
366154
+ }
366155
+ return segments.join("+");
366156
+ });
366157
+ if (unsafe) return null;
366158
+ if (LEADING_DOUBLE_SLASH.test(result) && !LEADING_DOUBLE_SLASH.test(str)) return null;
366159
+ return result;
366160
+ }
366161
+ //#endregion
366162
+ //#region lib/request.js
366163
+ const g = typeof globalThis !== "undefined" ? globalThis : typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : typeof window !== "undefined" ? window : void 0;
366164
+ let fetchApi;
366165
+ if (typeof fetch === "function") fetchApi = fetch;
366166
+ else if (g && typeof g.fetch === "function") fetchApi = g.fetch;
366167
+ const XmlHttpRequestApi = hasXMLHttpRequest() && g ? g.XMLHttpRequest : void 0;
366168
+ const ActiveXObjectApi = typeof ActiveXObject === "function" && g ? g.ActiveXObject : void 0;
366169
+ const UNSAFE_KEYS = [
366170
+ "__proto__",
366171
+ "constructor",
366172
+ "prototype"
366173
+ ];
366174
+ const addQueryString = (url, params) => {
366175
+ if (params && typeof params === "object") {
366176
+ let queryString = "";
366177
+ for (const paramName of Object.keys(params)) {
366178
+ if (UNSAFE_KEYS.indexOf(paramName) > -1) continue;
366179
+ queryString += "&" + encodeURIComponent(paramName) + "=" + encodeURIComponent(params[paramName]);
366180
+ }
366181
+ if (!queryString) return url;
366182
+ url = url + (url.indexOf("?") !== -1 ? "&" : "?") + queryString.slice(1);
366183
+ }
366184
+ return url;
366185
+ };
366186
+ const fetchIt = (url, fetchOptions, callback, altFetch) => {
366187
+ const resolver = (response) => {
366188
+ if (!response.ok) return callback(response.statusText || "Error", { status: response.status });
366189
+ response.text().then((data) => {
366190
+ callback(null, {
366191
+ status: response.status,
366192
+ data
366193
+ });
366194
+ }).catch(callback);
366195
+ };
366196
+ if (altFetch) {
366197
+ const altResponse = altFetch(url, fetchOptions);
366198
+ if (altResponse instanceof Promise) {
366199
+ altResponse.then(resolver).catch(callback);
366200
+ return;
366201
+ }
366202
+ }
366203
+ if (typeof fetch === "function") fetch(url, fetchOptions).then(resolver).catch(callback);
366204
+ else fetchApi(url, fetchOptions).then(resolver).catch(callback);
366205
+ };
366206
+ const requestWithFetch = (options, url, payload, callback) => {
366207
+ if (options.queryStringParams) url = addQueryString(url, options.queryStringParams);
366208
+ const headers = { ...typeof options.customHeaders === "function" ? options.customHeaders() : options.customHeaders };
366209
+ 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})`;
366210
+ if (payload) headers["Content-Type"] = "application/json";
366211
+ const reqOptions = typeof options.requestOptions === "function" ? options.requestOptions(payload) : options.requestOptions;
366212
+ const fetchOptions = {
366213
+ method: payload ? "POST" : "GET",
366214
+ body: payload ? options.stringify(payload) : void 0,
366215
+ headers,
366216
+ ...options._omitFetchOptions ? {} : reqOptions
366217
+ };
366218
+ const altFetch = typeof options.alternateFetch === "function" && options.alternateFetch.length >= 1 ? options.alternateFetch : void 0;
366219
+ try {
366220
+ fetchIt(url, fetchOptions, callback, altFetch);
366221
+ } catch (e) {
366222
+ if (!reqOptions || Object.keys(reqOptions).length === 0 || !e.message || e.message.indexOf("not implemented") < 0) return callback(e);
366223
+ try {
366224
+ Object.keys(reqOptions).forEach((opt) => {
366225
+ delete fetchOptions[opt];
366226
+ });
366227
+ fetchIt(url, fetchOptions, callback, altFetch);
366228
+ options._omitFetchOptions = true;
366229
+ } catch (err) {
366230
+ callback(err);
366231
+ }
366232
+ }
366233
+ };
366234
+ const requestWithXmlHttpRequest = (options, url, payload, callback) => {
366235
+ if (payload && typeof payload === "object") payload = addQueryString("", payload).slice(1);
366236
+ if (options.queryStringParams) url = addQueryString(url, options.queryStringParams);
366237
+ let completed = false;
366238
+ try {
366239
+ const x = XmlHttpRequestApi ? new XmlHttpRequestApi() : new ActiveXObjectApi("MSXML2.XMLHTTP.3.0");
366240
+ x.open(payload ? "POST" : "GET", url, 1);
366241
+ if (!options.crossDomain) x.setRequestHeader("X-Requested-With", "XMLHttpRequest");
366242
+ x.withCredentials = !!options.withCredentials;
366243
+ if (payload) x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
366244
+ if (x.overrideMimeType) x.overrideMimeType("application/json");
366245
+ let h = options.customHeaders;
366246
+ h = typeof h === "function" ? h() : h;
366247
+ if (h) for (const i of Object.keys(h)) {
366248
+ if (UNSAFE_KEYS.indexOf(i) > -1) continue;
366249
+ x.setRequestHeader(i, h[i]);
366250
+ }
366251
+ x.onreadystatechange = () => {
366252
+ if (x.readyState > 3) {
366253
+ completed = true;
366254
+ callback(x.status >= 400 ? x.statusText : null, {
366255
+ status: x.status,
366256
+ data: x.responseText
366257
+ });
366258
+ }
366259
+ };
366260
+ x.send(payload);
366261
+ } catch (e) {
366262
+ if (completed) throw e;
366263
+ callback(e);
366264
+ }
366265
+ };
366266
+ const request = (options, url, payload, callback) => {
366267
+ if (typeof payload === "function") {
366268
+ callback = payload;
366269
+ payload = void 0;
366270
+ }
366271
+ callback = callback || (() => {});
366272
+ if (fetchApi && url.indexOf("file:") !== 0) return requestWithFetch(options, url, payload, callback);
366273
+ if (hasXMLHttpRequest() || typeof ActiveXObject === "function") return requestWithXmlHttpRequest(options, url, payload, callback);
366274
+ callback(/* @__PURE__ */ new Error("No fetch and no xhr implementation found!"));
366275
+ };
366276
+ //#endregion
366277
+ //#region lib/index.js
366278
+ const getDefaults = () => {
366279
+ return {
366280
+ loadPath: "/locales/{{lng}}/{{ns}}.json",
366281
+ addPath: "/locales/add/{{lng}}/{{ns}}",
366282
+ parse: (data) => JSON.parse(data),
366283
+ stringify: JSON.stringify,
366284
+ parsePayload: (namespace, key, fallbackValue) => ({ [key]: fallbackValue || "" }),
366285
+ parseLoadPayload: (languages, namespaces) => void 0,
366286
+ request,
366287
+ reloadInterval: typeof window !== "undefined" ? false : 3600 * 1e3,
366288
+ customHeaders: {},
366289
+ queryStringParams: {},
366290
+ crossDomain: false,
366291
+ withCredentials: false,
366292
+ overrideMimeType: false,
366293
+ requestOptions: {
366294
+ mode: "cors",
366295
+ credentials: "same-origin",
366296
+ cache: "default"
366297
+ }
366298
+ };
366299
+ };
366300
+ var Backend = class {
366301
+ constructor(services, options = {}, allOptions = {}) {
366302
+ this.services = services;
366303
+ this.options = options;
366304
+ this.allOptions = allOptions;
366305
+ this.type = "backend";
366306
+ this.init(services, options, allOptions);
366307
+ }
366308
+ init(services, options = {}, allOptions = {}) {
366309
+ this.services = services;
366310
+ this.options = {
366311
+ ...getDefaults(),
366312
+ ...this.options || {},
366313
+ ...options
366314
+ };
366315
+ this.allOptions = allOptions;
366316
+ if (this.services && this.options.reloadInterval) {
366317
+ const timer = setInterval(() => this.reload(), this.options.reloadInterval);
366318
+ if (typeof timer === "object" && typeof timer.unref === "function") timer.unref();
366319
+ }
366320
+ }
366321
+ readMulti(languages, namespaces, callback) {
366322
+ this._readAny(languages, languages, namespaces, namespaces, callback);
366323
+ }
366324
+ read(language, namespace, callback) {
366325
+ this._readAny([language], language, [namespace], namespace, callback);
366326
+ }
366327
+ _readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {
366328
+ let loadPath = this.options.loadPath;
366329
+ if (typeof this.options.loadPath === "function") loadPath = this.options.loadPath(languages, namespaces);
366330
+ loadPath = makePromise(loadPath);
366331
+ loadPath.then((resolvedLoadPath) => {
366332
+ if (!resolvedLoadPath) return callback(null, {});
366333
+ const url = interpolateUrl(resolvedLoadPath, {
366334
+ lng: languages.join("+"),
366335
+ ns: namespaces.join("+")
366336
+ });
366337
+ if (url == null) {
366338
+ const safeLngs = languages.map(sanitizeLogValue).join(", ");
366339
+ const safeNss = namespaces.map(sanitizeLogValue).join(", ");
366340
+ return callback(/* @__PURE__ */ new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[" + safeLngs + "] namespaces=[" + safeNss + "]"), false);
366341
+ }
366342
+ this.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);
366343
+ }, (err) => callback(err, false));
366344
+ }
366345
+ loadUrl(url, callback, languages, namespaces) {
366346
+ const lng = typeof languages === "string" ? [languages] : languages;
366347
+ const ns = typeof namespaces === "string" ? [namespaces] : namespaces;
366348
+ const payload = this.options.parseLoadPayload(lng, ns);
366349
+ const safeUrl = sanitizeLogValue(redactUrlCredentials(url));
366350
+ this.options.request(this.options, url, payload, (err, res) => {
366351
+ if (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback("failed loading " + safeUrl + "; status code: " + res.status, true);
366352
+ if (res && res.status >= 400 && res.status < 500) return callback("failed loading " + safeUrl + "; status code: " + res.status, false);
366353
+ if (!res && err && err.message) {
366354
+ const errorMessage = err.message.toLowerCase();
366355
+ if ([
366356
+ "failed",
366357
+ "fetch",
366358
+ "network",
366359
+ "load"
366360
+ ].find((term) => errorMessage.indexOf(term) > -1)) return callback("failed loading " + safeUrl + ": " + sanitizeLogValue(err.message), true);
366361
+ }
366362
+ if (err) return callback(err, false);
366363
+ let ret, parseErr;
366364
+ try {
366365
+ if (typeof res.data === "string") ret = this.options.parse(res.data, languages, namespaces);
366366
+ else ret = res.data;
366367
+ } catch (e) {
366368
+ parseErr = "failed parsing " + safeUrl + " to json";
366369
+ }
366370
+ if (parseErr) return callback(parseErr, false);
366371
+ callback(null, ret);
366372
+ });
366373
+ }
366374
+ create(languages, namespace, key, fallbackValue, callback) {
366375
+ if (!this.options.addPath) return;
366376
+ if (typeof languages === "string") languages = [languages];
366377
+ const payload = this.options.parsePayload(namespace, key, fallbackValue);
366378
+ let finished = 0;
366379
+ const dataArray = [];
366380
+ const resArray = [];
366381
+ languages.forEach((lng) => {
366382
+ let addPath = this.options.addPath;
366383
+ if (typeof this.options.addPath === "function") addPath = this.options.addPath(lng, namespace);
366384
+ const url = interpolateUrl(addPath, {
366385
+ lng,
366386
+ ns: namespace
366387
+ });
366388
+ if (url == null) {
366389
+ finished += 1;
366390
+ if (callback && finished === languages.length) callback(dataArray, resArray);
366391
+ return;
366392
+ }
366393
+ this.options.request(this.options, url, payload, (data, res) => {
366394
+ finished += 1;
366395
+ dataArray.push(data);
366396
+ resArray.push(res);
366397
+ if (finished === languages.length) {
366398
+ if (typeof callback === "function") callback(dataArray, resArray);
366399
+ }
366400
+ });
366401
+ });
366402
+ }
366403
+ reload() {
366404
+ const { backendConnector, languageUtils, logger } = this.services;
366405
+ const currentLanguage = backendConnector.language;
366406
+ if (currentLanguage && currentLanguage.toLowerCase() === "cimode") return;
366407
+ const toLoad = [];
366408
+ const append = (lng) => {
366409
+ languageUtils.toResolveHierarchy(lng).forEach((l) => {
366410
+ if (toLoad.indexOf(l) < 0) toLoad.push(l);
366411
+ });
366412
+ };
366413
+ append(currentLanguage);
366414
+ if (this.allOptions.preload) this.allOptions.preload.forEach((l) => append(l));
366415
+ toLoad.forEach((lng) => {
366416
+ this.allOptions.ns.forEach((ns) => {
366417
+ backendConnector.read(lng, ns, "read", null, null, (err, data) => {
366418
+ if (err) logger.warn(`loading namespace ${ns} for language ${lng} failed`, err);
366419
+ if (!err && data) logger.log(`loaded namespace ${ns} for language ${lng}`, data);
366420
+ backendConnector.loaded(`${lng}|${ns}`, err, data);
366421
+ });
366422
+ });
366423
+ });
366424
+ }
366425
+ };
366426
+ Backend.type = "backend";
366427
+ //#endregion
366428
+
366429
+
366582
366430
 
366583
366431
  /***/ },
366584
366432
 
@@ -370647,7 +370495,7 @@ class WMS {
370647
370495
  (module) {
370648
370496
 
370649
370497
  "use strict";
370650
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.14.4","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.11","@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"}}');
370498
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.14.5","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.11","@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"}}');
370651
370499
 
370652
370500
  /***/ },
370653
370501
 
@@ -370719,36 +370567,6 @@ module.exports = /*#__PURE__*/JSON.parse('{"$schema":"../../../node_modules/@itw
370719
370567
  /******/ return getter;
370720
370568
  /******/ };
370721
370569
  /******/
370722
- /******/ /* webpack/runtime/create fake namespace object */
370723
- /******/ (() => {
370724
- /******/ const getProto = Object.getPrototypeOf;
370725
- /******/ let leafPrototypes;
370726
- /******/ // create a fake namespace object
370727
- /******/ // mode & 1: value is a module id, require it
370728
- /******/ // mode & 2: merge all properties of value into the ns
370729
- /******/ // mode & 4: return value when already ns object
370730
- /******/ // mode & 16: return value when it's Promise-like
370731
- /******/ // mode & 8|1: behave like require
370732
- /******/ __webpack_require__.t = function(value, mode) {
370733
- /******/ if(mode & 1) value = this(value);
370734
- /******/ if(mode & 8) return value;
370735
- /******/ if(typeof value === 'object' && value) {
370736
- /******/ if((mode & 4) && value.__esModule) return value;
370737
- /******/ if((mode & 16) && typeof value.then === 'function') return value;
370738
- /******/ }
370739
- /******/ const ns = Object.create(null);
370740
- /******/ __webpack_require__.r(ns);
370741
- /******/ const def = {};
370742
- /******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
370743
- /******/ for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {
370744
- /******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
370745
- /******/ }
370746
- /******/ def['default'] = () => (value);
370747
- /******/ __webpack_require__.d(ns, def);
370748
- /******/ return ns;
370749
- /******/ };
370750
- /******/ })();
370751
- /******/
370752
370570
  /******/ /* webpack/runtime/define property getters */
370753
370571
  /******/ // define getter/value functions for harmony exports
370754
370572
  /******/ __webpack_require__.d = (exports, definition) => {