encore-api-services
Advanced tools
Comparing version 0.0.3 to 0.0.4
import './typings'; | ||
export * from './services'; | ||
export { getDeliveries, getBasket } from './services'; | ||
export * from './typings'; | ||
export * from './models'; |
import './typings'; | ||
export * from './services'; | ||
export { getImages, getProduct } from './services'; | ||
export * from './typings'; | ||
export * from './models'; | ||
export { Product } from './models'; |
import './typings'; | ||
export * from './typings'; | ||
export { Address, Amount } from './typings'; | ||
export * from './basket'; | ||
export * from './content-service'; |
@@ -1,2 +0,2 @@ | ||
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="//",n(n.s="./src/index.ts")}({"./node_modules/axios/index.js":function(e,t,n){e.exports=n("./node_modules/axios/lib/axios.js")},"./node_modules/axios/lib/adapters/xhr.js":function(e,t,n){"use strict";var r=n("./node_modules/axios/lib/utils.js"),o=n("./node_modules/axios/lib/core/settle.js"),i=n("./node_modules/axios/lib/helpers/buildURL.js"),s=n("./node_modules/axios/lib/helpers/parseHeaders.js"),u=n("./node_modules/axios/lib/helpers/isURLSameOrigin.js"),a=n("./node_modules/axios/lib/core/createError.js"),c="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n("./node_modules/axios/lib/helpers/btoa.js");e.exports=function(e){return new Promise(function(t,l){var f=e.data,p=e.headers;r.isFormData(f)&&delete p["Content-Type"];var d=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in d||u(e.url)||(d=new window.XDomainRequest,h="onload",m=!0,d.onprogress=function(){},d.ontimeout=function(){}),e.auth){var y=e.auth.username||"",b=e.auth.password||"";p.Authorization="Basic "+c(y+":"+b)}if(d.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d[h]=function(){if(d&&(4===d.readyState||m)&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?s(d.getAllResponseHeaders()):null,r={data:e.responseType&&"text"!==e.responseType?d.response:d.responseText,status:1223===d.status?204:d.status,statusText:1223===d.status?"No Content":d.statusText,headers:n,config:e,request:d};o(t,l,r),d=null}},d.onerror=function(){l(a("Network Error",e,null,d)),d=null},d.ontimeout=function(){l(a("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var v=n("./node_modules/axios/lib/helpers/cookies.js"),x=(e.withCredentials||u(e.url))&&e.xsrfCookieName?v.read(e.xsrfCookieName):void 0;x&&(p[e.xsrfHeaderName]=x)}if("setRequestHeader"in d&&r.forEach(p,function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete p[t]:d.setRequestHeader(t,e)}),e.withCredentials&&(d.withCredentials=!0),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){d&&(d.abort(),l(e),d=null)}),void 0===f&&(f=null),d.send(f)})}},"./node_modules/axios/lib/axios.js":function(e,t,n){"use strict";var r=n("./node_modules/axios/lib/utils.js"),o=n("./node_modules/axios/lib/helpers/bind.js"),i=n("./node_modules/axios/lib/core/Axios.js"),s=n("./node_modules/axios/lib/defaults.js");function u(e){var t=new i(e),n=o(i.prototype.request,t);return r.extend(n,i.prototype,t),r.extend(n,t),n}var a=u(s);a.Axios=i,a.create=function(e){return u(r.merge(s,e))},a.Cancel=n("./node_modules/axios/lib/cancel/Cancel.js"),a.CancelToken=n("./node_modules/axios/lib/cancel/CancelToken.js"),a.isCancel=n("./node_modules/axios/lib/cancel/isCancel.js"),a.all=function(e){return Promise.all(e)},a.spread=n("./node_modules/axios/lib/helpers/spread.js"),e.exports=a,e.exports.default=a},"./node_modules/axios/lib/cancel/Cancel.js":function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},"./node_modules/axios/lib/cancel/CancelToken.js":function(e,t,n){"use strict";var r=n("./node_modules/axios/lib/cancel/Cancel.js");function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new r(e),t(n.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o(function(t){e=t}),cancel:e}},e.exports=o},"./node_modules/axios/lib/cancel/isCancel.js":function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},"./node_modules/axios/lib/core/Axios.js":function(e,t,n){"use strict";var r=n("./node_modules/axios/lib/defaults.js"),o=n("./node_modules/axios/lib/utils.js"),i=n("./node_modules/axios/lib/core/InterceptorManager.js"),s=n("./node_modules/axios/lib/core/dispatchRequest.js");function u(e){this.defaults=e,this.interceptors={request:new i,response:new i}}u.prototype.request=function(e){"string"==typeof e&&(e=o.merge({url:arguments[0]},arguments[1])),(e=o.merge(r,{method:"get"},this.defaults,e)).method=e.method.toLowerCase();var t=[s,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},o.forEach(["delete","get","head","options"],function(e){u.prototype[e]=function(t,n){return this.request(o.merge(n||{},{method:e,url:t}))}}),o.forEach(["post","put","patch"],function(e){u.prototype[e]=function(t,n,r){return this.request(o.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=u},"./node_modules/axios/lib/core/InterceptorManager.js":function(e,t,n){"use strict";var r=n("./node_modules/axios/lib/utils.js");function o(){this.handlers=[]}o.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=o},"./node_modules/axios/lib/core/createError.js":function(e,t,n){"use strict";var r=n("./node_modules/axios/lib/core/enhanceError.js");e.exports=function(e,t,n,o,i){var s=new Error(e);return r(s,t,n,o,i)}},"./node_modules/axios/lib/core/dispatchRequest.js":function(e,t,n){"use strict";var r=n("./node_modules/axios/lib/utils.js"),o=n("./node_modules/axios/lib/core/transformData.js"),i=n("./node_modules/axios/lib/cancel/isCancel.js"),s=n("./node_modules/axios/lib/defaults.js"),u=n("./node_modules/axios/lib/helpers/isAbsoluteURL.js"),a=n("./node_modules/axios/lib/helpers/combineURLs.js");function c(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return c(e),e.baseURL&&!u(e.url)&&(e.url=a(e.baseURL,e.url)),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return c(e),t.data=o(t.data,t.headers,e.transformResponse),t},function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},"./node_modules/axios/lib/core/enhanceError.js":function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e}},"./node_modules/axios/lib/core/settle.js":function(e,t,n){"use strict";var r=n("./node_modules/axios/lib/core/createError.js");e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},"./node_modules/axios/lib/core/transformData.js":function(e,t,n){"use strict";var r=n("./node_modules/axios/lib/utils.js");e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},"./node_modules/axios/lib/defaults.js":function(e,t,n){"use strict";var r=n("./node_modules/axios/lib/utils.js"),o=n("./node_modules/axios/lib/helpers/normalizeHeaderName.js"),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var u={adapter:function(){var e;return"undefined"!=typeof XMLHttpRequest?e=n("./node_modules/axios/lib/adapters/xhr.js"):"undefined"!=typeof process&&(e=n("./node_modules/axios/lib/adapters/xhr.js")),e}(),transformRequest:[function(e,t){return o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)?(s(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],function(e){u.headers[e]={}}),r.forEach(["post","put","patch"],function(e){u.headers[e]=r.merge(i)}),e.exports=u},"./node_modules/axios/lib/helpers/bind.js":function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},"./node_modules/axios/lib/helpers/btoa.js":function(e,t,n){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(){this.message="String contains an invalid character"}o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError",e.exports=function(e){for(var t,n,i=String(e),s="",u=0,a=r;i.charAt(0|u)||(a="=",u%1);s+=a.charAt(63&t>>8-u%1*8)){if((n=i.charCodeAt(u+=.75))>255)throw new o;t=t<<8|n}return s}},"./node_modules/axios/lib/helpers/buildURL.js":function(e,t,n){"use strict";var r=n("./node_modules/axios/lib/utils.js");function o(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var s=[];r.forEach(t,function(e,t){null!==e&&void 0!==e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),s.push(o(t)+"="+o(e))}))}),i=s.join("&")}return i&&(e+=(-1===e.indexOf("?")?"?":"&")+i),e}},"./node_modules/axios/lib/helpers/combineURLs.js":function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},"./node_modules/axios/lib/helpers/cookies.js":function(e,t,n){"use strict";var r=n("./node_modules/axios/lib/utils.js");e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,s){var u=[];u.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&u.push("expires="+new Date(n).toGMTString()),r.isString(o)&&u.push("path="+o),r.isString(i)&&u.push("domain="+i),!0===s&&u.push("secure"),document.cookie=u.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},"./node_modules/axios/lib/helpers/isAbsoluteURL.js":function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},"./node_modules/axios/lib/helpers/isURLSameOrigin.js":function(e,t,n){"use strict";var r=n("./node_modules/axios/lib/utils.js");e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},"./node_modules/axios/lib/helpers/normalizeHeaderName.js":function(e,t,n){"use strict";var r=n("./node_modules/axios/lib/utils.js");e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},"./node_modules/axios/lib/helpers/parseHeaders.js":function(e,t,n){"use strict";var r=n("./node_modules/axios/lib/utils.js"),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,s={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(s[t]&&o.indexOf(t)>=0)return;s[t]="set-cookie"===t?(s[t]?s[t]:[]).concat([n]):s[t]?s[t]+", "+n:n}}),s):s}},"./node_modules/axios/lib/helpers/spread.js":function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},"./node_modules/axios/lib/utils.js":function(e,t,n){"use strict";var r=n("./node_modules/axios/lib/helpers/bind.js"),o=n("./node_modules/is-buffer/index.js"),i=Object.prototype.toString;function s(e){return"[object Array]"===i.call(e)}function u(e){return null!==e&&"object"==typeof e}function a(e){return"[object Function]"===i.call(e)}function c(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),s(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:s,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:o,isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:u,isUndefined:function(e){return void 0===e},isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:a,isStream:function(e){return u(e)&&a(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:c,merge:function e(){var t={};function n(n,r){"object"==typeof t[r]&&"object"==typeof n?t[r]=e(t[r],n):t[r]=n}for(var r=0,o=arguments.length;r<o;r++)c(arguments[r],n);return t},extend:function(e,t,n){return c(t,function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t}),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}}},"./node_modules/is-buffer/index.js":function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("logger",[],e):"object"==typeof exports?exports.logger=e():t.logger=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=27)}([function(t,e,n){"use strict";var r=n(2),o=n(10),i=Object.prototype.toString;function u(t){return"[object Array]"===i.call(t)}function c(t){return null!==t&&"object"==typeof t}function a(t){return"[object Function]"===i.call(t)}function s(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),u(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}t.exports={isArray:u,isArrayBuffer:function(t){return"[object ArrayBuffer]"===i.call(t)},isBuffer:o,isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:c,isUndefined:function(t){return void 0===t},isDate:function(t){return"[object Date]"===i.call(t)},isFile:function(t){return"[object File]"===i.call(t)},isBlob:function(t){return"[object Blob]"===i.call(t)},isFunction:a,isStream:function(t){return c(t)&&a(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:s,merge:function t(){var e={};function n(n,r){"object"==typeof e[r]&&"object"==typeof n?e[r]=t(e[r],n):e[r]=n}for(var r=0,o=arguments.length;r<o;r++)s(arguments[r],n);return e},extend:function(t,e,n){return s(e,function(e,o){t[o]=n&&"function"==typeof e?r(e,n):e}),t},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}}},function(t,e,n){"use strict";var r=n(0),o=n(12),i={"Content-Type":"application/x-www-form-urlencoded"};function u(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var c={adapter:function(){var t;return"undefined"!=typeof XMLHttpRequest?t=n(3):"undefined"!=typeof process&&(t=n(3)),t}(),transformRequest:[function(t,e){return o(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(u(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(u(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],function(t){c.headers[t]={}}),r.forEach(["post","put","patch"],function(t){c.headers[t]=r.merge(i)}),t.exports=c},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(0),o=n(13),i=n(15),u=n(16),c=n(17),a=n(4),s="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(18);t.exports=function(t){return new Promise(function(e,f){var l=t.data,p=t.headers;r.isFormData(l)&&delete p["Content-Type"];var h=new XMLHttpRequest,d="onreadystatechange",y=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in h||c(t.url)||(h=new window.XDomainRequest,d="onload",y=!0,h.onprogress=function(){},h.ontimeout=function(){}),t.auth){var m=t.auth.username||"",v=t.auth.password||"";p.Authorization="Basic "+s(m+":"+v)}if(h.open(t.method.toUpperCase(),i(t.url,t.params,t.paramsSerializer),!0),h.timeout=t.timeout,h[d]=function(){if(h&&(4===h.readyState||y)&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in h?u(h.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?h.response:h.responseText,status:1223===h.status?204:h.status,statusText:1223===h.status?"No Content":h.statusText,headers:n,config:t,request:h};o(e,f,r),h=null}},h.onerror=function(){f(a("Network Error",t,null,h)),h=null},h.ontimeout=function(){f(a("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var g=n(19),w=(t.withCredentials||c(t.url))&&t.xsrfCookieName?g.read(t.xsrfCookieName):void 0;w&&(p[t.xsrfHeaderName]=w)}if("setRequestHeader"in h&&r.forEach(p,function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete p[e]:h.setRequestHeader(e,t)}),t.withCredentials&&(h.withCredentials=!0),t.responseType)try{h.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&h.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){h&&(h.abort(),f(t),h=null)}),void 0===l&&(l=null),h.send(l)})}},function(t,e,n){"use strict";var r=n(14);t.exports=function(t,e,n,o,i){var u=new Error(t);return r(u,e,n,o,i)}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){t.exports=n(9)},function(t,e){},function(t,e,n){"use strict";var r=n(0),o=n(2),i=n(11),u=n(1);function c(t){var e=new i(t),n=o(i.prototype.request,e);return r.extend(n,i.prototype,e),r.extend(n,e),n}var a=c(u);a.Axios=i,a.create=function(t){return c(r.merge(u,t))},a.Cancel=n(6),a.CancelToken=n(25),a.isCancel=n(5),a.all=function(t){return Promise.all(t)},a.spread=n(26),t.exports=a,t.exports.default=a},function(t,e){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)} | ||
/*! | ||
@@ -8,2 +8,2 @@ * Determine if an object is a Buffer | ||
*/ | ||
e.exports=function(e){return null!=e&&(n(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}(e)||!!e._isBuffer)}},"./src/index.ts":function(e,t,n){"use strict";n.r(t);var r,o,i;n("./src/typings/index.ts");!function(e){e.Collection="collection",e.Postage="postage",e.Eticket="eticket"}(r||(r={})),function(e){e.Active="active",e.Expired="expired",e.Confirmed="confirmed"}(o||(o={})),function(e){e.Show="SHW",e.Attraction="ATT",e.Flexitickets="FLX",e.GiftVoucher="GVC",e.Postage="PST"}(i||(i={}));var s,u,a=n("./node_modules/axios/index.js"),c=n.n(a),l=function(){return(l=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},f=function(e){var t={baseURL:e},n=c.a.create(t);return n.interceptors.response.use(p,d),n},p=function(e){var t=e.data;return t?l({},e,{data:t.response}):e},d=function(e){var t=e.response;return t?t.data.context.errors:[]},h=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{a(r.next(e))}catch(e){i(e)}}function u(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,u)}a((r=r.apply(e,t||[])).next())})},m=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},y=f("https://basket.dev.aws.encoretix.co.uk/api/v1"),b={getBasket:function(e){return h(void 0,void 0,void 0,function(){var t;return m(this,function(n){switch(n.label){case 0:return t="/baskets/"+e,[4,y.get(t)];case 1:return[2,n.sent().data]}})})},getDeliveries:function(e){return h(void 0,void 0,void 0,function(){var t;return m(this,function(n){switch(n.label){case 0:return t="/baskets/"+e+"/deliveries",[4,y.get(t)];case 1:return[2,n.sent().data]}})})}};!function(e){e.Products="products"}(s||(s={})),function(e){e.Square="square",e.Landscape="landscape",e.Portrait="portrait",e.Default="default"}(u||(u={}));var v,x,g=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{a(r.next(e))}catch(e){i(e)}}function u(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,u)}a((r=r.apply(e,t||[])).next())})},w=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},j=f("https://content.dev.aws.encoretix.co.uk/api/v1"),_={getProduct:function(e){return g(void 0,void 0,void 0,function(){var t;return w(this,function(n){switch(n.label){case 0:return t="/products/"+e,[4,j.get(t)];case 1:return[2,n.sent().data]}})})}},S=function(){function e(e){var t=e.name,n=e.showType,r=e.venue,o=e.id;this.name=t,this.type=n,this.venue=r,this.id=o}return e.prototype.getName=function(){return this.name},e.prototype.getType=function(){return this.type},e.prototype.getVenue=function(){return this.venue},e}(),k=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{a(r.next(e))}catch(e){i(e)}}function u(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,u)}a((r=r.apply(e,t||[])).next())})},P=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},A=function(e){return k(void 0,void 0,void 0,function(){var t;return P(this,function(n){switch(n.label){case 0:return[4,_.getProduct(e)];case 1:return t=n.sent(),[2,new S(t)]}})})},C=((v={})[u.Default]=[{screenSize:"xxl",imageSize:80},{screenSize:"xl",imageSize:64},{screenSize:"lg",imageSize:48},{screenSize:"md",imageSize:64},{screenSize:"sm",imageSize:64}],v),E=function(e,t,n){return void 0===n&&(n=u.Default),C[n].map(function(r){var o=r.screenSize,i=r.imageSize;return{screenSize:o,url:"https://content.dev.aws.encoretix.co.uk/images/"+e+"/"+t+"/"+n+"?width="+i}})},T=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{a(r.next(e))}catch(e){i(e)}}function u(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,u)}a((r=r.apply(e,t||[])).next())})},D=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},R=function(){function e(e){var t=e.id,n=e.quantity,r=e.productId,o=e.productName,i=e.productType,s=e.faceValue,u=e.salePrice,a=e.date,c=e.seats,l=e.venueId;this.id=t,this.quantity=n,this.productId=r,this.productName=o,this.productType=i,this.faceValue=s,this.salePrice=u,this.date=new Date(a),this.seats=c,this.venueId=l}return e.prototype.getId=function(){return this.id},e.prototype.getQuantity=function(){return this.quantity},e.prototype.getProductId=function(){return this.productId},e.prototype.getProductName=function(){return this.productName},e.prototype.isVoucher=function(){return this.productType===i.GiftVoucher},e.prototype.isPostage=function(){return this.productType===i.Postage},e.prototype.isFlexiticket=function(){return this.productType===i.Flexitickets},e.prototype.isShow=function(){return this.productType===i.Show},e.prototype.isAttraction=function(){return this.productType===i.Attraction},e.prototype.getProductType=function(){return this.productType},e.prototype.getFaceValue=function(){return this.faceValue},e.prototype.getSalePrice=function(){return this.salePrice},e.prototype.getFaceValueAmount=function(){return this.faceValue.value},e.prototype.getSalePriceAmount=function(){return this.salePrice.value},e.prototype.hasDiscount=function(){return this.getFaceValueAmount()>this.getSalePriceAmount()},e.prototype.getDiscount=function(){return this.quantity*(this.getFaceValueAmount()-this.getSalePriceAmount())},e.prototype.getTotalPrice=function(){return this.quantity*this.getSalePriceAmount()},e.prototype.getPriceBeforeDiscount=function(){return this.quantity*this.getFaceValueAmount()},e.prototype.getDate=function(){return this.date},e.prototype.getSeats=function(){return this.seats},e.prototype.getProductDetails=function(){return T(this,void 0,void 0,function(){var e;return D(this,function(t){switch(t.label){case 0:return this.product?[3,2]:(e=this,[4,A(this.productId)]);case 1:e.product=t.sent(),t.label=2;case 2:return[2,this.product]}})})},e.prototype.getImages=function(){return E(s.Products,this.productId)},e.prototype.getVenueId=function(){return this.venueId},e}(),B=function(){return(B=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},N=function(){function e(e){this.items=[],this.items=e.map(function(e,t){return new R(B({},e,{id:(t+1).toString()}))})}return e.prototype.getItems=function(){return this.items.slice()},e.prototype.hasVoucher=function(){return this.items.some(function(e){return e.isVoucher()})},e.prototype.hasPostage=function(){return this.items.some(function(e){return e.isPostage()})},e.prototype.hasFlexiticket=function(){return this.items.some(function(e){return e.isFlexiticket()})},e.prototype.hasShow=function(){return this.items.some(function(e){return e.isShow()})},e.prototype.hasAttraction=function(){return this.items.some(function(e){return e.isAttraction()})},e.prototype.getLength=function(){return this.items.length},e.prototype.getAttractions=function(){return this.items.filter(function(e){return e.isAttraction()})},e.prototype.getFlexiticket=function(){return this.items.find(function(e){return e.isFlexiticket()})},e.prototype.getPostage=function(){return this.items.find(function(e){return e.isPostage()})},e}(),O=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{a(r.next(e))}catch(e){i(e)}}function u(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,u)}a((r=r.apply(e,t||[])).next())})},I=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},L=function(){function e(e){this.basketData=e;var t=e.reservations,n=e.expiredAt,r=e.status,o=e.reference;this.itemsCollection=new N(t),this.expiredAt=new Date(n),this.status=r,this.reference=o}return e.prototype.getExpiredDate=function(){return this.expiredAt},e.prototype.isExpired=function(){return this.status===o.Expired||this.expiredAt<new Date},e.prototype.getReference=function(){return this.reference},e.prototype.getItemsCollection=function(){return this.itemsCollection},e.prototype.getDeliveries=function(){return O(this,void 0,void 0,function(){var e;return I(this,function(t){switch(t.label){case 0:return this.deliveries?[3,2]:(e=this,[4,H(this.reference,this.getItemsCollection())]);case 1:e.deliveries=t.sent(),t.label=2;case 2:return[2,this.deliveries]}})})},e.prototype.isEmpty=function(){return!this.itemsCollection.getLength()},e.prototype.getTotalPrice=function(){return this.reduceBasketItemsAmount(function(e,t){return e+t.getTotalPrice()})},e.prototype.getTotalDiscount=function(){return this.reduceBasketItemsAmount(function(e,t){return e+t.getDiscount()})},e.prototype.getTotalPriceBeforeDiscount=function(){return this.reduceBasketItemsAmount(function(e,t){return e+t.getPriceBeforeDiscount()})},e.prototype.hasDiscount=function(){return this.itemsCollection.getItems().some(function(e){return e.hasDiscount()})},e.prototype.reduceBasketItemsAmount=function(e){return this.itemsCollection.getItems().reduce(e,0)},e}(),q=((x={})[r.Collection]={name:"Collect at the Box Office",voucherName:"Free postal delivery",attractionName:"Print at home voucher"},x[r.Postage]={name:"By Post – UK Addresses only"},x[r.Eticket]={name:"Print at Home"},x),U=function(){function e(e,t){var n=e.method,r=e.charge;this.amount=r,this.method=n,this.setName(t)}return e.prototype.getAmount=function(){return this.amount},e.prototype.getMethod=function(){return this.method},e.prototype.getName=function(){return this.name},e.prototype.setName=function(e){this.name=this.method===r.Collection?this.getCollectionDeliveryName(e):q[this.method].name},e.prototype.getCollectionDeliveryName=function(e){var t=q[r.Collection];return e.hasVoucher()?t.voucherName:e.hasAttraction()?t.attractionName:t.name},e}(),F=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function s(e){try{a(r.next(e))}catch(e){i(e)}}function u(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(s,u)}a((r=r.apply(e,t||[])).next())})},V=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}},z=function(e){return F(void 0,void 0,void 0,function(){var t;return V(this,function(n){switch(n.label){case 0:return[4,b.getBasket(e)];case 1:return t=n.sent(),[2,new L(t)]}})})},H=function(e,t){return F(void 0,void 0,void 0,function(){return V(this,function(n){switch(n.label){case 0:return[4,b.getDeliveries(e)];case 1:return[2,n.sent().map(function(e){return new U(e,t)})]}})})};n.d(t,"basketApi",function(){return b}),n.d(t,"getBasket",function(){return z}),n.d(t,"getDeliveries",function(){return H}),n.d(t,"DeliveryMethod",function(){return r}),n.d(t,"BasketStatus",function(){return o}),n.d(t,"ProductType",function(){return i}),n.d(t,"Basket",function(){return L}),n.d(t,"Delivery",function(){return U}),n.d(t,"BasketItemsCollection",function(){return N}),n.d(t,"BasketItem",function(){return R}),n.d(t,"contentServiceApi",function(){return _}),n.d(t,"getProduct",function(){return A}),n.d(t,"getImages",function(){return E}),n.d(t,"EntityType",function(){return s}),n.d(t,"ImageOrientation",function(){return u}),n.d(t,"Product",function(){return S})},"./src/typings/index.ts":function(e,t){}}); | ||
t.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,e,n){"use strict";var r=n(1),o=n(0),i=n(20),u=n(21);function c(t){this.defaults=t,this.interceptors={request:new i,response:new i}}c.prototype.request=function(t){"string"==typeof t&&(t=o.merge({url:arguments[0]},arguments[1])),(t=o.merge(r,{method:"get"},this.defaults,t)).method=t.method.toLowerCase();var e=[u,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},o.forEach(["delete","get","head","options"],function(t){c.prototype[t]=function(e,n){return this.request(o.merge(n||{},{method:t,url:e}))}}),o.forEach(["post","put","patch"],function(t){c.prototype[t]=function(e,n,r){return this.request(o.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=c},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,o){return t.config=e,n&&(t.code=n),t.request=r,t.response=o,t}},function(t,e,n){"use strict";var r=n(0);function o(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(r.isURLSearchParams(e))i=e.toString();else{var u=[];r.forEach(e,function(t,e){null!==t&&void 0!==t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),u.push(o(e)+"="+o(t))}))}),i=u.join("&")}return i&&(t+=(-1===t.indexOf("?")?"?":"&")+i),t}},function(t,e,n){"use strict";var r=n(0),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,i,u={};return t?(r.forEach(t.split("\n"),function(t){if(i=t.indexOf(":"),e=r.trim(t.substr(0,i)).toLowerCase(),n=r.trim(t.substr(i+1)),e){if(u[e]&&o.indexOf(e)>=0)return;u[e]="set-cookie"===e?(u[e]?u[e]:[]).concat([n]):u[e]?u[e]+", "+n:n}}),u):u}},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(e){var n=r.isString(e)?o(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},function(t,e,n){"use strict";var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(){this.message="String contains an invalid character"}o.prototype=new Error,o.prototype.code=5,o.prototype.name="InvalidCharacterError",t.exports=function(t){for(var e,n,i=String(t),u="",c=0,a=r;i.charAt(0|c)||(a="=",c%1);u+=a.charAt(63&e>>8-c%1*8)){if((n=i.charCodeAt(c+=.75))>255)throw new o;e=e<<8|n}return u}},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?{write:function(t,e,n,o,i,u){var c=[];c.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&c.push("expires="+new Date(n).toGMTString()),r.isString(o)&&c.push("path="+o),r.isString(i)&&c.push("domain="+i),!0===u&&c.push("secure"),document.cookie=c.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(0);function o(){this.handlers=[]}o.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){r.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=o},function(t,e,n){"use strict";var r=n(0),o=n(22),i=n(5),u=n(1),c=n(23),a=n(24);function s(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(t){return s(t),t.baseURL&&!c(t.url)&&(t.url=a(t.baseURL,t.url)),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=r.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),r.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||u.adapter)(t).then(function(e){return s(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return i(e)||(s(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var r=n(6);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new r(t),e(n.reason))})}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var t;return{token:new o(function(e){t=e}),cancel:t}},t.exports=o},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},function(t,e,n){"use strict";n.r(e);var r,o,i;n(8);!function(t){t.Collection="collection",t.Postage="postage",t.Eticket="eticket"}(r||(r={})),function(t){t.Active="active",t.Expired="expired",t.Confirmed="confirmed"}(o||(o={})),function(t){t.Show="SHW",t.Attraction="ATT",t.Flexitickets="FLX",t.GiftVoucher="GVC",t.Postage="PST"}(i||(i={}));var u,c,a=n(7),s=n.n(a),f=function(){return(f=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},l=function(t){var e={baseURL:t},n=s.a.create(e);return n.interceptors.response.use(p,h),n},p=function(t){var e=t.data;return e?f({},t,{data:e.response}):t},h=function(t){var e=t.response;return e?e.data.context.errors:[]},d=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{a(r.next(t))}catch(t){i(t)}}function c(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(u,c)}a((r=r.apply(t,e||[])).next())})},y=function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}},m=l("http://localhost:3123/api/v1"),v=function(t){return d(void 0,void 0,void 0,function(){var e;return y(this,function(n){switch(n.label){case 0:return e="/baskets/"+t,[4,m.get(e)];case 1:return[2,n.sent().data]}})})};!function(t){t.Products="products"}(u||(u={})),function(t){t.Square="square",t.Landscape="landscape",t.Portrait="portrait",t.Default="default"}(c||(c={}));var g,w,b=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{a(r.next(t))}catch(t){i(t)}}function c(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(u,c)}a((r=r.apply(t,e||[])).next())})},x=function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}},S=l("https://content.dev.aws.encoretix.co.uk/api/v1"),P=function(t){return b(void 0,void 0,void 0,function(){var e;return x(this,function(n){switch(n.label){case 0:return e="/products/"+t,[4,S.get(e)];case 1:return[2,n.sent().data]}})})},k=function(){function t(t){var e=t.name,n=t.showType,r=t.venue,o=t.id;this.name=e,this.type=n,this.venue=r,this.id=o}return t.prototype.getName=function(){return this.name},t.prototype.getType=function(){return this.type},t.prototype.getVenue=function(){return this.venue},t}(),A=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{a(r.next(t))}catch(t){i(t)}}function c(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(u,c)}a((r=r.apply(t,e||[])).next())})},C=function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}},T=function(t){return A(void 0,void 0,void 0,function(){var e;return C(this,function(n){switch(n.label){case 0:return[4,P(t)];case 1:return e=n.sent(),[2,new k(e)]}})})},E=((g={})[c.Default]=[{screenSize:"xxl",imageSize:80},{screenSize:"xl",imageSize:64},{screenSize:"lg",imageSize:48},{screenSize:"md",imageSize:64},{screenSize:"sm",imageSize:64}],g),D=function(t,e,n){return void 0===n&&(n=c.Default),E[n].map(function(r){var o=r.screenSize,i=r.imageSize;return{screenSize:o,url:"https://content.dev.aws.encoretix.co.uk/images/"+t+"/"+e+"/"+n+"?width="+i}})},B=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{a(r.next(t))}catch(t){i(t)}}function c(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(u,c)}a((r=r.apply(t,e||[])).next())})},j=function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}},R=function(){function t(t){var e=t.id,n=t.quantity,r=t.productId,o=t.productName,i=t.productType,u=t.faceValue,c=t.salePrice,a=t.date,s=t.seats,f=t.venueId;this.id=e,this.quantity=n,this.productId=r,this.productName=o,this.productType=i,this.faceValue=u,this.salePrice=c,this.date=new Date(a),this.seats=s,this.venueId=f}return t.prototype.getId=function(){return this.id},t.prototype.getQuantity=function(){return this.quantity},t.prototype.getProductId=function(){return this.productId},t.prototype.getProductName=function(){return this.productName},t.prototype.isVoucher=function(){return this.productType===i.GiftVoucher},t.prototype.isPostage=function(){return this.productType===i.Postage},t.prototype.isFlexiticket=function(){return this.productType===i.Flexitickets},t.prototype.isShow=function(){return this.productType===i.Show},t.prototype.isAttraction=function(){return this.productType===i.Attraction},t.prototype.getProductType=function(){return this.productType},t.prototype.getFaceValue=function(){return this.faceValue},t.prototype.getSalePrice=function(){return this.salePrice},t.prototype.getFaceValueAmount=function(){return this.faceValue.value},t.prototype.getSalePriceAmount=function(){return this.salePrice.value},t.prototype.hasDiscount=function(){return this.getFaceValueAmount()>this.getSalePriceAmount()},t.prototype.getDiscount=function(){return this.quantity*(this.getFaceValueAmount()-this.getSalePriceAmount())},t.prototype.getTotalPrice=function(){return this.quantity*this.getSalePriceAmount()},t.prototype.getPriceBeforeDiscount=function(){return this.quantity*this.getFaceValueAmount()},t.prototype.getDate=function(){return this.date},t.prototype.getSeats=function(){return this.seats},t.prototype.getProductDetails=function(){return B(this,void 0,void 0,function(){var t;return j(this,function(e){switch(e.label){case 0:return this.product?[3,2]:(t=this,[4,T(this.productId)]);case 1:t.product=e.sent(),e.label=2;case 2:return[2,this.product]}})})},t.prototype.getImages=function(){return D(u.Products,this.productId)},t.prototype.getVenueId=function(){return this.venueId},t}(),N=function(){return(N=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},O=function(){function t(t){this.items=[],this.items=t.map(function(t,e){return new R(N({},t,{id:(e+1).toString()}))})}return t.prototype.getItems=function(){return this.items.slice()},t.prototype.hasVoucher=function(){return this.items.some(function(t){return t.isVoucher()})},t.prototype.hasPostage=function(){return this.items.some(function(t){return t.isPostage()})},t.prototype.hasFlexiticket=function(){return this.items.some(function(t){return t.isFlexiticket()})},t.prototype.hasShow=function(){return this.items.some(function(t){return t.isShow()})},t.prototype.hasAttraction=function(){return this.items.some(function(t){return t.isAttraction()})},t.prototype.getLength=function(){return this.items.length},t.prototype.getAttractions=function(){return this.items.filter(function(t){return t.isAttraction()})},t.prototype.getFlexiticket=function(){return this.items.find(function(t){return t.isFlexiticket()})},t.prototype.getPostage=function(){return this.items.find(function(t){return t.isPostage()})},t}(),I=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{a(r.next(t))}catch(t){i(t)}}function c(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(u,c)}a((r=r.apply(t,e||[])).next())})},q=function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}},F=function(){function t(t){this.basketData=t;var e=t.reservations,n=t.expiredAt,r=t.status,o=t.reference;this.itemsCollection=new O(e),this.expiredAt=new Date(n),this.status=r,this.reference=o}return t.prototype.getExpiredDate=function(){return this.expiredAt},t.prototype.isExpired=function(){return this.status===o.Expired||this.expiredAt<new Date},t.prototype.getReference=function(){return this.reference},t.prototype.getItemsCollection=function(){return this.itemsCollection},t.prototype.getDeliveries=function(){return I(this,void 0,void 0,function(){var t;return q(this,function(e){switch(e.label){case 0:return this.deliveries?[3,2]:(t=this,[4,G(this.reference,this.getItemsCollection())]);case 1:t.deliveries=e.sent(),e.label=2;case 2:return[2,this.deliveries]}})})},t.prototype.isEmpty=function(){return!this.itemsCollection.getLength()},t.prototype.getTotalPrice=function(){return this.reduceBasketItemsAmount(function(t,e){return t+e.getTotalPrice()})},t.prototype.getTotalDiscount=function(){return this.reduceBasketItemsAmount(function(t,e){return t+e.getDiscount()})},t.prototype.getTotalPriceBeforeDiscount=function(){return this.reduceBasketItemsAmount(function(t,e){return t+e.getPriceBeforeDiscount()})},t.prototype.hasDiscount=function(){return this.itemsCollection.getItems().some(function(t){return t.hasDiscount()})},t.prototype.reduceBasketItemsAmount=function(t){return this.itemsCollection.getItems().reduce(t,0)},t}(),L=((w={})[r.Collection]={name:"Collect at the Box Office",voucherName:"Free postal delivery",attractionName:"Print at home voucher"},w[r.Postage]={name:"By Post – UK Addresses only"},w[r.Eticket]={name:"Print at Home"},w),U=function(){function t(t,e){var n=t.method,r=t.charge;this.amount=r,this.method=n,this.setName(e)}return t.prototype.getAmount=function(){return this.amount},t.prototype.getMethod=function(){return this.method},t.prototype.getName=function(){return this.name},t.prototype.setName=function(t){this.name=this.method===r.Collection?this.getCollectionDeliveryName(t):L[this.method].name},t.prototype.getCollectionDeliveryName=function(t){var e=L[r.Collection];return t.hasVoucher()?e.voucherName:t.hasAttraction()?e.attractionName:e.name},t}(),V=function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function u(t){try{a(r.next(t))}catch(t){i(t)}}function c(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(u,c)}a((r=r.apply(t,e||[])).next())})},z=function(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=(o=u.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}},_=function(t){return V(void 0,void 0,void 0,function(){var e;return z(this,function(n){switch(n.label){case 0:return[4,v(t)];case 1:return e=n.sent(),[2,new F(e)]}})})},G=function(t,e){return V(void 0,void 0,void 0,function(){return z(this,function(t){return[2,[{method:r.Collection,charge:{value:100,currency:"GBP"}},{method:r.Eticket,charge:{value:100,currency:"GBP"}}].map(function(t){return new U(t,e)})]})})};n.d(e,"getDeliveries",function(){return G}),n.d(e,"getBasket",function(){return _}),n.d(e,"DeliveryMethod",function(){return r}),n.d(e,"BasketStatus",function(){return o}),n.d(e,"ProductType",function(){return i}),n.d(e,"Basket",function(){return F}),n.d(e,"Delivery",function(){return U}),n.d(e,"BasketItemsCollection",function(){return O}),n.d(e,"BasketItem",function(){return R}),n.d(e,"getImages",function(){return D}),n.d(e,"getProduct",function(){return T}),n.d(e,"Product",function(){return k}),n.d(e,"EntityType",function(){return u}),n.d(e,"ImageOrientation",function(){return c})}])}); |
{ | ||
"name": "encore-api-services", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
@@ -14,3 +15,3 @@ "/dist" | ||
"build": "npm-run-all build-ts", | ||
"build-ts": "webpack --config webpack/webpack.prod.js --progress", | ||
"build-ts": "webpack --config webpack/webpack.build.js --progress", | ||
"build-info": "webpack --config webpack/webpack.info.js", | ||
@@ -17,0 +18,0 @@ "start": "webpack-dev-server --config webpack/webpack.dev.js", |
41351
306