@one-commerce/sdk-core 2.3.1 → 2.3.2
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.
- package/lib/bundles/bundle.esm.js +60 -17
- package/lib/bundles/bundle.esm.js.map +1 -1
- package/lib/bundles/bundle.esm.min.js +1 -1
- package/lib/bundles/bundle.esm.min.js.map +1 -1
- package/lib/bundles/bundle.umd.js +60 -16
- package/lib/bundles/bundle.umd.js.map +1 -1
- package/lib/bundles/bundle.umd.min.js +1 -1
- package/lib/bundles/bundle.umd.min.js.map +1 -1
- package/lib/cjs/backoffice/context.js +63 -17
- package/lib/cjs/backoffice/context.js.map +1 -1
- package/lib/cjs/index.js +6 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/backoffice/context.js +24 -0
- package/lib/esm/backoffice/context.js.map +1 -1
- package/lib/esm/index.js +2 -2
- package/lib/esm/index.js.map +1 -1
- package/lib/types/backoffice/context.d.ts +33 -0
- package/lib/types/backoffice/context.d.ts.map +1 -1
- package/lib/types/index.d.ts +2 -2
- package/lib/types/index.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=i(t);if(e){var o=i(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var p,d,y,g={},b={};p=b,Object.defineProperty(p,"__esModule",{value:!0}),p.Errors=p.Message=void 0,(d=p.Message||(p.Message={})).INIT="one:init",d.UPDATE="one:update",d.METHOD_CALL="one:method:call",d.METHOD_CALL_ERROR="one:method:error",d.METHOD_RESULT="one:method:result",d.NAVIGATION_PUSH="one:navigation:push",d.FRAME_HEIGHT_REQUEST="one:frameheight:request",d.FRAME_HEIGHT_CHANGE="one:frameheight:change",(y=p.Errors||(p.Errors={})).METHOD_DOES_NOT_EXISTS="Method does not exists",y.SERVICE_DOES_NOT_EXISTS="Service does not exists";var _={};Object.defineProperty(_,"__esModule",{value:!0}),function(t){var e=v&&v.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=v&&v.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(b,t),n(_,t)}(g);var w={exports:{}};window;var x=h(w.exports=function(){return n={},t.m=e=[function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(26),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){var r=n(74),o=n(77);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(7),o=n(51),i=n(52),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(23);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,n){var r=n(1).Symbol;t.exports=r},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&-1<t&&t%1==0&&t<e}},function(t,e,n){var r=n(64),o=n(65),i=n(66),a=n(67),c=n(68);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=c,t.exports=u},function(t,e,n){var r=n(11);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(2)(Object,"create");t.exports=r},function(t,e,n){var r=n(86);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(38);t.exports=function(t,e,n){var o=null==t?void 0:r(t,e);return void 0===o?n:o}},function(t,e,n){var r=n(3),o=n(128),i=n(4),a=Function.prototype,c=Object.prototype,u=a.toString,s=c.hasOwnProperty,l=u.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=r(t))return!1;var e=o(t);if(null===e)return!0;var n=s.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}},function(t,e,n){var r=n(47),o=n(57),i=n(18);t.exports=function(t){return i(t)?r(t):o(t)}},function(t,e){t.exports=function(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991}},function(t,e,n){var r=n(31),o=n(17);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,e,n){var r=n(2)(n(1),"Map");t.exports=r},function(t,e,n){var r=n(78),o=n(85),i=n(87),a=n(88),c=n(89);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=c,t.exports=u},function(t,e,n){var r=n(0),o=n(22),i=n(114),a=n(117);t.exports=function(t,e){return r(t)?t:o(t,e)?[t]:i(a(t))}},function(t,e,n){var r=n(0),o=n(23),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||a.test(t)||!i.test(t)||null!=e&&t in Object(e)}},function(t,e,n){var r=n(3),o=n(4);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r=n(129);t.exports=function(t,e,n){return null==t?t:r(t,e,n)}},function(t,e,n){var r=n(49),o=n(4),i=Object.prototype,a=i.hasOwnProperty,c=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!c.call(t,"callee")};t.exports=u},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(50))},function(t,e,n){(function(t){var r=n(1),o=n(53),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,c=a&&a.exports===i?r.Buffer:void 0,u=(c?c.isBuffer:void 0)||o;t.exports=u}).call(this,n(28)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r=n(54),o=n(55),i=n(56),a=i&&i.isTypedArray,c=a?o(a):r;t.exports=c},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(3),o=n(5);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(9),o=n(69),i=n(70),a=n(71),c=n(72),u=n(73);function s(t){var e=this.__data__=new r(t);this.size=e.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=c,s.prototype.set=u,t.exports=s},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(90),o=n(4);t.exports=function t(e,n,i,a,c){return e===n||(null==e||null==n||!o(e)&&!o(n)?e!=e&&n!=n:r(e,n,i,a,t,c))}},function(t,e,n){var r=n(91),o=n(94),i=n(95);t.exports=function(t,e,n,a,c,u){var s=1&n,l=t.length,f=e.length;if(l!=f&&!(s&&l<f))return!1;var v=u.get(t);if(v&&u.get(e))return v==e;var h=-1,p=!0,d=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++h<l;){var y=t[h],g=e[h];if(a)var b=s?a(g,y,h,e,t,u):a(y,g,h,t,e,u);if(void 0!==b){if(b)continue;p=!1;break}if(d){if(!o(e,(function(t,e){if(!i(d,e)&&(y===t||c(y,t,n,a,u)))return d.push(e)}))){p=!1;break}}else if(y!==g&&!c(y,g,n,a,u)){p=!1;break}}return u.delete(t),u.delete(e),p}},function(t,e,n){var r=n(5);t.exports=function(t){return t==t&&!r(t)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},function(t,e,n){var r=n(21),o=n(6);t.exports=function(t,e){for(var n=0,i=(e=r(e,t)).length;null!=t&&n<i;)t=t[o(e[n++])];return n&&n==i?t:void 0}},function(t,e,n){var r=n(41),o=n(42),i=n(61),a=n(0),c=n(127);t.exports=function(t,e,n){var u=a(t)?r:o;return n&&c(t,e,n)&&(e=void 0),u(t,i(e,3))}},function(t,e,n){var r,o,i=n(133),a=n(134),c=0,u=0;t.exports=function(t,e,n){var s=e&&n||0,l=e||[],f=(t=t||{}).node||r,v=void 0!==t.clockseq?t.clockseq:o;if(null==f||null==v){var h=i();null==f&&(f=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==v&&(v=o=16383&(h[6]<<8|h[7]))}var p=void 0!==t.msecs?t.msecs:(new Date).getTime(),d=void 0!==t.nsecs?t.nsecs:u+1,y=p-c+(d-u)/1e4;if(y<0&&void 0===t.clockseq&&(v=v+1&16383),(y<0||c<p)&&void 0===t.nsecs&&(d=0),1e4<=d)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=p,o=v;var g=(1e4*(268435455&(p+=122192928e5))+(u=d))%4294967296;l[s++]=g>>>24&255,l[s++]=g>>>16&255,l[s++]=g>>>8&255,l[s++]=255&g;var b=p/4294967296*1e4&268435455;l[s++]=b>>>8&255,l[s++]=255&b,l[s++]=b>>>24&15|16,l[s++]=b>>>16&255,l[s++]=v>>>8|128,l[s++]=255&v;for(var _=0;_<6;++_)l[s+_]=f[_];return e||a(l)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}},function(t,e,n){var r=n(43);t.exports=function(t,e){var n=!0;return r(t,(function(t,r,o){return n=!!e(t,r,o)})),n}},function(t,e,n){var r=n(44),o=n(60)(r);t.exports=o},function(t,e,n){var r=n(45),o=n(16);t.exports=function(t,e){return t&&r(t,e,o)}},function(t,e,n){var r=n(46)();t.exports=r},function(t,e){t.exports=function(t){return function(e,n,r){for(var o=-1,i=Object(e),a=r(e),c=a.length;c--;){var u=a[t?c:++o];if(!1===n(i[u],u,i))break}return e}}},function(t,e,n){var r=n(48),o=n(25),i=n(0),a=n(27),c=n(8),u=n(29),s=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),l=!n&&o(t),f=!n&&!l&&a(t),v=!n&&!l&&!f&&u(t),h=n||l||f||v,p=h?r(t.length,String):[],d=p.length;for(var y in t)!e&&!s.call(t,y)||h&&("length"==y||f&&("offset"==y||"parent"==y)||v&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||c(y,d))||p.push(y);return p}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(3),o=n(4);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(7),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,c=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,c),n=t[c];try{var r=!(t[c]=void 0)}catch(t){}var o=a.call(t);return r&&(e?t[c]=n:delete t[c]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(3),o=n(17),i=n(4),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[r(t)]}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){var r=n(26),o=e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.process,c=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=c}).call(this,n(28)(t))},function(t,e,n){var r=n(58),o=n(59),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(30)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(18);t.exports=function(t,e){return function(n,o){if(null==n)return n;if(!r(n))return t(n,o);for(var i=n.length,a=e?i:-1,c=Object(n);(e?a--:++a<i)&&!1!==o(c[a],a,c););return n}}},function(t,e,n){var r=n(62),o=n(113),i=n(123),a=n(0),c=n(124);t.exports=function(t){return"function"==typeof t?t:null==t?i:"object"==typeof t?a(t)?o(t[0],t[1]):r(t):c(t)}},function(t,e,n){var r=n(63),o=n(112),i=n(37);t.exports=function(t){var e=o(t);return 1==e.length&&e[0][2]?i(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(32),o=n(34);t.exports=function(t,e,n,i){var a=n.length,c=a,u=!i;if(null==t)return!c;for(t=Object(t);a--;){var s=n[a];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++a<c;){var l=(s=n[a])[0],f=t[l],v=s[1];if(u&&s[2]){if(void 0===f&&!(l in t))return!1}else{var h=new r;if(i)var p=i(f,v,l,t,e,h);if(!(void 0===p?o(v,f,3,i,h):p))return!1}}return!0}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(10),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():o.call(e,n,1),--this.size,0))}},function(t,e,n){var r=n(10);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(10);t.exports=function(t){return-1<r(this.__data__,t)}},function(t,e,n){var r=n(10);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(9);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(9),o=n(19),i=n(20);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(31),o=n(75),i=n(5),a=n(33),c=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,l=u.toString,f=s.hasOwnProperty,v=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?v:c).test(a(t))}},function(t,e,n){var r,o=n(76),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(1)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(79),o=n(9),i=n(19);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(t,e,n){var r=n(80),o=n(81),i=n(82),a=n(83),c=n(84);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=c,t.exports=u},function(t,e,n){var r=n(12);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(12),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(12),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},function(t,e,n){var r=n(12);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(13);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(13);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(13);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(13);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},function(t,e,n){var r=n(32),o=n(35),i=n(96),a=n(100),c=n(107),u=n(0),s=n(27),l=n(29),f="[object Arguments]",v="[object Array]",h="[object Object]",p=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,d,y,g){var b=u(t),_=u(e),w=b?v:c(t),x=_?v:c(e),m=(w=w==f?h:w)==h,O=(x=x==f?h:x)==h,j=w==x;if(j&&s(t)){if(!s(e))return!1;m=!(b=!0)}if(j&&!m)return g=g||new r,b||l(t)?o(t,e,n,d,y,g):i(t,e,w,n,d,y,g);if(!(1&n)){var A=m&&p.call(t,"__wrapped__"),P=O&&p.call(e,"__wrapped__");if(A||P)return y(A?t.value():t,P?e.value():e,n,d,g=g||new r)}return j&&(g=g||new r,a(t,e,n,d,y,g))}},function(t,e,n){var r=n(20),o=n(92),i=n(93);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,t.exports=a},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(7),o=n(97),i=n(11),a=n(35),c=n(98),u=n(99),s=r?r.prototype:void 0,l=s?s.valueOf:void 0;t.exports=function(t,e,n,r,s,f,v){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!f(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var h=c;case"[object Set]":var p=1&r;if(h=h||u,t.size!=e.size&&!p)return!1;var d=v.get(t);if(d)return d==e;r|=2,v.set(t,e);var y=a(h(t),h(e),r,s,f,v);return v.delete(t),y;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},function(t,e,n){var r=n(1).Uint8Array;t.exports=r},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e,n){var r=n(101),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,i,a,c){var u=1&n,s=r(t),l=s.length;if(l!=r(e).length&&!u)return!1;for(var f=l;f--;){var v=s[f];if(!(u?v in e:o.call(e,v)))return!1}var h=c.get(t);if(h&&c.get(e))return h==e;var p=!0;c.set(t,e),c.set(e,t);for(var d=u;++f<l;){var y=t[v=s[f]],g=e[v];if(i)var b=u?i(g,y,v,e,t,c):i(y,g,v,t,e,c);if(!(void 0===b?y===g||a(y,g,n,i,c):b)){p=!1;break}d=d||"constructor"==v}if(p&&!d){var _=t.constructor,w=e.constructor;_!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w)&&(p=!1)}return c.delete(t),c.delete(e),p}},function(t,e,n){var r=n(102),o=n(104),i=n(16);t.exports=function(t){return r(t,i,o)}},function(t,e,n){var r=n(103),o=n(0);t.exports=function(t,e,n){var i=e(t);return o(t)?i:r(i,n(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},function(t,e,n){var r=n(105),o=n(106),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,c=a?function(t){return null==t?[]:(t=Object(t),r(a(t),(function(e){return i.call(t,e)})))}:o;t.exports=c},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(108),o=n(19),i=n(109),a=n(110),c=n(111),u=n(3),s=n(33),l="[object Map]",f="[object Promise]",v="[object Set]",h="[object WeakMap]",p="[object DataView]",d=s(r),y=s(o),g=s(i),b=s(a),_=s(c),w=u;(r&&w(new r(new ArrayBuffer(1)))!=p||o&&w(new o)!=l||i&&w(i.resolve())!=f||a&&w(new a)!=v||c&&w(new c)!=h)&&(w=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?s(n):"";if(r)switch(r){case d:return p;case y:return l;case g:return f;case b:return v;case _:return h}return e}),t.exports=w},function(t,e,n){var r=n(2)(n(1),"DataView");t.exports=r},function(t,e,n){var r=n(2)(n(1),"Promise");t.exports=r},function(t,e,n){var r=n(2)(n(1),"Set");t.exports=r},function(t,e,n){var r=n(2)(n(1),"WeakMap");t.exports=r},function(t,e,n){var r=n(36),o=n(16);t.exports=function(t){for(var e=o(t),n=e.length;n--;){var i=e[n],a=t[i];e[n]=[i,a,r(a)]}return e}},function(t,e,n){var r=n(34),o=n(14),i=n(120),a=n(22),c=n(36),u=n(37),s=n(6);t.exports=function(t,e){return a(t)&&c(e)?u(s(t),e):function(n){var a=o(n,t);return void 0===a&&a===e?i(n,t):r(e,a,3)}}},function(t,e,n){var r=n(115),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,(function(t,n,r,o){e.push(r?o.replace(i,"$1"):n||t)})),e}));t.exports=a},function(t,e,n){var r=n(116);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(20),o="Expected a function";function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(o);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(118);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(7),o=n(119),i=n(0),a=n(23),c=1/0,u=r?r.prototype:void 0,s=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(a(e))return s?s.call(e):"";var n=e+"";return"0"==n&&1/e==-c?"-0":n}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},function(t,e,n){var r=n(121),o=n(122);t.exports=function(t,e){return null!=t&&o(t,e,r)}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(21),o=n(25),i=n(0),a=n(8),c=n(17),u=n(6);t.exports=function(t,e,n){for(var s=-1,l=(e=r(e,t)).length,f=!1;++s<l;){var v=u(e[s]);if(!(f=null!=t&&n(t,v)))break;t=t[v]}return f||++s!=l?f:!!(l=null==t?0:t.length)&&c(l)&&a(v,l)&&(i(t)||o(t))}},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r=n(125),o=n(126),i=n(22),a=n(6);t.exports=function(t){return i(t)?r(a(t)):o(t)}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e,n){var r=n(38);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e,n){var r=n(11),o=n(18),i=n(8),a=n(5);t.exports=function(t,e,n){if(!a(n))return!1;var c=typeof e;return!!("number"==c?o(n)&&i(e,n.length):"string"==c&&e in n)&&r(n[e],t)}},function(t,e,n){var r=n(30)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(130),o=n(21),i=n(8),a=n(5),c=n(6);t.exports=function(t,e,n,u){if(!a(t))return t;for(var s=-1,l=(e=o(e,t)).length,f=l-1,v=t;null!=v&&++s<l;){var h=c(e[s]),p=n;if(s!=f){var d=v[h];void 0===(p=u?u(d,h,v):void 0)&&(p=a(d)?d:i(e[s+1])?[]:{})}r(v,h,p),v=v[h]}return t}},function(t,e,n){var r=n(131),o=n(11),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];i.call(t,e)&&o(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(132);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(2),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);t.exports=function(){return n(r),r}}else{var o=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),o[e]=t>>>((3&e)<<3)&255;return o}}},function(t,e){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);t.exports=function(t,e){var r=e||0,o=n;return[o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]]].join("")}},function(t,e,n){n.r(e);var r=n(39),o=n.n(r),i=n(0),a=n.n(i),c=n(15),u=n.n(c),s=n(14),l=n.n(s),f=n(24),v=n.n(f),h=n(40),p=n.n(h);function d(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"default",(function(){return w}));var b,_="__FUNCTION__",w=((b=[{key:"_handleQueue",value:function(){var t=this;this._queue.forEach((function(e){var n=e.message,r=e.msgChan;t._target.postMessage(n,t._targetOrigin,[r.port2])})),this._queue=[]}},{key:"_publish",value:function(t){var e=t.data,n=e.type,r=e.data,o=e.meta,i=this._parseFunction(n,r,o.functionKeys),a=(this._subscribers[n]||[]).map((function(e){return function(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return new Promise((function(e,r){try{var o=t.apply(void 0,n);o&&o.then?o.then(e).catch(r):e(o)}catch(e){r(e)}}))}}(e)(i,t.data,t).then((function(t){if(t)return{type:n,data:t}})).catch((function(t){return{type:n,error:t.message}}))}));Promise.all(a).then((function(e){e=e.filter((function(t){return!!t}));var n={};e.forEach((function(t){Object.assign(n,t)})),t.ports[0].postMessage(n)}))}},{key:"_subscribeFunction",value:function(t,e){this.unsubscribe(t),this.subscribe(t,(function(t){return e.apply(void 0,d(t))}))}},{key:"_stringifyFunction",value:function(t,e,n){var r=this,i=2<arguments.length&&void 0!==n?n:[];if(i&&0!==i.length)return i.forEach((function(n){var o=l()(e,n),i="".concat(_).concat(t,"_").concat(n);r._subscribeFunction(i,o),v()(e,n,i)})),{data:e,keys:i};if("function"!=typeof e)return function t(e,n,r){var i=2<arguments.length&&void 0!==r?r:"";return o()(e,(function(r,o){var c="".concat(i,"[").concat(o,"]");return"number"!=typeof o&&(c=i?"".concat(i,".").concat(o):"".concat(o)),!1===n(r,o,e,c)||!u()(r)&&!a()(r)||t(r,n,c)}))}(e,(function(e,n,o,a){if("function"==typeof e){var c="".concat(_).concat(t,"_").concat(a);r._subscribeFunction(c,e),o[n]=c,i.push(a)}})),{data:e,keys:i};var c="".concat(_).concat(t);return this._subscribeFunction(c,e),{data:c,keys:[""]}}},{key:"_parseFunction",value:function(t,e,n){var r=this,o=2<arguments.length&&void 0!==n?n:[];return 0===o.length?e:1===o.length&&""===o[0]?function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return r.postMessage(e,n)}:(o.forEach((function(n){var o=n.replace("".concat(_).concat(t,"_"),""),i=l()(e,o);v()(e,o,(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return r.postMessage(i,e)}))})),e)}},{key:"_subscribe",value:function(t,e){var n=this;this._subscribers[t]||(this._subscribers[t]=[]);var r=this._subscribers[t];e.forEach((function(e){if(r.includes(e)||r.push(e),"connect"===t&&n._isTargetReady){var o={source:n._target};e(o.data,o)}}))}},{key:"subscribe",value:function(t,e){var n=this;"string"!=typeof t&&!u()(t)||"string"==typeof t&&!e||("string"==typeof t&&(t=g({},t,e)),Object.keys(t).forEach((function(e){var r=t[e];"function"==typeof r&&(r=[r]),n._subscribe(e,r)})))}},{key:"unsubscribe",value:function(t,e){if(void 0!==t){var n=this._subscribers[t]||[];if(void 0!==e){var r=n.indexOf(e);-1<r&&n.splice(r,1)}else this._subscribers[t]=[]}else this._subscribers={}}},{key:"postMessage",value:function(t,e,n){var r=this,o=2<arguments.length&&void 0!==n?n:{};return new Promise((function(n,i){var a=new MessageChannel;a.port1.onmessage=function(t){var e=t.data,r=e.data,o=e.error;o?i(new Error(o)):n(r)};var c={type:t,data:e,meta:{id:r._id}},u=o.hasFunction,s=o.functionKeys,l=void 0===s?[]:s;if(!0===u){var f=r._stringifyFunction(t,e,l);c.data=f.data,c.meta.functionKeys=f.keys}r._isTargetReady||"pre_connect"===t?r._target.postMessage(c,r._targetOrigin,[a.port2]):r._queue.push({message:c,msgChan:a})}))}},{key:"_preConnect",value:function(){function t(){o++,n.postMessage("pre_connect",n._id).then((function(t){e&&(clearTimeout(e),e=void 0),r[0]&&(r[0](t),r=[])})).catch((function(t){e&&(clearTimeout(e),e=void 0),r[1]&&(r[1](t),r=[])}))}var e,n=this,r=[],o=0,i=new Promise((function(t,e){r[0]=t,r[1]=e}));return t(),function t(i){!n._isTargetReady&&o>=n._maxAttempts?r[1]&&(r[1](new Error("Exceed the max attempts, connect failed.")),r=[]):e=setTimeout((function(){i(),t(i)}),n._attemptInterval)}(t),i}},{key:"connect",value:function(){var t=this;return this._target?this._isTargetReady?Promise.resolve("Target has already connected."):this._preConnect().then((function(e){return t._targetId=e,t._isTargetReady=!0,t._handleQueue(),t.postMessage("connect")})).catch((function(e){throw t._isTargetReady=!1,e})):Promise.reject(new Error("Target is not exist."))}},{key:"clearQueue",value:function(){this._queue=[]}},{key:"destory",value:function(){this._subscribers={},this._targetOrigin="",this._target=void 0,this._queue=[],this._isTargetReady=!1,window.removeEventListener("message",this._handleMessage)}}])&&y(x.prototype,b),x);function x(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,x),g(this,"_handleMessage",(function(e){if(e.origin===t._targetOrigin||"*"===t._targetOrigin){var n=e.data,r=n.type,o=n.meta;"pre_connect"!==r&&(void 0===o?{}:o).id!==t._targetId||t._publish(e)}})),g(this,"_handlePreConnect",(function(e,n,r){var o=r.source;if(t._target&&t._target!==o)throw new Error("Connection is rejected.");return t._target=o,t._targetId=e,t._id})),g(this,"_handleConnect",(function(e,n,r){t._isTargetReady=!0,t._handleQueue()}));var n=e.targetOrigin,r=void 0===n?"":n,o=e.subscribers,i=void 0===o?{}:o,a=e.target,c=e.attemptInterval,u=void 0===c?1e3:c,s=e.maxAttempts,l=void 0===s?10:s;if(a===window)throw new Error("The target can not be current window.");this._subscribers=i,this._targetOrigin=r,this._target=a,this._queue=[],this._isTargetReady=!1,this._id=p()(),this._targetId="",this._attemptInterval=u,this._maxAttempts=l,this.subscribe("pre_connect",this._handlePreConnect),this.subscribe("connect",this._handleConnect),window.addEventListener("message",this._handleMessage,!1),window.addEventListener("beforeunload",(function(){t.destory()}))}}],t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(t){return e[t]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=135);function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var e,n}()),m=function(t){return t.toString(16).padStart(2,"0")};function O(){var t=new Uint8Array(5);return window.crypto.getRandomValues(t),Array.from(t,m).join("")}var j,A,P=function(){function e(n){var o=this;t(this,e),r(this,"serviceName",""),r(this,"call",void 0),this.call=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return n.apply(void 0,[o.serviceName,t].concat(r))}}return n(e,[{key:"update",value:function(t){var n=t[this.serviceName];n&&e.update(this,n)}}],[{key:"update",value:function(t,e){Object.keys(e).forEach((function(n){t[n]=e[n]}))}}]),e}(),k=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","context"),e}return n(a)}(),E=function(e){o(a,k);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"productId",void 0),r(c(e),"cartId",void 0),r(c(e),"offerId",void 0),r(c(e),"warehouses",void 0),r(c(e),"warehouseId",void 0),r(c(e),"meta",void 0),r(c(e),"pluginProductLines",void 0),r(c(e),"productLines",void 0),r(c(e),"productAmount",void 0),e}return n(a,[{key:"closePlugin",value:function(){return this.call("closePlugin")}},{key:"closePluginAndAddToCart",value:function(){return this.call("closePluginAndAddToCart")}},{key:"closePluginAndRefreshCart",value:function(){return this.call("closePluginAndRefreshCart")}}]),a}(),T=function(e){o(a,k);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"productId",void 0),r(c(e),"cartId",void 0),r(c(e),"offerId",void 0),r(c(e),"warehouses",void 0),r(c(e),"warehouseId",void 0),r(c(e),"meta",void 0),r(c(e),"productLineId",void 0),r(c(e),"productLines",void 0),r(c(e),"pluginProductLines",void 0),r(c(e),"productAmount",void 0),e}return n(a,[{key:"closePlugin",value:function(){return this.call("closePlugin")}},{key:"closePluginAndRefreshCart",value:function(){return this.call("closePluginAndRefreshCart")}}]),a}(),C=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","catalog"),e}return n(a,[{key:"fetchCategories",value:function(){return this.call("fetchCategories")}},{key:"fetchProduct",value:function(t){return this.call("fetchProduct",t)}}]),a}(),I=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","user"),r(c(e),"email",void 0),r(c(e),"id",void 0),r(c(e),"name",void 0),r(c(e),"authorities",void 0),e}return n(a)}(),M=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","tenant"),r(c(e),"tenantKey",void 0),r(c(e),"language",void 0),r(c(e),"currency",void 0),e}return n(a)}(),S=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","layout"),r(c(e),"isAsideOpened",void 0),e}return n(a)}(),F=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","authorization"),e}return n(a,[{key:"getAuthToken",value:function(){return this.call("getAuthToken")}}]),a}(),R=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","customer"),r(c(e),"id",void 0),r(c(e),"name",void 0),e}return n(a)}(),N=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","plugin"),r(c(e),"id",void 0),r(c(e),"srcUrl",void 0),r(c(e),"name",void 0),e}return n(a)}(),z=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","orderpath"),e}return n(a,[{key:"fetchCart",value:function(t){return this.call("fetchCart",t)}},{key:"fetchOffer",value:function(t){return this.call("fetchOffer",t)}}]),a}(),U=function(){function e(){t(this,e),r(this,"_callbacks",void 0),this._callbacks={}}return n(e,[{key:"on",value:function(t,e){void 0===this._callbacks[t]&&(this._callbacks[t]=[]),this._callbacks[t].push(e)}},{key:"off",value:function(t,e){if(void 0!==this._callbacks[t])for(var n=0;n<this._callbacks[t].length;n++)this._callbacks[t][n]===e&&this._callbacks[t].splice(n,1)}},{key:"emit",value:function(t){if(void 0!==this._callbacks[t]){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var o=0;o<this._callbacks[t].length;o++){var i;(i=this._callbacks[t])[o].apply(i,n)}}}}]),e}(),D=function(e){o(a,k);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"productId",void 0),r(c(e),"cartId",void 0),r(c(e),"warehouses",void 0),r(c(e),"warehouseId",void 0),r(c(e),"meta",void 0),r(c(e),"pluginProductLines",void 0),r(c(e),"productLines",void 0),r(c(e),"productAmount",void 0),e}return n(a,[{key:"closePlugin",value:function(){return this.call("closePlugin")}},{key:"closePluginAndAddToCart",value:function(){return this.call("closePluginAndAddToCart")}},{key:"closePluginAndRefreshCart",value:function(){return this.call("closePluginAndRefreshCart")}}]),a}(),L=function(e){o(a,k);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"productId",void 0),r(c(e),"cartId",void 0),r(c(e),"warehouses",void 0),r(c(e),"warehouseId",void 0),r(c(e),"meta",void 0),r(c(e),"productLineId",void 0),r(c(e),"productLines",void 0),r(c(e),"pluginProductLines",void 0),r(c(e),"productAmount",void 0),e}return n(a,[{key:"closePlugin",value:function(){return this.call("closePlugin")}},{key:"closePluginAndRefreshCart",value:function(){return this.call("closePluginAndRefreshCart")}}]),a}(),H=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","catalog"),r(c(e),"categories",void 0),r(c(e),"selectedCategoryId",void 0),e}return n(a,[{key:"fetchProduct",value:function(t){return this.call("fetchProduct",t)}},{key:"fetchProducts",value:function(t){return this.call("fetchProducts",t)}},{key:"fetchStocksForProductsAndWarehouses",value:function(t,e){return this.call("fetchStocksForProductsAndWarehouses",t,e)}},{key:"getProductPrice",value:function(t,e){return this.call("getProductPrice",t,e)}},{key:"fetchPricingForProducts",value:function(t){return this.call("fetchPricingForProducts",t)}},{key:"fetchWarehouses",value:function(){return this.call("fetchWarehouses")}},{key:"getCategoryById",value:function(t){return this.call("getCategoryById",t)}}]),a}(),B=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","wishlist"),e}return n(a,[{key:"addProductsToWishlist",value:function(t,e){return this.call("addProductsToWishlist",t,e)}},{key:"getWishlists",value:function(){return this.call("getWishlists")}},{key:"createWishlist",value:function(t){return this.call("createWishlist",t)}}]),a}(),q=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","account"),r(c(e),"client",void 0),r(c(e),"isAuthenticated",void 0),r(c(e),"user",void 0),r(c(e),"manager",void 0),e}return n(a,[{key:"hasSegment",value:function(t){return this.call("hasSegment",t)}},{key:"logout",value:function(){}}]),a}(),V=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","cart"),r(c(e),"carts",void 0),r(c(e),"currentCart",void 0),r(c(e),"totalCartPrice",void 0),e}return n(a,[{key:"addToCart",value:function(t,e,n,r){return this.call("addToCart",t,e,n,r)}}]),a}(),W=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","authorization"),e}return n(a,[{key:"getAuthToken",value:function(){return this.call("getAuthToken")}}]),a}(),G=function(e){o(a,P);var i=s(a);function a(e){var n;return t(this,a),r(c(n=i.call(this,e)),"serviceName","utils"),r(c(n),"currency",void 0),r(c(n),"isAnonymousAndPurchaseDisabled",void 0),r(c(n),"isB2B",void 0),r(c(n),"isB2BAndPlatformIsNotOpened",void 0),r(c(n),"isIndexPage",void 0),r(c(n),"isPurchaseEnabledOrAuthenticated",void 0),r(c(n),"routes",void 0),n.routes={getCategoryPath:n.getCategoryPath,getManufacturerSearchUrl:n.getManufacturerSearchUrl,getProductUrl:n.getProductUrl,isExternalUrl:n.isExternalUrl},n}return n(a,[{key:"notify",value:function(t){return this.call("notify",t)}},{key:"getCategoryPath",value:function(t){return this.call("getCategoryPath",t)}},{key:"getManufacturerSearchUrl",value:function(t){return this.call("getManufacturerSearchUrl",t)}},{key:"getProductUrl",value:function(t){return this.call("getProductUrl",t)}},{key:"isExternalUrl",value:function(t){return this.call("isExternalUrl",t)}}]),a}(),$=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","config"),r(c(e),"accessMode",void 0),r(c(e),"isB2CRegistrationEnabled",void 0),r(c(e),"isCatalogOpened",void 0),r(c(e),"isGrossSelected",void 0),r(c(e),"isPlatformClosed",void 0),r(c(e),"isPlatformOpened",void 0),r(c(e),"isPurchaseEnabled",void 0),r(c(e),"isRegistrationEnabled",void 0),r(c(e),"currency",void 0),e}return n(a)}(),K=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","tenant"),r(c(e),"tenantKey",void 0),r(c(e),"language",void 0),e}return n(a)}(),Q=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","plugin"),r(c(e),"id",void 0),r(c(e),"srcUrl",void 0),r(c(e),"name",void 0),e}return n(a)}();!function(t){t.INIT="INIT",t.UPDATE="UPDATE"}(j||(j={})),function(t){t.INIT="INIT",t.UPDATE="UPDATE"}(A||(A={}));var X=function(e){o(a,U);var i=s(a);function a(e){var n;return t(this,a),r(c(n=i.call(this)),"channel",void 0),r(c(n),"autoheight",!0),r(c(n),"heightMutationObserver",null),r(c(n),"origin",void 0),r(c(n),"isInitialized",!1),r(c(n),"instances",void 0),r(c(n),"contextClass",void 0),n.initializeServiceGetters(),n.origin=e.origin,n.channel=new x({targetOrigin:n.origin,target:window.parent}),n.channel.subscribe(g.Message.INIT,(function(t){a.log("Handling INIT message"),Object.entries(n.instances).forEach((function(e){var n=l(e,2),r=n[0],o=n[1];o instanceof P?o.update(t):void 0!==t[r]?P.update(o,t[r]):a.warn("Missing attributes for ".concat(r," in "),t)})),a.log("Emitting INIT with payload ",n.instances),n.isInitialized=!0,n.emit(j.INIT,n.instances)})),n.channel.subscribe(g.Message.UPDATE,(function(t){a.log("Emitting UPDATE with payload ",t),n.emit(j.UPDATE,t)})),n.channel.subscribe(g.Message.FRAME_HEIGHT_REQUEST,(function(t){n.autoheight&&(a.log("Request for iframe height"),n.sendFrameHeight())})),n.channel.connect().then((function(){a.log("Connected with ONe SDK"),n.autoheight&&n.initializeHeightObserver()})),n.setupOptions(e),a.log("Initialized."),n}return n(a,[{key:"initializeServiceGetters",value:function(){var t=this;this.instances&&Object.keys(this.instances).forEach((function(e){Object.defineProperty(t,e,{get:function(){return t.isInitialized?t.instances[e]:null}})}))}},{key:"initializeContextClass",value:function(){return this.contextClass?new this.contextClass(this.callFunction.bind(this)):{}}},{key:"sendFrameHeight",value:function(){this.channel.postMessage(g.Message.FRAME_HEIGHT_CHANGE,document.body.scrollHeight)}},{key:"initializeHeightObserver",value:function(){var t=this;if("MutationObserver"in window){var e=document.querySelector("body");this.heightMutationObserver=new MutationObserver((function(){t.sendFrameHeight()})),a.log("Create body MutationObserver"),this.heightMutationObserver.observe(e,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0})}else a.warn("MutationObserver not available. Auto-height functionality disabled.")}},{key:"setupOptions",value:function(t){t&&(void 0!==t.debug&&(a.debug=t.debug),void 0!==t.autoheight&&(this.autoheight=t.autoheight),this.contextClass=t.context)}},{key:"callFunction",value:function(t,e){var n=this,r=O();if(this.isInitialized){for(var o=arguments.length,i=new Array(o>2?o-2:0),c=2;c<o;c++)i[c-2]=arguments[c];return a.log("Call ID ".concat(r," for ").concat(t,":").concat(e),i),this.channel.postMessage(g.Message.METHOD_CALL,{callId:r,service:t,method:e,payload:i}),new Promise((function(t,e){n.channel.subscribe(g.Message.METHOD_RESULT,(function o(i){if(i.callId===r)return n.channel.unsubscribe(g.Message.METHOD_RESULT,o),null!=i&&i.isException?e(i.result):t(i.result)}))}))}return a.log("SDK is not initialized!"),Promise.resolve(null)}},{key:"navigate",value:function(t){this.channel.postMessage(g.Message.NAVIGATION_PUSH,t)}}],[{key:"log",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];a.debug&&(t=console).log.apply(t,["[SDK Core] "].concat(n))}},{key:"warn",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(t=console).warn.apply(t,["[SDK Core] "].concat(n))}}]),a}();r(X,"debug",!1);var J=function(e){o(a,X);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"instances",{route:{hash:"",query:{}},catalog:new C(e.callFunction.bind(c(e))),user:new I(e.callFunction.bind(c(e))),tenant:new M(e.callFunction.bind(c(e))),layout:new S(e.callFunction.bind(c(e))),authorization:new F(e.callFunction.bind(c(e))),customer:new R(e.callFunction.bind(c(e))),plugin:new N(e.callFunction.bind(c(e))),orderpath:new z(e.callFunction.bind(c(e))),context:e.initializeContextClass()}),e}return n(a)}(),Y=function(e){o(a,X);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"instances",{route:{hash:"",query:{}},authorization:new W(e.callFunction.bind(c(e))),cart:new V(e.callFunction.bind(c(e))),catalog:new H(e.callFunction.bind(c(e))),account:new q(e.callFunction.bind(c(e))),utils:new G(e.callFunction.bind(c(e))),config:new $(e.callFunction.bind(c(e))),tenant:new K(e.callFunction.bind(c(e))),wishlist:new B(e.callFunction.bind(c(e))),context:e.initializeContextClass(),plugin:new Q(e.callFunction.bind(c(e)))}),e}return n(a)}();export{E as BackofficeAddToCartContext,T as BackofficeEditProductLinesOnCartContext,J as BackofficeSdk,A as SdkEvents,D as ShopAddToCartContext,L as ShopEditProductLinesOnCartContext,Y as ShopSdk};
|
|
1
|
+
function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return c(t)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=i(t);if(e){var o=i(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return u(this,n)}}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,c=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(c)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function h(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var p,d,y,g={},b={};p=b,Object.defineProperty(p,"__esModule",{value:!0}),p.Errors=p.Message=void 0,(d=p.Message||(p.Message={})).INIT="one:init",d.UPDATE="one:update",d.METHOD_CALL="one:method:call",d.METHOD_CALL_ERROR="one:method:error",d.METHOD_RESULT="one:method:result",d.NAVIGATION_PUSH="one:navigation:push",d.FRAME_HEIGHT_REQUEST="one:frameheight:request",d.FRAME_HEIGHT_CHANGE="one:frameheight:change",(y=p.Errors||(p.Errors={})).METHOD_DOES_NOT_EXISTS="Method does not exists",y.SERVICE_DOES_NOT_EXISTS="Service does not exists";var _={};Object.defineProperty(_,"__esModule",{value:!0}),function(t){var e=v&&v.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(e,n);o&&!("get"in o?!e.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,o)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),n=v&&v.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};Object.defineProperty(t,"__esModule",{value:!0}),n(b,t),n(_,t)}(g);var w={exports:{}};window;var x=h(w.exports=function(){return n={},t.m=e=[function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(26),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i},function(t,e,n){var r=n(74),o=n(77);t.exports=function(t,e){var n=o(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(7),o=n(51),i=n(52),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):i(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(23);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,n){var r=n(1).Symbol;t.exports=r},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&-1<t&&t%1==0&&t<e}},function(t,e,n){var r=n(64),o=n(65),i=n(66),a=n(67),c=n(68);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=c,t.exports=u},function(t,e,n){var r=n(11);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(2)(Object,"create");t.exports=r},function(t,e,n){var r=n(86);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(38);t.exports=function(t,e,n){var o=null==t?void 0:r(t,e);return void 0===o?n:o}},function(t,e,n){var r=n(3),o=n(128),i=n(4),a=Function.prototype,c=Object.prototype,u=a.toString,s=c.hasOwnProperty,l=u.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=r(t))return!1;var e=o(t);if(null===e)return!0;var n=s.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}},function(t,e,n){var r=n(47),o=n(57),i=n(18);t.exports=function(t){return i(t)?r(t):o(t)}},function(t,e){t.exports=function(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991}},function(t,e,n){var r=n(31),o=n(17);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)}},function(t,e,n){var r=n(2)(n(1),"Map");t.exports=r},function(t,e,n){var r=n(78),o=n(85),i=n(87),a=n(88),c=n(89);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=c,t.exports=u},function(t,e,n){var r=n(0),o=n(22),i=n(114),a=n(117);t.exports=function(t,e){return r(t)?t:o(t,e)?[t]:i(a(t))}},function(t,e,n){var r=n(0),o=n(23),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!o(t))||a.test(t)||!i.test(t)||null!=e&&t in Object(e)}},function(t,e,n){var r=n(3),o=n(4);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r=n(129);t.exports=function(t,e,n){return null==t?t:r(t,e,n)}},function(t,e,n){var r=n(49),o=n(4),i=Object.prototype,a=i.hasOwnProperty,c=i.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return o(t)&&a.call(t,"callee")&&!c.call(t,"callee")};t.exports=u},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(50))},function(t,e,n){(function(t){var r=n(1),o=n(53),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,c=a&&a.exports===i?r.Buffer:void 0,u=(c?c.isBuffer:void 0)||o;t.exports=u}).call(this,n(28)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){var r=n(54),o=n(55),i=n(56),a=i&&i.isTypedArray,c=a?o(a):r;t.exports=c},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){var r=n(3),o=n(5);t.exports=function(t){if(!o(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(9),o=n(69),i=n(70),a=n(71),c=n(72),u=n(73);function s(t){var e=this.__data__=new r(t);this.size=e.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=c,s.prototype.set=u,t.exports=s},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(90),o=n(4);t.exports=function t(e,n,i,a,c){return e===n||(null==e||null==n||!o(e)&&!o(n)?e!=e&&n!=n:r(e,n,i,a,t,c))}},function(t,e,n){var r=n(91),o=n(94),i=n(95);t.exports=function(t,e,n,a,c,u){var s=1&n,l=t.length,f=e.length;if(l!=f&&!(s&&l<f))return!1;var v=u.get(t);if(v&&u.get(e))return v==e;var h=-1,p=!0,d=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++h<l;){var y=t[h],g=e[h];if(a)var b=s?a(g,y,h,e,t,u):a(y,g,h,t,e,u);if(void 0!==b){if(b)continue;p=!1;break}if(d){if(!o(e,(function(t,e){if(!i(d,e)&&(y===t||c(y,t,n,a,u)))return d.push(e)}))){p=!1;break}}else if(y!==g&&!c(y,g,n,a,u)){p=!1;break}}return u.delete(t),u.delete(e),p}},function(t,e,n){var r=n(5);t.exports=function(t){return t==t&&!r(t)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},function(t,e,n){var r=n(21),o=n(6);t.exports=function(t,e){for(var n=0,i=(e=r(e,t)).length;null!=t&&n<i;)t=t[o(e[n++])];return n&&n==i?t:void 0}},function(t,e,n){var r=n(41),o=n(42),i=n(61),a=n(0),c=n(127);t.exports=function(t,e,n){var u=a(t)?r:o;return n&&c(t,e,n)&&(e=void 0),u(t,i(e,3))}},function(t,e,n){var r,o,i=n(133),a=n(134),c=0,u=0;t.exports=function(t,e,n){var s=e&&n||0,l=e||[],f=(t=t||{}).node||r,v=void 0!==t.clockseq?t.clockseq:o;if(null==f||null==v){var h=i();null==f&&(f=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==v&&(v=o=16383&(h[6]<<8|h[7]))}var p=void 0!==t.msecs?t.msecs:(new Date).getTime(),d=void 0!==t.nsecs?t.nsecs:u+1,y=p-c+(d-u)/1e4;if(y<0&&void 0===t.clockseq&&(v=v+1&16383),(y<0||c<p)&&void 0===t.nsecs&&(d=0),1e4<=d)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=p,o=v;var g=(1e4*(268435455&(p+=122192928e5))+(u=d))%4294967296;l[s++]=g>>>24&255,l[s++]=g>>>16&255,l[s++]=g>>>8&255,l[s++]=255&g;var b=p/4294967296*1e4&268435455;l[s++]=b>>>8&255,l[s++]=255&b,l[s++]=b>>>24&15|16,l[s++]=b>>>16&255,l[s++]=v>>>8|128,l[s++]=255&v;for(var _=0;_<6;++_)l[s+_]=f[_];return e||a(l)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}},function(t,e,n){var r=n(43);t.exports=function(t,e){var n=!0;return r(t,(function(t,r,o){return n=!!e(t,r,o)})),n}},function(t,e,n){var r=n(44),o=n(60)(r);t.exports=o},function(t,e,n){var r=n(45),o=n(16);t.exports=function(t,e){return t&&r(t,e,o)}},function(t,e,n){var r=n(46)();t.exports=r},function(t,e){t.exports=function(t){return function(e,n,r){for(var o=-1,i=Object(e),a=r(e),c=a.length;c--;){var u=a[t?c:++o];if(!1===n(i[u],u,i))break}return e}}},function(t,e,n){var r=n(48),o=n(25),i=n(0),a=n(27),c=n(8),u=n(29),s=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=i(t),l=!n&&o(t),f=!n&&!l&&a(t),v=!n&&!l&&!f&&u(t),h=n||l||f||v,p=h?r(t.length,String):[],d=p.length;for(var y in t)!e&&!s.call(t,y)||h&&("length"==y||f&&("offset"==y||"parent"==y)||v&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||c(y,d))||p.push(y);return p}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(3),o=n(4);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(7),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,c=r?r.toStringTag:void 0;t.exports=function(t){var e=i.call(t,c),n=t[c];try{var r=!(t[c]=void 0)}catch(t){}var o=a.call(t);return r&&(e?t[c]=n:delete t[c]),o}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(3),o=n(17),i=n(4),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!a[r(t)]}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,n){(function(t){var r=n(26),o=e&&!e.nodeType&&e,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.process,c=function(){try{return i&&i.require&&i.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=c}).call(this,n(28)(t))},function(t,e,n){var r=n(58),o=n(59),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=[];for(var n in Object(t))i.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(30)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(18);t.exports=function(t,e){return function(n,o){if(null==n)return n;if(!r(n))return t(n,o);for(var i=n.length,a=e?i:-1,c=Object(n);(e?a--:++a<i)&&!1!==o(c[a],a,c););return n}}},function(t,e,n){var r=n(62),o=n(113),i=n(123),a=n(0),c=n(124);t.exports=function(t){return"function"==typeof t?t:null==t?i:"object"==typeof t?a(t)?o(t[0],t[1]):r(t):c(t)}},function(t,e,n){var r=n(63),o=n(112),i=n(37);t.exports=function(t){var e=o(t);return 1==e.length&&e[0][2]?i(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(32),o=n(34);t.exports=function(t,e,n,i){var a=n.length,c=a,u=!i;if(null==t)return!c;for(t=Object(t);a--;){var s=n[a];if(u&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++a<c;){var l=(s=n[a])[0],f=t[l],v=s[1];if(u&&s[2]){if(void 0===f&&!(l in t))return!1}else{var h=new r;if(i)var p=i(f,v,l,t,e,h);if(!(void 0===p?o(v,f,3,i,h):p))return!1}}return!0}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(10),o=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():o.call(e,n,1),--this.size,0))}},function(t,e,n){var r=n(10);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(10);t.exports=function(t){return-1<r(this.__data__,t)}},function(t,e,n){var r=n(10);t.exports=function(t,e){var n=this.__data__,o=r(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this}},function(t,e,n){var r=n(9);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(9),o=n(19),i=n(20);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(31),o=n(75),i=n(5),a=n(33),c=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,l=u.toString,f=s.hasOwnProperty,v=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||o(t))&&(r(t)?v:c).test(a(t))}},function(t,e,n){var r,o=n(76),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!i&&i in t}},function(t,e,n){var r=n(1)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(79),o=n(9),i=n(19);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(t,e,n){var r=n(80),o=n(81),i=n(82),a=n(83),c=n(84);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=i,u.prototype.has=a,u.prototype.set=c,t.exports=u},function(t,e,n){var r=n(12);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(12),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(12),o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:o.call(e,t)}},function(t,e,n){var r=n(12);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(13);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(13);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(13);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(13);t.exports=function(t,e){var n=r(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this}},function(t,e,n){var r=n(32),o=n(35),i=n(96),a=n(100),c=n(107),u=n(0),s=n(27),l=n(29),f="[object Arguments]",v="[object Array]",h="[object Object]",p=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,d,y,g){var b=u(t),_=u(e),w=b?v:c(t),x=_?v:c(e),m=(w=w==f?h:w)==h,O=(x=x==f?h:x)==h,j=w==x;if(j&&s(t)){if(!s(e))return!1;m=!(b=!0)}if(j&&!m)return g=g||new r,b||l(t)?o(t,e,n,d,y,g):i(t,e,w,n,d,y,g);if(!(1&n)){var A=m&&p.call(t,"__wrapped__"),P=O&&p.call(e,"__wrapped__");if(A||P)return y(A?t.value():t,P?e.value():e,n,d,g=g||new r)}return j&&(g=g||new r,a(t,e,n,d,y,g))}},function(t,e,n){var r=n(20),o=n(92),i=n(93);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,t.exports=a},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(7),o=n(97),i=n(11),a=n(35),c=n(98),u=n(99),s=r?r.prototype:void 0,l=s?s.valueOf:void 0;t.exports=function(t,e,n,r,s,f,v){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!f(new o(t),new o(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var h=c;case"[object Set]":var p=1&r;if(h=h||u,t.size!=e.size&&!p)return!1;var d=v.get(t);if(d)return d==e;r|=2,v.set(t,e);var y=a(h(t),h(e),r,s,f,v);return v.delete(t),y;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},function(t,e,n){var r=n(1).Uint8Array;t.exports=r},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e,n){var r=n(101),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,i,a,c){var u=1&n,s=r(t),l=s.length;if(l!=r(e).length&&!u)return!1;for(var f=l;f--;){var v=s[f];if(!(u?v in e:o.call(e,v)))return!1}var h=c.get(t);if(h&&c.get(e))return h==e;var p=!0;c.set(t,e),c.set(e,t);for(var d=u;++f<l;){var y=t[v=s[f]],g=e[v];if(i)var b=u?i(g,y,v,e,t,c):i(y,g,v,t,e,c);if(!(void 0===b?y===g||a(y,g,n,i,c):b)){p=!1;break}d=d||"constructor"==v}if(p&&!d){var _=t.constructor,w=e.constructor;_!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w)&&(p=!1)}return c.delete(t),c.delete(e),p}},function(t,e,n){var r=n(102),o=n(104),i=n(16);t.exports=function(t){return r(t,i,o)}},function(t,e,n){var r=n(103),o=n(0);t.exports=function(t,e,n){var i=e(t);return o(t)?i:r(i,n(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}},function(t,e,n){var r=n(105),o=n(106),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,c=a?function(t){return null==t?[]:(t=Object(t),r(a(t),(function(e){return i.call(t,e)})))}:o;t.exports=c},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(108),o=n(19),i=n(109),a=n(110),c=n(111),u=n(3),s=n(33),l="[object Map]",f="[object Promise]",v="[object Set]",h="[object WeakMap]",p="[object DataView]",d=s(r),y=s(o),g=s(i),b=s(a),_=s(c),w=u;(r&&w(new r(new ArrayBuffer(1)))!=p||o&&w(new o)!=l||i&&w(i.resolve())!=f||a&&w(new a)!=v||c&&w(new c)!=h)&&(w=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?s(n):"";if(r)switch(r){case d:return p;case y:return l;case g:return f;case b:return v;case _:return h}return e}),t.exports=w},function(t,e,n){var r=n(2)(n(1),"DataView");t.exports=r},function(t,e,n){var r=n(2)(n(1),"Promise");t.exports=r},function(t,e,n){var r=n(2)(n(1),"Set");t.exports=r},function(t,e,n){var r=n(2)(n(1),"WeakMap");t.exports=r},function(t,e,n){var r=n(36),o=n(16);t.exports=function(t){for(var e=o(t),n=e.length;n--;){var i=e[n],a=t[i];e[n]=[i,a,r(a)]}return e}},function(t,e,n){var r=n(34),o=n(14),i=n(120),a=n(22),c=n(36),u=n(37),s=n(6);t.exports=function(t,e){return a(t)&&c(e)?u(s(t),e):function(n){var a=o(n,t);return void 0===a&&a===e?i(n,t):r(e,a,3)}}},function(t,e,n){var r=n(115),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(o,(function(t,n,r,o){e.push(r?o.replace(i,"$1"):n||t)})),e}));t.exports=a},function(t,e,n){var r=n(116);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(20),o="Expected a function";function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(o);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(118);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(7),o=n(119),i=n(0),a=n(23),c=1/0,u=r?r.prototype:void 0,s=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(i(e))return o(e,t)+"";if(a(e))return s?s.call(e):"";var n=e+"";return"0"==n&&1/e==-c?"-0":n}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}},function(t,e,n){var r=n(121),o=n(122);t.exports=function(t,e){return null!=t&&o(t,e,r)}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(21),o=n(25),i=n(0),a=n(8),c=n(17),u=n(6);t.exports=function(t,e,n){for(var s=-1,l=(e=r(e,t)).length,f=!1;++s<l;){var v=u(e[s]);if(!(f=null!=t&&n(t,v)))break;t=t[v]}return f||++s!=l?f:!!(l=null==t?0:t.length)&&c(l)&&a(v,l)&&(i(t)||o(t))}},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r=n(125),o=n(126),i=n(22),a=n(6);t.exports=function(t){return i(t)?r(a(t)):o(t)}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e,n){var r=n(38);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e,n){var r=n(11),o=n(18),i=n(8),a=n(5);t.exports=function(t,e,n){if(!a(n))return!1;var c=typeof e;return!!("number"==c?o(n)&&i(e,n.length):"string"==c&&e in n)&&r(n[e],t)}},function(t,e,n){var r=n(30)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(130),o=n(21),i=n(8),a=n(5),c=n(6);t.exports=function(t,e,n,u){if(!a(t))return t;for(var s=-1,l=(e=o(e,t)).length,f=l-1,v=t;null!=v&&++s<l;){var h=c(e[s]),p=n;if(s!=f){var d=v[h];void 0===(p=u?u(d,h,v):void 0)&&(p=a(d)?d:i(e[s+1])?[]:{})}r(v,h,p),v=v[h]}return t}},function(t,e,n){var r=n(131),o=n(11),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];i.call(t,e)&&o(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(132);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e,n){var r=n(2),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o},function(t,e){var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(n){var r=new Uint8Array(16);t.exports=function(){return n(r),r}}else{var o=new Array(16);t.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),o[e]=t>>>((3&e)<<3)&255;return o}}},function(t,e){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);t.exports=function(t,e){var r=e||0,o=n;return[o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]]].join("")}},function(t,e,n){n.r(e);var r=n(39),o=n.n(r),i=n(0),a=n.n(i),c=n(15),u=n.n(c),s=n(14),l=n.n(s),f=n(24),v=n.n(f),h=n(40),p=n.n(h);function d(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function g(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"default",(function(){return w}));var b,_="__FUNCTION__",w=((b=[{key:"_handleQueue",value:function(){var t=this;this._queue.forEach((function(e){var n=e.message,r=e.msgChan;t._target.postMessage(n,t._targetOrigin,[r.port2])})),this._queue=[]}},{key:"_publish",value:function(t){var e=t.data,n=e.type,r=e.data,o=e.meta,i=this._parseFunction(n,r,o.functionKeys),a=(this._subscribers[n]||[]).map((function(e){return function(t){return function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return new Promise((function(e,r){try{var o=t.apply(void 0,n);o&&o.then?o.then(e).catch(r):e(o)}catch(e){r(e)}}))}}(e)(i,t.data,t).then((function(t){if(t)return{type:n,data:t}})).catch((function(t){return{type:n,error:t.message}}))}));Promise.all(a).then((function(e){e=e.filter((function(t){return!!t}));var n={};e.forEach((function(t){Object.assign(n,t)})),t.ports[0].postMessage(n)}))}},{key:"_subscribeFunction",value:function(t,e){this.unsubscribe(t),this.subscribe(t,(function(t){return e.apply(void 0,d(t))}))}},{key:"_stringifyFunction",value:function(t,e,n){var r=this,i=2<arguments.length&&void 0!==n?n:[];if(i&&0!==i.length)return i.forEach((function(n){var o=l()(e,n),i="".concat(_).concat(t,"_").concat(n);r._subscribeFunction(i,o),v()(e,n,i)})),{data:e,keys:i};if("function"!=typeof e)return function t(e,n,r){var i=2<arguments.length&&void 0!==r?r:"";return o()(e,(function(r,o){var c="".concat(i,"[").concat(o,"]");return"number"!=typeof o&&(c=i?"".concat(i,".").concat(o):"".concat(o)),!1===n(r,o,e,c)||!u()(r)&&!a()(r)||t(r,n,c)}))}(e,(function(e,n,o,a){if("function"==typeof e){var c="".concat(_).concat(t,"_").concat(a);r._subscribeFunction(c,e),o[n]=c,i.push(a)}})),{data:e,keys:i};var c="".concat(_).concat(t);return this._subscribeFunction(c,e),{data:c,keys:[""]}}},{key:"_parseFunction",value:function(t,e,n){var r=this,o=2<arguments.length&&void 0!==n?n:[];return 0===o.length?e:1===o.length&&""===o[0]?function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return r.postMessage(e,n)}:(o.forEach((function(n){var o=n.replace("".concat(_).concat(t,"_"),""),i=l()(e,o);v()(e,o,(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return r.postMessage(i,e)}))})),e)}},{key:"_subscribe",value:function(t,e){var n=this;this._subscribers[t]||(this._subscribers[t]=[]);var r=this._subscribers[t];e.forEach((function(e){if(r.includes(e)||r.push(e),"connect"===t&&n._isTargetReady){var o={source:n._target};e(o.data,o)}}))}},{key:"subscribe",value:function(t,e){var n=this;"string"!=typeof t&&!u()(t)||"string"==typeof t&&!e||("string"==typeof t&&(t=g({},t,e)),Object.keys(t).forEach((function(e){var r=t[e];"function"==typeof r&&(r=[r]),n._subscribe(e,r)})))}},{key:"unsubscribe",value:function(t,e){if(void 0!==t){var n=this._subscribers[t]||[];if(void 0!==e){var r=n.indexOf(e);-1<r&&n.splice(r,1)}else this._subscribers[t]=[]}else this._subscribers={}}},{key:"postMessage",value:function(t,e,n){var r=this,o=2<arguments.length&&void 0!==n?n:{};return new Promise((function(n,i){var a=new MessageChannel;a.port1.onmessage=function(t){var e=t.data,r=e.data,o=e.error;o?i(new Error(o)):n(r)};var c={type:t,data:e,meta:{id:r._id}},u=o.hasFunction,s=o.functionKeys,l=void 0===s?[]:s;if(!0===u){var f=r._stringifyFunction(t,e,l);c.data=f.data,c.meta.functionKeys=f.keys}r._isTargetReady||"pre_connect"===t?r._target.postMessage(c,r._targetOrigin,[a.port2]):r._queue.push({message:c,msgChan:a})}))}},{key:"_preConnect",value:function(){function t(){o++,n.postMessage("pre_connect",n._id).then((function(t){e&&(clearTimeout(e),e=void 0),r[0]&&(r[0](t),r=[])})).catch((function(t){e&&(clearTimeout(e),e=void 0),r[1]&&(r[1](t),r=[])}))}var e,n=this,r=[],o=0,i=new Promise((function(t,e){r[0]=t,r[1]=e}));return t(),function t(i){!n._isTargetReady&&o>=n._maxAttempts?r[1]&&(r[1](new Error("Exceed the max attempts, connect failed.")),r=[]):e=setTimeout((function(){i(),t(i)}),n._attemptInterval)}(t),i}},{key:"connect",value:function(){var t=this;return this._target?this._isTargetReady?Promise.resolve("Target has already connected."):this._preConnect().then((function(e){return t._targetId=e,t._isTargetReady=!0,t._handleQueue(),t.postMessage("connect")})).catch((function(e){throw t._isTargetReady=!1,e})):Promise.reject(new Error("Target is not exist."))}},{key:"clearQueue",value:function(){this._queue=[]}},{key:"destory",value:function(){this._subscribers={},this._targetOrigin="",this._target=void 0,this._queue=[],this._isTargetReady=!1,window.removeEventListener("message",this._handleMessage)}}])&&y(x.prototype,b),x);function x(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,x),g(this,"_handleMessage",(function(e){if(e.origin===t._targetOrigin||"*"===t._targetOrigin){var n=e.data,r=n.type,o=n.meta;"pre_connect"!==r&&(void 0===o?{}:o).id!==t._targetId||t._publish(e)}})),g(this,"_handlePreConnect",(function(e,n,r){var o=r.source;if(t._target&&t._target!==o)throw new Error("Connection is rejected.");return t._target=o,t._targetId=e,t._id})),g(this,"_handleConnect",(function(e,n,r){t._isTargetReady=!0,t._handleQueue()}));var n=e.targetOrigin,r=void 0===n?"":n,o=e.subscribers,i=void 0===o?{}:o,a=e.target,c=e.attemptInterval,u=void 0===c?1e3:c,s=e.maxAttempts,l=void 0===s?10:s;if(a===window)throw new Error("The target can not be current window.");this._subscribers=i,this._targetOrigin=r,this._target=a,this._queue=[],this._isTargetReady=!1,this._id=p()(),this._targetId="",this._attemptInterval=u,this._maxAttempts=l,this.subscribe("pre_connect",this._handlePreConnect),this.subscribe("connect",this._handleConnect),window.addEventListener("message",this._handleMessage,!1),window.addEventListener("beforeunload",(function(){t.destory()}))}}],t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(t){return e[t]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=135);function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var e,n}()),m=function(t){return t.toString(16).padStart(2,"0")};function O(){var t=new Uint8Array(5);return window.crypto.getRandomValues(t),Array.from(t,m).join("")}var j,A,P=function(){function e(n){var o=this;t(this,e),r(this,"serviceName",""),r(this,"call",void 0),this.call=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return n.apply(void 0,[o.serviceName,t].concat(r))}}return n(e,[{key:"update",value:function(t){var n=t[this.serviceName];n&&e.update(this,n)}}],[{key:"update",value:function(t,e){Object.keys(e).forEach((function(n){t[n]=e[n]}))}}]),e}(),k=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","context"),e}return n(a)}(),E=function(e){o(a,k);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"productId",void 0),r(c(e),"cartId",void 0),r(c(e),"offerId",void 0),r(c(e),"warehouses",void 0),r(c(e),"warehouseId",void 0),r(c(e),"meta",void 0),r(c(e),"pluginProductLines",void 0),r(c(e),"productLines",void 0),r(c(e),"productAmount",void 0),e}return n(a,[{key:"closePlugin",value:function(){return this.call("closePlugin")}},{key:"closePluginAndAddToCart",value:function(){return this.call("closePluginAndAddToCart")}},{key:"closePluginAndRefreshCart",value:function(){return this.call("closePluginAndRefreshCart")}}]),a}(),T=function(e){o(a,k);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"orderDetails",void 0),r(c(e),"invoiceDetails",void 0),r(c(e),"selectedInvoices",void 0),r(c(e),"clientContextId",void 0),r(c(e),"meta",void 0),e}return n(a,[{key:"closePlugin",value:function(){return this.call("closePlugin")}},{key:"closePluginAndRefreshView",value:function(){return this.call("closePluginAndRefreshView")}}]),a}(),C=function(e){o(a,k);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"productId",void 0),r(c(e),"cartId",void 0),r(c(e),"offerId",void 0),r(c(e),"warehouses",void 0),r(c(e),"warehouseId",void 0),r(c(e),"meta",void 0),r(c(e),"productLineId",void 0),r(c(e),"productLines",void 0),r(c(e),"pluginProductLines",void 0),r(c(e),"productAmount",void 0),e}return n(a,[{key:"closePlugin",value:function(){return this.call("closePlugin")}},{key:"closePluginAndRefreshCart",value:function(){return this.call("closePluginAndRefreshCart")}}]),a}(),I=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","catalog"),e}return n(a,[{key:"fetchCategories",value:function(){return this.call("fetchCategories")}},{key:"fetchProduct",value:function(t){return this.call("fetchProduct",t)}}]),a}(),M=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","user"),r(c(e),"email",void 0),r(c(e),"id",void 0),r(c(e),"name",void 0),r(c(e),"authorities",void 0),e}return n(a)}(),S=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","tenant"),r(c(e),"tenantKey",void 0),r(c(e),"language",void 0),r(c(e),"currency",void 0),e}return n(a)}(),F=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","layout"),r(c(e),"isAsideOpened",void 0),e}return n(a)}(),R=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","authorization"),e}return n(a,[{key:"getAuthToken",value:function(){return this.call("getAuthToken")}}]),a}(),N=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","customer"),r(c(e),"id",void 0),r(c(e),"name",void 0),e}return n(a)}(),z=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","plugin"),r(c(e),"id",void 0),r(c(e),"srcUrl",void 0),r(c(e),"name",void 0),e}return n(a)}(),U=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","orderpath"),e}return n(a,[{key:"fetchCart",value:function(t){return this.call("fetchCart",t)}},{key:"fetchOffer",value:function(t){return this.call("fetchOffer",t)}}]),a}(),D=function(){function e(){t(this,e),r(this,"_callbacks",void 0),this._callbacks={}}return n(e,[{key:"on",value:function(t,e){void 0===this._callbacks[t]&&(this._callbacks[t]=[]),this._callbacks[t].push(e)}},{key:"off",value:function(t,e){if(void 0!==this._callbacks[t])for(var n=0;n<this._callbacks[t].length;n++)this._callbacks[t][n]===e&&this._callbacks[t].splice(n,1)}},{key:"emit",value:function(t){if(void 0!==this._callbacks[t]){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var o=0;o<this._callbacks[t].length;o++){var i;(i=this._callbacks[t])[o].apply(i,n)}}}}]),e}(),L=function(e){o(a,k);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"productId",void 0),r(c(e),"cartId",void 0),r(c(e),"warehouses",void 0),r(c(e),"warehouseId",void 0),r(c(e),"meta",void 0),r(c(e),"pluginProductLines",void 0),r(c(e),"productLines",void 0),r(c(e),"productAmount",void 0),e}return n(a,[{key:"closePlugin",value:function(){return this.call("closePlugin")}},{key:"closePluginAndAddToCart",value:function(){return this.call("closePluginAndAddToCart")}},{key:"closePluginAndRefreshCart",value:function(){return this.call("closePluginAndRefreshCart")}}]),a}(),H=function(e){o(a,k);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"productId",void 0),r(c(e),"cartId",void 0),r(c(e),"warehouses",void 0),r(c(e),"warehouseId",void 0),r(c(e),"meta",void 0),r(c(e),"productLineId",void 0),r(c(e),"productLines",void 0),r(c(e),"pluginProductLines",void 0),r(c(e),"productAmount",void 0),e}return n(a,[{key:"closePlugin",value:function(){return this.call("closePlugin")}},{key:"closePluginAndRefreshCart",value:function(){return this.call("closePluginAndRefreshCart")}}]),a}(),B=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","catalog"),r(c(e),"categories",void 0),r(c(e),"selectedCategoryId",void 0),e}return n(a,[{key:"fetchProduct",value:function(t){return this.call("fetchProduct",t)}},{key:"fetchProducts",value:function(t){return this.call("fetchProducts",t)}},{key:"fetchStocksForProductsAndWarehouses",value:function(t,e){return this.call("fetchStocksForProductsAndWarehouses",t,e)}},{key:"getProductPrice",value:function(t,e){return this.call("getProductPrice",t,e)}},{key:"fetchPricingForProducts",value:function(t){return this.call("fetchPricingForProducts",t)}},{key:"fetchWarehouses",value:function(){return this.call("fetchWarehouses")}},{key:"getCategoryById",value:function(t){return this.call("getCategoryById",t)}}]),a}(),q=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","wishlist"),e}return n(a,[{key:"addProductsToWishlist",value:function(t,e){return this.call("addProductsToWishlist",t,e)}},{key:"getWishlists",value:function(){return this.call("getWishlists")}},{key:"createWishlist",value:function(t){return this.call("createWishlist",t)}}]),a}(),V=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","account"),r(c(e),"client",void 0),r(c(e),"isAuthenticated",void 0),r(c(e),"user",void 0),r(c(e),"manager",void 0),e}return n(a,[{key:"hasSegment",value:function(t){return this.call("hasSegment",t)}},{key:"logout",value:function(){}}]),a}(),W=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","cart"),r(c(e),"carts",void 0),r(c(e),"currentCart",void 0),r(c(e),"totalCartPrice",void 0),e}return n(a,[{key:"addToCart",value:function(t,e,n,r){return this.call("addToCart",t,e,n,r)}}]),a}(),G=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","authorization"),e}return n(a,[{key:"getAuthToken",value:function(){return this.call("getAuthToken")}}]),a}(),$=function(e){o(a,P);var i=s(a);function a(e){var n;return t(this,a),r(c(n=i.call(this,e)),"serviceName","utils"),r(c(n),"currency",void 0),r(c(n),"isAnonymousAndPurchaseDisabled",void 0),r(c(n),"isB2B",void 0),r(c(n),"isB2BAndPlatformIsNotOpened",void 0),r(c(n),"isIndexPage",void 0),r(c(n),"isPurchaseEnabledOrAuthenticated",void 0),r(c(n),"routes",void 0),n.routes={getCategoryPath:n.getCategoryPath,getManufacturerSearchUrl:n.getManufacturerSearchUrl,getProductUrl:n.getProductUrl,isExternalUrl:n.isExternalUrl},n}return n(a,[{key:"notify",value:function(t){return this.call("notify",t)}},{key:"getCategoryPath",value:function(t){return this.call("getCategoryPath",t)}},{key:"getManufacturerSearchUrl",value:function(t){return this.call("getManufacturerSearchUrl",t)}},{key:"getProductUrl",value:function(t){return this.call("getProductUrl",t)}},{key:"isExternalUrl",value:function(t){return this.call("isExternalUrl",t)}}]),a}(),K=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","config"),r(c(e),"accessMode",void 0),r(c(e),"isB2CRegistrationEnabled",void 0),r(c(e),"isCatalogOpened",void 0),r(c(e),"isGrossSelected",void 0),r(c(e),"isPlatformClosed",void 0),r(c(e),"isPlatformOpened",void 0),r(c(e),"isPurchaseEnabled",void 0),r(c(e),"isRegistrationEnabled",void 0),r(c(e),"currency",void 0),e}return n(a)}(),Q=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","tenant"),r(c(e),"tenantKey",void 0),r(c(e),"language",void 0),e}return n(a)}(),X=function(e){o(a,P);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"serviceName","plugin"),r(c(e),"id",void 0),r(c(e),"srcUrl",void 0),r(c(e),"name",void 0),e}return n(a)}();!function(t){t.INIT="INIT",t.UPDATE="UPDATE"}(j||(j={})),function(t){t.INIT="INIT",t.UPDATE="UPDATE"}(A||(A={}));var J=function(e){o(a,D);var i=s(a);function a(e){var n;return t(this,a),r(c(n=i.call(this)),"channel",void 0),r(c(n),"autoheight",!0),r(c(n),"heightMutationObserver",null),r(c(n),"origin",void 0),r(c(n),"isInitialized",!1),r(c(n),"instances",void 0),r(c(n),"contextClass",void 0),n.initializeServiceGetters(),n.origin=e.origin,n.channel=new x({targetOrigin:n.origin,target:window.parent}),n.channel.subscribe(g.Message.INIT,(function(t){a.log("Handling INIT message"),Object.entries(n.instances).forEach((function(e){var n=l(e,2),r=n[0],o=n[1];o instanceof P?o.update(t):void 0!==t[r]?P.update(o,t[r]):a.warn("Missing attributes for ".concat(r," in "),t)})),a.log("Emitting INIT with payload ",n.instances),n.isInitialized=!0,n.emit(j.INIT,n.instances)})),n.channel.subscribe(g.Message.UPDATE,(function(t){a.log("Emitting UPDATE with payload ",t),n.emit(j.UPDATE,t)})),n.channel.subscribe(g.Message.FRAME_HEIGHT_REQUEST,(function(t){n.autoheight&&(a.log("Request for iframe height"),n.sendFrameHeight())})),n.channel.connect().then((function(){a.log("Connected with ONe SDK"),n.autoheight&&n.initializeHeightObserver()})),n.setupOptions(e),a.log("Initialized."),n}return n(a,[{key:"initializeServiceGetters",value:function(){var t=this;this.instances&&Object.keys(this.instances).forEach((function(e){Object.defineProperty(t,e,{get:function(){return t.isInitialized?t.instances[e]:null}})}))}},{key:"initializeContextClass",value:function(){return this.contextClass?new this.contextClass(this.callFunction.bind(this)):{}}},{key:"sendFrameHeight",value:function(){this.channel.postMessage(g.Message.FRAME_HEIGHT_CHANGE,document.body.scrollHeight)}},{key:"initializeHeightObserver",value:function(){var t=this;if("MutationObserver"in window){var e=document.querySelector("body");this.heightMutationObserver=new MutationObserver((function(){t.sendFrameHeight()})),a.log("Create body MutationObserver"),this.heightMutationObserver.observe(e,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0})}else a.warn("MutationObserver not available. Auto-height functionality disabled.")}},{key:"setupOptions",value:function(t){t&&(void 0!==t.debug&&(a.debug=t.debug),void 0!==t.autoheight&&(this.autoheight=t.autoheight),this.contextClass=t.context)}},{key:"callFunction",value:function(t,e){var n=this,r=O();if(this.isInitialized){for(var o=arguments.length,i=new Array(o>2?o-2:0),c=2;c<o;c++)i[c-2]=arguments[c];return a.log("Call ID ".concat(r," for ").concat(t,":").concat(e),i),this.channel.postMessage(g.Message.METHOD_CALL,{callId:r,service:t,method:e,payload:i}),new Promise((function(t,e){n.channel.subscribe(g.Message.METHOD_RESULT,(function o(i){if(i.callId===r)return n.channel.unsubscribe(g.Message.METHOD_RESULT,o),null!=i&&i.isException?e(i.result):t(i.result)}))}))}return a.log("SDK is not initialized!"),Promise.resolve(null)}},{key:"navigate",value:function(t){this.channel.postMessage(g.Message.NAVIGATION_PUSH,t)}}],[{key:"log",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];a.debug&&(t=console).log.apply(t,["[SDK Core] "].concat(n))}},{key:"warn",value:function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(t=console).warn.apply(t,["[SDK Core] "].concat(n))}}]),a}();r(J,"debug",!1);var Y=function(e){o(a,J);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"instances",{route:{hash:"",query:{}},catalog:new I(e.callFunction.bind(c(e))),user:new M(e.callFunction.bind(c(e))),tenant:new S(e.callFunction.bind(c(e))),layout:new F(e.callFunction.bind(c(e))),authorization:new R(e.callFunction.bind(c(e))),customer:new N(e.callFunction.bind(c(e))),plugin:new z(e.callFunction.bind(c(e))),orderpath:new U(e.callFunction.bind(c(e))),context:e.initializeContextClass()}),e}return n(a)}(),Z=function(e){o(a,J);var i=s(a);function a(){var e;t(this,a);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return r(c(e=i.call.apply(i,[this].concat(o))),"instances",{route:{hash:"",query:{}},authorization:new G(e.callFunction.bind(c(e))),cart:new W(e.callFunction.bind(c(e))),catalog:new B(e.callFunction.bind(c(e))),account:new V(e.callFunction.bind(c(e))),utils:new $(e.callFunction.bind(c(e))),config:new K(e.callFunction.bind(c(e))),tenant:new Q(e.callFunction.bind(c(e))),wishlist:new q(e.callFunction.bind(c(e))),context:e.initializeContextClass(),plugin:new X(e.callFunction.bind(c(e)))}),e}return n(a)}();export{E as BackofficeAddToCartContext,T as BackofficeDocumentsContext,C as BackofficeEditProductLinesOnCartContext,Y as BackofficeSdk,A as SdkEvents,L as ShopAddToCartContext,H as ShopEditProductLinesOnCartContext,Z as ShopSdk};
|
|
2
2
|
//# sourceMappingURL=bundle.esm.min.js.map
|