@itwin/core-i18n 5.14.4 → 5.14.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -1
- package/lib/cjs/test/webpack/bundled-tests.instrumented.js +350 -706
- package/lib/cjs/test/webpack/bundled-tests.instrumented.js.map +1 -1
- package/lib/cjs/test/webpack/bundled-tests.js +350 -706
- package/lib/cjs/test/webpack/bundled-tests.js.map +1 -1
- package/package.json +7 -7
- package/lib/cjs/test/webpack/vendors-common_temp_node_modules_pnpm_cross-fetch_4_1_0_node_modules_cross-fetch_dist_browser-44272f.bundled-tests.instrumented.js +0 -698
- package/lib/cjs/test/webpack/vendors-common_temp_node_modules_pnpm_cross-fetch_4_1_0_node_modules_cross-fetch_dist_browser-44272f.bundled-tests.instrumented.js.map +0 -1
- package/lib/cjs/test/webpack/vendors-common_temp_node_modules_pnpm_cross-fetch_4_1_0_node_modules_cross-fetch_dist_browser-44272f.bundled-tests.js +0 -698
- package/lib/cjs/test/webpack/vendors-common_temp_node_modules_pnpm_cross-fetch_4_1_0_node_modules_cross-fetch_dist_browser-44272f.bundled-tests.js.map +0 -1
|
@@ -22325,7 +22325,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
22325
22325
|
exports.ITwinLocalization = void 0;
|
|
22326
22326
|
const i18next_1 = __importDefault(__webpack_require__(/*! i18next */ "../../common/temp/node_modules/.pnpm/i18next@21.10.0/node_modules/i18next/dist/cjs/i18next.js"));
|
|
22327
22327
|
const i18next_browser_languagedetector_1 = __importDefault(__webpack_require__(/*! i18next-browser-languagedetector */ "../../common/temp/node_modules/.pnpm/i18next-browser-languagedetector@6.1.8/node_modules/i18next-browser-languagedetector/dist/cjs/i18nextBrowserLanguageDetector.js"));
|
|
22328
|
-
const i18next_http_backend_1 = __importDefault(__webpack_require__(/*! i18next-http-backend */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@
|
|
22328
|
+
const i18next_http_backend_1 = __importDefault(__webpack_require__(/*! i18next-http-backend */ "../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.6/node_modules/i18next-http-backend/esm/index.js"));
|
|
22329
22329
|
const core_bentley_1 = __webpack_require__(/*! @itwin/core-bentley */ "../bentley/lib/esm/core-bentley.js");
|
|
22330
22330
|
const DEFAULT_MAX_RETRIES = 1; // a low number prevents wasted time and potential timeouts when requesting localization files throws an error
|
|
22331
22331
|
/** Supplies localizations for iTwin.js
|
|
@@ -22807,534 +22807,382 @@ module.exports = _unsupportedIterableToArray, module.exports.__esModule = true,
|
|
|
22807
22807
|
|
|
22808
22808
|
/***/ },
|
|
22809
22809
|
|
|
22810
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@
|
|
22810
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.6/node_modules/i18next-http-backend/esm/index.js"
|
|
22811
22811
|
/*!**********************************************************************************************************************!*\
|
|
22812
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@
|
|
22812
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@4.0.6/node_modules/i18next-http-backend/esm/index.js ***!
|
|
22813
22813
|
\**********************************************************************************************************************/
|
|
22814
22814
|
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
22815
22815
|
|
|
22816
22816
|
"use strict";
|
|
22817
22817
|
__webpack_require__.r(__webpack_exports__);
|
|
22818
22818
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
22819
|
-
/* harmony export */ "default": () => (
|
|
22819
|
+
/* harmony export */ "default": () => (/* binding */ Backend)
|
|
22820
22820
|
/* harmony export */ });
|
|
22821
|
-
|
|
22822
|
-
|
|
22823
|
-
|
|
22824
|
-
|
|
22825
|
-
|
|
22826
|
-
|
|
22827
|
-
|
|
22828
|
-
|
|
22829
|
-
|
|
22830
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22831
|
-
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); }
|
|
22832
|
-
;
|
|
22833
|
-
|
|
22834
|
-
var getDefaults = function getDefaults() {
|
|
22835
|
-
return {
|
|
22836
|
-
loadPath: '/locales/{{lng}}/{{ns}}.json',
|
|
22837
|
-
addPath: '/locales/add/{{lng}}/{{ns}}',
|
|
22838
|
-
parse: function parse(data) {
|
|
22839
|
-
return JSON.parse(data);
|
|
22840
|
-
},
|
|
22841
|
-
stringify: JSON.stringify,
|
|
22842
|
-
parsePayload: function parsePayload(namespace, key, fallbackValue) {
|
|
22843
|
-
return _defineProperty({}, key, fallbackValue || '');
|
|
22844
|
-
},
|
|
22845
|
-
parseLoadPayload: function parseLoadPayload(languages, namespaces) {
|
|
22846
|
-
return undefined;
|
|
22847
|
-
},
|
|
22848
|
-
request: _request_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
|
22849
|
-
reloadInterval: typeof window !== 'undefined' ? false : 60 * 60 * 1000,
|
|
22850
|
-
customHeaders: {},
|
|
22851
|
-
queryStringParams: {},
|
|
22852
|
-
crossDomain: false,
|
|
22853
|
-
withCredentials: false,
|
|
22854
|
-
overrideMimeType: false,
|
|
22855
|
-
requestOptions: {
|
|
22856
|
-
mode: 'cors',
|
|
22857
|
-
credentials: 'same-origin',
|
|
22858
|
-
cache: 'default'
|
|
22859
|
-
}
|
|
22860
|
-
};
|
|
22861
|
-
};
|
|
22862
|
-
var Backend = function () {
|
|
22863
|
-
function Backend(services) {
|
|
22864
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
22865
|
-
var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
22866
|
-
_classCallCheck(this, Backend);
|
|
22867
|
-
this.services = services;
|
|
22868
|
-
this.options = options;
|
|
22869
|
-
this.allOptions = allOptions;
|
|
22870
|
-
this.type = 'backend';
|
|
22871
|
-
this.init(services, options, allOptions);
|
|
22872
|
-
}
|
|
22873
|
-
return _createClass(Backend, [{
|
|
22874
|
-
key: "init",
|
|
22875
|
-
value: function init(services) {
|
|
22876
|
-
var _this = this;
|
|
22877
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
22878
|
-
var allOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
22879
|
-
this.services = services;
|
|
22880
|
-
this.options = _objectSpread(_objectSpread(_objectSpread({}, getDefaults()), this.options || {}), options);
|
|
22881
|
-
this.allOptions = allOptions;
|
|
22882
|
-
if (this.services && this.options.reloadInterval) {
|
|
22883
|
-
var timer = setInterval(function () {
|
|
22884
|
-
return _this.reload();
|
|
22885
|
-
}, this.options.reloadInterval);
|
|
22886
|
-
if (_typeof(timer) === 'object' && typeof timer.unref === 'function') timer.unref();
|
|
22887
|
-
}
|
|
22888
|
-
}
|
|
22889
|
-
}, {
|
|
22890
|
-
key: "readMulti",
|
|
22891
|
-
value: function readMulti(languages, namespaces, callback) {
|
|
22892
|
-
this._readAny(languages, languages, namespaces, namespaces, callback);
|
|
22893
|
-
}
|
|
22894
|
-
}, {
|
|
22895
|
-
key: "read",
|
|
22896
|
-
value: function read(language, namespace, callback) {
|
|
22897
|
-
this._readAny([language], language, [namespace], namespace, callback);
|
|
22898
|
-
}
|
|
22899
|
-
}, {
|
|
22900
|
-
key: "_readAny",
|
|
22901
|
-
value: function _readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {
|
|
22902
|
-
var _this2 = this;
|
|
22903
|
-
var loadPath = this.options.loadPath;
|
|
22904
|
-
if (typeof this.options.loadPath === 'function') {
|
|
22905
|
-
loadPath = this.options.loadPath(languages, namespaces);
|
|
22906
|
-
}
|
|
22907
|
-
loadPath = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.makePromise)(loadPath);
|
|
22908
|
-
loadPath.then(function (resolvedLoadPath) {
|
|
22909
|
-
if (!resolvedLoadPath) return callback(null, {});
|
|
22910
|
-
var url = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.interpolateUrl)(resolvedLoadPath, {
|
|
22911
|
-
lng: languages.join('+'),
|
|
22912
|
-
ns: namespaces.join('+')
|
|
22913
|
-
});
|
|
22914
|
-
if (url == null) {
|
|
22915
|
-
var safeLngs = languages.map(_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue).join(', ');
|
|
22916
|
-
var safeNss = namespaces.map(_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue).join(', ');
|
|
22917
|
-
return callback(new Error('i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[' + safeLngs + '] namespaces=[' + safeNss + ']'), false);
|
|
22918
|
-
}
|
|
22919
|
-
_this2.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);
|
|
22920
|
-
});
|
|
22921
|
-
}
|
|
22922
|
-
}, {
|
|
22923
|
-
key: "loadUrl",
|
|
22924
|
-
value: function loadUrl(url, callback, languages, namespaces) {
|
|
22925
|
-
var _this3 = this;
|
|
22926
|
-
var lng = typeof languages === 'string' ? [languages] : languages;
|
|
22927
|
-
var ns = typeof namespaces === 'string' ? [namespaces] : namespaces;
|
|
22928
|
-
var payload = this.options.parseLoadPayload(lng, ns);
|
|
22929
|
-
var safeUrl = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue)((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.redactUrlCredentials)(url));
|
|
22930
|
-
this.options.request(this.options, url, payload, function (err, res) {
|
|
22931
|
-
if (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback('failed loading ' + safeUrl + '; status code: ' + res.status, true);
|
|
22932
|
-
if (res && res.status >= 400 && res.status < 500) return callback('failed loading ' + safeUrl + '; status code: ' + res.status, false);
|
|
22933
|
-
if (!res && err && err.message) {
|
|
22934
|
-
var errorMessage = err.message.toLowerCase();
|
|
22935
|
-
var isNetworkError = ['failed', 'fetch', 'network', 'load'].find(function (term) {
|
|
22936
|
-
return errorMessage.indexOf(term) > -1;
|
|
22937
|
-
});
|
|
22938
|
-
if (isNetworkError) {
|
|
22939
|
-
return callback('failed loading ' + safeUrl + ': ' + (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitizeLogValue)(err.message), true);
|
|
22940
|
-
}
|
|
22941
|
-
}
|
|
22942
|
-
if (err) return callback(err, false);
|
|
22943
|
-
var ret, parseErr;
|
|
22944
|
-
try {
|
|
22945
|
-
if (typeof res.data === 'string') {
|
|
22946
|
-
ret = _this3.options.parse(res.data, languages, namespaces);
|
|
22947
|
-
} else {
|
|
22948
|
-
ret = res.data;
|
|
22949
|
-
}
|
|
22950
|
-
} catch (e) {
|
|
22951
|
-
parseErr = 'failed parsing ' + safeUrl + ' to json';
|
|
22952
|
-
}
|
|
22953
|
-
if (parseErr) return callback(parseErr, false);
|
|
22954
|
-
callback(null, ret);
|
|
22955
|
-
});
|
|
22956
|
-
}
|
|
22957
|
-
}, {
|
|
22958
|
-
key: "create",
|
|
22959
|
-
value: function create(languages, namespace, key, fallbackValue, callback) {
|
|
22960
|
-
var _this4 = this;
|
|
22961
|
-
if (!this.options.addPath) return;
|
|
22962
|
-
if (typeof languages === 'string') languages = [languages];
|
|
22963
|
-
var payload = this.options.parsePayload(namespace, key, fallbackValue);
|
|
22964
|
-
var finished = 0;
|
|
22965
|
-
var dataArray = [];
|
|
22966
|
-
var resArray = [];
|
|
22967
|
-
languages.forEach(function (lng) {
|
|
22968
|
-
var addPath = _this4.options.addPath;
|
|
22969
|
-
if (typeof _this4.options.addPath === 'function') {
|
|
22970
|
-
addPath = _this4.options.addPath(lng, namespace);
|
|
22971
|
-
}
|
|
22972
|
-
var url = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.interpolateUrl)(addPath, {
|
|
22973
|
-
lng: lng,
|
|
22974
|
-
ns: namespace
|
|
22975
|
-
});
|
|
22976
|
-
if (url == null) {
|
|
22977
|
-
finished += 1;
|
|
22978
|
-
if (callback && finished === languages.length) callback(dataArray, resArray);
|
|
22979
|
-
return;
|
|
22980
|
-
}
|
|
22981
|
-
_this4.options.request(_this4.options, url, payload, function (data, res) {
|
|
22982
|
-
finished += 1;
|
|
22983
|
-
dataArray.push(data);
|
|
22984
|
-
resArray.push(res);
|
|
22985
|
-
if (finished === languages.length) {
|
|
22986
|
-
if (typeof callback === 'function') callback(dataArray, resArray);
|
|
22987
|
-
}
|
|
22988
|
-
});
|
|
22989
|
-
});
|
|
22990
|
-
}
|
|
22991
|
-
}, {
|
|
22992
|
-
key: "reload",
|
|
22993
|
-
value: function reload() {
|
|
22994
|
-
var _this5 = this;
|
|
22995
|
-
var _this$services = this.services,
|
|
22996
|
-
backendConnector = _this$services.backendConnector,
|
|
22997
|
-
languageUtils = _this$services.languageUtils,
|
|
22998
|
-
logger = _this$services.logger;
|
|
22999
|
-
var currentLanguage = backendConnector.language;
|
|
23000
|
-
if (currentLanguage && currentLanguage.toLowerCase() === 'cimode') return;
|
|
23001
|
-
var toLoad = [];
|
|
23002
|
-
var append = function append(lng) {
|
|
23003
|
-
var lngs = languageUtils.toResolveHierarchy(lng);
|
|
23004
|
-
lngs.forEach(function (l) {
|
|
23005
|
-
if (toLoad.indexOf(l) < 0) toLoad.push(l);
|
|
23006
|
-
});
|
|
23007
|
-
};
|
|
23008
|
-
append(currentLanguage);
|
|
23009
|
-
if (this.allOptions.preload) this.allOptions.preload.forEach(function (l) {
|
|
23010
|
-
return append(l);
|
|
23011
|
-
});
|
|
23012
|
-
toLoad.forEach(function (lng) {
|
|
23013
|
-
_this5.allOptions.ns.forEach(function (ns) {
|
|
23014
|
-
backendConnector.read(lng, ns, 'read', null, null, function (err, data) {
|
|
23015
|
-
if (err) logger.warn("loading namespace ".concat(ns, " for language ").concat(lng, " failed"), err);
|
|
23016
|
-
if (!err && data) logger.log("loaded namespace ".concat(ns, " for language ").concat(lng), data);
|
|
23017
|
-
backendConnector.loaded("".concat(lng, "|").concat(ns), err, data);
|
|
23018
|
-
});
|
|
23019
|
-
});
|
|
23020
|
-
});
|
|
23021
|
-
}
|
|
23022
|
-
}]);
|
|
23023
|
-
}();
|
|
23024
|
-
Backend.type = 'backend';
|
|
23025
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Backend);
|
|
23026
|
-
|
|
23027
|
-
/***/ },
|
|
23028
|
-
|
|
23029
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/request.js"
|
|
23030
|
-
/*!************************************************************************************************************************!*\
|
|
23031
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/request.js ***!
|
|
23032
|
-
\************************************************************************************************************************/
|
|
23033
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
23034
|
-
|
|
23035
|
-
"use strict";
|
|
23036
|
-
__webpack_require__.r(__webpack_exports__);
|
|
23037
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23038
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
23039
|
-
/* harmony export */ });
|
|
23040
|
-
/* 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");
|
|
23041
|
-
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; }
|
|
23042
|
-
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; }
|
|
23043
|
-
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; }
|
|
23044
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
23045
|
-
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); }
|
|
23046
|
-
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); }
|
|
23047
|
-
;
|
|
23048
|
-
var fetchApi = typeof fetch === 'function' ? fetch : undefined;
|
|
23049
|
-
if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.fetch) {
|
|
23050
|
-
fetchApi = __webpack_require__.g.fetch;
|
|
23051
|
-
} else if (typeof window !== 'undefined' && window.fetch) {
|
|
23052
|
-
fetchApi = window.fetch;
|
|
23053
|
-
}
|
|
23054
|
-
var XmlHttpRequestApi;
|
|
23055
|
-
if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasXMLHttpRequest)()) {
|
|
23056
|
-
if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.XMLHttpRequest) {
|
|
23057
|
-
XmlHttpRequestApi = __webpack_require__.g.XMLHttpRequest;
|
|
23058
|
-
} else if (typeof window !== 'undefined' && window.XMLHttpRequest) {
|
|
23059
|
-
XmlHttpRequestApi = window.XMLHttpRequest;
|
|
23060
|
-
}
|
|
23061
|
-
}
|
|
23062
|
-
var ActiveXObjectApi;
|
|
23063
|
-
if (typeof ActiveXObject === 'function') {
|
|
23064
|
-
if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.ActiveXObject) {
|
|
23065
|
-
ActiveXObjectApi = __webpack_require__.g.ActiveXObject;
|
|
23066
|
-
} else if (typeof window !== 'undefined' && window.ActiveXObject) {
|
|
23067
|
-
ActiveXObjectApi = window.ActiveXObject;
|
|
23068
|
-
}
|
|
23069
|
-
}
|
|
23070
|
-
if (typeof fetchApi !== 'function') fetchApi = undefined;
|
|
23071
|
-
if (!fetchApi && !XmlHttpRequestApi && !ActiveXObjectApi) {
|
|
23072
|
-
try {
|
|
23073
|
-
__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) {
|
|
23074
|
-
fetchApi = mod.default;
|
|
23075
|
-
}).catch(function () {});
|
|
23076
|
-
} catch (e) {}
|
|
23077
|
-
}
|
|
23078
|
-
var UNSAFE_KEYS = ['__proto__', 'constructor', 'prototype'];
|
|
23079
|
-
var addQueryString = function addQueryString(url, params) {
|
|
23080
|
-
if (params && _typeof(params) === 'object') {
|
|
23081
|
-
var queryString = '';
|
|
23082
|
-
for (var _i = 0, _Object$keys = Object.keys(params); _i < _Object$keys.length; _i++) {
|
|
23083
|
-
var paramName = _Object$keys[_i];
|
|
23084
|
-
if (UNSAFE_KEYS.indexOf(paramName) > -1) continue;
|
|
23085
|
-
queryString += '&' + encodeURIComponent(paramName) + '=' + encodeURIComponent(params[paramName]);
|
|
23086
|
-
}
|
|
23087
|
-
if (!queryString) return url;
|
|
23088
|
-
url = url + (url.indexOf('?') !== -1 ? '&' : '?') + queryString.slice(1);
|
|
23089
|
-
}
|
|
23090
|
-
return url;
|
|
23091
|
-
};
|
|
23092
|
-
var fetchIt = function fetchIt(url, fetchOptions, callback, altFetch) {
|
|
23093
|
-
var resolver = function resolver(response) {
|
|
23094
|
-
if (!response.ok) return callback(response.statusText || 'Error', {
|
|
23095
|
-
status: response.status
|
|
23096
|
-
});
|
|
23097
|
-
response.text().then(function (data) {
|
|
23098
|
-
callback(null, {
|
|
23099
|
-
status: response.status,
|
|
23100
|
-
data: data
|
|
23101
|
-
});
|
|
23102
|
-
}).catch(callback);
|
|
23103
|
-
};
|
|
23104
|
-
if (altFetch) {
|
|
23105
|
-
var altResponse = altFetch(url, fetchOptions);
|
|
23106
|
-
if (altResponse instanceof Promise) {
|
|
23107
|
-
altResponse.then(resolver).catch(callback);
|
|
23108
|
-
return;
|
|
23109
|
-
}
|
|
23110
|
-
}
|
|
23111
|
-
if (typeof fetch === 'function') {
|
|
23112
|
-
fetch(url, fetchOptions).then(resolver).catch(callback);
|
|
23113
|
-
} else {
|
|
23114
|
-
fetchApi(url, fetchOptions).then(resolver).catch(callback);
|
|
23115
|
-
}
|
|
23116
|
-
};
|
|
23117
|
-
var requestWithFetch = function requestWithFetch(options, url, payload, callback) {
|
|
23118
|
-
if (options.queryStringParams) {
|
|
23119
|
-
url = addQueryString(url, options.queryStringParams);
|
|
23120
|
-
}
|
|
23121
|
-
var headers = _objectSpread({}, typeof options.customHeaders === 'function' ? options.customHeaders() : options.customHeaders);
|
|
23122
|
-
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) {
|
|
23123
|
-
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, ")");
|
|
23124
|
-
}
|
|
23125
|
-
if (payload) headers['Content-Type'] = 'application/json';
|
|
23126
|
-
var reqOptions = typeof options.requestOptions === 'function' ? options.requestOptions(payload) : options.requestOptions;
|
|
23127
|
-
var fetchOptions = _objectSpread({
|
|
23128
|
-
method: payload ? 'POST' : 'GET',
|
|
23129
|
-
body: payload ? options.stringify(payload) : undefined,
|
|
23130
|
-
headers: headers
|
|
23131
|
-
}, options._omitFetchOptions ? {} : reqOptions);
|
|
23132
|
-
var altFetch = typeof options.alternateFetch === 'function' && options.alternateFetch.length >= 1 ? options.alternateFetch : undefined;
|
|
23133
|
-
try {
|
|
23134
|
-
fetchIt(url, fetchOptions, callback, altFetch);
|
|
23135
|
-
} catch (e) {
|
|
23136
|
-
if (!reqOptions || Object.keys(reqOptions).length === 0 || !e.message || e.message.indexOf('not implemented') < 0) {
|
|
23137
|
-
return callback(e);
|
|
23138
|
-
}
|
|
23139
|
-
try {
|
|
23140
|
-
Object.keys(reqOptions).forEach(function (opt) {
|
|
23141
|
-
delete fetchOptions[opt];
|
|
23142
|
-
});
|
|
23143
|
-
fetchIt(url, fetchOptions, callback, altFetch);
|
|
23144
|
-
options._omitFetchOptions = true;
|
|
23145
|
-
} catch (err) {
|
|
23146
|
-
callback(err);
|
|
23147
|
-
}
|
|
23148
|
-
}
|
|
23149
|
-
};
|
|
23150
|
-
var requestWithXmlHttpRequest = function requestWithXmlHttpRequest(options, url, payload, callback) {
|
|
23151
|
-
if (payload && _typeof(payload) === 'object') {
|
|
23152
|
-
payload = addQueryString('', payload).slice(1);
|
|
23153
|
-
}
|
|
23154
|
-
if (options.queryStringParams) {
|
|
23155
|
-
url = addQueryString(url, options.queryStringParams);
|
|
23156
|
-
}
|
|
23157
|
-
try {
|
|
23158
|
-
var x = XmlHttpRequestApi ? new XmlHttpRequestApi() : new ActiveXObjectApi('MSXML2.XMLHTTP.3.0');
|
|
23159
|
-
x.open(payload ? 'POST' : 'GET', url, 1);
|
|
23160
|
-
if (!options.crossDomain) {
|
|
23161
|
-
x.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
|
|
23162
|
-
}
|
|
23163
|
-
x.withCredentials = !!options.withCredentials;
|
|
23164
|
-
if (payload) {
|
|
23165
|
-
x.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
23166
|
-
}
|
|
23167
|
-
if (x.overrideMimeType) {
|
|
23168
|
-
x.overrideMimeType('application/json');
|
|
23169
|
-
}
|
|
23170
|
-
var h = options.customHeaders;
|
|
23171
|
-
h = typeof h === 'function' ? h() : h;
|
|
23172
|
-
if (h) {
|
|
23173
|
-
for (var _i2 = 0, _Object$keys2 = Object.keys(h); _i2 < _Object$keys2.length; _i2++) {
|
|
23174
|
-
var i = _Object$keys2[_i2];
|
|
23175
|
-
if (UNSAFE_KEYS.indexOf(i) > -1) continue;
|
|
23176
|
-
x.setRequestHeader(i, h[i]);
|
|
23177
|
-
}
|
|
23178
|
-
}
|
|
23179
|
-
x.onreadystatechange = function () {
|
|
23180
|
-
x.readyState > 3 && callback(x.status >= 400 ? x.statusText : null, {
|
|
23181
|
-
status: x.status,
|
|
23182
|
-
data: x.responseText
|
|
23183
|
-
});
|
|
23184
|
-
};
|
|
23185
|
-
x.send(payload);
|
|
23186
|
-
} catch (e) {
|
|
23187
|
-
console && console.log(e);
|
|
23188
|
-
}
|
|
23189
|
-
};
|
|
23190
|
-
var request = function request(options, url, payload, callback) {
|
|
23191
|
-
if (typeof payload === 'function') {
|
|
23192
|
-
callback = payload;
|
|
23193
|
-
payload = undefined;
|
|
23194
|
-
}
|
|
23195
|
-
callback = callback || function () {};
|
|
23196
|
-
if (fetchApi && url.indexOf('file:') !== 0) {
|
|
23197
|
-
return requestWithFetch(options, url, payload, callback);
|
|
23198
|
-
}
|
|
23199
|
-
if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.hasXMLHttpRequest)() || typeof ActiveXObject === 'function') {
|
|
23200
|
-
return requestWithXmlHttpRequest(options, url, payload, callback);
|
|
23201
|
-
}
|
|
23202
|
-
callback(new Error('No fetch and no xhr implementation found!'));
|
|
23203
|
-
};
|
|
23204
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (request);
|
|
23205
|
-
|
|
23206
|
-
/***/ },
|
|
23207
|
-
|
|
23208
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js"
|
|
23209
|
-
/*!**********************************************************************************************************************!*\
|
|
23210
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next-http-backend@3.0.6/node_modules/i18next-http-backend/esm/utils.js ***!
|
|
23211
|
-
\**********************************************************************************************************************/
|
|
23212
|
-
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
23213
|
-
|
|
23214
|
-
"use strict";
|
|
23215
|
-
__webpack_require__.r(__webpack_exports__);
|
|
23216
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23217
|
-
/* harmony export */ defaults: () => (/* binding */ defaults),
|
|
23218
|
-
/* harmony export */ hasXMLHttpRequest: () => (/* binding */ hasXMLHttpRequest),
|
|
23219
|
-
/* harmony export */ interpolate: () => (/* binding */ interpolate),
|
|
23220
|
-
/* harmony export */ interpolateUrl: () => (/* binding */ interpolateUrl),
|
|
23221
|
-
/* harmony export */ isSafeLangUrlSegment: () => (/* binding */ isSafeLangUrlSegment),
|
|
23222
|
-
/* harmony export */ isSafeNsUrlSegment: () => (/* binding */ isSafeNsUrlSegment),
|
|
23223
|
-
/* harmony export */ isSafeUrlSegment: () => (/* binding */ isSafeUrlSegment),
|
|
23224
|
-
/* harmony export */ makePromise: () => (/* binding */ makePromise),
|
|
23225
|
-
/* harmony export */ redactUrlCredentials: () => (/* binding */ redactUrlCredentials),
|
|
23226
|
-
/* harmony export */ sanitizeLogValue: () => (/* binding */ sanitizeLogValue)
|
|
23227
|
-
/* harmony export */ });
|
|
23228
|
-
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; } } }; }
|
|
23229
|
-
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; } }
|
|
23230
|
-
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; }
|
|
23231
|
-
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); }
|
|
23232
|
-
var arr = [];
|
|
23233
|
-
var each = arr.forEach;
|
|
23234
|
-
var slice = arr.slice;
|
|
23235
|
-
var UNSAFE_KEYS = ['__proto__', 'constructor', 'prototype'];
|
|
23236
|
-
function defaults(obj) {
|
|
23237
|
-
each.call(slice.call(arguments, 1), function (source) {
|
|
23238
|
-
if (source) {
|
|
23239
|
-
for (var _i = 0, _Object$keys = Object.keys(source); _i < _Object$keys.length; _i++) {
|
|
23240
|
-
var prop = _Object$keys[_i];
|
|
23241
|
-
if (UNSAFE_KEYS.indexOf(prop) > -1) continue;
|
|
23242
|
-
if (obj[prop] === undefined) obj[prop] = source[prop];
|
|
23243
|
-
}
|
|
23244
|
-
}
|
|
23245
|
-
});
|
|
23246
|
-
return obj;
|
|
23247
|
-
}
|
|
22821
|
+
//#region lib/utils.js
|
|
22822
|
+
const arr = [];
|
|
22823
|
+
arr.forEach;
|
|
22824
|
+
arr.slice;
|
|
22825
|
+
const UNSAFE_KEYS$1 = [
|
|
22826
|
+
"__proto__",
|
|
22827
|
+
"constructor",
|
|
22828
|
+
"prototype"
|
|
22829
|
+
];
|
|
23248
22830
|
function isSafeUrlSegmentBase(v) {
|
|
23249
|
-
|
|
23250
|
-
|
|
23251
|
-
|
|
23252
|
-
|
|
23253
|
-
|
|
23254
|
-
|
|
23255
|
-
|
|
23256
|
-
|
|
22831
|
+
if (typeof v !== "string") return false;
|
|
22832
|
+
if (v.length === 0 || v.length > 128) return false;
|
|
22833
|
+
if (UNSAFE_KEYS$1.indexOf(v) > -1) return false;
|
|
22834
|
+
if (v.indexOf("..") > -1) return false;
|
|
22835
|
+
if (v.indexOf("\\") > -1) return false;
|
|
22836
|
+
if (/[?#%:&=;\s]/.test(v)) return false;
|
|
22837
|
+
if (/[\x00-\x1F\x7F]/.test(v)) return false;
|
|
22838
|
+
return true;
|
|
23257
22839
|
}
|
|
23258
22840
|
function isSafeLangUrlSegment(v) {
|
|
23259
|
-
|
|
23260
|
-
|
|
23261
|
-
|
|
22841
|
+
if (!isSafeUrlSegmentBase(v)) return false;
|
|
22842
|
+
if (v.indexOf("/") > -1 || v.indexOf("@") > -1) return false;
|
|
22843
|
+
return true;
|
|
23262
22844
|
}
|
|
23263
22845
|
function isSafeNsUrlSegment(v) {
|
|
23264
|
-
|
|
22846
|
+
if (!isSafeUrlSegmentBase(v)) return false;
|
|
22847
|
+
if (v.indexOf("//") > -1) return false;
|
|
22848
|
+
return true;
|
|
23265
22849
|
}
|
|
23266
|
-
|
|
23267
|
-
|
|
23268
|
-
|
|
23269
|
-
ns: isSafeNsUrlSegment
|
|
22850
|
+
const SAFETY_CHECK_BY_KEY = {
|
|
22851
|
+
lng: isSafeLangUrlSegment,
|
|
22852
|
+
ns: isSafeNsUrlSegment
|
|
23270
22853
|
};
|
|
23271
22854
|
function sanitizeLogValue(v) {
|
|
23272
|
-
|
|
23273
|
-
|
|
22855
|
+
if (typeof v !== "string") return v;
|
|
22856
|
+
return v.replace(/[\r\n\x00-\x1F\x7F]/g, " ");
|
|
23274
22857
|
}
|
|
23275
22858
|
function redactUrlCredentials(u) {
|
|
23276
|
-
|
|
23277
|
-
|
|
23278
|
-
|
|
23279
|
-
|
|
23280
|
-
|
|
23281
|
-
|
|
23282
|
-
|
|
23283
|
-
|
|
23284
|
-
|
|
23285
|
-
|
|
23286
|
-
|
|
23287
|
-
|
|
22859
|
+
if (typeof u !== "string" || u.length === 0) return u;
|
|
22860
|
+
try {
|
|
22861
|
+
const parsed = new URL(u);
|
|
22862
|
+
if (parsed.username || parsed.password) {
|
|
22863
|
+
parsed.username = "";
|
|
22864
|
+
parsed.password = "";
|
|
22865
|
+
return parsed.toString();
|
|
22866
|
+
}
|
|
22867
|
+
return u;
|
|
22868
|
+
} catch (e) {
|
|
22869
|
+
return u.replace(/(\/\/)[^/@\s]+@/g, "$1");
|
|
22870
|
+
}
|
|
23288
22871
|
}
|
|
23289
22872
|
function hasXMLHttpRequest() {
|
|
23290
|
-
|
|
22873
|
+
return typeof XMLHttpRequest === "function" || typeof XMLHttpRequest === "object";
|
|
23291
22874
|
}
|
|
22875
|
+
/**
|
|
22876
|
+
* Determine whether the given `maybePromise` is a Promise.
|
|
22877
|
+
*
|
|
22878
|
+
* @param {*} maybePromise
|
|
22879
|
+
*
|
|
22880
|
+
* @returns {Boolean}
|
|
22881
|
+
*/
|
|
23292
22882
|
function isPromise(maybePromise) {
|
|
23293
|
-
|
|
22883
|
+
return !!maybePromise && typeof maybePromise.then === "function";
|
|
23294
22884
|
}
|
|
22885
|
+
/**
|
|
22886
|
+
* Convert any value to a Promise than will resolve to this value.
|
|
22887
|
+
*
|
|
22888
|
+
* @param {*} maybePromise
|
|
22889
|
+
*
|
|
22890
|
+
* @returns {Promise}
|
|
22891
|
+
*/
|
|
23295
22892
|
function makePromise(maybePromise) {
|
|
23296
|
-
|
|
23297
|
-
|
|
23298
|
-
}
|
|
23299
|
-
return Promise.resolve(maybePromise);
|
|
23300
|
-
}
|
|
23301
|
-
var interpolationRegexp = /\{\{(.+?)\}\}/g;
|
|
23302
|
-
function interpolate(str, data) {
|
|
23303
|
-
return str.replace(interpolationRegexp, function (match, key) {
|
|
23304
|
-
var k = key.trim();
|
|
23305
|
-
if (UNSAFE_KEYS.indexOf(k) > -1) return match;
|
|
23306
|
-
var value = data[k];
|
|
23307
|
-
return value != null ? value : match;
|
|
23308
|
-
});
|
|
22893
|
+
if (isPromise(maybePromise)) return maybePromise;
|
|
22894
|
+
return Promise.resolve(maybePromise);
|
|
23309
22895
|
}
|
|
22896
|
+
const interpolationRegexp = /\{\{(.+?)\}\}/g;
|
|
22897
|
+
const LEADING_DOUBLE_SLASH = /^[/\\]{2}/;
|
|
23310
22898
|
function interpolateUrl(str, data) {
|
|
23311
|
-
|
|
23312
|
-
|
|
23313
|
-
|
|
23314
|
-
|
|
23315
|
-
|
|
23316
|
-
|
|
23317
|
-
|
|
23318
|
-
|
|
23319
|
-
|
|
23320
|
-
|
|
23321
|
-
|
|
23322
|
-
|
|
23323
|
-
|
|
23324
|
-
|
|
23325
|
-
|
|
23326
|
-
|
|
23327
|
-
|
|
23328
|
-
}
|
|
23329
|
-
} catch (err) {
|
|
23330
|
-
_iterator.e(err);
|
|
23331
|
-
} finally {
|
|
23332
|
-
_iterator.f();
|
|
23333
|
-
}
|
|
23334
|
-
return segments.join('+');
|
|
23335
|
-
});
|
|
23336
|
-
return unsafe ? null : result;
|
|
22899
|
+
let unsafe = false;
|
|
22900
|
+
const result = str.replace(interpolationRegexp, (match, key) => {
|
|
22901
|
+
const k = key.trim();
|
|
22902
|
+
if (UNSAFE_KEYS$1.indexOf(k) > -1) return match;
|
|
22903
|
+
const value = data[k];
|
|
22904
|
+
if (value == null) return match;
|
|
22905
|
+
const check = SAFETY_CHECK_BY_KEY[k] || isSafeLangUrlSegment;
|
|
22906
|
+
const segments = String(value).split("+");
|
|
22907
|
+
for (const seg of segments) if (!check(seg)) {
|
|
22908
|
+
unsafe = true;
|
|
22909
|
+
return match;
|
|
22910
|
+
}
|
|
22911
|
+
return segments.join("+");
|
|
22912
|
+
});
|
|
22913
|
+
if (unsafe) return null;
|
|
22914
|
+
if (LEADING_DOUBLE_SLASH.test(result) && !LEADING_DOUBLE_SLASH.test(str)) return null;
|
|
22915
|
+
return result;
|
|
23337
22916
|
}
|
|
22917
|
+
//#endregion
|
|
22918
|
+
//#region lib/request.js
|
|
22919
|
+
const g = typeof globalThis !== "undefined" ? globalThis : typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : typeof window !== "undefined" ? window : void 0;
|
|
22920
|
+
let fetchApi;
|
|
22921
|
+
if (typeof fetch === "function") fetchApi = fetch;
|
|
22922
|
+
else if (g && typeof g.fetch === "function") fetchApi = g.fetch;
|
|
22923
|
+
const XmlHttpRequestApi = hasXMLHttpRequest() && g ? g.XMLHttpRequest : void 0;
|
|
22924
|
+
const ActiveXObjectApi = typeof ActiveXObject === "function" && g ? g.ActiveXObject : void 0;
|
|
22925
|
+
const UNSAFE_KEYS = [
|
|
22926
|
+
"__proto__",
|
|
22927
|
+
"constructor",
|
|
22928
|
+
"prototype"
|
|
22929
|
+
];
|
|
22930
|
+
const addQueryString = (url, params) => {
|
|
22931
|
+
if (params && typeof params === "object") {
|
|
22932
|
+
let queryString = "";
|
|
22933
|
+
for (const paramName of Object.keys(params)) {
|
|
22934
|
+
if (UNSAFE_KEYS.indexOf(paramName) > -1) continue;
|
|
22935
|
+
queryString += "&" + encodeURIComponent(paramName) + "=" + encodeURIComponent(params[paramName]);
|
|
22936
|
+
}
|
|
22937
|
+
if (!queryString) return url;
|
|
22938
|
+
url = url + (url.indexOf("?") !== -1 ? "&" : "?") + queryString.slice(1);
|
|
22939
|
+
}
|
|
22940
|
+
return url;
|
|
22941
|
+
};
|
|
22942
|
+
const fetchIt = (url, fetchOptions, callback, altFetch) => {
|
|
22943
|
+
const resolver = (response) => {
|
|
22944
|
+
if (!response.ok) return callback(response.statusText || "Error", { status: response.status });
|
|
22945
|
+
response.text().then((data) => {
|
|
22946
|
+
callback(null, {
|
|
22947
|
+
status: response.status,
|
|
22948
|
+
data
|
|
22949
|
+
});
|
|
22950
|
+
}).catch(callback);
|
|
22951
|
+
};
|
|
22952
|
+
if (altFetch) {
|
|
22953
|
+
const altResponse = altFetch(url, fetchOptions);
|
|
22954
|
+
if (altResponse instanceof Promise) {
|
|
22955
|
+
altResponse.then(resolver).catch(callback);
|
|
22956
|
+
return;
|
|
22957
|
+
}
|
|
22958
|
+
}
|
|
22959
|
+
if (typeof fetch === "function") fetch(url, fetchOptions).then(resolver).catch(callback);
|
|
22960
|
+
else fetchApi(url, fetchOptions).then(resolver).catch(callback);
|
|
22961
|
+
};
|
|
22962
|
+
const requestWithFetch = (options, url, payload, callback) => {
|
|
22963
|
+
if (options.queryStringParams) url = addQueryString(url, options.queryStringParams);
|
|
22964
|
+
const headers = { ...typeof options.customHeaders === "function" ? options.customHeaders() : options.customHeaders };
|
|
22965
|
+
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})`;
|
|
22966
|
+
if (payload) headers["Content-Type"] = "application/json";
|
|
22967
|
+
const reqOptions = typeof options.requestOptions === "function" ? options.requestOptions(payload) : options.requestOptions;
|
|
22968
|
+
const fetchOptions = {
|
|
22969
|
+
method: payload ? "POST" : "GET",
|
|
22970
|
+
body: payload ? options.stringify(payload) : void 0,
|
|
22971
|
+
headers,
|
|
22972
|
+
...options._omitFetchOptions ? {} : reqOptions
|
|
22973
|
+
};
|
|
22974
|
+
const altFetch = typeof options.alternateFetch === "function" && options.alternateFetch.length >= 1 ? options.alternateFetch : void 0;
|
|
22975
|
+
try {
|
|
22976
|
+
fetchIt(url, fetchOptions, callback, altFetch);
|
|
22977
|
+
} catch (e) {
|
|
22978
|
+
if (!reqOptions || Object.keys(reqOptions).length === 0 || !e.message || e.message.indexOf("not implemented") < 0) return callback(e);
|
|
22979
|
+
try {
|
|
22980
|
+
Object.keys(reqOptions).forEach((opt) => {
|
|
22981
|
+
delete fetchOptions[opt];
|
|
22982
|
+
});
|
|
22983
|
+
fetchIt(url, fetchOptions, callback, altFetch);
|
|
22984
|
+
options._omitFetchOptions = true;
|
|
22985
|
+
} catch (err) {
|
|
22986
|
+
callback(err);
|
|
22987
|
+
}
|
|
22988
|
+
}
|
|
22989
|
+
};
|
|
22990
|
+
const requestWithXmlHttpRequest = (options, url, payload, callback) => {
|
|
22991
|
+
if (payload && typeof payload === "object") payload = addQueryString("", payload).slice(1);
|
|
22992
|
+
if (options.queryStringParams) url = addQueryString(url, options.queryStringParams);
|
|
22993
|
+
let completed = false;
|
|
22994
|
+
try {
|
|
22995
|
+
const x = XmlHttpRequestApi ? new XmlHttpRequestApi() : new ActiveXObjectApi("MSXML2.XMLHTTP.3.0");
|
|
22996
|
+
x.open(payload ? "POST" : "GET", url, 1);
|
|
22997
|
+
if (!options.crossDomain) x.setRequestHeader("X-Requested-With", "XMLHttpRequest");
|
|
22998
|
+
x.withCredentials = !!options.withCredentials;
|
|
22999
|
+
if (payload) x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
|
23000
|
+
if (x.overrideMimeType) x.overrideMimeType("application/json");
|
|
23001
|
+
let h = options.customHeaders;
|
|
23002
|
+
h = typeof h === "function" ? h() : h;
|
|
23003
|
+
if (h) for (const i of Object.keys(h)) {
|
|
23004
|
+
if (UNSAFE_KEYS.indexOf(i) > -1) continue;
|
|
23005
|
+
x.setRequestHeader(i, h[i]);
|
|
23006
|
+
}
|
|
23007
|
+
x.onreadystatechange = () => {
|
|
23008
|
+
if (x.readyState > 3) {
|
|
23009
|
+
completed = true;
|
|
23010
|
+
callback(x.status >= 400 ? x.statusText : null, {
|
|
23011
|
+
status: x.status,
|
|
23012
|
+
data: x.responseText
|
|
23013
|
+
});
|
|
23014
|
+
}
|
|
23015
|
+
};
|
|
23016
|
+
x.send(payload);
|
|
23017
|
+
} catch (e) {
|
|
23018
|
+
if (completed) throw e;
|
|
23019
|
+
callback(e);
|
|
23020
|
+
}
|
|
23021
|
+
};
|
|
23022
|
+
const request = (options, url, payload, callback) => {
|
|
23023
|
+
if (typeof payload === "function") {
|
|
23024
|
+
callback = payload;
|
|
23025
|
+
payload = void 0;
|
|
23026
|
+
}
|
|
23027
|
+
callback = callback || (() => {});
|
|
23028
|
+
if (fetchApi && url.indexOf("file:") !== 0) return requestWithFetch(options, url, payload, callback);
|
|
23029
|
+
if (hasXMLHttpRequest() || typeof ActiveXObject === "function") return requestWithXmlHttpRequest(options, url, payload, callback);
|
|
23030
|
+
callback(/* @__PURE__ */ new Error("No fetch and no xhr implementation found!"));
|
|
23031
|
+
};
|
|
23032
|
+
//#endregion
|
|
23033
|
+
//#region lib/index.js
|
|
23034
|
+
const getDefaults = () => {
|
|
23035
|
+
return {
|
|
23036
|
+
loadPath: "/locales/{{lng}}/{{ns}}.json",
|
|
23037
|
+
addPath: "/locales/add/{{lng}}/{{ns}}",
|
|
23038
|
+
parse: (data) => JSON.parse(data),
|
|
23039
|
+
stringify: JSON.stringify,
|
|
23040
|
+
parsePayload: (namespace, key, fallbackValue) => ({ [key]: fallbackValue || "" }),
|
|
23041
|
+
parseLoadPayload: (languages, namespaces) => void 0,
|
|
23042
|
+
request,
|
|
23043
|
+
reloadInterval: typeof window !== "undefined" ? false : 3600 * 1e3,
|
|
23044
|
+
customHeaders: {},
|
|
23045
|
+
queryStringParams: {},
|
|
23046
|
+
crossDomain: false,
|
|
23047
|
+
withCredentials: false,
|
|
23048
|
+
overrideMimeType: false,
|
|
23049
|
+
requestOptions: {
|
|
23050
|
+
mode: "cors",
|
|
23051
|
+
credentials: "same-origin",
|
|
23052
|
+
cache: "default"
|
|
23053
|
+
}
|
|
23054
|
+
};
|
|
23055
|
+
};
|
|
23056
|
+
var Backend = class {
|
|
23057
|
+
constructor(services, options = {}, allOptions = {}) {
|
|
23058
|
+
this.services = services;
|
|
23059
|
+
this.options = options;
|
|
23060
|
+
this.allOptions = allOptions;
|
|
23061
|
+
this.type = "backend";
|
|
23062
|
+
this.init(services, options, allOptions);
|
|
23063
|
+
}
|
|
23064
|
+
init(services, options = {}, allOptions = {}) {
|
|
23065
|
+
this.services = services;
|
|
23066
|
+
this.options = {
|
|
23067
|
+
...getDefaults(),
|
|
23068
|
+
...this.options || {},
|
|
23069
|
+
...options
|
|
23070
|
+
};
|
|
23071
|
+
this.allOptions = allOptions;
|
|
23072
|
+
if (this.services && this.options.reloadInterval) {
|
|
23073
|
+
const timer = setInterval(() => this.reload(), this.options.reloadInterval);
|
|
23074
|
+
if (typeof timer === "object" && typeof timer.unref === "function") timer.unref();
|
|
23075
|
+
}
|
|
23076
|
+
}
|
|
23077
|
+
readMulti(languages, namespaces, callback) {
|
|
23078
|
+
this._readAny(languages, languages, namespaces, namespaces, callback);
|
|
23079
|
+
}
|
|
23080
|
+
read(language, namespace, callback) {
|
|
23081
|
+
this._readAny([language], language, [namespace], namespace, callback);
|
|
23082
|
+
}
|
|
23083
|
+
_readAny(languages, loadUrlLanguages, namespaces, loadUrlNamespaces, callback) {
|
|
23084
|
+
let loadPath = this.options.loadPath;
|
|
23085
|
+
if (typeof this.options.loadPath === "function") loadPath = this.options.loadPath(languages, namespaces);
|
|
23086
|
+
loadPath = makePromise(loadPath);
|
|
23087
|
+
loadPath.then((resolvedLoadPath) => {
|
|
23088
|
+
if (!resolvedLoadPath) return callback(null, {});
|
|
23089
|
+
const url = interpolateUrl(resolvedLoadPath, {
|
|
23090
|
+
lng: languages.join("+"),
|
|
23091
|
+
ns: namespaces.join("+")
|
|
23092
|
+
});
|
|
23093
|
+
if (url == null) {
|
|
23094
|
+
const safeLngs = languages.map(sanitizeLogValue).join(", ");
|
|
23095
|
+
const safeNss = namespaces.map(sanitizeLogValue).join(", ");
|
|
23096
|
+
return callback(/* @__PURE__ */ new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=[" + safeLngs + "] namespaces=[" + safeNss + "]"), false);
|
|
23097
|
+
}
|
|
23098
|
+
this.loadUrl(url, callback, loadUrlLanguages, loadUrlNamespaces);
|
|
23099
|
+
}, (err) => callback(err, false));
|
|
23100
|
+
}
|
|
23101
|
+
loadUrl(url, callback, languages, namespaces) {
|
|
23102
|
+
const lng = typeof languages === "string" ? [languages] : languages;
|
|
23103
|
+
const ns = typeof namespaces === "string" ? [namespaces] : namespaces;
|
|
23104
|
+
const payload = this.options.parseLoadPayload(lng, ns);
|
|
23105
|
+
const safeUrl = sanitizeLogValue(redactUrlCredentials(url));
|
|
23106
|
+
this.options.request(this.options, url, payload, (err, res) => {
|
|
23107
|
+
if (res && (res.status >= 500 && res.status < 600 || !res.status)) return callback("failed loading " + safeUrl + "; status code: " + res.status, true);
|
|
23108
|
+
if (res && res.status >= 400 && res.status < 500) return callback("failed loading " + safeUrl + "; status code: " + res.status, false);
|
|
23109
|
+
if (!res && err && err.message) {
|
|
23110
|
+
const errorMessage = err.message.toLowerCase();
|
|
23111
|
+
if ([
|
|
23112
|
+
"failed",
|
|
23113
|
+
"fetch",
|
|
23114
|
+
"network",
|
|
23115
|
+
"load"
|
|
23116
|
+
].find((term) => errorMessage.indexOf(term) > -1)) return callback("failed loading " + safeUrl + ": " + sanitizeLogValue(err.message), true);
|
|
23117
|
+
}
|
|
23118
|
+
if (err) return callback(err, false);
|
|
23119
|
+
let ret, parseErr;
|
|
23120
|
+
try {
|
|
23121
|
+
if (typeof res.data === "string") ret = this.options.parse(res.data, languages, namespaces);
|
|
23122
|
+
else ret = res.data;
|
|
23123
|
+
} catch (e) {
|
|
23124
|
+
parseErr = "failed parsing " + safeUrl + " to json";
|
|
23125
|
+
}
|
|
23126
|
+
if (parseErr) return callback(parseErr, false);
|
|
23127
|
+
callback(null, ret);
|
|
23128
|
+
});
|
|
23129
|
+
}
|
|
23130
|
+
create(languages, namespace, key, fallbackValue, callback) {
|
|
23131
|
+
if (!this.options.addPath) return;
|
|
23132
|
+
if (typeof languages === "string") languages = [languages];
|
|
23133
|
+
const payload = this.options.parsePayload(namespace, key, fallbackValue);
|
|
23134
|
+
let finished = 0;
|
|
23135
|
+
const dataArray = [];
|
|
23136
|
+
const resArray = [];
|
|
23137
|
+
languages.forEach((lng) => {
|
|
23138
|
+
let addPath = this.options.addPath;
|
|
23139
|
+
if (typeof this.options.addPath === "function") addPath = this.options.addPath(lng, namespace);
|
|
23140
|
+
const url = interpolateUrl(addPath, {
|
|
23141
|
+
lng,
|
|
23142
|
+
ns: namespace
|
|
23143
|
+
});
|
|
23144
|
+
if (url == null) {
|
|
23145
|
+
finished += 1;
|
|
23146
|
+
if (callback && finished === languages.length) callback(dataArray, resArray);
|
|
23147
|
+
return;
|
|
23148
|
+
}
|
|
23149
|
+
this.options.request(this.options, url, payload, (data, res) => {
|
|
23150
|
+
finished += 1;
|
|
23151
|
+
dataArray.push(data);
|
|
23152
|
+
resArray.push(res);
|
|
23153
|
+
if (finished === languages.length) {
|
|
23154
|
+
if (typeof callback === "function") callback(dataArray, resArray);
|
|
23155
|
+
}
|
|
23156
|
+
});
|
|
23157
|
+
});
|
|
23158
|
+
}
|
|
23159
|
+
reload() {
|
|
23160
|
+
const { backendConnector, languageUtils, logger } = this.services;
|
|
23161
|
+
const currentLanguage = backendConnector.language;
|
|
23162
|
+
if (currentLanguage && currentLanguage.toLowerCase() === "cimode") return;
|
|
23163
|
+
const toLoad = [];
|
|
23164
|
+
const append = (lng) => {
|
|
23165
|
+
languageUtils.toResolveHierarchy(lng).forEach((l) => {
|
|
23166
|
+
if (toLoad.indexOf(l) < 0) toLoad.push(l);
|
|
23167
|
+
});
|
|
23168
|
+
};
|
|
23169
|
+
append(currentLanguage);
|
|
23170
|
+
if (this.allOptions.preload) this.allOptions.preload.forEach((l) => append(l));
|
|
23171
|
+
toLoad.forEach((lng) => {
|
|
23172
|
+
this.allOptions.ns.forEach((ns) => {
|
|
23173
|
+
backendConnector.read(lng, ns, "read", null, null, (err, data) => {
|
|
23174
|
+
if (err) logger.warn(`loading namespace ${ns} for language ${lng} failed`, err);
|
|
23175
|
+
if (!err && data) logger.log(`loaded namespace ${ns} for language ${lng}`, data);
|
|
23176
|
+
backendConnector.loaded(`${lng}|${ns}`, err, data);
|
|
23177
|
+
});
|
|
23178
|
+
});
|
|
23179
|
+
});
|
|
23180
|
+
}
|
|
23181
|
+
};
|
|
23182
|
+
Backend.type = "backend";
|
|
23183
|
+
//#endregion
|
|
23184
|
+
|
|
23185
|
+
|
|
23338
23186
|
|
|
23339
23187
|
/***/ }
|
|
23340
23188
|
|
|
@@ -23370,40 +23218,7 @@ function interpolateUrl(str, data) {
|
|
|
23370
23218
|
/******/ return module.exports;
|
|
23371
23219
|
/******/ }
|
|
23372
23220
|
/******/
|
|
23373
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
23374
|
-
/******/ __webpack_require__.m = __webpack_modules__;
|
|
23375
|
-
/******/
|
|
23376
23221
|
/************************************************************************/
|
|
23377
|
-
/******/ /* webpack/runtime/create fake namespace object */
|
|
23378
|
-
/******/ (() => {
|
|
23379
|
-
/******/ const getProto = Object.getPrototypeOf;
|
|
23380
|
-
/******/ let leafPrototypes;
|
|
23381
|
-
/******/ // create a fake namespace object
|
|
23382
|
-
/******/ // mode & 1: value is a module id, require it
|
|
23383
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
23384
|
-
/******/ // mode & 4: return value when already ns object
|
|
23385
|
-
/******/ // mode & 16: return value when it's Promise-like
|
|
23386
|
-
/******/ // mode & 8|1: behave like require
|
|
23387
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
23388
|
-
/******/ if(mode & 1) value = this(value);
|
|
23389
|
-
/******/ if(mode & 8) return value;
|
|
23390
|
-
/******/ if(typeof value === 'object' && value) {
|
|
23391
|
-
/******/ if((mode & 4) && value.__esModule) return value;
|
|
23392
|
-
/******/ if((mode & 16) && typeof value.then === 'function') return value;
|
|
23393
|
-
/******/ }
|
|
23394
|
-
/******/ const ns = Object.create(null);
|
|
23395
|
-
/******/ __webpack_require__.r(ns);
|
|
23396
|
-
/******/ const def = {};
|
|
23397
|
-
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
|
|
23398
|
-
/******/ for(var current = mode & 2 && value; (typeof current == 'object' || typeof current == 'function') && !~leafPrototypes.indexOf(current); current = getProto(current)) {
|
|
23399
|
-
/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
|
|
23400
|
-
/******/ }
|
|
23401
|
-
/******/ def['default'] = () => (value);
|
|
23402
|
-
/******/ __webpack_require__.d(ns, def);
|
|
23403
|
-
/******/ return ns;
|
|
23404
|
-
/******/ };
|
|
23405
|
-
/******/ })();
|
|
23406
|
-
/******/
|
|
23407
23222
|
/******/ /* webpack/runtime/define property getters */
|
|
23408
23223
|
/******/ // define getter/value functions for harmony exports
|
|
23409
23224
|
/******/ __webpack_require__.d = (exports, definition) => {
|
|
@@ -23414,20 +23229,6 @@ function interpolateUrl(str, data) {
|
|
|
23414
23229
|
/******/ }
|
|
23415
23230
|
/******/ };
|
|
23416
23231
|
/******/
|
|
23417
|
-
/******/ /* webpack/runtime/ensure chunk */
|
|
23418
|
-
/******/ __webpack_require__.f = {};
|
|
23419
|
-
/******/ // This file contains only the entry chunk.
|
|
23420
|
-
/******/ // The chunk loading function for additional chunks
|
|
23421
|
-
/******/ __webpack_require__.e = (chunkId) => {
|
|
23422
|
-
/******/ const promises = [];
|
|
23423
|
-
/******/ __webpack_require__.f.j(chunkId, promises);
|
|
23424
|
-
/******/ return Promise.all(promises);
|
|
23425
|
-
/******/ };
|
|
23426
|
-
/******/
|
|
23427
|
-
/******/ /* webpack/runtime/get javascript chunk filename */
|
|
23428
|
-
/******/ // This function allow to reference async chunks
|
|
23429
|
-
/******/ __webpack_require__.u = (chunkId) => (chunkId + ".bundled-tests.js");
|
|
23430
|
-
/******/
|
|
23431
23232
|
/******/ /* webpack/runtime/global */
|
|
23432
23233
|
/******/ __webpack_require__.g = (function() {
|
|
23433
23234
|
/******/ if (typeof globalThis === 'object') return globalThis;
|
|
@@ -23441,51 +23242,6 @@ function interpolateUrl(str, data) {
|
|
|
23441
23242
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
23442
23243
|
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
|
|
23443
23244
|
/******/
|
|
23444
|
-
/******/ /* webpack/runtime/load script */
|
|
23445
|
-
/******/ (() => {
|
|
23446
|
-
/******/ const inProgress = {};
|
|
23447
|
-
/******/ const dataWebpackPrefix = "@itwin/core-i18n:";
|
|
23448
|
-
/******/ // loadScript function to load a script via script tag
|
|
23449
|
-
/******/ __webpack_require__.l = (url, done, key, chunkId) => {
|
|
23450
|
-
/******/ if(inProgress[url]) { inProgress[url].push(done); return; }
|
|
23451
|
-
/******/ let script, needAttach;
|
|
23452
|
-
/******/ if(key !== undefined) {
|
|
23453
|
-
/******/ const scripts = document.getElementsByTagName("script");
|
|
23454
|
-
/******/ for(var i = 0; i < scripts.length; i++) {
|
|
23455
|
-
/******/ const s = scripts[i];
|
|
23456
|
-
/******/ if(s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) { script = s; break; }
|
|
23457
|
-
/******/ }
|
|
23458
|
-
/******/ }
|
|
23459
|
-
/******/ if(!script) {
|
|
23460
|
-
/******/ needAttach = true;
|
|
23461
|
-
/******/ script = document.createElement('script');
|
|
23462
|
-
/******/
|
|
23463
|
-
/******/ script.charset = 'utf-8';
|
|
23464
|
-
/******/ if (__webpack_require__.nc) {
|
|
23465
|
-
/******/ script.setAttribute("nonce", __webpack_require__.nc);
|
|
23466
|
-
/******/ }
|
|
23467
|
-
/******/ script.setAttribute("data-webpack", dataWebpackPrefix + key);
|
|
23468
|
-
/******/
|
|
23469
|
-
/******/ script.src = url;
|
|
23470
|
-
/******/ }
|
|
23471
|
-
/******/ inProgress[url] = [done];
|
|
23472
|
-
/******/ const onScriptComplete = (prev, event) => {
|
|
23473
|
-
/******/ // avoid mem leaks in IE.
|
|
23474
|
-
/******/ script.onerror = script.onload = null;
|
|
23475
|
-
/******/ clearTimeout(timeout);
|
|
23476
|
-
/******/ const doneFns = inProgress[url];
|
|
23477
|
-
/******/ delete inProgress[url];
|
|
23478
|
-
/******/ script.parentNode?.removeChild(script);
|
|
23479
|
-
/******/ doneFns?.forEach((fn) => (fn(event)));
|
|
23480
|
-
/******/ if(prev) return prev(event);
|
|
23481
|
-
/******/ }
|
|
23482
|
-
/******/ const timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
|
|
23483
|
-
/******/ script.onerror = onScriptComplete.bind(null, script.onerror);
|
|
23484
|
-
/******/ script.onload = onScriptComplete.bind(null, script.onload);
|
|
23485
|
-
/******/ needAttach && document.head.appendChild(script);
|
|
23486
|
-
/******/ };
|
|
23487
|
-
/******/ })();
|
|
23488
|
-
/******/
|
|
23489
23245
|
/******/ /* webpack/runtime/make namespace object */
|
|
23490
23246
|
/******/ // define __esModule on exports
|
|
23491
23247
|
/******/ __webpack_require__.r = (exports) => {
|
|
@@ -23493,118 +23249,6 @@ function interpolateUrl(str, data) {
|
|
|
23493
23249
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
23494
23250
|
/******/ };
|
|
23495
23251
|
/******/
|
|
23496
|
-
/******/ /* webpack/runtime/publicPath */
|
|
23497
|
-
/******/ (() => {
|
|
23498
|
-
/******/ let scriptUrl;
|
|
23499
|
-
/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
|
|
23500
|
-
/******/ const document = __webpack_require__.g.document;
|
|
23501
|
-
/******/ if (!scriptUrl && document) {
|
|
23502
|
-
/******/ if (document.currentScript?.tagName.toUpperCase() === 'SCRIPT')
|
|
23503
|
-
/******/ scriptUrl = document.currentScript.src;
|
|
23504
|
-
/******/ if (!scriptUrl) {
|
|
23505
|
-
/******/ const scripts = document.getElementsByTagName("script");
|
|
23506
|
-
/******/ if(scripts.length) {
|
|
23507
|
-
/******/ let i = scripts.length - 1;
|
|
23508
|
-
/******/ while (i > -1 && (!scriptUrl || !/^https?:/.test(scriptUrl))) scriptUrl = scripts[i--].src;
|
|
23509
|
-
/******/ }
|
|
23510
|
-
/******/ }
|
|
23511
|
-
/******/ }
|
|
23512
|
-
/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
|
|
23513
|
-
/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
|
|
23514
|
-
/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
|
|
23515
|
-
/******/ scriptUrl = scriptUrl.replace(/^blob:|[?#].*$/g, "").replace(/\/[^/]+$/, "/");
|
|
23516
|
-
/******/ __webpack_require__.p = scriptUrl;
|
|
23517
|
-
/******/ })();
|
|
23518
|
-
/******/
|
|
23519
|
-
/******/ /* webpack/runtime/jsonp chunk loading */
|
|
23520
|
-
/******/ (() => {
|
|
23521
|
-
/******/ // no baseURI
|
|
23522
|
-
/******/
|
|
23523
|
-
/******/ // object to store loaded and loading chunks
|
|
23524
|
-
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
23525
|
-
/******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
|
|
23526
|
-
/******/ const installedChunks = {
|
|
23527
|
-
/******/ "main": 0
|
|
23528
|
-
/******/ };
|
|
23529
|
-
/******/
|
|
23530
|
-
/******/ __webpack_require__.f.j = (chunkId, promises) => {
|
|
23531
|
-
/******/ // JSONP chunk loading for javascript
|
|
23532
|
-
/******/ let installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
|
|
23533
|
-
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
|
|
23534
|
-
/******/
|
|
23535
|
-
/******/ // a Promise means "currently loading".
|
|
23536
|
-
/******/ if(installedChunkData) {
|
|
23537
|
-
/******/ promises.push(installedChunkData[2]);
|
|
23538
|
-
/******/ } else {
|
|
23539
|
-
/******/ if(true) { // all chunks have JS
|
|
23540
|
-
/******/ // setup Promise in chunk cache
|
|
23541
|
-
/******/ const promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
|
|
23542
|
-
/******/ promises.push(installedChunkData[2] = promise);
|
|
23543
|
-
/******/
|
|
23544
|
-
/******/ // create error before stack unwound to get useful stacktrace later
|
|
23545
|
-
/******/ const error = new Error();
|
|
23546
|
-
/******/ const loadingEnded = (event) => {
|
|
23547
|
-
/******/ if(__webpack_require__.o(installedChunks, chunkId)) {
|
|
23548
|
-
/******/ installedChunkData = installedChunks[chunkId];
|
|
23549
|
-
/******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
|
|
23550
|
-
/******/ if(installedChunkData) {
|
|
23551
|
-
/******/ const errorType = event && (event.type === 'load' ? 'missing' : event.type);
|
|
23552
|
-
/******/ const realSrc = event && event.target && event.target.src;
|
|
23553
|
-
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
|
|
23554
|
-
/******/ error.name = 'ChunkLoadError';
|
|
23555
|
-
/******/ error.type = errorType;
|
|
23556
|
-
/******/ error.request = realSrc;
|
|
23557
|
-
/******/ error.event = event;
|
|
23558
|
-
/******/ installedChunkData[1](error);
|
|
23559
|
-
/******/ }
|
|
23560
|
-
/******/ }
|
|
23561
|
-
/******/ };
|
|
23562
|
-
/******/ __webpack_require__.l(__webpack_require__.p + __webpack_require__.u(chunkId), loadingEnded, "chunk-" + chunkId, chunkId);
|
|
23563
|
-
/******/ }
|
|
23564
|
-
/******/ }
|
|
23565
|
-
/******/ }
|
|
23566
|
-
/******/ };
|
|
23567
|
-
/******/
|
|
23568
|
-
/******/ // no prefetching
|
|
23569
|
-
/******/
|
|
23570
|
-
/******/ // no preloaded
|
|
23571
|
-
/******/
|
|
23572
|
-
/******/ // no HMR
|
|
23573
|
-
/******/
|
|
23574
|
-
/******/ // no HMR manifest
|
|
23575
|
-
/******/
|
|
23576
|
-
/******/ // no on chunks loaded
|
|
23577
|
-
/******/
|
|
23578
|
-
/******/ // install a JSONP callback for chunk loading
|
|
23579
|
-
/******/ const webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
|
|
23580
|
-
/******/ let [chunkIds, moreModules, runtime] = data;
|
|
23581
|
-
/******/ // add "moreModules" to the modules object,
|
|
23582
|
-
/******/ // then flag all "chunkIds" as loaded and fire callback
|
|
23583
|
-
/******/ var moduleId, chunkId, i = 0;
|
|
23584
|
-
/******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
|
|
23585
|
-
/******/ for(moduleId in moreModules) {
|
|
23586
|
-
/******/ if(__webpack_require__.o(moreModules, moduleId)) {
|
|
23587
|
-
/******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
|
|
23588
|
-
/******/ }
|
|
23589
|
-
/******/ }
|
|
23590
|
-
/******/ if(runtime) var result = runtime(__webpack_require__);
|
|
23591
|
-
/******/ }
|
|
23592
|
-
/******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
|
|
23593
|
-
/******/ for(;i < chunkIds.length; i++) {
|
|
23594
|
-
/******/ chunkId = chunkIds[i];
|
|
23595
|
-
/******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
|
|
23596
|
-
/******/ installedChunks[chunkId][0]();
|
|
23597
|
-
/******/ }
|
|
23598
|
-
/******/ installedChunks[chunkId] = 0;
|
|
23599
|
-
/******/ }
|
|
23600
|
-
/******/
|
|
23601
|
-
/******/ }
|
|
23602
|
-
/******/
|
|
23603
|
-
/******/ const chunkLoadingGlobal = self["webpackChunk_itwin_core_i18n"] = self["webpackChunk_itwin_core_i18n"] || [];
|
|
23604
|
-
/******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
|
|
23605
|
-
/******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
|
|
23606
|
-
/******/ })();
|
|
23607
|
-
/******/
|
|
23608
23252
|
/************************************************************************/
|
|
23609
23253
|
let __webpack_exports__ = {};
|
|
23610
23254
|
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
|