@artisan-commerce/products 0.8.0-canary.1 → 0.8.0-canary.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/build/{src/config → config}/constants.d.ts +0 -10
  3. package/build/{src/errors → errors}/api.errors.d.ts +0 -0
  4. package/build/{src/index.d.ts → index.d.ts} +0 -0
  5. package/build/{src/lib → lib}/getCategories/getCategories.d.ts +0 -0
  6. package/build/{src/lib → lib}/getCategories/getCategories.test.d.ts +0 -0
  7. package/build/{src/lib → lib}/getProductDetails/getProductDetails.d.ts +0 -0
  8. package/build/{src/lib → lib}/getProductDetails/getProductDetails.test.d.ts +0 -0
  9. package/build/{src/lib → lib}/getProductDetails/getProductDetails.types.d.ts +0 -0
  10. package/build/{src/lib → lib}/getProducts/getProducts.d.ts +0 -0
  11. package/build/{src/lib → lib}/getProducts/getProducts.test.d.ts +0 -0
  12. package/build/{src/lib → lib}/getProducts/getProducts.types.d.ts +0 -0
  13. package/build/{src/lib → lib}/getRecommendedProducts/getRecommendedProducts.d.ts +0 -0
  14. package/build/{src/lib → lib}/getRecommendedProducts/getRecommendedProducts.test.d.ts +0 -0
  15. package/build/{src/lib → lib}/getRelatedProducts/getRelatedProducts.d.ts +0 -0
  16. package/build/{src/lib → lib}/getRelatedProducts/getRelatedProducts.test.d.ts +0 -0
  17. package/build/{src/lib → lib}/getStoreDetails/getStoreDetails.d.ts +0 -0
  18. package/build/{src/lib → lib}/getStoreDetails/getStoreDetails.test.d.ts +0 -0
  19. package/build/{src/lib → lib}/getStoreDetails/getStoreDetails.types.d.ts +0 -0
  20. package/build/{src/lib → lib}/initProducts/initProducts.d.ts +0 -0
  21. package/build/{src/lib → lib}/registerModifiersForm/registerModifiersForm.d.ts +0 -0
  22. package/build/{src/lib → lib}/registerModifiersForm/registerModifiersForm.test.d.ts +0 -0
  23. package/build/{src/lib → lib}/registerModifiersForm/registerModifiersForm.types.d.ts +0 -0
  24. package/build/{src/lib → lib}/validateProduct/validateProduct.d.ts +0 -0
  25. package/build/{src/lib → lib}/validateProduct/validateProduct.test.d.ts +0 -0
  26. package/build/{src/lib → lib}/validateProduct/validateProduct.types.d.ts +0 -0
  27. package/build/main.bundle.js +5 -5
  28. package/build/report.json +1 -1
  29. package/build/{src/services → services}/fetchProductDetails/fetchProductDetails.service.d.ts +0 -0
  30. package/build/{src/services → services}/fetchProductDetails/fetchProductDetails.service.mock.d.ts +0 -0
  31. package/build/{src/services → services}/fetchProductDetails/fetchProductDetails.service.types.d.ts +0 -0
  32. package/build/{src/services → services}/fetchProducts/fetchPRoducts.service.mock.d.ts +0 -0
  33. package/build/{src/services → services}/fetchProducts/fetchProducts.service.d.ts +0 -0
  34. package/build/{src/services → services}/fetchProducts/fetchProducts.service.types.d.ts +0 -0
  35. package/build/{src/services → services}/fetchStoreDetails/fetchStoreDetails.service.d.ts +0 -0
  36. package/build/{src/services → services}/fetchStoreDetails/fetchStoreDetails.service.types.d.ts +0 -0
  37. package/build/{src/tests → tests}/exports.test.d.ts +0 -0
  38. package/build/{src/types → types}/common.types.d.ts +0 -0
  39. package/build/{src/types → types}/http.types.d.ts +0 -0
  40. package/build/{src/types → types}/modifiers.types.d.ts +0 -0
  41. package/build/{src/utils → utils}/assertions/assertions.utils.d.ts +0 -0
  42. package/build/{src/utils → utils}/caculations/calculations.utils.d.ts +0 -0
  43. package/build/{src/utils → utils}/caculations/calculations.utils.test.d.ts +0 -0
  44. package/build/{src/utils → utils}/caculations/calculations.utils.types.d.ts +0 -0
  45. package/build/{src/utils → utils}/common.utils.d.ts +0 -0
  46. package/build/{src/utils → utils}/http/http.utils.d.ts +0 -0
  47. package/build/{src/utils → utils}/http/purge.utils.d.ts +0 -0
  48. package/build/{src/utils → utils}/http/request.utils.d.ts +0 -0
  49. package/build/{src/utils → utils}/modifiers/common.utils.d.ts +0 -0
  50. package/build/{src/utils → utils}/modifiers/form.utils.d.ts +0 -0
  51. package/build/{src/utils → utils}/modifiers/handleChange.utils.d.ts +0 -0
  52. package/build/{src/utils → utils}/modifiers/renderer.utils.d.ts +0 -0
  53. package/build/{src/utils → utils}/modifiers/rendererTraversal.utils.d.ts +0 -0
  54. package/build/{src/utils → utils}/modifiers/updateRenderer.utils.d.ts +0 -0
  55. package/build/{src/utils → utils}/questionsAndAnswers/questionsAndAnswers.utils.d.ts +0 -0
  56. package/build/{src/utils → utils}/questionsAndAnswers/questionsAndAnswers.utils.test.d.ts +0 -0
  57. package/build/{src/utils → utils}/services.utils.d.ts +0 -0
  58. package/build/{src/utils → utils}/state/state.utils.d.ts +0 -0
  59. package/build/{src/utils → utils}/transformers/api.transformer.d.ts +0 -0
  60. package/build/{src/utils → utils}/transformers/transformers.utils.d.ts +0 -0
  61. package/build/vendors.bundle.js +1 -1
  62. package/build/{src/vendors.d.ts → vendors.d.ts} +0 -0
  63. package/package.json +8 -12
  64. package/build/src/utils/bugsnag.d.ts +0 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.8.0-canary.3](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/products@0.8.0-canary.2...@artisan-commerce/products@0.8.0-canary.3) (2021-02-25)
7
+
8
+ **Note:** Version bump only for package @artisan-commerce/products
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.8.0-canary.2](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/products@0.8.0-canary.1...@artisan-commerce/products@0.8.0-canary.2) (2021-02-23)
15
+
16
+ **Note:** Version bump only for package @artisan-commerce/products
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.8.0-canary.1](https://bitbucket.org/tradesystem/artisan_monorepo/compare/@artisan-commerce/products@0.8.0-canary.0...@artisan-commerce/products@0.8.0-canary.1) (2021-02-12)
7
23
 
8
24
  **Note:** Version bump only for package @artisan-commerce/products
@@ -1,14 +1,4 @@
1
1
  declare const CONSTANTS: {
2
- CLIENT_NAME: string;
3
- DEFAULT_REQUEST_TIMEOUT: number;
4
- EXCLUDED_LOGGER_STATUS_CODES: number[];
5
- INCLUDED_LOGGER_ENVS: string[];
6
- INCLUDED_INTL_LOG_ENVS: string[];
7
- COUNTRY: {
8
- NAME: string;
9
- CODE: string;
10
- LANGUAGE: string;
11
- };
12
2
  DEFAULT_API_TIMEOUT: number;
13
3
  HEADERS: string[];
14
4
  FILTERS: ("productId" | "vendorId" | "storeId" | "catalogueId" | "categoryId")[];
File without changes
File without changes
@@ -1,19 +1,19 @@
1
- !function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("products",[],r):"object"==typeof exports?exports.products=r():t.products=r()}(this,(function(){return function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=27)}([function(t,r,e){t.exports=function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=1)}([,function(t,r,e){"use strict";e.r(r),e.d(r,"initState",(function(){return i})),e.d(r,"getState",(function(){return a})),e.d(r,"setState",(function(){return u}));var n=function(){return(n=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},o={},i=function(t){Object.freeze(t),o=n({},t),Object.seal(o)},u=function(t){o=n(n({},o),t)},a=function(){return n({},o)}}])},function(t,r,e){t.exports=function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=10)}([function(t,r,e){t.exports=function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=1)}([,function(t,r,e){"use strict";e.r(r),e.d(r,"initState",(function(){return i})),e.d(r,"getState",(function(){return a})),e.d(r,"setState",(function(){return u}));var n=function(){return(n=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},o={},i=function(t){Object.freeze(t),o=n({},t),Object.seal(o)},u=function(t){o=n(n({},o),t)},a=function(){return n({},o)}}])},function(t,r){var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var r=[],e=0;e<t.length;e++)r.push(255&t.charCodeAt(e));return r},bytesToString:function(t){for(var r=[],e=0;e<t.length;e++)r.push(String.fromCharCode(t[e]));return r.join("")}}};t.exports=e},function(t,r,e){(function(r){var n,o,i,u;n=e(8),o=e(1).utf8,i=e(1).bin,(u=function(t,e){var u=n.wordsToBytes(function(t){t.constructor==String?t=o.stringToBytes(t):void 0!==r&&"function"==typeof r.isBuffer&&r.isBuffer(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());var e=n.bytesToWords(t),i=8*t.length,u=[],a=1732584193,s=-271733879,f=-1732584194,c=271733878,l=-1009589776;e[i>>5]|=128<<24-i%32,e[15+(i+64>>>9<<4)]=i;for(var h=0;h<e.length;h+=16){for(var p=a,d=s,y=f,g=c,v=l,b=0;b<80;b++){if(b<16)u[b]=e[h+b];else{var w=u[b-3]^u[b-8]^u[b-14]^u[b-16];u[b]=w<<1|w>>>31}var m=(a<<5|a>>>27)+l+(u[b]>>>0)+(b<20?1518500249+(s&f|~s&c):b<40?1859775393+(s^f^c):b<60?(s&f|s&c|f&c)-1894007588:(s^f^c)-899497514);l=c,c=f,f=s<<30|s>>>2,s=a,a=m}a+=p,s+=d,f+=y,c+=g,l+=v}return[a,s,f,c,l]}(t));return e&&e.asBytes?u:e&&e.asString?i.bytesToString(u):n.bytesToHex(u)})._blocksize=16,u._digestsize=20,t.exports=u}).call(this,e(3).Buffer)},function(t,r,e){"use strict";(function(t){
1
+ !function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("products",[],r):"object"==typeof exports?exports.products=r():t.products=r()}(this,(function(){return function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=31)}([function(t,r,e){t.exports=function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=1)}([,function(t,r,e){"use strict";e.r(r),e.d(r,"initState",(function(){return i})),e.d(r,"getState",(function(){return a})),e.d(r,"setState",(function(){return u}));var n=function(){return(n=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},o={},i=function(t){Object.freeze(t),o=n({},t),Object.seal(o)},u=function(t){o=n(n({},o),t)},a=function(){return n({},o)}}])},function(t,r,e){t.exports=function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=10)}([function(t,r,e){t.exports=function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=1)}([,function(t,r,e){"use strict";e.r(r),e.d(r,"initState",(function(){return i})),e.d(r,"getState",(function(){return a})),e.d(r,"setState",(function(){return u}));var n=function(){return(n=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},o={},i=function(t){Object.freeze(t),o=n({},t),Object.seal(o)},u=function(t){o=n(n({},o),t)},a=function(){return n({},o)}}])},function(t,r){var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var r=[],e=0;e<t.length;e++)r.push(255&t.charCodeAt(e));return r},bytesToString:function(t){for(var r=[],e=0;e<t.length;e++)r.push(String.fromCharCode(t[e]));return r.join("")}}};t.exports=e},function(t,r,e){(function(r){var n,o,i,u;n=e(8),o=e(1).utf8,i=e(1).bin,(u=function(t,e){var u=n.wordsToBytes(function(t){t.constructor==String?t=o.stringToBytes(t):void 0!==r&&"function"==typeof r.isBuffer&&r.isBuffer(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());var e=n.bytesToWords(t),i=8*t.length,u=[],a=1732584193,s=-271733879,f=-1732584194,c=271733878,l=-1009589776;e[i>>5]|=128<<24-i%32,e[15+(i+64>>>9<<4)]=i;for(var h=0;h<e.length;h+=16){for(var p=a,d=s,y=f,g=c,v=l,b=0;b<80;b++){if(b<16)u[b]=e[h+b];else{var w=u[b-3]^u[b-8]^u[b-14]^u[b-16];u[b]=w<<1|w>>>31}var m=(a<<5|a>>>27)+l+(u[b]>>>0)+(b<20?1518500249+(s&f|~s&c):b<40?1859775393+(s^f^c):b<60?(s&f|s&c|f&c)-1894007588:(s^f^c)-899497514);l=c,c=f,f=s<<30|s>>>2,s=a,a=m}a+=p,s+=d,f+=y,c+=g,l+=v}return[a,s,f,c,l]}(t));return e&&e.asBytes?u:e&&e.asString?i.bytesToString(u):n.bytesToHex(u)})._blocksize=16,u._digestsize=20,t.exports=u}).call(this,e(3).Buffer)},function(t,r,e){"use strict";(function(t){
2
2
  /*!
3
3
  * The buffer module from node.js, for the browser.
4
4
  *
5
5
  * @author Feross Aboukhadijeh <http://feross.org>
6
6
  * @license MIT
7
7
  */
8
- var n=e(5),o=e(6),i=e(7);function u(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,r){if(u()<r)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=s.prototype:(null===t&&(t=new s(r)),t.length=r),t}function s(t,r,e){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return f(this,t,r,e)}function f(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?function(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),s.TYPED_ARRAY_SUPPORT?(t=r).__proto__=s.prototype:t=h(t,r),t}(t,r,e,n):"string"==typeof r?function(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!s.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(r,e),o=(t=a(t,n)).write(r,e);return o!==n&&(t=t.slice(0,o)),t}(t,r,e):function(t,r){if(s.isBuffer(r)){var e=0|p(r.length);return 0===(t=a(t,e)).length||r.copy(t,0,0,e),t}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||(n=r.length)!=n?a(t,0):h(t,r);if("Buffer"===r.type&&i(r.data))return h(t,r.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,r)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,r){if(c(r),t=a(t,r<0?0:0|p(r)),!s.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function h(t,r){var e=r.length<0?0:0|p(r.length);t=a(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function p(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function d(t,r){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return k(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return F(t).length;default:if(n)return k(t).length;r=(""+r).toLowerCase(),n=!0}}function y(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,r,e);case"utf8":case"utf-8":return _(this,r,e);case"ascii":return S(this,r,e);case"latin1":case"binary":return I(this,r,e);case"base64":return P(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function v(t,r,e,n,o){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0){if(!o)return-1;e=0}if("string"==typeof r&&(r=s.from(r,n)),s.isBuffer(r))return 0===r.length?-1:b(t,r,e,n,o);if("number"==typeof r)return r&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):b(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,r,e,n,o){var i,u=1,a=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,a/=2,s/=2,e/=2}function f(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(o){var c=-1;for(i=e;i<a;i++)if(f(t,i)===f(r,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===s)return c*u}else-1!==c&&(i-=i-c),c=-1}else for(e+s>a&&(e=a-s),i=e;i>=0;i--){for(var l=!0,h=0;h<s;h++)if(f(t,i+h)!==f(r,h)){l=!1;break}if(l)return i}return-1}function w(t,r,e,n){e=Number(e)||0;var o=t.length-e;n?(n=Number(n))>o&&(n=o):n=o;var i=r.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var u=0;u<n;++u){var a=parseInt(r.substr(2*u,2),16);if(isNaN(a))return u;t[e+u]=a}return u}function m(t,r,e,n){return q(k(r,t.length-e),t,e,n)}function A(t,r,e,n){return q(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function E(t,r,e,n){return A(t,r,e,n)}function O(t,r,e,n){return q(F(r),t,e,n)}function T(t,r,e,n){return q(function(t,r){for(var e,n,o,i=[],u=0;u<t.length&&!((r-=2)<0);++u)n=(e=t.charCodeAt(u))>>8,o=e%256,i.push(o),i.push(n);return i}(r,t.length-e),t,e,n)}function P(t,r,e){return 0===r&&e===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(r,e))}function _(t,r,e){e=Math.min(t.length,e);for(var n=[],o=r;o<e;){var i,u,a,s,f=t[o],c=null,l=f>239?4:f>223?3:f>191?2:1;if(o+l<=e)switch(l){case 1:f<128&&(c=f);break;case 2:128==(192&(i=t[o+1]))&&(s=(31&f)<<6|63&i)>127&&(c=s);break;case 3:i=t[o+1],u=t[o+2],128==(192&i)&&128==(192&u)&&(s=(15&f)<<12|(63&i)<<6|63&u)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:i=t[o+1],u=t[o+2],a=t[o+3],128==(192&i)&&128==(192&u)&&128==(192&a)&&(s=(15&f)<<18|(63&i)<<12|(63&u)<<6|63&a)>65535&&s<1114112&&(c=s)}null===c?(c=65533,l=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=l}return function(t){var r=t.length;if(r<=4096)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return e}(n)}function S(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(127&t[o]);return n}function I(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(t[o]);return n}function R(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var o="",i=r;i<e;++i)o+=N(t[i]);return o}function B(t,r,e){for(var n=t.slice(r,e),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function x(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function U(t,r,e,n,o,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function j(t,r,e,n){r<0&&(r=65535+r+1);for(var o=0,i=Math.min(t.length-e,2);o<i;++o)t[e+o]=(r&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function C(t,r,e,n){r<0&&(r=4294967295+r+1);for(var o=0,i=Math.min(t.length-e,4);o<i;++o)t[e+o]=r>>>8*(n?o:3-o)&255}function D(t,r,e,n,o,i){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function M(t,r,e,n,i){return i||D(t,0,e,4),o.write(t,r,e,n,23,4),e+4}function Y(t,r,e,n,i){return i||D(t,0,e,8),o.write(t,r,e,n,52,8),e+8}r.Buffer=s,r.SlowBuffer=function(t){return+t!=t&&(t=0),s.alloc(+t)},r.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),r.kMaxLength=u(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,r,e){return f(null,t,r,e)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,r,e){return function(t,r,e,n){return c(r),r<=0?a(t,r):void 0!==e?"string"==typeof n?a(t,r).fill(e,n):a(t,r).fill(e):a(t,r)}(null,t,r,e)},s.allocUnsafe=function(t){return l(null,t)},s.allocUnsafeSlow=function(t){return l(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,r){if(!s.isBuffer(t)||!s.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,o=0,i=Math.min(e,n);o<i;++o)if(t[o]!==r[o]){e=t[o],n=r[o];break}return e<n?-1:n<e?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,r){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=s.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!s.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(n,o),o+=u.length}return n},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)g(this,r,r+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)g(this,r,r+3),g(this,r+1,r+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)g(this,r,r+7),g(this,r+1,r+6),g(this,r+2,r+5),g(this,r+3,r+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?_(this,0,t):y.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,r,e,n,o){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),r<0||e>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=e)return 0;if(n>=o)return-1;if(r>=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),a=Math.min(i,u),f=this.slice(n,o),c=t.slice(r,e),l=0;l<a;++l)if(f[l]!==c[l]){i=f[l],u=c[l];break}return i<u?-1:u<i?1:0},s.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},s.prototype.indexOf=function(t,r,e){return v(this,t,r,e,!0)},s.prototype.lastIndexOf=function(t,r,e){return v(this,t,r,e,!1)},s.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var o=this.length-r;if((void 0===e||e>o)&&(e=o),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return w(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return A(this,t,r,e);case"latin1":case"binary":return E(this,t,r,e);case"base64":return O(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),s.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=s.prototype;else{var o=r-t;e=new s(o,void 0);for(var i=0;i<o;++i)e[i]=this[i+t]}return e},s.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||x(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n},s.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||x(t,r,this.length);for(var n=this[t+--r],o=1;r>0&&(o*=256);)n+=this[t+--r]*o;return n},s.prototype.readUInt8=function(t,r){return r||x(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,r){return r||x(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,r){return r||x(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,r){return r||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,r){return r||x(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||x(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*r)),n},s.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||x(t,r,this.length);for(var n=r,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*r)),i},s.prototype.readInt8=function(t,r){return r||x(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,r){r||x(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},s.prototype.readInt16BE=function(t,r){r||x(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},s.prototype.readInt32LE=function(t,r){return r||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,r){return r||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,r){return r||x(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,r){return r||x(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,r){return r||x(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,r){return r||x(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,r,e,n){t=+t,r|=0,e|=0,n||U(this,t,r,e,Math.pow(2,8*e)-1,0);var o=1,i=0;for(this[r]=255&t;++i<e&&(o*=256);)this[r+i]=t/o&255;return r+e},s.prototype.writeUIntBE=function(t,r,e,n){t=+t,r|=0,e|=0,n||U(this,t,r,e,Math.pow(2,8*e)-1,0);var o=e-1,i=1;for(this[r+o]=255&t;--o>=0&&(i*=256);)this[r+o]=t/i&255;return r+e},s.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},s.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):j(this,t,r,!0),r+2},s.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):j(this,t,r,!1),r+2},s.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):C(this,t,r,!0),r+4},s.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):C(this,t,r,!1),r+4},s.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);U(this,t,r,e,o-1,-o)}var i=0,u=1,a=0;for(this[r]=255&t;++i<e&&(u*=256);)t<0&&0===a&&0!==this[r+i-1]&&(a=1),this[r+i]=(t/u>>0)-a&255;return r+e},s.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);U(this,t,r,e,o-1,-o)}var i=e-1,u=1,a=0;for(this[r+i]=255&t;--i>=0&&(u*=256);)t<0&&0===a&&0!==this[r+i+1]&&(a=1),this[r+i]=(t/u>>0)-a&255;return r+e},s.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},s.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):j(this,t,r,!0),r+2},s.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):j(this,t,r,!1),r+2},s.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):C(this,t,r,!0),r+4},s.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):C(this,t,r,!1),r+4},s.prototype.writeFloatLE=function(t,r,e){return M(this,t,r,!0,e)},s.prototype.writeFloatBE=function(t,r,e){return M(this,t,r,!1,e)},s.prototype.writeDoubleLE=function(t,r,e){return Y(this,t,r,!0,e)},s.prototype.writeDoubleBE=function(t,r,e){return Y(this,t,r,!1,e)},s.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var o,i=n-e;if(this===t&&e<r&&r<n)for(o=i-1;o>=0;--o)t[o+r]=this[o+e];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+r]=this[o+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+i),r);return i},s.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var i;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(i=r;i<e;++i)this[i]=t;else{var u=s.isBuffer(t)?t:k(new s(t,n).toString()),a=u.length;for(i=0;i<e-r;++i)this[i+r]=u[i%a]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function k(t,r){var e;r=r||1/0;for(var n=t.length,o=null,i=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return i}function F(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,r,e,n){for(var o=0;o<n&&!(o+e>=r.length||o>=t.length);++o)r[o+e]=t[o];return o}}).call(this,e(4))},function(t,r){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,r,e){"use strict";r.byteLength=function(t){var r=f(t),e=r[0],n=r[1];return 3*(e+n)/4-n},r.toByteArray=function(t){var r,e,n=f(t),u=n[0],a=n[1],s=new i(function(t,r,e){return 3*(r+e)/4-e}(0,u,a)),c=0,l=a>0?u-4:u;for(e=0;e<l;e+=4)r=o[t.charCodeAt(e)]<<18|o[t.charCodeAt(e+1)]<<12|o[t.charCodeAt(e+2)]<<6|o[t.charCodeAt(e+3)],s[c++]=r>>16&255,s[c++]=r>>8&255,s[c++]=255&r;return 2===a&&(r=o[t.charCodeAt(e)]<<2|o[t.charCodeAt(e+1)]>>4,s[c++]=255&r),1===a&&(r=o[t.charCodeAt(e)]<<10|o[t.charCodeAt(e+1)]<<4|o[t.charCodeAt(e+2)]>>2,s[c++]=r>>8&255,s[c++]=255&r),s},r.fromByteArray=function(t){for(var r,e=t.length,o=e%3,i=[],u=0,a=e-o;u<a;u+=16383)i.push(c(t,u,u+16383>a?a:u+16383));return 1===o?(r=t[e-1],i.push(n[r>>2]+n[r<<4&63]+"==")):2===o&&(r=(t[e-2]<<8)+t[e-1],i.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"=")),i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=u.length;a<s;++a)n[a]=u[a],o[u.charCodeAt(a)]=a;function f(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function c(t,r,e){for(var o,i,u=[],a=r;a<e;a+=3)o=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),u.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return u.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,r){
8
+ var n=e(5),o=e(6),i=e(7);function u(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,r){if(u()<r)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=s.prototype:(null===t&&(t=new s(r)),t.length=r),t}function s(t,r,e){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return f(this,t,r,e)}function f(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?function(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),s.TYPED_ARRAY_SUPPORT?(t=r).__proto__=s.prototype:t=h(t,r),t}(t,r,e,n):"string"==typeof r?function(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!s.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(r,e),o=(t=a(t,n)).write(r,e);return o!==n&&(t=t.slice(0,o)),t}(t,r,e):function(t,r){if(s.isBuffer(r)){var e=0|p(r.length);return 0===(t=a(t,e)).length||r.copy(t,0,0,e),t}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||(n=r.length)!=n?a(t,0):h(t,r);if("Buffer"===r.type&&i(r.data))return h(t,r.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,r)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,r){if(c(r),t=a(t,r<0?0:0|p(r)),!s.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function h(t,r){var e=r.length<0?0:0|p(r.length);t=a(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function p(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function d(t,r){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return F(t).length;default:if(n)return N(t).length;r=(""+r).toLowerCase(),n=!0}}function y(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,r,e);case"utf8":case"utf-8":return _(this,r,e);case"ascii":return S(this,r,e);case"latin1":case"binary":return I(this,r,e);case"base64":return T(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function v(t,r,e,n,o){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0){if(!o)return-1;e=0}if("string"==typeof r&&(r=s.from(r,n)),s.isBuffer(r))return 0===r.length?-1:b(t,r,e,n,o);if("number"==typeof r)return r&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):b(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,r,e,n,o){var i,u=1,a=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,a/=2,s/=2,e/=2}function f(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(o){var c=-1;for(i=e;i<a;i++)if(f(t,i)===f(r,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===s)return c*u}else-1!==c&&(i-=i-c),c=-1}else for(e+s>a&&(e=a-s),i=e;i>=0;i--){for(var l=!0,h=0;h<s;h++)if(f(t,i+h)!==f(r,h)){l=!1;break}if(l)return i}return-1}function w(t,r,e,n){e=Number(e)||0;var o=t.length-e;n?(n=Number(n))>o&&(n=o):n=o;var i=r.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var u=0;u<n;++u){var a=parseInt(r.substr(2*u,2),16);if(isNaN(a))return u;t[e+u]=a}return u}function m(t,r,e,n){return q(N(r,t.length-e),t,e,n)}function A(t,r,e,n){return q(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function E(t,r,e,n){return A(t,r,e,n)}function O(t,r,e,n){return q(F(r),t,e,n)}function P(t,r,e,n){return q(function(t,r){for(var e,n,o,i=[],u=0;u<t.length&&!((r-=2)<0);++u)n=(e=t.charCodeAt(u))>>8,o=e%256,i.push(o),i.push(n);return i}(r,t.length-e),t,e,n)}function T(t,r,e){return 0===r&&e===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(r,e))}function _(t,r,e){e=Math.min(t.length,e);for(var n=[],o=r;o<e;){var i,u,a,s,f=t[o],c=null,l=f>239?4:f>223?3:f>191?2:1;if(o+l<=e)switch(l){case 1:f<128&&(c=f);break;case 2:128==(192&(i=t[o+1]))&&(s=(31&f)<<6|63&i)>127&&(c=s);break;case 3:i=t[o+1],u=t[o+2],128==(192&i)&&128==(192&u)&&(s=(15&f)<<12|(63&i)<<6|63&u)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:i=t[o+1],u=t[o+2],a=t[o+3],128==(192&i)&&128==(192&u)&&128==(192&a)&&(s=(15&f)<<18|(63&i)<<12|(63&u)<<6|63&a)>65535&&s<1114112&&(c=s)}null===c?(c=65533,l=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=l}return function(t){var r=t.length;if(r<=4096)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return e}(n)}function S(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(127&t[o]);return n}function I(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(t[o]);return n}function R(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var o="",i=r;i<e;++i)o+=k(t[i]);return o}function B(t,r,e){for(var n=t.slice(r,e),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function x(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function j(t,r,e,n,o,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function U(t,r,e,n){r<0&&(r=65535+r+1);for(var o=0,i=Math.min(t.length-e,2);o<i;++o)t[e+o]=(r&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function C(t,r,e,n){r<0&&(r=4294967295+r+1);for(var o=0,i=Math.min(t.length-e,4);o<i;++o)t[e+o]=r>>>8*(n?o:3-o)&255}function D(t,r,e,n,o,i){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function M(t,r,e,n,i){return i||D(t,0,e,4),o.write(t,r,e,n,23,4),e+4}function Y(t,r,e,n,i){return i||D(t,0,e,8),o.write(t,r,e,n,52,8),e+8}r.Buffer=s,r.SlowBuffer=function(t){return+t!=t&&(t=0),s.alloc(+t)},r.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),r.kMaxLength=u(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,r,e){return f(null,t,r,e)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,r,e){return function(t,r,e,n){return c(r),r<=0?a(t,r):void 0!==e?"string"==typeof n?a(t,r).fill(e,n):a(t,r).fill(e):a(t,r)}(null,t,r,e)},s.allocUnsafe=function(t){return l(null,t)},s.allocUnsafeSlow=function(t){return l(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,r){if(!s.isBuffer(t)||!s.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,o=0,i=Math.min(e,n);o<i;++o)if(t[o]!==r[o]){e=t[o],n=r[o];break}return e<n?-1:n<e?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,r){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=s.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!s.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(n,o),o+=u.length}return n},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)g(this,r,r+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)g(this,r,r+3),g(this,r+1,r+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)g(this,r,r+7),g(this,r+1,r+6),g(this,r+2,r+5),g(this,r+3,r+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?_(this,0,t):y.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,r,e,n,o){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),r<0||e>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=e)return 0;if(n>=o)return-1;if(r>=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),a=Math.min(i,u),f=this.slice(n,o),c=t.slice(r,e),l=0;l<a;++l)if(f[l]!==c[l]){i=f[l],u=c[l];break}return i<u?-1:u<i?1:0},s.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},s.prototype.indexOf=function(t,r,e){return v(this,t,r,e,!0)},s.prototype.lastIndexOf=function(t,r,e){return v(this,t,r,e,!1)},s.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var o=this.length-r;if((void 0===e||e>o)&&(e=o),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return w(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return A(this,t,r,e);case"latin1":case"binary":return E(this,t,r,e);case"base64":return O(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),s.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=s.prototype;else{var o=r-t;e=new s(o,void 0);for(var i=0;i<o;++i)e[i]=this[i+t]}return e},s.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||x(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n},s.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||x(t,r,this.length);for(var n=this[t+--r],o=1;r>0&&(o*=256);)n+=this[t+--r]*o;return n},s.prototype.readUInt8=function(t,r){return r||x(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,r){return r||x(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,r){return r||x(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,r){return r||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,r){return r||x(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||x(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*r)),n},s.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||x(t,r,this.length);for(var n=r,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*r)),i},s.prototype.readInt8=function(t,r){return r||x(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,r){r||x(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},s.prototype.readInt16BE=function(t,r){r||x(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},s.prototype.readInt32LE=function(t,r){return r||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,r){return r||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,r){return r||x(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,r){return r||x(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,r){return r||x(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,r){return r||x(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,r,e,n){t=+t,r|=0,e|=0,n||j(this,t,r,e,Math.pow(2,8*e)-1,0);var o=1,i=0;for(this[r]=255&t;++i<e&&(o*=256);)this[r+i]=t/o&255;return r+e},s.prototype.writeUIntBE=function(t,r,e,n){t=+t,r|=0,e|=0,n||j(this,t,r,e,Math.pow(2,8*e)-1,0);var o=e-1,i=1;for(this[r+o]=255&t;--o>=0&&(i*=256);)this[r+o]=t/i&255;return r+e},s.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},s.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):U(this,t,r,!0),r+2},s.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):U(this,t,r,!1),r+2},s.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):C(this,t,r,!0),r+4},s.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):C(this,t,r,!1),r+4},s.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);j(this,t,r,e,o-1,-o)}var i=0,u=1,a=0;for(this[r]=255&t;++i<e&&(u*=256);)t<0&&0===a&&0!==this[r+i-1]&&(a=1),this[r+i]=(t/u>>0)-a&255;return r+e},s.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);j(this,t,r,e,o-1,-o)}var i=e-1,u=1,a=0;for(this[r+i]=255&t;--i>=0&&(u*=256);)t<0&&0===a&&0!==this[r+i+1]&&(a=1),this[r+i]=(t/u>>0)-a&255;return r+e},s.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},s.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):U(this,t,r,!0),r+2},s.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):U(this,t,r,!1),r+2},s.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):C(this,t,r,!0),r+4},s.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):C(this,t,r,!1),r+4},s.prototype.writeFloatLE=function(t,r,e){return M(this,t,r,!0,e)},s.prototype.writeFloatBE=function(t,r,e){return M(this,t,r,!1,e)},s.prototype.writeDoubleLE=function(t,r,e){return Y(this,t,r,!0,e)},s.prototype.writeDoubleBE=function(t,r,e){return Y(this,t,r,!1,e)},s.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var o,i=n-e;if(this===t&&e<r&&r<n)for(o=i-1;o>=0;--o)t[o+r]=this[o+e];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+r]=this[o+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+i),r);return i},s.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var i;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(i=r;i<e;++i)this[i]=t;else{var u=s.isBuffer(t)?t:N(new s(t,n).toString()),a=u.length;for(i=0;i<e-r;++i)this[i+r]=u[i%a]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function k(t){return t<16?"0"+t.toString(16):t.toString(16)}function N(t,r){var e;r=r||1/0;for(var n=t.length,o=null,i=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return i}function F(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,r,e,n){for(var o=0;o<n&&!(o+e>=r.length||o>=t.length);++o)r[o+e]=t[o];return o}}).call(this,e(4))},function(t,r){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,r,e){"use strict";r.byteLength=function(t){var r=f(t),e=r[0],n=r[1];return 3*(e+n)/4-n},r.toByteArray=function(t){var r,e,n=f(t),u=n[0],a=n[1],s=new i(function(t,r,e){return 3*(r+e)/4-e}(0,u,a)),c=0,l=a>0?u-4:u;for(e=0;e<l;e+=4)r=o[t.charCodeAt(e)]<<18|o[t.charCodeAt(e+1)]<<12|o[t.charCodeAt(e+2)]<<6|o[t.charCodeAt(e+3)],s[c++]=r>>16&255,s[c++]=r>>8&255,s[c++]=255&r;return 2===a&&(r=o[t.charCodeAt(e)]<<2|o[t.charCodeAt(e+1)]>>4,s[c++]=255&r),1===a&&(r=o[t.charCodeAt(e)]<<10|o[t.charCodeAt(e+1)]<<4|o[t.charCodeAt(e+2)]>>2,s[c++]=r>>8&255,s[c++]=255&r),s},r.fromByteArray=function(t){for(var r,e=t.length,o=e%3,i=[],u=0,a=e-o;u<a;u+=16383)i.push(c(t,u,u+16383>a?a:u+16383));return 1===o?(r=t[e-1],i.push(n[r>>2]+n[r<<4&63]+"==")):2===o&&(r=(t[e-2]<<8)+t[e-1],i.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"=")),i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=u.length;a<s;++a)n[a]=u[a],o[u.charCodeAt(a)]=a;function f(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function c(t,r,e){for(var o,i,u=[],a=r;a<e;a+=3)o=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),u.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return u.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,r){
9
9
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
10
- r.read=function(t,r,e,n,o){var i,u,a=8*o-n-1,s=(1<<a)-1,f=s>>1,c=-7,l=e?o-1:0,h=e?-1:1,p=t[r+l];for(l+=h,i=p&(1<<-c)-1,p>>=-c,c+=a;c>0;i=256*i+t[r+l],l+=h,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=n;c>0;u=256*u+t[r+l],l+=h,c-=8);if(0===i)i=1-f;else{if(i===s)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),i-=f}return(p?-1:1)*u*Math.pow(2,i-n)},r.write=function(t,r,e,n,o,i){var u,a,s,f=8*i-o-1,c=(1<<f)-1,l=c>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,y=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(a=isNaN(r)?1:0,u=c):(u=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-u))<1&&(u--,s*=2),(r+=u+l>=1?h/s:h*Math.pow(2,1-l))*s>=2&&(u++,s/=2),u+l>=c?(a=0,u=c):u+l>=1?(a=(r*s-1)*Math.pow(2,o),u+=l):(a=r*Math.pow(2,l-1)*Math.pow(2,o),u=0));o>=8;t[e+p]=255&a,p+=d,a/=256,o-=8);for(u=u<<o|a,f+=o;f>0;t[e+p]=255&u,p+=d,u/=256,f-=8);t[e+p-d]|=128*y}},function(t,r){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},function(t,r){var e,n;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,r){return t<<r|t>>>32-r},rotr:function(t,r){return t<<32-r|t>>>r},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var r=0;r<t.length;r++)t[r]=n.endian(t[r]);return t},randomBytes:function(t){for(var r=[];t>0;t--)r.push(Math.floor(256*Math.random()));return r},bytesToWords:function(t){for(var r=[],e=0,n=0;e<t.length;e++,n+=8)r[n>>>5]|=t[e]<<24-n%32;return r},wordsToBytes:function(t){for(var r=[],e=0;e<32*t.length;e+=8)r.push(t[e>>>5]>>>24-e%32&255);return r},bytesToHex:function(t){for(var r=[],e=0;e<t.length;e++)r.push((t[e]>>>4).toString(16)),r.push((15&t[e]).toString(16));return r.join("")},hexToBytes:function(t){for(var r=[],e=0;e<t.length;e+=2)r.push(parseInt(t.substr(e,2),16));return r},bytesToBase64:function(t){for(var r=[],n=0;n<t.length;n+=3)for(var o=t[n]<<16|t[n+1]<<8|t[n+2],i=0;i<4;i++)8*n+6*i<=8*t.length?r.push(e.charAt(o>>>6*(3-i)&63)):r.push("=");return r.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,o=0;n<t.length;o=++n%4)0!=o&&r.push((e.indexOf(t.charAt(n-1))&Math.pow(2,-2*o+8)-1)<<2*o|e.indexOf(t.charAt(n))>>>6-2*o);return r}},t.exports=n},,function(t,r,e){"use strict";e.r(r),e.d(r,"handleHttpCache",(function(){return d}));var n=3e5,o=["accountId"],i=["vendorId","storeId","catalogueId","categoryId","productId"],u=e(0),a=e(2),s=e.n(a),f=i,c=o,l=function(t,r,e){var n=null==r?void 0:r.message;try{n=r?JSON.parse(r.message):r}catch(t){}return{data:null==t?void 0:t.data,hints:h(e),config:e,error:n,pagination:{hasMorePages:null==t?void 0:t.hasMorePages,page:null==t?void 0:t.page}}},h=function(t){var r={};return Object.entries(t.query).forEach((function(t){var e=t,n=e[0],o=e[1];f.includes(n)&&(r[n]=o)})),Object.entries(t.headers).forEach((function(t){var e=t,n=e[0],o=e[1];c.includes(n)&&(r[n]=o)})),r},p=function(){return(p=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},d=function(t,r){return function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))}(void 0,void 0,void 0,(function(){var e,n,o,i,a,f;return function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(c){switch(c.label){case 0:if(d=t.url,e=s()(d),n=function(t){return Object(u.getState)().apiCache[t]}(e),h=Object(u.getState)().expiresAt,(o=(new Date).getTime()>=h)&&function(){var t=Object(u.getState)().timeout,r=void 0===t?0:t;Object(u.setState)({apiCache:{},expiresAt:(new Date).getTime()+r})}(),n&&!o)return[3,4];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,r(t)];case 2:return i=c.sent(),f=l(i,void 0,t),function(t,r){var e,n=Object(u.getState)().apiCache,o=p(p({},n),((e={})[t]=r,e));Object(u.setState)({apiCache:o})}(e,f),[2,f];case 3:return a=c.sent(),[2,f=l(void 0,a,t)];case 4:return[2,n]}var h,d}))}))},y=n,g={artisanApp:void 0,apiCache:{},expiresAt:(new Date).getTime()+y,timeout:y};Object(u.initState)(g)}])},function(t,r,e){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,r,e,n){void 0===n&&(n=e),Object.defineProperty(t,n,{enumerable:!0,get:function(){return r[e]}})}:function(t,r,e,n){void 0===n&&(n=e),t[n]=r[e]}),o=this&&this.__exportStar||function(t,r){for(var e in t)"default"===e||r.hasOwnProperty(e)||n(r,t,e)};Object.defineProperty(r,"__esModule",{value:!0}),o(e(6),r),o(e(7),r),o(e(8),r),o(e(9),r),o(e(10),r),o(e(11),r),o(e(12),r),o(e(13),r),o(e(14),r),o(e(15),r),o(e(16),r),o(e(17),r),o(e(18),r),o(e(19),r)},function(t,r){var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var r=[],e=0;e<t.length;e++)r.push(255&t.charCodeAt(e));return r},bytesToString:function(t){for(var r=[],e=0;e<t.length;e++)r.push(String.fromCharCode(t[e]));return r.join("")}}};t.exports=e},function(t,r,e){(function(r){var n,o,i,u;n=e(25),o=e(3).utf8,i=e(3).bin,(u=function(t,e){var u=n.wordsToBytes(function(t){t.constructor==String?t=o.stringToBytes(t):void 0!==r&&"function"==typeof r.isBuffer&&r.isBuffer(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());var e=n.bytesToWords(t),i=8*t.length,u=[],a=1732584193,s=-271733879,f=-1732584194,c=271733878,l=-1009589776;e[i>>5]|=128<<24-i%32,e[15+(i+64>>>9<<4)]=i;for(var h=0;h<e.length;h+=16){for(var p=a,d=s,y=f,g=c,v=l,b=0;b<80;b++){if(b<16)u[b]=e[h+b];else{var w=u[b-3]^u[b-8]^u[b-14]^u[b-16];u[b]=w<<1|w>>>31}var m=(a<<5|a>>>27)+l+(u[b]>>>0)+(b<20?1518500249+(s&f|~s&c):b<40?1859775393+(s^f^c):b<60?(s&f|s&c|f&c)-1894007588:(s^f^c)-899497514);l=c,c=f,f=s<<30|s>>>2,s=a,a=m}a+=p,s+=d,f+=y,c+=g,l+=v}return[a,s,f,c,l]}(t));return e&&e.asBytes?u:e&&e.asString?i.bytesToString(u):n.bytesToHex(u)})._blocksize=16,u._digestsize=20,t.exports=u}).call(this,e(20).Buffer)},function(t,r,e){t.exports=function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=1)}([,function(t,r,e){"use strict";e.r(r),e.d(r,"initAuth",(function(){return n})),e.d(r,"getServices",(function(){return o}));var n=function(t){if("undefined"!=typeof window)return t.__internals__.auth()},o=function(t){if("undefined"!=typeof window)return t.__instance__.auth}}])},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DayOfWeekName=r.TaxType=r.PriceCategoryType=r.ProductType=void 0,function(t){t.PRODUCT="PRODUCT",t.MODIFIER="MODIFIER"}(r.ProductType||(r.ProductType={})),function(t){t.NORMAL="NORMAL",t.POINTS="POINTS"}(r.PriceCategoryType||(r.PriceCategoryType={})),function(t){t.IVA="IVA"}(r.TaxType||(r.TaxType={})),function(t){t.MONDAY="MONDAY",t.TUESDAY="TUESDAY",t.WEDNESDAY="WEDNESDAY",t.THURSDAY="THURSDAY",t.FRIDAY="FRIDAY",t.SATURDAY="SATURDAY",t.SUNDAY="SUNDAY"}(r.DayOfWeekName||(r.DayOfWeekName={}))},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ServiceStatus=r.Days=r.DeliveryTimeUnit=void 0,function(t){t.MIN="min"}(r.DeliveryTimeUnit||(r.DeliveryTimeUnit={})),function(t){t.MONDAY="MONDAY",t.TUESDAY="TUESDAY",t.WEDNESDAY="WEDNESDAY",t.THURSDAY="THURSDAY",t.FRIDAY="FRIDAY",t.SATURDAY="SATURDAY",t.SUNDAY="SUNDAY",t.SPECIAL="SPECIAL"}(r.Days||(r.Days={})),function(t){t.INACTIVE="INACTIVE",t.ACTIVE="ACTIVE"}(r.ServiceStatus||(r.ServiceStatus={}))},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";(function(t){
10
+ r.read=function(t,r,e,n,o){var i,u,a=8*o-n-1,s=(1<<a)-1,f=s>>1,c=-7,l=e?o-1:0,h=e?-1:1,p=t[r+l];for(l+=h,i=p&(1<<-c)-1,p>>=-c,c+=a;c>0;i=256*i+t[r+l],l+=h,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=n;c>0;u=256*u+t[r+l],l+=h,c-=8);if(0===i)i=1-f;else{if(i===s)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),i-=f}return(p?-1:1)*u*Math.pow(2,i-n)},r.write=function(t,r,e,n,o,i){var u,a,s,f=8*i-o-1,c=(1<<f)-1,l=c>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,y=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(a=isNaN(r)?1:0,u=c):(u=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-u))<1&&(u--,s*=2),(r+=u+l>=1?h/s:h*Math.pow(2,1-l))*s>=2&&(u++,s/=2),u+l>=c?(a=0,u=c):u+l>=1?(a=(r*s-1)*Math.pow(2,o),u+=l):(a=r*Math.pow(2,l-1)*Math.pow(2,o),u=0));o>=8;t[e+p]=255&a,p+=d,a/=256,o-=8);for(u=u<<o|a,f+=o;f>0;t[e+p]=255&u,p+=d,u/=256,f-=8);t[e+p-d]|=128*y}},function(t,r){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},function(t,r){var e,n;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,r){return t<<r|t>>>32-r},rotr:function(t,r){return t<<32-r|t>>>r},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var r=0;r<t.length;r++)t[r]=n.endian(t[r]);return t},randomBytes:function(t){for(var r=[];t>0;t--)r.push(Math.floor(256*Math.random()));return r},bytesToWords:function(t){for(var r=[],e=0,n=0;e<t.length;e++,n+=8)r[n>>>5]|=t[e]<<24-n%32;return r},wordsToBytes:function(t){for(var r=[],e=0;e<32*t.length;e+=8)r.push(t[e>>>5]>>>24-e%32&255);return r},bytesToHex:function(t){for(var r=[],e=0;e<t.length;e++)r.push((t[e]>>>4).toString(16)),r.push((15&t[e]).toString(16));return r.join("")},hexToBytes:function(t){for(var r=[],e=0;e<t.length;e+=2)r.push(parseInt(t.substr(e,2),16));return r},bytesToBase64:function(t){for(var r=[],n=0;n<t.length;n+=3)for(var o=t[n]<<16|t[n+1]<<8|t[n+2],i=0;i<4;i++)8*n+6*i<=8*t.length?r.push(e.charAt(o>>>6*(3-i)&63)):r.push("=");return r.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,o=0;n<t.length;o=++n%4)0!=o&&r.push((e.indexOf(t.charAt(n-1))&Math.pow(2,-2*o+8)-1)<<2*o|e.indexOf(t.charAt(n))>>>6-2*o);return r}},t.exports=n},,function(t,r,e){"use strict";e.r(r),e.d(r,"handleHttpCache",(function(){return d})),e.d(r,"transformResponse",(function(){return l}));var n=3e5,o=["accountId"],i=["vendorId","storeId","catalogueId","categoryId","productId"],u=e(0),a=e(2),s=e.n(a),f=i,c=o,l=function(t,r,e){var n,o=null==r?void 0:r.message;try{o=r?JSON.parse(r.message):r}catch(t){}return{data:null!==(n=null==t?void 0:t.data)&&void 0!==n?n:t,hints:h(e),config:e,error:o,pagination:{hasMorePages:null==t?void 0:t.hasMorePages,page:null==t?void 0:t.page}}},h=function(t){var r={};return Object.entries(t.query).forEach((function(t){var e=t,n=e[0],o=e[1];f.includes(n)&&(r[n]=o)})),Object.entries(t.headers).forEach((function(t){var e=t,n=e[0],o=e[1];c.includes(n)&&(r[n]=o)})),r},p=function(){return(p=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},d=function(t,r){return function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))}(void 0,void 0,void 0,(function(){var e,n,o,i,a,f;return function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}}(this,(function(c){switch(c.label){case 0:if(d=t.url,e=s()(d),n=function(t){return Object(u.getState)().apiCache[t]}(e),h=Object(u.getState)().expiresAt,(o=(new Date).getTime()>=h)&&function(){var t=Object(u.getState)().timeout,r=void 0===t?0:t;Object(u.setState)({apiCache:{},expiresAt:(new Date).getTime()+r})}(),n&&!o)return[3,4];c.label=1;case 1:return c.trys.push([1,3,,4]),[4,r(t)];case 2:return i=c.sent(),f=l(i,void 0,t),function(t,r){var e,n=Object(u.getState)().apiCache,o=p(p({},n),((e={})[t]=r,e));Object(u.setState)({apiCache:o})}(e,f),[2,f];case 3:return a=c.sent(),[2,f=l(void 0,a,t)];case 4:return[2,n]}var h,d}))}))},y=n,g={artisanApp:void 0,apiCache:{},expiresAt:(new Date).getTime()+y,timeout:y};Object(u.initState)(g)}])},function(t,r,e){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,r,e,n){void 0===n&&(n=e),Object.defineProperty(t,n,{enumerable:!0,get:function(){return r[e]}})}:function(t,r,e,n){void 0===n&&(n=e),t[n]=r[e]}),o=this&&this.__exportStar||function(t,r){for(var e in t)"default"===e||r.hasOwnProperty(e)||n(r,t,e)};Object.defineProperty(r,"__esModule",{value:!0}),o(e(6),r),o(e(7),r),o(e(8),r),o(e(9),r),o(e(10),r),o(e(11),r),o(e(12),r),o(e(13),r),o(e(14),r),o(e(15),r),o(e(16),r),o(e(17),r),o(e(18),r),o(e(19),r),o(e(20),r),o(e(21),r),o(e(22),r),o(e(23),r)},function(t,r){var e={utf8:{stringToBytes:function(t){return e.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(e.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var r=[],e=0;e<t.length;e++)r.push(255&t.charCodeAt(e));return r},bytesToString:function(t){for(var r=[],e=0;e<t.length;e++)r.push(String.fromCharCode(t[e]));return r.join("")}}};t.exports=e},function(t,r,e){(function(r){var n,o,i,u;n=e(29),o=e(3).utf8,i=e(3).bin,(u=function(t,e){var u=n.wordsToBytes(function(t){t.constructor==String?t=o.stringToBytes(t):void 0!==r&&"function"==typeof r.isBuffer&&r.isBuffer(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||(t=t.toString());var e=n.bytesToWords(t),i=8*t.length,u=[],a=1732584193,s=-271733879,f=-1732584194,c=271733878,l=-1009589776;e[i>>5]|=128<<24-i%32,e[15+(i+64>>>9<<4)]=i;for(var h=0;h<e.length;h+=16){for(var p=a,d=s,y=f,g=c,v=l,b=0;b<80;b++){if(b<16)u[b]=e[h+b];else{var w=u[b-3]^u[b-8]^u[b-14]^u[b-16];u[b]=w<<1|w>>>31}var m=(a<<5|a>>>27)+l+(u[b]>>>0)+(b<20?1518500249+(s&f|~s&c):b<40?1859775393+(s^f^c):b<60?(s&f|s&c|f&c)-1894007588:(s^f^c)-899497514);l=c,c=f,f=s<<30|s>>>2,s=a,a=m}a+=p,s+=d,f+=y,c+=g,l+=v}return[a,s,f,c,l]}(t));return e&&e.asBytes?u:e&&e.asString?i.bytesToString(u):n.bytesToHex(u)})._blocksize=16,u._digestsize=20,t.exports=u}).call(this,e(24).Buffer)},function(t,r,e){t.exports=function(t){var r={};function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(r){return t[r]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=1)}([,function(t,r,e){"use strict";e.r(r),e.d(r,"initAuth",(function(){return n})),e.d(r,"getServices",(function(){return o}));var n=function(t){if("undefined"!=typeof window)return t.__internals__.auth()},o=function(t){if("undefined"!=typeof window)return t.__instance__.auth}}])},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.DayOfWeekName=r.TaxType=r.PriceCategoryType=r.ProductType=void 0,function(t){t.PRODUCT="PRODUCT",t.MODIFIER="MODIFIER"}(r.ProductType||(r.ProductType={})),function(t){t.NORMAL="NORMAL",t.POINTS="POINTS"}(r.PriceCategoryType||(r.PriceCategoryType={})),function(t){t.IVA="IVA"}(r.TaxType||(r.TaxType={})),function(t){t.MONDAY="MONDAY",t.TUESDAY="TUESDAY",t.WEDNESDAY="WEDNESDAY",t.THURSDAY="THURSDAY",t.FRIDAY="FRIDAY",t.SATURDAY="SATURDAY",t.SUNDAY="SUNDAY"}(r.DayOfWeekName||(r.DayOfWeekName={}))},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ServiceStatus=r.Days=r.DeliveryTimeUnit=void 0,function(t){t.MIN="min"}(r.DeliveryTimeUnit||(r.DeliveryTimeUnit={})),function(t){t.MONDAY="MONDAY",t.TUESDAY="TUESDAY",t.WEDNESDAY="WEDNESDAY",t.THURSDAY="THURSDAY",t.FRIDAY="FRIDAY",t.SATURDAY="SATURDAY",t.SUNDAY="SUNDAY",t.SPECIAL="SPECIAL"}(r.Days||(r.Days={})),function(t){t.INACTIVE="INACTIVE",t.ACTIVE="ACTIVE"}(r.ServiceStatus||(r.ServiceStatus={}))},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Gender=r.MaritalStatus=void 0,function(t){t.MARRIED="MARRIED",t.DIVORCED="DIVORCED",t.SINGLE="SINGLE"}(r.MaritalStatus||(r.MaritalStatus={})),function(t){t.MALE="MALE",t.FEMALE="FEMALE"}(r.Gender||(r.Gender={}))},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,e){"use strict";(function(t){
11
11
  /*!
12
12
  * The buffer module from node.js, for the browser.
13
13
  *
14
14
  * @author Feross Aboukhadijeh <http://feross.org>
15
15
  * @license MIT
16
16
  */
17
- var n=e(22),o=e(23),i=e(24);function u(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,r){if(u()<r)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=s.prototype:(null===t&&(t=new s(r)),t.length=r),t}function s(t,r,e){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return f(this,t,r,e)}function f(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?function(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n);s.TYPED_ARRAY_SUPPORT?(t=r).__proto__=s.prototype:t=h(t,r);return t}(t,r,e,n):"string"==typeof r?function(t,r,e){"string"==typeof e&&""!==e||(e="utf8");if(!s.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(r,e),o=(t=a(t,n)).write(r,e);o!==n&&(t=t.slice(0,o));return t}(t,r,e):function(t,r){if(s.isBuffer(r)){var e=0|p(r.length);return 0===(t=a(t,e)).length||r.copy(t,0,0,e),t}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||(n=r.length)!=n?a(t,0):h(t,r);if("Buffer"===r.type&&i(r.data))return h(t,r.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,r)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,r){if(c(r),t=a(t,r<0?0:0|p(r)),!s.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function h(t,r){var e=r.length<0?0:0|p(r.length);t=a(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function p(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function d(t,r){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return k(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return F(t).length;default:if(n)return k(t).length;r=(""+r).toLowerCase(),n=!0}}function y(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,r,e);case"utf8":case"utf-8":return _(this,r,e);case"ascii":return S(this,r,e);case"latin1":case"binary":return I(this,r,e);case"base64":return P(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function v(t,r,e,n,o){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0){if(!o)return-1;e=0}if("string"==typeof r&&(r=s.from(r,n)),s.isBuffer(r))return 0===r.length?-1:b(t,r,e,n,o);if("number"==typeof r)return r&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):b(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,r,e,n,o){var i,u=1,a=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,a/=2,s/=2,e/=2}function f(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(o){var c=-1;for(i=e;i<a;i++)if(f(t,i)===f(r,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===s)return c*u}else-1!==c&&(i-=i-c),c=-1}else for(e+s>a&&(e=a-s),i=e;i>=0;i--){for(var l=!0,h=0;h<s;h++)if(f(t,i+h)!==f(r,h)){l=!1;break}if(l)return i}return-1}function w(t,r,e,n){e=Number(e)||0;var o=t.length-e;n?(n=Number(n))>o&&(n=o):n=o;var i=r.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var u=0;u<n;++u){var a=parseInt(r.substr(2*u,2),16);if(isNaN(a))return u;t[e+u]=a}return u}function m(t,r,e,n){return q(k(r,t.length-e),t,e,n)}function A(t,r,e,n){return q(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function E(t,r,e,n){return A(t,r,e,n)}function O(t,r,e,n){return q(F(r),t,e,n)}function T(t,r,e,n){return q(function(t,r){for(var e,n,o,i=[],u=0;u<t.length&&!((r-=2)<0);++u)e=t.charCodeAt(u),n=e>>8,o=e%256,i.push(o),i.push(n);return i}(r,t.length-e),t,e,n)}function P(t,r,e){return 0===r&&e===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(r,e))}function _(t,r,e){e=Math.min(t.length,e);for(var n=[],o=r;o<e;){var i,u,a,s,f=t[o],c=null,l=f>239?4:f>223?3:f>191?2:1;if(o+l<=e)switch(l){case 1:f<128&&(c=f);break;case 2:128==(192&(i=t[o+1]))&&(s=(31&f)<<6|63&i)>127&&(c=s);break;case 3:i=t[o+1],u=t[o+2],128==(192&i)&&128==(192&u)&&(s=(15&f)<<12|(63&i)<<6|63&u)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:i=t[o+1],u=t[o+2],a=t[o+3],128==(192&i)&&128==(192&u)&&128==(192&a)&&(s=(15&f)<<18|(63&i)<<12|(63&u)<<6|63&a)>65535&&s<1114112&&(c=s)}null===c?(c=65533,l=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=l}return function(t){var r=t.length;if(r<=4096)return String.fromCharCode.apply(String,t);var e="",n=0;for(;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return e}(n)}r.Buffer=s,r.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},r.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),r.kMaxLength=u(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,r,e){return f(null,t,r,e)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,r,e){return function(t,r,e,n){return c(r),r<=0?a(t,r):void 0!==e?"string"==typeof n?a(t,r).fill(e,n):a(t,r).fill(e):a(t,r)}(null,t,r,e)},s.allocUnsafe=function(t){return l(null,t)},s.allocUnsafeSlow=function(t){return l(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,r){if(!s.isBuffer(t)||!s.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,o=0,i=Math.min(e,n);o<i;++o)if(t[o]!==r[o]){e=t[o],n=r[o];break}return e<n?-1:n<e?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,r){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=s.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!s.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(n,o),o+=u.length}return n},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)g(this,r,r+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)g(this,r,r+3),g(this,r+1,r+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)g(this,r,r+7),g(this,r+1,r+6),g(this,r+2,r+5),g(this,r+3,r+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?_(this,0,t):y.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,r,e,n,o){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),r<0||e>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=e)return 0;if(n>=o)return-1;if(r>=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),a=Math.min(i,u),f=this.slice(n,o),c=t.slice(r,e),l=0;l<a;++l)if(f[l]!==c[l]){i=f[l],u=c[l];break}return i<u?-1:u<i?1:0},s.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},s.prototype.indexOf=function(t,r,e){return v(this,t,r,e,!0)},s.prototype.lastIndexOf=function(t,r,e){return v(this,t,r,e,!1)},s.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var o=this.length-r;if((void 0===e||e>o)&&(e=o),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return w(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return A(this,t,r,e);case"latin1":case"binary":return E(this,t,r,e);case"base64":return O(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(127&t[o]);return n}function I(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(t[o]);return n}function R(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var o="",i=r;i<e;++i)o+=N(t[i]);return o}function B(t,r,e){for(var n=t.slice(r,e),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function x(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function U(t,r,e,n,o,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function j(t,r,e,n){r<0&&(r=65535+r+1);for(var o=0,i=Math.min(t.length-e,2);o<i;++o)t[e+o]=(r&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function C(t,r,e,n){r<0&&(r=4294967295+r+1);for(var o=0,i=Math.min(t.length-e,4);o<i;++o)t[e+o]=r>>>8*(n?o:3-o)&255}function D(t,r,e,n,o,i){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function M(t,r,e,n,i){return i||D(t,0,e,4),o.write(t,r,e,n,23,4),e+4}function Y(t,r,e,n,i){return i||D(t,0,e,8),o.write(t,r,e,n,52,8),e+8}s.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),s.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=s.prototype;else{var o=r-t;e=new s(o,void 0);for(var i=0;i<o;++i)e[i]=this[i+t]}return e},s.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||x(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n},s.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||x(t,r,this.length);for(var n=this[t+--r],o=1;r>0&&(o*=256);)n+=this[t+--r]*o;return n},s.prototype.readUInt8=function(t,r){return r||x(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,r){return r||x(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,r){return r||x(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,r){return r||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,r){return r||x(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||x(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*r)),n},s.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||x(t,r,this.length);for(var n=r,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*r)),i},s.prototype.readInt8=function(t,r){return r||x(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,r){r||x(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},s.prototype.readInt16BE=function(t,r){r||x(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},s.prototype.readInt32LE=function(t,r){return r||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,r){return r||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,r){return r||x(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,r){return r||x(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,r){return r||x(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,r){return r||x(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||U(this,t,r,e,Math.pow(2,8*e)-1,0);var o=1,i=0;for(this[r]=255&t;++i<e&&(o*=256);)this[r+i]=t/o&255;return r+e},s.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||U(this,t,r,e,Math.pow(2,8*e)-1,0);var o=e-1,i=1;for(this[r+o]=255&t;--o>=0&&(i*=256);)this[r+o]=t/i&255;return r+e},s.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},s.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):j(this,t,r,!0),r+2},s.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):j(this,t,r,!1),r+2},s.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):C(this,t,r,!0),r+4},s.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):C(this,t,r,!1),r+4},s.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);U(this,t,r,e,o-1,-o)}var i=0,u=1,a=0;for(this[r]=255&t;++i<e&&(u*=256);)t<0&&0===a&&0!==this[r+i-1]&&(a=1),this[r+i]=(t/u>>0)-a&255;return r+e},s.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);U(this,t,r,e,o-1,-o)}var i=e-1,u=1,a=0;for(this[r+i]=255&t;--i>=0&&(u*=256);)t<0&&0===a&&0!==this[r+i+1]&&(a=1),this[r+i]=(t/u>>0)-a&255;return r+e},s.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},s.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):j(this,t,r,!0),r+2},s.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):j(this,t,r,!1),r+2},s.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):C(this,t,r,!0),r+4},s.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||U(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):C(this,t,r,!1),r+4},s.prototype.writeFloatLE=function(t,r,e){return M(this,t,r,!0,e)},s.prototype.writeFloatBE=function(t,r,e){return M(this,t,r,!1,e)},s.prototype.writeDoubleLE=function(t,r,e){return Y(this,t,r,!0,e)},s.prototype.writeDoubleBE=function(t,r,e){return Y(this,t,r,!1,e)},s.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var o,i=n-e;if(this===t&&e<r&&r<n)for(o=i-1;o>=0;--o)t[o+r]=this[o+e];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+r]=this[o+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+i),r);return i},s.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var i;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(i=r;i<e;++i)this[i]=t;else{var u=s.isBuffer(t)?t:k(new s(t,n).toString()),a=u.length;for(i=0;i<e-r;++i)this[i+r]=u[i%a]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function k(t,r){var e;r=r||1/0;for(var n=t.length,o=null,i=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return i}function F(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,r,e,n){for(var o=0;o<n&&!(o+e>=r.length||o>=t.length);++o)r[o+e]=t[o];return o}}).call(this,e(21))},function(t,r){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,r,e){"use strict";r.byteLength=function(t){var r=f(t),e=r[0],n=r[1];return 3*(e+n)/4-n},r.toByteArray=function(t){var r,e,n=f(t),u=n[0],a=n[1],s=new i(function(t,r,e){return 3*(r+e)/4-e}(0,u,a)),c=0,l=a>0?u-4:u;for(e=0;e<l;e+=4)r=o[t.charCodeAt(e)]<<18|o[t.charCodeAt(e+1)]<<12|o[t.charCodeAt(e+2)]<<6|o[t.charCodeAt(e+3)],s[c++]=r>>16&255,s[c++]=r>>8&255,s[c++]=255&r;2===a&&(r=o[t.charCodeAt(e)]<<2|o[t.charCodeAt(e+1)]>>4,s[c++]=255&r);1===a&&(r=o[t.charCodeAt(e)]<<10|o[t.charCodeAt(e+1)]<<4|o[t.charCodeAt(e+2)]>>2,s[c++]=r>>8&255,s[c++]=255&r);return s},r.fromByteArray=function(t){for(var r,e=t.length,o=e%3,i=[],u=0,a=e-o;u<a;u+=16383)i.push(c(t,u,u+16383>a?a:u+16383));1===o?(r=t[e-1],i.push(n[r>>2]+n[r<<4&63]+"==")):2===o&&(r=(t[e-2]<<8)+t[e-1],i.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=u.length;a<s;++a)n[a]=u[a],o[u.charCodeAt(a)]=a;function f(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function c(t,r,e){for(var o,i,u=[],a=r;a<e;a+=3)o=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),u.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return u.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,r){
17
+ var n=e(26),o=e(27),i=e(28);function u(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,r){if(u()<r)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=s.prototype:(null===t&&(t=new s(r)),t.length=r),t}function s(t,r,e){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return f(this,t,r,e)}function f(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?function(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n);s.TYPED_ARRAY_SUPPORT?(t=r).__proto__=s.prototype:t=h(t,r);return t}(t,r,e,n):"string"==typeof r?function(t,r,e){"string"==typeof e&&""!==e||(e="utf8");if(!s.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(r,e),o=(t=a(t,n)).write(r,e);o!==n&&(t=t.slice(0,o));return t}(t,r,e):function(t,r){if(s.isBuffer(r)){var e=0|p(r.length);return 0===(t=a(t,e)).length||r.copy(t,0,0,e),t}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||(n=r.length)!=n?a(t,0):h(t,r);if("Buffer"===r.type&&i(r.data))return h(t,r.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,r)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,r){if(c(r),t=a(t,r<0?0:0|p(r)),!s.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function h(t,r){var e=r.length<0?0:0|p(r.length);t=a(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function p(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function d(t,r){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return F(t).length;default:if(n)return N(t).length;r=(""+r).toLowerCase(),n=!0}}function y(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,r,e);case"utf8":case"utf-8":return _(this,r,e);case"ascii":return S(this,r,e);case"latin1":case"binary":return I(this,r,e);case"base64":return T(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function v(t,r,e,n,o){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=o?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(o)return-1;e=t.length-1}else if(e<0){if(!o)return-1;e=0}if("string"==typeof r&&(r=s.from(r,n)),s.isBuffer(r))return 0===r.length?-1:b(t,r,e,n,o);if("number"==typeof r)return r&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):b(t,[r],e,n,o);throw new TypeError("val must be string, number or Buffer")}function b(t,r,e,n,o){var i,u=1,a=t.length,s=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,a/=2,s/=2,e/=2}function f(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(o){var c=-1;for(i=e;i<a;i++)if(f(t,i)===f(r,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===s)return c*u}else-1!==c&&(i-=i-c),c=-1}else for(e+s>a&&(e=a-s),i=e;i>=0;i--){for(var l=!0,h=0;h<s;h++)if(f(t,i+h)!==f(r,h)){l=!1;break}if(l)return i}return-1}function w(t,r,e,n){e=Number(e)||0;var o=t.length-e;n?(n=Number(n))>o&&(n=o):n=o;var i=r.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var u=0;u<n;++u){var a=parseInt(r.substr(2*u,2),16);if(isNaN(a))return u;t[e+u]=a}return u}function m(t,r,e,n){return q(N(r,t.length-e),t,e,n)}function A(t,r,e,n){return q(function(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(r),t,e,n)}function E(t,r,e,n){return A(t,r,e,n)}function O(t,r,e,n){return q(F(r),t,e,n)}function P(t,r,e,n){return q(function(t,r){for(var e,n,o,i=[],u=0;u<t.length&&!((r-=2)<0);++u)e=t.charCodeAt(u),n=e>>8,o=e%256,i.push(o),i.push(n);return i}(r,t.length-e),t,e,n)}function T(t,r,e){return 0===r&&e===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(r,e))}function _(t,r,e){e=Math.min(t.length,e);for(var n=[],o=r;o<e;){var i,u,a,s,f=t[o],c=null,l=f>239?4:f>223?3:f>191?2:1;if(o+l<=e)switch(l){case 1:f<128&&(c=f);break;case 2:128==(192&(i=t[o+1]))&&(s=(31&f)<<6|63&i)>127&&(c=s);break;case 3:i=t[o+1],u=t[o+2],128==(192&i)&&128==(192&u)&&(s=(15&f)<<12|(63&i)<<6|63&u)>2047&&(s<55296||s>57343)&&(c=s);break;case 4:i=t[o+1],u=t[o+2],a=t[o+3],128==(192&i)&&128==(192&u)&&128==(192&a)&&(s=(15&f)<<18|(63&i)<<12|(63&u)<<6|63&a)>65535&&s<1114112&&(c=s)}null===c?(c=65533,l=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),o+=l}return function(t){var r=t.length;if(r<=4096)return String.fromCharCode.apply(String,t);var e="",n=0;for(;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return e}(n)}r.Buffer=s,r.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},r.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),r.kMaxLength=u(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,r,e){return f(null,t,r,e)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,r,e){return function(t,r,e,n){return c(r),r<=0?a(t,r):void 0!==e?"string"==typeof n?a(t,r).fill(e,n):a(t,r).fill(e):a(t,r)}(null,t,r,e)},s.allocUnsafe=function(t){return l(null,t)},s.allocUnsafeSlow=function(t){return l(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,r){if(!s.isBuffer(t)||!s.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,o=0,i=Math.min(e,n);o<i;++o)if(t[o]!==r[o]){e=t[o],n=r[o];break}return e<n?-1:n<e?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,r){if(!i(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=s.allocUnsafe(r),o=0;for(e=0;e<t.length;++e){var u=t[e];if(!s.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(n,o),o+=u.length}return n},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)g(this,r,r+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)g(this,r,r+3),g(this,r+1,r+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)g(this,r,r+7),g(this,r+1,r+6),g(this,r+2,r+5),g(this,r+3,r+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?_(this,0,t):y.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,r,e,n,o){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),r<0||e>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=e)return 0;if(n>=o)return-1;if(r>=e)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),u=(e>>>=0)-(r>>>=0),a=Math.min(i,u),f=this.slice(n,o),c=t.slice(r,e),l=0;l<a;++l)if(f[l]!==c[l]){i=f[l],u=c[l];break}return i<u?-1:u<i?1:0},s.prototype.includes=function(t,r,e){return-1!==this.indexOf(t,r,e)},s.prototype.indexOf=function(t,r,e){return v(this,t,r,e,!0)},s.prototype.lastIndexOf=function(t,r,e){return v(this,t,r,e,!1)},s.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var o=this.length-r;if((void 0===e||e>o)&&(e=o),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return w(this,t,r,e);case"utf8":case"utf-8":return m(this,t,r,e);case"ascii":return A(this,t,r,e);case"latin1":case"binary":return E(this,t,r,e);case"base64":return O(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r,e);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function S(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(127&t[o]);return n}function I(t,r,e){var n="";e=Math.min(t.length,e);for(var o=r;o<e;++o)n+=String.fromCharCode(t[o]);return n}function R(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var o="",i=r;i<e;++i)o+=k(t[i]);return o}function B(t,r,e){for(var n=t.slice(r,e),o="",i=0;i<n.length;i+=2)o+=String.fromCharCode(n[i]+256*n[i+1]);return o}function x(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function j(t,r,e,n,o,i){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<i)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function U(t,r,e,n){r<0&&(r=65535+r+1);for(var o=0,i=Math.min(t.length-e,2);o<i;++o)t[e+o]=(r&255<<8*(n?o:1-o))>>>8*(n?o:1-o)}function C(t,r,e,n){r<0&&(r=4294967295+r+1);for(var o=0,i=Math.min(t.length-e,4);o<i;++o)t[e+o]=r>>>8*(n?o:3-o)&255}function D(t,r,e,n,o,i){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function M(t,r,e,n,i){return i||D(t,0,e,4),o.write(t,r,e,n,23,4),e+4}function Y(t,r,e,n,i){return i||D(t,0,e,8),o.write(t,r,e,n,52,8),e+8}s.prototype.slice=function(t,r){var e,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t),s.TYPED_ARRAY_SUPPORT)(e=this.subarray(t,r)).__proto__=s.prototype;else{var o=r-t;e=new s(o,void 0);for(var i=0;i<o;++i)e[i]=this[i+t]}return e},s.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||x(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n},s.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||x(t,r,this.length);for(var n=this[t+--r],o=1;r>0&&(o*=256);)n+=this[t+--r]*o;return n},s.prototype.readUInt8=function(t,r){return r||x(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,r){return r||x(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,r){return r||x(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,r){return r||x(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,r){return r||x(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||x(t,r,this.length);for(var n=this[t],o=1,i=0;++i<r&&(o*=256);)n+=this[t+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*r)),n},s.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||x(t,r,this.length);for(var n=r,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*r)),i},s.prototype.readInt8=function(t,r){return r||x(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,r){r||x(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},s.prototype.readInt16BE=function(t,r){r||x(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},s.prototype.readInt32LE=function(t,r){return r||x(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,r){return r||x(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,r){return r||x(t,4,this.length),o.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,r){return r||x(t,4,this.length),o.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,r){return r||x(t,8,this.length),o.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,r){return r||x(t,8,this.length),o.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||j(this,t,r,e,Math.pow(2,8*e)-1,0);var o=1,i=0;for(this[r]=255&t;++i<e&&(o*=256);)this[r+i]=t/o&255;return r+e},s.prototype.writeUIntBE=function(t,r,e,n){(t=+t,r|=0,e|=0,n)||j(this,t,r,e,Math.pow(2,8*e)-1,0);var o=e-1,i=1;for(this[r+o]=255&t;--o>=0&&(i*=256);)this[r+o]=t/i&255;return r+e},s.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},s.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):U(this,t,r,!0),r+2},s.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):U(this,t,r,!1),r+2},s.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):C(this,t,r,!0),r+4},s.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):C(this,t,r,!1),r+4},s.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);j(this,t,r,e,o-1,-o)}var i=0,u=1,a=0;for(this[r]=255&t;++i<e&&(u*=256);)t<0&&0===a&&0!==this[r+i-1]&&(a=1),this[r+i]=(t/u>>0)-a&255;return r+e},s.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var o=Math.pow(2,8*e-1);j(this,t,r,e,o-1,-o)}var i=e-1,u=1,a=0;for(this[r+i]=255&t;--i>=0&&(u*=256);)t<0&&0===a&&0!==this[r+i+1]&&(a=1),this[r+i]=(t/u>>0)-a&255;return r+e},s.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},s.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):U(this,t,r,!0),r+2},s.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):U(this,t,r,!1),r+2},s.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):C(this,t,r,!0),r+4},s.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||j(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):C(this,t,r,!1),r+4},s.prototype.writeFloatLE=function(t,r,e){return M(this,t,r,!0,e)},s.prototype.writeFloatBE=function(t,r,e){return M(this,t,r,!1,e)},s.prototype.writeDoubleLE=function(t,r,e){return Y(this,t,r,!0,e)},s.prototype.writeDoubleBE=function(t,r,e){return Y(this,t,r,!1,e)},s.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-r<n-e&&(n=t.length-r+e);var o,i=n-e;if(this===t&&e<r&&r<n)for(o=i-1;o>=0;--o)t[o+r]=this[o+e];else if(i<1e3||!s.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)t[o+r]=this[o+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+i),r);return i},s.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=this.length),1===t.length){var o=t.charCodeAt(0);o<256&&(t=o)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;var i;if(r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(i=r;i<e;++i)this[i]=t;else{var u=s.isBuffer(t)?t:N(new s(t,n).toString()),a=u.length;for(i=0;i<e-r;++i)this[i+r]=u[i%a]}return this};var L=/[^+\/0-9A-Za-z-_]/g;function k(t){return t<16?"0"+t.toString(16):t.toString(16)}function N(t,r){var e;r=r||1/0;for(var n=t.length,o=null,i=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!o){if(e>56319){(r-=3)>-1&&i.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&i.push(239,191,189);continue}o=e;continue}if(e<56320){(r-=3)>-1&&i.push(239,191,189),o=e;continue}e=65536+(o-55296<<10|e-56320)}else o&&(r-=3)>-1&&i.push(239,191,189);if(o=null,e<128){if((r-=1)<0)break;i.push(e)}else if(e<2048){if((r-=2)<0)break;i.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;i.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;i.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return i}function F(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,r,e,n){for(var o=0;o<n&&!(o+e>=r.length||o>=t.length);++o)r[o+e]=t[o];return o}}).call(this,e(25))},function(t,r){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,r,e){"use strict";r.byteLength=function(t){var r=f(t),e=r[0],n=r[1];return 3*(e+n)/4-n},r.toByteArray=function(t){var r,e,n=f(t),u=n[0],a=n[1],s=new i(function(t,r,e){return 3*(r+e)/4-e}(0,u,a)),c=0,l=a>0?u-4:u;for(e=0;e<l;e+=4)r=o[t.charCodeAt(e)]<<18|o[t.charCodeAt(e+1)]<<12|o[t.charCodeAt(e+2)]<<6|o[t.charCodeAt(e+3)],s[c++]=r>>16&255,s[c++]=r>>8&255,s[c++]=255&r;2===a&&(r=o[t.charCodeAt(e)]<<2|o[t.charCodeAt(e+1)]>>4,s[c++]=255&r);1===a&&(r=o[t.charCodeAt(e)]<<10|o[t.charCodeAt(e+1)]<<4|o[t.charCodeAt(e+2)]>>2,s[c++]=r>>8&255,s[c++]=255&r);return s},r.fromByteArray=function(t){for(var r,e=t.length,o=e%3,i=[],u=0,a=e-o;u<a;u+=16383)i.push(c(t,u,u+16383>a?a:u+16383));1===o?(r=t[e-1],i.push(n[r>>2]+n[r<<4&63]+"==")):2===o&&(r=(t[e-2]<<8)+t[e-1],i.push(n[r>>10]+n[r>>4&63]+n[r<<2&63]+"="));return i.join("")};for(var n=[],o=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=u.length;a<s;++a)n[a]=u[a],o[u.charCodeAt(a)]=a;function f(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=r),[e,e===r?0:4-e%4]}function c(t,r,e){for(var o,i,u=[],a=r;a<e;a+=3)o=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),u.push(n[(i=o)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return u.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(t,r){
18
18
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
19
- r.read=function(t,r,e,n,o){var i,u,a=8*o-n-1,s=(1<<a)-1,f=s>>1,c=-7,l=e?o-1:0,h=e?-1:1,p=t[r+l];for(l+=h,i=p&(1<<-c)-1,p>>=-c,c+=a;c>0;i=256*i+t[r+l],l+=h,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=n;c>0;u=256*u+t[r+l],l+=h,c-=8);if(0===i)i=1-f;else{if(i===s)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),i-=f}return(p?-1:1)*u*Math.pow(2,i-n)},r.write=function(t,r,e,n,o,i){var u,a,s,f=8*i-o-1,c=(1<<f)-1,l=c>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,y=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(a=isNaN(r)?1:0,u=c):(u=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-u))<1&&(u--,s*=2),(r+=u+l>=1?h/s:h*Math.pow(2,1-l))*s>=2&&(u++,s/=2),u+l>=c?(a=0,u=c):u+l>=1?(a=(r*s-1)*Math.pow(2,o),u+=l):(a=r*Math.pow(2,l-1)*Math.pow(2,o),u=0));o>=8;t[e+p]=255&a,p+=d,a/=256,o-=8);for(u=u<<o|a,f+=o;f>0;t[e+p]=255&u,p+=d,u/=256,f-=8);t[e+p-d]|=128*y}},function(t,r){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},function(t,r){var e,n;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,r){return t<<r|t>>>32-r},rotr:function(t,r){return t<<32-r|t>>>r},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var r=0;r<t.length;r++)t[r]=n.endian(t[r]);return t},randomBytes:function(t){for(var r=[];t>0;t--)r.push(Math.floor(256*Math.random()));return r},bytesToWords:function(t){for(var r=[],e=0,n=0;e<t.length;e++,n+=8)r[n>>>5]|=t[e]<<24-n%32;return r},wordsToBytes:function(t){for(var r=[],e=0;e<32*t.length;e+=8)r.push(t[e>>>5]>>>24-e%32&255);return r},bytesToHex:function(t){for(var r=[],e=0;e<t.length;e++)r.push((t[e]>>>4).toString(16)),r.push((15&t[e]).toString(16));return r.join("")},hexToBytes:function(t){for(var r=[],e=0;e<t.length;e+=2)r.push(parseInt(t.substr(e,2),16));return r},bytesToBase64:function(t){for(var r=[],n=0;n<t.length;n+=3)for(var o=t[n]<<16|t[n+1]<<8|t[n+2],i=0;i<4;i++)8*n+6*i<=8*t.length?r.push(e.charAt(o>>>6*(3-i)&63)):r.push("=");return r.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,o=0;n<t.length;o=++n%4)0!=o&&r.push((e.indexOf(t.charAt(n-1))&Math.pow(2,-2*o+8)-1)<<2*o|e.indexOf(t.charAt(n))>>>6-2*o);return r}},t.exports=n},,function(t,r,e){"use strict";e.r(r),e.d(r,"getCategories",(function(){return M})),e.d(r,"getProductDetails",(function(){return Rt})),e.d(r,"getProducts",(function(){return Dt})),e.d(r,"getRecommendedProducts",(function(){return Mt})),e.d(r,"getRelatedProducts",(function(){return Yt})),e.d(r,"getStoreDetails",(function(){return zt})),e.d(r,"registerModifiersForm",(function(){return lr})),e.d(r,"validateProduct",(function(){return yr})),e.d(r,"initProducts",(function(){return mr})),e.d(r,"getProductTotals",(function(){return Ar})),e.d(r,"transformers",(function(){return i})),e.d(r,"assertions",(function(){return n})),e.d(r,"modifierUtils",(function(){return o}));var n={};e.r(n),e.d(n,"isBaseProduct",(function(){return s})),e.d(n,"isProductDetails",(function(){return f})),e.d(n,"isCartProduct",(function(){return c})),e.d(n,"isFormCartProduct",(function(){return l}));var o={};e.r(o),e.d(o,"multiplyProductQA",(function(){return m})),e.d(o,"divideProductQA",(function(){return A})),e.d(o,"operationOnProductQA",(function(){return E}));var i={};e.r(i),e.d(i,"toCartProduct",(function(){return T})),e.d(i,"toFormCartProduct",(function(){return S})),e.d(i,"toFormCartProductHelper",(function(){return I})),e.d(i,"toFormCartProductFromProductDetails",(function(){return R})),e.d(i,"toFormCartProductFromAnswer",(function(){return B})),e.d(i,"normalizeProductDetails",(function(){return x}));var u=e(2),a=function(t){console.error(t)},s=function(t){var r=t.attributes,e=t.description,n=t.name,o=t.images,i=t.prices,u=t.productId;return"boolean"==typeof r.showInMenu&&("string"==typeof e&&("string"==typeof n&&("string"==typeof u&&(!("object"!=typeof i||"object"==typeof i&&Object.keys(i).length<1)&&!!Array.isArray(o)))))},f=function(t){if(!s(t))return!1;var r=t.questions;return!!Array.isArray(r)},c=function(t){if(!f(t))return!1;var r,e=t.hash,n=t.createdAt,o=t.updatedAt,i=t.amount,a=t.priceCategory,s=t.comment,c=t.questionsAndAnswers;return"string"==typeof e&&("string"==typeof n&&("string"==typeof o&&("number"==typeof i&&("string"==typeof s&&(!!(r=u.PriceCategoryType,Object.keys(r)).includes(a)&&!!Array.isArray(c))))))},l=function(t){var r;if(!c(t))return!1;var e=t.questions;if(!Array.isArray(e))return!1;var n=null===(r=null==e?void 0:e[0])||void 0===r?void 0:r.answers;return!(null==n?void 0:n.length)||void 0!==n[0].amount},h=function(t){var r=t.min,e=t.max,n=t.type;if(n)return"QUANTITY"===n||"SELECT"===n?"COUNTER":n;if(0===r&&1===e)return"CHECKBOX";if(1===r&&1===e)return"RADIO";if(0===r&&(0===e||e===1/0))return"COUNTER";if(e>=r)return"COUNTER";throw new Error("Modifier group bad configured. min "+r+", max "+e+", type "+n)},p=function(t,r,e){var n=[],o=t.max,i=t.min;return r>o&&n.push({code:101,message:"Amount is heigher than the maximum allowed amount "+o}),e&&r<i&&n.push({code:102,message:"Amount is lower than the minimum allowed amount "+i}),n},d=function(t,r){var e=[],n=t.modifiers,o=t.data,i=o.min,u=o.max;0===i&&0===u&&(u=1/0);var a=n.reduce((function(t,r){return t+r.amount}),0);return a>u&&e.push({code:201,message:"Amount is heigher than the maximum allowed amount "+u}),r&&a<i&&e.push({code:202,message:"Amount is lower than the minimum allowed amount "+i}),e},y=function(t){var r=t.touched,e=t.errors,n=t.required,o=t.data,i=t.modifiers,u=o.min,a=i.some((function(t){return"FAIL"===t.status})),s=i.some((function(t){return"IDLE"===t.status})),f=i.some((function(t){return"INCOMPLETE"===t.status})),c=i.reduce((function(t,r){return t+r.amount}),0);return v({touched:r,errors:e,required:n,min:u,amount:c,childrenWithError:a,childrenIdle:s,childrenIncomplete:f,reviewChildren:!0})},g=function(t){var r=t.groups.some((function(t){return"FAIL"===t.status})),e=t.groups.some((function(t){return"IDLE"===t.status})),n=t.groups.some((function(t){return"INCOMPLETE"===t.status})),o=t.touched,i=t.errors,u=t.required,a=t.min,s=t.amount;return v({touched:o,errors:i,required:u,min:a,amount:s,childrenWithError:r,childrenIdle:e,childrenIncomplete:n,reviewChildren:s>0})},v=function(t){var r=t.touched,e=t.errors,n=t.required,o=t.min,i=t.amount,u=t.reviewChildren,s=t.childrenWithError,f=t.childrenIdle,c=t.childrenIncomplete,l=i>0&&!r;return l||r||!n?l||r||n?e.length||u&&s?"FAIL":u&&(f||c)||i<o?"INCOMPLETE":i>=o?"OK":(a("Unhandled case. Unable to compute the renderer status "+JSON.stringify({touched:r,errors:e,required:n,min:o,amount:i},void 0,2)),"FAIL"):"OK":"IDLE"},b=function(t){return t.every((function(t){var r=t.status,e=t.required;return"OK"===r||"IDLE"===r&&!e}))?"OK":t.every((function(t){return!t.touched}))?"IDLE":t.some((function(t){return"FAIL"===t.status}))?"FAIL":"INCOMPLETE"},w=function(){return(w=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},m=function(t){return E(t,(function(t,r){var e=t.amount*r,n=m(w(w({},t),{amount:e}));return w(w({},n),{amount:t.amount*r})}))},A=function(t){return E(t,(function(t,r){var e=A(t);return w(w({},e),{amount:t.amount/r})}))},E=function(t,r){var e=t.amount,n=void 0===e?1:e,o=t.questionsAndAnswers,i=(void 0===o?[]:o).map((function(t){var e=t.answers.map((function(t){return r(t,n)}));return w(w({},t),{answers:e})}));return w(w({},t),{questionsAndAnswers:i})},O=function(){return(O=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},T=function(t,r){if(void 0===r&&(r={}),c(t))return O(O({},t),r);if(f(t))return P(t,r);var e=_(t);return P(e,r)},P=function(t,r){void 0===r&&(r={});var e=t,n=e.questionsAndAnswers,o=e.priceCategory,i=e.amount;return O(O(O({},t),{questionsAndAnswers:null!=n?n:[],amount:null!=i?i:0,priceCategory:null!=o?o:u.PriceCategoryType.NORMAL,comment:"",alerts:[],hash:"",createdAt:"",updatedAt:""}),r)},_=function(t,r){return void 0===r&&(r={}),O(O(O({},t),{addDirectlyToCart:!0,isPriceVip:!1,manufacturer:[],maxAmountForSale:0,questions:[],schedule:[]}),r)},S=function(t,r){if(void 0===r&&(r={}),l(t))return O(O({},t),r);if(f(t))return R(t,r);var e=_(t);return R(e,r)},I=function(t,r){void 0===r&&(r={});var e=A(t),n=e.priceCategory,o=e.productId,i=e.amount,u=e.questions.map((function(t){var r,u=null===(r=e.questionsAndAnswers)||void 0===r?void 0:r.find((function(r){return r.questionId===t.questionId})),a=null!=u?u:t,s=a.questionId,f=a.min,c=a.max,l={rootId:o,min:f,max:c,type:h(a),modifiersCount:t.answers.length,amount:i,path:[]};return O(O({},a),{answers:t.answers.map((function(t){var r,e=null==u?void 0:u.answers.find((function(r){return r.amount>0&&r.productId===t.productId})),o=null!=e?e:t,i=function(t){var r=t.min;return 1===t.modifiersCount?r:0}(l),a=function(t){var r=t.max,e=t.type,n=r||1/0;return"RADIO"===e||"CHECKBOX"===e?1:n}(l),f=function(t){var r=t.groupType,e=t.min,n=t.max,o=t.type;return"RADIO"===r?"RADIO":o?"QUANTITY"===o||"SELECT"===o?"COUNTER":o:1===e&&1===n?"RADIO":0===e&&1===n?"CHECKBOX":0!==e||0!==n&&n!==1/0?n>=e?"COUNTER":r:"COUNTER"}({min:i,max:a,groupType:l.type,type:o.renderType}),c=o.questions.length,h=O(O({},o),{amount:null!==(r=null==o?void 0:o.amount)&&void 0!==r?r:0,priceCategory:n,questionId:s,min:i,max:a,renderType:f});return O(O({},h),{questions:c?I(h).questions:[]})}))})}));return O(O(O({},e),{questions:u}),r)},R=function(t,r){void 0===r&&(r={});var e=P(t);return I(e,r)},B=function(t,r){return void 0===r&&(r={}),I(t,r)},x=function(t){var r=t.questions;return O(O({},t),{questions:r.map((function(t){var r=t.answers;return O(O({},t),{answers:r.map((function(t){var r=t.questions;return O(O({},t),{questions:null!=r?r:[]})}))})}))})},U=e(0),j={CLIENT_NAME:"Trade S.A.",DEFAULT_REQUEST_TIMEOUT:1e4,EXCLUDED_LOGGER_STATUS_CODES:[422],INCLUDED_LOGGER_ENVS:["staging","production"],INCLUDED_INTL_LOG_ENVS:[""],COUNTRY:{NAME:"Ecuador",CODE:"593",LANGUAGE:"es"},DEFAULT_API_TIMEOUT:3e5,HEADERS:["accountId"],FILTERS:["vendorId","storeId","catalogueId","categoryId","productId"],GROUPS:["category"],ORDER_FIELDS:["type","method"],ORDER_TYPES:["alphabetic","price","predefined"],ORDER_METHODS:["asc","desc"],PAGINATION:["page","vendor","store","catalogue","category","product"],ADDITIONAL_FILTERS:["price","query","tags","manufacturerId","weight","dimensions"]},C=j.DEFAULT_API_TIMEOUT,D={artisanApp:void 0,timeout:C,apiCache:{},expiresAt:(new Date).getTime()+C,forms:{}},M=function(){console.log("Not supported yet")},Y=function(t,r,e){var n;void 0===e&&(e="");var o=null!==(n=r.headers.get("account"))&&void 0!==n?n:void 0,i=t.filterBy,u=i.vendorId,a=i.storeId,s=i.catalogueId;!function(t,r){void 0===r&&(r="");var e=Object(U.getState)().accountId;if(void 0===t&&void 0===e)throw new Error("@artisan-commerce/products: AccountId must be defined. Either provide a global accountId or at the function call level. "+r)}(o,e),function(t,r){void 0===r&&(r="");var e=Object(U.getState)().vendorId;if(!(Array.isArray(t)&&t.length||void 0!==t||void 0!==e))throw new Error("@artisan-commerce/products: vendorId must be defined. Either provide a global vendorId or at the function call level. "+r)}(u,e),function(t,r){void 0===r&&(r="");var e=Object(U.getState)().storeId;if(!(Array.isArray(t)&&t.length||void 0!==t||void 0!==e))throw new Error("@artisan-commerce/products: storeId must be defined. Either provide a global storeId or at the function call level. "+r)}(a,e),function(t,r){void 0===r&&(r="");var e=Object(U.getState)().catalogueId;if(!(Array.isArray(t)&&t.length||void 0!==t||void 0!==e))throw new Error("@artisan-commerce/products: catalogueId must be defined. Either provide a global catalogueId or at the function call level. "+r)}(s,e)},L=function(){return(L=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},N=j.PAGINATION,k=j.ADDITIONAL_FILTERS,F=j.ORDER_FIELDS,q=j.FILTERS,z=j.GROUPS,H=j.ORDER_METHODS,G=j.ORDER_TYPES,W=function(t){var r=V(t),e=X(r),n=J(e),o=K(n);return Q(o)},V=function(t){var r=Object(U.getState)(),e=r.vendorId,n=r.storeId,o=Object(U.getState)(),i=o.catalogueId,u=o.categoryId,a=o.productId,s=L(L({},{vendorId:e,storeId:n,catalogueId:i,categoryId:u,productId:a}),t.filterBy),f=Z(s,q,"filter"),c=tt(f);return L(L({},t),{filterBy:c})},X=function(t){var r=$(t,z,"groupBy");return L({},r)},J=function(t){var r=t.orderBy,e=void 0===r?{}:r,n=Z(e,F,"orderBy"),o=L({},n),i=e.method,u=e.type;return u&&!G.includes(u)&&console.warn("@artisan-commerce/products: Invalid ProductsHTTPConfig order type "+u),G.includes(u)||(delete o.type,o.type="predefined"),i&&!H.includes(i)&&console.warn("@artisan-commerce/products: Invalid ProductsHTTPConfig order method "+i),H.includes(i)||(delete o.method,o.method="asc"),L(L({},t),{orderBy:o})},K=function(t){var r=t.pagination,e=Z(void 0===r?{}:r,N,"pagination"),n=L({product:{size:20},category:{size:20}},e);return"category"!==t.groupBy&&delete n.category,L(L({},t),{pagination:n})},Q=function(t){var r=t.additionalFilters,e=Z(void 0===r?{}:r,k,"additionalFilters");return L(L({},t),{additionalFilters:e})},Z=function(t,r,e){var n=L({},t);return Object.keys(n).forEach((function(t){void 0!==n[t]?r.includes(t)||(console.warn("@artisan-commerce/products: Invalid ProductsHTTPConfig "+e+" "+t),delete n[t]):delete n[t]})),n},$=function(t,r,e){var n=L({},t),o=t[e];return void 0===o||r.includes(o)||(console.warn("@artisan-commerce/products: Invalid ProductsHTTPConfig "+e+" "+o),delete n[e]),n},tt=function(t){var r=L({},t);return Object.entries(r).forEach((function(t){var e=t[0],n=t[1];void 0===n||Array.isArray(n)&&!n.length?delete r[e]:Array.isArray(n)&&rt(n[0])||rt(n)||(console.warn("@artisan-commerce/products: Invalid ProductsHTTPConfig filter value: "+e+" = "+n),delete r[e])})),r},rt=function(t){var r=typeof t;return"number"===r||"string"===r},et=(e(4),function(){return(et=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)}),nt=function(t){return Object.entries(t).reduce((function(t,r){var e,n,o=r[0],i=r[1],u=i;return Array.isArray(i)&&(u=i.reduce((function(t,r){return t+","+r}))),et(et({},t),"catalogueId"===o?((e={})[o]=u,e.channelId=u,e):((n={})[o]=u,n))}),{})},ot=function(t){var r=null!=t?t:{},e=r.type,n=void 0===e?"predefined":e,o=r.method;return{orderBy:n,orderMethod:void 0===o?"asc":o}},it=function(t){return void 0===t&&(t={}),Object.entries(t).reduce((function(t,r){var e,n=r[0],o=r[1];return"query"===n?et(et({},t),((e={})[n]=o,e)):t}),{})},ut=function(t){var r;void 0===t&&(t={});var e=Object.entries(t),n=(null!==(r=e.find((function(t){return"category"===t[0]})))&&void 0!==r?r:[])[1],o=(null==n?void 0:n.size)>0;return e.reduce((function(t,r){var e=r[0],n=r[1],i=void 0===n?{}:n;return"page"===e?et(et({},t),{page:i}):"product"===e?et(et({},t),o?{productsByGroup:i.size}:{size:i.size}):"category"===e?et(et({},t),{size:i.size}):t}),{})},at=function(t,r){for(var e=t,n=0,o=Object.entries(r);n<o.length;n++){var i=o[n],u=i[0],a=i[1],s=new RegExp("/:"+u,"g");e=e.replace(s,"/"+a)}return e},st=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))},ft=function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},ct=function(t,r,e){return r=W(r),Y(r,e),function(t,r,e){var n=r.filterBy,o=r.groupBy,i=r.additionalFilters,u=r.orderBy,a=r.pagination,s=nt(n),f=ot(u),c=it(i),l=ut(a),h=et(et(et(et(et({},s),{groupBy:o}),f),c),l);o||delete h.groupBy;var p=at(t,e.params),d=Object(U.getState)().artisanApp,y=(null!=d?d:{}).apiURL,g=Object.entries(h).reduce((function(t,r,e){var n=r[0],o=r[1];return void 0===o?t:t+(e?"&":"")+n+"="+o}),y+"/"+p+"?");return et(et({},e),{url:g,query:h})}(t,r,e)},lt=function(t){return st(void 0,void 0,void 0,(function(){var r,e,n,o,i,u;return ft(this,(function(a){switch(a.label){case 0:r=t.url,e=t.headers,n=t.body,"{}"===(o={headers:e,body:JSON.stringify(n)}).body&&delete o.body,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,fetch(r,o).then((function(t){return t.json()}))];case 2:return i=a.sent(),[3,4];case 3:return u=a.sent(),i={code:null,status:"failed",message:u.message,stack:u.stack},[3,4];case 4:if(i.code<200||i.code>299)throw new Error(JSON.stringify({code:i.code,status:i.status,message:i.message,warnings:i.warning,stack:i.stack}));return[2,i]}}))}))},ht=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))},pt=function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},dt=function(t){return ht(void 0,void 0,void 0,(function(){return pt(this,(function(r){switch(r.label){case 0:return[4,lt(t)];case 1:return[2,r.sent()]}}))}))},yt=e(5),gt=function(){return(gt=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},vt=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))},bt=function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},wt={"Content-Type":"application/json"},mt=function(t,r){return void 0===t&&(t=!0),void 0===r&&(r={}),vt(void 0,void 0,void 0,(function(){var e,n,o,i,u,a,s,f,c,l,h,p,d,y,g,v;return bt(this,(function(b){switch(b.label){case 0:return e=Object(U.getState)().artisanApp,n=e.settings,o=n.platform,i=n.accountId,u=null!==(p=null!==(h=null===(l=r.account)||void 0===l?void 0:l.toString())&&void 0!==h?h:null==i?void 0:i.toString())&&void 0!==p?p:"",a=null!==(y=null!==(d=r.Platform)&&void 0!==d?d:o)&&void 0!==y?y:"",s=a,null===(g=r.Authorization)||void 0===g?[3,1]:(c=g,[3,3]);case 1:return[4,At(t)];case 2:c=b.sent(),b.label=3;case 3:return f=null!==(v=c)&&void 0!==v?v:"",[2,new Headers(gt(gt(gt({},wt),r),{Authorization:f,Platform:s,account:u}))]}}))}))},At=function(t,r){return void 0===t&&(t=!0),vt(void 0,void 0,void 0,(function(){var e,n,o;return bt(this,(function(i){switch(i.label){case 0:return e=Object(U.getState)().artisanApp,[4,null===(o=function(){return Object(yt.initAuth)(e)}().currentUser)||void 0===o?void 0:o.getIdToken(r)];case 1:return(n=i.sent())||t?!n&&t?(a("Please make sure you are authenticated before trying to call a restricted action."),[2]):[2,"Bearer "+n]:[2]}}))}))},Et=e(1),Ot=function(){return(Ot=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},Tt=function(t,r){var e=W(r).pagination,n=t.pagination;return Ot(Ot({},t),{pagination:Pt(e,n)})},Pt=function(t,r){return Ot(Ot({},t),{page:null==r?void 0:r.page,hasMorePages:null==r?void 0:r.hasMorePages})},_t=function(){return(_t=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},St=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))},It=function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Rt=function(t,r){return St(void 0,void 0,void 0,(function(){var e,n,o;return It(this,(function(i){switch(i.label){case 0:return[4,mt(!1)];case 1:return e=i.sent(),n=ct("v1/products/:productId",r,{headers:e,params:{productId:t},query:{},body:{}}),[4,Object(Et.handleHttpCache)(n,(function(t){return St(void 0,void 0,void 0,(function(){var r,e;return It(this,(function(n){switch(n.label){case 0:return[4,dt(t)];case 1:return r=n.sent(),e=x(r.data),[2,_t(_t({},r),{data:e})]}}))}))}))];case 2:return o=i.sent(),[2,Tt(o,r)]}}))}))},Bt=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))},xt=function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Ut=function(t){return Bt(void 0,void 0,void 0,(function(){return xt(this,(function(r){switch(r.label){case 0:return[4,lt(t)];case 1:return[2,r.sent()]}}))}))},jt=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))},Ct=function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Dt=function(t){return jt(void 0,void 0,void 0,(function(){var r,e,n;return Ct(this,(function(o){switch(o.label){case 0:return[4,mt(!1)];case 1:return r=o.sent(),e=ct("api/v3/productsBy",t,{headers:r,params:{},query:{},body:{}}),[4,Object(Et.handleHttpCache)(e,(function(t){return jt(void 0,void 0,void 0,(function(){return Ct(this,(function(r){switch(r.label){case 0:return[4,Ut(t)];case 1:return[2,r.sent()]}}))}))}))];case 2:return n=o.sent(),[2,Tt(n,t)]}}))}))},Mt=function(){console.log("Not implemented yet")},Yt=function(){console.log("not implemented yet")},Lt=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))},Nt=function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},kt=function(t){return Lt(void 0,void 0,void 0,(function(){return Nt(this,(function(r){switch(r.label){case 0:return[4,lt(t)];case 1:return[2,r.sent()]}}))}))},Ft=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))},qt=function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},zt=function(t){return Ft(void 0,void 0,void 0,(function(){var r,e,n;return qt(this,(function(o){switch(o.label){case 0:return[4,mt(!1)];case 1:return r=o.sent(),e=ct("v1/stores/details",t,{headers:r,params:{},query:{},body:{}}),[4,Object(Et.handleHttpCache)(e,(function(t){return Ft(void 0,void 0,void 0,(function(){return qt(this,(function(r){switch(r.label){case 0:return[4,kt(t)];case 1:return[2,r.sent()]}}))}))}))];case 2:return n=o.sent(),[2,Tt(n,t)]}}))}))},Ht=function(){return(Ht=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},Gt=function(){for(var t=0,r=0,e=arguments.length;r<e;r++)t+=arguments[r].length;var n=Array(t),o=0;for(r=0;r<e;r++)for(var i=arguments[r],u=0,a=i.length;u<a;u++,o++)n[o]=i[u];return n},Wt=function(t,r){for(var e=Gt(r),n=t,o=t[0];e.length;){o=Xt(n,e[0]),e=e.slice(1),n=Object.prototype.hasOwnProperty.call(o,"modifiers")?o.modifiers:o.groups}return o},Vt=function(t,r,e){for(var n=Gt(r),o=t,i=Xt(o,n[0]),u=Object.prototype.hasOwnProperty.call(i,"modifiers");n.length>1;)i=Xt(o,n[0]),n=n.slice(1),u=Object.prototype.hasOwnProperty.call(i,"modifiers"),o=Gt(u?i.modifiers:i.groups);var a=n[0];if(1===r.length&&(i={groups:t},u=!1),u){var s=i.modifiers.map((function(t){return t.id===a?Ht({},e):Ht({},t)}));i.modifiers=s}else{var f=i.groups.map((function(t){return t.id===a?Ht({},e):Ht({},t)}));i.groups=f}return 1===r.length?Gt(i.groups):Gt(t)},Xt=function(t,r){var e=t.find((function(t){return t.id===r}));if(!e)throw new Error("Path segment "+r+" doesn't exist in segments "+JSON.stringify(t.map((function(t){return t.id}))));return e},Jt=function(){return(Jt=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},Kt=function(){for(var t=0,r=0,e=arguments.length;r<e;r++)t+=arguments[r].length;var n=Array(t),o=0;for(r=0;r<e;r++)for(var i=arguments[r],u=0,a=i.length;u<a;u++,o++)n[o]=i[u];return n},Qt=function(t,r,e,n,o){var i=Jt(Jt({},e),{amount:n,touched:!0,errors:p(e,n,o),totals:Ar(Jt(Jt({},e.data),{amount:n})),data:Jt(Jt({},e.data),{amount:n})});return i.status=g(i),Vt(t,r,i)},Zt=function(t,r,e,n){var o=e.slice(0,-1),i=Wt(r,o),u=Kt(i.modifiers);"RADIO"!==i.type||n||(u=i.modifiers.map((function(t){return"RADIO"!==t.type||t.id===e[e.length-1]?Jt({},t):Jt(Jt({},t),{amount:0,error:"",totals:Ar(Jt(Jt({},t.data),{amount:0})),data:Jt(Jt({},t.data),{amount:0})})})));var a=(u=u.map((function(r){var o=B(r.data),i=Kt(e.slice(0,-1),[r.id]),u=Jt(Jt({},r),{groups:nr(o,{rootId:t,path:i},r.groups)});return u.errors=p(u,u.amount,n),u.status=g(u),u}))).map((function(t){return Jt({},t.data)})),s=Jt(Jt({},i.data),{answers:a}),f=Jt(Jt({},i),{touched:!0,modifiers:u,data:s});f.errors=d(f,n),f.status=y(f);var c=Vt(r,o,f);return o.length>1&&(c=$t(t,c,o,n)),c},$t=function(t,r,e,n){var o=e.slice(0,-1),i=Wt(r,o),u=i.groups.map((function(t){return Jt({},t.data)})),a=Jt(Jt({},i.data),{questions:u}),s=i.groups.map((function(t){var r=Jt({},t);return r.errors=d(r,n),r.status=y(r),r})),f=Jt(Jt({},i),{touched:!0,groups:s,data:a});f.errors=p(f,f.amount,n),f.status=g(f);var c=Vt(r,o,f);return o.length>1&&(c=Zt(t,c,o,n)),c},tr=function(){return(tr=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},rr=function(){return(rr=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},er=function(){for(var t=0,r=0,e=arguments.length;r<e;r++)t+=arguments[r].length;var n=Array(t),o=0;for(r=0;r<e;r++)for(var i=arguments[r],u=0,a=i.length;u<a;u++,o++)n[o]=i[u];return n},nr=function(t,r,e){var n=r.rootId,o=r.path;return t.questions.map((function(r){var i=null==e?void 0:e.find((function(t){return t.id===r.questionId}));return or(r,{amount:t.amount,rootId:n,path:er(o)},i)}))},or=function(t,r,e){var n=t.questionId,o=t.name,i=t.description,u=t.max,a=t.min,s=t.images,f=r.amount,c=r.rootId,l=r.path,p=null!=e?e:{},d=p.errors,g=p.touched,v={id:n,name:o,description:null!=i?i:"",images:er(null!=s?s:[]),data:rr({},t),errors:null!=d?d:[],touched:null!=g&&g,status:"IDLE",hidden:f<1,required:a>0,type:h(t)},b={rootId:c,max:u,min:a,type:v.type,modifiersCount:t.answers.length,amount:f,path:er(l,[n])},w=t.answers.map((function(t){var r=null==e?void 0:e.modifiers.find((function(r){return r.id===t.productId}));return ir(t,b,r)})),m=rr(rr({},v),{modifiers:w});return rr(rr({},m),{status:y(m)})},ir=function(t,r,e){var n,o,i=t.productId,u=t.questionId,a=t.name,s=t.images,f=t.amount,c=t.renderType,l=t.min,h=t.max,p=B(t),d=r.rootId,y=r.path,v=er(y,[i]),w=nr(p,{rootId:d,path:v},null==e?void 0:e.groups),m={id:i,groupId:u,name:a,images:er(s),amount:f,data:rr({},t),groups:w,errors:null!==(n=null==e?void 0:e.errors)&&void 0!==n?n:[],hidden:r.amount<1,min:l,max:h,required:l>0,touched:null!==(o=null==e?void 0:e.touched)&&void 0!==o&&o,status:"IDLE",totals:Ar(rr(rr({},t),{amount:f})),type:c,handleChange:function(t){!function(t,r,e){var n,o=tr({},Object(U.getState)().forms),i=o[t],u=Wt(i.renderer,r),a=Qt(i.renderer,r,u,e,!1);a=Zt(t,a,r,!1);var s=ar(a,i.product),f=tr(tr({},i),{renderer:a,product:s,status:b(a)}),c=tr(tr({},o),((n={})[t]=f,n));Object(U.setState)({forms:c});var l=tr({},f);delete l.callback,i.callback(l)}(r.rootId,v,t)}};return rr(rr({},m),{status:g(m)})},ur=function(){return(ur=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},ar=function(t,r){var e=T(r);return ur(ur({},e),{questionsAndAnswers:sr(t),updatedAt:""})},sr=function(t){return t.map((function(t){return ur(ur({},t.data),{answers:fr(t.modifiers)})}))},fr=function(t){return t.map((function(t){return t.amount?ur(ur({},t.data),{questionsAndAnswers:sr(t.groups)}):ur(ur({},t.data),{questionsAndAnswers:[]})}))},cr=function(){return(cr=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},lr=function(t,r){var e,n=t.productId,o=Object(U.getState)().forms;if(!!o[n])return a("Form for product with id "+n+" has already been register. Please unsuscribe if you need to register a new form."),function(){};var i=function(t){var r,e=S(t,{amount:null!==(r=t.amount)&&void 0!==r?r:1}),n=nr(e,{rootId:e.productId,path:[]});return{product:ar(n,t),renderer:n,validate:function(){return yr(t.productId)},status:b(n)}}(t),u=cr(cr({},o),((e={})[n]=cr(cr({},i),{callback:r}),e));return Object(U.setState)({forms:u}),r(cr({},i)),function(){return hr(n)}},hr=function(t){var r=Object(U.getState)().forms,e=cr({},r);delete e[t],Object(U.setState)({forms:e})},pr=function(){return(pr=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},dr=function(){for(var t=0,r=0,e=arguments.length;r<e;r++)t+=arguments[r].length;var n=Array(t),o=0;for(r=0;r<e;r++)for(var i=arguments[r],u=0,a=i.length;u<a;u++,o++)n[o]=i[u];return n},yr=function(t){var r,e=pr({},Object(U.getState)().forms),n=e[t],o=n.renderer,i=n.callback,u=n.product,a=dr(o);o.forEach((function(r){var e=[r.id];a=gr(r,a,t,e)}));var s=ar(a,u),f=pr(pr({},n),{renderer:a,product:s,status:b(a)}),c=pr(pr({},e),((r={})[t]=f,r));Object(U.setState)({forms:c});var l=pr({},f);return delete l.callback,i(l),f.status},gr=function(t,r,e,n){var o=t.modifiers,i=t.id,u=!o.length,a=dr(r);return u?(console.warn("Attempting to validate a Modifier group without modifiers, this will likely result in unexpected behaviour. \n Please update the bad group "+i+" of product 0."),a):(o.forEach((function(t){var r=dr(n,[t.id]);a=vr(t,a,e,r)})),a)},vr=function(t,r,e,n){var o=t.groups,i=t.amount,u=t.status,a=t.required,s=!o.length||0===i,f=dr(r);if(s){var c="IDLE"===u&&a||"FAIL"===u||"INCOMPLETE"===u?"FAIL":u,l=pr(pr({},t),{status:c}),h=dr(n);f=Qt(f,h,l,l.amount,!0),f=Zt(e,f,h,!0)}else o.forEach((function(t){var r=dr(n,[t.id]);f=gr(t,f,e,r)}));return f},br=function(){return(br=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},wr=!1,mr=function(t,r){if(void 0===r&&(r={}),wr)console.warn("artisan-commerce/products: initProducts has been called more than once. This behaviour will very likely result in unexpected outcomes so its call was skipped. Please make sure initProducts is only called once");else{if(Object(U.setState)(br({artisanApp:t},r)),void 0!==r.timeout){var e=(new Date).getTime()+r.timeout;Object(U.setState)({expiresAt:e})}"undefined"==typeof window||(wr=!0)}},Ar=function(t,r){if(void 0===r&&(r=t.amount>0?t.amount:1),r<1)throw new Error("Cannot set the amount of getProductTotals with a value less than 1");var e=t,n=!!e.updatedAt?A(e):t;return{unitGrossPrice:Tr(n,1),unitTotalDiscounts:Pr(n,1),unitTotalTaxes:Er(n,1),unitNetPrice:_r(n,1),amount:r,grossPrice:Tr(n,r),totalDiscounts:Pr(n,r),totalTaxes:Er(n,r),netPrice:_r(n,r)}},Er=function(t,r){var e=T(t,{amount:r}),n=e.prices,o=e.amount,i=n[e.priceCategory],u=i.taxes,a=i.grossPrice,s=Rr(u,a);return Or(e,r)+s*o},Or=function(t,r){return t.questionsAndAnswers.reduce((function(t,e){return t+e.answers.reduce((function(t,e){var n=e.prices,o=e.amount,i=n[e.priceCategory],u=i.taxes,a=i.grossPrice;return t+o*(Rr(u,a)+Or(e,r))}),0)*r}),0)},Tr=function(t,r){return Sr(t,"grossPrice",r)},Pr=function(t,r){return 0},_r=function(t,r){return Sr(t,"netPrice",r)},Sr=function(t,r,e){var n=T(t,{amount:e}),o=n.prices,i=n.amount,u=o[n.priceCategory][r];return(Ir(n,r)+u)*i},Ir=function(t,r){return t.questionsAndAnswers.reduce((function(t,e){return t+e.answers.reduce((function(t,e){var n=e.prices;return t+e.amount*(n[e.priceCategory][r]+Ir(e,r))}),0)}),0)},Rr=function(t,r){return t.reduce((function(t,e){return t+e.percentage/100*r}),0)};Object(U.initState)(D)}])}));
19
+ r.read=function(t,r,e,n,o){var i,u,a=8*o-n-1,s=(1<<a)-1,f=s>>1,c=-7,l=e?o-1:0,h=e?-1:1,p=t[r+l];for(l+=h,i=p&(1<<-c)-1,p>>=-c,c+=a;c>0;i=256*i+t[r+l],l+=h,c-=8);for(u=i&(1<<-c)-1,i>>=-c,c+=n;c>0;u=256*u+t[r+l],l+=h,c-=8);if(0===i)i=1-f;else{if(i===s)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),i-=f}return(p?-1:1)*u*Math.pow(2,i-n)},r.write=function(t,r,e,n,o,i){var u,a,s,f=8*i-o-1,c=(1<<f)-1,l=c>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,y=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(a=isNaN(r)?1:0,u=c):(u=Math.floor(Math.log(r)/Math.LN2),r*(s=Math.pow(2,-u))<1&&(u--,s*=2),(r+=u+l>=1?h/s:h*Math.pow(2,1-l))*s>=2&&(u++,s/=2),u+l>=c?(a=0,u=c):u+l>=1?(a=(r*s-1)*Math.pow(2,o),u+=l):(a=r*Math.pow(2,l-1)*Math.pow(2,o),u=0));o>=8;t[e+p]=255&a,p+=d,a/=256,o-=8);for(u=u<<o|a,f+=o;f>0;t[e+p]=255&u,p+=d,u/=256,f-=8);t[e+p-d]|=128*y}},function(t,r){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},function(t,r){var e,n;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,r){return t<<r|t>>>32-r},rotr:function(t,r){return t<<32-r|t>>>r},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var r=0;r<t.length;r++)t[r]=n.endian(t[r]);return t},randomBytes:function(t){for(var r=[];t>0;t--)r.push(Math.floor(256*Math.random()));return r},bytesToWords:function(t){for(var r=[],e=0,n=0;e<t.length;e++,n+=8)r[n>>>5]|=t[e]<<24-n%32;return r},wordsToBytes:function(t){for(var r=[],e=0;e<32*t.length;e+=8)r.push(t[e>>>5]>>>24-e%32&255);return r},bytesToHex:function(t){for(var r=[],e=0;e<t.length;e++)r.push((t[e]>>>4).toString(16)),r.push((15&t[e]).toString(16));return r.join("")},hexToBytes:function(t){for(var r=[],e=0;e<t.length;e+=2)r.push(parseInt(t.substr(e,2),16));return r},bytesToBase64:function(t){for(var r=[],n=0;n<t.length;n+=3)for(var o=t[n]<<16|t[n+1]<<8|t[n+2],i=0;i<4;i++)8*n+6*i<=8*t.length?r.push(e.charAt(o>>>6*(3-i)&63)):r.push("=");return r.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var r=[],n=0,o=0;n<t.length;o=++n%4)0!=o&&r.push((e.indexOf(t.charAt(n-1))&Math.pow(2,-2*o+8)-1)<<2*o|e.indexOf(t.charAt(n))>>>6-2*o);return r}},t.exports=n},,function(t,r,e){"use strict";e.r(r),e.d(r,"getCategories",(function(){return M})),e.d(r,"getProductDetails",(function(){return Rt})),e.d(r,"getProducts",(function(){return Dt})),e.d(r,"getRecommendedProducts",(function(){return Mt})),e.d(r,"getRelatedProducts",(function(){return Yt})),e.d(r,"getStoreDetails",(function(){return zt})),e.d(r,"registerModifiersForm",(function(){return lr})),e.d(r,"validateProduct",(function(){return yr})),e.d(r,"initProducts",(function(){return mr})),e.d(r,"getProductTotals",(function(){return Ar})),e.d(r,"transformers",(function(){return i})),e.d(r,"assertions",(function(){return n})),e.d(r,"modifierUtils",(function(){return o}));var n={};e.r(n),e.d(n,"isBaseProduct",(function(){return s})),e.d(n,"isProductDetails",(function(){return f})),e.d(n,"isCartProduct",(function(){return c})),e.d(n,"isFormCartProduct",(function(){return l}));var o={};e.r(o),e.d(o,"multiplyProductQA",(function(){return m})),e.d(o,"divideProductQA",(function(){return A})),e.d(o,"operationOnProductQA",(function(){return E}));var i={};e.r(i),e.d(i,"toCartProduct",(function(){return P})),e.d(i,"toFormCartProduct",(function(){return S})),e.d(i,"toFormCartProductHelper",(function(){return I})),e.d(i,"toFormCartProductFromProductDetails",(function(){return R})),e.d(i,"toFormCartProductFromAnswer",(function(){return B})),e.d(i,"normalizeProductDetails",(function(){return x}));var u=e(2),a=function(t){console.error(t)},s=function(t){var r=t.attributes,e=t.description,n=t.name,o=t.images,i=t.prices,u=t.productId;return"boolean"==typeof r.showInMenu&&("string"==typeof e&&("string"==typeof n&&("string"==typeof u&&(!("object"!=typeof i||"object"==typeof i&&Object.keys(i).length<1)&&!!Array.isArray(o)))))},f=function(t){if(!s(t))return!1;var r=t.questions;return!!Array.isArray(r)},c=function(t){if(!f(t))return!1;var r,e=t.hash,n=t.createdAt,o=t.updatedAt,i=t.amount,a=t.priceCategory,s=t.comment,c=t.questionsAndAnswers;return"string"==typeof e&&("string"==typeof n&&("string"==typeof o&&("number"==typeof i&&("string"==typeof s&&(!!(r=u.PriceCategoryType,Object.keys(r)).includes(a)&&!!Array.isArray(c))))))},l=function(t){var r;if(!c(t))return!1;var e=t.questions;if(!Array.isArray(e))return!1;var n=null===(r=null==e?void 0:e[0])||void 0===r?void 0:r.answers;return!(null==n?void 0:n.length)||void 0!==n[0].amount},h=function(t){var r=t.min,e=t.max,n=t.type;if(n)return"QUANTITY"===n||"SELECT"===n?"COUNTER":n;if(0===r&&1===e)return"CHECKBOX";if(1===r&&1===e)return"RADIO";if(0===r&&(0===e||e===1/0))return"COUNTER";if(e>=r)return"COUNTER";throw new Error("Modifier group bad configured. min "+r+", max "+e+", type "+n)},p=function(t,r,e){var n=[],o=t.max,i=t.min;return r>o&&n.push({code:101,message:"Amount is heigher than the maximum allowed amount "+o}),e&&r<i&&n.push({code:102,message:"Amount is lower than the minimum allowed amount "+i}),n},d=function(t,r){var e=[],n=t.modifiers,o=t.data,i=o.min,u=o.max;0===i&&0===u&&(u=1/0);var a=n.reduce((function(t,r){return t+r.amount}),0);return a>u&&e.push({code:201,message:"Amount is heigher than the maximum allowed amount "+u}),r&&a<i&&e.push({code:202,message:"Amount is lower than the minimum allowed amount "+i}),e},y=function(t){var r=t.touched,e=t.errors,n=t.required,o=t.data,i=t.modifiers,u=o.min,a=i.some((function(t){return"FAIL"===t.status})),s=i.some((function(t){return"IDLE"===t.status})),f=i.some((function(t){return"INCOMPLETE"===t.status})),c=i.reduce((function(t,r){return t+r.amount}),0);return v({touched:r,errors:e,required:n,min:u,amount:c,childrenWithError:a,childrenIdle:s,childrenIncomplete:f,reviewChildren:!0})},g=function(t){var r=t.groups.some((function(t){return"FAIL"===t.status})),e=t.groups.some((function(t){return"IDLE"===t.status})),n=t.groups.some((function(t){return"INCOMPLETE"===t.status})),o=t.touched,i=t.errors,u=t.required,a=t.min,s=t.amount;return v({touched:o,errors:i,required:u,min:a,amount:s,childrenWithError:r,childrenIdle:e,childrenIncomplete:n,reviewChildren:s>0})},v=function(t){var r=t.touched,e=t.errors,n=t.required,o=t.min,i=t.amount,u=t.reviewChildren,s=t.childrenWithError,f=t.childrenIdle,c=t.childrenIncomplete,l=i>0&&!r;return l||r||!n?l||r||n?e.length||u&&s?"FAIL":u&&(f||c)||i<o?"INCOMPLETE":i>=o?"OK":(a("Unhandled case. Unable to compute the renderer status "+JSON.stringify({touched:r,errors:e,required:n,min:o,amount:i},void 0,2)),"FAIL"):"OK":"IDLE"},b=function(t){return t.every((function(t){var r=t.status,e=t.required;return"OK"===r||"IDLE"===r&&!e}))?"OK":t.every((function(t){return!t.touched}))?"IDLE":t.some((function(t){return"FAIL"===t.status}))?"FAIL":"INCOMPLETE"},w=function(){return(w=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},m=function(t){return E(t,(function(t,r){var e=t.amount*r,n=m(w(w({},t),{amount:e}));return w(w({},n),{amount:t.amount*r})}))},A=function(t){return E(t,(function(t,r){var e=A(t);return w(w({},e),{amount:t.amount/r})}))},E=function(t,r){var e=t.amount,n=void 0===e?1:e,o=t.questionsAndAnswers,i=(void 0===o?[]:o).map((function(t){var e=t.answers.map((function(t){return r(t,n)}));return w(w({},t),{answers:e})}));return w(w({},t),{questionsAndAnswers:i})},O=function(){return(O=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},P=function(t,r){if(void 0===r&&(r={}),c(t))return O(O({},t),r);if(f(t))return T(t,r);var e=_(t);return T(e,r)},T=function(t,r){void 0===r&&(r={});var e=t,n=e.questionsAndAnswers,o=e.priceCategory,i=e.amount;return O(O(O({},t),{questionsAndAnswers:null!=n?n:[],amount:null!=i?i:0,priceCategory:null!=o?o:u.PriceCategoryType.NORMAL,comment:"",alerts:[],hash:"",createdAt:"",updatedAt:""}),r)},_=function(t,r){return void 0===r&&(r={}),O(O(O({},t),{addDirectlyToCart:!0,isPriceVip:!1,manufacturer:[],maxAmountForSale:0,questions:[],schedule:[]}),r)},S=function(t,r){if(void 0===r&&(r={}),l(t))return O(O({},t),r);if(f(t))return R(t,r);var e=_(t);return R(e,r)},I=function(t,r){void 0===r&&(r={});var e=A(t),n=e.priceCategory,o=e.productId,i=e.amount,u=e.questions.map((function(t){var r,u=null===(r=e.questionsAndAnswers)||void 0===r?void 0:r.find((function(r){return r.questionId===t.questionId})),a=null!=u?u:t,s=a.questionId,f=a.min,c=a.max,l={rootId:o,min:f,max:c,type:h(a),modifiersCount:t.answers.length,amount:i,path:[]};return O(O({},a),{answers:t.answers.map((function(t){var r,e=null==u?void 0:u.answers.find((function(r){return r.amount>0&&r.productId===t.productId})),o=null!=e?e:t,i=function(t){var r=t.min;return 1===t.modifiersCount?r:0}(l),a=function(t){var r=t.max,e=t.type,n=r||1/0;return"RADIO"===e||"CHECKBOX"===e?1:n}(l),f=function(t){var r=t.groupType,e=t.min,n=t.max,o=t.type;return"RADIO"===r?"RADIO":o?"QUANTITY"===o||"SELECT"===o?"COUNTER":o:1===e&&1===n?"RADIO":0===e&&1===n?"CHECKBOX":0!==e||0!==n&&n!==1/0?n>=e?"COUNTER":r:"COUNTER"}({min:i,max:a,groupType:l.type,type:o.renderType}),c=o.questions.length,h=O(O({},o),{amount:null!==(r=null==o?void 0:o.amount)&&void 0!==r?r:0,priceCategory:n,questionId:s,min:i,max:a,renderType:f});return O(O({},h),{questions:c?I(h).questions:[]})}))})}));return O(O(O({},e),{questions:u}),r)},R=function(t,r){void 0===r&&(r={});var e=T(t);return I(e,r)},B=function(t,r){return void 0===r&&(r={}),I(t,r)},x=function(t){var r=t.questions;return O(O({},t),{questions:r.map((function(t){var r=t.answers;return O(O({},t),{answers:r.map((function(t){var r=t.questions;return O(O({},t),{questions:null!=r?r:[]})}))})}))})},j=e(0),U={DEFAULT_API_TIMEOUT:3e5,HEADERS:["accountId"],FILTERS:["vendorId","storeId","catalogueId","categoryId","productId"],GROUPS:["category"],ORDER_FIELDS:["type","method"],ORDER_TYPES:["alphabetic","price","predefined"],ORDER_METHODS:["asc","desc"],PAGINATION:["page","vendor","store","catalogue","category","product"],ADDITIONAL_FILTERS:["price","query","tags","manufacturerId","weight","dimensions"]},C=U.DEFAULT_API_TIMEOUT,D={artisanApp:void 0,timeout:C,apiCache:{},expiresAt:(new Date).getTime()+C,forms:{}},M=function(){console.log("Not supported yet")},Y=function(t,r,e){var n;void 0===e&&(e="");var o=null!==(n=r.headers.get("account"))&&void 0!==n?n:void 0,i=t.filterBy,u=i.vendorId,a=i.storeId,s=i.catalogueId;!function(t,r){void 0===r&&(r="");var e=Object(j.getState)().accountId;if(void 0===t&&void 0===e)throw new Error("@artisan-commerce/products: AccountId must be defined. Either provide a global accountId or at the function call level. "+r)}(o,e),function(t,r){void 0===r&&(r="");var e=Object(j.getState)().vendorId;if(!(Array.isArray(t)&&t.length||void 0!==t||void 0!==e))throw new Error("@artisan-commerce/products: vendorId must be defined. Either provide a global vendorId or at the function call level. "+r)}(u,e),function(t,r){void 0===r&&(r="");var e=Object(j.getState)().storeId;if(!(Array.isArray(t)&&t.length||void 0!==t||void 0!==e))throw new Error("@artisan-commerce/products: storeId must be defined. Either provide a global storeId or at the function call level. "+r)}(a,e),function(t,r){void 0===r&&(r="");var e=Object(j.getState)().catalogueId;if(!(Array.isArray(t)&&t.length||void 0!==t||void 0!==e))throw new Error("@artisan-commerce/products: catalogueId must be defined. Either provide a global catalogueId or at the function call level. "+r)}(s,e)},L=function(){return(L=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},k=U.PAGINATION,N=U.ADDITIONAL_FILTERS,F=U.ORDER_FIELDS,q=U.FILTERS,z=U.GROUPS,H=U.ORDER_METHODS,G=U.ORDER_TYPES,W=function(t){var r=V(t),e=J(r),n=K(e),o=X(n);return Q(o)},V=function(t){var r=Object(j.getState)(),e=r.vendorId,n=r.storeId,o=Object(j.getState)(),i=o.catalogueId,u=o.categoryId,a=o.productId,s=L(L({},{vendorId:e,storeId:n,catalogueId:i,categoryId:u,productId:a}),t.filterBy),f=Z(s,q,"filter"),c=tt(f);return L(L({},t),{filterBy:c})},J=function(t){var r=$(t,z,"groupBy");return L({},r)},K=function(t){var r=t.orderBy,e=void 0===r?{}:r,n=Z(e,F,"orderBy"),o=L({},n),i=e.method,u=e.type;return u&&!G.includes(u)&&console.warn("@artisan-commerce/products: Invalid ProductsHTTPConfig order type "+u),G.includes(u)||(delete o.type,o.type="predefined"),i&&!H.includes(i)&&console.warn("@artisan-commerce/products: Invalid ProductsHTTPConfig order method "+i),H.includes(i)||(delete o.method,o.method="asc"),L(L({},t),{orderBy:o})},X=function(t){var r=t.pagination,e=Z(void 0===r?{}:r,k,"pagination"),n=L({product:{size:20},category:{size:20}},e);return"category"!==t.groupBy&&delete n.category,L(L({},t),{pagination:n})},Q=function(t){var r=t.additionalFilters,e=Z(void 0===r?{}:r,N,"additionalFilters");return L(L({},t),{additionalFilters:e})},Z=function(t,r,e){var n=L({},t);return Object.keys(n).forEach((function(t){void 0!==n[t]?r.includes(t)||(console.warn("@artisan-commerce/products: Invalid ProductsHTTPConfig "+e+" "+t),delete n[t]):delete n[t]})),n},$=function(t,r,e){var n=L({},t),o=t[e];return void 0===o||r.includes(o)||(console.warn("@artisan-commerce/products: Invalid ProductsHTTPConfig "+e+" "+o),delete n[e]),n},tt=function(t){var r=L({},t);return Object.entries(r).forEach((function(t){var e=t[0],n=t[1];void 0===n||Array.isArray(n)&&!n.length?delete r[e]:Array.isArray(n)&&rt(n[0])||rt(n)||(console.warn("@artisan-commerce/products: Invalid ProductsHTTPConfig filter value: "+e+" = "+n),delete r[e])})),r},rt=function(t){var r=typeof t;return"number"===r||"string"===r},et=(e(4),function(){return(et=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)}),nt=function(t){return Object.entries(t).reduce((function(t,r){var e,n,o=r[0],i=r[1],u=i;return Array.isArray(i)&&(u=i.reduce((function(t,r){return t+","+r}))),et(et({},t),"catalogueId"===o?((e={})[o]=u,e.channelId=u,e):((n={})[o]=u,n))}),{})},ot=function(t){var r=null!=t?t:{},e=r.type,n=void 0===e?"predefined":e,o=r.method;return{orderBy:n,orderMethod:void 0===o?"asc":o}},it=function(t){return void 0===t&&(t={}),Object.entries(t).reduce((function(t,r){var e,n=r[0],o=r[1];return"query"===n?et(et({},t),((e={})[n]=o,e)):t}),{})},ut=function(t){var r;void 0===t&&(t={});var e=Object.entries(t),n=(null!==(r=e.find((function(t){return"category"===t[0]})))&&void 0!==r?r:[])[1],o=(null==n?void 0:n.size)>0;return e.reduce((function(t,r){var e=r[0],n=r[1],i=void 0===n?{}:n;return"page"===e?et(et({},t),{page:i}):"product"===e?et(et({},t),o?{productsByGroup:i.size}:{size:i.size}):"category"===e?et(et({},t),{size:i.size}):t}),{})},at=function(t,r){for(var e=t,n=0,o=Object.entries(r);n<o.length;n++){var i=o[n],u=i[0],a=i[1],s=new RegExp("/:"+u,"g");e=e.replace(s,"/"+a)}return e},st=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))},ft=function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},ct=function(t,r,e){return r=W(r),Y(r,e),function(t,r,e){var n=r.filterBy,o=r.groupBy,i=r.additionalFilters,u=r.orderBy,a=r.pagination,s=nt(n),f=ot(u),c=it(i),l=ut(a),h=et(et(et(et(et({},s),{groupBy:o}),f),c),l);o||delete h.groupBy;var p=at(t,e.params),d=Object(j.getState)().artisanApp,y=(null!=d?d:{}).apiURL,g=Object.entries(h).reduce((function(t,r,e){var n=r[0],o=r[1];return void 0===o?t:t+(e?"&":"")+n+"="+o}),y+"/"+p+"?");return et(et({},e),{url:g,query:h})}(t,r,e)},lt=function(t){return st(void 0,void 0,void 0,(function(){var r,e,n,o,i,u;return ft(this,(function(a){switch(a.label){case 0:r=t.url,e=t.headers,n=t.body,"{}"===(o={headers:e,body:JSON.stringify(n)}).body&&delete o.body,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,fetch(r,o).then((function(t){return t.json()}))];case 2:return i=a.sent(),[3,4];case 3:return u=a.sent(),i={code:null,status:"failed",message:u.message,stack:u.stack},[3,4];case 4:if(i.code<200||i.code>299)throw new Error(JSON.stringify({code:i.code,status:i.status,message:i.message,warnings:i.warning,stack:i.stack}));return[2,i]}}))}))},ht=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))},pt=function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},dt=function(t){return ht(void 0,void 0,void 0,(function(){return pt(this,(function(r){switch(r.label){case 0:return[4,lt(t)];case 1:return[2,r.sent()]}}))}))},yt=e(5),gt=function(){return(gt=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},vt=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))},bt=function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},wt={"Content-Type":"application/json"},mt=function(t,r){return void 0===t&&(t=!0),void 0===r&&(r={}),vt(void 0,void 0,void 0,(function(){var e,n,o,i,u,a,s,f,c,l,h,p,d,y,g,v;return bt(this,(function(b){switch(b.label){case 0:return e=Object(j.getState)().artisanApp,n=e.settings,o=n.platform,i=n.accountId,u=null!==(p=null!==(h=null===(l=r.account)||void 0===l?void 0:l.toString())&&void 0!==h?h:null==i?void 0:i.toString())&&void 0!==p?p:"",a=null!==(y=null!==(d=r.Platform)&&void 0!==d?d:o)&&void 0!==y?y:"",s=a,null===(g=r.Authorization)||void 0===g?[3,1]:(c=g,[3,3]);case 1:return[4,At(t)];case 2:c=b.sent(),b.label=3;case 3:return f=null!==(v=c)&&void 0!==v?v:"",[2,new Headers(gt(gt(gt({},wt),r),{Authorization:f,Platform:s,account:u}))]}}))}))},At=function(t,r){return void 0===t&&(t=!0),vt(void 0,void 0,void 0,(function(){var e,n,o;return bt(this,(function(i){switch(i.label){case 0:return e=Object(j.getState)().artisanApp,[4,null===(o=function(){return Object(yt.initAuth)(e)}().currentUser)||void 0===o?void 0:o.getIdToken(r)];case 1:return(n=i.sent())||t?!n&&t?(a("Please make sure you are authenticated before trying to call a restricted action."),[2]):[2,"Bearer "+n]:[2]}}))}))},Et=e(1),Ot=function(){return(Ot=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},Pt=function(t,r){var e=W(r).pagination,n=t.pagination;return Ot(Ot({},t),{pagination:Tt(e,n)})},Tt=function(t,r){return Ot(Ot({},t),{page:null==r?void 0:r.page,hasMorePages:null==r?void 0:r.hasMorePages})},_t=function(){return(_t=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},St=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))},It=function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Rt=function(t,r){return St(void 0,void 0,void 0,(function(){var e,n,o;return It(this,(function(i){switch(i.label){case 0:return[4,mt(!1)];case 1:return e=i.sent(),n=ct("v1/products/:productId",r,{headers:e,params:{productId:t},query:{},body:{}}),[4,Object(Et.handleHttpCache)(n,(function(t){return St(void 0,void 0,void 0,(function(){var r,e;return It(this,(function(n){switch(n.label){case 0:return[4,dt(t)];case 1:return r=n.sent(),e=x(r.data),[2,_t(_t({},r),{data:e})]}}))}))}))];case 2:return o=i.sent(),[2,Pt(o,r)]}}))}))},Bt=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))},xt=function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},jt=function(t){return Bt(void 0,void 0,void 0,(function(){return xt(this,(function(r){switch(r.label){case 0:return[4,lt(t)];case 1:return[2,r.sent()]}}))}))},Ut=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))},Ct=function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Dt=function(t){return Ut(void 0,void 0,void 0,(function(){var r,e,n;return Ct(this,(function(o){switch(o.label){case 0:return[4,mt(!1)];case 1:return r=o.sent(),e=ct("api/v3/productsBy",t,{headers:r,params:{},query:{},body:{}}),[4,Object(Et.handleHttpCache)(e,(function(t){return Ut(void 0,void 0,void 0,(function(){return Ct(this,(function(r){switch(r.label){case 0:return[4,jt(t)];case 1:return[2,r.sent()]}}))}))}))];case 2:return n=o.sent(),[2,Pt(n,t)]}}))}))},Mt=function(){console.log("Not implemented yet")},Yt=function(){console.log("not implemented yet")},Lt=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))},kt=function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Nt=function(t){return Lt(void 0,void 0,void 0,(function(){return kt(this,(function(r){switch(r.label){case 0:return[4,lt(t)];case 1:return[2,r.sent()]}}))}))},Ft=function(t,r,e,n){return new(e||(e=Promise))((function(o,i){function u(t){try{s(n.next(t))}catch(t){i(t)}}function a(t){try{s(n.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof e?r:new e((function(t){t(r)}))).then(u,a)}s((n=n.apply(t,r||[])).next())}))},qt=function(t,r){var e,n,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;u;)try{if(e=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.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=r.call(t,u)}catch(t){i=[6,t],n=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},zt=function(t){return Ft(void 0,void 0,void 0,(function(){var r,e,n;return qt(this,(function(o){switch(o.label){case 0:return[4,mt(!1)];case 1:return r=o.sent(),e=ct("v1/stores/details",t,{headers:r,params:{},query:{},body:{}}),[4,Object(Et.handleHttpCache)(e,(function(t){return Ft(void 0,void 0,void 0,(function(){return qt(this,(function(r){switch(r.label){case 0:return[4,Nt(t)];case 1:return[2,r.sent()]}}))}))}))];case 2:return n=o.sent(),[2,Pt(n,t)]}}))}))},Ht=function(){return(Ht=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},Gt=function(){for(var t=0,r=0,e=arguments.length;r<e;r++)t+=arguments[r].length;var n=Array(t),o=0;for(r=0;r<e;r++)for(var i=arguments[r],u=0,a=i.length;u<a;u++,o++)n[o]=i[u];return n},Wt=function(t,r){for(var e=Gt(r),n=t,o=t[0];e.length;){o=Jt(n,e[0]),e=e.slice(1),n=Object.prototype.hasOwnProperty.call(o,"modifiers")?o.modifiers:o.groups}return o},Vt=function(t,r,e){for(var n=Gt(r),o=t,i=Jt(o,n[0]),u=Object.prototype.hasOwnProperty.call(i,"modifiers");n.length>1;)i=Jt(o,n[0]),n=n.slice(1),u=Object.prototype.hasOwnProperty.call(i,"modifiers"),o=Gt(u?i.modifiers:i.groups);var a=n[0];if(1===r.length&&(i={groups:t},u=!1),u){var s=i.modifiers.map((function(t){return t.id===a?Ht({},e):Ht({},t)}));i.modifiers=s}else{var f=i.groups.map((function(t){return t.id===a?Ht({},e):Ht({},t)}));i.groups=f}return 1===r.length?Gt(i.groups):Gt(t)},Jt=function(t,r){var e=t.find((function(t){return t.id===r}));if(!e)throw new Error("Path segment "+r+" doesn't exist in segments "+JSON.stringify(t.map((function(t){return t.id}))));return e},Kt=function(){return(Kt=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},Xt=function(){for(var t=0,r=0,e=arguments.length;r<e;r++)t+=arguments[r].length;var n=Array(t),o=0;for(r=0;r<e;r++)for(var i=arguments[r],u=0,a=i.length;u<a;u++,o++)n[o]=i[u];return n},Qt=function(t,r,e,n,o){var i=Kt(Kt({},e),{amount:n,touched:!0,errors:p(e,n,o),totals:Ar(Kt(Kt({},e.data),{amount:n})),data:Kt(Kt({},e.data),{amount:n})});return i.status=g(i),Vt(t,r,i)},Zt=function(t,r,e,n){var o=e.slice(0,-1),i=Wt(r,o),u=Xt(i.modifiers);"RADIO"!==i.type||n||(u=i.modifiers.map((function(t){return"RADIO"!==t.type||t.id===e[e.length-1]?Kt({},t):Kt(Kt({},t),{amount:0,error:"",totals:Ar(Kt(Kt({},t.data),{amount:0})),data:Kt(Kt({},t.data),{amount:0})})})));var a=(u=u.map((function(r){var o=B(r.data),i=Xt(e.slice(0,-1),[r.id]),u=Kt(Kt({},r),{groups:nr(o,{rootId:t,path:i},r.groups)});return u.errors=p(u,u.amount,n),u.status=g(u),u}))).map((function(t){return Kt({},t.data)})),s=Kt(Kt({},i.data),{answers:a}),f=Kt(Kt({},i),{touched:!0,modifiers:u,data:s});f.errors=d(f,n),f.status=y(f);var c=Vt(r,o,f);return o.length>1&&(c=$t(t,c,o,n)),c},$t=function(t,r,e,n){var o=e.slice(0,-1),i=Wt(r,o),u=i.groups.map((function(t){return Kt({},t.data)})),a=Kt(Kt({},i.data),{questions:u}),s=i.groups.map((function(t){var r=Kt({},t);return r.errors=d(r,n),r.status=y(r),r})),f=Kt(Kt({},i),{touched:!0,groups:s,data:a});f.errors=p(f,f.amount,n),f.status=g(f);var c=Vt(r,o,f);return o.length>1&&(c=Zt(t,c,o,n)),c},tr=function(){return(tr=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},rr=function(){return(rr=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},er=function(){for(var t=0,r=0,e=arguments.length;r<e;r++)t+=arguments[r].length;var n=Array(t),o=0;for(r=0;r<e;r++)for(var i=arguments[r],u=0,a=i.length;u<a;u++,o++)n[o]=i[u];return n},nr=function(t,r,e){var n=r.rootId,o=r.path;return t.questions.map((function(r){var i=null==e?void 0:e.find((function(t){return t.id===r.questionId}));return or(r,{amount:t.amount,rootId:n,path:er(o)},i)}))},or=function(t,r,e){var n=t.questionId,o=t.name,i=t.description,u=t.max,a=t.min,s=t.images,f=r.amount,c=r.rootId,l=r.path,p=null!=e?e:{},d=p.errors,g=p.touched,v={id:n,name:o,description:null!=i?i:"",images:er(null!=s?s:[]),data:rr({},t),errors:null!=d?d:[],touched:null!=g&&g,status:"IDLE",hidden:f<1,required:a>0,type:h(t)},b={rootId:c,max:u,min:a,type:v.type,modifiersCount:t.answers.length,amount:f,path:er(l,[n])},w=t.answers.map((function(t){var r=null==e?void 0:e.modifiers.find((function(r){return r.id===t.productId}));return ir(t,b,r)})),m=rr(rr({},v),{modifiers:w});return rr(rr({},m),{status:y(m)})},ir=function(t,r,e){var n,o,i=t.productId,u=t.questionId,a=t.name,s=t.images,f=t.amount,c=t.renderType,l=t.min,h=t.max,p=B(t),d=r.rootId,y=r.path,v=er(y,[i]),w=nr(p,{rootId:d,path:v},null==e?void 0:e.groups),m={id:i,groupId:u,name:a,images:er(s),amount:f,data:rr({},t),groups:w,errors:null!==(n=null==e?void 0:e.errors)&&void 0!==n?n:[],hidden:r.amount<1,min:l,max:h,required:l>0,touched:null!==(o=null==e?void 0:e.touched)&&void 0!==o&&o,status:"IDLE",totals:Ar(rr(rr({},t),{amount:f})),type:c,handleChange:function(t){!function(t,r,e){var n,o=tr({},Object(j.getState)().forms),i=o[t],u=Wt(i.renderer,r),a=Qt(i.renderer,r,u,e,!1);a=Zt(t,a,r,!1);var s=ar(a,i.product),f=tr(tr({},i),{renderer:a,product:s,status:b(a)}),c=tr(tr({},o),((n={})[t]=f,n));Object(j.setState)({forms:c});var l=tr({},f);delete l.callback,i.callback(l)}(r.rootId,v,t)}};return rr(rr({},m),{status:g(m)})},ur=function(){return(ur=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},ar=function(t,r){var e=P(r);return ur(ur({},e),{questionsAndAnswers:sr(t),updatedAt:""})},sr=function(t){return t.map((function(t){return ur(ur({},t.data),{answers:fr(t.modifiers)})}))},fr=function(t){return t.map((function(t){return t.amount?ur(ur({},t.data),{questionsAndAnswers:sr(t.groups)}):ur(ur({},t.data),{questionsAndAnswers:[]})}))},cr=function(){return(cr=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},lr=function(t,r){var e,n=t.productId,o=Object(j.getState)().forms;if(!!o[n])return a("Form for product with id "+n+" has already been register. Please unsuscribe if you need to register a new form."),function(){};var i=function(t){var r,e=S(t,{amount:null!==(r=t.amount)&&void 0!==r?r:1}),n=nr(e,{rootId:e.productId,path:[]});return{product:ar(n,t),renderer:n,validate:function(){return yr(t.productId)},status:b(n)}}(t),u=cr(cr({},o),((e={})[n]=cr(cr({},i),{callback:r}),e));return Object(j.setState)({forms:u}),r(cr({},i)),function(){return hr(n)}},hr=function(t){var r=Object(j.getState)().forms,e=cr({},r);delete e[t],Object(j.setState)({forms:e})},pr=function(){return(pr=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},dr=function(){for(var t=0,r=0,e=arguments.length;r<e;r++)t+=arguments[r].length;var n=Array(t),o=0;for(r=0;r<e;r++)for(var i=arguments[r],u=0,a=i.length;u<a;u++,o++)n[o]=i[u];return n},yr=function(t){var r,e=pr({},Object(j.getState)().forms),n=e[t],o=n.renderer,i=n.callback,u=n.product,a=dr(o);o.forEach((function(r){var e=[r.id];a=gr(r,a,t,e)}));var s=ar(a,u),f=pr(pr({},n),{renderer:a,product:s,status:b(a)}),c=pr(pr({},e),((r={})[t]=f,r));Object(j.setState)({forms:c});var l=pr({},f);return delete l.callback,i(l),f.status},gr=function(t,r,e,n){var o=t.modifiers,i=t.id,u=!o.length,a=dr(r);return u?(console.warn("Attempting to validate a Modifier group without modifiers, this will likely result in unexpected behaviour. \n Please update the bad group "+i+" of product 0."),a):(o.forEach((function(t){var r=dr(n,[t.id]);a=vr(t,a,e,r)})),a)},vr=function(t,r,e,n){var o=t.groups,i=t.amount,u=t.status,a=t.required,s=!o.length||0===i,f=dr(r);if(s){var c="IDLE"===u&&a||"FAIL"===u||"INCOMPLETE"===u?"FAIL":u,l=pr(pr({},t),{status:c}),h=dr(n);f=Qt(f,h,l,l.amount,!0),f=Zt(e,f,h,!0)}else o.forEach((function(t){var r=dr(n,[t.id]);f=gr(t,f,e,r)}));return f},br=function(){return(br=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)},wr=!1,mr=function(t,r){if(void 0===r&&(r={}),wr)console.warn("artisan-commerce/products: initProducts has been called more than once. This behaviour will very likely result in unexpected outcomes so its call was skipped. Please make sure initProducts is only called once");else{if(Object(j.setState)(br({artisanApp:t},r)),void 0!==r.timeout){var e=(new Date).getTime()+r.timeout;Object(j.setState)({expiresAt:e})}"undefined"==typeof window||(wr=!0)}},Ar=function(t,r){if(void 0===r&&(r=t.amount>0?t.amount:1),r<1)throw new Error("Cannot set the amount of getProductTotals with a value less than 1");var e=t,n=!!e.updatedAt?A(e):t;return{unitGrossPrice:Pr(n,1),unitTotalDiscounts:Tr(n,1),unitTotalTaxes:Er(n,1),unitNetPrice:_r(n,1),amount:r,grossPrice:Pr(n,r),totalDiscounts:Tr(n,r),totalTaxes:Er(n,r),netPrice:_r(n,r)}},Er=function(t,r){var e=P(t,{amount:r}),n=e.prices,o=e.amount,i=n[e.priceCategory],u=i.taxes,a=i.grossPrice,s=Rr(u,a);return Or(e,r)+s*o},Or=function(t,r){return t.questionsAndAnswers.reduce((function(t,e){return t+e.answers.reduce((function(t,e){var n=e.prices,o=e.amount,i=n[e.priceCategory],u=i.taxes,a=i.grossPrice;return t+o*(Rr(u,a)+Or(e,r))}),0)*r}),0)},Pr=function(t,r){return Sr(t,"grossPrice",r)},Tr=function(t,r){return 0},_r=function(t,r){return Sr(t,"netPrice",r)},Sr=function(t,r,e){var n=P(t,{amount:e}),o=n.prices,i=n.amount,u=o[n.priceCategory][r];return(Ir(n,r)+u)*i},Ir=function(t,r){return t.questionsAndAnswers.reduce((function(t,e){return t+e.answers.reduce((function(t,e){var n=e.prices;return t+e.amount*(n[e.priceCategory][r]+Ir(e,r))}),0)}),0)},Rr=function(t,r){return t.reduce((function(t,e){return t+e.percentage/100*r}),0)};Object(j.initState)(D)}])}));
package/build/report.json CHANGED
@@ -1 +1 @@
1
- [{"label":"main.bundle.js","isAsset":true,"statSize":201610,"parsedSize":101048,"gzipSize":19179,"groups":[{"label":"state/build","path":"./state/build","statSize":1640,"groups":[{"id":0,"label":"main.bundle.js","path":"./state/build/main.bundle.js","statSize":1640,"parsedSize":1440,"gzipSize":624}],"parsedSize":1440,"gzipSize":624},{"label":"cache/build","path":"./cache/build","statSize":31023,"groups":[{"id":1,"label":"main.bundle.js","path":"./cache/build/main.bundle.js","statSize":31023,"parsedSize":30527,"gzipSize":9531}],"parsedSize":30527,"gzipSize":9531},{"label":"types/build","path":"./types/build","statSize":5120,"groups":[{"id":2,"label":"index.js","path":"./types/build/index.js","statSize":1405,"parsedSize":535,"gzipSize":290},{"label":"types","path":"./types/build/types","statSize":3715,"groups":[{"id":6,"label":"app.types.js","path":"./types/build/types/app.types.js","statSize":114,"parsedSize":78,"gzipSize":97},{"id":7,"label":"account.types.js","path":"./types/build/types/account.types.js","statSize":150,"parsedSize":78,"gzipSize":97},{"id":8,"label":"artisanDB.types.js","path":"./types/build/types/artisanDB.types.js","statSize":120,"parsedSize":78,"gzipSize":97},{"id":9,"label":"category.types.js","path":"./types/build/types/category.types.js","statSize":119,"parsedSize":78,"gzipSize":97},{"id":10,"label":"channel.types.js","path":"./types/build/types/channel.types.js","statSize":150,"parsedSize":78,"gzipSize":97},{"id":11,"label":"common.types.js","path":"./types/build/types/common.types.js","statSize":162,"parsedSize":78,"gzipSize":97},{"id":12,"label":"coupons.types.js","path":"./types/build/types/coupons.types.js","statSize":118,"parsedSize":78,"gzipSize":97},{"id":13,"label":"image.types.js","path":"./types/build/types/image.types.js","statSize":146,"parsedSize":78,"gzipSize":97},{"id":14,"label":"product.types.js","path":"./types/build/types/product.types.js","statSize":1180,"parsedSize":577,"gzipSize":301},{"id":15,"label":"shippingCost.types.js","path":"./types/build/types/shippingCost.types.js","statSize":160,"parsedSize":78,"gzipSize":97},{"id":16,"label":"shoppingCart.types.js","path":"./types/build/types/shoppingCart.types.js","statSize":123,"parsedSize":78,"gzipSize":97},{"id":17,"label":"store.types.js","path":"./types/build/types/store.types.js","statSize":913,"parsedSize":485,"gzipSize":270},{"id":18,"label":"vendor.types.js","path":"./types/build/types/vendor.types.js","statSize":117,"parsedSize":78,"gzipSize":97},{"id":19,"label":"http.types.js","path":"./types/build/types/http.types.js","statSize":143,"parsedSize":78,"gzipSize":97}],"parsedSize":1998,"gzipSize":401}],"parsedSize":2533,"gzipSize":602},{"label":"home/circleci/repo/node_modules","path":"./home/circleci/repo/node_modules","statSize":60750,"groups":[{"label":"charenc","path":"./home/circleci/repo/node_modules/charenc","statSize":850,"groups":[{"id":3,"label":"charenc.js","path":"./home/circleci/repo/node_modules/charenc/charenc.js","statSize":850,"parsedSize":426,"gzipSize":231}],"parsedSize":426,"gzipSize":231},{"label":"sha1","path":"./home/circleci/repo/node_modules/sha1","statSize":2124,"groups":[{"id":4,"label":"sha1.js","path":"./home/circleci/repo/node_modules/sha1/sha1.js","statSize":2124,"parsedSize":947,"gzipSize":625}],"parsedSize":947,"gzipSize":625},{"label":"node-libs-browser/node_modules/buffer","path":"./home/circleci/repo/node_modules/node-libs-browser/node_modules/buffer","statSize":48590,"groups":[{"id":20,"label":"index.js","path":"./home/circleci/repo/node_modules/node-libs-browser/node_modules/buffer/index.js","statSize":48590,"parsedSize":19827,"gzipSize":5836}],"parsedSize":19827,"gzipSize":5836},{"label":"base64-js","path":"./home/circleci/repo/node_modules/base64-js","statSize":3932,"groups":[{"id":22,"label":"index.js","path":"./home/circleci/repo/node_modules/base64-js/index.js","statSize":3932,"parsedSize":1406,"gzipSize":744}],"parsedSize":1406,"gzipSize":744},{"label":"ieee754","path":"./home/circleci/repo/node_modules/ieee754","statSize":2154,"groups":[{"id":23,"label":"index.js","path":"./home/circleci/repo/node_modules/ieee754/index.js","statSize":2154,"parsedSize":972,"gzipSize":573}],"parsedSize":972,"gzipSize":573},{"label":"isarray","path":"./home/circleci/repo/node_modules/isarray","statSize":132,"groups":[{"id":24,"label":"index.js","path":"./home/circleci/repo/node_modules/isarray/index.js","statSize":132,"parsedSize":104,"gzipSize":109}],"parsedSize":104,"gzipSize":109},{"label":"crypt","path":"./home/circleci/repo/node_modules/crypt","statSize":2968,"groups":[{"id":25,"label":"crypt.js","path":"./home/circleci/repo/node_modules/crypt/crypt.js","statSize":2968,"parsedSize":1273,"gzipSize":646}],"parsedSize":1273,"gzipSize":646}],"parsedSize":24955,"gzipSize":7901},{"label":"auth/build","path":"./auth/build","statSize":1417,"groups":[{"id":5,"label":"main.bundle.js","path":"./auth/build/main.bundle.js","statSize":1417,"parsedSize":1220,"gzipSize":542}],"parsedSize":1220,"gzipSize":542},{"label":"buildin","path":"./buildin","statSize":472,"groups":[{"id":21,"label":"global.js","path":"./buildin/global.js","statSize":472,"parsedSize":144,"gzipSize":129}],"parsedSize":144,"gzipSize":129},{"label":"src","path":"./src","statSize":101188,"groups":[{"id":27,"label":"index.ts + 31 modules (concatenated)","path":"./src/index.ts + 31 modules (concatenated)","statSize":101188,"parsedSize":39045,"gzipSize":8598,"concatenated":true,"groups":[{"label":"src","path":"./src/index.ts + 31 modules (concatenated)/src","statSize":101163,"groups":[{"id":null,"label":"index.ts","path":"./src/index.ts + 31 modules (concatenated)/src/index.ts","statSize":1141,"parsedSize":440,"gzipSize":96,"inaccurateSizes":true},{"label":"utils","path":"./src/index.ts + 31 modules (concatenated)/src/utils","statSize":65158,"groups":[{"label":"assertions","path":"./src/index.ts + 31 modules (concatenated)/src/utils/assertions","statSize":2984,"groups":[{"id":null,"label":"assertions.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/assertions/assertions.utils.ts","statSize":2984,"parsedSize":1151,"gzipSize":253,"inaccurateSizes":true}],"parsedSize":1151,"gzipSize":253,"inaccurateSizes":true},{"label":"questionsAndAnswers","path":"./src/index.ts + 31 modules (concatenated)/src/utils/questionsAndAnswers","statSize":1822,"groups":[{"id":null,"label":"questionsAndAnswers.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/questionsAndAnswers/questionsAndAnswers.utils.ts","statSize":1822,"parsedSize":703,"gzipSize":154,"inaccurateSizes":true}],"parsedSize":703,"gzipSize":154,"inaccurateSizes":true},{"label":"transformers","path":"./src/index.ts + 31 modules (concatenated)/src/utils/transformers","statSize":7566,"groups":[{"id":null,"label":"transformers.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/transformers/transformers.utils.ts","statSize":6615,"parsedSize":2552,"gzipSize":562,"inaccurateSizes":true},{"id":null,"label":"api.transformer.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/transformers/api.transformer.ts","statSize":951,"parsedSize":366,"gzipSize":80,"inaccurateSizes":true}],"parsedSize":2919,"gzipSize":642,"inaccurateSizes":true},{"label":"state","path":"./src/index.ts + 31 modules (concatenated)/src/utils/state","statSize":430,"groups":[{"id":null,"label":"state.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/state/state.utils.ts","statSize":430,"parsedSize":165,"gzipSize":36,"inaccurateSizes":true}],"parsedSize":165,"gzipSize":36,"inaccurateSizes":true},{"label":"caculations","path":"./src/index.ts + 31 modules (concatenated)/src/utils/caculations","statSize":4523,"groups":[{"id":null,"label":"calculations.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/caculations/calculations.utils.ts","statSize":4523,"parsedSize":1745,"gzipSize":384,"inaccurateSizes":true}],"parsedSize":1745,"gzipSize":384,"inaccurateSizes":true},{"id":null,"label":"common.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/common.utils.ts","statSize":383,"parsedSize":147,"gzipSize":32,"inaccurateSizes":true},{"label":"modifiers","path":"./src/index.ts + 31 modules (concatenated)/src/utils/modifiers","statSize":26001,"groups":[{"id":null,"label":"common.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/modifiers/common.utils.ts","statSize":7654,"parsedSize":2953,"gzipSize":650,"inaccurateSizes":true},{"id":null,"label":"updateRenderer.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/modifiers/updateRenderer.utils.ts","statSize":5588,"parsedSize":2156,"gzipSize":474,"inaccurateSizes":true},{"id":null,"label":"form.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/modifiers/form.utils.ts","statSize":2534,"parsedSize":977,"gzipSize":215,"inaccurateSizes":true},{"id":null,"label":"rendererTraversal.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/modifiers/rendererTraversal.utils.ts","statSize":3092,"parsedSize":1193,"gzipSize":262,"inaccurateSizes":true},{"id":null,"label":"renderer.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/modifiers/renderer.utils.ts","statSize":5227,"parsedSize":2016,"gzipSize":444,"inaccurateSizes":true},{"id":null,"label":"handleChange.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/modifiers/handleChange.utils.ts","statSize":1906,"parsedSize":735,"gzipSize":161,"inaccurateSizes":true}],"parsedSize":10032,"gzipSize":2209,"inaccurateSizes":true},{"label":"http","path":"./src/index.ts + 31 modules (concatenated)/src/utils/http","statSize":15385,"groups":[{"id":null,"label":"http.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/http/http.utils.ts","statSize":4637,"parsedSize":1789,"gzipSize":394,"inaccurateSizes":true},{"id":null,"label":"purge.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/http/purge.utils.ts","statSize":5967,"parsedSize":2302,"gzipSize":507,"inaccurateSizes":true},{"id":null,"label":"request.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/http/request.utils.ts","statSize":4781,"parsedSize":1844,"gzipSize":406,"inaccurateSizes":true}],"parsedSize":5936,"gzipSize":1307,"inaccurateSizes":true},{"id":null,"label":"services.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/services.utils.ts","statSize":6064,"parsedSize":2339,"gzipSize":515,"inaccurateSizes":true}],"parsedSize":25142,"gzipSize":5536,"inaccurateSizes":true},{"label":"lib","path":"./src/index.ts + 31 modules (concatenated)/src/lib","statSize":22345,"groups":[{"label":"getCategories","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getCategories","statSize":109,"groups":[{"id":null,"label":"getCategories.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getCategories/getCategories.ts","statSize":109,"parsedSize":42,"gzipSize":9,"inaccurateSizes":true}],"parsedSize":42,"gzipSize":9,"inaccurateSizes":true},{"label":"getProductDetails","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getProductDetails","statSize":4989,"groups":[{"id":null,"label":"getProductDetails.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getProductDetails/getProductDetails.ts","statSize":4989,"parsedSize":1925,"gzipSize":423,"inaccurateSizes":true}],"parsedSize":1925,"gzipSize":423,"inaccurateSizes":true},{"label":"getProducts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getProducts","statSize":4084,"groups":[{"id":null,"label":"getProducts.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getProducts/getProducts.ts","statSize":4084,"parsedSize":1575,"gzipSize":347,"inaccurateSizes":true}],"parsedSize":1575,"gzipSize":347,"inaccurateSizes":true},{"label":"getRecommendedProducts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getRecommendedProducts","statSize":129,"groups":[{"id":null,"label":"getRecommendedProducts.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getRecommendedProducts/getRecommendedProducts.ts","statSize":129,"parsedSize":49,"gzipSize":10,"inaccurateSizes":true}],"parsedSize":49,"gzipSize":10,"inaccurateSizes":true},{"label":"getRelatedProducts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getRelatedProducts","statSize":121,"groups":[{"id":null,"label":"getRelatedProducts.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getRelatedProducts/getRelatedProducts.ts","statSize":121,"parsedSize":46,"gzipSize":10,"inaccurateSizes":true}],"parsedSize":46,"gzipSize":10,"inaccurateSizes":true},{"label":"getStoreDetails","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getStoreDetails","statSize":4245,"groups":[{"id":null,"label":"getStoreDetails.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getStoreDetails/getStoreDetails.ts","statSize":4245,"parsedSize":1638,"gzipSize":360,"inaccurateSizes":true}],"parsedSize":1638,"gzipSize":360,"inaccurateSizes":true},{"label":"registerModifiersForm","path":"./src/index.ts + 31 modules (concatenated)/src/lib/registerModifiersForm","statSize":2993,"groups":[{"id":null,"label":"registerModifiersForm.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/registerModifiersForm/registerModifiersForm.ts","statSize":2993,"parsedSize":1154,"gzipSize":254,"inaccurateSizes":true}],"parsedSize":1154,"gzipSize":254,"inaccurateSizes":true},{"label":"validateProduct","path":"./src/index.ts + 31 modules (concatenated)/src/lib/validateProduct","statSize":4177,"groups":[{"id":null,"label":"validateProduct.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/validateProduct/validateProduct.ts","statSize":4177,"parsedSize":1611,"gzipSize":354,"inaccurateSizes":true}],"parsedSize":1611,"gzipSize":354,"inaccurateSizes":true},{"label":"initProducts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/initProducts","statSize":1498,"groups":[{"id":null,"label":"initProducts.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/initProducts/initProducts.ts","statSize":1498,"parsedSize":578,"gzipSize":127,"inaccurateSizes":true}],"parsedSize":578,"gzipSize":127,"inaccurateSizes":true}],"parsedSize":8622,"gzipSize":1898,"inaccurateSizes":true},{"label":"config","path":"./src/index.ts + 31 modules (concatenated)/src/config","statSize":1526,"groups":[{"id":null,"label":"constants.ts","path":"./src/index.ts + 31 modules (concatenated)/src/config/constants.ts","statSize":1526,"parsedSize":588,"gzipSize":129,"inaccurateSizes":true}],"parsedSize":588,"gzipSize":129,"inaccurateSizes":true},{"label":"services","path":"./src/index.ts + 31 modules (concatenated)/src/services","statSize":8566,"groups":[{"label":"fetchProductDetails","path":"./src/index.ts + 31 modules (concatenated)/src/services/fetchProductDetails","statSize":2858,"groups":[{"id":null,"label":"fetchProductDetails.service.tsx","path":"./src/index.ts + 31 modules (concatenated)/src/services/fetchProductDetails/fetchProductDetails.service.tsx","statSize":2858,"parsedSize":1102,"gzipSize":242,"inaccurateSizes":true}],"parsedSize":1102,"gzipSize":242,"inaccurateSizes":true},{"label":"fetchProducts","path":"./src/index.ts + 31 modules (concatenated)/src/services/fetchProducts","statSize":2852,"groups":[{"id":null,"label":"fetchProducts.service.tsx","path":"./src/index.ts + 31 modules (concatenated)/src/services/fetchProducts/fetchProducts.service.tsx","statSize":2852,"parsedSize":1100,"gzipSize":242,"inaccurateSizes":true}],"parsedSize":1100,"gzipSize":242,"inaccurateSizes":true},{"label":"fetchStoreDetails","path":"./src/index.ts + 31 modules (concatenated)/src/services/fetchStoreDetails","statSize":2856,"groups":[{"id":null,"label":"fetchStoreDetails.service.tsx","path":"./src/index.ts + 31 modules (concatenated)/src/services/fetchStoreDetails/fetchStoreDetails.service.tsx","statSize":2856,"parsedSize":1102,"gzipSize":242,"inaccurateSizes":true}],"parsedSize":1102,"gzipSize":242,"inaccurateSizes":true}],"parsedSize":3305,"gzipSize":727,"inaccurateSizes":true},{"label":"errors","path":"./src/index.ts + 31 modules (concatenated)/src/errors","statSize":2427,"groups":[{"id":null,"label":"api.errors.ts","path":"./src/index.ts + 31 modules (concatenated)/src/errors/api.errors.ts","statSize":2427,"parsedSize":936,"gzipSize":206,"inaccurateSizes":true}],"parsedSize":936,"gzipSize":206,"inaccurateSizes":true}],"parsedSize":39035,"gzipSize":8595,"inaccurateSizes":true}]}],"parsedSize":39045,"gzipSize":8598}]},{"label":"vendors.bundle.js","isAsset":true,"statSize":19,"parsedSize":1175,"gzipSize":528,"groups":[{"label":"src","path":"./src","statSize":19,"groups":[{"id":26,"label":"vendors.ts","path":"./src/vendors.ts","statSize":19,"parsedSize":15,"gzipSize":35}],"parsedSize":15,"gzipSize":35}]}]
1
+ [{"label":"main.bundle.js","isAsset":true,"statSize":202053,"parsedSize":101489,"gzipSize":23363,"groups":[{"label":"state/build","path":"./state/build","statSize":1640,"groups":[{"id":0,"label":"main.bundle.js","path":"./state/build/main.bundle.js","statSize":1640,"parsedSize":1440,"gzipSize":624}],"parsedSize":1440,"gzipSize":624},{"label":"cache/build","path":"./cache/build","statSize":30890,"groups":[{"id":1,"label":"main.bundle.js","path":"./cache/build/main.bundle.js","statSize":30890,"parsedSize":30606,"gzipSize":9562}],"parsedSize":30606,"gzipSize":9562},{"label":"types/build","path":"./types/build","statSize":6292,"groups":[{"id":2,"label":"index.js","path":"./types/build/index.js","statSize":1646,"parsedSize":579,"gzipSize":300},{"label":"types","path":"./types/build/types","statSize":4646,"groups":[{"id":6,"label":"app.types.js","path":"./types/build/types/app.types.js","statSize":114,"parsedSize":78,"gzipSize":97},{"id":7,"label":"account.types.js","path":"./types/build/types/account.types.js","statSize":150,"parsedSize":78,"gzipSize":97},{"id":8,"label":"artisanDB.types.js","path":"./types/build/types/artisanDB.types.js","statSize":120,"parsedSize":78,"gzipSize":97},{"id":9,"label":"category.types.js","path":"./types/build/types/category.types.js","statSize":119,"parsedSize":78,"gzipSize":97},{"id":10,"label":"channel.types.js","path":"./types/build/types/channel.types.js","statSize":150,"parsedSize":78,"gzipSize":97},{"id":11,"label":"common.types.js","path":"./types/build/types/common.types.js","statSize":162,"parsedSize":78,"gzipSize":97},{"id":12,"label":"coupons.types.js","path":"./types/build/types/coupons.types.js","statSize":118,"parsedSize":78,"gzipSize":97},{"id":13,"label":"image.types.js","path":"./types/build/types/image.types.js","statSize":146,"parsedSize":78,"gzipSize":97},{"id":14,"label":"product.types.js","path":"./types/build/types/product.types.js","statSize":1180,"parsedSize":577,"gzipSize":301},{"id":15,"label":"shippingCost.types.js","path":"./types/build/types/shippingCost.types.js","statSize":160,"parsedSize":78,"gzipSize":97},{"id":16,"label":"shoppingCart.types.js","path":"./types/build/types/shoppingCart.types.js","statSize":123,"parsedSize":78,"gzipSize":97},{"id":17,"label":"store.types.js","path":"./types/build/types/store.types.js","statSize":913,"parsedSize":485,"gzipSize":270},{"id":18,"label":"vendor.types.js","path":"./types/build/types/vendor.types.js","statSize":117,"parsedSize":78,"gzipSize":97},{"id":19,"label":"http.types.js","path":"./types/build/types/http.types.js","statSize":143,"parsedSize":78,"gzipSize":97},{"id":20,"label":"user.types.js","path":"./types/build/types/user.types.js","statSize":561,"parsedSize":292,"gzipSize":200},{"id":21,"label":"billingData.types.js","path":"./types/build/types/billingData.types.js","statSize":122,"parsedSize":78,"gzipSize":97},{"id":22,"label":"livingPlace.types.js","path":"./types/build/types/livingPlace.types.js","statSize":122,"parsedSize":78,"gzipSize":97},{"id":23,"label":"shippingAddress.types.js","path":"./types/build/types/shippingAddress.types.js","statSize":126,"parsedSize":78,"gzipSize":97}],"parsedSize":2524,"gzipSize":475}],"parsedSize":3103,"gzipSize":688},{"label":"home/circleci/repo/node_modules","path":"./home/circleci/repo/node_modules","statSize":60750,"groups":[{"label":"charenc","path":"./home/circleci/repo/node_modules/charenc","statSize":850,"groups":[{"id":3,"label":"charenc.js","path":"./home/circleci/repo/node_modules/charenc/charenc.js","statSize":850,"parsedSize":426,"gzipSize":231}],"parsedSize":426,"gzipSize":231},{"label":"sha1","path":"./home/circleci/repo/node_modules/sha1","statSize":2124,"groups":[{"id":4,"label":"sha1.js","path":"./home/circleci/repo/node_modules/sha1/sha1.js","statSize":2124,"parsedSize":947,"gzipSize":625}],"parsedSize":947,"gzipSize":625},{"label":"node-libs-browser/node_modules/buffer","path":"./home/circleci/repo/node_modules/node-libs-browser/node_modules/buffer","statSize":48590,"groups":[{"id":24,"label":"index.js","path":"./home/circleci/repo/node_modules/node-libs-browser/node_modules/buffer/index.js","statSize":48590,"parsedSize":19827,"gzipSize":5837}],"parsedSize":19827,"gzipSize":5837},{"label":"base64-js","path":"./home/circleci/repo/node_modules/base64-js","statSize":3932,"groups":[{"id":26,"label":"index.js","path":"./home/circleci/repo/node_modules/base64-js/index.js","statSize":3932,"parsedSize":1406,"gzipSize":744}],"parsedSize":1406,"gzipSize":744},{"label":"ieee754","path":"./home/circleci/repo/node_modules/ieee754","statSize":2154,"groups":[{"id":27,"label":"index.js","path":"./home/circleci/repo/node_modules/ieee754/index.js","statSize":2154,"parsedSize":972,"gzipSize":573}],"parsedSize":972,"gzipSize":573},{"label":"isarray","path":"./home/circleci/repo/node_modules/isarray","statSize":132,"groups":[{"id":28,"label":"index.js","path":"./home/circleci/repo/node_modules/isarray/index.js","statSize":132,"parsedSize":104,"gzipSize":109}],"parsedSize":104,"gzipSize":109},{"label":"crypt","path":"./home/circleci/repo/node_modules/crypt","statSize":2968,"groups":[{"id":29,"label":"crypt.js","path":"./home/circleci/repo/node_modules/crypt/crypt.js","statSize":2968,"parsedSize":1273,"gzipSize":646}],"parsedSize":1273,"gzipSize":646}],"parsedSize":24955,"gzipSize":7901},{"label":"auth/build","path":"./auth/build","statSize":1417,"groups":[{"id":5,"label":"main.bundle.js","path":"./auth/build/main.bundle.js","statSize":1417,"parsedSize":1220,"gzipSize":542}],"parsedSize":1220,"gzipSize":542},{"label":"buildin","path":"./buildin","statSize":472,"groups":[{"id":25,"label":"global.js","path":"./buildin/global.js","statSize":472,"parsedSize":144,"gzipSize":129}],"parsedSize":144,"gzipSize":129},{"label":"src","path":"./src","statSize":100592,"groups":[{"id":31,"label":"index.ts + 31 modules (concatenated)","path":"./src/index.ts + 31 modules (concatenated)","statSize":100592,"parsedSize":38833,"gzipSize":8456,"concatenated":true,"groups":[{"label":"src","path":"./src/index.ts + 31 modules (concatenated)/src","statSize":100567,"groups":[{"id":null,"label":"index.ts","path":"./src/index.ts + 31 modules (concatenated)/src/index.ts","statSize":1141,"parsedSize":440,"gzipSize":95,"inaccurateSizes":true},{"label":"utils","path":"./src/index.ts + 31 modules (concatenated)/src/utils","statSize":65158,"groups":[{"label":"assertions","path":"./src/index.ts + 31 modules (concatenated)/src/utils/assertions","statSize":2984,"groups":[{"id":null,"label":"assertions.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/assertions/assertions.utils.ts","statSize":2984,"parsedSize":1151,"gzipSize":250,"inaccurateSizes":true}],"parsedSize":1151,"gzipSize":250,"inaccurateSizes":true},{"label":"questionsAndAnswers","path":"./src/index.ts + 31 modules (concatenated)/src/utils/questionsAndAnswers","statSize":1822,"groups":[{"id":null,"label":"questionsAndAnswers.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/questionsAndAnswers/questionsAndAnswers.utils.ts","statSize":1822,"parsedSize":703,"gzipSize":153,"inaccurateSizes":true}],"parsedSize":703,"gzipSize":153,"inaccurateSizes":true},{"label":"transformers","path":"./src/index.ts + 31 modules (concatenated)/src/utils/transformers","statSize":7566,"groups":[{"id":null,"label":"transformers.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/transformers/transformers.utils.ts","statSize":6615,"parsedSize":2553,"gzipSize":556,"inaccurateSizes":true},{"id":null,"label":"api.transformer.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/transformers/api.transformer.ts","statSize":951,"parsedSize":367,"gzipSize":79,"inaccurateSizes":true}],"parsedSize":2920,"gzipSize":636,"inaccurateSizes":true},{"label":"state","path":"./src/index.ts + 31 modules (concatenated)/src/utils/state","statSize":430,"groups":[{"id":null,"label":"state.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/state/state.utils.ts","statSize":430,"parsedSize":165,"gzipSize":36,"inaccurateSizes":true}],"parsedSize":165,"gzipSize":36,"inaccurateSizes":true},{"label":"caculations","path":"./src/index.ts + 31 modules (concatenated)/src/utils/caculations","statSize":4523,"groups":[{"id":null,"label":"calculations.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/caculations/calculations.utils.ts","statSize":4523,"parsedSize":1746,"gzipSize":380,"inaccurateSizes":true}],"parsedSize":1746,"gzipSize":380,"inaccurateSizes":true},{"id":null,"label":"common.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/common.utils.ts","statSize":383,"parsedSize":147,"gzipSize":32,"inaccurateSizes":true},{"label":"modifiers","path":"./src/index.ts + 31 modules (concatenated)/src/utils/modifiers","statSize":26001,"groups":[{"id":null,"label":"common.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/modifiers/common.utils.ts","statSize":7654,"parsedSize":2954,"gzipSize":643,"inaccurateSizes":true},{"id":null,"label":"updateRenderer.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/modifiers/updateRenderer.utils.ts","statSize":5588,"parsedSize":2157,"gzipSize":469,"inaccurateSizes":true},{"id":null,"label":"form.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/modifiers/form.utils.ts","statSize":2534,"parsedSize":978,"gzipSize":213,"inaccurateSizes":true},{"id":null,"label":"rendererTraversal.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/modifiers/rendererTraversal.utils.ts","statSize":3092,"parsedSize":1193,"gzipSize":259,"inaccurateSizes":true},{"id":null,"label":"renderer.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/modifiers/renderer.utils.ts","statSize":5227,"parsedSize":2017,"gzipSize":439,"inaccurateSizes":true},{"id":null,"label":"handleChange.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/modifiers/handleChange.utils.ts","statSize":1906,"parsedSize":735,"gzipSize":160,"inaccurateSizes":true}],"parsedSize":10037,"gzipSize":2185,"inaccurateSizes":true},{"label":"http","path":"./src/index.ts + 31 modules (concatenated)/src/utils/http","statSize":15385,"groups":[{"id":null,"label":"http.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/http/http.utils.ts","statSize":4637,"parsedSize":1790,"gzipSize":389,"inaccurateSizes":true},{"id":null,"label":"purge.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/http/purge.utils.ts","statSize":5967,"parsedSize":2303,"gzipSize":501,"inaccurateSizes":true},{"id":null,"label":"request.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/http/request.utils.ts","statSize":4781,"parsedSize":1845,"gzipSize":401,"inaccurateSizes":true}],"parsedSize":5939,"gzipSize":1293,"inaccurateSizes":true},{"id":null,"label":"services.utils.ts","path":"./src/index.ts + 31 modules (concatenated)/src/utils/services.utils.ts","statSize":6064,"parsedSize":2340,"gzipSize":509,"inaccurateSizes":true}],"parsedSize":25153,"gzipSize":5477,"inaccurateSizes":true},{"label":"lib","path":"./src/index.ts + 31 modules (concatenated)/src/lib","statSize":22345,"groups":[{"label":"getCategories","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getCategories","statSize":109,"groups":[{"id":null,"label":"getCategories.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getCategories/getCategories.ts","statSize":109,"parsedSize":42,"gzipSize":9,"inaccurateSizes":true}],"parsedSize":42,"gzipSize":9,"inaccurateSizes":true},{"label":"getProductDetails","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getProductDetails","statSize":4989,"groups":[{"id":null,"label":"getProductDetails.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getProductDetails/getProductDetails.ts","statSize":4989,"parsedSize":1925,"gzipSize":419,"inaccurateSizes":true}],"parsedSize":1925,"gzipSize":419,"inaccurateSizes":true},{"label":"getProducts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getProducts","statSize":4084,"groups":[{"id":null,"label":"getProducts.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getProducts/getProducts.ts","statSize":4084,"parsedSize":1576,"gzipSize":343,"inaccurateSizes":true}],"parsedSize":1576,"gzipSize":343,"inaccurateSizes":true},{"label":"getRecommendedProducts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getRecommendedProducts","statSize":129,"groups":[{"id":null,"label":"getRecommendedProducts.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getRecommendedProducts/getRecommendedProducts.ts","statSize":129,"parsedSize":49,"gzipSize":10,"inaccurateSizes":true}],"parsedSize":49,"gzipSize":10,"inaccurateSizes":true},{"label":"getRelatedProducts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getRelatedProducts","statSize":121,"groups":[{"id":null,"label":"getRelatedProducts.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getRelatedProducts/getRelatedProducts.ts","statSize":121,"parsedSize":46,"gzipSize":10,"inaccurateSizes":true}],"parsedSize":46,"gzipSize":10,"inaccurateSizes":true},{"label":"getStoreDetails","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getStoreDetails","statSize":4245,"groups":[{"id":null,"label":"getStoreDetails.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/getStoreDetails/getStoreDetails.ts","statSize":4245,"parsedSize":1638,"gzipSize":356,"inaccurateSizes":true}],"parsedSize":1638,"gzipSize":356,"inaccurateSizes":true},{"label":"registerModifiersForm","path":"./src/index.ts + 31 modules (concatenated)/src/lib/registerModifiersForm","statSize":2993,"groups":[{"id":null,"label":"registerModifiersForm.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/registerModifiersForm/registerModifiersForm.ts","statSize":2993,"parsedSize":1155,"gzipSize":251,"inaccurateSizes":true}],"parsedSize":1155,"gzipSize":251,"inaccurateSizes":true},{"label":"validateProduct","path":"./src/index.ts + 31 modules (concatenated)/src/lib/validateProduct","statSize":4177,"groups":[{"id":null,"label":"validateProduct.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/validateProduct/validateProduct.ts","statSize":4177,"parsedSize":1612,"gzipSize":351,"inaccurateSizes":true}],"parsedSize":1612,"gzipSize":351,"inaccurateSizes":true},{"label":"initProducts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/initProducts","statSize":1498,"groups":[{"id":null,"label":"initProducts.ts","path":"./src/index.ts + 31 modules (concatenated)/src/lib/initProducts/initProducts.ts","statSize":1498,"parsedSize":578,"gzipSize":125,"inaccurateSizes":true}],"parsedSize":578,"gzipSize":125,"inaccurateSizes":true}],"parsedSize":8626,"gzipSize":1878,"inaccurateSizes":true},{"label":"config","path":"./src/index.ts + 31 modules (concatenated)/src/config","statSize":930,"groups":[{"id":null,"label":"constants.ts","path":"./src/index.ts + 31 modules (concatenated)/src/config/constants.ts","statSize":930,"parsedSize":359,"gzipSize":78,"inaccurateSizes":true}],"parsedSize":359,"gzipSize":78,"inaccurateSizes":true},{"label":"services","path":"./src/index.ts + 31 modules (concatenated)/src/services","statSize":8566,"groups":[{"label":"fetchProductDetails","path":"./src/index.ts + 31 modules (concatenated)/src/services/fetchProductDetails","statSize":2858,"groups":[{"id":null,"label":"fetchProductDetails.service.tsx","path":"./src/index.ts + 31 modules (concatenated)/src/services/fetchProductDetails/fetchProductDetails.service.tsx","statSize":2858,"parsedSize":1103,"gzipSize":240,"inaccurateSizes":true}],"parsedSize":1103,"gzipSize":240,"inaccurateSizes":true},{"label":"fetchProducts","path":"./src/index.ts + 31 modules (concatenated)/src/services/fetchProducts","statSize":2852,"groups":[{"id":null,"label":"fetchProducts.service.tsx","path":"./src/index.ts + 31 modules (concatenated)/src/services/fetchProducts/fetchProducts.service.tsx","statSize":2852,"parsedSize":1100,"gzipSize":239,"inaccurateSizes":true}],"parsedSize":1100,"gzipSize":239,"inaccurateSizes":true},{"label":"fetchStoreDetails","path":"./src/index.ts + 31 modules (concatenated)/src/services/fetchStoreDetails","statSize":2856,"groups":[{"id":null,"label":"fetchStoreDetails.service.tsx","path":"./src/index.ts + 31 modules (concatenated)/src/services/fetchStoreDetails/fetchStoreDetails.service.tsx","statSize":2856,"parsedSize":1102,"gzipSize":240,"inaccurateSizes":true}],"parsedSize":1102,"gzipSize":240,"inaccurateSizes":true}],"parsedSize":3306,"gzipSize":720,"inaccurateSizes":true},{"label":"errors","path":"./src/index.ts + 31 modules (concatenated)/src/errors","statSize":2427,"groups":[{"id":null,"label":"api.errors.ts","path":"./src/index.ts + 31 modules (concatenated)/src/errors/api.errors.ts","statSize":2427,"parsedSize":936,"gzipSize":204,"inaccurateSizes":true}],"parsedSize":936,"gzipSize":204,"inaccurateSizes":true}],"parsedSize":38823,"gzipSize":8453,"inaccurateSizes":true}]}],"parsedSize":38833,"gzipSize":8456}]},{"label":"vendors.bundle.js","isAsset":true,"statSize":19,"parsedSize":1175,"gzipSize":528,"groups":[{"label":"src","path":"./src","statSize":19,"groups":[{"id":30,"label":"vendors.ts","path":"./src/vendors.ts","statSize":19,"parsedSize":15,"gzipSize":35}],"parsedSize":15,"gzipSize":35}]}]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("products",[],t):"object"==typeof exports?exports.products=t():e.products=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=26)}({26:function(e,t){}})}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("products",[],t):"object"==typeof exports?exports.products=t():e.products=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=30)}({30:function(e,t){}})}));
File without changes
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@artisan-commerce/products",
3
3
  "description": "Artisan's product management library",
4
- "version": "0.8.0-canary.1",
4
+ "version": "0.8.0-canary.3",
5
5
  "main": "./build/main.bundle.js",
6
- "types": "./build/src/index.d.ts",
6
+ "types": "./build/index.d.ts",
7
7
  "files": [
8
8
  "build/",
9
9
  "LICENSE",
@@ -31,18 +31,14 @@
31
31
  "author": "Luis Eduardo Andrade",
32
32
  "license": "MIT",
33
33
  "dependencies": {
34
- "@artisan-commerce/auth": "0.8.16-canary.12",
35
- "@artisan-commerce/builders": "0.5.0-canary.1",
36
- "@artisan-commerce/cache": "0.1.2-canary.12",
37
- "@artisan-commerce/state": "0.1.1-canary.5",
38
- "@bugsnag/js": "^7.2.0",
39
- "i18next": "^19.6.2",
40
- "i18next-browser-languagedetector": "^5.0.0",
41
- "i18next-xhr-backend": "^3.2.2",
34
+ "@artisan-commerce/auth": "0.8.16-canary.13",
35
+ "@artisan-commerce/cache": "0.1.2-canary.14",
36
+ "@artisan-commerce/state": "0.2.0-canary.0",
42
37
  "sha1": "^1.1.1"
43
38
  },
44
39
  "devDependencies": {
45
- "@artisan-commerce/types": "0.11.0-canary.11",
40
+ "@artisan-commerce/builders": "0.5.0-canary.2",
41
+ "@artisan-commerce/types": "0.11.0-canary.12",
46
42
  "@babel/core": "^7.10.5",
47
43
  "@babel/preset-env": "^7.10.4",
48
44
  "@babel/preset-react": "^7.10.4",
@@ -89,5 +85,5 @@
89
85
  "webpack-dev-server": "^3.11.0",
90
86
  "webpack-merge": "^5.0.9"
91
87
  },
92
- "gitHead": "6f125d3a56a71e65c9f37ebbf78792e11d0fc8b4"
88
+ "gitHead": "dea37257836c242e44ce73f76b0520aaa193ed1f"
93
89
  }
@@ -1,2 +0,0 @@
1
- declare let bugsnagClient: any;
2
- export default bugsnagClient;