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