contentful 10.6.14 → 10.6.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.
|
@@ -318,7 +318,7 @@ eval("\n\nvar GetIntrinsic = __webpack_require__(/*! get-intrinsic */ \"../node_
|
|
|
318
318
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
319
319
|
|
|
320
320
|
"use strict";
|
|
321
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createClient: function() { return /* binding */ createClient; }\n/* harmony export */ });\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! axios */ \"../node_modules/axios/lib/axios.js\");\n/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ \"../node_modules/contentful-sdk-core/dist/index.es-modules.js\");\n/* harmony import */ var _create_global_options__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./create-global-options */ \"./create-global-options.ts\");\n/* harmony import */ var _make_client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./make-client */ \"./make-client.ts\");\n/* harmony import */ var _utils_validate_params__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/validate-params */ \"./utils/validate-params.ts\");\n/**\n * Contentful Delivery API SDK. Allows you to create instances of a client\n * with access to the Contentful Content Delivery API.\n */\n\n\n\n\n\n/**\n * Create a client instance\n * @param params - Client initialization parameters\n * @category Client\n * @example\n * ```typescript\n * const contentful = require('contentful')\n * const client = contentful.createClient({\n * accessToken: 'myAccessToken',\n * space: 'mySpaceId'\n * })\n * ```\n */\nfunction createClient(params) {\n if (!params.accessToken) {\n throw new TypeError('Expected parameter accessToken');\n }\n if (!params.space) {\n throw new TypeError('Expected parameter space');\n }\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_3__.validateResolveLinksParam)(params);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_3__.validateRemoveUnresolvedParam)(params);\n const defaultConfig = {\n resolveLinks: true,\n removeUnresolved: false,\n defaultHostname: 'cdn.contentful.com',\n environment: 'master',\n };\n const config = {\n ...defaultConfig,\n ...params,\n };\n const userAgentHeader = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(`contentful.js/${\"10.6.
|
|
321
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createClient: function() { return /* binding */ createClient; }\n/* harmony export */ });\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! axios */ \"../node_modules/axios/lib/axios.js\");\n/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ \"../node_modules/contentful-sdk-core/dist/index.es-modules.js\");\n/* harmony import */ var _create_global_options__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./create-global-options */ \"./create-global-options.ts\");\n/* harmony import */ var _make_client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./make-client */ \"./make-client.ts\");\n/* harmony import */ var _utils_validate_params__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/validate-params */ \"./utils/validate-params.ts\");\n/**\n * Contentful Delivery API SDK. Allows you to create instances of a client\n * with access to the Contentful Content Delivery API.\n */\n\n\n\n\n\n/**\n * Create a client instance\n * @param params - Client initialization parameters\n * @category Client\n * @example\n * ```typescript\n * const contentful = require('contentful')\n * const client = contentful.createClient({\n * accessToken: 'myAccessToken',\n * space: 'mySpaceId'\n * })\n * ```\n */\nfunction createClient(params) {\n if (!params.accessToken) {\n throw new TypeError('Expected parameter accessToken');\n }\n if (!params.space) {\n throw new TypeError('Expected parameter space');\n }\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_3__.validateResolveLinksParam)(params);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_3__.validateRemoveUnresolvedParam)(params);\n const defaultConfig = {\n resolveLinks: true,\n removeUnresolved: false,\n defaultHostname: 'cdn.contentful.com',\n environment: 'master',\n };\n const config = {\n ...defaultConfig,\n ...params,\n };\n const userAgentHeader = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.getUserAgentHeader)(`contentful.js/${\"10.6.16\"}`, config.application, config.integration);\n config.headers = {\n ...config.headers,\n 'Content-Type': 'application/vnd.contentful.delivery.v1+json',\n 'X-Contentful-User-Agent': userAgentHeader,\n };\n const http = (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createHttpClient)(axios__WEBPACK_IMPORTED_MODULE_4__[\"default\"], config);\n if (!http.defaults.baseURL) {\n throw new Error('Please define a baseURL');\n }\n const getGlobalOptions = (0,_create_global_options__WEBPACK_IMPORTED_MODULE_1__.createGlobalOptions)({\n space: config.space,\n environment: config.environment,\n spaceBaseUrl: http.defaults.baseURL,\n environmentBaseUrl: `${http.defaults.baseURL}environments/${config.environment}`,\n });\n // Append environment to baseURL\n http.defaults.baseURL = getGlobalOptions({}).environmentBaseUrl;\n return (0,_make_client__WEBPACK_IMPORTED_MODULE_2__.makeClient)({\n http,\n getGlobalOptions,\n });\n}\n\n\n//# sourceURL=webpack://contentful/./contentful.ts?");
|
|
322
322
|
|
|
323
323
|
/***/ }),
|
|
324
324
|
|
|
@@ -329,7 +329,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
329
329
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
330
330
|
|
|
331
331
|
"use strict";
|
|
332
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ createContentfulApi; }\n/* harmony export */ });\n/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ \"../node_modules/contentful-sdk-core/dist/index.es-modules.js\");\n/* harmony import */ var _paged_sync__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./paged-sync */ \"./paged-sync.ts\");\n/* harmony import */ var _utils_normalize_search_parameters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/normalize-search-parameters */ \"./utils/normalize-search-parameters.ts\");\n/* harmony import */ var _utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/normalize-select */ \"./utils/normalize-select.ts\");\n/* harmony import */ var _utils_resolve_circular__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/resolve-circular */ \"./utils/resolve-circular.ts\");\n/* harmony import */ var _utils_validate_timestamp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/validate-timestamp */ \"./utils/validate-timestamp.ts\");\n/* harmony import */ var _utils_validate_params__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/validate-params */ \"./utils/validate-params.ts\");\n/* harmony import */ var _utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/validate-search-parameters */ \"./utils/validate-search-parameters.ts\");\n/**\n * Contentful Delivery API Client. Contains methods which allow access to the\n * different kinds of entities present in Contentful (Entries, Assets, etc).\n */\n\n\n\n\n\n\n\n\nconst ASSET_KEY_MAX_LIFETIME = 48 * 60 * 60;\nclass NotFoundError extends Error {\n sys;\n details;\n constructor(id, environment, space) {\n super('The resource could not be found.');\n this.sys = {\n type: 'Error',\n id: 'NotFound',\n };\n this.details = {\n type: 'Entry',\n id,\n environment,\n space,\n };\n }\n}\nfunction createContentfulApi({ http, getGlobalOptions }, options) {\n const notFoundError = (id = 'unknown') => {\n return new NotFoundError(id, getGlobalOptions().environment, getGlobalOptions().space);\n };\n const getBaseUrl = (context) => {\n let baseUrl = context === 'space' ? getGlobalOptions().spaceBaseUrl : getGlobalOptions().environmentBaseUrl;\n if (!baseUrl) {\n throw new Error('Please define baseUrl for ' + context);\n }\n if (!baseUrl.endsWith('/')) {\n baseUrl += '/';\n }\n return baseUrl;\n };\n async function get({ context, path, config }) {\n const baseUrl = getBaseUrl(context);\n try {\n const response = await http.get(baseUrl + path, config);\n return response.data;\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function post({ context, path, data, config }) {\n const baseUrl = getBaseUrl(context);\n try {\n const response = await http.post(baseUrl + path, data, config);\n return response.data;\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function getSpace() {\n return get({ context: 'space', path: '' });\n }\n async function getContentType(id) {\n return get({\n context: 'environment',\n path: `content_types/${id}`,\n });\n }\n async function getContentTypes(query = {}) {\n return get({\n context: 'environment',\n path: 'content_types',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query }),\n });\n }\n async function getEntry(id, query = {}) {\n return makeGetEntry(id, query, options);\n }\n async function getEntries(query = {}) {\n return makeGetEntries(query, options);\n }\n async function makeGetEntry(id, query, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n const { withAllLocales } = options;\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateLocaleParam)(query, withAllLocales);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateResolveLinksParam)(query);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateRemoveUnresolvedParam)(query);\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n return internalGetEntry(id, withAllLocales ? { ...query, locale: '*' } : query, options);\n }\n async function internalGetEntry(id, query, options) {\n if (!id) {\n throw notFoundError(id);\n }\n try {\n const response = await internalGetEntries({ 'sys.id': id, ...query }, options);\n if (response.items.length > 0) {\n return response.items[0];\n }\n else {\n throw notFoundError(id);\n }\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function makeGetEntries(query, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n const { withAllLocales } = options;\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateLocaleParam)(query, withAllLocales);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateResolveLinksParam)(query);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateRemoveUnresolvedParam)(query);\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n return internalGetEntries(withAllLocales\n ? {\n ...query,\n locale: '*',\n }\n : query, options);\n }\n async function internalGetEntries(query, options) {\n const { withoutLinkResolution, withoutUnresolvableLinks } = options;\n try {\n const entries = await get({\n context: 'environment',\n path: 'entries',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_search_parameters__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query)) }),\n });\n return (0,_utils_resolve_circular__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(entries, {\n resolveLinks: !withoutLinkResolution ?? true,\n removeUnresolved: withoutUnresolvableLinks ?? false,\n });\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function getAsset(id, query = {}) {\n return makeGetAsset(id, query, options);\n }\n async function getAssets(query = {}) {\n return makeGetAssets(query, options);\n }\n async function makeGetAssets(query, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n const { withAllLocales } = options;\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateLocaleParam)(query, withAllLocales);\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n const localeSpecificQuery = withAllLocales ? { ...query, locale: '*' } : query;\n return internalGetAssets(localeSpecificQuery);\n }\n async function internalGetAsset(id, query) {\n try {\n return get({\n context: 'environment',\n path: `assets/${id}`,\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query) }),\n });\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function makeGetAsset(id, query, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n const { withAllLocales } = options;\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateLocaleParam)(query, withAllLocales);\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n const localeSpecificQuery = withAllLocales ? { ...query, locale: '*' } : query;\n return internalGetAsset(id, localeSpecificQuery);\n }\n async function internalGetAssets(query) {\n try {\n return get({\n context: 'environment',\n path: 'assets',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_search_parameters__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query)) }),\n });\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function getTag(id) {\n return get({\n context: 'environment',\n path: `tags/${id}`,\n });\n }\n async function getTags(query = {}) {\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n return get({\n context: 'environment',\n path: 'tags',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_search_parameters__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query)) }),\n });\n }\n async function createAssetKey(expiresAt) {\n try {\n const now = Math.floor(Date.now() / 1000);\n const currentMaxLifetime = now + ASSET_KEY_MAX_LIFETIME;\n (0,_utils_validate_timestamp__WEBPACK_IMPORTED_MODULE_5__[\"default\"])('expiresAt', expiresAt, { maximum: currentMaxLifetime, now });\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n return post({\n context: 'environment',\n path: 'asset_keys',\n data: { expiresAt },\n });\n }\n async function getLocales(query = {}) {\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n return get({\n context: 'environment',\n path: 'locales',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query) }),\n });\n }\n async function sync(query, syncOptions = { paginate: true }) {\n return makePagedSync(query, syncOptions, options);\n }\n async function makePagedSync(query, syncOptions, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateResolveLinksParam)(query);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateRemoveUnresolvedParam)(query);\n const combinedOptions = {\n ...syncOptions,\n ...options,\n };\n switchToEnvironment(http);\n return (0,_paged_sync__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(http, query, combinedOptions);\n }\n function parseEntries(data) {\n return makeParseEntries(data, options);\n }\n function makeParseEntries(data, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n return internalParseEntries(data, options);\n }\n function internalParseEntries(data, options) {\n const { withoutLinkResolution, withoutUnresolvableLinks } = options;\n return (0,_utils_resolve_circular__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(data, {\n resolveLinks: !withoutLinkResolution ?? true,\n removeUnresolved: withoutUnresolvableLinks ?? false,\n });\n }\n /*\n * Switches BaseURL to use /environments path\n * */\n function switchToEnvironment(http) {\n http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;\n }\n return {\n version: \"10.6.14\",\n getSpace,\n getContentType,\n getContentTypes,\n getAsset,\n getAssets,\n getTag,\n getTags,\n getLocales,\n parseEntries,\n sync,\n getEntry,\n getEntries,\n createAssetKey,\n };\n}\n\n\n//# sourceURL=webpack://contentful/./create-contentful-api.ts?");
|
|
332
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ createContentfulApi; }\n/* harmony export */ });\n/* harmony import */ var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! contentful-sdk-core */ \"../node_modules/contentful-sdk-core/dist/index.es-modules.js\");\n/* harmony import */ var _paged_sync__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./paged-sync */ \"./paged-sync.ts\");\n/* harmony import */ var _utils_normalize_search_parameters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/normalize-search-parameters */ \"./utils/normalize-search-parameters.ts\");\n/* harmony import */ var _utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/normalize-select */ \"./utils/normalize-select.ts\");\n/* harmony import */ var _utils_resolve_circular__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/resolve-circular */ \"./utils/resolve-circular.ts\");\n/* harmony import */ var _utils_validate_timestamp__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/validate-timestamp */ \"./utils/validate-timestamp.ts\");\n/* harmony import */ var _utils_validate_params__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/validate-params */ \"./utils/validate-params.ts\");\n/* harmony import */ var _utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/validate-search-parameters */ \"./utils/validate-search-parameters.ts\");\n/**\n * Contentful Delivery API Client. Contains methods which allow access to the\n * different kinds of entities present in Contentful (Entries, Assets, etc).\n */\n\n\n\n\n\n\n\n\nconst ASSET_KEY_MAX_LIFETIME = 48 * 60 * 60;\nclass NotFoundError extends Error {\n sys;\n details;\n constructor(id, environment, space) {\n super('The resource could not be found.');\n this.sys = {\n type: 'Error',\n id: 'NotFound',\n };\n this.details = {\n type: 'Entry',\n id,\n environment,\n space,\n };\n }\n}\nfunction createContentfulApi({ http, getGlobalOptions }, options) {\n const notFoundError = (id = 'unknown') => {\n return new NotFoundError(id, getGlobalOptions().environment, getGlobalOptions().space);\n };\n const getBaseUrl = (context) => {\n let baseUrl = context === 'space' ? getGlobalOptions().spaceBaseUrl : getGlobalOptions().environmentBaseUrl;\n if (!baseUrl) {\n throw new Error('Please define baseUrl for ' + context);\n }\n if (!baseUrl.endsWith('/')) {\n baseUrl += '/';\n }\n return baseUrl;\n };\n async function get({ context, path, config }) {\n const baseUrl = getBaseUrl(context);\n try {\n const response = await http.get(baseUrl + path, config);\n return response.data;\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function post({ context, path, data, config }) {\n const baseUrl = getBaseUrl(context);\n try {\n const response = await http.post(baseUrl + path, data, config);\n return response.data;\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function getSpace() {\n return get({ context: 'space', path: '' });\n }\n async function getContentType(id) {\n return get({\n context: 'environment',\n path: `content_types/${id}`,\n });\n }\n async function getContentTypes(query = {}) {\n return get({\n context: 'environment',\n path: 'content_types',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query }),\n });\n }\n async function getEntry(id, query = {}) {\n return makeGetEntry(id, query, options);\n }\n async function getEntries(query = {}) {\n return makeGetEntries(query, options);\n }\n async function makeGetEntry(id, query, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n const { withAllLocales } = options;\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateLocaleParam)(query, withAllLocales);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateResolveLinksParam)(query);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateRemoveUnresolvedParam)(query);\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n return internalGetEntry(id, withAllLocales ? { ...query, locale: '*' } : query, options);\n }\n async function internalGetEntry(id, query, options) {\n if (!id) {\n throw notFoundError(id);\n }\n try {\n const response = await internalGetEntries({ 'sys.id': id, ...query }, options);\n if (response.items.length > 0) {\n return response.items[0];\n }\n else {\n throw notFoundError(id);\n }\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function makeGetEntries(query, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n const { withAllLocales } = options;\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateLocaleParam)(query, withAllLocales);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateResolveLinksParam)(query);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateRemoveUnresolvedParam)(query);\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n return internalGetEntries(withAllLocales\n ? {\n ...query,\n locale: '*',\n }\n : query, options);\n }\n async function internalGetEntries(query, options) {\n const { withoutLinkResolution, withoutUnresolvableLinks } = options;\n try {\n const entries = await get({\n context: 'environment',\n path: 'entries',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_search_parameters__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query)) }),\n });\n return (0,_utils_resolve_circular__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(entries, {\n resolveLinks: !withoutLinkResolution ?? true,\n removeUnresolved: withoutUnresolvableLinks ?? false,\n });\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function getAsset(id, query = {}) {\n return makeGetAsset(id, query, options);\n }\n async function getAssets(query = {}) {\n return makeGetAssets(query, options);\n }\n async function makeGetAssets(query, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n const { withAllLocales } = options;\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateLocaleParam)(query, withAllLocales);\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n const localeSpecificQuery = withAllLocales ? { ...query, locale: '*' } : query;\n return internalGetAssets(localeSpecificQuery);\n }\n async function internalGetAsset(id, query) {\n try {\n return get({\n context: 'environment',\n path: `assets/${id}`,\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query) }),\n });\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function makeGetAsset(id, query, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n const { withAllLocales } = options;\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateLocaleParam)(query, withAllLocales);\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n const localeSpecificQuery = withAllLocales ? { ...query, locale: '*' } : query;\n return internalGetAsset(id, localeSpecificQuery);\n }\n async function internalGetAssets(query) {\n try {\n return get({\n context: 'environment',\n path: 'assets',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_search_parameters__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query)) }),\n });\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n }\n async function getTag(id) {\n return get({\n context: 'environment',\n path: `tags/${id}`,\n });\n }\n async function getTags(query = {}) {\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n return get({\n context: 'environment',\n path: 'tags',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_search_parameters__WEBPACK_IMPORTED_MODULE_2__[\"default\"])((0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query)) }),\n });\n }\n async function createAssetKey(expiresAt) {\n try {\n const now = Math.floor(Date.now() / 1000);\n const currentMaxLifetime = now + ASSET_KEY_MAX_LIFETIME;\n (0,_utils_validate_timestamp__WEBPACK_IMPORTED_MODULE_5__[\"default\"])('expiresAt', expiresAt, { maximum: currentMaxLifetime, now });\n }\n catch (error) {\n (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.errorHandler)(error);\n }\n return post({\n context: 'environment',\n path: 'asset_keys',\n data: { expiresAt },\n });\n }\n async function getLocales(query = {}) {\n (0,_utils_validate_search_parameters__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(query);\n return get({\n context: 'environment',\n path: 'locales',\n config: (0,contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__.createRequestConfig)({ query: (0,_utils_normalize_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(query) }),\n });\n }\n async function sync(query, syncOptions = { paginate: true }) {\n return makePagedSync(query, syncOptions, options);\n }\n async function makePagedSync(query, syncOptions, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateResolveLinksParam)(query);\n (0,_utils_validate_params__WEBPACK_IMPORTED_MODULE_6__.validateRemoveUnresolvedParam)(query);\n const combinedOptions = {\n ...syncOptions,\n ...options,\n };\n switchToEnvironment(http);\n return (0,_paged_sync__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(http, query, combinedOptions);\n }\n function parseEntries(data) {\n return makeParseEntries(data, options);\n }\n function makeParseEntries(data, options = {\n withAllLocales: false,\n withoutLinkResolution: false,\n withoutUnresolvableLinks: false,\n }) {\n return internalParseEntries(data, options);\n }\n function internalParseEntries(data, options) {\n const { withoutLinkResolution, withoutUnresolvableLinks } = options;\n return (0,_utils_resolve_circular__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(data, {\n resolveLinks: !withoutLinkResolution ?? true,\n removeUnresolved: withoutUnresolvableLinks ?? false,\n });\n }\n /*\n * Switches BaseURL to use /environments path\n * */\n function switchToEnvironment(http) {\n http.defaults.baseURL = getGlobalOptions().environmentBaseUrl;\n }\n return {\n version: \"10.6.16\",\n getSpace,\n getContentType,\n getContentTypes,\n getAsset,\n getAssets,\n getTag,\n getTags,\n getLocales,\n parseEntries,\n sync,\n getEntry,\n getEntries,\n createAssetKey,\n };\n}\n\n\n//# sourceURL=webpack://contentful/./create-contentful-api.ts?");
|
|
333
333
|
|
|
334
334
|
/***/ }),
|
|
335
335
|
|
|
@@ -779,7 +779,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _uti
|
|
|
779
779
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
780
780
|
|
|
781
781
|
"use strict";
|
|
782
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../core/settle.js */ \"../node_modules/axios/lib/core/settle.js\");\n/* harmony import */ var _helpers_cookies_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../helpers/cookies.js */ \"../node_modules/axios/lib/helpers/cookies.js\");\n/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../helpers/buildURL.js */ \"../node_modules/axios/lib/helpers/buildURL.js\");\n/* harmony import */ var _core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/buildFullPath.js */ \"../node_modules/axios/lib/core/buildFullPath.js\");\n/* harmony import */ var _helpers_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./../helpers/isURLSameOrigin.js */ \"../node_modules/axios/lib/helpers/isURLSameOrigin.js\");\n/* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../defaults/transitional.js */ \"../node_modules/axios/lib/defaults/transitional.js\");\n/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/AxiosError.js */ \"../node_modules/axios/lib/core/AxiosError.js\");\n/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../cancel/CanceledError.js */ \"../node_modules/axios/lib/cancel/CanceledError.js\");\n/* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../helpers/parseProtocol.js */ \"../node_modules/axios/lib/helpers/parseProtocol.js\");\n/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../platform/index.js */ \"../node_modules/axios/lib/platform/browser/index.js\");\n/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ \"../node_modules/axios/lib/core/AxiosHeaders.js\");\n/* harmony import */ var _helpers_speedometer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/speedometer.js */ \"../node_modules/axios/lib/helpers/speedometer.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = (0,_helpers_speedometer_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].from(config.headers).normalize();\n const responseType = config.responseType;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].isFormData(requestData)) {\n if (_platform_index_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].isStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].isStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if(!requestHeaders.getContentType(/^\\s*multipart\\/form-data/)){\n requestHeaders.setContentType('multipart/form-data'); // mobile/desktop app frameworks\n } else if(_utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].isString(contentType = requestHeaders.getContentType())){\n // fix semicolon duplication issue for ReactNative FormData implementation\n requestHeaders.setContentType(contentType.replace(/^\\s*(multipart\\/form-data);+/, '$1'))\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (_platform_index_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].isStandardBrowserEnv) {\n // Add xsrf header\n // regarding CVE-2023-45857 config.withCredentials condition was removed temporarily\n const xsrfValue = (0,_helpers_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(fullPath) && config.xsrfCookieName && _helpers_cookies_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"].read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n _utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"](null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(fullPath);\n\n if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].protocols.indexOf(protocol) === -1) {\n reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]('Unsupported protocol ' + protocol + ':', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n});\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/adapters/xhr.js?");
|
|
782
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _core_settle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./../core/settle.js */ \"../node_modules/axios/lib/core/settle.js\");\n/* harmony import */ var _helpers_cookies_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./../helpers/cookies.js */ \"../node_modules/axios/lib/helpers/cookies.js\");\n/* harmony import */ var _helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./../helpers/buildURL.js */ \"../node_modules/axios/lib/helpers/buildURL.js\");\n/* harmony import */ var _core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../core/buildFullPath.js */ \"../node_modules/axios/lib/core/buildFullPath.js\");\n/* harmony import */ var _helpers_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./../helpers/isURLSameOrigin.js */ \"../node_modules/axios/lib/helpers/isURLSameOrigin.js\");\n/* harmony import */ var _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../defaults/transitional.js */ \"../node_modules/axios/lib/defaults/transitional.js\");\n/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../core/AxiosError.js */ \"../node_modules/axios/lib/core/AxiosError.js\");\n/* harmony import */ var _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../cancel/CanceledError.js */ \"../node_modules/axios/lib/cancel/CanceledError.js\");\n/* harmony import */ var _helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../helpers/parseProtocol.js */ \"../node_modules/axios/lib/helpers/parseProtocol.js\");\n/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../platform/index.js */ \"../node_modules/axios/lib/platform/index.js\");\n/* harmony import */ var _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosHeaders.js */ \"../node_modules/axios/lib/core/AxiosHeaders.js\");\n/* harmony import */ var _helpers_speedometer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/speedometer.js */ \"../node_modules/axios/lib/helpers/speedometer.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction progressEventReducer(listener, isDownloadStream) {\n let bytesNotified = 0;\n const _speedometer = (0,_helpers_speedometer_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(50, 250);\n\n return e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e\n };\n\n data[isDownloadStream ? 'download' : 'upload'] = true;\n\n listener(data);\n };\n}\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n let requestData = config.data;\n const requestHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].from(config.headers).normalize();\n let {responseType, withXSRFToken} = config;\n let onCanceled;\n function done() {\n if (config.cancelToken) {\n config.cancelToken.unsubscribe(onCanceled);\n }\n\n if (config.signal) {\n config.signal.removeEventListener('abort', onCanceled);\n }\n }\n\n let contentType;\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].isFormData(requestData)) {\n if (_platform_index_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].hasStandardBrowserEnv || _platform_index_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].hasStandardBrowserWebWorkerEnv) {\n requestHeaders.setContentType(false); // Let the browser set it\n } else if ((contentType = requestHeaders.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n let request = new XMLHttpRequest();\n\n // HTTP basic authentication\n if (config.auth) {\n const username = config.auth.username || '';\n const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';\n requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));\n }\n\n const fullPath = (0,_core_buildFullPath_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(config.baseURL, config.url);\n\n request.open(config.method.toUpperCase(), (0,_helpers_buildURL_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(fullPath, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = _core_AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n (0,_core_settle_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]('Request aborted', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]('Network Error', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = config.transitional || _defaults_transitional_js__WEBPACK_IMPORTED_MODULE_8__[\"default\"];\n if (config.timeoutErrorMessage) {\n timeoutErrorMessage = config.timeoutErrorMessage;\n }\n reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"](\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ETIMEDOUT : _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if(_platform_index_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].hasStandardBrowserEnv) {\n withXSRFToken && _utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));\n\n if (withXSRFToken || (withXSRFToken !== false && (0,_helpers_isURLSameOrigin_js__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(fullPath))) {\n // Add xsrf header\n const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && _helpers_cookies_js__WEBPACK_IMPORTED_MODULE_10__[\"default\"].read(config.xsrfCookieName);\n\n if (xsrfValue) {\n requestHeaders.set(config.xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n _utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].isUndefined(config.withCredentials)) {\n request.withCredentials = !!config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = config.responseType;\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));\n }\n\n if (config.cancelToken || config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new _cancel_CanceledError_js__WEBPACK_IMPORTED_MODULE_11__[\"default\"](null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n config.cancelToken && config.cancelToken.subscribe(onCanceled);\n if (config.signal) {\n config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = (0,_helpers_parseProtocol_js__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(fullPath);\n\n if (protocol && _platform_index_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"].protocols.indexOf(protocol) === -1) {\n reject(new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"]('Unsupported protocol ' + protocol + ':', _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_7__[\"default\"].ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n});\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/adapters/xhr.js?");
|
|
783
783
|
|
|
784
784
|
/***/ }),
|
|
785
785
|
|
|
@@ -900,7 +900,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
900
900
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
901
901
|
|
|
902
902
|
"use strict";
|
|
903
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ mergeConfig; }\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosHeaders.js */ \"../node_modules/axios/lib/core/AxiosHeaders.js\");\n\n\n\n\n\nconst headersToObject = (thing) => thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isPlainObject(source)) {\n return _utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].merge.call({caseless}, target, source);\n } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isPlainObject(source)) {\n return _utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].merge({}, source);\n } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n _utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/core/mergeConfig.js?");
|
|
903
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ mergeConfig; }\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AxiosHeaders.js */ \"../node_modules/axios/lib/core/AxiosHeaders.js\");\n\n\n\n\n\nconst headersToObject = (thing) => thing instanceof _AxiosHeaders_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"] ? thing.toJSON() : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nfunction mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, caseless) {\n if (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isPlainObject(target) && _utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isPlainObject(source)) {\n return _utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].merge.call({caseless}, target, source);\n } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isPlainObject(source)) {\n return _utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].merge({}, source);\n } else if (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, caseless) {\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(b)) {\n return getMergedValue(a, b, caseless);\n } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(a)) {\n return getMergedValue(undefined, a, caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)\n };\n\n _utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/core/mergeConfig.js?");
|
|
904
904
|
|
|
905
905
|
/***/ }),
|
|
906
906
|
|
|
@@ -933,7 +933,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
933
933
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
934
934
|
|
|
935
935
|
"use strict";
|
|
936
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/AxiosError.js */ \"../node_modules/axios/lib/core/AxiosError.js\");\n/* harmony import */ var _transitional_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transitional.js */ \"../node_modules/axios/lib/defaults/transitional.js\");\n/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/toFormData.js */ \"../node_modules/axios/lib/helpers/toFormData.js\");\n/* harmony import */ var _helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/toURLEncodedForm.js */ \"../node_modules/axios/lib/helpers/toURLEncodedForm.js\");\n/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../platform/index.js */ \"../node_modules/axios/lib/platform/
|
|
936
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../core/AxiosError.js */ \"../node_modules/axios/lib/core/AxiosError.js\");\n/* harmony import */ var _transitional_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./transitional.js */ \"../node_modules/axios/lib/defaults/transitional.js\");\n/* harmony import */ var _helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../helpers/toFormData.js */ \"../node_modules/axios/lib/helpers/toFormData.js\");\n/* harmony import */ var _helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../helpers/toURLEncodedForm.js */ \"../node_modules/axios/lib/helpers/toURLEncodedForm.js\");\n/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../platform/index.js */ \"../node_modules/axios/lib/platform/index.js\");\n/* harmony import */ var _helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../helpers/formDataToJSON.js */ \"../node_modules/axios/lib/helpers/formDataToJSON.js\");\n\n\n\n\n\n\n\n\n\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: _transitional_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n\n adapter: ['xhr', 'http'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isObject(data);\n\n if (isObjectPayload && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isFormData(data);\n\n if (isFormData) {\n if (!hasJSONContentType) {\n return data;\n }\n return hasJSONContentType ? JSON.stringify((0,_helpers_formDataToJSON_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(data)) : data;\n }\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArrayBuffer(data) ||\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isBuffer(data) ||\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isStream(data) ||\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isFile(data) ||\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isBlob(data)\n ) {\n return data;\n }\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArrayBufferView(data)) {\n return data.buffer;\n }\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return (0,_helpers_toURLEncodedForm_js__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(data, this.formSerializer).toString();\n }\n\n if ((isFileList = _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return (0,_helpers_toFormData_js__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (data && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].from(e, _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_5__[\"default\"].ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].classes.FormData,\n Blob: _platform_index_js__WEBPACK_IMPORTED_MODULE_6__[\"default\"].classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\n_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (defaults);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/defaults/index.js?");
|
|
937
937
|
|
|
938
938
|
/***/ }),
|
|
939
939
|
|
|
@@ -955,7 +955,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n\n\n/* harmony default export
|
|
|
955
955
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
956
956
|
|
|
957
957
|
"use strict";
|
|
958
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ VERSION: function() { return /* binding */ VERSION; }\n/* harmony export */ });\nconst VERSION = \"1.6.
|
|
958
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ VERSION: function() { return /* binding */ VERSION; }\n/* harmony export */ });\nconst VERSION = \"1.6.4\";\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/env/data.js?");
|
|
959
959
|
|
|
960
960
|
/***/ }),
|
|
961
961
|
|
|
@@ -1010,7 +1010,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1010
1010
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1011
1011
|
|
|
1012
1012
|
"use strict";
|
|
1013
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ combineURLs; }\n/* harmony export */ });\n\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(
|
|
1013
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ combineURLs; }\n/* harmony export */ });\n\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nfunction combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/combineURLs.js?");
|
|
1014
1014
|
|
|
1015
1015
|
/***/ }),
|
|
1016
1016
|
|
|
@@ -1021,7 +1021,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1021
1021
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1022
1022
|
|
|
1023
1023
|
"use strict";
|
|
1024
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ \"../node_modules/axios/lib/platform/
|
|
1024
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ \"../node_modules/axios/lib/platform/index.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n _utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n _utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isString(path) && cookie.push('path=' + path);\n\n _utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n });\n\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/cookies.js?");
|
|
1025
1025
|
|
|
1026
1026
|
/***/ }),
|
|
1027
1027
|
|
|
@@ -1032,7 +1032,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _uti
|
|
|
1032
1032
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1033
1033
|
|
|
1034
1034
|
"use strict";
|
|
1035
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n\n\n\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArray(target) ? target.length : name;\n\n if (isLast) {\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isFormData(formData) && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isFunction(formData.entries)) {\n const obj = {};\n\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (formDataToJSON);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/formDataToJSON.js?");
|
|
1035
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n\n\n\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArray(target) ? target.length : name;\n\n if (isLast) {\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isFormData(formData) && _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].isFunction(formData.entries)) {\n const obj = {};\n\n _utils_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (formDataToJSON);\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/formDataToJSON.js?");
|
|
1036
1036
|
|
|
1037
1037
|
/***/ }),
|
|
1038
1038
|
|
|
@@ -1065,7 +1065,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1065
1065
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1066
1066
|
|
|
1067
1067
|
"use strict";
|
|
1068
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ \"../node_modules/axios/lib/platform/
|
|
1068
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../platform/index.js */ \"../node_modules/axios/lib/platform/index.js\");\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (_platform_index_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hasStandardBrowserEnv ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\n (function standardBrowserEnv() {\n const msie = /(msie|trident)/i.test(navigator.userAgent);\n const urlParsingNode = document.createElement('a');\n let originURL;\n\n /**\n * Parse a URL to discover its components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n let href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: (urlParsingNode.pathname.charAt(0) === '/') ?\n urlParsingNode.pathname :\n '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n const parsed = (_utils_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isString(requestURL)) ? resolveURL(requestURL) : requestURL;\n return (parsed.protocol === originURL.protocol &&\n parsed.host === originURL.host);\n };\n })() :\n\n // Non standard browser envs (web workers, react-native) lack needed support.\n (function nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n })());\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/isURLSameOrigin.js?");
|
|
1069
1069
|
|
|
1070
1070
|
/***/ }),
|
|
1071
1071
|
|
|
@@ -1142,7 +1142,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _uti
|
|
|
1142
1142
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1143
1143
|
|
|
1144
1144
|
"use strict";
|
|
1145
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ toURLEncodedForm; }\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ \"../node_modules/axios/lib/helpers/toFormData.js\");\n/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ \"../node_modules/axios/lib/platform/
|
|
1145
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ toURLEncodedForm; }\n/* harmony export */ });\n/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ \"../node_modules/axios/lib/utils.js\");\n/* harmony import */ var _toFormData_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toFormData.js */ \"../node_modules/axios/lib/helpers/toFormData.js\");\n/* harmony import */ var _platform_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../platform/index.js */ \"../node_modules/axios/lib/platform/index.js\");\n\n\n\n\n\n\nfunction toURLEncodedForm(data, options) {\n return (0,_toFormData_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(data, new _platform_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (_platform_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"].isNode && _utils_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"].isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/helpers/toURLEncodedForm.js?");
|
|
1146
1146
|
|
|
1147
1147
|
/***/ }),
|
|
1148
1148
|
|
|
@@ -1197,7 +1197,29 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _hel
|
|
|
1197
1197
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1198
1198
|
|
|
1199
1199
|
"use strict";
|
|
1200
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classes/URLSearchParams.js */ \"../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js\");\n/* harmony import */ var _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/FormData.js */ \"../node_modules/axios/lib/platform/browser/classes/FormData.js\");\n/* harmony import */ var _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./classes/Blob.js */ \"../node_modules/axios/lib/platform/browser/classes/Blob.js\");\n\n\n\n\n
|
|
1200
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./classes/URLSearchParams.js */ \"../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js\");\n/* harmony import */ var _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./classes/FormData.js */ \"../node_modules/axios/lib/platform/browser/classes/FormData.js\");\n/* harmony import */ var _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./classes/Blob.js */ \"../node_modules/axios/lib/platform/browser/classes/Blob.js\");\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n isBrowser: true,\n classes: {\n URLSearchParams: _classes_URLSearchParams_js__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n FormData: _classes_FormData_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n Blob: _classes_Blob_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"]\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n});\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/platform/browser/index.js?");
|
|
1201
|
+
|
|
1202
|
+
/***/ }),
|
|
1203
|
+
|
|
1204
|
+
/***/ "../node_modules/axios/lib/platform/common/utils.js":
|
|
1205
|
+
/*!**********************************************************!*\
|
|
1206
|
+
!*** ../node_modules/axios/lib/platform/common/utils.js ***!
|
|
1207
|
+
\**********************************************************/
|
|
1208
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1209
|
+
|
|
1210
|
+
"use strict";
|
|
1211
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ hasBrowserEnv: function() { return /* binding */ hasBrowserEnv; },\n/* harmony export */ hasStandardBrowserEnv: function() { return /* binding */ hasStandardBrowserEnv; },\n/* harmony export */ hasStandardBrowserWebWorkerEnv: function() { return /* binding */ hasStandardBrowserWebWorkerEnv; }\n/* harmony export */ });\nconst hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = (\n (product) => {\n return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0\n })(typeof navigator !== 'undefined' && navigator.product);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\n\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/platform/common/utils.js?");
|
|
1212
|
+
|
|
1213
|
+
/***/ }),
|
|
1214
|
+
|
|
1215
|
+
/***/ "../node_modules/axios/lib/platform/index.js":
|
|
1216
|
+
/*!***************************************************!*\
|
|
1217
|
+
!*** ../node_modules/axios/lib/platform/index.js ***!
|
|
1218
|
+
\***************************************************/
|
|
1219
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1220
|
+
|
|
1221
|
+
"use strict";
|
|
1222
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node/index.js */ \"../node_modules/axios/lib/platform/browser/index.js\");\n/* harmony import */ var _common_utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./common/utils.js */ \"../node_modules/axios/lib/platform/common/utils.js\");\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n ..._common_utils_js__WEBPACK_IMPORTED_MODULE_0__,\n ..._node_index_js__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n});\n\n\n//# sourceURL=webpack://contentful/../node_modules/axios/lib/platform/index.js?");
|
|
1201
1223
|
|
|
1202
1224
|
/***/ }),
|
|
1203
1225
|
|