@one-commerce/sdk-core 2.3.4 → 2.3.6
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/package.json +3 -3
- package/lib/bundles/bundle.esm.js +0 -1577
- package/lib/bundles/bundle.esm.js.map +0 -1
- package/lib/bundles/bundle.esm.min.js +0 -2
- package/lib/bundles/bundle.esm.min.js.map +0 -1
- package/lib/bundles/bundle.umd.js +0 -1593
- package/lib/bundles/bundle.umd.js.map +0 -1
- package/lib/bundles/bundle.umd.min.js +0 -2
- package/lib/bundles/bundle.umd.min.js.map +0 -1
- package/lib/cjs/backoffice/context.js +0 -196
- package/lib/cjs/backoffice/context.js.map +0 -1
- package/lib/cjs/backoffice/services.js +0 -298
- package/lib/cjs/backoffice/services.js.map +0 -1
- package/lib/cjs/events.js +0 -75
- package/lib/cjs/events.js.map +0 -1
- package/lib/cjs/index.js +0 -418
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/shop/context.js +0 -144
- package/lib/cjs/shop/context.js.map +0 -1
- package/lib/cjs/shop/services.js +0 -435
- package/lib/cjs/shop/services.js.map +0 -1
- package/lib/cjs/utils.js +0 -111
- package/lib/cjs/utils.js.map +0 -1
- package/lib/esm/backoffice/context.js +0 -100
- package/lib/esm/backoffice/context.js.map +0 -1
- package/lib/esm/backoffice/services.js +0 -114
- package/lib/esm/backoffice/services.js.map +0 -1
- package/lib/esm/events.js +0 -47
- package/lib/esm/events.js.map +0 -1
- package/lib/esm/index.js +0 -244
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/shop/context.js +0 -70
- package/lib/esm/shop/context.js.map +0 -1
- package/lib/esm/shop/services.js +0 -218
- package/lib/esm/shop/services.js.map +0 -1
- package/lib/esm/utils.js +0 -47
- package/lib/esm/utils.js.map +0 -1
- package/lib/types/backoffice/context.d.ts +0 -66
- package/lib/types/backoffice/context.d.ts.map +0 -1
- package/lib/types/backoffice/services.d.ts +0 -49
- package/lib/types/backoffice/services.d.ts.map +0 -1
- package/lib/types/events.d.ts +0 -9
- package/lib/types/events.d.ts.map +0 -1
- package/lib/types/iframe-channel.d.ts +0 -19
- package/lib/types/index.d.ts +0 -107
- package/lib/types/index.d.ts.map +0 -1
- package/lib/types/shop/context.d.ts +0 -30
- package/lib/types/shop/context.d.ts.map +0 -1
- package/lib/types/shop/services.d.ts +0 -161
- package/lib/types/shop/services.d.ts.map +0 -1
- package/lib/types/utils.d.ts +0 -12
- package/lib/types/utils.d.ts.map +0 -1
|
@@ -1,1593 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.SdkCore = {}));
|
|
5
|
-
})(this, (function (exports) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _classCallCheck(instance, Constructor) {
|
|
8
|
-
if (!(instance instanceof Constructor)) {
|
|
9
|
-
throw new TypeError("Cannot call a class as a function");
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function _defineProperties(target, props) {
|
|
14
|
-
for (var i = 0; i < props.length; i++) {
|
|
15
|
-
var descriptor = props[i];
|
|
16
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
17
|
-
descriptor.configurable = true;
|
|
18
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
19
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
24
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
25
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
26
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
27
|
-
writable: false
|
|
28
|
-
});
|
|
29
|
-
return Constructor;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function _defineProperty(obj, key, value) {
|
|
33
|
-
if (key in obj) {
|
|
34
|
-
Object.defineProperty(obj, key, {
|
|
35
|
-
value: value,
|
|
36
|
-
enumerable: true,
|
|
37
|
-
configurable: true,
|
|
38
|
-
writable: true
|
|
39
|
-
});
|
|
40
|
-
} else {
|
|
41
|
-
obj[key] = value;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
return obj;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function _inherits(subClass, superClass) {
|
|
48
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
49
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
53
|
-
constructor: {
|
|
54
|
-
value: subClass,
|
|
55
|
-
writable: true,
|
|
56
|
-
configurable: true
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
Object.defineProperty(subClass, "prototype", {
|
|
60
|
-
writable: false
|
|
61
|
-
});
|
|
62
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function _getPrototypeOf(o) {
|
|
66
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
67
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
68
|
-
};
|
|
69
|
-
return _getPrototypeOf(o);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
function _setPrototypeOf(o, p) {
|
|
73
|
-
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
74
|
-
o.__proto__ = p;
|
|
75
|
-
return o;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
return _setPrototypeOf(o, p);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function _isNativeReflectConstruct() {
|
|
82
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
83
|
-
if (Reflect.construct.sham) return false;
|
|
84
|
-
if (typeof Proxy === "function") return true;
|
|
85
|
-
|
|
86
|
-
try {
|
|
87
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
88
|
-
return true;
|
|
89
|
-
} catch (e) {
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function _assertThisInitialized(self) {
|
|
95
|
-
if (self === void 0) {
|
|
96
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return self;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function _possibleConstructorReturn(self, call) {
|
|
103
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
104
|
-
return call;
|
|
105
|
-
} else if (call !== void 0) {
|
|
106
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
return _assertThisInitialized(self);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function _createSuper(Derived) {
|
|
113
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
114
|
-
|
|
115
|
-
return function _createSuperInternal() {
|
|
116
|
-
var Super = _getPrototypeOf(Derived),
|
|
117
|
-
result;
|
|
118
|
-
|
|
119
|
-
if (hasNativeReflectConstruct) {
|
|
120
|
-
var NewTarget = _getPrototypeOf(this).constructor;
|
|
121
|
-
|
|
122
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
123
|
-
} else {
|
|
124
|
-
result = Super.apply(this, arguments);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return _possibleConstructorReturn(this, result);
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
function _slicedToArray(arr, i) {
|
|
132
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
function _arrayWithHoles(arr) {
|
|
136
|
-
if (Array.isArray(arr)) return arr;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
function _iterableToArrayLimit(arr, i) {
|
|
140
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
141
|
-
|
|
142
|
-
if (_i == null) return;
|
|
143
|
-
var _arr = [];
|
|
144
|
-
var _n = true;
|
|
145
|
-
var _d = false;
|
|
146
|
-
|
|
147
|
-
var _s, _e;
|
|
148
|
-
|
|
149
|
-
try {
|
|
150
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
151
|
-
_arr.push(_s.value);
|
|
152
|
-
|
|
153
|
-
if (i && _arr.length === i) break;
|
|
154
|
-
}
|
|
155
|
-
} catch (err) {
|
|
156
|
-
_d = true;
|
|
157
|
-
_e = err;
|
|
158
|
-
} finally {
|
|
159
|
-
try {
|
|
160
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
161
|
-
} finally {
|
|
162
|
-
if (_d) throw _e;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
return _arr;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
170
|
-
if (!o) return;
|
|
171
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
172
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
173
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
174
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
175
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
function _arrayLikeToArray(arr, len) {
|
|
179
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
180
|
-
|
|
181
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
182
|
-
|
|
183
|
-
return arr2;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
function _nonIterableRest() {
|
|
187
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
191
|
-
|
|
192
|
-
function getDefaultExportFromCjs (x) {
|
|
193
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
var main = {};
|
|
197
|
-
|
|
198
|
-
var messages = {};
|
|
199
|
-
|
|
200
|
-
(function (exports) {
|
|
201
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
202
|
-
exports.Errors = exports.Message = void 0;
|
|
203
|
-
(function (Message) {
|
|
204
|
-
Message["INIT"] = "one:init";
|
|
205
|
-
Message["UPDATE"] = "one:update";
|
|
206
|
-
Message["METHOD_CALL"] = "one:method:call";
|
|
207
|
-
Message["METHOD_CALL_ERROR"] = "one:method:error";
|
|
208
|
-
Message["METHOD_RESULT"] = "one:method:result";
|
|
209
|
-
Message["NAVIGATION_PUSH"] = "one:navigation:push";
|
|
210
|
-
Message["FRAME_HEIGHT_REQUEST"] = "one:frameheight:request";
|
|
211
|
-
Message["FRAME_HEIGHT_CHANGE"] = "one:frameheight:change";
|
|
212
|
-
})(exports.Message || (exports.Message = {}));
|
|
213
|
-
(function (Errors) {
|
|
214
|
-
Errors["METHOD_DOES_NOT_EXISTS"] = "Method does not exists";
|
|
215
|
-
Errors["SERVICE_DOES_NOT_EXISTS"] = "Service does not exists";
|
|
216
|
-
})(exports.Errors || (exports.Errors = {}));
|
|
217
|
-
|
|
218
|
-
}(messages));
|
|
219
|
-
|
|
220
|
-
var api = {};
|
|
221
|
-
|
|
222
|
-
Object.defineProperty(api, "__esModule", { value: true });
|
|
223
|
-
|
|
224
|
-
(function (exports) {
|
|
225
|
-
var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
226
|
-
if (k2 === undefined) k2 = k;
|
|
227
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
228
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
229
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
230
|
-
}
|
|
231
|
-
Object.defineProperty(o, k2, desc);
|
|
232
|
-
}) : (function(o, m, k, k2) {
|
|
233
|
-
if (k2 === undefined) k2 = k;
|
|
234
|
-
o[k2] = m[k];
|
|
235
|
-
}));
|
|
236
|
-
var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
|
|
237
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
238
|
-
};
|
|
239
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
240
|
-
__exportStar(messages, exports);
|
|
241
|
-
__exportStar(api, exports);
|
|
242
|
-
|
|
243
|
-
}(main));
|
|
244
|
-
|
|
245
|
-
var lib = {exports: {}};
|
|
246
|
-
|
|
247
|
-
(function (module, exports) {
|
|
248
|
-
!function(t,n){module.exports=n();}(window,function(){return r={},o.m=e=[function(t,n){var e=Array.isArray;t.exports=e;},function(t,n,e){var r=e(26),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();t.exports=i;},function(t,n,e){var r=e(74),o=e(77);t.exports=function(t,n){var e=o(t,n);return r(e)?e:void 0};},function(t,n,e){var r=e(7),o=e(51),i=e(52),u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?o(t):i(t)};},function(t,n){t.exports=function(t){return null!=t&&"object"==typeof t};},function(t,n){t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)};},function(t,n,e){var r=e(23);t.exports=function(t){if("string"==typeof t||r(t))return t;var n=t+"";return "0"==n&&1/t==-1/0?"-0":n};},function(t,n,e){var r=e(1).Symbol;t.exports=r;},function(t,n){var r=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var e=typeof t;return !!(n=null==n?9007199254740991:n)&&("number"==e||"symbol"!=e&&r.test(t))&&-1<t&&t%1==0&&t<n};},function(t,n,e){var r=e(64),o=e(65),i=e(66),u=e(67),c=e(68);function a(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1]);}}a.prototype.clear=r,a.prototype.delete=o,a.prototype.get=i,a.prototype.has=u,a.prototype.set=c,t.exports=a;},function(t,n,e){var r=e(11);t.exports=function(t,n){for(var e=t.length;e--;)if(r(t[e][0],n))return e;return -1};},function(t,n){t.exports=function(t,n){return t===n||t!=t&&n!=n};},function(t,n,e){var r=e(2)(Object,"create");t.exports=r;},function(t,n,e){var r=e(86);t.exports=function(t,n){var e=t.__data__;return r(n)?e["string"==typeof n?"string":"hash"]:e.map};},function(t,n,e){var o=e(38);t.exports=function(t,n,e){var r=null==t?void 0:o(t,n);return void 0===r?e:r};},function(t,n,e){var r=e(3),o=e(128),i=e(4),u=Function.prototype,c=Object.prototype,a=u.toString,s=c.hasOwnProperty,f=a.call(Object);t.exports=function(t){if(!i(t)||"[object Object]"!=r(t))return !1;var n=o(t);if(null===n)return !0;var e=s.call(n,"constructor")&&n.constructor;return "function"==typeof e&&e instanceof e&&a.call(e)==f};},function(t,n,e){var r=e(47),o=e(57),i=e(18);t.exports=function(t){return i(t)?r(t):o(t)};},function(t,n){t.exports=function(t){return "number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991};},function(t,n,e){var r=e(31),o=e(17);t.exports=function(t){return null!=t&&o(t.length)&&!r(t)};},function(t,n,e){var r=e(2)(e(1),"Map");t.exports=r;},function(t,n,e){var r=e(78),o=e(85),i=e(87),u=e(88),c=e(89);function a(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1]);}}a.prototype.clear=r,a.prototype.delete=o,a.prototype.get=i,a.prototype.has=u,a.prototype.set=c,t.exports=a;},function(t,n,e){var r=e(0),o=e(22),i=e(114),u=e(117);t.exports=function(t,n){return r(t)?t:o(t,n)?[t]:i(u(t))};},function(t,n,e){var r=e(0),o=e(23),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;t.exports=function(t,n){if(r(t))return !1;var e=typeof t;return !("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!o(t))||(u.test(t)||!i.test(t)||null!=n&&t in Object(n))};},function(t,n,e){var r=e(3),o=e(4);t.exports=function(t){return "symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)};},function(t,n,e){var r=e(129);t.exports=function(t,n,e){return null==t?t:r(t,n,e)};},function(t,n,e){var r=e(49),o=e(4),i=Object.prototype,u=i.hasOwnProperty,c=i.propertyIsEnumerable,a=r(function(){return arguments}())?r:function(t){return o(t)&&u.call(t,"callee")&&!c.call(t,"callee")};t.exports=a;},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n;}).call(this,n(50));},function(t,c,a){(function(t){var n=a(1),e=a(53),r=c&&!c.nodeType&&c,o=r&&"object"==typeof t&&t&&!t.nodeType&&t,i=o&&o.exports===r?n.Buffer:void 0,u=(i?i.isBuffer:void 0)||e;t.exports=u;}).call(this,a(28)(t));},function(t,n){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,n,e){var r=e(54),o=e(55),i=e(56),u=i&&i.isTypedArray,c=u?o(u):r;t.exports=c;},function(t,n){t.exports=function(n,e){return function(t){return n(e(t))}};},function(t,n,e){var r=e(3),o=e(5);t.exports=function(t){if(!o(t))return !1;var n=r(t);return "[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n};},function(t,n,e){var r=e(9),o=e(69),i=e(70),u=e(71),c=e(72),a=e(73);function s(t){var n=this.__data__=new r(t);this.size=n.size;}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=u,s.prototype.has=c,s.prototype.set=a,t.exports=s;},function(t,n){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return ""};},function(t,n,e){var u=e(90),c=e(4);t.exports=function t(n,e,r,o,i){return n===e||(null==n||null==e||!c(n)&&!c(e)?n!=n&&e!=e:u(n,e,r,o,t,i))};},function(t,n,e){var d=e(91),b=e(94),_=e(95);t.exports=function(t,n,e,r,o,i){var u=1&e,c=t.length,a=n.length;if(c!=a&&!(u&&c<a))return !1;var s=i.get(t);if(s&&i.get(n))return s==n;var f=-1,p=!0,l=2&e?new d:void 0;for(i.set(t,n),i.set(n,t);++f<c;){var v=t[f],h=n[f];if(r)var y=u?r(h,v,f,n,t,i):r(v,h,f,t,n,i);if(void 0!==y){if(y)continue;p=!1;break}if(l){if(!b(n,function(t,n){if(!_(l,n)&&(v===t||o(v,t,e,r,i)))return l.push(n)})){p=!1;break}}else if(v!==h&&!o(v,h,e,r,i)){p=!1;break}}return i.delete(t),i.delete(n),p};},function(t,n,e){var r=e(5);t.exports=function(t){return t==t&&!r(t)};},function(t,n){t.exports=function(n,e){return function(t){return null!=t&&(t[n]===e&&(void 0!==e||n in Object(t)))}};},function(t,n,e){var o=e(21),i=e(6);t.exports=function(t,n){for(var e=0,r=(n=o(n,t)).length;null!=t&&e<r;)t=t[i(n[e++])];return e&&e==r?t:void 0};},function(t,n,e){var o=e(41),i=e(42),u=e(61),c=e(0),a=e(127);t.exports=function(t,n,e){var r=c(t)?o:i;return e&&a(t,n,e)&&(n=void 0),r(t,u(n,3))};},function(t,n,e){var h,y,d=e(133),b=e(134),_=0,g=0;t.exports=function(t,n,e){var r=n&&e||0,o=n||[],i=(t=t||{}).node||h,u=void 0!==t.clockseq?t.clockseq:y;if(null==i||null==u){var c=d();null==i&&(i=h=[1|c[0],c[1],c[2],c[3],c[4],c[5]]),null==u&&(u=y=16383&(c[6]<<8|c[7]));}var a=void 0!==t.msecs?t.msecs:(new Date).getTime(),s=void 0!==t.nsecs?t.nsecs:g+1,f=a-_+(s-g)/1e4;if(f<0&&void 0===t.clockseq&&(u=u+1&16383),(f<0||_<a)&&void 0===t.nsecs&&(s=0),1e4<=s)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");_=a,y=u;var p=(1e4*(268435455&(a+=122192928e5))+(g=s))%4294967296;o[r++]=p>>>24&255,o[r++]=p>>>16&255,o[r++]=p>>>8&255,o[r++]=255&p;var l=a/4294967296*1e4&268435455;o[r++]=l>>>8&255,o[r++]=255&l,o[r++]=l>>>24&15|16,o[r++]=l>>>16&255,o[r++]=u>>>8|128,o[r++]=255&u;for(var v=0;v<6;++v)o[r+v]=i[v];return n||b(o)};},function(t,n){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(!n(t[e],e,t))return !1;return !0};},function(t,n,e){var i=e(43);t.exports=function(t,r){var o=!0;return i(t,function(t,n,e){return o=!!r(t,n,e)}),o};},function(t,n,e){var r=e(44),o=e(60)(r);t.exports=o;},function(t,n,e){var r=e(45),o=e(16);t.exports=function(t,n){return t&&r(t,n,o)};},function(t,n,e){var r=e(46)();t.exports=r;},function(t,n){t.exports=function(a){return function(t,n,e){for(var r=-1,o=Object(t),i=e(t),u=i.length;u--;){var c=i[a?u:++r];if(!1===n(o[c],c,o))break}return t}};},function(t,n,e){var f=e(48),p=e(25),l=e(0),v=e(27),h=e(8),y=e(29),d=Object.prototype.hasOwnProperty;t.exports=function(t,n){var e=l(t),r=!e&&p(t),o=!e&&!r&&v(t),i=!e&&!r&&!o&&y(t),u=e||r||o||i,c=u?f(t.length,String):[],a=c.length;for(var s in t)!n&&!d.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||h(s,a))||c.push(s);return c};},function(t,n){t.exports=function(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r};},function(t,n,e){var r=e(3),o=e(4);t.exports=function(t){return o(t)&&"[object Arguments]"==r(t)};},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")();}catch(t){"object"==typeof window&&(e=window);}t.exports=e;},function(t,n,e){var r=e(7),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,c=r?r.toStringTag:void 0;t.exports=function(t){var n=i.call(t,c),e=t[c];try{var r=!(t[c]=void 0);}catch(t){}var o=u.call(t);return r&&(n?t[c]=e:delete t[c]),o};},function(t,n){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)};},function(t,n){t.exports=function(){return !1};},function(t,n,e){var r=e(3),o=e(17),i=e(4),u={};u["[object Float32Array]"]=u["[object Float64Array]"]=u["[object Int8Array]"]=u["[object Int16Array]"]=u["[object Int32Array]"]=u["[object Uint8Array]"]=u["[object Uint8ClampedArray]"]=u["[object Uint16Array]"]=u["[object Uint32Array]"]=!0,u["[object Arguments]"]=u["[object Array]"]=u["[object ArrayBuffer]"]=u["[object Boolean]"]=u["[object DataView]"]=u["[object Date]"]=u["[object Error]"]=u["[object Function]"]=u["[object Map]"]=u["[object Number]"]=u["[object Object]"]=u["[object RegExp]"]=u["[object Set]"]=u["[object String]"]=u["[object WeakMap]"]=!1,t.exports=function(t){return i(t)&&o(t.length)&&!!u[r(t)]};},function(t,n){t.exports=function(n){return function(t){return n(t)}};},function(t,u,c){(function(t){var n=c(26),e=u&&!u.nodeType&&u,r=e&&"object"==typeof t&&t&&!t.nodeType&&t,o=r&&r.exports===e&&n.process,i=function(){try{var t=r&&r.require&&r.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=i;}).call(this,c(28)(t));},function(t,n,e){var r=e(58),o=e(59),i=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var n=[];for(var e in Object(t))i.call(t,e)&&"constructor"!=e&&n.push(e);return n};},function(t,n){var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)};},function(t,n,e){var r=e(30)(Object.keys,Object);t.exports=r;},function(t,n,e){var c=e(18);t.exports=function(i,u){return function(t,n){if(null==t)return t;if(!c(t))return i(t,n);for(var e=t.length,r=u?e:-1,o=Object(t);(u?r--:++r<e)&&!1!==n(o[r],r,o););return t}};},function(t,n,e){var r=e(62),o=e(113),i=e(123),u=e(0),c=e(124);t.exports=function(t){return "function"==typeof t?t:null==t?i:"object"==typeof t?u(t)?o(t[0],t[1]):r(t):c(t)};},function(t,n,e){var r=e(63),o=e(112),i=e(37);t.exports=function(n){var e=o(n);return 1==e.length&&e[0][2]?i(e[0][0],e[0][1]):function(t){return t===n||r(t,n,e)}};},function(t,n,e){var v=e(32),h=e(34);t.exports=function(t,n,e,r){var o=e.length,i=o,u=!r;if(null==t)return !i;for(t=Object(t);o--;){var c=e[o];if(u&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return !1}for(;++o<i;){var a=(c=e[o])[0],s=t[a],f=c[1];if(u&&c[2]){if(void 0===s&&!(a in t))return !1}else {var p=new v;if(r)var l=r(s,f,a,t,n,p);if(!(void 0===l?h(f,s,3,r,p):l))return !1}}return !0};},function(t,n){t.exports=function(){this.__data__=[],this.size=0;};},function(t,n,e){var r=e(10),o=Array.prototype.splice;t.exports=function(t){var n=this.__data__,e=r(n,t);return !(e<0)&&(e==n.length-1?n.pop():o.call(n,e,1),--this.size,!0)};},function(t,n,e){var r=e(10);t.exports=function(t){var n=this.__data__,e=r(n,t);return e<0?void 0:n[e][1]};},function(t,n,e){var r=e(10);t.exports=function(t){return -1<r(this.__data__,t)};},function(t,n,e){var o=e(10);t.exports=function(t,n){var e=this.__data__,r=o(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this};},function(t,n,e){var r=e(9);t.exports=function(){this.__data__=new r,this.size=0;};},function(t,n){t.exports=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e};},function(t,n){t.exports=function(t){return this.__data__.get(t)};},function(t,n){t.exports=function(t){return this.__data__.has(t)};},function(t,n,e){var o=e(9),i=e(19),u=e(20);t.exports=function(t,n){var e=this.__data__;if(e instanceof o){var r=e.__data__;if(!i||r.length<199)return r.push([t,n]),this.size=++e.size,this;e=this.__data__=new u(r);}return e.set(t,n),this.size=e.size,this};},function(t,n,e){var r=e(31),o=e(75),i=e(5),u=e(33),c=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,f=a.toString,p=s.hasOwnProperty,l=RegExp("^"+f.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return !(!i(t)||o(t))&&(r(t)?l:c).test(u(t))};},function(t,n,e){var r,o=e(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,n,e){var r=e(1)["__core-js_shared__"];t.exports=r;},function(t,n){t.exports=function(t,n){return null==t?void 0:t[n]};},function(t,n,e){var r=e(79),o=e(9),i=e(19);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r};};},function(t,n,e){var r=e(80),o=e(81),i=e(82),u=e(83),c=e(84);function a(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1]);}}a.prototype.clear=r,a.prototype.delete=o,a.prototype.get=i,a.prototype.has=u,a.prototype.set=c,t.exports=a;},function(t,n,e){var r=e(12);t.exports=function(){this.__data__=r?r(null):{},this.size=0;};},function(t,n){t.exports=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n};},function(t,n,e){var r=e(12),o=Object.prototype.hasOwnProperty;t.exports=function(t){var n=this.__data__;if(r){var e=n[t];return "__lodash_hash_undefined__"===e?void 0:e}return o.call(n,t)?n[t]:void 0};},function(t,n,e){var r=e(12),o=Object.prototype.hasOwnProperty;t.exports=function(t){var n=this.__data__;return r?void 0!==n[t]:o.call(n,t)};},function(t,n,e){var r=e(12);t.exports=function(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=r&&void 0===n?"__lodash_hash_undefined__":n,this};},function(t,n,e){var r=e(13);t.exports=function(t){var n=r(this,t).delete(t);return this.size-=n?1:0,n};},function(t,n){t.exports=function(t){var n=typeof t;return "string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t};},function(t,n,e){var r=e(13);t.exports=function(t){return r(this,t).get(t)};},function(t,n,e){var r=e(13);t.exports=function(t){return r(this,t).has(t)};},function(t,n,e){var o=e(13);t.exports=function(t,n){var e=o(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this};},function(t,n,e){var y=e(32),d=e(35),b=e(96),_=e(100),g=e(107),x=e(0),j=e(27),m=e(29),w="[object Arguments]",O="[object Array]",A="[object Object]",P=Object.prototype.hasOwnProperty;t.exports=function(t,n,e,r,o,i){var u=x(t),c=x(n),a=u?O:g(t),s=c?O:g(n),f=(a=a==w?A:a)==A,p=(s=s==w?A:s)==A,l=a==s;if(l&&j(t)){if(!j(n))return !1;f=!(u=!0);}if(l&&!f)return i=i||new y,u||m(t)?d(t,n,e,r,o,i):b(t,n,a,e,r,o,i);if(!(1&e)){var v=f&&P.call(t,"__wrapped__"),h=p&&P.call(n,"__wrapped__");if(v||h)return o(v?t.value():t,h?n.value():n,e,r,i=i||new y)}return l&&(i=i||new y,_(t,n,e,r,o,i))};},function(t,n,e){var r=e(20),o=e(92),i=e(93);function u(t){var n=-1,e=null==t?0:t.length;for(this.__data__=new r;++n<e;)this.add(t[n]);}u.prototype.add=u.prototype.push=o,u.prototype.has=i,t.exports=u;},function(t,n){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};},function(t,n){t.exports=function(t){return this.__data__.has(t)};},function(t,n){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(n(t[e],e,t))return !0;return !1};},function(t,n){t.exports=function(t,n){return t.has(n)};},function(t,n,e){var r=e(7),p=e(97),l=e(11),v=e(35),h=e(98),y=e(99),o=r?r.prototype:void 0,d=o?o.valueOf:void 0;t.exports=function(t,n,e,r,o,i,u){switch(e){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return !1;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":return !(t.byteLength!=n.byteLength||!i(new p(t),new p(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return l(+t,+n);case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var c=h;case"[object Set]":var a=1&r;if(c=c||y,t.size!=n.size&&!a)return !1;var s=u.get(t);if(s)return s==n;r|=2,u.set(t,n);var f=v(c(t),c(n),r,o,i,u);return u.delete(t),f;case"[object Symbol]":if(d)return d.call(t)==d.call(n)}return !1};},function(t,n,e){var r=e(1).Uint8Array;t.exports=r;},function(t,n){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t];}),r};},function(t,n){t.exports=function(t){var n=-1,e=Array(t.size);return t.forEach(function(t){e[++n]=t;}),e};},function(t,n,e){var g=e(101),x=Object.prototype.hasOwnProperty;t.exports=function(t,n,e,r,o,i){var u=1&e,c=g(t),a=c.length;if(a!=g(n).length&&!u)return !1;for(var s=a;s--;){var f=c[s];if(!(u?f in n:x.call(n,f)))return !1}var p=i.get(t);if(p&&i.get(n))return p==n;var l=!0;i.set(t,n),i.set(n,t);for(var v=u;++s<a;){var h=t[f=c[s]],y=n[f];if(r)var d=u?r(y,h,f,n,t,i):r(h,y,f,t,n,i);if(!(void 0===d?h===y||o(h,y,e,r,i):d)){l=!1;break}v=v||"constructor"==f;}if(l&&!v){var b=t.constructor,_=n.constructor;b!=_&&"constructor"in t&&"constructor"in n&&!("function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _)&&(l=!1);}return i.delete(t),i.delete(n),l};},function(t,n,e){var r=e(102),o=e(104),i=e(16);t.exports=function(t){return r(t,i,o)};},function(t,n,e){var o=e(103),i=e(0);t.exports=function(t,n,e){var r=n(t);return i(t)?r:o(r,e(t))};},function(t,n){t.exports=function(t,n){for(var e=-1,r=n.length,o=t.length;++e<r;)t[o+e]=n[e];return t};},function(t,n,e){var r=e(105),o=e(106),i=Object.prototype.propertyIsEnumerable,u=Object.getOwnPropertySymbols,c=u?function(n){return null==n?[]:(n=Object(n),r(u(n),function(t){return i.call(n,t)}))}:o;t.exports=c;},function(t,n){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length,o=0,i=[];++e<r;){var u=t[e];n(u,e,t)&&(i[o++]=u);}return i};},function(t,n){t.exports=function(){return []};},function(t,n,e){var r=e(108),o=e(19),i=e(109),u=e(110),c=e(111),a=e(3),s=e(33),f="[object Map]",p="[object Promise]",l="[object Set]",v="[object WeakMap]",h="[object DataView]",y=s(r),d=s(o),b=s(i),_=s(u),g=s(c),x=a;(r&&x(new r(new ArrayBuffer(1)))!=h||o&&x(new o)!=f||i&&x(i.resolve())!=p||u&&x(new u)!=l||c&&x(new c)!=v)&&(x=function(t){var n=a(t),e="[object Object]"==n?t.constructor:void 0,r=e?s(e):"";if(r)switch(r){case y:return h;case d:return f;case b:return p;case _:return l;case g:return v}return n}),t.exports=x;},function(t,n,e){var r=e(2)(e(1),"DataView");t.exports=r;},function(t,n,e){var r=e(2)(e(1),"Promise");t.exports=r;},function(t,n,e){var r=e(2)(e(1),"Set");t.exports=r;},function(t,n,e){var r=e(2)(e(1),"WeakMap");t.exports=r;},function(t,n,e){var i=e(36),u=e(16);t.exports=function(t){for(var n=u(t),e=n.length;e--;){var r=n[e],o=t[r];n[e]=[r,o,i(o)];}return n};},function(t,n,e){var o=e(34),i=e(14),u=e(120),c=e(22),a=e(36),s=e(37),f=e(6);t.exports=function(e,r){return c(e)&&a(r)?s(f(e),r):function(t){var n=i(t,e);return void 0===n&&n===r?u(t,e):o(r,n,3)}};},function(t,n,e){var r=e(115),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g,o=r(function(t){var o=[];return 46===t.charCodeAt(0)&&o.push(""),t.replace(i,function(t,n,e,r){o.push(e?r.replace(u,"$1"):n||t);}),o});t.exports=o;},function(t,n,e){var r=e(116);t.exports=function(t){var n=r(t,function(t){return 500===e.size&&e.clear(),t}),e=n.cache;return n};},function(t,n,e){var r=e(20),c="Expected a function";function a(o,i){if("function"!=typeof o||null!=i&&"function"!=typeof i)throw new TypeError(c);var u=function(){var t=arguments,n=i?i.apply(this,t):t[0],e=u.cache;if(e.has(n))return e.get(n);var r=o.apply(this,t);return u.cache=e.set(n,r)||e,r};return u.cache=new(a.Cache||r),u}a.Cache=r,t.exports=a;},function(t,n,e){var r=e(118);t.exports=function(t){return null==t?"":r(t)};},function(t,n,e){var r=e(7),o=e(119),i=e(0),u=e(23),c=1/0,a=r?r.prototype:void 0,s=a?a.toString:void 0;t.exports=function t(n){if("string"==typeof n)return n;if(i(n))return o(n,t)+"";if(u(n))return s?s.call(n):"";var e=n+"";return "0"==e&&1/n==-c?"-0":e};},function(t,n){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length,o=Array(r);++e<r;)o[e]=n(t[e],e,t);return o};},function(t,n,e){var r=e(121),o=e(122);t.exports=function(t,n){return null!=t&&o(t,n,r)};},function(t,n){t.exports=function(t,n){return null!=t&&n in Object(t)};},function(t,n,e){var c=e(21),a=e(25),s=e(0),f=e(8),p=e(17),l=e(6);t.exports=function(t,n,e){for(var r=-1,o=(n=c(n,t)).length,i=!1;++r<o;){var u=l(n[r]);if(!(i=null!=t&&e(t,u)))break;t=t[u];}return i||++r!=o?i:!!(o=null==t?0:t.length)&&p(o)&&f(u,o)&&(s(t)||a(t))};},function(t,n){t.exports=function(t){return t};},function(t,n,e){var r=e(125),o=e(126),i=e(22),u=e(6);t.exports=function(t){return i(t)?r(u(t)):o(t)};},function(t,n){t.exports=function(n){return function(t){return null==t?void 0:t[n]}};},function(t,n,e){var r=e(38);t.exports=function(n){return function(t){return r(t,n)}};},function(t,n,e){var o=e(11),i=e(18),u=e(8),c=e(5);t.exports=function(t,n,e){if(!c(e))return !1;var r=typeof n;return !!("number"==r?i(e)&&u(n,e.length):"string"==r&&n in e)&&o(e[n],t)};},function(t,n,e){var r=e(30)(Object.getPrototypeOf,Object);t.exports=r;},function(t,n,e){var p=e(130),l=e(21),v=e(8),h=e(5),y=e(6);t.exports=function(t,n,e,r){if(!h(t))return t;for(var o=-1,i=(n=l(n,t)).length,u=i-1,c=t;null!=c&&++o<i;){var a=y(n[o]),s=e;if(o!=u){var f=c[a];void 0===(s=r?r(f,a,c):void 0)&&(s=h(f)?f:v(n[o+1])?[]:{});}p(c,a,s),c=c[a];}return t};},function(t,n,e){var o=e(131),i=e(11),u=Object.prototype.hasOwnProperty;t.exports=function(t,n,e){var r=t[n];u.call(t,n)&&i(r,e)&&(void 0!==e||n in t)||o(t,n,e);};},function(t,n,e){var r=e(132);t.exports=function(t,n,e){"__proto__"==n&&r?r(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e;};},function(t,n,e){var r=e(2),o=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=o;},function(t,n){var e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(e){var r=new Uint8Array(16);t.exports=function(){return e(r),r};}else {var o=new Array(16);t.exports=function(){for(var t,n=0;n<16;n++)0==(3&n)&&(t=4294967296*Math.random()),o[n]=t>>>((3&n)<<3)&255;return o};}},function(t,n){for(var o=[],e=0;e<256;++e)o[e]=(e+256).toString(16).substr(1);t.exports=function(t,n){var e=n||0,r=o;return [r[t[e++]],r[t[e++]],r[t[e++]],r[t[e++]],"-",r[t[e++]],r[t[e++]],"-",r[t[e++]],r[t[e++]],"-",r[t[e++]],r[t[e++]],"-",r[t[e++]],r[t[e++]],r[t[e++]],r[t[e++]],r[t[e++]],r[t[e++]]].join("")};},function(t,n,e){e.r(n);var r=e(39),a=e.n(r),o=e(0),s=e.n(o),i=e(15),f=e.n(i);var u=e(14),p=e.n(u),c=e(24),l=e.n(c),v=e(40),h=e.n(v);function y(t){return function(t){if(Array.isArray(t)){for(var n=0,e=new Array(t.length);n<t.length;n++)e[n]=t[n];return e}}(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 d(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r);}}function b(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}e.d(n,"default",function(){return m});var _,g,j="__FUNCTION__",m=(_=w,(g=[{key:"_handleQueue",value:function(){var r=this;this._queue.forEach(function(t){var n=t.message,e=t.msgChan;r._target.postMessage(n,r._targetOrigin,[e.port2]);}),this._queue=[];}},{key:"_publish",value:function(e){var t=e.data,n=t.type,r=t.data,o=t.meta,i=this._parseFunction(n,r,o.functionKeys),u=(this._subscribers[n]||[]).map(function(t){return function(o){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return new Promise(function(t,n){try{var e=o.apply(void 0,r);e&&e.then?e.then(t).catch(n):t(e);}catch(t){n(t);}})}}(t)(i,e.data,e).then(function(t){if(t)return {type:n,data:t}}).catch(function(t){return {type:n,error:t.message}})});Promise.all(u).then(function(t){t=t.filter(function(t){return !!t});var n={};t.forEach(function(t){Object.assign(n,t);}),e.ports[0].postMessage(n);});}},{key:"_subscribeFunction",value:function(t,n){this.unsubscribe(t),this.subscribe(t,function(t){return n.apply(void 0,y(t))});}},{key:"_stringifyFunction",value:function(i,r,t){var u=this,c=2<arguments.length&&void 0!==t?t:[];if(c&&0!==c.length)return c.forEach(function(t){var n=p()(r,t),e="".concat(j).concat(i,"_").concat(t);u._subscribeFunction(e,n),l()(r,t,e);}),{data:r,keys:c};if("function"!=typeof r)return function r(o,i,t){var u=2<arguments.length&&void 0!==t?t:"";return a()(o,function(t,n){var e="".concat(u,"[").concat(n,"]");return "number"!=typeof n&&(e=u?"".concat(u,".").concat(n):"".concat(n)),!1===i(t,n,o,e)||!f()(t)&&!s()(t)||r(t,i,e)})}(r,function(t,n,e,r){if("function"==typeof t){var o="".concat(j).concat(i,"_").concat(r);u._subscribeFunction(o,t),e[n]=o,c.push(r);}}),{data:r,keys:c};var n="".concat(j).concat(i);return this._subscribeFunction(n,r),{data:n,keys:[""]}}},{key:"_parseFunction",value:function(e,o,t){var i=this,n=2<arguments.length&&void 0!==t?t:[];return 0===n.length?o:1===n.length&&""===n[0]?function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return i.postMessage(o,n)}:(n.forEach(function(t){var n=t.replace("".concat(j).concat(e,"_"),""),r=p()(o,n);l()(o,n,function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return i.postMessage(r,n)});}),o)}},{key:"_subscribe",value:function(e,t){var r=this;this._subscribers[e]||(this._subscribers[e]=[]);var o=this._subscribers[e];t.forEach(function(t){if(o.includes(t)||o.push(t),"connect"===e&&r._isTargetReady){var n={source:r._target};t(n.data,n);}});}},{key:"subscribe",value:function(e,t){var r=this;"string"!=typeof e&&!f()(e)||"string"==typeof e&&!t||("string"==typeof e&&(e=b({},e,t)),Object.keys(e).forEach(function(t){var n=e[t];"function"==typeof n&&(n=[n]),r._subscribe(t,n);}));}},{key:"unsubscribe",value:function(t,n){if(void 0!==t){var e=this._subscribers[t]||[];if(void 0!==n){var r=e.indexOf(n);-1<r&&e.splice(r,1);}else this._subscribers[t]=[];}else this._subscribers={};}},{key:"postMessage",value:function(a,s,t){var f=this,p=2<arguments.length&&void 0!==t?t:{};return new Promise(function(o,i){var t=new MessageChannel;t.port1.onmessage=function(t){var n=t.data,e=n.data,r=n.error;r?i(new Error(r)):o(e);};var n={type:a,data:s,meta:{id:f._id}},e=p.hasFunction,r=p.functionKeys,u=void 0===r?[]:r;if(!0===e){var c=f._stringifyFunction(a,s,u);n.data=c.data,n.meta.functionKeys=c.keys;}f._isTargetReady||"pre_connect"===a?f._target.postMessage(n,f._targetOrigin,[t.port2]):f._queue.push({message:n,msgChan:t});})}},{key:"_preConnect",value:function(){function t(){i++,r.postMessage("pre_connect",r._id).then(function(t){e&&(clearTimeout(e),e=void 0),o[0]&&(o[0](t),o=[]);}).catch(function(t){e&&(clearTimeout(e),e=void 0),o[1]&&(o[1](t),o=[]);});}var e,r=this,o=[],i=0,n=new Promise(function(t,n){o[0]=t,o[1]=n;});return t(),function t(n){!r._isTargetReady&&i>=r._maxAttempts?o[1]&&(o[1](new Error("Exceed the max attempts, connect failed.")),o=[]):e=setTimeout(function(){n(),t(n);},r._attemptInterval);}(t),n}},{key:"connect",value:function(){var n=this;return this._target?this._isTargetReady?Promise.resolve("Target has already connected."):this._preConnect().then(function(t){return n._targetId=t,n._isTargetReady=!0,n._handleQueue(),n.postMessage("connect")}).catch(function(t){throw n._isTargetReady=!1,t}):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);}}])&&d(_.prototype,g),w);function w(){var o=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,w),b(this,"_handleMessage",function(t){if(t.origin===o._targetOrigin||"*"===o._targetOrigin){var n=t.data,e=n.type,r=n.meta;"pre_connect"!==e&&(void 0===r?{}:r).id!==o._targetId||o._publish(t);}}),b(this,"_handlePreConnect",function(t,n,e){var r=e.source;if(o._target&&o._target!==r)throw new Error("Connection is rejected.");return o._target=r,o._targetId=t,o._id}),b(this,"_handleConnect",function(t,n,e){o._isTargetReady=!0,o._handleQueue();});var n=t.targetOrigin,e=void 0===n?"":n,r=t.subscribers,i=void 0===r?{}:r,u=t.target,c=t.attemptInterval,a=void 0===c?1e3:c,s=t.maxAttempts,f=void 0===s?10:s;if(u===window)throw new Error("The target can not be current window.");this._subscribers=i,this._targetOrigin=e,this._target=u,this._queue=[],this._isTargetReady=!1,this._id=h()(),this._targetId="",this._attemptInterval=a,this._maxAttempts=f,this.subscribe("pre_connect",this._handlePreConnect),this.subscribe("connect",this._handleConnect),window.addEventListener("message",this._handleMessage,!1),window.addEventListener("beforeunload",function(){o.destory();});}}],o.c=r,o.d=function(t,n,e){o.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:e});},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0});},o.t=function(n,t){if(1&t&&(n=o(n)),8&t)return n;if(4&t&&"object"==typeof n&&n&&n.__esModule)return n;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:n}),2&t&&"string"!=typeof n)for(var r in n)o.d(e,r,function(t){return n[t]}.bind(null,r));return e},o.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(n,"a",n),n},o.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},o.p="",o(o.s=135);function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}var e,r;});
|
|
249
|
-
}(lib));
|
|
250
|
-
|
|
251
|
-
var Channel = /*@__PURE__*/getDefaultExportFromCjs(lib.exports);
|
|
252
|
-
|
|
253
|
-
var dec2hex = function dec2hex(dec) {
|
|
254
|
-
return dec.toString(16).padStart(2, "0");
|
|
255
|
-
}; // generateId :: Integer -> String
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
function generateCallId() {
|
|
259
|
-
var arr = new Uint8Array((10 ) / 2);
|
|
260
|
-
window.crypto.getRandomValues(arr);
|
|
261
|
-
return Array.from(arr, dec2hex).join('');
|
|
262
|
-
}
|
|
263
|
-
var BaseCallClass = /*#__PURE__*/function () {
|
|
264
|
-
function BaseCallClass(call) {
|
|
265
|
-
var _this = this;
|
|
266
|
-
|
|
267
|
-
_classCallCheck(this, BaseCallClass);
|
|
268
|
-
|
|
269
|
-
_defineProperty(this, "serviceName", '');
|
|
270
|
-
|
|
271
|
-
_defineProperty(this, "call", void 0);
|
|
272
|
-
|
|
273
|
-
this.call = function (fun) {
|
|
274
|
-
for (var _len = arguments.length, arg = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
275
|
-
arg[_key - 1] = arguments[_key];
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
return call.apply(void 0, [_this.serviceName, fun].concat(arg));
|
|
279
|
-
};
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
_createClass(BaseCallClass, [{
|
|
283
|
-
key: "update",
|
|
284
|
-
value: function update(payload) {
|
|
285
|
-
var attributes = payload[this.serviceName];
|
|
286
|
-
|
|
287
|
-
if (attributes) {
|
|
288
|
-
BaseCallClass.update(this, attributes);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
}], [{
|
|
292
|
-
key: "update",
|
|
293
|
-
value: function update(target, payload) {
|
|
294
|
-
Object.keys(payload).forEach(function (key) {
|
|
295
|
-
target[key] = payload[key];
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
}]);
|
|
299
|
-
|
|
300
|
-
return BaseCallClass;
|
|
301
|
-
}();
|
|
302
|
-
var ContextCallClass = /*#__PURE__*/function (_BaseCallClass) {
|
|
303
|
-
_inherits(ContextCallClass, _BaseCallClass);
|
|
304
|
-
|
|
305
|
-
var _super = _createSuper(ContextCallClass);
|
|
306
|
-
|
|
307
|
-
function ContextCallClass() {
|
|
308
|
-
var _this2;
|
|
309
|
-
|
|
310
|
-
_classCallCheck(this, ContextCallClass);
|
|
311
|
-
|
|
312
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
313
|
-
args[_key2] = arguments[_key2];
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
_this2 = _super.call.apply(_super, [this].concat(args));
|
|
317
|
-
|
|
318
|
-
_defineProperty(_assertThisInitialized(_this2), "serviceName", 'context');
|
|
319
|
-
|
|
320
|
-
return _this2;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
return _createClass(ContextCallClass);
|
|
324
|
-
}(BaseCallClass);
|
|
325
|
-
|
|
326
|
-
var AddToCartContext$1 = /*#__PURE__*/function (_ContextCallClass) {
|
|
327
|
-
_inherits(AddToCartContext, _ContextCallClass);
|
|
328
|
-
|
|
329
|
-
var _super = _createSuper(AddToCartContext);
|
|
330
|
-
|
|
331
|
-
function AddToCartContext() {
|
|
332
|
-
var _this;
|
|
333
|
-
|
|
334
|
-
_classCallCheck(this, AddToCartContext);
|
|
335
|
-
|
|
336
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
337
|
-
args[_key] = arguments[_key];
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
341
|
-
|
|
342
|
-
_defineProperty(_assertThisInitialized(_this), "productId", void 0);
|
|
343
|
-
|
|
344
|
-
_defineProperty(_assertThisInitialized(_this), "cartId", void 0);
|
|
345
|
-
|
|
346
|
-
_defineProperty(_assertThisInitialized(_this), "offerId", void 0);
|
|
347
|
-
|
|
348
|
-
_defineProperty(_assertThisInitialized(_this), "warehouses", void 0);
|
|
349
|
-
|
|
350
|
-
_defineProperty(_assertThisInitialized(_this), "warehouseId", void 0);
|
|
351
|
-
|
|
352
|
-
_defineProperty(_assertThisInitialized(_this), "meta", void 0);
|
|
353
|
-
|
|
354
|
-
_defineProperty(_assertThisInitialized(_this), "pluginProductLines", void 0);
|
|
355
|
-
|
|
356
|
-
_defineProperty(_assertThisInitialized(_this), "productLines", void 0);
|
|
357
|
-
|
|
358
|
-
_defineProperty(_assertThisInitialized(_this), "productAmount", void 0);
|
|
359
|
-
|
|
360
|
-
return _this;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
_createClass(AddToCartContext, [{
|
|
364
|
-
key: "closePlugin",
|
|
365
|
-
value: function closePlugin() {
|
|
366
|
-
return this.call('closePlugin');
|
|
367
|
-
}
|
|
368
|
-
}, {
|
|
369
|
-
key: "closePluginAndAddToCart",
|
|
370
|
-
value: function closePluginAndAddToCart() {
|
|
371
|
-
return this.call('closePluginAndAddToCart');
|
|
372
|
-
}
|
|
373
|
-
}, {
|
|
374
|
-
key: "closePluginAndRefreshCart",
|
|
375
|
-
value: function closePluginAndRefreshCart() {
|
|
376
|
-
return this.call('closePluginAndRefreshCart');
|
|
377
|
-
}
|
|
378
|
-
}]);
|
|
379
|
-
|
|
380
|
-
return AddToCartContext;
|
|
381
|
-
}(ContextCallClass);
|
|
382
|
-
var DocumentsContext = /*#__PURE__*/function (_ContextCallClass2) {
|
|
383
|
-
_inherits(DocumentsContext, _ContextCallClass2);
|
|
384
|
-
|
|
385
|
-
var _super2 = _createSuper(DocumentsContext);
|
|
386
|
-
|
|
387
|
-
function DocumentsContext() {
|
|
388
|
-
var _this2;
|
|
389
|
-
|
|
390
|
-
_classCallCheck(this, DocumentsContext);
|
|
391
|
-
|
|
392
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
393
|
-
args[_key2] = arguments[_key2];
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
_this2 = _super2.call.apply(_super2, [this].concat(args));
|
|
397
|
-
|
|
398
|
-
_defineProperty(_assertThisInitialized(_this2), "orderDetails", void 0);
|
|
399
|
-
|
|
400
|
-
_defineProperty(_assertThisInitialized(_this2), "invoiceDetails", void 0);
|
|
401
|
-
|
|
402
|
-
_defineProperty(_assertThisInitialized(_this2), "selectedInvoices", void 0);
|
|
403
|
-
|
|
404
|
-
_defineProperty(_assertThisInitialized(_this2), "clientContextId", void 0);
|
|
405
|
-
|
|
406
|
-
_defineProperty(_assertThisInitialized(_this2), "operatorId", void 0);
|
|
407
|
-
|
|
408
|
-
_defineProperty(_assertThisInitialized(_this2), "meta", void 0);
|
|
409
|
-
|
|
410
|
-
return _this2;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
_createClass(DocumentsContext, [{
|
|
414
|
-
key: "closePlugin",
|
|
415
|
-
value: function closePlugin() {
|
|
416
|
-
return this.call('closePlugin');
|
|
417
|
-
}
|
|
418
|
-
}, {
|
|
419
|
-
key: "closePluginAndRefreshView",
|
|
420
|
-
value: function closePluginAndRefreshView() {
|
|
421
|
-
return this.call('closePluginAndRefreshView');
|
|
422
|
-
}
|
|
423
|
-
}]);
|
|
424
|
-
|
|
425
|
-
return DocumentsContext;
|
|
426
|
-
}(ContextCallClass);
|
|
427
|
-
var EditProductLinesOnCartContext$1 = /*#__PURE__*/function (_ContextCallClass3) {
|
|
428
|
-
_inherits(EditProductLinesOnCartContext, _ContextCallClass3);
|
|
429
|
-
|
|
430
|
-
var _super3 = _createSuper(EditProductLinesOnCartContext);
|
|
431
|
-
|
|
432
|
-
function EditProductLinesOnCartContext() {
|
|
433
|
-
var _this3;
|
|
434
|
-
|
|
435
|
-
_classCallCheck(this, EditProductLinesOnCartContext);
|
|
436
|
-
|
|
437
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
438
|
-
args[_key3] = arguments[_key3];
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
_this3 = _super3.call.apply(_super3, [this].concat(args));
|
|
442
|
-
|
|
443
|
-
_defineProperty(_assertThisInitialized(_this3), "productId", void 0);
|
|
444
|
-
|
|
445
|
-
_defineProperty(_assertThisInitialized(_this3), "cartId", void 0);
|
|
446
|
-
|
|
447
|
-
_defineProperty(_assertThisInitialized(_this3), "offerId", void 0);
|
|
448
|
-
|
|
449
|
-
_defineProperty(_assertThisInitialized(_this3), "warehouses", void 0);
|
|
450
|
-
|
|
451
|
-
_defineProperty(_assertThisInitialized(_this3), "warehouseId", void 0);
|
|
452
|
-
|
|
453
|
-
_defineProperty(_assertThisInitialized(_this3), "meta", void 0);
|
|
454
|
-
|
|
455
|
-
_defineProperty(_assertThisInitialized(_this3), "productLineId", void 0);
|
|
456
|
-
|
|
457
|
-
_defineProperty(_assertThisInitialized(_this3), "productLines", void 0);
|
|
458
|
-
|
|
459
|
-
_defineProperty(_assertThisInitialized(_this3), "pluginProductLines", void 0);
|
|
460
|
-
|
|
461
|
-
_defineProperty(_assertThisInitialized(_this3), "productAmount", void 0);
|
|
462
|
-
|
|
463
|
-
return _this3;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
_createClass(EditProductLinesOnCartContext, [{
|
|
467
|
-
key: "closePlugin",
|
|
468
|
-
value: function closePlugin() {
|
|
469
|
-
return this.call('closePlugin');
|
|
470
|
-
}
|
|
471
|
-
}, {
|
|
472
|
-
key: "closePluginAndRefreshCart",
|
|
473
|
-
value: function closePluginAndRefreshCart() {
|
|
474
|
-
return this.call('closePluginAndRefreshCart');
|
|
475
|
-
}
|
|
476
|
-
}]);
|
|
477
|
-
|
|
478
|
-
return EditProductLinesOnCartContext;
|
|
479
|
-
}(ContextCallClass);
|
|
480
|
-
|
|
481
|
-
var BackofficeCatalog = /*#__PURE__*/function (_BaseCallClass) {
|
|
482
|
-
_inherits(BackofficeCatalog, _BaseCallClass);
|
|
483
|
-
|
|
484
|
-
var _super = _createSuper(BackofficeCatalog);
|
|
485
|
-
|
|
486
|
-
function BackofficeCatalog() {
|
|
487
|
-
var _this;
|
|
488
|
-
|
|
489
|
-
_classCallCheck(this, BackofficeCatalog);
|
|
490
|
-
|
|
491
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
492
|
-
args[_key] = arguments[_key];
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
496
|
-
|
|
497
|
-
_defineProperty(_assertThisInitialized(_this), "serviceName", 'catalog');
|
|
498
|
-
|
|
499
|
-
return _this;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
_createClass(BackofficeCatalog, [{
|
|
503
|
-
key: "fetchCategories",
|
|
504
|
-
value: function fetchCategories() {
|
|
505
|
-
return this.call('fetchCategories');
|
|
506
|
-
}
|
|
507
|
-
}, {
|
|
508
|
-
key: "fetchProduct",
|
|
509
|
-
value: function fetchProduct(id) {
|
|
510
|
-
return this.call('fetchProduct', id);
|
|
511
|
-
}
|
|
512
|
-
}]);
|
|
513
|
-
|
|
514
|
-
return BackofficeCatalog;
|
|
515
|
-
}(BaseCallClass);
|
|
516
|
-
var BackofficeUser = /*#__PURE__*/function (_BaseCallClass2) {
|
|
517
|
-
_inherits(BackofficeUser, _BaseCallClass2);
|
|
518
|
-
|
|
519
|
-
var _super2 = _createSuper(BackofficeUser);
|
|
520
|
-
|
|
521
|
-
function BackofficeUser() {
|
|
522
|
-
var _this2;
|
|
523
|
-
|
|
524
|
-
_classCallCheck(this, BackofficeUser);
|
|
525
|
-
|
|
526
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
527
|
-
args[_key2] = arguments[_key2];
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
_this2 = _super2.call.apply(_super2, [this].concat(args));
|
|
531
|
-
|
|
532
|
-
_defineProperty(_assertThisInitialized(_this2), "serviceName", 'user');
|
|
533
|
-
|
|
534
|
-
_defineProperty(_assertThisInitialized(_this2), "email", void 0);
|
|
535
|
-
|
|
536
|
-
_defineProperty(_assertThisInitialized(_this2), "id", void 0);
|
|
537
|
-
|
|
538
|
-
_defineProperty(_assertThisInitialized(_this2), "name", void 0);
|
|
539
|
-
|
|
540
|
-
_defineProperty(_assertThisInitialized(_this2), "authorities", void 0);
|
|
541
|
-
|
|
542
|
-
return _this2;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
return _createClass(BackofficeUser);
|
|
546
|
-
}(BaseCallClass);
|
|
547
|
-
var BackofficeTenant = /*#__PURE__*/function (_BaseCallClass3) {
|
|
548
|
-
_inherits(BackofficeTenant, _BaseCallClass3);
|
|
549
|
-
|
|
550
|
-
var _super3 = _createSuper(BackofficeTenant);
|
|
551
|
-
|
|
552
|
-
function BackofficeTenant() {
|
|
553
|
-
var _this3;
|
|
554
|
-
|
|
555
|
-
_classCallCheck(this, BackofficeTenant);
|
|
556
|
-
|
|
557
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
558
|
-
args[_key3] = arguments[_key3];
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
_this3 = _super3.call.apply(_super3, [this].concat(args));
|
|
562
|
-
|
|
563
|
-
_defineProperty(_assertThisInitialized(_this3), "serviceName", 'tenant');
|
|
564
|
-
|
|
565
|
-
_defineProperty(_assertThisInitialized(_this3), "tenantKey", void 0);
|
|
566
|
-
|
|
567
|
-
_defineProperty(_assertThisInitialized(_this3), "language", void 0);
|
|
568
|
-
|
|
569
|
-
_defineProperty(_assertThisInitialized(_this3), "currency", void 0);
|
|
570
|
-
|
|
571
|
-
return _this3;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
return _createClass(BackofficeTenant);
|
|
575
|
-
}(BaseCallClass);
|
|
576
|
-
var BackofficeLayout = /*#__PURE__*/function (_BaseCallClass4) {
|
|
577
|
-
_inherits(BackofficeLayout, _BaseCallClass4);
|
|
578
|
-
|
|
579
|
-
var _super4 = _createSuper(BackofficeLayout);
|
|
580
|
-
|
|
581
|
-
function BackofficeLayout() {
|
|
582
|
-
var _this4;
|
|
583
|
-
|
|
584
|
-
_classCallCheck(this, BackofficeLayout);
|
|
585
|
-
|
|
586
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
587
|
-
args[_key4] = arguments[_key4];
|
|
588
|
-
}
|
|
589
|
-
|
|
590
|
-
_this4 = _super4.call.apply(_super4, [this].concat(args));
|
|
591
|
-
|
|
592
|
-
_defineProperty(_assertThisInitialized(_this4), "serviceName", 'layout');
|
|
593
|
-
|
|
594
|
-
_defineProperty(_assertThisInitialized(_this4), "isAsideOpened", void 0);
|
|
595
|
-
|
|
596
|
-
return _this4;
|
|
597
|
-
}
|
|
598
|
-
|
|
599
|
-
return _createClass(BackofficeLayout);
|
|
600
|
-
}(BaseCallClass);
|
|
601
|
-
var BackofficeAuthorization = /*#__PURE__*/function (_BaseCallClass5) {
|
|
602
|
-
_inherits(BackofficeAuthorization, _BaseCallClass5);
|
|
603
|
-
|
|
604
|
-
var _super5 = _createSuper(BackofficeAuthorization);
|
|
605
|
-
|
|
606
|
-
function BackofficeAuthorization() {
|
|
607
|
-
var _this5;
|
|
608
|
-
|
|
609
|
-
_classCallCheck(this, BackofficeAuthorization);
|
|
610
|
-
|
|
611
|
-
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
612
|
-
args[_key5] = arguments[_key5];
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
_this5 = _super5.call.apply(_super5, [this].concat(args));
|
|
616
|
-
|
|
617
|
-
_defineProperty(_assertThisInitialized(_this5), "serviceName", 'authorization');
|
|
618
|
-
|
|
619
|
-
return _this5;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
_createClass(BackofficeAuthorization, [{
|
|
623
|
-
key: "getAuthToken",
|
|
624
|
-
value: function getAuthToken() {
|
|
625
|
-
return this.call('getAuthToken');
|
|
626
|
-
}
|
|
627
|
-
}]);
|
|
628
|
-
|
|
629
|
-
return BackofficeAuthorization;
|
|
630
|
-
}(BaseCallClass);
|
|
631
|
-
var BackofficeCustomer = /*#__PURE__*/function (_BaseCallClass6) {
|
|
632
|
-
_inherits(BackofficeCustomer, _BaseCallClass6);
|
|
633
|
-
|
|
634
|
-
var _super6 = _createSuper(BackofficeCustomer);
|
|
635
|
-
|
|
636
|
-
function BackofficeCustomer() {
|
|
637
|
-
var _this6;
|
|
638
|
-
|
|
639
|
-
_classCallCheck(this, BackofficeCustomer);
|
|
640
|
-
|
|
641
|
-
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
642
|
-
args[_key6] = arguments[_key6];
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
_this6 = _super6.call.apply(_super6, [this].concat(args));
|
|
646
|
-
|
|
647
|
-
_defineProperty(_assertThisInitialized(_this6), "serviceName", 'customer');
|
|
648
|
-
|
|
649
|
-
_defineProperty(_assertThisInitialized(_this6), "id", void 0);
|
|
650
|
-
|
|
651
|
-
_defineProperty(_assertThisInitialized(_this6), "name", void 0);
|
|
652
|
-
|
|
653
|
-
return _this6;
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
return _createClass(BackofficeCustomer);
|
|
657
|
-
}(BaseCallClass);
|
|
658
|
-
var BackofficePlugin = /*#__PURE__*/function (_BaseCallClass7) {
|
|
659
|
-
_inherits(BackofficePlugin, _BaseCallClass7);
|
|
660
|
-
|
|
661
|
-
var _super7 = _createSuper(BackofficePlugin);
|
|
662
|
-
|
|
663
|
-
function BackofficePlugin() {
|
|
664
|
-
var _this7;
|
|
665
|
-
|
|
666
|
-
_classCallCheck(this, BackofficePlugin);
|
|
667
|
-
|
|
668
|
-
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
|
669
|
-
args[_key7] = arguments[_key7];
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
_this7 = _super7.call.apply(_super7, [this].concat(args));
|
|
673
|
-
|
|
674
|
-
_defineProperty(_assertThisInitialized(_this7), "serviceName", 'plugin');
|
|
675
|
-
|
|
676
|
-
_defineProperty(_assertThisInitialized(_this7), "id", void 0);
|
|
677
|
-
|
|
678
|
-
_defineProperty(_assertThisInitialized(_this7), "srcUrl", void 0);
|
|
679
|
-
|
|
680
|
-
_defineProperty(_assertThisInitialized(_this7), "name", void 0);
|
|
681
|
-
|
|
682
|
-
return _this7;
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
return _createClass(BackofficePlugin);
|
|
686
|
-
}(BaseCallClass);
|
|
687
|
-
var BackofficeOrderpath = /*#__PURE__*/function (_BaseCallClass8) {
|
|
688
|
-
_inherits(BackofficeOrderpath, _BaseCallClass8);
|
|
689
|
-
|
|
690
|
-
var _super8 = _createSuper(BackofficeOrderpath);
|
|
691
|
-
|
|
692
|
-
function BackofficeOrderpath() {
|
|
693
|
-
var _this8;
|
|
694
|
-
|
|
695
|
-
_classCallCheck(this, BackofficeOrderpath);
|
|
696
|
-
|
|
697
|
-
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
|
698
|
-
args[_key8] = arguments[_key8];
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
_this8 = _super8.call.apply(_super8, [this].concat(args));
|
|
702
|
-
|
|
703
|
-
_defineProperty(_assertThisInitialized(_this8), "serviceName", 'orderpath');
|
|
704
|
-
|
|
705
|
-
return _this8;
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
_createClass(BackofficeOrderpath, [{
|
|
709
|
-
key: "fetchCart",
|
|
710
|
-
value: function fetchCart(id) {
|
|
711
|
-
return this.call('fetchCart', id);
|
|
712
|
-
}
|
|
713
|
-
}, {
|
|
714
|
-
key: "fetchOffer",
|
|
715
|
-
value: function fetchOffer(id) {
|
|
716
|
-
return this.call('fetchOffer', id);
|
|
717
|
-
}
|
|
718
|
-
}]);
|
|
719
|
-
|
|
720
|
-
return BackofficeOrderpath;
|
|
721
|
-
}(BaseCallClass);
|
|
722
|
-
|
|
723
|
-
var Events = /*#__PURE__*/function () {
|
|
724
|
-
function Events() {
|
|
725
|
-
_classCallCheck(this, Events);
|
|
726
|
-
|
|
727
|
-
_defineProperty(this, "_callbacks", void 0);
|
|
728
|
-
|
|
729
|
-
this._callbacks = {};
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
_createClass(Events, [{
|
|
733
|
-
key: "on",
|
|
734
|
-
value: function on(key, callback) {
|
|
735
|
-
// create an empty array for the event key
|
|
736
|
-
if (this._callbacks[key] === undefined) {
|
|
737
|
-
this._callbacks[key] = [];
|
|
738
|
-
} // save the callback in the array for the event key
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
this._callbacks[key].push(callback);
|
|
742
|
-
}
|
|
743
|
-
}, {
|
|
744
|
-
key: "off",
|
|
745
|
-
value: function off(key, callback) {
|
|
746
|
-
// if the key exists
|
|
747
|
-
if (this._callbacks[key] !== undefined) {
|
|
748
|
-
// iterate through the callbacks for the event key
|
|
749
|
-
for (var i = 0; i < this._callbacks[key].length; i++) {
|
|
750
|
-
// if the callback matches, remove it
|
|
751
|
-
if (this._callbacks[key][i] === callback) {
|
|
752
|
-
this._callbacks[key].splice(i, 1);
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
}, {
|
|
758
|
-
key: "emit",
|
|
759
|
-
value: function emit(key) {
|
|
760
|
-
// if the key exists
|
|
761
|
-
if (this._callbacks[key] !== undefined) {
|
|
762
|
-
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
763
|
-
params[_key - 1] = arguments[_key];
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
// iterate through the callbacks for the event key
|
|
767
|
-
for (var i = 0; i < this._callbacks[key].length; i++) {
|
|
768
|
-
var _this$_callbacks$key;
|
|
769
|
-
|
|
770
|
-
// trigger the callbacks with all provided params
|
|
771
|
-
(_this$_callbacks$key = this._callbacks[key])[i].apply(_this$_callbacks$key, params);
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
}
|
|
775
|
-
}]);
|
|
776
|
-
|
|
777
|
-
return Events;
|
|
778
|
-
}();
|
|
779
|
-
|
|
780
|
-
var AddToCartContext = /*#__PURE__*/function (_ContextCallClass) {
|
|
781
|
-
_inherits(AddToCartContext, _ContextCallClass);
|
|
782
|
-
|
|
783
|
-
var _super = _createSuper(AddToCartContext);
|
|
784
|
-
|
|
785
|
-
function AddToCartContext() {
|
|
786
|
-
var _this;
|
|
787
|
-
|
|
788
|
-
_classCallCheck(this, AddToCartContext);
|
|
789
|
-
|
|
790
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
791
|
-
args[_key] = arguments[_key];
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
795
|
-
|
|
796
|
-
_defineProperty(_assertThisInitialized(_this), "productId", void 0);
|
|
797
|
-
|
|
798
|
-
_defineProperty(_assertThisInitialized(_this), "cartId", void 0);
|
|
799
|
-
|
|
800
|
-
_defineProperty(_assertThisInitialized(_this), "warehouses", void 0);
|
|
801
|
-
|
|
802
|
-
_defineProperty(_assertThisInitialized(_this), "warehouseId", void 0);
|
|
803
|
-
|
|
804
|
-
_defineProperty(_assertThisInitialized(_this), "meta", void 0);
|
|
805
|
-
|
|
806
|
-
_defineProperty(_assertThisInitialized(_this), "pluginProductLines", void 0);
|
|
807
|
-
|
|
808
|
-
_defineProperty(_assertThisInitialized(_this), "productLines", void 0);
|
|
809
|
-
|
|
810
|
-
_defineProperty(_assertThisInitialized(_this), "productAmount", void 0);
|
|
811
|
-
|
|
812
|
-
return _this;
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
_createClass(AddToCartContext, [{
|
|
816
|
-
key: "closePlugin",
|
|
817
|
-
value: function closePlugin() {
|
|
818
|
-
return this.call('closePlugin');
|
|
819
|
-
}
|
|
820
|
-
}, {
|
|
821
|
-
key: "closePluginAndAddToCart",
|
|
822
|
-
value: function closePluginAndAddToCart() {
|
|
823
|
-
return this.call('closePluginAndAddToCart');
|
|
824
|
-
}
|
|
825
|
-
}, {
|
|
826
|
-
key: "closePluginAndRefreshCart",
|
|
827
|
-
value: function closePluginAndRefreshCart() {
|
|
828
|
-
return this.call('closePluginAndRefreshCart');
|
|
829
|
-
}
|
|
830
|
-
}]);
|
|
831
|
-
|
|
832
|
-
return AddToCartContext;
|
|
833
|
-
}(ContextCallClass);
|
|
834
|
-
var EditProductLinesOnCartContext = /*#__PURE__*/function (_ContextCallClass2) {
|
|
835
|
-
_inherits(EditProductLinesOnCartContext, _ContextCallClass2);
|
|
836
|
-
|
|
837
|
-
var _super2 = _createSuper(EditProductLinesOnCartContext);
|
|
838
|
-
|
|
839
|
-
function EditProductLinesOnCartContext() {
|
|
840
|
-
var _this2;
|
|
841
|
-
|
|
842
|
-
_classCallCheck(this, EditProductLinesOnCartContext);
|
|
843
|
-
|
|
844
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
845
|
-
args[_key2] = arguments[_key2];
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
_this2 = _super2.call.apply(_super2, [this].concat(args));
|
|
849
|
-
|
|
850
|
-
_defineProperty(_assertThisInitialized(_this2), "productId", void 0);
|
|
851
|
-
|
|
852
|
-
_defineProperty(_assertThisInitialized(_this2), "cartId", void 0);
|
|
853
|
-
|
|
854
|
-
_defineProperty(_assertThisInitialized(_this2), "warehouses", void 0);
|
|
855
|
-
|
|
856
|
-
_defineProperty(_assertThisInitialized(_this2), "warehouseId", void 0);
|
|
857
|
-
|
|
858
|
-
_defineProperty(_assertThisInitialized(_this2), "meta", void 0);
|
|
859
|
-
|
|
860
|
-
_defineProperty(_assertThisInitialized(_this2), "productLineId", void 0);
|
|
861
|
-
|
|
862
|
-
_defineProperty(_assertThisInitialized(_this2), "productLines", void 0);
|
|
863
|
-
|
|
864
|
-
_defineProperty(_assertThisInitialized(_this2), "pluginProductLines", void 0);
|
|
865
|
-
|
|
866
|
-
_defineProperty(_assertThisInitialized(_this2), "productAmount", void 0);
|
|
867
|
-
|
|
868
|
-
return _this2;
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
_createClass(EditProductLinesOnCartContext, [{
|
|
872
|
-
key: "closePlugin",
|
|
873
|
-
value: function closePlugin() {
|
|
874
|
-
return this.call('closePlugin');
|
|
875
|
-
}
|
|
876
|
-
}, {
|
|
877
|
-
key: "closePluginAndRefreshCart",
|
|
878
|
-
value: function closePluginAndRefreshCart() {
|
|
879
|
-
return this.call('closePluginAndRefreshCart');
|
|
880
|
-
}
|
|
881
|
-
}]);
|
|
882
|
-
|
|
883
|
-
return EditProductLinesOnCartContext;
|
|
884
|
-
}(ContextCallClass);
|
|
885
|
-
|
|
886
|
-
var ShopCatalog = /*#__PURE__*/function (_BaseCallClass) {
|
|
887
|
-
_inherits(ShopCatalog, _BaseCallClass);
|
|
888
|
-
|
|
889
|
-
var _super = _createSuper(ShopCatalog);
|
|
890
|
-
|
|
891
|
-
function ShopCatalog() {
|
|
892
|
-
var _this;
|
|
893
|
-
|
|
894
|
-
_classCallCheck(this, ShopCatalog);
|
|
895
|
-
|
|
896
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
897
|
-
args[_key] = arguments[_key];
|
|
898
|
-
}
|
|
899
|
-
|
|
900
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
901
|
-
|
|
902
|
-
_defineProperty(_assertThisInitialized(_this), "serviceName", 'catalog');
|
|
903
|
-
|
|
904
|
-
_defineProperty(_assertThisInitialized(_this), "categories", void 0);
|
|
905
|
-
|
|
906
|
-
_defineProperty(_assertThisInitialized(_this), "selectedCategoryId", void 0);
|
|
907
|
-
|
|
908
|
-
return _this;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
|
-
_createClass(ShopCatalog, [{
|
|
912
|
-
key: "fetchProduct",
|
|
913
|
-
value: function fetchProduct(productId) {
|
|
914
|
-
return this.call('fetchProduct', productId);
|
|
915
|
-
}
|
|
916
|
-
}, {
|
|
917
|
-
key: "fetchProducts",
|
|
918
|
-
value: function fetchProducts(page) {
|
|
919
|
-
return this.call('fetchProducts', page);
|
|
920
|
-
}
|
|
921
|
-
}, {
|
|
922
|
-
key: "fetchStocksForProductsAndWarehouses",
|
|
923
|
-
value: function fetchStocksForProductsAndWarehouses(products, warehouses) {
|
|
924
|
-
return this.call('fetchStocksForProductsAndWarehouses', products, warehouses);
|
|
925
|
-
}
|
|
926
|
-
}, {
|
|
927
|
-
key: "getProductPrice",
|
|
928
|
-
value: function getProductPrice(productId, isGross) {
|
|
929
|
-
return this.call('getProductPrice', productId, isGross);
|
|
930
|
-
}
|
|
931
|
-
}, {
|
|
932
|
-
key: "fetchPricingForProducts",
|
|
933
|
-
value: function fetchPricingForProducts(products) {
|
|
934
|
-
return this.call('fetchPricingForProducts', products);
|
|
935
|
-
}
|
|
936
|
-
}, {
|
|
937
|
-
key: "fetchWarehouses",
|
|
938
|
-
value: function fetchWarehouses() {
|
|
939
|
-
return this.call('fetchWarehouses');
|
|
940
|
-
}
|
|
941
|
-
}, {
|
|
942
|
-
key: "getCategoryById",
|
|
943
|
-
value: function getCategoryById(categoryId) {
|
|
944
|
-
return this.call('getCategoryById', categoryId);
|
|
945
|
-
}
|
|
946
|
-
}]);
|
|
947
|
-
|
|
948
|
-
return ShopCatalog;
|
|
949
|
-
}(BaseCallClass);
|
|
950
|
-
var ShopWishlist = /*#__PURE__*/function (_BaseCallClass2) {
|
|
951
|
-
_inherits(ShopWishlist, _BaseCallClass2);
|
|
952
|
-
|
|
953
|
-
var _super2 = _createSuper(ShopWishlist);
|
|
954
|
-
|
|
955
|
-
function ShopWishlist() {
|
|
956
|
-
var _this2;
|
|
957
|
-
|
|
958
|
-
_classCallCheck(this, ShopWishlist);
|
|
959
|
-
|
|
960
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
961
|
-
args[_key2] = arguments[_key2];
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
_this2 = _super2.call.apply(_super2, [this].concat(args));
|
|
965
|
-
|
|
966
|
-
_defineProperty(_assertThisInitialized(_this2), "serviceName", 'wishlist');
|
|
967
|
-
|
|
968
|
-
return _this2;
|
|
969
|
-
}
|
|
970
|
-
|
|
971
|
-
_createClass(ShopWishlist, [{
|
|
972
|
-
key: "addProductsToWishlist",
|
|
973
|
-
value: function addProductsToWishlist(wishlistId, newProduct) {
|
|
974
|
-
return this.call('addProductsToWishlist', wishlistId, newProduct);
|
|
975
|
-
}
|
|
976
|
-
}, {
|
|
977
|
-
key: "getWishlists",
|
|
978
|
-
value: function getWishlists() {
|
|
979
|
-
return this.call('getWishlists');
|
|
980
|
-
}
|
|
981
|
-
}, {
|
|
982
|
-
key: "createWishlist",
|
|
983
|
-
value: function createWishlist(name) {
|
|
984
|
-
return this.call('createWishlist', name);
|
|
985
|
-
}
|
|
986
|
-
}]);
|
|
987
|
-
|
|
988
|
-
return ShopWishlist;
|
|
989
|
-
}(BaseCallClass);
|
|
990
|
-
var ShopAccount = /*#__PURE__*/function (_BaseCallClass3) {
|
|
991
|
-
_inherits(ShopAccount, _BaseCallClass3);
|
|
992
|
-
|
|
993
|
-
var _super3 = _createSuper(ShopAccount);
|
|
994
|
-
|
|
995
|
-
function ShopAccount() {
|
|
996
|
-
var _this3;
|
|
997
|
-
|
|
998
|
-
_classCallCheck(this, ShopAccount);
|
|
999
|
-
|
|
1000
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
1001
|
-
args[_key3] = arguments[_key3];
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
_this3 = _super3.call.apply(_super3, [this].concat(args));
|
|
1005
|
-
|
|
1006
|
-
_defineProperty(_assertThisInitialized(_this3), "serviceName", 'account');
|
|
1007
|
-
|
|
1008
|
-
_defineProperty(_assertThisInitialized(_this3), "client", void 0);
|
|
1009
|
-
|
|
1010
|
-
_defineProperty(_assertThisInitialized(_this3), "isAuthenticated", void 0);
|
|
1011
|
-
|
|
1012
|
-
_defineProperty(_assertThisInitialized(_this3), "user", void 0);
|
|
1013
|
-
|
|
1014
|
-
_defineProperty(_assertThisInitialized(_this3), "manager", void 0);
|
|
1015
|
-
|
|
1016
|
-
return _this3;
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
_createClass(ShopAccount, [{
|
|
1020
|
-
key: "hasSegment",
|
|
1021
|
-
value: function hasSegment(name) {
|
|
1022
|
-
return this.call('hasSegment', name);
|
|
1023
|
-
}
|
|
1024
|
-
}, {
|
|
1025
|
-
key: "logout",
|
|
1026
|
-
value: function logout() {// NotImplementedYet
|
|
1027
|
-
}
|
|
1028
|
-
}]);
|
|
1029
|
-
|
|
1030
|
-
return ShopAccount;
|
|
1031
|
-
}(BaseCallClass);
|
|
1032
|
-
var ShopCart = /*#__PURE__*/function (_BaseCallClass4) {
|
|
1033
|
-
_inherits(ShopCart, _BaseCallClass4);
|
|
1034
|
-
|
|
1035
|
-
var _super4 = _createSuper(ShopCart);
|
|
1036
|
-
|
|
1037
|
-
function ShopCart() {
|
|
1038
|
-
var _this4;
|
|
1039
|
-
|
|
1040
|
-
_classCallCheck(this, ShopCart);
|
|
1041
|
-
|
|
1042
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
1043
|
-
args[_key4] = arguments[_key4];
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
_this4 = _super4.call.apply(_super4, [this].concat(args));
|
|
1047
|
-
|
|
1048
|
-
_defineProperty(_assertThisInitialized(_this4), "serviceName", 'cart');
|
|
1049
|
-
|
|
1050
|
-
_defineProperty(_assertThisInitialized(_this4), "carts", void 0);
|
|
1051
|
-
|
|
1052
|
-
_defineProperty(_assertThisInitialized(_this4), "currentCart", void 0);
|
|
1053
|
-
|
|
1054
|
-
_defineProperty(_assertThisInitialized(_this4), "totalCartPrice", void 0);
|
|
1055
|
-
|
|
1056
|
-
return _this4;
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
_createClass(ShopCart, [{
|
|
1060
|
-
key: "addToCart",
|
|
1061
|
-
value: function addToCart(productId, amount, where, cartId) {
|
|
1062
|
-
return this.call('addToCart', productId, amount, where, cartId);
|
|
1063
|
-
}
|
|
1064
|
-
}]);
|
|
1065
|
-
|
|
1066
|
-
return ShopCart;
|
|
1067
|
-
}(BaseCallClass);
|
|
1068
|
-
var ShopAuthorization = /*#__PURE__*/function (_BaseCallClass5) {
|
|
1069
|
-
_inherits(ShopAuthorization, _BaseCallClass5);
|
|
1070
|
-
|
|
1071
|
-
var _super5 = _createSuper(ShopAuthorization);
|
|
1072
|
-
|
|
1073
|
-
function ShopAuthorization() {
|
|
1074
|
-
var _this5;
|
|
1075
|
-
|
|
1076
|
-
_classCallCheck(this, ShopAuthorization);
|
|
1077
|
-
|
|
1078
|
-
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
1079
|
-
args[_key5] = arguments[_key5];
|
|
1080
|
-
}
|
|
1081
|
-
|
|
1082
|
-
_this5 = _super5.call.apply(_super5, [this].concat(args));
|
|
1083
|
-
|
|
1084
|
-
_defineProperty(_assertThisInitialized(_this5), "serviceName", 'authorization');
|
|
1085
|
-
|
|
1086
|
-
return _this5;
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
|
-
_createClass(ShopAuthorization, [{
|
|
1090
|
-
key: "getAuthToken",
|
|
1091
|
-
value: function getAuthToken() {
|
|
1092
|
-
return this.call('getAuthToken');
|
|
1093
|
-
}
|
|
1094
|
-
}]);
|
|
1095
|
-
|
|
1096
|
-
return ShopAuthorization;
|
|
1097
|
-
}(BaseCallClass);
|
|
1098
|
-
var ShopUtils = /*#__PURE__*/function (_BaseCallClass6) {
|
|
1099
|
-
_inherits(ShopUtils, _BaseCallClass6);
|
|
1100
|
-
|
|
1101
|
-
var _super6 = _createSuper(ShopUtils);
|
|
1102
|
-
|
|
1103
|
-
function ShopUtils(call) {
|
|
1104
|
-
var _this6;
|
|
1105
|
-
|
|
1106
|
-
_classCallCheck(this, ShopUtils);
|
|
1107
|
-
|
|
1108
|
-
_this6 = _super6.call(this, call);
|
|
1109
|
-
|
|
1110
|
-
_defineProperty(_assertThisInitialized(_this6), "serviceName", 'utils');
|
|
1111
|
-
|
|
1112
|
-
_defineProperty(_assertThisInitialized(_this6), "currency", void 0);
|
|
1113
|
-
|
|
1114
|
-
_defineProperty(_assertThisInitialized(_this6), "isAnonymousAndPurchaseDisabled", void 0);
|
|
1115
|
-
|
|
1116
|
-
_defineProperty(_assertThisInitialized(_this6), "isB2B", void 0);
|
|
1117
|
-
|
|
1118
|
-
_defineProperty(_assertThisInitialized(_this6), "isB2BAndPlatformIsNotOpened", void 0);
|
|
1119
|
-
|
|
1120
|
-
_defineProperty(_assertThisInitialized(_this6), "isIndexPage", void 0);
|
|
1121
|
-
|
|
1122
|
-
_defineProperty(_assertThisInitialized(_this6), "isPurchaseEnabledOrAuthenticated", void 0);
|
|
1123
|
-
|
|
1124
|
-
_defineProperty(_assertThisInitialized(_this6), "routes", void 0);
|
|
1125
|
-
|
|
1126
|
-
_this6.routes = {
|
|
1127
|
-
getCategoryPath: _this6.getCategoryPath,
|
|
1128
|
-
getManufacturerSearchUrl: _this6.getManufacturerSearchUrl,
|
|
1129
|
-
getProductUrl: _this6.getProductUrl,
|
|
1130
|
-
isExternalUrl: _this6.isExternalUrl
|
|
1131
|
-
};
|
|
1132
|
-
return _this6;
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
_createClass(ShopUtils, [{
|
|
1136
|
-
key: "notify",
|
|
1137
|
-
value: function notify(options) {
|
|
1138
|
-
return this.call('notify', options);
|
|
1139
|
-
}
|
|
1140
|
-
}, {
|
|
1141
|
-
key: "getCategoryPath",
|
|
1142
|
-
value: function getCategoryPath(id) {
|
|
1143
|
-
return this.call('getCategoryPath', id);
|
|
1144
|
-
}
|
|
1145
|
-
}, {
|
|
1146
|
-
key: "getManufacturerSearchUrl",
|
|
1147
|
-
value: function getManufacturerSearchUrl(manufacturer) {
|
|
1148
|
-
return this.call('getManufacturerSearchUrl', manufacturer);
|
|
1149
|
-
}
|
|
1150
|
-
}, {
|
|
1151
|
-
key: "getProductUrl",
|
|
1152
|
-
value: function getProductUrl(product) {
|
|
1153
|
-
return this.call('getProductUrl', product);
|
|
1154
|
-
}
|
|
1155
|
-
}, {
|
|
1156
|
-
key: "isExternalUrl",
|
|
1157
|
-
value: function isExternalUrl(url) {
|
|
1158
|
-
return this.call('isExternalUrl', url);
|
|
1159
|
-
}
|
|
1160
|
-
}]);
|
|
1161
|
-
|
|
1162
|
-
return ShopUtils;
|
|
1163
|
-
}(BaseCallClass);
|
|
1164
|
-
var ShopConfig = /*#__PURE__*/function (_BaseCallClass7) {
|
|
1165
|
-
_inherits(ShopConfig, _BaseCallClass7);
|
|
1166
|
-
|
|
1167
|
-
var _super7 = _createSuper(ShopConfig);
|
|
1168
|
-
|
|
1169
|
-
function ShopConfig() {
|
|
1170
|
-
var _this7;
|
|
1171
|
-
|
|
1172
|
-
_classCallCheck(this, ShopConfig);
|
|
1173
|
-
|
|
1174
|
-
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
1175
|
-
args[_key6] = arguments[_key6];
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
_this7 = _super7.call.apply(_super7, [this].concat(args));
|
|
1179
|
-
|
|
1180
|
-
_defineProperty(_assertThisInitialized(_this7), "serviceName", 'config');
|
|
1181
|
-
|
|
1182
|
-
_defineProperty(_assertThisInitialized(_this7), "accessMode", void 0);
|
|
1183
|
-
|
|
1184
|
-
_defineProperty(_assertThisInitialized(_this7), "isB2CRegistrationEnabled", void 0);
|
|
1185
|
-
|
|
1186
|
-
_defineProperty(_assertThisInitialized(_this7), "isCatalogOpened", void 0);
|
|
1187
|
-
|
|
1188
|
-
_defineProperty(_assertThisInitialized(_this7), "isGrossSelected", void 0);
|
|
1189
|
-
|
|
1190
|
-
_defineProperty(_assertThisInitialized(_this7), "isPlatformClosed", void 0);
|
|
1191
|
-
|
|
1192
|
-
_defineProperty(_assertThisInitialized(_this7), "isPlatformOpened", void 0);
|
|
1193
|
-
|
|
1194
|
-
_defineProperty(_assertThisInitialized(_this7), "isPurchaseEnabled", void 0);
|
|
1195
|
-
|
|
1196
|
-
_defineProperty(_assertThisInitialized(_this7), "isRegistrationEnabled", void 0);
|
|
1197
|
-
|
|
1198
|
-
_defineProperty(_assertThisInitialized(_this7), "currency", void 0);
|
|
1199
|
-
|
|
1200
|
-
return _this7;
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
|
-
return _createClass(ShopConfig);
|
|
1204
|
-
}(BaseCallClass);
|
|
1205
|
-
var ShopTenant = /*#__PURE__*/function (_BaseCallClass8) {
|
|
1206
|
-
_inherits(ShopTenant, _BaseCallClass8);
|
|
1207
|
-
|
|
1208
|
-
var _super8 = _createSuper(ShopTenant);
|
|
1209
|
-
|
|
1210
|
-
function ShopTenant() {
|
|
1211
|
-
var _this8;
|
|
1212
|
-
|
|
1213
|
-
_classCallCheck(this, ShopTenant);
|
|
1214
|
-
|
|
1215
|
-
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
|
1216
|
-
args[_key7] = arguments[_key7];
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
_this8 = _super8.call.apply(_super8, [this].concat(args));
|
|
1220
|
-
|
|
1221
|
-
_defineProperty(_assertThisInitialized(_this8), "serviceName", 'tenant');
|
|
1222
|
-
|
|
1223
|
-
_defineProperty(_assertThisInitialized(_this8), "tenantKey", void 0);
|
|
1224
|
-
|
|
1225
|
-
_defineProperty(_assertThisInitialized(_this8), "language", void 0);
|
|
1226
|
-
|
|
1227
|
-
return _this8;
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
|
-
return _createClass(ShopTenant);
|
|
1231
|
-
}(BaseCallClass);
|
|
1232
|
-
var ShopPlugin = /*#__PURE__*/function (_BaseCallClass9) {
|
|
1233
|
-
_inherits(ShopPlugin, _BaseCallClass9);
|
|
1234
|
-
|
|
1235
|
-
var _super9 = _createSuper(ShopPlugin);
|
|
1236
|
-
|
|
1237
|
-
function ShopPlugin() {
|
|
1238
|
-
var _this9;
|
|
1239
|
-
|
|
1240
|
-
_classCallCheck(this, ShopPlugin);
|
|
1241
|
-
|
|
1242
|
-
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
|
1243
|
-
args[_key8] = arguments[_key8];
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
_this9 = _super9.call.apply(_super9, [this].concat(args));
|
|
1247
|
-
|
|
1248
|
-
_defineProperty(_assertThisInitialized(_this9), "serviceName", 'plugin');
|
|
1249
|
-
|
|
1250
|
-
_defineProperty(_assertThisInitialized(_this9), "id", void 0);
|
|
1251
|
-
|
|
1252
|
-
_defineProperty(_assertThisInitialized(_this9), "srcUrl", void 0);
|
|
1253
|
-
|
|
1254
|
-
_defineProperty(_assertThisInitialized(_this9), "name", void 0);
|
|
1255
|
-
|
|
1256
|
-
return _this9;
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
return _createClass(ShopPlugin);
|
|
1260
|
-
}(BaseCallClass);
|
|
1261
|
-
|
|
1262
|
-
var SdkInternalEvents;
|
|
1263
|
-
|
|
1264
|
-
(function (SdkInternalEvents) {
|
|
1265
|
-
SdkInternalEvents["INIT"] = "INIT";
|
|
1266
|
-
SdkInternalEvents["UPDATE"] = "UPDATE";
|
|
1267
|
-
})(SdkInternalEvents || (SdkInternalEvents = {}));
|
|
1268
|
-
|
|
1269
|
-
exports.SdkEvents = void 0;
|
|
1270
|
-
|
|
1271
|
-
(function (SdkEvents) {
|
|
1272
|
-
SdkEvents["INIT"] = "INIT";
|
|
1273
|
-
SdkEvents["UPDATE"] = "UPDATE";
|
|
1274
|
-
})(exports.SdkEvents || (exports.SdkEvents = {}));
|
|
1275
|
-
|
|
1276
|
-
var Sdk = /*#__PURE__*/function (_Events) {
|
|
1277
|
-
_inherits(Sdk, _Events);
|
|
1278
|
-
|
|
1279
|
-
var _super = _createSuper(Sdk);
|
|
1280
|
-
|
|
1281
|
-
function Sdk(options) {
|
|
1282
|
-
var _this;
|
|
1283
|
-
|
|
1284
|
-
_classCallCheck(this, Sdk);
|
|
1285
|
-
|
|
1286
|
-
_this = _super.call(this);
|
|
1287
|
-
|
|
1288
|
-
_defineProperty(_assertThisInitialized(_this), "channel", void 0);
|
|
1289
|
-
|
|
1290
|
-
_defineProperty(_assertThisInitialized(_this), "autoheight", true);
|
|
1291
|
-
|
|
1292
|
-
_defineProperty(_assertThisInitialized(_this), "heightMutationObserver", null);
|
|
1293
|
-
|
|
1294
|
-
_defineProperty(_assertThisInitialized(_this), "origin", void 0);
|
|
1295
|
-
|
|
1296
|
-
_defineProperty(_assertThisInitialized(_this), "isInitialized", false);
|
|
1297
|
-
|
|
1298
|
-
_defineProperty(_assertThisInitialized(_this), "instances", void 0);
|
|
1299
|
-
|
|
1300
|
-
_defineProperty(_assertThisInitialized(_this), "contextClass", void 0);
|
|
1301
|
-
|
|
1302
|
-
_this.initializeServiceGetters();
|
|
1303
|
-
|
|
1304
|
-
_this.origin = options.origin;
|
|
1305
|
-
_this.channel = new Channel({
|
|
1306
|
-
targetOrigin: _this.origin,
|
|
1307
|
-
target: window.parent
|
|
1308
|
-
});
|
|
1309
|
-
|
|
1310
|
-
_this.channel.subscribe(main.Message.INIT, function (payload) {
|
|
1311
|
-
Sdk.log('Handling INIT message');
|
|
1312
|
-
Object.entries(_this.instances).forEach(function (_ref) {
|
|
1313
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
1314
|
-
key = _ref2[0],
|
|
1315
|
-
value = _ref2[1];
|
|
1316
|
-
|
|
1317
|
-
if (value instanceof BaseCallClass) {
|
|
1318
|
-
value.update(payload);
|
|
1319
|
-
} else {
|
|
1320
|
-
var attributesForKey = payload[key];
|
|
1321
|
-
|
|
1322
|
-
if (typeof attributesForKey !== 'undefined') {
|
|
1323
|
-
BaseCallClass.update(value, payload[key]);
|
|
1324
|
-
} else {
|
|
1325
|
-
Sdk.warn("Missing attributes for ".concat(key, " in "), payload);
|
|
1326
|
-
}
|
|
1327
|
-
}
|
|
1328
|
-
});
|
|
1329
|
-
Sdk.log('Emitting INIT with payload ', _this.instances);
|
|
1330
|
-
_this.isInitialized = true;
|
|
1331
|
-
|
|
1332
|
-
_this.emit(SdkInternalEvents.INIT, _this.instances);
|
|
1333
|
-
});
|
|
1334
|
-
|
|
1335
|
-
_this.channel.subscribe(main.Message.UPDATE, function (payload) {
|
|
1336
|
-
Sdk.log('Emitting UPDATE with payload ', payload);
|
|
1337
|
-
|
|
1338
|
-
_this.emit(SdkInternalEvents.UPDATE, payload);
|
|
1339
|
-
});
|
|
1340
|
-
|
|
1341
|
-
_this.channel.subscribe(main.Message.FRAME_HEIGHT_REQUEST, function (payload) {
|
|
1342
|
-
if (_this.autoheight) {
|
|
1343
|
-
Sdk.log('Request for iframe height');
|
|
1344
|
-
|
|
1345
|
-
_this.sendFrameHeight();
|
|
1346
|
-
}
|
|
1347
|
-
});
|
|
1348
|
-
|
|
1349
|
-
_this.channel.connect().then(function () {
|
|
1350
|
-
Sdk.log('Connected with ONe SDK');
|
|
1351
|
-
|
|
1352
|
-
if (_this.autoheight) {
|
|
1353
|
-
_this.initializeHeightObserver();
|
|
1354
|
-
}
|
|
1355
|
-
});
|
|
1356
|
-
|
|
1357
|
-
_this.setupOptions(options);
|
|
1358
|
-
|
|
1359
|
-
Sdk.log('Initialized.');
|
|
1360
|
-
return _this;
|
|
1361
|
-
}
|
|
1362
|
-
|
|
1363
|
-
_createClass(Sdk, [{
|
|
1364
|
-
key: "initializeServiceGetters",
|
|
1365
|
-
value: function initializeServiceGetters() {
|
|
1366
|
-
var _this2 = this;
|
|
1367
|
-
|
|
1368
|
-
if (this.instances) {
|
|
1369
|
-
Object.keys(this.instances).forEach(function (serviceName) {
|
|
1370
|
-
Object.defineProperty(_this2, serviceName, {
|
|
1371
|
-
get: function get() {
|
|
1372
|
-
return _this2.isInitialized ? _this2.instances[serviceName] : null;
|
|
1373
|
-
}
|
|
1374
|
-
});
|
|
1375
|
-
});
|
|
1376
|
-
}
|
|
1377
|
-
}
|
|
1378
|
-
}, {
|
|
1379
|
-
key: "initializeContextClass",
|
|
1380
|
-
value: function initializeContextClass() {
|
|
1381
|
-
if (this.contextClass) {
|
|
1382
|
-
return new this.contextClass(this.callFunction.bind(this));
|
|
1383
|
-
}
|
|
1384
|
-
|
|
1385
|
-
return {};
|
|
1386
|
-
}
|
|
1387
|
-
}, {
|
|
1388
|
-
key: "sendFrameHeight",
|
|
1389
|
-
value: function sendFrameHeight() {
|
|
1390
|
-
this.channel.postMessage(main.Message.FRAME_HEIGHT_CHANGE, document.body.scrollHeight);
|
|
1391
|
-
}
|
|
1392
|
-
}, {
|
|
1393
|
-
key: "initializeHeightObserver",
|
|
1394
|
-
value: function initializeHeightObserver() {
|
|
1395
|
-
var _this3 = this;
|
|
1396
|
-
|
|
1397
|
-
if ("MutationObserver" in window) {
|
|
1398
|
-
var onMutationObserved = function onMutationObserved() {
|
|
1399
|
-
_this3.sendFrameHeight();
|
|
1400
|
-
};
|
|
1401
|
-
|
|
1402
|
-
var target = document.querySelector('body'),
|
|
1403
|
-
config = {
|
|
1404
|
-
attributes: true,
|
|
1405
|
-
attributeOldValue: false,
|
|
1406
|
-
characterData: true,
|
|
1407
|
-
characterDataOldValue: false,
|
|
1408
|
-
childList: true,
|
|
1409
|
-
subtree: true
|
|
1410
|
-
};
|
|
1411
|
-
this.heightMutationObserver = new MutationObserver(onMutationObserved);
|
|
1412
|
-
Sdk.log('Create body MutationObserver');
|
|
1413
|
-
this.heightMutationObserver.observe(target, config);
|
|
1414
|
-
} else {
|
|
1415
|
-
Sdk.warn('MutationObserver not available. Auto-height functionality disabled.');
|
|
1416
|
-
}
|
|
1417
|
-
}
|
|
1418
|
-
}, {
|
|
1419
|
-
key: "setupOptions",
|
|
1420
|
-
value: function setupOptions(options) {
|
|
1421
|
-
if (options) {
|
|
1422
|
-
if (typeof options.debug !== 'undefined') {
|
|
1423
|
-
Sdk.debug = options.debug;
|
|
1424
|
-
}
|
|
1425
|
-
|
|
1426
|
-
if (typeof options.autoheight !== 'undefined') {
|
|
1427
|
-
this.autoheight = options.autoheight;
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
this.contextClass = options.context;
|
|
1431
|
-
}
|
|
1432
|
-
}
|
|
1433
|
-
}, {
|
|
1434
|
-
key: "callFunction",
|
|
1435
|
-
value: function callFunction(service, fun) {
|
|
1436
|
-
var _this4 = this;
|
|
1437
|
-
|
|
1438
|
-
var callId = generateCallId();
|
|
1439
|
-
|
|
1440
|
-
if (this.isInitialized) {
|
|
1441
|
-
for (var _len = arguments.length, payload = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
1442
|
-
payload[_key - 2] = arguments[_key];
|
|
1443
|
-
}
|
|
1444
|
-
|
|
1445
|
-
Sdk.log("Call ID ".concat(callId, " for ").concat(service, ":").concat(fun), payload);
|
|
1446
|
-
this.channel.postMessage(main.Message.METHOD_CALL, {
|
|
1447
|
-
callId: callId,
|
|
1448
|
-
service: service,
|
|
1449
|
-
method: fun,
|
|
1450
|
-
payload: payload
|
|
1451
|
-
});
|
|
1452
|
-
return new Promise(function (resolve, reject) {
|
|
1453
|
-
var onChannelMessage = function onChannelMessage(response) {
|
|
1454
|
-
if (response.callId === callId) {
|
|
1455
|
-
_this4.channel.unsubscribe(main.Message.METHOD_RESULT, onChannelMessage);
|
|
1456
|
-
|
|
1457
|
-
if (response !== null && response !== void 0 && response.isException) {
|
|
1458
|
-
return reject(response.result);
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
return resolve(response.result);
|
|
1462
|
-
}
|
|
1463
|
-
};
|
|
1464
|
-
|
|
1465
|
-
_this4.channel.subscribe(main.Message.METHOD_RESULT, onChannelMessage);
|
|
1466
|
-
});
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
Sdk.log('SDK is not initialized!');
|
|
1470
|
-
return Promise.resolve(null);
|
|
1471
|
-
}
|
|
1472
|
-
}, {
|
|
1473
|
-
key: "navigate",
|
|
1474
|
-
value: function navigate(event) {
|
|
1475
|
-
this.channel.postMessage(main.Message.NAVIGATION_PUSH, event);
|
|
1476
|
-
}
|
|
1477
|
-
}], [{
|
|
1478
|
-
key: "log",
|
|
1479
|
-
value: function log() {
|
|
1480
|
-
var _console;
|
|
1481
|
-
|
|
1482
|
-
for (var _len2 = arguments.length, data = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
1483
|
-
data[_key2] = arguments[_key2];
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
Sdk.debug && (_console = console).log.apply(_console, ['[SDK Core] '].concat(data));
|
|
1487
|
-
}
|
|
1488
|
-
}, {
|
|
1489
|
-
key: "warn",
|
|
1490
|
-
value: function warn() {
|
|
1491
|
-
var _console2;
|
|
1492
|
-
|
|
1493
|
-
for (var _len3 = arguments.length, data = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
1494
|
-
data[_key3] = arguments[_key3];
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
|
-
(_console2 = console).warn.apply(_console2, ['[SDK Core] '].concat(data));
|
|
1498
|
-
}
|
|
1499
|
-
}]);
|
|
1500
|
-
|
|
1501
|
-
return Sdk;
|
|
1502
|
-
}(Events);
|
|
1503
|
-
|
|
1504
|
-
_defineProperty(Sdk, "debug", false);
|
|
1505
|
-
|
|
1506
|
-
var BackofficeSdk = /*#__PURE__*/function (_Sdk) {
|
|
1507
|
-
_inherits(BackofficeSdk, _Sdk);
|
|
1508
|
-
|
|
1509
|
-
var _super2 = _createSuper(BackofficeSdk);
|
|
1510
|
-
|
|
1511
|
-
function BackofficeSdk() {
|
|
1512
|
-
var _this5;
|
|
1513
|
-
|
|
1514
|
-
_classCallCheck(this, BackofficeSdk);
|
|
1515
|
-
|
|
1516
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
1517
|
-
args[_key4] = arguments[_key4];
|
|
1518
|
-
}
|
|
1519
|
-
|
|
1520
|
-
_this5 = _super2.call.apply(_super2, [this].concat(args));
|
|
1521
|
-
|
|
1522
|
-
_defineProperty(_assertThisInitialized(_this5), "instances", {
|
|
1523
|
-
route: {
|
|
1524
|
-
hash: '',
|
|
1525
|
-
query: {}
|
|
1526
|
-
},
|
|
1527
|
-
catalog: new BackofficeCatalog(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1528
|
-
user: new BackofficeUser(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1529
|
-
tenant: new BackofficeTenant(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1530
|
-
layout: new BackofficeLayout(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1531
|
-
authorization: new BackofficeAuthorization(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1532
|
-
customer: new BackofficeCustomer(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1533
|
-
plugin: new BackofficePlugin(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1534
|
-
orderpath: new BackofficeOrderpath(_this5.callFunction.bind(_assertThisInitialized(_this5))),
|
|
1535
|
-
context: _this5.initializeContextClass()
|
|
1536
|
-
});
|
|
1537
|
-
|
|
1538
|
-
return _this5;
|
|
1539
|
-
}
|
|
1540
|
-
|
|
1541
|
-
return _createClass(BackofficeSdk);
|
|
1542
|
-
}(Sdk);
|
|
1543
|
-
var ShopSdk = /*#__PURE__*/function (_Sdk2) {
|
|
1544
|
-
_inherits(ShopSdk, _Sdk2);
|
|
1545
|
-
|
|
1546
|
-
var _super3 = _createSuper(ShopSdk);
|
|
1547
|
-
|
|
1548
|
-
function ShopSdk() {
|
|
1549
|
-
var _this6;
|
|
1550
|
-
|
|
1551
|
-
_classCallCheck(this, ShopSdk);
|
|
1552
|
-
|
|
1553
|
-
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
1554
|
-
args[_key5] = arguments[_key5];
|
|
1555
|
-
}
|
|
1556
|
-
|
|
1557
|
-
_this6 = _super3.call.apply(_super3, [this].concat(args));
|
|
1558
|
-
|
|
1559
|
-
_defineProperty(_assertThisInitialized(_this6), "instances", {
|
|
1560
|
-
route: {
|
|
1561
|
-
hash: '',
|
|
1562
|
-
query: {}
|
|
1563
|
-
},
|
|
1564
|
-
authorization: new ShopAuthorization(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1565
|
-
cart: new ShopCart(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1566
|
-
catalog: new ShopCatalog(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1567
|
-
account: new ShopAccount(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1568
|
-
utils: new ShopUtils(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1569
|
-
config: new ShopConfig(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1570
|
-
tenant: new ShopTenant(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1571
|
-
wishlist: new ShopWishlist(_this6.callFunction.bind(_assertThisInitialized(_this6))),
|
|
1572
|
-
context: _this6.initializeContextClass(),
|
|
1573
|
-
plugin: new ShopPlugin(_this6.callFunction.bind(_assertThisInitialized(_this6)))
|
|
1574
|
-
});
|
|
1575
|
-
|
|
1576
|
-
return _this6;
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
return _createClass(ShopSdk);
|
|
1580
|
-
}(Sdk);
|
|
1581
|
-
|
|
1582
|
-
exports.BackofficeAddToCartContext = AddToCartContext$1;
|
|
1583
|
-
exports.BackofficeDocumentsContext = DocumentsContext;
|
|
1584
|
-
exports.BackofficeEditProductLinesOnCartContext = EditProductLinesOnCartContext$1;
|
|
1585
|
-
exports.BackofficeSdk = BackofficeSdk;
|
|
1586
|
-
exports.ShopAddToCartContext = AddToCartContext;
|
|
1587
|
-
exports.ShopEditProductLinesOnCartContext = EditProductLinesOnCartContext;
|
|
1588
|
-
exports.ShopSdk = ShopSdk;
|
|
1589
|
-
|
|
1590
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1591
|
-
|
|
1592
|
-
}));
|
|
1593
|
-
//# sourceMappingURL=bundle.umd.js.map
|