{"version":3,"file":"saved-items-sdk.iife.42e753ff.js","sources":["../node_modules/@babel/runtime/helpers/defineProperty.js","../src/operations/constants.js","../globalNamespaces.js","../node_modules/@babel/runtime/helpers/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/nonIterableRest.js","../node_modules/@babel/runtime/helpers/slicedToArray.js","../src/isZeroOrPositiveInteger.js","../src/operations/validateGetParams.js","../src/operations/getLimitAndOffsetError.js","../src/operations/getExpandError.js","../src/operations/validateIntegers.js","../node_modules/@babel/runtime/helpers/typeof.js","../src/operations/validateRequestOptions.js","../src/operations/validateGetAuthorisationDelegate.js","../src/operations/getItems/index.js","../src/isPositiveInteger.js","../src/operations/addItems/validateItems.js","../src/operations/addItems/index.js","../src/operations/getIdError.js","../src/operations/validateShareId.js","../src/operations/getSharedItems/index.js","../src/operations/index.js","../src/operations/getItemsSummary/index.js","../src/operations/addItem/index.js","../src/operations/addItem/validateItem.js","../src/operations/removeItem/index.js","../src/operations/removeItem/validateItemId.js","../src/operations/removeItems/index.js","../src/operations/removeItems/validateItemIds.js","../src/operations/updateItem/index.js","../src/operations/updateItem/validateParams.js","../src/operations/getSharedSummary/index.js","../node_modules/@babel/runtime/helpers/asyncToGenerator.js","../node_modules/regenerator-runtime/runtime.js","../node_modules/@babel/runtime/regenerator/index.js","../src/api/headers/authorisation.js","../src/api/headers/contentType.js","../src/mapObjectValues.js","../src/api/apiFactory.js","../src/api/urlFactoryProvider.js","../src/api/configureRequest.js","../src/sdk/validateParams/validateConfiguration/getEventBusError.js","../src/sdk/validateParams/validateConfiguration/index.js","../src/sdk/validateParams/validateConfiguration/getGetAuthorisationError.js","../src/sdk/validateParams/validateConfiguration/constants.js","../src/sdk/validateParams/validateConfiguration/getApiOriginError.js","../src/sdk/validateParams/validateConfiguration/getInteractionCallbackError.js","../src/sdk/validateParams/validateConfiguration/getRetriesError.js","../src/sdk/validateParams/validateConfiguration/getRetryDelayError.js","../src/sdk/validateParams/index.js","../src/sdk/validateParams/validateContext.js","../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","../node_modules/@babel/runtime/helpers/objectWithoutProperties.js","../src/sdk/mapContext.js","../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/iterableToArray.js","../node_modules/@babel/runtime/helpers/nonIterableSpread.js","../node_modules/@babel/runtime/helpers/toConsumableArray.js","../src/sdk/emitStartedEvent.js","../src/sdk/index.js","../src/index.js","../src/sdk/applyOperationStartedEvent.js"],"sourcesContent":["function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","import {\n asosNamespace,\n customerNamespace,\n savedItemsSdkNamespace\n} from \"../../globalNamespaces\";\n\nexport const NAMESPACE = `${asosNamespace}.${customerNamespace}.${savedItemsSdkNamespace}`;\nexport const EVENT_STARTED_KEY = \"started\";\nconst DEFAULT_ITEMS_URL = \"me/lists/default\";\nexport const DEFAULT_LIST_ITEMS_URL_PATH = DEFAULT_ITEMS_URL + \"/items\";\nexport const DEFAULT_ITEMS_SUMMARY_URL_PATH = DEFAULT_ITEMS_URL + \"/summary\";\nexport const SHARED_LIST_PATH = \"shared/\";\n\n/**\n * the order to sort by when getting saved items\n * @readonly\n * @memberof asos.customer.savedItemsSdk\n * @enum {string}\n * @see {@link https://redoc-service.asoscloud.com/files/AWG/master/customer-saveditems-v3.html#operation/Get Saved Items|API Documentation}\n */\nconst sortOrders = {\n /** sort saved items in descending order */\n SORT_ORDER_DESCENDING: \"dsc\",\n /** sort saved items in ascending order */\n SORT_ORDER_ASCENDING: \"asc\"\n};\n\n/**\n * what to sort by when getting saved items\n * @readonly\n * @memberof asos.customer.savedItemsSdk\n * @enum {string}\n * @see {@link https://redoc-service.asoscloud.com/files/AWG/master/customer-saveditems-v3.html#operation/Get Saved Items|API Documentation}\n */\nconst sorts = {\n /** sort saved items by date */\n SORTBY_DATE: \"date\",\n /** sort saved items by discount */\n SORTBY_DISCOUNT: \"discount\",\n /** sort saved items by price */\n SORTBY_PRICE: \"price\",\n /** sort saved items by brand */\n SORTBY_BRAND: \"brand\",\n /** sort saved items by stock level */\n SORTBY_STOCK: \"stock\",\n /** sort saved items by recently discounted */\n SORTBY_RECENTLY_DISCOUNTED: \"recentlydiscounted\"\n};\n\n/**\n * expand option.\n * N.B. The SDK does not implement \"ids\" since the {@link https://redoc-service.asoscloud.com/files/AWG/master/customer-saveditems-v3.html#operation/Get Summary Saved Items} will be used instead, when needed by web.\n * @readonly\n * @memberof asos.customer.savedItemsSdk\n * @enum {string}\n * @see {@link https://redoc-service.asoscloud.com/files/AWG/master/customer-saveditems-v3.html#operation/Get Saved Items|API Documentation}\n */\nconst expands = {\n /** expand variant information */\n EXPAND_VARIANTS: \"variants\"\n};\n\nexport { sorts, sortOrders, expands };\n","export const asosNamespace = \"asos\";\nexport const webRequestNamespace = \"webRequest\";\nexport const customerNamespace = \"customer\";\nexport const savedItemsSdkNamespace = \"savedItemsSdk\";\n","function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayWithHoles = require(\"./arrayWithHoles.js\");\n\nvar iterableToArrayLimit = require(\"./iterableToArrayLimit.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableRest = require(\"./nonIterableRest.js\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","const isZeroOrPositiveInteger = candidate =>\n Number.isInteger(candidate) && candidate >= 0;\n\nexport default isZeroOrPositiveInteger;\n","import validateIntegers from \"./validateIntegers\";\nimport getLimitAndOffsetError from \"./getLimitAndOffsetError\";\nimport getExpandError from \"./getExpandError\";\n\nimport { sortOrders, sorts, NAMESPACE } from \"./constants\";\n\nconst getSortError = sort => {\n return !Object.values(sorts).includes(sort)\n ? `sort should be one of ${NAMESPACE}.sorts: ${Object.keys(sorts).join(\n \", \"\n )}`\n : undefined;\n};\n\nconst getSortOrderError = sortOrder => {\n return !Object.values(sortOrders).includes(sortOrder)\n ? `sortOrder should be one of ${NAMESPACE}.sortOrders: ${Object.keys(\n sortOrders\n ).join(\", \")}`\n : undefined;\n};\n\nconst validateValues = (offset, limit, sort, sortOrder, expand) => {\n const errors = []\n .concat(getLimitAndOffsetError(limit, offset))\n .concat(getSortError(sort))\n .concat(getSortOrderError(sortOrder))\n .concat(getExpandError(expand))\n .filter(e => e !== undefined);\n\n if (errors.length) {\n throw new RangeError(errors.join(\"\\n\"));\n }\n};\n\nconst validateGetParams = ({ offset, limit, sort, sortOrder, expand }) => {\n validateIntegers({ offset, limit });\n validateValues(offset, limit, sort, sortOrder, expand);\n};\n\nexport default validateGetParams;\n","const offsetMax = 9999;\nconst limitMax = 200;\n\nconst getLimitAndOffsetError = (limit, offset) => {\n const errors = []\n .concat(limit > limitMax ? `maximum limit is ${limitMax}` : undefined)\n .concat(offset > offsetMax ? `maximum offset is ${offsetMax}` : undefined)\n .filter(error => typeof error !== \"undefined\");\n\n return errors;\n};\n\nexport default getLimitAndOffsetError;\n","import { NAMESPACE, expands } from \"./constants\";\n\nconst getExpandError = expand => {\n return expand !== undefined && !Object.values(expands).includes(expand)\n ? `expand should be one of ${NAMESPACE}.expands: ${Object.keys(\n expands\n ).join(\", \")}`\n : undefined;\n};\n\nexport default getExpandError;\n","import isZeroOrPositiveInteger from \"../isZeroOrPositiveInteger\";\n\nconst validateIntegers = values => {\n const errors = Object.entries(values).reduce((allErrors, [key, value]) => {\n if (!isZeroOrPositiveInteger(value)) {\n allErrors.push(TypeError(`${key} should be a non-negative integer`));\n }\n return allErrors;\n }, []);\n\n if (errors.length) {\n throw new TypeError(errors.join(\"\\n\"));\n }\n};\n\nexport default validateIntegers;\n","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","import isZeroOrPositiveInteger from \"../isZeroOrPositiveInteger\";\n\nconst getInvalidOptionsErrors = requestOptions => {\n const validOptions = [\n \"timeout\",\n \"additionalLoggingParams\",\n \"cancelTokenExecutor\"\n ];\n return Object.keys(requestOptions).map(key => {\n if (!validOptions.includes(key)) {\n return `requestOptions.${key} is invalid`;\n }\n });\n};\n\nconst getTimeoutError = timeout => {\n if (timeout !== undefined && !isZeroOrPositiveInteger(timeout)) {\n return \"requestOptions.timeout should be a non-negative integer\";\n }\n};\n\nconst isPojo = object =>\n object === null || typeof object !== \"object\"\n ? false\n : Object.getPrototypeOf(object) === Object.prototype;\n\nconst getAdditionalLoggingParamsError = additionalLoggingParams => {\n if (\n additionalLoggingParams !== undefined &&\n !isPojo(additionalLoggingParams)\n ) {\n return \"requestOptions.additionalLoggingParams should be an object\";\n }\n};\n\nconst getCancelTokenExecutorError = cancelTokenExecutor => {\n if (![\"function\", \"undefined\"].includes(typeof cancelTokenExecutor)) {\n return \"requestOptions.cancelTokenExecutor should be a function\";\n }\n};\n\nconst validateRequestOptions = (requestOptions = {}) => {\n const { timeout, additionalLoggingParams, cancelTokenExecutor } =\n requestOptions;\n\n const errors = getInvalidOptionsErrors(requestOptions)\n .concat(getTimeoutError(timeout))\n .concat(getAdditionalLoggingParamsError(additionalLoggingParams))\n .concat(getCancelTokenExecutorError(cancelTokenExecutor))\n .filter(e => e !== undefined);\n\n if (errors.length) {\n throw new TypeError(errors.join(\"\\n\"));\n }\n};\n\nexport default validateRequestOptions;\n","const validateGetAuthorisationDelegate = getAuthorisationDelegate => {\n if (typeof getAuthorisationDelegate !== \"function\") {\n throw new TypeError(\n \"configuration.getAuthorisation is required for this operation, and should be a function\"\n );\n }\n};\n\nexport default validateGetAuthorisationDelegate;\n","import { sortOrders, sorts, DEFAULT_LIST_ITEMS_URL_PATH } from \"../constants\";\nimport validateGetParams from \"../validateGetParams\";\nimport validateRequestOptions from \"../validateRequestOptions\";\nimport validateGetAuthorisationDelegate from \"../validateGetAuthorisationDelegate\";\n/**\n * Get a customers saved items\n * @memberof module:sdkInstance\n * @inner\n * @param {Object} params\n * @param {integer} [params.offset=0] offset\n * @param {integer} [params.limit=30] limit\n * @param {asos.customer.savedItemsSdk.sorts} [params.sort=SORTBY_DATE] sort direction\n * @param {asos.customer.savedItemsSdk.sortOrders} [params.sortOrder=SORT_ORDER_DESCENDING] sort order\n * @param {asos.customer.savedItemsSdk.expands} [params.expand] expand parameter\n * @param {requestOptions} [params.requestOptions] request options\n * @return {Promise} Promise resolving to SavedItemProductResponse.\n * @throws {TypeError} configuration.{@link getAuthorisationDelegate|getAuthorisation} is required, since this is an authorised endpoint.\n * @throws {RangeError} offset must be between 0 and 9999.\n * @throws {RangeError} limit must be between 0 and 200.\n * @throws {RangeError} sort must be a member of {@link asos.customer.savedItemsSdk.sorts}, if supplied.\n * @throws {RangeError} sortOrder must be a member of {@link asos.customer.savedItemsSdk.sortOrders}, if supplied.\n * @throws {RangeError} expand must be a member of {@link asos.customer.savedItemsSdk.expands}, if supplied\n * @see {@link https://redoc-service.asoscloud.com/files/AWG/master/customer-saveditems-v3.html#operation/Get Saved Items|API Documentation}\n * @example\n * sdk.getItems({ offset: 100, limit: 50, sort: SORTBY_BRAND, sortOrder: SORT_ORDER_ASCENDING });\n */\nconst getItems = (\n { api, context, configuration: { getAuthorisation } = {} },\n {\n offset = 0,\n limit = 30,\n sort = sorts.SORTBY_DATE,\n sortOrder = sortOrders.SORT_ORDER_DESCENDING,\n expand,\n requestOptions\n } = {}\n) => {\n validateGetAuthorisationDelegate(getAuthorisation);\n validateGetParams({ offset, limit, sort, sortOrder, expand });\n validateRequestOptions(requestOptions);\n return api.get({\n path: DEFAULT_LIST_ITEMS_URL_PATH,\n queryParams: {\n offset,\n limit,\n sort,\n sortOrder,\n ...(expand ? { expand } : {}),\n ...context\n },\n requestOptions\n });\n};\n\nexport default getItems;\n","import isZeroOrPositiveInteger from \"./isZeroOrPositiveInteger\";\n\nconst isPositiveInteger = candidate =>\n isZeroOrPositiveInteger(candidate) && candidate > 0;\n\nexport default isPositiveInteger;\n","import isZeroOrPositiveInteger from \"../../isZeroOrPositiveInteger\";\nimport isPositiveInteger from \"../../isPositiveInteger\";\n\nconst getItemPrefix = item => `item: ${JSON.stringify(item)} - `;\n\nconst getProductError = item => {\n const { productId } = item;\n if (!isPositiveInteger(productId)) {\n return `${getItemPrefix(item)}productId is required, as a positive integer`;\n }\n};\n\nconst getMissingVariantOrColourWayIdError = (variantId, colourWayId) => {\n if (variantId === null && colourWayId === null) {\n return \"either variantId or colourWayId is required\";\n }\n};\n\nconst getBothVariantAndColourWayIdError = (variantId, colourWayId) => {\n if (variantId !== null && colourWayId !== null) {\n return \"only one of variantId or colourWayId should be supplied\";\n }\n};\n\nconst getColourWayIdError = colourWayId => {\n if (colourWayId !== null && !isZeroOrPositiveInteger(colourWayId)) {\n return \"colourWayId should be a non-negative integer\";\n }\n};\n\nconst getVariantIdError = variantId => {\n if (variantId !== null && !isPositiveInteger(variantId)) {\n return \"variantId should be a positive integer\";\n }\n};\n\nconst getVariantOrColourWayIdError = item => {\n const { variantId = null, colourWayId = null } = item;\n const itemPrefix = getItemPrefix(item);\n let error = getMissingVariantOrColourWayIdError(variantId, colourWayId);\n if (error) {\n return `${itemPrefix}${error}`;\n }\n error = getBothVariantAndColourWayIdError(variantId, colourWayId);\n if (error) {\n return `${itemPrefix}${error}`;\n }\n error = getColourWayIdError(colourWayId);\n if (error) {\n return `${itemPrefix}${error}`;\n }\n error = getVariantIdError(variantId);\n if (error) {\n return `${itemPrefix}${error}`;\n }\n};\n\nconst validateItems = items => {\n const errors = !Array.isArray(items)\n ? [\"items should be an array\"]\n : items.length === 0\n ? [\"items are required\"]\n : items\n .map(item => getProductError(item))\n .concat(items.map(item => getVariantOrColourWayIdError(item)))\n .filter(e => e !== undefined);\n\n if (errors.length) {\n throw new TypeError(errors.join(\"\\n\"));\n }\n};\n\nexport default validateItems;\n","import validateItems from \"./validateItems\";\nimport validateRequestOptions from \"../validateRequestOptions\";\nimport validateGetAuthorisationDelegate from \"../validateGetAuthorisationDelegate\";\nimport { DEFAULT_LIST_ITEMS_URL_PATH } from \"../constants\";\n\n/**\n * Add multiple items to saved items\n * @memberof module:sdkInstance\n * @inner\n * @param {Object} params\n * @param {Object[]} params.items item to add to saved items. one of colourWayId or variantId is required.\n * @param {number} params.items[].productId product id\n * @param {number} [params.items[].colourWayId] colour way id\n * @param {number} [params.items[].variantId] variant id\n * @param {requestOptions} [params.requestOptions] request options\n * @return {Promise} Promise resolving to ItemAddedResponse.\n * @throws {TypeError} only one of variantId or colourWayId should be supplied.\n * @throws {TypeError} configuration.{@link getAuthorisationDelegate|getAuthorisation} is required, since this is an authorised endpoint.\n * @see {@link https://redoc-service.asoscloud.com/files/AWG/master/customer-saveditems-v3.html#operation/Add Saved Item(s)|API Documentation}\n * @example\n * sdk.addItems({ items: [{ productId: 1234543, colourWayId: 4865244 }, { productId: 1231334, variantId: 223433 }] });\n */\nconst addItems = (\n {\n api,\n context: { currency, keyStoreDataversion, lang, sizeSchema, store },\n configuration: { getAuthorisation } = {}\n },\n { items, requestOptions } = {}\n) => {\n validateGetAuthorisationDelegate(getAuthorisation);\n validateItems(items);\n validateRequestOptions(requestOptions);\n return api.post({\n path: DEFAULT_LIST_ITEMS_URL_PATH,\n body: { items },\n queryParams: {\n currency,\n keyStoreDataversion,\n lang,\n sizeSchema,\n store\n },\n requestOptions\n });\n};\n\nexport default addItems;\n","const getIdError = (id, type) =>\n typeof id !== \"string\" ||\n !id.match(/^[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$/)\n ? `${type} (${id}) should be a valid guid`\n : undefined;\n\nexport default getIdError;\n","import getIdError from \"./getIdError\";\n\nconst validateShareId = shareId => {\n const error = getIdError(shareId, \"shareId\");\n if (error) {\n throw new TypeError(error);\n }\n};\n\nexport default validateShareId;\n","import validateShareId from \"../validateShareId\";\nimport validateGetParams from \"../validateGetParams\";\nimport validateRequestOptions from \"../validateRequestOptions\";\nimport validateGetAuthorisationDelegate from \"../validateGetAuthorisationDelegate\";\nimport { sortOrders, sorts, SHARED_LIST_PATH } from \"../constants\";\n\n/**\n * Get a shared list's items\n * @memberof module:sdkInstance\n * @inner\n * @param {Object} params\n * @param {Integer} [params.offset=0] offset\n * @param {Integer} [params.limit=30] limit\n * @param {asos.customer.savedItemsSdk.sorts} [params.sort=SORTBY_DATE] sort direction\n * @param {asos.customer.savedItemsSdk.sortOrders} [params.sortOrder=SORT_ORDER_DESCENDING] sort order\n * @param {asos.customer.savedItemsSdk.expands} [params.expand] expand parameter\n * @param {String} params.shareId The unique shareId (GUID) for sharing a particular SavedList.\n * @param {requestOptions} [params.requestOptions] request options\n * @return {Promise} Promise resolving to SharedListProductResponse.\n * @throws {TypeError} offset should be a non-negative integer\n * @throws {TypeError} limit should be a non-negative integer\n * @throws {TypeError} configuration.{@link getAuthorisationDelegate|getAuthorisation} is required, since this is an authorised endpoint.\n * @throws {RangeError} maximum offset is 9999\n * @throws {RangeError} maximum limit is 200\n * @throws {RangeError} sort must be a member of {@link asos.customer.savedItemsSdk.sorts}, if supplied.\n * @throws {RangeError} sortOrder must be a member of {@link asos.customer.savedItemsSdk.sortOrders}, if supplied.\n * @throws {RangeError} expand should be one of {@link asos.customer.savedItemsSdk.expands}\n * @see {@link https://redoc-service.asoscloud.com/files/AWG/master/customer-saveditems-v3.html#operation/View the SavedList name and associated products|API Documentation}\n * @example\n * sdk.getSharedItems({ shareId: \"00000000-0000-0000-0000-000000000001\", offset: 100, limit: 50, sort: SORTBY_BRAND, sortOrder: SORT_ORDER_ASCENDING });\n */\nconst getSharedItems = (\n { api, context, configuration: { getAuthorisation } = {} },\n {\n shareId,\n offset = 0,\n limit = 30,\n sort = sorts.SORTBY_DATE,\n sortOrder = sortOrders.SORT_ORDER_DESCENDING,\n expand,\n requestOptions\n } = {}\n) => {\n validateGetAuthorisationDelegate(getAuthorisation);\n validateGetParams({ expand, offset, limit, sort, sortOrder });\n validateShareId(shareId);\n validateRequestOptions(requestOptions);\n return api.get({\n path: `${SHARED_LIST_PATH}${shareId}/items`,\n queryParams: {\n offset,\n limit,\n sort,\n sortOrder,\n ...(expand ? { expand } : {}),\n ...context\n },\n requestOptions\n });\n};\n\nexport default getSharedItems;\n","import getItems from \"./getItems\";\nimport getItemsSummary from \"./getItemsSummary\";\nimport addItem from \"./addItem\";\nimport addItems from \"./addItems\";\nimport removeItem from \"./removeItem\";\nimport removeItems from \"./removeItems\";\nimport updateItem from \"./updateItem\";\nimport getSharedSummary from \"./getSharedSummary\";\nimport getSharedItems from \"./getSharedItems\";\n\n/**\n * request options\n * @global\n * @typedef {Object} requestOptions\n * @property {Integer} [timeout] request timeout (ms). Default is 1000ms if not specified\n * @property {Object} [additionalLoggingParams] additional logging parameters\n * @property {Function} [cancelTokenExecutor] cancel token executor\n */\nexport default {\n getItems,\n getItemsSummary,\n addItem,\n addItems,\n removeItem,\n removeItems,\n updateItem,\n getSharedSummary,\n getSharedItems\n};\n","import validateRequestOptions from \"../validateRequestOptions\";\nimport validateGetAuthorisationDelegate from \"../validateGetAuthorisationDelegate\";\nimport { DEFAULT_ITEMS_SUMMARY_URL_PATH } from \"../constants\";\n\n/**\n * Get a list of all saved item IDs\n * @memberof module:sdkInstance\n * @inner\n * @param {Object} params\n * @param {requestOptions} [params.requestOptions] request options\n * @return {Promise} Promise resolving to ItemsSummaryResponse.\n * @throws {TypeError} configuration.{@link getAuthorisationDelegate|getAuthorisation} is required, since this is an authorised endpoint.\n * @see {@link https://redoc-service.asoscloud.com/files/AWG/master/customer-saveditems-v3.html#operation/Get Summary Saved Items|API Documentation}\n * @example\n * sdk.getItemsSummary();\n */\nconst getItemsSummary = (\n {\n api,\n context: { store, lang, keyStoreDataversion },\n configuration: { getAuthorisation } = {}\n },\n { requestOptions } = {}\n) => {\n validateGetAuthorisationDelegate(getAuthorisation);\n validateRequestOptions(requestOptions);\n return api.get({\n path: DEFAULT_ITEMS_SUMMARY_URL_PATH,\n queryParams: {\n lang,\n store,\n keyStoreDataversion\n },\n requestOptions\n });\n};\n\nexport default getItemsSummary;\n","import validateItem from \"./validateItem\";\nimport addItems from \"../addItems\";\n\n/**\n * Add an item to saved items\n * @memberof module:sdkInstance\n * @inner\n * @param {Object} params\n * @param {Object} params.item item to add to saved items. one of colourWayId or variantId is required.\n * @param {number} params.item.productId product id\n * @param {number} [params.item.colourWayId] colour way id\n * @param {number} [params.item.variantId] variant id\n * @param {requestOptions} [params.requestOptions] request options\n * @return {Promise} Promise resolving to ItemAddedResponse.\n * @throws {TypeError} only one of variantId or colourWayId should be supplied.\n * @throws {TypeError} configuration.{@link getAuthorisationDelegate|getAuthorisation} is required, since this is an authorised endpoint.\n * @see {@link https://redoc-service.asoscloud.com/files/AWG/master/customer-saveditems-v3.html#operation/Add Saved Item(s)|API Documentation}\n * @example\n * sdk.addItem({ item: { productId: 12345, colourWayId: 67890 } });\n */\nconst addItem = (apiContextAndConfiguration, { item, requestOptions } = {}) => {\n validateItem(item);\n return addItems(apiContextAndConfiguration, {\n items: [item],\n requestOptions\n });\n};\n\nexport default addItem;\n","const validateItem = (item = null) => {\n if (item === null) {\n throw new TypeError(\"item is required\");\n }\n};\n\nexport default validateItem;\n","import validateItemId from \"./validateItemId\";\nimport validateRequestOptions from \"../validateRequestOptions\";\nimport validateGetAuthorisationDelegate from \"../validateGetAuthorisationDelegate\";\nimport { DEFAULT_LIST_ITEMS_URL_PATH } from \"../constants\";\n\n/**\n * Remove item from saved items\n * @memberof module:sdkInstance\n * @inner\n * @param {Object} params\n * @param {string} params.itemId saved item id to remove\n * @param {requestOptions} [params.requestOptions] request options\n * @return {Promise} Promise resolving to no content.\n * @throws {TypeError} itemId should be a valid guid.\n * @throws {TypeError} configuration.{@link getAuthorisationDelegate|getAuthorisation} is required, since this is an authorised endpoint.\n * @see {@link https://redoc-service.asoscloud.com/files/AWG/master/customer-saveditems-v3.html#operation/Delete saved item|API Documentation}\n * @example\n * sdk.removeItem({ itemId: \"55596cc6-1799-4e6c-b5ff-009928d35ab6\" });\n */\nconst removeItem = (\n { api, configuration: { getAuthorisation } = {} },\n { itemId, requestOptions } = {}\n) => {\n validateGetAuthorisationDelegate(getAuthorisation);\n validateItemId(itemId);\n validateRequestOptions(requestOptions);\n return api.delete({\n path: `${DEFAULT_LIST_ITEMS_URL_PATH}/${itemId}`,\n requestOptions\n });\n};\n\nexport default removeItem;\n","import getIdError from \"../getIdError\";\n\nconst validateItemId = itemId => {\n const error = getIdError(itemId, \"itemId\");\n if (error) {\n throw new TypeError(error);\n }\n};\n\nexport default validateItemId;\n","import validateItemIds from \"./validateItemIds\";\nimport validateRequestOptions from \"../validateRequestOptions\";\nimport validateGetAuthorisationDelegate from \"../validateGetAuthorisationDelegate\";\nimport { DEFAULT_LIST_ITEMS_URL_PATH } from \"../constants\";\n\n/**\n * Remove items from saved items\n * @memberof module:sdkInstance\n * @inner\n * @param {Object} params\n * @param {string[]} params.itemIds saved item ids to remove\n * @param {requestOptions} [params.requestOptions] request options\n * @return {Promise} Promise resolving to DeleteResponse.\n * @throws {TypeError} itemIds should be an array of non-empty strings.\n * @throws {TypeError} configuration.{@link getAuthorisationDelegate|getAuthorisation} is required, since this is an authorised endpoint.\n * @throws {RangeError} itemIds limited to 500 characters when comma separated.\n * @see {@link https://redoc-service.asoscloud.com/files/AWG/master/customer-saveditems-v3.html#operation/Remove Saved Item(s)|API Documentation}\n * @example\n * sdk.removeItems({ itemIds: [\"55596cc6-1799-4e6c-b5ff-009928d35ab6\",\"0e56bbf4-563a-4687-8647-8d87094049ad\"] });\n */\nconst removeItems = (\n { api, configuration: { getAuthorisation } = {} },\n { itemIds, requestOptions } = {}\n) => {\n validateGetAuthorisationDelegate(getAuthorisation);\n validateItemIds(itemIds);\n validateRequestOptions(requestOptions);\n return api.delete({\n path: DEFAULT_LIST_ITEMS_URL_PATH,\n queryParams: { items: itemIds.join(\",\") },\n requestOptions\n });\n};\n\nexport default removeItems;\n","import getIdError from \"../getIdError\";\n\nconst validateItemIds = itemIds => {\n const errors = !Array.isArray(itemIds)\n ? [\"itemIds should be an array\"]\n : itemIds.length === 0\n ? [\"itemIds are required\"]\n : itemIds\n .map(itemId => getIdError(itemId, \"itemId\"))\n .filter(e => e !== undefined);\n\n if (errors.length) {\n throw new TypeError(errors.join(\"\\n\"));\n }\n\n if (itemIds.join(\",\").length > 500) {\n throw new RangeError(\n \"itemIds limited to 500 characters when comma separated\"\n );\n }\n};\n\nexport default validateItemIds;\n","import validateParams from \"./validateParams\";\nimport validateRequestOptions from \"../validateRequestOptions\";\nimport validateGetAuthorisationDelegate from \"../validateGetAuthorisationDelegate\";\nimport { DEFAULT_LIST_ITEMS_URL_PATH } from \"../constants\";\n\n/**\n * Update a product level saved item with a variant id\n * @memberof module:sdkInstance\n * @inner\n * @param {Object} params\n * @param {Object} params.item\n * @param {string} params.item.itemId saved item id to update\n * @param {integer} params.item.variantId variant id to update the saved item to\n * @param {requestOptions} [params.requestOptions] request options\n * @return {Promise} Promise resolving to no content.\n * @throws {TypeError} itemId should be a valid guid.\n * @throws {TypeError} variantId should be a positive integer.\n * @throws {TypeError} configuration.{@link getAuthorisationDelegate|getAuthorisation} is required, since this is an authorised endpoint.\n * @see {@link https://redoc-service.asoscloud.com/files/AWG/master/customer-saveditems-v3.html#operation/Modify a saved item|API Documentation}\n * @example\n * sdk.updateItem({ item: { itemId: \"0e56bbf4-563a-4687-8647-8d87094049ad\", variantId: 568790 } });\n */\nconst updateItem = (\n {\n api,\n context: { currency, keyStoreDataversion, lang, sizeSchema, store },\n configuration: { getAuthorisation } = {}\n },\n { item: { itemId, variantId } = {}, requestOptions } = {}\n) => {\n validateGetAuthorisationDelegate(getAuthorisation);\n validateParams({ itemId, variantId });\n validateRequestOptions(requestOptions);\n return api.patch({\n path: `${DEFAULT_LIST_ITEMS_URL_PATH}/${itemId}`,\n body: { variantId },\n queryParams: { currency, keyStoreDataversion, lang, sizeSchema, store },\n requestOptions\n });\n};\n\nexport default updateItem;\n","import isPositiveInteger from \"../../isPositiveInteger\";\nimport getIdError from \"../getIdError\";\n\nconst validateParams = ({ itemId, variantId }) => {\n const errors = [\n getIdError(itemId, \"itemId\"),\n !isPositiveInteger(variantId)\n ? `variantId (${variantId}) should be a positive integer`\n : undefined\n ].filter(e => e !== undefined);\n\n if (errors.length) {\n throw new TypeError(errors.join(\", \"));\n }\n};\n\nexport default validateParams;\n","import validateShareId from \"../validateShareId\";\nimport validateRequestOptions from \"../validateRequestOptions\";\nimport { SHARED_LIST_PATH } from \"../constants\";\n\n/**\n * Get a shared summary\n * @memberof module:sdkInstance\n * @inner\n * @param {Object} params\n * @param {String} params.shareId The unique shareId (GUID) for sharing a particular SavedList.\n * @param {requestOptions} [params.requestOptions] request options\n * @return {Promise} Promise resolving to SharedListProductResponse.\n * @throws {TypeError} shareId value should be a valid guid\n * @see {@link https://redoc-service.asoscloud.com/files/AWG/master/customer-saveditems-v3.html#operation/View the Shared SavedList|API Documentation}\n * @example\n * sdk.getSharedSummary(shareId);\n */\nconst getSharedSummary = (\n { api, context: queryParams },\n { shareId, requestOptions } = {}\n) => {\n validateShareId(shareId);\n validateRequestOptions(requestOptions);\n return api.get({\n isAuthRequired: false,\n path: `${SHARED_LIST_PATH}${shareId}`,\n queryParams,\n requestOptions\n });\n};\n\nexport default getSharedSummary;\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}\n\nmodule.exports = _asyncToGenerator;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","module.exports = require(\"regenerator-runtime\");\n","const authorisation = async ({ getAuthorisation }) => ({\n Authorization: await getAuthorisation({ timeoutMs: 8000, retries: 0 })\n});\n\nexport default authorisation;\n","const contentType = {\n \"Content-Type\": \"application/json\"\n};\n\nexport default contentType;\n","const mapObjectValues = (obj, decorateFn) =>\n Object.entries(obj).reduce(\n (obj, [key, value]) => ({\n ...obj,\n [key]: decorateFn(value, key)\n }),\n {}\n );\n\nexport default mapObjectValues;\n","import configureRequest from \"./configureRequest\";\nimport { authorisation, contentType } from \"./headers\";\nimport urlFactoryProvider from \"./urlFactoryProvider\";\nimport mapObjectValues from \"../mapObjectValues\";\n\nconst apiFactory = ({\n configuration: {\n getAuthorisation,\n apiOrigin,\n interactionCallback = () => {},\n logger,\n serverRequestLogger,\n retries,\n retryDelay\n }\n}) => {\n const urlFactory = urlFactoryProvider({ apiOrigin });\n const {\n get,\n post,\n delete: del,\n patch\n } = configureRequest({\n logger,\n serverRequestLogger,\n retries,\n retryDelay\n });\n\n return mapObjectValues(\n { get, post, delete: del, patch },\n method =>\n async ({\n path,\n queryParams: params,\n body,\n requestOptions,\n isAuthRequired = true\n }) => {\n const result = await method({\n url: urlFactory(path),\n params,\n body,\n headers: {\n ...contentType,\n ...(isAuthRequired ? await authorisation({ getAuthorisation }) : {})\n },\n ...requestOptions\n });\n interactionCallback();\n return result;\n }\n );\n};\n\nexport default apiFactory;\n","const baseUrl = \"/customer/savedlists/v3/customers/\";\n\nconst urlFactoryProvider =\n ({ apiOrigin = SERVER ? \"https://api.asos.com\" : window.location.origin }) =>\n path =>\n `${apiOrigin}${SERVER ? \"\" : \"/api\"}${baseUrl}${path}`;\n\nexport default urlFactoryProvider;\n","import { configureRequest as configureWebRequest } from \"@asosteam/asos-web-request\";\nimport { name, version } from \"../../package.json\";\n\nconst configureRequest = ({\n logger,\n serverRequestLogger,\n retries,\n retryDelay\n}) =>\n configureWebRequest({\n isServer: SERVER,\n logger,\n serverRequestLogger,\n defaultTimeout: 10000,\n retries,\n retryDelay,\n client: {\n name,\n version\n }\n });\n\nexport default configureRequest;\n","import { getEventBusErrorMessage as errorMessage } from \"./constants\";\n\nconst isObject = candidate =>\n typeof candidate === \"object\" && candidate !== null;\n\nconst isEventBusInstance = eventBus =>\n isObject(eventBus) && typeof eventBus.emit === \"function\";\n\nconst getEventBusError = eventBus => {\n if (eventBus !== undefined && !isEventBusInstance(eventBus)) {\n return errorMessage;\n }\n};\n\nexport default getEventBusError;\n","import {\n getApiOriginError,\n getGetAuthorisationError,\n getInteractionCallbackError,\n getLoggerError,\n getServerRequestLoggerError,\n getRetriesError,\n getRetryDelayError,\n getEventBusError\n} from \"./errors\";\n\nconst validateConfiguration = ({\n getAuthorisation,\n apiOrigin,\n interactionCallback,\n logger,\n serverRequestLogger,\n retries,\n retryDelay,\n eventBus\n} = {}) => {\n const errors = []\n .concat(getGetAuthorisationError(getAuthorisation))\n .concat(getApiOriginError(apiOrigin))\n .concat(getInteractionCallbackError(interactionCallback))\n .concat(SERVER ? getLoggerError(logger) : undefined)\n .concat(\n SERVER ? getServerRequestLoggerError(serverRequestLogger) : undefined\n )\n .concat(getRetriesError(retries))\n .concat(getRetryDelayError(retryDelay))\n .concat(getEventBusError(eventBus))\n .filter(e => e !== undefined);\n\n if (errors.length) {\n throw new TypeError(errors.join(\"\\n\"));\n }\n};\n\nexport default validateConfiguration;\n","import { getGetAuthorisationErrorMessage as errorMessage } from \"./constants\";\n\nconst getGetAuthorisationError = getAuthorisation => {\n if (![\"function\", \"undefined\"].includes(typeof getAuthorisation)) {\n return errorMessage;\n }\n};\n\nexport default getGetAuthorisationError;\n","export const getGetAuthorisationErrorMessage =\n \"configuration.getAuthorisation should be a function if defined\";\n\nexport const getApiOriginErrorMessage =\n \"configuration.apiOrigin should be a string if defined\";\n\nexport const getInteractionCallbackErrorMessage =\n \"configuration.interactionCallback should be a function if defined\";\n\nexport const getLoggerErrorMessage =\n \"configuration.logger is required, and should be an instance of asos-web-logging\";\n\nexport const getServerRequestLoggerErrorMessage =\n \"configuration.serverRequestLogger should be a function if defined\";\n\nexport const getRetriesErrorMessage =\n \"configuration.retries should be a positive integer if defined\";\n\nexport const getRetryDelayErrorMessage =\n \"configuration.retryDelay should be a function if defined\";\n\nexport const getEventBusErrorMessage =\n \"configuration.eventBus should be an eventBus instance if defined\";\n","import { getApiOriginErrorMessage as errorMessage } from \"./constants\";\n\nconst getApiOriginError = apiOrigin => {\n if (![\"string\", \"undefined\"].includes(typeof apiOrigin)) {\n return errorMessage;\n }\n};\n\nexport default getApiOriginError;\n","import { getInteractionCallbackErrorMessage as errorMessage } from \"./constants\";\n\nconst getInteractionCallbackError = interactionCallback => {\n if (![\"function\", \"undefined\"].includes(typeof interactionCallback)) {\n return errorMessage;\n }\n};\n\nexport default getInteractionCallbackError;\n","import isPositiveInteger from \"../../../isPositiveInteger\";\nimport { getRetriesErrorMessage as errorMessage } from \"./constants\";\n\nconst getRetriesError = retries => {\n if (retries !== undefined && !isPositiveInteger(retries)) {\n return errorMessage;\n }\n};\n\nexport default getRetriesError;\n","import { getRetryDelayErrorMessage as errorMessage } from \"./constants\";\n\nconst getRetryDelayError = retryDelay => {\n if (![\"function\", \"undefined\"].includes(typeof retryDelay)) {\n return errorMessage;\n }\n};\n\nexport default getRetryDelayError;\n","import validateConfiguration from \"./validateConfiguration\";\nimport validateContext from \"./validateContext\";\n\nconst validateParams = ({ context, configuration }) => {\n validateContext(context);\n validateConfiguration(configuration);\n};\n\nexport default validateParams;\n","const validateContext = (context = {}) => {\n const requiredFields = [\n \"storeCode\",\n \"currency\",\n \"language\",\n \"sizeSchema\",\n \"keyStoreDataversion\",\n \"country\"\n ];\n const errors = requiredFields\n .map(field =>\n typeof context[field] !== \"string\" || !context[field].length\n ? `context.${field} is required, and should be a non-empty string`\n : undefined\n )\n .filter(e => e !== undefined);\n\n if (errors.length) {\n throw new TypeError(errors.join(\"\\n\"));\n }\n};\n\nexport default validateContext;\n","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose.js\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","const mapContext = context => {\n const { storeCode, language, ...rest } = context;\n return { store: storeCode, lang: language, ...rest };\n};\n\nexport default mapContext;\n","var arrayLikeToArray = require(\"./arrayLikeToArray.js\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","var arrayWithoutHoles = require(\"./arrayWithoutHoles.js\");\n\nvar iterableToArray = require(\"./iterableToArray.js\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray.js\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread.js\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;","import { EVENT_STARTED_KEY, NAMESPACE } from \"../operations/constants\";\n\nconst emitStartedEvent = async ({ eventBus, operationName, args }) => {\n await new Promise(resolve => setTimeout(resolve));\n\n eventBus.emit(`${NAMESPACE}.${operationName}:${EVENT_STARTED_KEY}`, ...args);\n};\n\nexport default emitStartedEvent;\n","import { version } from \"../../package.json\";\nimport operations from \"../operations\";\nimport api from \"../api\";\nimport validateParams from \"./validateParams\";\nimport mapObjectValues from \"../mapObjectValues\";\nimport mapContext from \"./mapContext\";\nimport applyOperationStartedEvent from \"./applyOperationStartedEvent\";\n\n/**\n * Saved Items SDK factory function\n * @memberof asos.customer.savedItemsSdk\n * @function\n * @param {Object} params\n * @param {Object} params.context customer context under which API requests are made\n * @param {string} params.context.storeCode storeCode to pass to the API\n * @param {string} params.context.currency currency code to pass to the API\n * @param {string} params.context.language IETF RFC 5646 language code to pass to the API\n * @param {string} params.context.sizeSchema size schema to pass to the API\n * @param {string} params.context.keyStoreDataversion keyStoreDataversion to pass to the API\n * @param {string} params.context.country browse country to pass to the API\n * @param {Object} params.configuration environment configuration and dependencies\n * @param {getAuthorisationDelegate} [params.configuration.getAuthorisation] function that resolves a customer Authorization value, when authorising with the API. Operations requiring authorisation will fail if this is not provided.\n * @param {string} [params.configuration.apiOrigin={window.location.origin|https://api.asos.com}] api origin. defaults to {window.location.origin} in browser bundle and https://api.asos.com in server bundle. Calls will be made to \"{apiOrigin}/api/\" in browser bundle and \"{apiOrigin}\" in server bundle.\n * @param {function} [params.configuration.interactionCallback] a callback to run after each API request. Can be used to plug in the {@link https://docs.newrelic.com/docs/browser/new-relic-browser/browser-agent-spa-api/spa-save|New Relic Browser Agent SPA API}\n * @param {external:asos-web-logging.logger} [params.configuration.logger] instance of {@link https://github.com/asosteam/asos-web-logging|asos-web-logging}. Required when running server-side\n * @param {function} [params.configuration.serverRequestLogger] a function that will be passed request stats when running server-side. It is intended to be used for external tools such as newRelic. It should take a single object as an argument.\n * @param {number} [params.configuration.retries] number of retries to attempt, up to a timeout (if specified) in the {@link requestOptions}.\n * @param {retryDelayDelegate} [params.configuration.retryDelay] a function that can determine how many ms to wait between retrying requests.\n * @param {eventBus} [params.configuration.eventBus] an event bus on which operation events will be emitted. It is intended to be used for tracking tools such as Adobe Analytics or Optimisely.\n * @returns {module:sdkInstance}\n * @throws {TypeError} configuration.getAuthorisation should be a function if defined\n * @throws {TypeError} configuration.apiOrigin should be a string if defined\n * @throws {TypeError} configuration.logger is required, and should be an instance of asos-web-logging\n * @throws {TypeError} configuration.serverRequestLogger should be a function if defined\n * @throws {TypeError} configuration.interactionCallback should be a function if defined\n * @throws {TypeError} configuration.retries should be a number if defined\n * @throws {TypeError} configuration.retryDelay should be a function if defined\n * @throws {TypeError} configuration.eventBus should be an eventBus instance if defined\n * @throws {TypeError} context.storeCode is required, and should be a non-empty string\n * @throws {TypeError} context.currency is required, and should be a non-empty string\n * @throws {TypeError} context.language is required, and should be a non-empty string\n * @throws {TypeError} context.sizeSchema is required, and should be a non-empty string\n * @throws {TypeError} context.keyStoreDataversion is required, and should be a non-empty string\n * @throws {TypeError} context.country is required, and should be a non-empty string\n * @example\n * sdkInstance = sdk({\n * context: {\n * storeCode: \"COM\",\n * currency: \"GBP\",\n * language: \"en-GB\",\n * sizeSchema: \"UK\",\n * keyStoreDataversion: \"p1swt7e-15\",\n * country: \"GB\"\n * },\n * configuration: {\n * getAuthorisation: () => \"Bearer testAccessToken\",\n * interactionCallback: window.newrelic.interaction().save,\n * eventBus: window.asos.eventBus\n * }\n * });\n */\nconst sdk = params => {\n validateParams(params);\n const { context, configuration } = params;\n const configuredApi = api({ configuration });\n const mappedContext = mapContext(context);\n\n const apiBoundOperations = mapObjectValues(operations, operation =>\n operation.bind(operation, {\n api: configuredApi,\n context: mappedContext,\n configuration\n })\n );\n\n const eventDecoratedOperations = mapObjectValues(\n apiBoundOperations,\n applyOperationStartedEvent({ configuration })\n );\n\n /**\n * @module sdkInstance\n **/\n return {\n /**\n * @property {string} version version of the SDK\n */\n version,\n ...eventDecoratedOperations\n };\n};\n\nexport default sdk;\n","/**\n * @memberof asos\n * @namespace customer\n */\n/**\n * @memberof asos.customer\n * @namespace savedItemsSdk\n * @description\n * SDK for accessing the Saved Items {@link https://redoc-service.asoscloud.com/files/AWG/master/customer-saveditems-v3.html|API}.\n * Uses {@link asos.webRequest.configureRequest|asos-web-request.configureRequest} and {@link asos.webRequest.isCancelled|asos-web-request.isCancelled}, so requires that library to be on the page first.\n */\nimport { isCancelled } from \"@asosteam/asos-web-request\";\nimport sdk from \"./sdk\";\nimport { sorts, sortOrders, expands } from \"./operations/constants\";\n/**\n * function that can be used to check if a failed request was cancelled.\n * @function\n * @memberof asos.customer.savedItemsSdk\n * @returns {boolean} if the request was cancelled\n * @see {@link asos.webRequest.isCancelled|isCancelled}\n * @example\n * sdkInstance.getItems().then(() => {\n * ...\n * }, reason => {\n * const wasCancelled = sdk.isRequestCancelled(reason);\n * ...\n * });\n */\nconst isRequestCancelled = isCancelled; // N.B. must be defined as a variable and not as a import alias, to allow ES module namespace outro to work with terser minification\n\nexport { sdk, isRequestCancelled, sorts, sortOrders, expands };\n","import emitStartedEvent from \"./emitStartedEvent\";\n\nconst applyOperationStartedEvent =\n ({ configuration: { eventBus } }) =>\n (operation, operationName) =>\n (...args) => {\n if (eventBus !== undefined) {\n emitStartedEvent({ eventBus, operationName, args });\n }\n\n return operation(...args);\n };\n\nexport default applyOperationStartedEvent;\n"],"names":["module","obj","key","value","Object","defineProperty","enumerable","configurable","writable","exports","NAMESPACE","concat","DEFAULT_ITEMS_URL","DEFAULT_LIST_ITEMS_URL_PATH","DEFAULT_ITEMS_SUMMARY_URL_PATH","SHARED_LIST_PATH","sortOrders","SORT_ORDER_DESCENDING","SORT_ORDER_ASCENDING","sorts","SORTBY_DATE","SORTBY_DISCOUNT","SORTBY_PRICE","SORTBY_BRAND","SORTBY_STOCK","SORTBY_RECENTLY_DISCOUNTED","expands","EXPAND_VARIANTS","arr","Array","isArray","i","_i","Symbol","iterator","_s","_e","_arr","_n","_d","call","next","done","push","length","err","len","arr2","o","minLen","arrayLikeToArray","n","prototype","toString","slice","constructor","name","from","test","TypeError","arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest","isZeroOrPositiveInteger","candidate","Number","isInteger","validateValues","offset","limit","sort","sortOrder","expand","errors","undefined","filter","error","getLimitAndOffsetError","values","includes","keys","join","getSortError","getSortOrderError","getExpandError","e","RangeError","validateGetParams","_ref","entries","reduce","allErrors","_ref2","_slicedToArray","validateIntegers","_typeof","getAdditionalLoggingParamsError","additionalLoggingParams","object","getPrototypeOf","validateRequestOptions","requestOptions","arguments","timeout","cancelTokenExecutor","validOptions","map","getInvalidOptionsErrors","getTimeoutError","getCancelTokenExecutorError","validateGetAuthorisationDelegate","getAuthorisationDelegate","isPositiveInteger","getItemPrefix","item","JSON","stringify","getVariantOrColourWayIdError","_item$variantId","variantId","_item$colourWayId","colourWayId","itemPrefix","getMissingVariantOrColourWayIdError","getBothVariantAndColourWayIdError","getColourWayIdError","getVariantIdError","validateItems","items","productId","getProductError","addItems","api","_ref$context","context","currency","keyStoreDataversion","lang","sizeSchema","store","_ref$configuration","configuration","getAuthorisation","post","path","body","queryParams","getIdError","id","type","match","validateShareId","shareId","getItems","_ref2$offset","_ref2$limit","_ref2$sort","_ref2$sortOrder","get","_objectSpread","getItemsSummary","addItem","apiContextAndConfiguration","validateItem","removeItem","itemId","validateItemId","delete","removeItems","itemIds","validateItemIds","updateItem","_ref2$item","_ref2$item2","validateParams","patch","getSharedSummary","isAuthRequired","getSharedItems","asyncGeneratorStep","gen","resolve","reject","_next","_throw","arg","info","Promise","then","fn","self","this","args","apply","runtime","Op","hasOwn","hasOwnProperty","$Symbol","iteratorSymbol","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","create","Context","_invoke","state","GenStateSuspendedStart","method","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","GenStateSuspendedYield","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","NativeIteratorPrototype","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","result","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","resultName","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","displayName","isGeneratorFunction","genFun","ctor","mark","setPrototypeOf","__proto__","awrap","async","iter","reverse","pop","skipTempReset","prev","charAt","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","catch","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","Function","require$$0","authorisation","_asyncToGenerator","_regeneratorRuntime","_callee","_context","timeoutMs","retries","t0","Authorization","_x","contentType","mapObjectValues","decorateFn","_defineProperty","apiFactory","apiOrigin","_ref$configuration$in","interactionCallback","logger","serverRequestLogger","retryDelay","urlFactory","_ref$apiOrigin","window","location","origin","urlFactoryProvider","_configureRequest","configureWebRequest","isServer","defaultTimeout","client","version","configureRequest","del","_ref3","params","_ref2$isAuthRequired","t1","t2","t3","t4","t5","t6","t7","t8","t9","t10","url","headers","t11","t12","isEventBusInstance","eventBus","emit","validateConfiguration","getGetAuthorisationError","getApiOriginError","getInteractionCallbackError","getRetriesError","getRetryDelayError","getEventBusError","field","validateContext","source","excluded","target","sourceKeys","indexOf","objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","mapContext","storeCode","language","_objectWithoutProperties","_excluded","arrayWithoutHoles","iterableToArray","nonIterableSpread","emitStartedEvent","operationName","setTimeout","_toConsumableArray","isRequestCancelled","isCancelled","configuredApi","mappedContext","apiBoundOperations","operations","operation","bind","eventDecoratedOperations","_len","_key"],"mappings":"qXAeAA,UAfA,SAAyBC,EAAKC,EAAKC,GAYjC,OAXID,KAAOD,EACTG,OAAOC,eAAeJ,EAAKC,EAAK,CAC9BC,MAAOA,EACPG,YAAY,EACZC,cAAc,EACdC,UAAU,IAGZP,EAAIC,GAAOC,EAGNF,GAITD,EAAOS,QAAiB,QAAIT,EAAOS,QAAST,sBAA4B,gBCV3DU,KAASC,OCNO,YDMYA,OCJR,gBDI6BA,OCHxB,iBDKhCC,EAAoB,mBACbC,EAA8BD,EAAoB,SAClDE,EAAiCF,EAAoB,WACrDG,EAAmB,UAS1BC,EAAa,CAEjBC,sBAAuB,MAEvBC,qBAAsB,OAUlBC,EAAQ,CAEZC,YAAa,OAEbC,gBAAiB,WAEjBC,aAAc,QAEdC,aAAc,QAEdC,aAAc,QAEdC,2BAA4B,sBAWxBC,EAAU,CAEdC,gBAAiB,6BEvDnB3B,UAJA,SAAyB4B,GACvB,GAAIC,MAAMC,QAAQF,GAAM,OAAO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