@kontent-ai/delivery-sdk 14.4.0 → 14.5.0

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.
@@ -5398,7 +5398,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
5398
5398
  exports.sdkInfo = void 0;
5399
5399
  exports.sdkInfo = {
5400
5400
  host: 'npmjs.com',
5401
- version: '14.4.0',
5401
+ version: '14.5.0',
5402
5402
  name: '@kontent-ai/delivery-sdk'
5403
5403
  };
5404
5404
 
@@ -7500,7 +7500,7 @@ for (let i = 0; i < 256; ++i) {
7500
7500
  function unsafeStringify(arr, offset = 0) {
7501
7501
  // Note: Be careful editing this code! It's been tuned for performance
7502
7502
  // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
7503
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
7503
+ return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
7504
7504
  }
7505
7505
 
7506
7506
  function stringify(arr, offset = 0) {
@@ -7910,7 +7910,7 @@ const knownAdapters = {
7910
7910
  }
7911
7911
 
7912
7912
  _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(knownAdapters, (fn, value) => {
7913
- if(fn) {
7913
+ if (fn) {
7914
7914
  try {
7915
7915
  Object.defineProperty(fn, 'name', {value});
7916
7916
  } catch (e) {
@@ -7920,6 +7920,10 @@ _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(knownAdapters, (fn, va
7920
7920
  }
7921
7921
  });
7922
7922
 
7923
+ const renderReason = (reason) => `- ${reason}`;
7924
+
7925
+ const isResolvedHandle = (adapter) => _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isFunction(adapter) || adapter === null || adapter === false;
7926
+
7923
7927
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
7924
7928
  getAdapter: (adapters) => {
7925
7929
  adapters = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isArray(adapters) ? adapters : [adapters];
@@ -7928,30 +7932,44 @@ _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].forEach(knownAdapters, (fn, va
7928
7932
  let nameOrAdapter;
7929
7933
  let adapter;
7930
7934
 
7935
+ const rejectedReasons = {};
7936
+
7931
7937
  for (let i = 0; i < length; i++) {
7932
7938
  nameOrAdapter = adapters[i];
7933
- if((adapter = _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter)) {
7939
+ let id;
7940
+
7941
+ adapter = nameOrAdapter;
7942
+
7943
+ if (!isResolvedHandle(nameOrAdapter)) {
7944
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
7945
+
7946
+ if (adapter === undefined) {
7947
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](`Unknown adapter '${id}'`);
7948
+ }
7949
+ }
7950
+
7951
+ if (adapter) {
7934
7952
  break;
7935
7953
  }
7954
+
7955
+ rejectedReasons[id || '#' + i] = adapter;
7936
7956
  }
7937
7957
 
7938
7958
  if (!adapter) {
7939
- if (adapter === false) {
7940
- throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
7941
- `Adapter ${nameOrAdapter} is not supported by the environment`,
7942
- 'ERR_NOT_SUPPORT'
7959
+
7960
+ const reasons = Object.entries(rejectedReasons)
7961
+ .map(([id, state]) => `adapter ${id} ` +
7962
+ (state === false ? 'is not supported by the environment' : 'is not available in the build')
7943
7963
  );
7944
- }
7945
7964
 
7946
- throw new Error(
7947
- _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].hasOwnProp(knownAdapters, nameOrAdapter) ?
7948
- `Adapter '${nameOrAdapter}' is not available in the build` :
7949
- `Unknown adapter '${nameOrAdapter}'`
7950
- );
7951
- }
7965
+ let s = length ?
7966
+ (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
7967
+ 'as no adapter specified';
7952
7968
 
7953
- if (!_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isFunction(adapter)) {
7954
- throw new TypeError('adapter is not a function');
7969
+ throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_3__["default"](
7970
+ `There is no suitable adapter to dispatch the request ` + s,
7971
+ 'ERR_NOT_SUPPORT'
7972
+ );
7955
7973
  }
7956
7974
 
7957
7975
  return adapter;
@@ -7982,7 +8000,7 @@ __webpack_require__.r(__webpack_exports__);
7982
8000
  /* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/AxiosError.js */ "./node_modules/axios/lib/core/AxiosError.js");
7983
8001
  /* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../cancel/CanceledError.js */ "./node_modules/axios/lib/cancel/CanceledError.js");
7984
8002
  /* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../helpers/parseProtocol.js */ "./node_modules/axios/lib/helpers/parseProtocol.js");
7985
- /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/browser/index.js");
8003
+ /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
7986
8004
  /* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
7987
8005
  /* harmony import */ var _helpers_speedometer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/speedometer.js */ "./node_modules/axios/lib/helpers/speedometer.js");
7988
8006
 
@@ -8036,7 +8054,7 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
8036
8054
  return new Promise(function dispatchXhrRequest(resolve, reject) {
8037
8055
  let requestData = config.data;
8038
8056
  const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__["default"].from(config.headers).normalize();
8039
- const responseType = config.responseType;
8057
+ let {responseType, withXSRFToken} = config;
8040
8058
  let onCanceled;
8041
8059
  function done() {
8042
8060
  if (config.cancelToken) {
@@ -8048,11 +8066,15 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
8048
8066
  }
8049
8067
  }
8050
8068
 
8069
+ let contentType;
8070
+
8051
8071
  if (_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isFormData(requestData)) {
8052
- if (_platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].isStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].isStandardBrowserWebWorkerEnv) {
8072
+ if (_platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].hasStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].hasStandardBrowserWebWorkerEnv) {
8053
8073
  requestHeaders.setContentType(false); // Let the browser set it
8054
- } else {
8055
- requestHeaders.setContentType('multipart/form-data;', false); // mobile/desktop app frameworks
8074
+ } else if ((contentType = requestHeaders.getContentType()) !== false) {
8075
+ // fix semicolon duplication issue for ReactNative FormData implementation
8076
+ const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
8077
+ requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
8056
8078
  }
8057
8079
  }
8058
8080
 
@@ -8168,13 +8190,16 @@ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
8168
8190
  // Add xsrf header
8169
8191
  // This is only done if running in a standard browser environment.
8170
8192
  // Specifically not if we're in a web worker, or react-native.
8171
- if (_platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].isStandardBrowserEnv) {
8172
- // Add xsrf header
8173
- const xsrfValue = (config.withCredentials || (0,_helpers_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_9__["default"])(fullPath))
8174
- && config.xsrfCookieName && _helpers_cookies_js__WEBPACK_IMPORTED_MODULE_10__["default"].read(config.xsrfCookieName);
8193
+ if(_platform_index_js__WEBPACK_IMPORTED_MODULE_3__["default"].hasStandardBrowserEnv) {
8194
+ withXSRFToken && _utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
8195
+
8196
+ if (withXSRFToken || (withXSRFToken !== false && (0,_helpers_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_9__["default"])(fullPath))) {
8197
+ // Add xsrf header
8198
+ const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && _helpers_cookies_js__WEBPACK_IMPORTED_MODULE_10__["default"].read(config.xsrfCookieName);
8175
8199
 
8176
- if (xsrfValue) {
8177
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
8200
+ if (xsrfValue) {
8201
+ requestHeaders.set(config.xsrfHeaderName, xsrfValue);
8202
+ }
8178
8203
  }
8179
8204
  }
8180
8205
 
@@ -8267,7 +8292,9 @@ __webpack_require__.r(__webpack_exports__);
8267
8292
  /* harmony import */ var _helpers_spread_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./helpers/spread.js */ "./node_modules/axios/lib/helpers/spread.js");
8268
8293
  /* harmony import */ var _helpers_isAxiosError_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./helpers/isAxiosError.js */ "./node_modules/axios/lib/helpers/isAxiosError.js");
8269
8294
  /* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./core/AxiosHeaders.js */ "./node_modules/axios/lib/core/AxiosHeaders.js");
8270
- /* harmony import */ var _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./helpers/HttpStatusCode.js */ "./node_modules/axios/lib/helpers/HttpStatusCode.js");
8295
+ /* harmony import */ var _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./adapters/adapters.js */ "./node_modules/axios/lib/adapters/adapters.js");
8296
+ /* harmony import */ var _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./helpers/HttpStatusCode.js */ "./node_modules/axios/lib/helpers/HttpStatusCode.js");
8297
+
8271
8298
 
8272
8299
 
8273
8300
 
@@ -8348,7 +8375,9 @@ axios.AxiosHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_13__["defaul
8348
8375
 
8349
8376
  axios.formToJSON = thing => (0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_14__["default"])(_utils_js__WEBPACK_IMPORTED_MODULE_2__["default"].isHTMLForm(thing) ? new FormData(thing) : thing);
8350
8377
 
8351
- axios.HttpStatusCode = _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_15__["default"];
8378
+ axios.getAdapter = _adapters_adapters_js__WEBPACK_IMPORTED_MODULE_15__["default"].getAdapter;
8379
+
8380
+ axios.HttpStatusCode = _helpers_HttpStatusCode_js__WEBPACK_IMPORTED_MODULE_16__["default"];
8352
8381
 
8353
8382
  axios.default = axios;
8354
8383
 
@@ -8647,15 +8676,13 @@ class Axios {
8647
8676
  // Set config.method
8648
8677
  config.method = (config.method || this.defaults.method || 'get').toLowerCase();
8649
8678
 
8650
- let contextHeaders;
8651
-
8652
8679
  // Flatten headers
8653
- contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].merge(
8680
+ let contextHeaders = headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].merge(
8654
8681
  headers.common,
8655
8682
  headers[config.method]
8656
8683
  );
8657
8684
 
8658
- contextHeaders && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(
8685
+ headers && _utils_js__WEBPACK_IMPORTED_MODULE_3__["default"].forEach(
8659
8686
  ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
8660
8687
  (method) => {
8661
8688
  delete headers[method];
@@ -9190,7 +9217,17 @@ class AxiosHeaders {
9190
9217
 
9191
9218
  AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
9192
9219
 
9193
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].freezeMethods(AxiosHeaders.prototype);
9220
+ // reserved names hotfix
9221
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
9222
+ let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
9223
+ return {
9224
+ get: () => value,
9225
+ set(headerValue) {
9226
+ this[mapped] = headerValue;
9227
+ }
9228
+ }
9229
+ });
9230
+
9194
9231
  _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].freezeMethods(AxiosHeaders);
9195
9232
 
9196
9233
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AxiosHeaders);
@@ -9511,6 +9548,7 @@ function mergeConfig(config1, config2) {
9511
9548
  timeout: defaultToConfig2,
9512
9549
  timeoutMessage: defaultToConfig2,
9513
9550
  withCredentials: defaultToConfig2,
9551
+ withXSRFToken: defaultToConfig2,
9514
9552
  adapter: defaultToConfig2,
9515
9553
  responseType: defaultToConfig2,
9516
9554
  xsrfCookieName: defaultToConfig2,
@@ -9645,7 +9683,7 @@ __webpack_require__.r(__webpack_exports__);
9645
9683
  /* harmony import */ var _transitional_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transitional.js */ "./node_modules/axios/lib/defaults/transitional.js");
9646
9684
  /* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js");
9647
9685
  /* harmony import */ var _helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/toURLEncodedForm.js */ "./node_modules/axios/lib/helpers/toURLEncodedForm.js");
9648
- /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/browser/index.js");
9686
+ /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
9649
9687
  /* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers/formDataToJSON.js */ "./node_modules/axios/lib/helpers/formDataToJSON.js");
9650
9688
 
9651
9689
 
@@ -9657,10 +9695,6 @@ __webpack_require__.r(__webpack_exports__);
9657
9695
 
9658
9696
 
9659
9697
 
9660
- const DEFAULT_CONTENT_TYPE = {
9661
- 'Content-Type': undefined
9662
- };
9663
-
9664
9698
  /**
9665
9699
  * It takes a string, tries to parse it, and if it fails, it returns the stringified version
9666
9700
  * of the input
@@ -9799,19 +9833,16 @@ const defaults = {
9799
9833
 
9800
9834
  headers: {
9801
9835
  common: {
9802
- 'Accept': 'application/json, text/plain, */*'
9836
+ 'Accept': 'application/json, text/plain, */*',
9837
+ 'Content-Type': undefined
9803
9838
  }
9804
9839
  }
9805
9840
  };
9806
9841
 
9807
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
9842
+ _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
9808
9843
  defaults.headers[method] = {};
9809
9844
  });
9810
9845
 
9811
- _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
9812
- defaults.headers[method] = _utils_js__WEBPACK_IMPORTED_MODULE_0__["default"].merge(DEFAULT_CONTENT_TYPE);
9813
- });
9814
-
9815
9846
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (defaults);
9816
9847
 
9817
9848
 
@@ -9848,7 +9879,7 @@ __webpack_require__.r(__webpack_exports__);
9848
9879
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9849
9880
  /* harmony export */ VERSION: () => (/* binding */ VERSION)
9850
9881
  /* harmony export */ });
9851
- const VERSION = "1.4.0";
9882
+ const VERSION = "1.6.2";
9852
9883
 
9853
9884
  /***/ }),
9854
9885
 
@@ -10150,59 +10181,49 @@ __webpack_require__.r(__webpack_exports__);
10150
10181
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
10151
10182
  /* harmony export */ });
10152
10183
  /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");
10153
- /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/browser/index.js");
10184
+ /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
10154
10185
 
10155
10186
 
10156
10187
 
10188
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ?
10157
10189
 
10190
+ // Standard browser envs support document.cookie
10191
+ {
10192
+ write(name, value, expires, path, domain, secure) {
10193
+ const cookie = [name + '=' + encodeURIComponent(value)];
10158
10194
 
10159
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStandardBrowserEnv ?
10195
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
10160
10196
 
10161
- // Standard browser envs support document.cookie
10162
- (function standardBrowserEnv() {
10163
- return {
10164
- write: function write(name, value, expires, path, domain, secure) {
10165
- const cookie = [];
10166
- cookie.push(name + '=' + encodeURIComponent(value));
10197
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(path) && cookie.push('path=' + path);
10167
10198
 
10168
- if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isNumber(expires)) {
10169
- cookie.push('expires=' + new Date(expires).toGMTString());
10170
- }
10199
+ _utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(domain) && cookie.push('domain=' + domain);
10171
10200
 
10172
- if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(path)) {
10173
- cookie.push('path=' + path);
10174
- }
10201
+ secure === true && cookie.push('secure');
10175
10202
 
10176
- if (_utils_js__WEBPACK_IMPORTED_MODULE_1__["default"].isString(domain)) {
10177
- cookie.push('domain=' + domain);
10178
- }
10203
+ document.cookie = cookie.join('; ');
10204
+ },
10179
10205
 
10180
- if (secure === true) {
10181
- cookie.push('secure');
10182
- }
10206
+ read(name) {
10207
+ const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
10208
+ return (match ? decodeURIComponent(match[3]) : null);
10209
+ },
10183
10210
 
10184
- document.cookie = cookie.join('; ');
10185
- },
10211
+ remove(name) {
10212
+ this.write(name, '', Date.now() - 86400000);
10213
+ }
10214
+ }
10186
10215
 
10187
- read: function read(name) {
10188
- const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
10189
- return (match ? decodeURIComponent(match[3]) : null);
10190
- },
10216
+ :
10191
10217
 
10192
- remove: function remove(name) {
10193
- this.write(name, '', Date.now() - 86400000);
10194
- }
10195
- };
10196
- })() :
10218
+ // Non-standard browser env (web workers, react-native) lack needed support.
10219
+ {
10220
+ write() {},
10221
+ read() {
10222
+ return null;
10223
+ },
10224
+ remove() {}
10225
+ });
10197
10226
 
10198
- // Non standard browser env (web workers, react-native) lack needed support.
10199
- (function nonStandardBrowserEnv() {
10200
- return {
10201
- write: function write() {},
10202
- read: function read() { return null; },
10203
- remove: function remove() {}
10204
- };
10205
- })());
10206
10227
 
10207
10228
 
10208
10229
  /***/ }),
@@ -10383,13 +10404,13 @@ __webpack_require__.r(__webpack_exports__);
10383
10404
  /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
10384
10405
  /* harmony export */ });
10385
10406
  /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ "./node_modules/axios/lib/utils.js");
10386
- /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/browser/index.js");
10407
+ /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
10387
10408
 
10388
10409
 
10389
10410
 
10390
10411
 
10391
10412
 
10392
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].isStandardBrowserEnv ?
10413
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__["default"].hasStandardBrowserEnv ?
10393
10414
 
10394
10415
  // Standard browser envs have full support of the APIs needed to test
10395
10416
  // whether the request URL is of the same origin as current location.
@@ -10399,7 +10420,7 @@ __webpack_require__.r(__webpack_exports__);
10399
10420
  let originURL;
10400
10421
 
10401
10422
  /**
10402
- * Parse a URL to discover it's components
10423
+ * Parse a URL to discover its components
10403
10424
  *
10404
10425
  * @param {String} url The URL to be parsed
10405
10426
  * @returns {Object}
@@ -10920,7 +10941,7 @@ __webpack_require__.r(__webpack_exports__);
10920
10941
  /* harmony export */ });
10921
10942
  /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/axios/lib/utils.js");
10922
10943
  /* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ "./node_modules/axios/lib/helpers/toFormData.js");
10923
- /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/browser/index.js");
10944
+ /* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ "./node_modules/axios/lib/platform/index.js");
10924
10945
 
10925
10946
 
10926
10947
 
@@ -11120,6 +11141,33 @@ __webpack_require__.r(__webpack_exports__);
11120
11141
 
11121
11142
 
11122
11143
 
11144
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
11145
+ isBrowser: true,
11146
+ classes: {
11147
+ URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"],
11148
+ FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"],
11149
+ Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"]
11150
+ },
11151
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
11152
+ });
11153
+
11154
+
11155
+ /***/ }),
11156
+
11157
+ /***/ "./node_modules/axios/lib/platform/common/utils.js":
11158
+ /*!*********************************************************!*\
11159
+ !*** ./node_modules/axios/lib/platform/common/utils.js ***!
11160
+ \*********************************************************/
11161
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11162
+
11163
+ __webpack_require__.r(__webpack_exports__);
11164
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11165
+ /* harmony export */ hasBrowserEnv: () => (/* binding */ hasBrowserEnv),
11166
+ /* harmony export */ hasStandardBrowserEnv: () => (/* binding */ hasStandardBrowserEnv),
11167
+ /* harmony export */ hasStandardBrowserWebWorkerEnv: () => (/* binding */ hasStandardBrowserWebWorkerEnv)
11168
+ /* harmony export */ });
11169
+ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
11170
+
11123
11171
  /**
11124
11172
  * Determine if we're running in a standard browser environment
11125
11173
  *
@@ -11137,18 +11185,10 @@ __webpack_require__.r(__webpack_exports__);
11137
11185
  *
11138
11186
  * @returns {boolean}
11139
11187
  */
11140
- const isStandardBrowserEnv = (() => {
11141
- let product;
11142
- if (typeof navigator !== 'undefined' && (
11143
- (product = navigator.product) === 'ReactNative' ||
11144
- product === 'NativeScript' ||
11145
- product === 'NS')
11146
- ) {
11147
- return false;
11148
- }
11149
-
11150
- return typeof window !== 'undefined' && typeof document !== 'undefined';
11151
- })();
11188
+ const hasStandardBrowserEnv = (
11189
+ (product) => {
11190
+ return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
11191
+ })(typeof navigator !== 'undefined' && navigator.product);
11152
11192
 
11153
11193
  /**
11154
11194
  * Determine if we're running in a standard browser webWorker environment
@@ -11159,7 +11199,7 @@ const isStandardBrowserEnv = (() => {
11159
11199
  * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
11160
11200
  * This leads to a problem when axios post `FormData` in webWorker
11161
11201
  */
11162
- const isStandardBrowserWebWorkerEnv = (() => {
11202
+ const hasStandardBrowserWebWorkerEnv = (() => {
11163
11203
  return (
11164
11204
  typeof WorkerGlobalScope !== 'undefined' &&
11165
11205
  // eslint-disable-next-line no-undef
@@ -11169,16 +11209,28 @@ const isStandardBrowserEnv = (() => {
11169
11209
  })();
11170
11210
 
11171
11211
 
11212
+
11213
+
11214
+ /***/ }),
11215
+
11216
+ /***/ "./node_modules/axios/lib/platform/index.js":
11217
+ /*!**************************************************!*\
11218
+ !*** ./node_modules/axios/lib/platform/index.js ***!
11219
+ \**************************************************/
11220
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
11221
+
11222
+ __webpack_require__.r(__webpack_exports__);
11223
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11224
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
11225
+ /* harmony export */ });
11226
+ /* harmony import */ var _node_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node/index.js */ "./node_modules/axios/lib/platform/browser/index.js");
11227
+ /* harmony import */ var _common_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/utils.js */ "./node_modules/axios/lib/platform/common/utils.js");
11228
+
11229
+
11230
+
11172
11231
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
11173
- isBrowser: true,
11174
- classes: {
11175
- URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__["default"],
11176
- FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__["default"],
11177
- Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__["default"]
11178
- },
11179
- isStandardBrowserEnv,
11180
- isStandardBrowserWebWorkerEnv,
11181
- protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
11232
+ ..._common_utils_js__WEBPACK_IMPORTED_MODULE_0__,
11233
+ ..._node_index_js__WEBPACK_IMPORTED_MODULE_1__["default"]
11182
11234
  });
11183
11235
 
11184
11236
 
@@ -11737,8 +11789,9 @@ const reduceDescriptors = (obj, reducer) => {
11737
11789
  const reducedDescriptors = {};
11738
11790
 
11739
11791
  forEach(descriptors, (descriptor, name) => {
11740
- if (reducer(descriptor, name, obj) !== false) {
11741
- reducedDescriptors[name] = descriptor;
11792
+ let ret;
11793
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
11794
+ reducedDescriptors[name] = ret || descriptor;
11742
11795
  }
11743
11796
  });
11744
11797