@paydock/client-sdk 1.105.1 → 1.106.1
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/README.md +255 -246
- package/bundles/widget.umd.js +1197 -1724
- package/bundles/widget.umd.min.js +1 -1
- package/lib/api/api-service-internal.d.ts +2 -1
- package/lib/api/api-service-internal.js +1 -0
- package/lib/api/api-service-internal.js.map +1 -1
- package/lib/components/iframe-event.d.ts +2 -0
- package/lib/components/iframe-event.js +2 -0
- package/lib/components/iframe-event.js.map +1 -1
- package/lib/components/link.d.ts +3 -2
- package/lib/components/link.js +1 -0
- package/lib/components/link.js.map +1 -1
- package/lib/components/param.d.ts +2 -2
- package/lib/components/param.js.map +1 -1
- package/lib/components/wallet-background.js +12 -0
- package/lib/components/wallet-background.js.map +1 -1
- package/lib/configs/sdk.js +1 -1
- package/lib/secure-remote-commerce/index.d.ts +102 -1
- package/lib/secure-remote-commerce/index.js +102 -1
- package/lib/secure-remote-commerce/index.js.map +1 -1
- package/lib/secure-remote-commerce/interfaces.d.ts +109 -32
- package/lib/secure-remote-commerce/interfaces.js +31 -11
- package/lib/secure-remote-commerce/interfaces.js.map +1 -1
- package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.d.ts +30 -0
- package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js +40 -0
- package/lib/secure-remote-commerce/mastercard-secure-remote-commerce.js.map +1 -0
- package/lib/secure-remote-commerce/providers/mastercard-src/index.d.ts +1 -0
- package/lib/secure-remote-commerce/providers/mastercard-src/index.js +2 -0
- package/lib/secure-remote-commerce/providers/mastercard-src/index.js.map +1 -0
- package/lib/secure-remote-commerce/providers/{visa-src/visa-src.d.ts → mastercard-src/mastercard-src.d.ts} +4 -7
- package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js +89 -0
- package/lib/secure-remote-commerce/providers/mastercard-src/mastercard-src.js.map +1 -0
- package/lib/secure-remote-commerce/secure-remote-commerce.d.ts +13 -91
- package/lib/secure-remote-commerce/secure-remote-commerce.js +15 -99
- package/lib/secure-remote-commerce/secure-remote-commerce.js.map +1 -1
- package/lib/wallet-buttons/flypay-v2.wallet-service.d.ts +0 -1
- package/lib/wallet-buttons/flypay-v2.wallet-service.js +28 -30
- package/lib/wallet-buttons/flypay-v2.wallet-service.js.map +1 -1
- package/package.json +2 -2
- package/slate.md +69 -131
- package/typings/index.d.ts +0 -1
- package/vendors/zipmoney.js +1 -2
- package/lib/secure-remote-commerce/providers/visa-src/helper.d.ts +0 -7
- package/lib/secure-remote-commerce/providers/visa-src/helper.js +0 -36
- package/lib/secure-remote-commerce/providers/visa-src/helper.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/index.d.ts +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/index.js +0 -2
- package/lib/secure-remote-commerce/providers/visa-src/index.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js +0 -113
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.js.map +0 -1
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.d.ts +0 -8
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js +0 -10
- package/lib/secure-remote-commerce/providers/visa-src/visa-src.styles.js.map +0 -1
- package/typings/globals/@auspayplus/open-payments-checkout/index.d.ts +0 -43
package/bundles/widget.umd.js
CHANGED
|
@@ -52,307 +52,6 @@
|
|
|
52
52
|
}
|
|
53
53
|
return e;
|
|
54
54
|
}
|
|
55
|
-
function _regeneratorRuntime() {
|
|
56
|
-
_regeneratorRuntime = function () {
|
|
57
|
-
return e;
|
|
58
|
-
};
|
|
59
|
-
var t,
|
|
60
|
-
e = {},
|
|
61
|
-
r = Object.prototype,
|
|
62
|
-
n = r.hasOwnProperty,
|
|
63
|
-
o = Object.defineProperty || function (t, e, r) {
|
|
64
|
-
t[e] = r.value;
|
|
65
|
-
},
|
|
66
|
-
i = "function" == typeof Symbol ? Symbol : {},
|
|
67
|
-
a = i.iterator || "@@iterator",
|
|
68
|
-
c = i.asyncIterator || "@@asyncIterator",
|
|
69
|
-
u = i.toStringTag || "@@toStringTag";
|
|
70
|
-
function define(t, e, r) {
|
|
71
|
-
return Object.defineProperty(t, e, {
|
|
72
|
-
value: r,
|
|
73
|
-
enumerable: !0,
|
|
74
|
-
configurable: !0,
|
|
75
|
-
writable: !0
|
|
76
|
-
}), t[e];
|
|
77
|
-
}
|
|
78
|
-
try {
|
|
79
|
-
define({}, "");
|
|
80
|
-
} catch (t) {
|
|
81
|
-
define = function (t, e, r) {
|
|
82
|
-
return t[e] = r;
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
function wrap(t, e, r, n) {
|
|
86
|
-
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
87
|
-
a = Object.create(i.prototype),
|
|
88
|
-
c = new Context(n || []);
|
|
89
|
-
return o(a, "_invoke", {
|
|
90
|
-
value: makeInvokeMethod(t, r, c)
|
|
91
|
-
}), a;
|
|
92
|
-
}
|
|
93
|
-
function tryCatch(t, e, r) {
|
|
94
|
-
try {
|
|
95
|
-
return {
|
|
96
|
-
type: "normal",
|
|
97
|
-
arg: t.call(e, r)
|
|
98
|
-
};
|
|
99
|
-
} catch (t) {
|
|
100
|
-
return {
|
|
101
|
-
type: "throw",
|
|
102
|
-
arg: t
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
e.wrap = wrap;
|
|
107
|
-
var h = "suspendedStart",
|
|
108
|
-
l = "suspendedYield",
|
|
109
|
-
f = "executing",
|
|
110
|
-
s = "completed",
|
|
111
|
-
y = {};
|
|
112
|
-
function Generator() {}
|
|
113
|
-
function GeneratorFunction() {}
|
|
114
|
-
function GeneratorFunctionPrototype() {}
|
|
115
|
-
var p = {};
|
|
116
|
-
define(p, a, function () {
|
|
117
|
-
return this;
|
|
118
|
-
});
|
|
119
|
-
var d = Object.getPrototypeOf,
|
|
120
|
-
v = d && d(d(values([])));
|
|
121
|
-
v && v !== r && n.call(v, a) && (p = v);
|
|
122
|
-
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
123
|
-
function defineIteratorMethods(t) {
|
|
124
|
-
["next", "throw", "return"].forEach(function (e) {
|
|
125
|
-
define(t, e, function (t) {
|
|
126
|
-
return this._invoke(e, t);
|
|
127
|
-
});
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
function AsyncIterator(t, e) {
|
|
131
|
-
function invoke(r, o, i, a) {
|
|
132
|
-
var c = tryCatch(t[r], t, o);
|
|
133
|
-
if ("throw" !== c.type) {
|
|
134
|
-
var u = c.arg,
|
|
135
|
-
h = u.value;
|
|
136
|
-
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
137
|
-
invoke("next", t, i, a);
|
|
138
|
-
}, function (t) {
|
|
139
|
-
invoke("throw", t, i, a);
|
|
140
|
-
}) : e.resolve(h).then(function (t) {
|
|
141
|
-
u.value = t, i(u);
|
|
142
|
-
}, function (t) {
|
|
143
|
-
return invoke("throw", t, i, a);
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
a(c.arg);
|
|
147
|
-
}
|
|
148
|
-
var r;
|
|
149
|
-
o(this, "_invoke", {
|
|
150
|
-
value: function (t, n) {
|
|
151
|
-
function callInvokeWithMethodAndArg() {
|
|
152
|
-
return new e(function (e, r) {
|
|
153
|
-
invoke(t, n, e, r);
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
function makeInvokeMethod(e, r, n) {
|
|
161
|
-
var o = h;
|
|
162
|
-
return function (i, a) {
|
|
163
|
-
if (o === f) throw new Error("Generator is already running");
|
|
164
|
-
if (o === s) {
|
|
165
|
-
if ("throw" === i) throw a;
|
|
166
|
-
return {
|
|
167
|
-
value: t,
|
|
168
|
-
done: !0
|
|
169
|
-
};
|
|
170
|
-
}
|
|
171
|
-
for (n.method = i, n.arg = a;;) {
|
|
172
|
-
var c = n.delegate;
|
|
173
|
-
if (c) {
|
|
174
|
-
var u = maybeInvokeDelegate(c, n);
|
|
175
|
-
if (u) {
|
|
176
|
-
if (u === y) continue;
|
|
177
|
-
return u;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
181
|
-
if (o === h) throw o = s, n.arg;
|
|
182
|
-
n.dispatchException(n.arg);
|
|
183
|
-
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
184
|
-
o = f;
|
|
185
|
-
var p = tryCatch(e, r, n);
|
|
186
|
-
if ("normal" === p.type) {
|
|
187
|
-
if (o = n.done ? s : l, p.arg === y) continue;
|
|
188
|
-
return {
|
|
189
|
-
value: p.arg,
|
|
190
|
-
done: n.done
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
194
|
-
}
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
function maybeInvokeDelegate(e, r) {
|
|
198
|
-
var n = r.method,
|
|
199
|
-
o = e.iterator[n];
|
|
200
|
-
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
201
|
-
var i = tryCatch(o, e.iterator, r.arg);
|
|
202
|
-
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
203
|
-
var a = i.arg;
|
|
204
|
-
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
205
|
-
}
|
|
206
|
-
function pushTryEntry(t) {
|
|
207
|
-
var e = {
|
|
208
|
-
tryLoc: t[0]
|
|
209
|
-
};
|
|
210
|
-
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
211
|
-
}
|
|
212
|
-
function resetTryEntry(t) {
|
|
213
|
-
var e = t.completion || {};
|
|
214
|
-
e.type = "normal", delete e.arg, t.completion = e;
|
|
215
|
-
}
|
|
216
|
-
function Context(t) {
|
|
217
|
-
this.tryEntries = [{
|
|
218
|
-
tryLoc: "root"
|
|
219
|
-
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
220
|
-
}
|
|
221
|
-
function values(e) {
|
|
222
|
-
if (e || "" === e) {
|
|
223
|
-
var r = e[a];
|
|
224
|
-
if (r) return r.call(e);
|
|
225
|
-
if ("function" == typeof e.next) return e;
|
|
226
|
-
if (!isNaN(e.length)) {
|
|
227
|
-
var o = -1,
|
|
228
|
-
i = function next() {
|
|
229
|
-
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
230
|
-
return next.value = t, next.done = !0, next;
|
|
231
|
-
};
|
|
232
|
-
return i.next = i;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
throw new TypeError(typeof e + " is not iterable");
|
|
236
|
-
}
|
|
237
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
238
|
-
value: GeneratorFunctionPrototype,
|
|
239
|
-
configurable: !0
|
|
240
|
-
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
241
|
-
value: GeneratorFunction,
|
|
242
|
-
configurable: !0
|
|
243
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
244
|
-
var e = "function" == typeof t && t.constructor;
|
|
245
|
-
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
246
|
-
}, e.mark = function (t) {
|
|
247
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
248
|
-
}, e.awrap = function (t) {
|
|
249
|
-
return {
|
|
250
|
-
__await: t
|
|
251
|
-
};
|
|
252
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
253
|
-
return this;
|
|
254
|
-
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
255
|
-
void 0 === i && (i = Promise);
|
|
256
|
-
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
257
|
-
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
258
|
-
return t.done ? t.value : a.next();
|
|
259
|
-
});
|
|
260
|
-
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
261
|
-
return this;
|
|
262
|
-
}), define(g, "toString", function () {
|
|
263
|
-
return "[object Generator]";
|
|
264
|
-
}), e.keys = function (t) {
|
|
265
|
-
var e = Object(t),
|
|
266
|
-
r = [];
|
|
267
|
-
for (var n in e) r.push(n);
|
|
268
|
-
return r.reverse(), function next() {
|
|
269
|
-
for (; r.length;) {
|
|
270
|
-
var t = r.pop();
|
|
271
|
-
if (t in e) return next.value = t, next.done = !1, next;
|
|
272
|
-
}
|
|
273
|
-
return next.done = !0, next;
|
|
274
|
-
};
|
|
275
|
-
}, e.values = values, Context.prototype = {
|
|
276
|
-
constructor: Context,
|
|
277
|
-
reset: function (e) {
|
|
278
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
279
|
-
},
|
|
280
|
-
stop: function () {
|
|
281
|
-
this.done = !0;
|
|
282
|
-
var t = this.tryEntries[0].completion;
|
|
283
|
-
if ("throw" === t.type) throw t.arg;
|
|
284
|
-
return this.rval;
|
|
285
|
-
},
|
|
286
|
-
dispatchException: function (e) {
|
|
287
|
-
if (this.done) throw e;
|
|
288
|
-
var r = this;
|
|
289
|
-
function handle(n, o) {
|
|
290
|
-
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
291
|
-
}
|
|
292
|
-
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
293
|
-
var i = this.tryEntries[o],
|
|
294
|
-
a = i.completion;
|
|
295
|
-
if ("root" === i.tryLoc) return handle("end");
|
|
296
|
-
if (i.tryLoc <= this.prev) {
|
|
297
|
-
var c = n.call(i, "catchLoc"),
|
|
298
|
-
u = n.call(i, "finallyLoc");
|
|
299
|
-
if (c && u) {
|
|
300
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
301
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
302
|
-
} else if (c) {
|
|
303
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
304
|
-
} else {
|
|
305
|
-
if (!u) throw new Error("try statement without catch or finally");
|
|
306
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
},
|
|
311
|
-
abrupt: function (t, e) {
|
|
312
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
313
|
-
var o = this.tryEntries[r];
|
|
314
|
-
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
315
|
-
var i = o;
|
|
316
|
-
break;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
320
|
-
var a = i ? i.completion : {};
|
|
321
|
-
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
322
|
-
},
|
|
323
|
-
complete: function (t, e) {
|
|
324
|
-
if ("throw" === t.type) throw t.arg;
|
|
325
|
-
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
326
|
-
},
|
|
327
|
-
finish: function (t) {
|
|
328
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
329
|
-
var r = this.tryEntries[e];
|
|
330
|
-
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
331
|
-
}
|
|
332
|
-
},
|
|
333
|
-
catch: function (t) {
|
|
334
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
335
|
-
var r = this.tryEntries[e];
|
|
336
|
-
if (r.tryLoc === t) {
|
|
337
|
-
var n = r.completion;
|
|
338
|
-
if ("throw" === n.type) {
|
|
339
|
-
var o = n.arg;
|
|
340
|
-
resetTryEntry(r);
|
|
341
|
-
}
|
|
342
|
-
return o;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
throw new Error("illegal catch attempt");
|
|
346
|
-
},
|
|
347
|
-
delegateYield: function (e, r, n) {
|
|
348
|
-
return this.delegate = {
|
|
349
|
-
iterator: values(e),
|
|
350
|
-
resultName: r,
|
|
351
|
-
nextLoc: n
|
|
352
|
-
}, "next" === this.method && (this.arg = t), y;
|
|
353
|
-
}
|
|
354
|
-
}, e;
|
|
355
|
-
}
|
|
356
55
|
function _typeof(o) {
|
|
357
56
|
"@babel/helpers - typeof";
|
|
358
57
|
|
|
@@ -684,7 +383,7 @@
|
|
|
684
383
|
// the empty string is set in case if version not provided.
|
|
685
384
|
//
|
|
686
385
|
// e.g: grunt build --sdk-version=v1.0.0
|
|
687
|
-
SDK._version = 'v1.
|
|
386
|
+
SDK._version = 'v1.106.1';
|
|
688
387
|
|
|
689
388
|
var ENV = {
|
|
690
389
|
SANDBOX: 'sandbox',
|
|
@@ -939,7 +638,7 @@
|
|
|
939
638
|
var SECURE_3D = '/3ds/webhook';
|
|
940
639
|
var FLYPAY_LINK = '/wallet/flypay';
|
|
941
640
|
var FLYPAY_LOGO_LINK = '/images/logo.png';
|
|
942
|
-
var
|
|
641
|
+
var MASTERCARD_SRC = '/secure-remote-commerce/mastercard';
|
|
943
642
|
var Link = /*#__PURE__*/function () {
|
|
944
643
|
function Link(linkResource) {
|
|
945
644
|
_classCallCheck(this, Link);
|
|
@@ -2218,6 +1917,8 @@
|
|
|
2218
1917
|
CHECKOUT_READY: 'checkoutReady',
|
|
2219
1918
|
CHECKOUT_ERROR: 'checkoutError',
|
|
2220
1919
|
CHECKOUT_COMPLETED: 'checkoutCompleted',
|
|
1920
|
+
CHECKOUT_POPUP_OPEN: 'checkoutPopupOpen',
|
|
1921
|
+
CHECKOUT_POPUP_CLOSE: 'checkoutPopupClose',
|
|
2221
1922
|
VALIDATION: 'validation',
|
|
2222
1923
|
SELECT: 'select',
|
|
2223
1924
|
UNSELECT: 'unselect',
|
|
@@ -3875,514 +3576,429 @@
|
|
|
3875
3576
|
}
|
|
3876
3577
|
|
|
3877
3578
|
var zipmoney = createCommonjsModule(function (module) {
|
|
3878
|
-
!function e
|
|
3879
|
-
function o(u,
|
|
3579
|
+
!function t(e, n, r) {
|
|
3580
|
+
function o(u, a) {
|
|
3880
3581
|
if (!n[u]) {
|
|
3881
|
-
if (!
|
|
3882
|
-
var
|
|
3883
|
-
if (!
|
|
3582
|
+
if (!e[u]) {
|
|
3583
|
+
var c = "function" == typeof commonjsRequire && commonjsRequire;
|
|
3584
|
+
if (!a && c) return c(u, !0);
|
|
3884
3585
|
if (i) return i(u, !0);
|
|
3885
|
-
var s =
|
|
3586
|
+
var s = Error("Cannot find module '" + u + "'");
|
|
3886
3587
|
throw s.code = "MODULE_NOT_FOUND", s;
|
|
3887
3588
|
}
|
|
3888
3589
|
var f = n[u] = {
|
|
3889
3590
|
exports: {}
|
|
3890
3591
|
};
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
}, f, f.exports, e, t, n, r);
|
|
3592
|
+
e[u][0].call(f.exports, function (t) {
|
|
3593
|
+
return o(e[u][1][t] || t);
|
|
3594
|
+
}, f, f.exports, t, e, n, r);
|
|
3895
3595
|
}
|
|
3896
3596
|
return n[u].exports;
|
|
3897
3597
|
}
|
|
3898
3598
|
for (var i = "function" == typeof commonjsRequire && commonjsRequire, u = 0; u < r.length; u++) o(r[u]);
|
|
3899
3599
|
return o;
|
|
3900
3600
|
}({
|
|
3901
|
-
1: [function (
|
|
3601
|
+
1: [function (t, e, n) {
|
|
3902
3602
|
function r() {
|
|
3903
|
-
throw
|
|
3603
|
+
throw Error("setTimeout has not been defined");
|
|
3904
3604
|
}
|
|
3905
3605
|
function o() {
|
|
3906
|
-
throw
|
|
3907
|
-
}
|
|
3908
|
-
function i(e) {
|
|
3909
|
-
if (l === setTimeout) return setTimeout(e, 0);
|
|
3910
|
-
if ((l === r || !l) && setTimeout) return l = setTimeout, setTimeout(e, 0);
|
|
3911
|
-
try {
|
|
3912
|
-
return l(e, 0);
|
|
3913
|
-
} catch (t) {
|
|
3914
|
-
try {
|
|
3915
|
-
return l.call(null, e, 0);
|
|
3916
|
-
} catch (t) {
|
|
3917
|
-
return l.call(this, e, 0);
|
|
3918
|
-
}
|
|
3919
|
-
}
|
|
3606
|
+
throw Error("clearTimeout has not been defined");
|
|
3920
3607
|
}
|
|
3921
|
-
function
|
|
3922
|
-
if (
|
|
3923
|
-
if ((
|
|
3608
|
+
function i(t) {
|
|
3609
|
+
if (f === setTimeout) return setTimeout(t, 0);
|
|
3610
|
+
if ((f === r || !f) && setTimeout) return f = setTimeout, setTimeout(t, 0);
|
|
3924
3611
|
try {
|
|
3925
|
-
return
|
|
3926
|
-
} catch (
|
|
3612
|
+
return f(t, 0);
|
|
3613
|
+
} catch (e) {
|
|
3927
3614
|
try {
|
|
3928
|
-
return
|
|
3929
|
-
} catch (
|
|
3930
|
-
return
|
|
3615
|
+
return f.call(null, t, 0);
|
|
3616
|
+
} catch (n) {
|
|
3617
|
+
return f.call(this, t, 0);
|
|
3931
3618
|
}
|
|
3932
3619
|
}
|
|
3933
3620
|
}
|
|
3934
|
-
function
|
|
3935
|
-
|
|
3621
|
+
function u() {
|
|
3622
|
+
v && d && (v = !1, d.length ? h = d.concat(h) : y = -1, h.length && a());
|
|
3936
3623
|
}
|
|
3937
3624
|
function a() {
|
|
3938
|
-
if (!
|
|
3939
|
-
var
|
|
3940
|
-
|
|
3941
|
-
for (var
|
|
3942
|
-
for (
|
|
3943
|
-
|
|
3625
|
+
if (!v) {
|
|
3626
|
+
var t = i(u);
|
|
3627
|
+
v = !0;
|
|
3628
|
+
for (var e = h.length; e;) {
|
|
3629
|
+
for (d = h, h = []; ++y < e;) d && d[y].run();
|
|
3630
|
+
y = -1, e = h.length;
|
|
3944
3631
|
}
|
|
3945
|
-
|
|
3632
|
+
d = null, v = !1, function t(e) {
|
|
3633
|
+
if (l === clearTimeout) return clearTimeout(e);
|
|
3634
|
+
if ((l === o || !l) && clearTimeout) return l = clearTimeout, clearTimeout(e);
|
|
3635
|
+
try {
|
|
3636
|
+
return l(e);
|
|
3637
|
+
} catch (n) {
|
|
3638
|
+
try {
|
|
3639
|
+
return l.call(null, e);
|
|
3640
|
+
} catch (r) {
|
|
3641
|
+
return l.call(this, e);
|
|
3642
|
+
}
|
|
3643
|
+
}
|
|
3644
|
+
}(t);
|
|
3946
3645
|
}
|
|
3947
3646
|
}
|
|
3948
|
-
function
|
|
3949
|
-
this.fun =
|
|
3647
|
+
function c(t, e) {
|
|
3648
|
+
this.fun = t, this.array = e;
|
|
3950
3649
|
}
|
|
3951
|
-
function
|
|
3952
|
-
var
|
|
3953
|
-
|
|
3954
|
-
|
|
3650
|
+
function s() {}
|
|
3651
|
+
var f,
|
|
3652
|
+
l,
|
|
3653
|
+
p = e.exports = {};
|
|
3955
3654
|
!function () {
|
|
3956
3655
|
try {
|
|
3957
|
-
|
|
3958
|
-
} catch (
|
|
3959
|
-
|
|
3656
|
+
f = "function" == typeof setTimeout ? setTimeout : r;
|
|
3657
|
+
} catch (t) {
|
|
3658
|
+
f = r;
|
|
3960
3659
|
}
|
|
3961
3660
|
try {
|
|
3962
|
-
|
|
3661
|
+
l = "function" == typeof clearTimeout ? clearTimeout : o;
|
|
3963
3662
|
} catch (e) {
|
|
3964
|
-
|
|
3663
|
+
l = o;
|
|
3965
3664
|
}
|
|
3966
3665
|
}();
|
|
3967
|
-
var
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
var
|
|
3973
|
-
if (arguments.length > 1) for (var n = 1; n < arguments.length; n++)
|
|
3974
|
-
|
|
3975
|
-
},
|
|
3666
|
+
var d,
|
|
3667
|
+
h = [],
|
|
3668
|
+
v = !1,
|
|
3669
|
+
y = -1;
|
|
3670
|
+
p.nextTick = function (t) {
|
|
3671
|
+
var e = Array(arguments.length - 1);
|
|
3672
|
+
if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
|
|
3673
|
+
h.push(new c(t, e)), 1 !== h.length || v || i(a);
|
|
3674
|
+
}, c.prototype.run = function () {
|
|
3976
3675
|
this.fun.apply(null, this.array);
|
|
3977
|
-
},
|
|
3676
|
+
}, p.title = "browser", p.browser = !0, p.env = {}, p.argv = [], p.version = "", p.versions = {}, p.on = s, p.addListener = s, p.once = s, p.off = s, p.removeListener = s, p.removeAllListeners = s, p.emit = s, p.prependListener = s, p.prependOnceListener = s, p.listeners = function (t) {
|
|
3978
3677
|
return [];
|
|
3979
|
-
},
|
|
3980
|
-
throw
|
|
3981
|
-
},
|
|
3678
|
+
}, p.binding = function (t) {
|
|
3679
|
+
throw Error("process.binding is not supported");
|
|
3680
|
+
}, p.cwd = function () {
|
|
3982
3681
|
return "/";
|
|
3983
|
-
},
|
|
3984
|
-
throw
|
|
3985
|
-
},
|
|
3682
|
+
}, p.chdir = function (t) {
|
|
3683
|
+
throw Error("process.chdir is not supported");
|
|
3684
|
+
}, p.umask = function () {
|
|
3986
3685
|
return 0;
|
|
3987
3686
|
};
|
|
3988
3687
|
}, {}],
|
|
3989
|
-
2: [function (
|
|
3990
|
-
(function (
|
|
3991
|
-
!function (
|
|
3688
|
+
2: [function (t, e, n) {
|
|
3689
|
+
(function (t) {
|
|
3690
|
+
!function (t) {
|
|
3992
3691
|
|
|
3993
|
-
if ("function" == typeof bootstrap) bootstrap("promise",
|
|
3692
|
+
if ("function" == typeof bootstrap) bootstrap("promise", t);else if ("object" == _typeof(n) && "object" == _typeof(e)) e.exports = t();else if ("undefined" != typeof ses) {
|
|
3994
3693
|
if (!ses.ok()) return;
|
|
3995
|
-
ses.makeQ =
|
|
3694
|
+
ses.makeQ = t;
|
|
3996
3695
|
} else {
|
|
3997
|
-
if ("undefined" == typeof window && "undefined" == typeof self) throw
|
|
3696
|
+
if ("undefined" == typeof window && "undefined" == typeof self) throw Error("This environment was not anticipated by Q. Please file a bug.");
|
|
3998
3697
|
var r = "undefined" != typeof window ? window : self,
|
|
3999
3698
|
o = r.Q;
|
|
4000
|
-
r.Q =
|
|
3699
|
+
r.Q = t(), r.Q.noConflict = function () {
|
|
4001
3700
|
return r.Q = o, this;
|
|
4002
3701
|
};
|
|
4003
3702
|
}
|
|
4004
3703
|
}(function () {
|
|
4005
3704
|
|
|
4006
|
-
function t
|
|
3705
|
+
function e(t) {
|
|
4007
3706
|
return function () {
|
|
4008
|
-
return
|
|
3707
|
+
return M.apply(t, arguments);
|
|
4009
3708
|
};
|
|
4010
3709
|
}
|
|
4011
|
-
function n(e) {
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
return "[object StopIteration]" === ne(e) || e instanceof F;
|
|
4016
|
-
}
|
|
4017
|
-
function o(e, t) {
|
|
4018
|
-
if (N && t.stack && "object" == _typeof(e) && null !== e && e.stack) {
|
|
4019
|
-
for (var n = [], r = t; r; r = r.source) r.stack && (!e.__minimumStackCounter__ || e.__minimumStackCounter__ > r.stackCounter) && (K(e, "__minimumStackCounter__", {
|
|
4020
|
-
value: r.stackCounter,
|
|
3710
|
+
function n(t, e) {
|
|
3711
|
+
if (x && e.stack && "object" == _typeof(t) && null !== t && t.stack) {
|
|
3712
|
+
for (var n = [], o = e; o; o = o.source) o.stack && (!t.__minimumStackCounter__ || t.__minimumStackCounter__ > o.stackCounter) && (U(t, "__minimumStackCounter__", {
|
|
3713
|
+
value: o.stackCounter,
|
|
4021
3714
|
configurable: !0
|
|
4022
|
-
}), n.unshift(
|
|
4023
|
-
n.unshift(
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
3715
|
+
}), n.unshift(o.stack));
|
|
3716
|
+
n.unshift(t.stack), U(t, "stack", {
|
|
3717
|
+
value: function t(e) {
|
|
3718
|
+
for (var n = e.split("\n"), o = [], u = 0; u < n.length; ++u) {
|
|
3719
|
+
var a = n[u];
|
|
3720
|
+
i(a) || r(a) || !a || o.push(a);
|
|
3721
|
+
}
|
|
3722
|
+
return o.join("\n");
|
|
3723
|
+
}(n.join("\n" + I + "\n")),
|
|
4028
3724
|
configurable: !0
|
|
4029
3725
|
});
|
|
4030
3726
|
}
|
|
4031
3727
|
}
|
|
4032
|
-
function
|
|
4033
|
-
|
|
4034
|
-
var o = t[r];
|
|
4035
|
-
a(o) || u(o) || !o || n.push(o);
|
|
4036
|
-
}
|
|
4037
|
-
return n.join("\n");
|
|
4038
|
-
}
|
|
4039
|
-
function u(e) {
|
|
4040
|
-
return -1 !== e.indexOf("(module.js:") || -1 !== e.indexOf("(node.js:");
|
|
3728
|
+
function r(t) {
|
|
3729
|
+
return -1 !== t.indexOf("(module.js:") || -1 !== t.indexOf("(node.js:");
|
|
4041
3730
|
}
|
|
4042
|
-
function
|
|
4043
|
-
var
|
|
4044
|
-
if (
|
|
4045
|
-
var n = /at ([^ ]+):(\d+):(?:\d+)$/.exec(
|
|
3731
|
+
function o(t) {
|
|
3732
|
+
var e = /at .+ \((.+):(\d+):(?:\d+)\)$/.exec(t);
|
|
3733
|
+
if (e) return [e[1], Number(e[2])];
|
|
3734
|
+
var n = /at ([^ ]+):(\d+):(?:\d+)$/.exec(t);
|
|
4046
3735
|
if (n) return [n[1], Number(n[2])];
|
|
4047
|
-
var r = /.*@(.+):(\d+)$/.exec(
|
|
3736
|
+
var r = /.*@(.+):(\d+)$/.exec(t);
|
|
4048
3737
|
return r ? [r[1], Number(r[2])] : void 0;
|
|
4049
3738
|
}
|
|
4050
|
-
function
|
|
4051
|
-
var
|
|
4052
|
-
if (!
|
|
4053
|
-
var n =
|
|
4054
|
-
r =
|
|
4055
|
-
return n ===
|
|
3739
|
+
function i(t) {
|
|
3740
|
+
var e = o(t);
|
|
3741
|
+
if (!e) return !1;
|
|
3742
|
+
var n = e[0],
|
|
3743
|
+
r = e[1];
|
|
3744
|
+
return n === j && r >= C && r <= Z;
|
|
4056
3745
|
}
|
|
4057
|
-
function
|
|
4058
|
-
if (
|
|
4059
|
-
throw
|
|
4060
|
-
} catch (
|
|
4061
|
-
var e =
|
|
4062
|
-
|
|
4063
|
-
n = c(t);
|
|
3746
|
+
function u() {
|
|
3747
|
+
if (x) try {
|
|
3748
|
+
throw Error();
|
|
3749
|
+
} catch (t) {
|
|
3750
|
+
var e = t.stack.split("\n"),
|
|
3751
|
+
n = o(e[0].indexOf("@") > 0 ? e[1] : e[2]);
|
|
4064
3752
|
if (!n) return;
|
|
4065
|
-
return
|
|
3753
|
+
return j = n[0], n[1];
|
|
4066
3754
|
}
|
|
4067
3755
|
}
|
|
4068
|
-
function
|
|
4069
|
-
|
|
3756
|
+
function a(t) {
|
|
3757
|
+
var e, n;
|
|
3758
|
+
return t instanceof l ? t : v(t) ? (e = t, n = c(), a.nextTick(function () {
|
|
3759
|
+
try {
|
|
3760
|
+
e.then(n.resolve, n.reject, n.notify);
|
|
3761
|
+
} catch (t) {
|
|
3762
|
+
n.reject(t);
|
|
3763
|
+
}
|
|
3764
|
+
}), n.promise) : $(t);
|
|
4070
3765
|
}
|
|
4071
|
-
function
|
|
4072
|
-
function
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
3766
|
+
function c() {
|
|
3767
|
+
function t(t) {
|
|
3768
|
+
e = t, a.longStackSupport && x && (i.source = t), L(n, function (e, n) {
|
|
3769
|
+
a.nextTick(function () {
|
|
3770
|
+
t.promiseDispatch.apply(t, n);
|
|
4076
3771
|
});
|
|
4077
3772
|
}, void 0), n = void 0, r = void 0;
|
|
4078
3773
|
}
|
|
4079
|
-
var
|
|
3774
|
+
var e,
|
|
4080
3775
|
n = [],
|
|
4081
3776
|
r = [],
|
|
4082
|
-
o =
|
|
4083
|
-
i =
|
|
4084
|
-
if (i.promiseDispatch = function (
|
|
4085
|
-
var u =
|
|
4086
|
-
n ? (n.push(u), "when" === o && i[1] && r.push(i[1])) :
|
|
4087
|
-
|
|
3777
|
+
o = H(c.prototype),
|
|
3778
|
+
i = H(l.prototype);
|
|
3779
|
+
if (i.promiseDispatch = function (t, o, i) {
|
|
3780
|
+
var u = P(arguments);
|
|
3781
|
+
n ? (n.push(u), "when" === o && i[1] && r.push(i[1])) : a.nextTick(function () {
|
|
3782
|
+
e.promiseDispatch.apply(e, u);
|
|
4088
3783
|
});
|
|
4089
3784
|
}, i.valueOf = function () {
|
|
4090
3785
|
if (n) return i;
|
|
4091
|
-
var
|
|
4092
|
-
return
|
|
3786
|
+
var t = d(e);
|
|
3787
|
+
return h(t) && (e = t), t;
|
|
4093
3788
|
}, i.inspect = function () {
|
|
4094
|
-
return
|
|
3789
|
+
return e ? e.inspect() : {
|
|
4095
3790
|
state: "pending"
|
|
4096
3791
|
};
|
|
4097
|
-
},
|
|
4098
|
-
throw
|
|
4099
|
-
} catch (
|
|
4100
|
-
i.stack =
|
|
3792
|
+
}, a.longStackSupport && x) try {
|
|
3793
|
+
throw Error();
|
|
3794
|
+
} catch (u) {
|
|
3795
|
+
i.stack = u.stack.substring(u.stack.indexOf("\n") + 1), i.stackCounter = N++;
|
|
4101
3796
|
}
|
|
4102
3797
|
return o.promise = i, o.resolve = function (n) {
|
|
4103
|
-
|
|
3798
|
+
e || t(a(n));
|
|
4104
3799
|
}, o.fulfill = function (n) {
|
|
4105
|
-
|
|
3800
|
+
e || t($(n));
|
|
4106
3801
|
}, o.reject = function (n) {
|
|
4107
|
-
|
|
4108
|
-
}, o.notify = function (
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
n(
|
|
3802
|
+
e || t(m(n));
|
|
3803
|
+
}, o.notify = function (t) {
|
|
3804
|
+
e || L(r, function (e, n) {
|
|
3805
|
+
a.nextTick(function () {
|
|
3806
|
+
n(t);
|
|
4112
3807
|
});
|
|
4113
3808
|
}, void 0);
|
|
4114
3809
|
}, o;
|
|
4115
3810
|
}
|
|
4116
|
-
function
|
|
4117
|
-
if ("function" != typeof
|
|
4118
|
-
var
|
|
3811
|
+
function s(t) {
|
|
3812
|
+
if ("function" != typeof t) throw TypeError("resolver must be a function.");
|
|
3813
|
+
var e = c();
|
|
4119
3814
|
try {
|
|
4120
|
-
e
|
|
4121
|
-
} catch (
|
|
4122
|
-
|
|
3815
|
+
t(e.resolve, e.reject, e.notify);
|
|
3816
|
+
} catch (n) {
|
|
3817
|
+
e.reject(n);
|
|
4123
3818
|
}
|
|
4124
|
-
return
|
|
3819
|
+
return e.promise;
|
|
4125
3820
|
}
|
|
4126
|
-
function
|
|
4127
|
-
return
|
|
4128
|
-
for (var r = 0, o =
|
|
3821
|
+
function f(t) {
|
|
3822
|
+
return s(function (e, n) {
|
|
3823
|
+
for (var r = 0, o = t.length; r < o; r++) a(t[r]).then(e, n);
|
|
4129
3824
|
});
|
|
4130
3825
|
}
|
|
4131
|
-
function
|
|
4132
|
-
void 0 ===
|
|
4133
|
-
return
|
|
3826
|
+
function l(t, e, n) {
|
|
3827
|
+
void 0 === e && (e = function e(t) {
|
|
3828
|
+
return m(Error("Promise does not support operation: " + t));
|
|
4134
3829
|
}), void 0 === n && (n = function n() {
|
|
4135
3830
|
return {
|
|
4136
3831
|
state: "unknown"
|
|
4137
3832
|
};
|
|
4138
3833
|
});
|
|
4139
|
-
var r =
|
|
3834
|
+
var r = H(l.prototype);
|
|
4140
3835
|
if (r.promiseDispatch = function (n, o, i) {
|
|
4141
3836
|
var u;
|
|
4142
3837
|
try {
|
|
4143
|
-
u =
|
|
4144
|
-
} catch (
|
|
4145
|
-
u =
|
|
3838
|
+
u = t[o] ? t[o].apply(r, i) : e.call(r, o, i);
|
|
3839
|
+
} catch (a) {
|
|
3840
|
+
u = m(a);
|
|
4146
3841
|
}
|
|
4147
3842
|
n && n(u);
|
|
4148
3843
|
}, r.inspect = n, n) {
|
|
4149
3844
|
var o = n();
|
|
4150
3845
|
"rejected" === o.state && (r.exception = o.reason), r.valueOf = function () {
|
|
4151
|
-
var
|
|
4152
|
-
return "pending" ===
|
|
3846
|
+
var t = n();
|
|
3847
|
+
return "pending" === t.state || "rejected" === t.state ? r : t.value;
|
|
4153
3848
|
};
|
|
4154
3849
|
}
|
|
4155
3850
|
return r;
|
|
4156
3851
|
}
|
|
4157
|
-
function
|
|
4158
|
-
return
|
|
3852
|
+
function p(t, e, n, r) {
|
|
3853
|
+
return a(t).then(e, n, r);
|
|
4159
3854
|
}
|
|
4160
|
-
function
|
|
4161
|
-
if (
|
|
4162
|
-
var
|
|
4163
|
-
if ("fulfilled" ===
|
|
3855
|
+
function d(t) {
|
|
3856
|
+
if (h(t)) {
|
|
3857
|
+
var e = t.inspect();
|
|
3858
|
+
if ("fulfilled" === e.state) return e.value;
|
|
4164
3859
|
}
|
|
4165
|
-
return
|
|
4166
|
-
}
|
|
4167
|
-
function m(e) {
|
|
4168
|
-
return e instanceof h;
|
|
4169
|
-
}
|
|
4170
|
-
function g(e) {
|
|
4171
|
-
return n(e) && "function" == typeof e.then;
|
|
4172
|
-
}
|
|
4173
|
-
function b(e) {
|
|
4174
|
-
return m(e) && "pending" === e.inspect().state;
|
|
4175
|
-
}
|
|
4176
|
-
function w(e) {
|
|
4177
|
-
return !m(e) || "fulfilled" === e.inspect().state;
|
|
3860
|
+
return t;
|
|
4178
3861
|
}
|
|
4179
|
-
function
|
|
4180
|
-
return
|
|
3862
|
+
function h(t) {
|
|
3863
|
+
return t instanceof l;
|
|
4181
3864
|
}
|
|
4182
|
-
function
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
function _(t, n) {
|
|
4186
|
-
ae && ("object" == _typeof(e) && "function" == typeof e.emit && f.nextTick.runAfter(function () {
|
|
4187
|
-
-1 !== J(ue, t) && (e.emit("unhandledRejection", n, t), ce.push(t));
|
|
4188
|
-
}), ue.push(t), n && void 0 !== n.stack ? ie.push(n.stack) : ie.push("(no stack) " + n));
|
|
3865
|
+
function v(t) {
|
|
3866
|
+
var e;
|
|
3867
|
+
return (e = t) === Object(e) && "function" == typeof t.then;
|
|
4189
3868
|
}
|
|
4190
|
-
function
|
|
4191
|
-
|
|
4192
|
-
var n = J(ue, t);
|
|
4193
|
-
-1 !== n && ("object" == _typeof(e) && "function" == typeof e.emit && f.nextTick.runAfter(function () {
|
|
4194
|
-
var r = J(ce, t);
|
|
4195
|
-
-1 !== r && (e.emit("rejectionHandled", ie[n], t), ce.splice(r, 1));
|
|
4196
|
-
}), ue.splice(n, 1), ie.splice(n, 1));
|
|
4197
|
-
}
|
|
3869
|
+
function y() {
|
|
3870
|
+
Q.length = 0, F.length = 0, G || (G = !0);
|
|
4198
3871
|
}
|
|
4199
|
-
function
|
|
4200
|
-
var
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
3872
|
+
function m(e) {
|
|
3873
|
+
var n,
|
|
3874
|
+
r,
|
|
3875
|
+
o = l({
|
|
3876
|
+
when: function when(n) {
|
|
3877
|
+
return n && function e(n) {
|
|
3878
|
+
if (G) {
|
|
3879
|
+
var r = z(F, n);
|
|
3880
|
+
-1 !== r && ("object" == _typeof(t) && "function" == typeof t.emit && a.nextTick.runAfter(function () {
|
|
3881
|
+
var e = z(B, n);
|
|
3882
|
+
-1 !== e && (t.emit("rejectionHandled", Q[r], n), B.splice(e, 1));
|
|
3883
|
+
}), F.splice(r, 1), Q.splice(r, 1));
|
|
3884
|
+
}
|
|
3885
|
+
}(this), n ? n(e) : this;
|
|
3886
|
+
}
|
|
3887
|
+
}, function () {
|
|
3888
|
+
return this;
|
|
3889
|
+
}, function () {
|
|
3890
|
+
return {
|
|
3891
|
+
state: "rejected",
|
|
3892
|
+
reason: e
|
|
3893
|
+
};
|
|
3894
|
+
});
|
|
3895
|
+
return n = o, r = e, G && ("object" == _typeof(t) && "function" == typeof t.emit && a.nextTick.runAfter(function () {
|
|
3896
|
+
-1 !== z(F, n) && (t.emit("unhandledRejection", r, n), B.push(n));
|
|
3897
|
+
}), F.push(n), r && void 0 !== r.stack ? Q.push(r.stack) : Q.push("(no stack) " + r)), o;
|
|
4213
3898
|
}
|
|
4214
|
-
function
|
|
4215
|
-
return
|
|
3899
|
+
function $(t) {
|
|
3900
|
+
return l({
|
|
4216
3901
|
when: function when() {
|
|
4217
|
-
return
|
|
3902
|
+
return t;
|
|
4218
3903
|
},
|
|
4219
|
-
get: function get(
|
|
4220
|
-
return e
|
|
3904
|
+
get: function get(e) {
|
|
3905
|
+
return t[e];
|
|
4221
3906
|
},
|
|
4222
|
-
set: function set(
|
|
4223
|
-
e
|
|
3907
|
+
set: function set(e, n) {
|
|
3908
|
+
t[e] = n;
|
|
4224
3909
|
},
|
|
4225
|
-
"delete": function _delete(
|
|
4226
|
-
delete e
|
|
3910
|
+
"delete": function _delete(e) {
|
|
3911
|
+
delete t[e];
|
|
4227
3912
|
},
|
|
4228
|
-
post: function post(
|
|
4229
|
-
return null
|
|
3913
|
+
post: function post(e, n) {
|
|
3914
|
+
return null == e ? t.apply(void 0, n) : t[e].apply(t, n);
|
|
4230
3915
|
},
|
|
4231
|
-
apply: function apply(
|
|
4232
|
-
return
|
|
3916
|
+
apply: function apply(e, n) {
|
|
3917
|
+
return t.apply(e, n);
|
|
4233
3918
|
},
|
|
4234
3919
|
keys: function keys() {
|
|
4235
|
-
return
|
|
3920
|
+
return q(t);
|
|
4236
3921
|
}
|
|
4237
3922
|
}, void 0, function () {
|
|
4238
3923
|
return {
|
|
4239
3924
|
state: "fulfilled",
|
|
4240
|
-
value:
|
|
3925
|
+
value: t
|
|
4241
3926
|
};
|
|
4242
3927
|
});
|
|
4243
3928
|
}
|
|
4244
|
-
function
|
|
4245
|
-
|
|
4246
|
-
return f.nextTick(function () {
|
|
4247
|
-
try {
|
|
4248
|
-
e.then(t.resolve, t.reject, t.notify);
|
|
4249
|
-
} catch (e) {
|
|
4250
|
-
t.reject(e);
|
|
4251
|
-
}
|
|
4252
|
-
}), t.promise;
|
|
4253
|
-
}
|
|
4254
|
-
function C(e) {
|
|
4255
|
-
return h({
|
|
4256
|
-
isDef: function isDef() {}
|
|
4257
|
-
}, function (t, n) {
|
|
4258
|
-
return z(e, t, n);
|
|
4259
|
-
}, function () {
|
|
4260
|
-
return f(e).inspect();
|
|
4261
|
-
});
|
|
3929
|
+
function g(t, e, n) {
|
|
3930
|
+
return a(t).spread(e, n);
|
|
4262
3931
|
}
|
|
4263
|
-
function
|
|
4264
|
-
return
|
|
3932
|
+
function b(t, e, n) {
|
|
3933
|
+
return a(t).dispatch(e, n);
|
|
4265
3934
|
}
|
|
4266
|
-
function
|
|
4267
|
-
return function () {
|
|
4268
|
-
|
|
3935
|
+
function k(t) {
|
|
3936
|
+
return p(t, function (t) {
|
|
3937
|
+
var e = 0,
|
|
3938
|
+
n = c();
|
|
3939
|
+
return L(t, function (r, o, i) {
|
|
4269
3940
|
var u;
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
} catch (e) {
|
|
4274
|
-
return T(e);
|
|
4275
|
-
}
|
|
4276
|
-
return u.done ? f(u.value) : v(u.value, o, i);
|
|
4277
|
-
}
|
|
4278
|
-
try {
|
|
4279
|
-
u = n[e](t);
|
|
4280
|
-
} catch (e) {
|
|
4281
|
-
return r(e) ? f(e.value) : T(e);
|
|
4282
|
-
}
|
|
4283
|
-
return v(u, o, i);
|
|
4284
|
-
}
|
|
4285
|
-
var n = e.apply(this, arguments),
|
|
4286
|
-
o = t.bind(t, "next"),
|
|
4287
|
-
i = t.bind(t, "throw");
|
|
4288
|
-
return o();
|
|
4289
|
-
};
|
|
4290
|
-
}
|
|
4291
|
-
function S(e) {
|
|
4292
|
-
f.done(f.async(e)());
|
|
4293
|
-
}
|
|
4294
|
-
function P(e) {
|
|
4295
|
-
throw new F(e);
|
|
4296
|
-
}
|
|
4297
|
-
function L(e) {
|
|
4298
|
-
return function () {
|
|
4299
|
-
return R([this, H(arguments)], function (t, n) {
|
|
4300
|
-
return e.apply(t, n);
|
|
4301
|
-
});
|
|
4302
|
-
};
|
|
4303
|
-
}
|
|
4304
|
-
function z(e, t, n) {
|
|
4305
|
-
return f(e).dispatch(t, n);
|
|
4306
|
-
}
|
|
4307
|
-
function H(e) {
|
|
4308
|
-
return v(e, function (e) {
|
|
4309
|
-
var t = 0,
|
|
4310
|
-
n = l();
|
|
4311
|
-
return $(e, function (r, o, i) {
|
|
4312
|
-
var u;
|
|
4313
|
-
m(o) && "fulfilled" === (u = o.inspect()).state ? e[i] = u.value : (++t, v(o, function (r) {
|
|
4314
|
-
e[i] = r, 0 == --t && n.resolve(e);
|
|
4315
|
-
}, n.reject, function (e) {
|
|
3941
|
+
h(o) && "fulfilled" === (u = o.inspect()).state ? t[i] = u.value : (++e, p(o, function (r) {
|
|
3942
|
+
t[i] = r, 0 == --e && n.resolve(t);
|
|
3943
|
+
}, n.reject, function (t) {
|
|
4316
3944
|
n.notify({
|
|
4317
3945
|
index: i,
|
|
4318
|
-
value:
|
|
3946
|
+
value: t
|
|
4319
3947
|
});
|
|
4320
3948
|
}));
|
|
4321
|
-
}, void 0), 0 ===
|
|
3949
|
+
}, void 0), 0 === e && n.resolve(t), n.promise;
|
|
4322
3950
|
});
|
|
4323
3951
|
}
|
|
4324
|
-
function
|
|
4325
|
-
if (0 ===
|
|
4326
|
-
var
|
|
3952
|
+
function _(t) {
|
|
3953
|
+
if (0 === t.length) return a.resolve();
|
|
3954
|
+
var e = a.defer(),
|
|
4327
3955
|
n = 0;
|
|
4328
|
-
return
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
function
|
|
4333
|
-
0
|
|
4334
|
-
}
|
|
4335
|
-
|
|
4336
|
-
t.notify({
|
|
3956
|
+
return L(t, function (r, o, i) {
|
|
3957
|
+
var u = t[i];
|
|
3958
|
+
n++, p(u, function t(n) {
|
|
3959
|
+
e.resolve(n);
|
|
3960
|
+
}, function t(r) {
|
|
3961
|
+
0 == --n && (r.message = "Q can't get fulfillment value from any promise, all promises were rejected. Last error message: " + r.message, e.reject(r));
|
|
3962
|
+
}, function t(n) {
|
|
3963
|
+
e.notify({
|
|
4337
3964
|
index: i,
|
|
4338
|
-
value:
|
|
3965
|
+
value: n
|
|
4339
3966
|
});
|
|
4340
|
-
}
|
|
4341
|
-
|
|
4342
|
-
n++, v(s, u, c, a);
|
|
4343
|
-
}, void 0), t.promise;
|
|
3967
|
+
});
|
|
3968
|
+
}, void 0), e.promise;
|
|
4344
3969
|
}
|
|
4345
|
-
function
|
|
4346
|
-
return
|
|
4347
|
-
return
|
|
4348
|
-
return
|
|
3970
|
+
function w(t) {
|
|
3971
|
+
return p(t, function (t) {
|
|
3972
|
+
return t = S(t, a), p(k(S(t, function (t) {
|
|
3973
|
+
return p(t, R, R);
|
|
4349
3974
|
})), function () {
|
|
4350
|
-
return
|
|
3975
|
+
return t;
|
|
4351
3976
|
});
|
|
4352
3977
|
});
|
|
4353
3978
|
}
|
|
4354
|
-
|
|
4355
|
-
return f(e).allSettled();
|
|
4356
|
-
}
|
|
4357
|
-
function q(e, t) {
|
|
4358
|
-
return f(e).then(void 0, void 0, t);
|
|
4359
|
-
}
|
|
4360
|
-
function D(e, t) {
|
|
4361
|
-
return f(e).nodeify(t);
|
|
4362
|
-
}
|
|
4363
|
-
var N = !1;
|
|
3979
|
+
var x = !1;
|
|
4364
3980
|
try {
|
|
4365
|
-
throw
|
|
4366
|
-
} catch (
|
|
4367
|
-
|
|
3981
|
+
throw Error();
|
|
3982
|
+
} catch (E) {
|
|
3983
|
+
x = !!E.stack;
|
|
4368
3984
|
}
|
|
4369
|
-
var
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
function
|
|
4375
|
-
for (var
|
|
4376
|
-
for (;
|
|
3985
|
+
var j,
|
|
3986
|
+
T,
|
|
3987
|
+
C = u(),
|
|
3988
|
+
R = function R() {},
|
|
3989
|
+
O = function () {
|
|
3990
|
+
function e() {
|
|
3991
|
+
for (var t, e; r.next;) t = (r = r.next).task, r.task = void 0, (e = r.domain) && (r.domain = void 0, e.enter()), n(t, e);
|
|
3992
|
+
for (; c.length;) n(t = c.pop());
|
|
4377
3993
|
i = !1;
|
|
4378
3994
|
}
|
|
4379
|
-
function n(
|
|
3995
|
+
function n(t, n) {
|
|
4380
3996
|
try {
|
|
4381
|
-
|
|
4382
|
-
} catch (
|
|
4383
|
-
if (
|
|
3997
|
+
t();
|
|
3998
|
+
} catch (r) {
|
|
3999
|
+
if (a) throw n && n.exit(), setTimeout(e, 0), n && n.enter(), r;
|
|
4384
4000
|
setTimeout(function () {
|
|
4385
|
-
throw
|
|
4001
|
+
throw r;
|
|
4386
4002
|
}, 0);
|
|
4387
4003
|
}
|
|
4388
4004
|
n && n.exit();
|
|
@@ -4394,507 +4010,553 @@
|
|
|
4394
4010
|
o = r,
|
|
4395
4011
|
i = !1,
|
|
4396
4012
|
u = void 0,
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
if (
|
|
4013
|
+
a = !1,
|
|
4014
|
+
c = [];
|
|
4015
|
+
if (O = function O(e) {
|
|
4400
4016
|
o = o.next = {
|
|
4401
|
-
task:
|
|
4402
|
-
domain:
|
|
4017
|
+
task: e,
|
|
4018
|
+
domain: a && t.domain,
|
|
4403
4019
|
next: null
|
|
4404
4020
|
}, i || (i = !0, u());
|
|
4405
|
-
}, "object" == _typeof(
|
|
4406
|
-
|
|
4407
|
-
};else if ("function" == typeof setImmediate) u = "undefined" != typeof window ? setImmediate.bind(window,
|
|
4408
|
-
setImmediate(
|
|
4021
|
+
}, "object" == _typeof(t) && "[object process]" === t.toString() && t.nextTick) a = !0, u = function u() {
|
|
4022
|
+
t.nextTick(e);
|
|
4023
|
+
};else if ("function" == typeof setImmediate) u = "undefined" != typeof window ? setImmediate.bind(window, e) : function () {
|
|
4024
|
+
setImmediate(e);
|
|
4409
4025
|
};else if ("undefined" != typeof MessageChannel) {
|
|
4410
4026
|
var s = new MessageChannel();
|
|
4411
4027
|
s.port1.onmessage = function () {
|
|
4412
|
-
u = f, s.port1.onmessage =
|
|
4028
|
+
u = f, s.port1.onmessage = e, e();
|
|
4413
4029
|
};
|
|
4414
4030
|
var f = function f() {
|
|
4415
4031
|
s.port2.postMessage(0);
|
|
4416
4032
|
};
|
|
4417
4033
|
u = function u() {
|
|
4418
|
-
setTimeout(
|
|
4034
|
+
setTimeout(e, 0), f();
|
|
4419
4035
|
};
|
|
4420
4036
|
} else u = function u() {
|
|
4421
|
-
setTimeout(
|
|
4037
|
+
setTimeout(e, 0);
|
|
4422
4038
|
};
|
|
4423
|
-
return
|
|
4424
|
-
|
|
4425
|
-
},
|
|
4039
|
+
return O.runAfter = function (t) {
|
|
4040
|
+
c.push(t), i || (i = !0, u());
|
|
4041
|
+
}, O;
|
|
4426
4042
|
}(),
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4043
|
+
M = Function.call,
|
|
4044
|
+
P = e(Array.prototype.slice),
|
|
4045
|
+
L = e(Array.prototype.reduce || function (t, e) {
|
|
4430
4046
|
var n = 0,
|
|
4431
4047
|
r = this.length;
|
|
4432
4048
|
if (1 === arguments.length) for (;;) {
|
|
4433
4049
|
if (n in this) {
|
|
4434
|
-
|
|
4050
|
+
e = this[n++];
|
|
4435
4051
|
break;
|
|
4436
4052
|
}
|
|
4437
|
-
if (++n >= r) throw
|
|
4053
|
+
if (++n >= r) throw TypeError();
|
|
4438
4054
|
}
|
|
4439
|
-
for (; n < r; n++) n in this && (
|
|
4440
|
-
return
|
|
4055
|
+
for (; n < r; n++) n in this && (e = t(e, this[n], n));
|
|
4056
|
+
return e;
|
|
4441
4057
|
}),
|
|
4442
|
-
|
|
4443
|
-
for (var
|
|
4058
|
+
z = e(Array.prototype.indexOf || function (t) {
|
|
4059
|
+
for (var e = 0; e < this.length; e++) if (this[e] === t) return e;
|
|
4444
4060
|
return -1;
|
|
4445
4061
|
}),
|
|
4446
|
-
|
|
4062
|
+
S = e(Array.prototype.map || function (t, e) {
|
|
4447
4063
|
var n = this,
|
|
4448
4064
|
r = [];
|
|
4449
|
-
return
|
|
4450
|
-
r.push(
|
|
4065
|
+
return L(n, function (o, i, u) {
|
|
4066
|
+
r.push(t.call(e, i, u, n));
|
|
4451
4067
|
}, void 0), r;
|
|
4452
4068
|
}),
|
|
4453
|
-
|
|
4454
|
-
function
|
|
4455
|
-
return
|
|
4069
|
+
H = Object.create || function (t) {
|
|
4070
|
+
function e() {}
|
|
4071
|
+
return e.prototype = t, new e();
|
|
4456
4072
|
},
|
|
4457
|
-
|
|
4458
|
-
return e
|
|
4073
|
+
U = Object.defineProperty || function (t, e, n) {
|
|
4074
|
+
return t[e] = n.value, t;
|
|
4459
4075
|
},
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
var
|
|
4463
|
-
for (var n in
|
|
4464
|
-
return
|
|
4076
|
+
A = e(Object.prototype.hasOwnProperty),
|
|
4077
|
+
q = Object.keys || function (t) {
|
|
4078
|
+
var e = [];
|
|
4079
|
+
for (var n in t) A(t, n) && e.push(n);
|
|
4080
|
+
return e;
|
|
4465
4081
|
},
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
this.value =
|
|
4082
|
+
D = e(Object.prototype.toString);
|
|
4083
|
+
T = "undefined" != typeof ReturnValue ? ReturnValue : function (t) {
|
|
4084
|
+
this.value = t;
|
|
4469
4085
|
};
|
|
4470
|
-
var
|
|
4471
|
-
|
|
4472
|
-
var
|
|
4473
|
-
"object" == _typeof(
|
|
4474
|
-
var
|
|
4475
|
-
return function (
|
|
4476
|
-
|
|
4086
|
+
var I = "From previous event:";
|
|
4087
|
+
a.resolve = a, a.nextTick = O, a.longStackSupport = !1;
|
|
4088
|
+
var N = 1;
|
|
4089
|
+
"object" == _typeof(t) && t && t.env && t.env.Q_DEBUG && (a.longStackSupport = !0), a.defer = c, c.prototype.makeNodeResolver = function () {
|
|
4090
|
+
var t = this;
|
|
4091
|
+
return function (e, n) {
|
|
4092
|
+
e ? t.reject(e) : arguments.length > 2 ? t.resolve(P(arguments, 1)) : t.resolve(n);
|
|
4477
4093
|
};
|
|
4478
|
-
},
|
|
4479
|
-
return
|
|
4480
|
-
},
|
|
4094
|
+
}, a.Promise = s, a.promise = s, s.race = f, s.all = k, s.reject = m, s.resolve = a, a.passByCopy = function (t) {
|
|
4095
|
+
return t;
|
|
4096
|
+
}, l.prototype.passByCopy = function () {
|
|
4481
4097
|
return this;
|
|
4482
|
-
},
|
|
4483
|
-
return
|
|
4484
|
-
},
|
|
4485
|
-
return
|
|
4486
|
-
if (
|
|
4487
|
-
throw
|
|
4098
|
+
}, a.join = function (t, e) {
|
|
4099
|
+
return a(t).join(e);
|
|
4100
|
+
}, l.prototype.join = function (t) {
|
|
4101
|
+
return a([this, t]).spread(function (t, e) {
|
|
4102
|
+
if (t === e) return t;
|
|
4103
|
+
throw Error("Q can't join: not the same: " + t + " " + e);
|
|
4488
4104
|
});
|
|
4489
|
-
},
|
|
4490
|
-
return this.then(
|
|
4491
|
-
},
|
|
4105
|
+
}, a.race = f, l.prototype.race = function () {
|
|
4106
|
+
return this.then(a.race);
|
|
4107
|
+
}, a.makePromise = l, l.prototype.toString = function () {
|
|
4492
4108
|
return "[object Promise]";
|
|
4493
|
-
},
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
return f.nextTick(function () {
|
|
4519
|
-
c.promiseDispatch(function (e) {
|
|
4520
|
-
s || (s = !0, a.resolve(r(e)));
|
|
4521
|
-
}, "when", [function (e) {
|
|
4522
|
-
s || (s = !0, a.resolve(i(e)));
|
|
4109
|
+
}, l.prototype.then = function (t, e, r) {
|
|
4110
|
+
var o = this,
|
|
4111
|
+
i = c(),
|
|
4112
|
+
u = !1;
|
|
4113
|
+
return a.nextTick(function () {
|
|
4114
|
+
o.promiseDispatch(function (e) {
|
|
4115
|
+
u || (u = !0, i.resolve(function e(n) {
|
|
4116
|
+
try {
|
|
4117
|
+
return "function" == typeof t ? t(n) : n;
|
|
4118
|
+
} catch (r) {
|
|
4119
|
+
return m(r);
|
|
4120
|
+
}
|
|
4121
|
+
}(e)));
|
|
4122
|
+
}, "when", [function (t) {
|
|
4123
|
+
u || (u = !0, i.resolve(function t(r) {
|
|
4124
|
+
if ("function" == typeof e) {
|
|
4125
|
+
n(r, o);
|
|
4126
|
+
try {
|
|
4127
|
+
return e(r);
|
|
4128
|
+
} catch (i) {
|
|
4129
|
+
return m(i);
|
|
4130
|
+
}
|
|
4131
|
+
}
|
|
4132
|
+
return m(r);
|
|
4133
|
+
}(t)));
|
|
4523
4134
|
}]);
|
|
4524
|
-
}),
|
|
4525
|
-
var
|
|
4526
|
-
n
|
|
4135
|
+
}), o.promiseDispatch(void 0, "when", [void 0, function (t) {
|
|
4136
|
+
var e,
|
|
4137
|
+
n,
|
|
4138
|
+
o = !1;
|
|
4527
4139
|
try {
|
|
4528
|
-
|
|
4529
|
-
} catch (
|
|
4530
|
-
if (
|
|
4531
|
-
|
|
4140
|
+
n = (e = t, "function" == typeof r ? r(e) : e);
|
|
4141
|
+
} catch (u) {
|
|
4142
|
+
if (o = !0, !a.onerror) throw u;
|
|
4143
|
+
a.onerror(u);
|
|
4532
4144
|
}
|
|
4533
|
-
|
|
4534
|
-
}]),
|
|
4535
|
-
},
|
|
4536
|
-
return
|
|
4537
|
-
},
|
|
4538
|
-
return
|
|
4539
|
-
return
|
|
4145
|
+
o || i.notify(n);
|
|
4146
|
+
}]), i.promise;
|
|
4147
|
+
}, a.tap = function (t, e) {
|
|
4148
|
+
return a(t).tap(e);
|
|
4149
|
+
}, l.prototype.tap = function (t) {
|
|
4150
|
+
return t = a(t), this.then(function (e) {
|
|
4151
|
+
return t.fcall(e).thenResolve(e);
|
|
4540
4152
|
});
|
|
4541
|
-
},
|
|
4153
|
+
}, a.when = p, l.prototype.thenResolve = function (t) {
|
|
4542
4154
|
return this.then(function () {
|
|
4543
|
-
return
|
|
4155
|
+
return t;
|
|
4544
4156
|
});
|
|
4545
|
-
},
|
|
4546
|
-
return
|
|
4547
|
-
},
|
|
4157
|
+
}, a.thenResolve = function (t, e) {
|
|
4158
|
+
return a(t).thenResolve(e);
|
|
4159
|
+
}, l.prototype.thenReject = function (t) {
|
|
4548
4160
|
return this.then(function () {
|
|
4549
|
-
throw
|
|
4161
|
+
throw t;
|
|
4550
4162
|
});
|
|
4551
|
-
},
|
|
4552
|
-
return
|
|
4553
|
-
},
|
|
4163
|
+
}, a.thenReject = function (t, e) {
|
|
4164
|
+
return a(t).thenReject(e);
|
|
4165
|
+
}, a.nearer = d, a.isPromise = h, a.isPromiseAlike = v, a.isPending = function t(e) {
|
|
4166
|
+
return h(e) && "pending" === e.inspect().state;
|
|
4167
|
+
}, l.prototype.isPending = function () {
|
|
4554
4168
|
return "pending" === this.inspect().state;
|
|
4555
|
-
},
|
|
4169
|
+
}, a.isFulfilled = function t(e) {
|
|
4170
|
+
return !h(e) || "fulfilled" === e.inspect().state;
|
|
4171
|
+
}, l.prototype.isFulfilled = function () {
|
|
4556
4172
|
return "fulfilled" === this.inspect().state;
|
|
4557
|
-
},
|
|
4173
|
+
}, a.isRejected = function t(e) {
|
|
4174
|
+
return h(e) && "rejected" === e.inspect().state;
|
|
4175
|
+
}, l.prototype.isRejected = function () {
|
|
4558
4176
|
return "rejected" === this.inspect().state;
|
|
4559
4177
|
};
|
|
4560
|
-
var
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4178
|
+
var W,
|
|
4179
|
+
Q = [],
|
|
4180
|
+
F = [],
|
|
4181
|
+
B = [],
|
|
4182
|
+
G = !0;
|
|
4183
|
+
a.resetUnhandledRejections = y, a.getUnhandledReasons = function () {
|
|
4184
|
+
return Q.slice();
|
|
4185
|
+
}, a.stopUnhandledRejectionTracking = function () {
|
|
4186
|
+
y(), G = !1;
|
|
4187
|
+
}, y(), a.reject = m, a.fulfill = $, a.master = function t(e) {
|
|
4188
|
+
return l({
|
|
4189
|
+
isDef: function isDef() {}
|
|
4190
|
+
}, function (t, n) {
|
|
4191
|
+
return b(e, t, n);
|
|
4192
|
+
}, function () {
|
|
4193
|
+
return a(e).inspect();
|
|
4194
|
+
});
|
|
4195
|
+
}, a.spread = g, l.prototype.spread = function (t, e) {
|
|
4196
|
+
return this.all().then(function (e) {
|
|
4197
|
+
return t.apply(void 0, e);
|
|
4198
|
+
}, e);
|
|
4199
|
+
}, a.async = function t(e) {
|
|
4200
|
+
return function () {
|
|
4201
|
+
function t(t, e) {
|
|
4202
|
+
var i, u;
|
|
4203
|
+
if ("undefined" == typeof StopIteration) {
|
|
4204
|
+
try {
|
|
4205
|
+
i = n[t](e);
|
|
4206
|
+
} catch (c) {
|
|
4207
|
+
return m(c);
|
|
4208
|
+
}
|
|
4209
|
+
return i.done ? a(i.value) : p(i.value, r, o);
|
|
4210
|
+
}
|
|
4211
|
+
try {
|
|
4212
|
+
i = n[t](e);
|
|
4213
|
+
} catch (s) {
|
|
4214
|
+
return "[object StopIteration]" === D(u = s) || u instanceof T ? a(s.value) : m(s);
|
|
4215
|
+
}
|
|
4216
|
+
return p(i, r, o);
|
|
4217
|
+
}
|
|
4218
|
+
var n = e.apply(this, arguments),
|
|
4219
|
+
r = t.bind(t, "next"),
|
|
4220
|
+
o = t.bind(t, "throw");
|
|
4221
|
+
return r();
|
|
4222
|
+
};
|
|
4223
|
+
}, a.spawn = function t(e) {
|
|
4224
|
+
a.done(a.async(e)());
|
|
4225
|
+
}, a["return"] = function t(e) {
|
|
4226
|
+
throw new T(e);
|
|
4227
|
+
}, a.promised = function t(e) {
|
|
4228
|
+
return function () {
|
|
4229
|
+
return g([this, k(arguments)], function (t, n) {
|
|
4230
|
+
return e.apply(t, n);
|
|
4231
|
+
});
|
|
4232
|
+
};
|
|
4233
|
+
}, a.dispatch = b, l.prototype.dispatch = function (t, e) {
|
|
4573
4234
|
var n = this,
|
|
4574
|
-
r =
|
|
4575
|
-
return
|
|
4576
|
-
n.promiseDispatch(r.resolve,
|
|
4235
|
+
r = c();
|
|
4236
|
+
return a.nextTick(function () {
|
|
4237
|
+
n.promiseDispatch(r.resolve, t, e);
|
|
4577
4238
|
}), r.promise;
|
|
4578
|
-
},
|
|
4579
|
-
return
|
|
4580
|
-
},
|
|
4581
|
-
return this.dispatch("get", [
|
|
4582
|
-
},
|
|
4583
|
-
return
|
|
4584
|
-
},
|
|
4585
|
-
return this.dispatch("set", [
|
|
4586
|
-
},
|
|
4587
|
-
return
|
|
4588
|
-
},
|
|
4589
|
-
return this.dispatch("delete", [
|
|
4590
|
-
},
|
|
4591
|
-
return
|
|
4592
|
-
},
|
|
4593
|
-
return this.dispatch("post", [
|
|
4594
|
-
},
|
|
4595
|
-
return
|
|
4596
|
-
},
|
|
4597
|
-
return this.dispatch("post", [
|
|
4598
|
-
},
|
|
4599
|
-
return
|
|
4600
|
-
},
|
|
4601
|
-
return this.dispatch("apply", [void 0,
|
|
4602
|
-
},
|
|
4603
|
-
return
|
|
4604
|
-
},
|
|
4605
|
-
return this.dispatch("apply", [void 0,
|
|
4606
|
-
},
|
|
4607
|
-
var
|
|
4608
|
-
n =
|
|
4239
|
+
}, a.get = function (t, e) {
|
|
4240
|
+
return a(t).dispatch("get", [e]);
|
|
4241
|
+
}, l.prototype.get = function (t) {
|
|
4242
|
+
return this.dispatch("get", [t]);
|
|
4243
|
+
}, a.set = function (t, e, n) {
|
|
4244
|
+
return a(t).dispatch("set", [e, n]);
|
|
4245
|
+
}, l.prototype.set = function (t, e) {
|
|
4246
|
+
return this.dispatch("set", [t, e]);
|
|
4247
|
+
}, a.del = a["delete"] = function (t, e) {
|
|
4248
|
+
return a(t).dispatch("delete", [e]);
|
|
4249
|
+
}, l.prototype.del = l.prototype["delete"] = function (t) {
|
|
4250
|
+
return this.dispatch("delete", [t]);
|
|
4251
|
+
}, a.mapply = a.post = function (t, e, n) {
|
|
4252
|
+
return a(t).dispatch("post", [e, n]);
|
|
4253
|
+
}, l.prototype.mapply = l.prototype.post = function (t, e) {
|
|
4254
|
+
return this.dispatch("post", [t, e]);
|
|
4255
|
+
}, a.send = a.mcall = a.invoke = function (t, e) {
|
|
4256
|
+
return a(t).dispatch("post", [e, P(arguments, 2)]);
|
|
4257
|
+
}, l.prototype.send = l.prototype.mcall = l.prototype.invoke = function (t) {
|
|
4258
|
+
return this.dispatch("post", [t, P(arguments, 1)]);
|
|
4259
|
+
}, a.fapply = function (t, e) {
|
|
4260
|
+
return a(t).dispatch("apply", [void 0, e]);
|
|
4261
|
+
}, l.prototype.fapply = function (t) {
|
|
4262
|
+
return this.dispatch("apply", [void 0, t]);
|
|
4263
|
+
}, a["try"] = a.fcall = function (t) {
|
|
4264
|
+
return a(t).dispatch("apply", [void 0, P(arguments, 1)]);
|
|
4265
|
+
}, l.prototype.fcall = function () {
|
|
4266
|
+
return this.dispatch("apply", [void 0, P(arguments)]);
|
|
4267
|
+
}, a.fbind = function (t) {
|
|
4268
|
+
var e = a(t),
|
|
4269
|
+
n = P(arguments, 1);
|
|
4609
4270
|
return function () {
|
|
4610
|
-
return
|
|
4271
|
+
return e.dispatch("apply", [this, n.concat(P(arguments))]);
|
|
4611
4272
|
};
|
|
4612
|
-
},
|
|
4613
|
-
var
|
|
4614
|
-
|
|
4273
|
+
}, l.prototype.fbind = function () {
|
|
4274
|
+
var t = this,
|
|
4275
|
+
e = P(arguments);
|
|
4615
4276
|
return function () {
|
|
4616
|
-
return
|
|
4277
|
+
return t.dispatch("apply", [this, e.concat(P(arguments))]);
|
|
4617
4278
|
};
|
|
4618
|
-
},
|
|
4619
|
-
return
|
|
4620
|
-
},
|
|
4279
|
+
}, a.keys = function (t) {
|
|
4280
|
+
return a(t).dispatch("keys", []);
|
|
4281
|
+
}, l.prototype.keys = function () {
|
|
4621
4282
|
return this.dispatch("keys", []);
|
|
4622
|
-
},
|
|
4623
|
-
return
|
|
4624
|
-
},
|
|
4625
|
-
return
|
|
4626
|
-
},
|
|
4627
|
-
return function ()
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
}
|
|
4631
|
-
return
|
|
4632
|
-
},
|
|
4633
|
-
return this.then(function (
|
|
4634
|
-
return
|
|
4635
|
-
function
|
|
4636
|
-
return
|
|
4283
|
+
}, a.all = k, l.prototype.all = function () {
|
|
4284
|
+
return k(this);
|
|
4285
|
+
}, a.any = _, l.prototype.any = function () {
|
|
4286
|
+
return _(this);
|
|
4287
|
+
}, a.allResolved = (W = w, function () {
|
|
4288
|
+
return "undefined" != typeof console && "function" == typeof console.warn && console.warn("allResolved is deprecated, use allSettled instead.", Error("").stack), W.apply(W, arguments);
|
|
4289
|
+
}), l.prototype.allResolved = function () {
|
|
4290
|
+
return w(this);
|
|
4291
|
+
}, a.allSettled = function t(e) {
|
|
4292
|
+
return a(e).allSettled();
|
|
4293
|
+
}, l.prototype.allSettled = function () {
|
|
4294
|
+
return this.then(function (t) {
|
|
4295
|
+
return k(S(t, function (t) {
|
|
4296
|
+
function e() {
|
|
4297
|
+
return t.inspect();
|
|
4637
4298
|
}
|
|
4638
|
-
return
|
|
4299
|
+
return (t = a(t)).then(e, e);
|
|
4639
4300
|
}));
|
|
4640
4301
|
});
|
|
4641
|
-
},
|
|
4642
|
-
return
|
|
4643
|
-
},
|
|
4644
|
-
return this.then(void 0,
|
|
4645
|
-
},
|
|
4646
|
-
return
|
|
4647
|
-
},
|
|
4648
|
-
return
|
|
4649
|
-
},
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4302
|
+
}, a.fail = a["catch"] = function (t, e) {
|
|
4303
|
+
return a(t).then(void 0, e);
|
|
4304
|
+
}, l.prototype.fail = l.prototype["catch"] = function (t) {
|
|
4305
|
+
return this.then(void 0, t);
|
|
4306
|
+
}, a.progress = function t(e, n) {
|
|
4307
|
+
return a(e).then(void 0, void 0, n);
|
|
4308
|
+
}, l.prototype.progress = function (t) {
|
|
4309
|
+
return this.then(void 0, void 0, t);
|
|
4310
|
+
}, a.fin = a["finally"] = function (t, e) {
|
|
4311
|
+
return a(t)["finally"](e);
|
|
4312
|
+
}, l.prototype.fin = l.prototype["finally"] = function (t) {
|
|
4313
|
+
if (!t || "function" != typeof t.apply) throw Error("Q can't apply finally callback");
|
|
4314
|
+
return t = a(t), this.then(function (e) {
|
|
4315
|
+
return t.fcall().then(function () {
|
|
4316
|
+
return e;
|
|
4654
4317
|
});
|
|
4655
|
-
}, function (
|
|
4656
|
-
return
|
|
4657
|
-
throw
|
|
4318
|
+
}, function (e) {
|
|
4319
|
+
return t.fcall().then(function () {
|
|
4320
|
+
throw e;
|
|
4658
4321
|
});
|
|
4659
4322
|
});
|
|
4660
|
-
},
|
|
4661
|
-
return
|
|
4662
|
-
},
|
|
4663
|
-
var i = function i(
|
|
4664
|
-
|
|
4665
|
-
if (
|
|
4666
|
-
|
|
4323
|
+
}, a.done = function (t, e, n, r) {
|
|
4324
|
+
return a(t).done(e, n, r);
|
|
4325
|
+
}, l.prototype.done = function (e, r, o) {
|
|
4326
|
+
var i = function i(t) {
|
|
4327
|
+
a.nextTick(function () {
|
|
4328
|
+
if (n(t, u), !a.onerror) throw t;
|
|
4329
|
+
a.onerror(t);
|
|
4667
4330
|
});
|
|
4668
4331
|
},
|
|
4669
|
-
u =
|
|
4670
|
-
"object" == _typeof(
|
|
4671
|
-
},
|
|
4672
|
-
return
|
|
4673
|
-
},
|
|
4674
|
-
var n =
|
|
4332
|
+
u = e || r || o ? this.then(e, r, o) : this;
|
|
4333
|
+
"object" == _typeof(t) && t && t.domain && (i = t.domain.bind(i)), u.then(void 0, i);
|
|
4334
|
+
}, a.timeout = function (t, e, n) {
|
|
4335
|
+
return a(t).timeout(e, n);
|
|
4336
|
+
}, l.prototype.timeout = function (t, e) {
|
|
4337
|
+
var n = c(),
|
|
4675
4338
|
r = setTimeout(function () {
|
|
4676
|
-
|
|
4677
|
-
},
|
|
4678
|
-
return this.then(function (e) {
|
|
4679
|
-
clearTimeout(r), n.resolve(e);
|
|
4680
|
-
}, function (e) {
|
|
4681
|
-
clearTimeout(r), n.reject(e);
|
|
4682
|
-
}, n.notify), n.promise;
|
|
4683
|
-
}, f.delay = function (e, t) {
|
|
4684
|
-
return void 0 === t && (t = e, e = void 0), f(e).delay(t);
|
|
4685
|
-
}, h.prototype.delay = function (e) {
|
|
4339
|
+
e && "string" != typeof e || ((e = Error(e || "Timed out after " + t + " ms")).code = "ETIMEDOUT"), n.reject(e);
|
|
4340
|
+
}, t);
|
|
4686
4341
|
return this.then(function (t) {
|
|
4687
|
-
|
|
4342
|
+
clearTimeout(r), n.resolve(t);
|
|
4343
|
+
}, function (t) {
|
|
4344
|
+
clearTimeout(r), n.reject(t);
|
|
4345
|
+
}, n.notify), n.promise;
|
|
4346
|
+
}, a.delay = function (t, e) {
|
|
4347
|
+
return void 0 === e && (e = t, t = void 0), a(t).delay(e);
|
|
4348
|
+
}, l.prototype.delay = function (t) {
|
|
4349
|
+
return this.then(function (e) {
|
|
4350
|
+
var n = c();
|
|
4688
4351
|
return setTimeout(function () {
|
|
4689
|
-
n.resolve(
|
|
4690
|
-
},
|
|
4352
|
+
n.resolve(e);
|
|
4353
|
+
}, t), n.promise;
|
|
4691
4354
|
});
|
|
4692
|
-
},
|
|
4693
|
-
return
|
|
4694
|
-
},
|
|
4695
|
-
var
|
|
4696
|
-
n =
|
|
4697
|
-
return n.push(
|
|
4698
|
-
},
|
|
4699
|
-
var
|
|
4700
|
-
return
|
|
4701
|
-
},
|
|
4702
|
-
var
|
|
4703
|
-
|
|
4704
|
-
return
|
|
4705
|
-
},
|
|
4706
|
-
if (void 0 ===
|
|
4707
|
-
var
|
|
4355
|
+
}, a.nfapply = function (t, e) {
|
|
4356
|
+
return a(t).nfapply(e);
|
|
4357
|
+
}, l.prototype.nfapply = function (t) {
|
|
4358
|
+
var e = c(),
|
|
4359
|
+
n = P(t);
|
|
4360
|
+
return n.push(e.makeNodeResolver()), this.fapply(n).fail(e.reject), e.promise;
|
|
4361
|
+
}, a.nfcall = function (t) {
|
|
4362
|
+
var e = P(arguments, 1);
|
|
4363
|
+
return a(t).nfapply(e);
|
|
4364
|
+
}, l.prototype.nfcall = function () {
|
|
4365
|
+
var t = P(arguments),
|
|
4366
|
+
e = c();
|
|
4367
|
+
return t.push(e.makeNodeResolver()), this.fapply(t).fail(e.reject), e.promise;
|
|
4368
|
+
}, a.nfbind = a.denodeify = function (t) {
|
|
4369
|
+
if (void 0 === t) throw Error("Q can't wrap an undefined function");
|
|
4370
|
+
var e = P(arguments, 1);
|
|
4708
4371
|
return function () {
|
|
4709
|
-
var n =
|
|
4710
|
-
r =
|
|
4711
|
-
return n.push(r.makeNodeResolver()),
|
|
4372
|
+
var n = e.concat(P(arguments)),
|
|
4373
|
+
r = c();
|
|
4374
|
+
return n.push(r.makeNodeResolver()), a(t).fapply(n).fail(r.reject), r.promise;
|
|
4712
4375
|
};
|
|
4713
|
-
},
|
|
4714
|
-
var
|
|
4715
|
-
return
|
|
4716
|
-
},
|
|
4717
|
-
var n =
|
|
4376
|
+
}, l.prototype.nfbind = l.prototype.denodeify = function () {
|
|
4377
|
+
var t = P(arguments);
|
|
4378
|
+
return t.unshift(this), a.denodeify.apply(void 0, t);
|
|
4379
|
+
}, a.nbind = function (t, e) {
|
|
4380
|
+
var n = P(arguments, 2);
|
|
4718
4381
|
return function () {
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
return o.push(i.makeNodeResolver()), f(r).fapply(o).fail(i.reject), i.promise;
|
|
4382
|
+
var r = n.concat(P(arguments)),
|
|
4383
|
+
o = c();
|
|
4384
|
+
return r.push(o.makeNodeResolver()), a(function n() {
|
|
4385
|
+
return t.apply(e, arguments);
|
|
4386
|
+
}).fapply(r).fail(o.reject), o.promise;
|
|
4725
4387
|
};
|
|
4726
|
-
},
|
|
4727
|
-
var
|
|
4728
|
-
return
|
|
4729
|
-
},
|
|
4730
|
-
return
|
|
4731
|
-
},
|
|
4732
|
-
var n =
|
|
4733
|
-
r =
|
|
4734
|
-
return n.push(r.makeNodeResolver()), this.dispatch("post", [
|
|
4735
|
-
},
|
|
4736
|
-
var n =
|
|
4737
|
-
r =
|
|
4738
|
-
return n.push(r.makeNodeResolver()),
|
|
4739
|
-
},
|
|
4740
|
-
var
|
|
4741
|
-
n =
|
|
4742
|
-
return
|
|
4743
|
-
},
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4388
|
+
}, l.prototype.nbind = function () {
|
|
4389
|
+
var t = P(arguments, 0);
|
|
4390
|
+
return t.unshift(this), a.nbind.apply(void 0, t);
|
|
4391
|
+
}, a.nmapply = a.npost = function (t, e, n) {
|
|
4392
|
+
return a(t).npost(e, n);
|
|
4393
|
+
}, l.prototype.nmapply = l.prototype.npost = function (t, e) {
|
|
4394
|
+
var n = P(e || []),
|
|
4395
|
+
r = c();
|
|
4396
|
+
return n.push(r.makeNodeResolver()), this.dispatch("post", [t, n]).fail(r.reject), r.promise;
|
|
4397
|
+
}, a.nsend = a.nmcall = a.ninvoke = function (t, e) {
|
|
4398
|
+
var n = P(arguments, 2),
|
|
4399
|
+
r = c();
|
|
4400
|
+
return n.push(r.makeNodeResolver()), a(t).dispatch("post", [e, n]).fail(r.reject), r.promise;
|
|
4401
|
+
}, l.prototype.nsend = l.prototype.nmcall = l.prototype.ninvoke = function (t) {
|
|
4402
|
+
var e = P(arguments, 1),
|
|
4403
|
+
n = c();
|
|
4404
|
+
return e.push(n.makeNodeResolver()), this.dispatch("post", [t, e]).fail(n.reject), n.promise;
|
|
4405
|
+
}, a.nodeify = function t(e, n) {
|
|
4406
|
+
return a(e).nodeify(n);
|
|
4407
|
+
}, l.prototype.nodeify = function (t) {
|
|
4408
|
+
if (!t) return this;
|
|
4409
|
+
this.then(function (e) {
|
|
4410
|
+
a.nextTick(function () {
|
|
4411
|
+
t(null, e);
|
|
4748
4412
|
});
|
|
4749
|
-
}, function (
|
|
4750
|
-
|
|
4751
|
-
e
|
|
4413
|
+
}, function (e) {
|
|
4414
|
+
a.nextTick(function () {
|
|
4415
|
+
t(e);
|
|
4752
4416
|
});
|
|
4753
4417
|
});
|
|
4754
|
-
},
|
|
4755
|
-
throw
|
|
4418
|
+
}, a.noConflict = function () {
|
|
4419
|
+
throw Error("Q.noConflict only works when Q is used as a global");
|
|
4756
4420
|
};
|
|
4757
|
-
var
|
|
4758
|
-
return
|
|
4421
|
+
var Z = u();
|
|
4422
|
+
return a;
|
|
4759
4423
|
});
|
|
4760
|
-
}).call(this,
|
|
4424
|
+
}).call(this, t("_process"));
|
|
4761
4425
|
}, {
|
|
4762
4426
|
_process: 1
|
|
4763
4427
|
}],
|
|
4764
|
-
3: [function (
|
|
4428
|
+
3: [function (t, e, n) {
|
|
4765
4429
|
|
|
4766
|
-
var r = function r(
|
|
4767
|
-
switch (_typeof(
|
|
4430
|
+
var r = function r(t) {
|
|
4431
|
+
switch (_typeof(t)) {
|
|
4768
4432
|
case "string":
|
|
4769
|
-
return
|
|
4433
|
+
return t;
|
|
4770
4434
|
case "boolean":
|
|
4771
|
-
return
|
|
4435
|
+
return t ? "true" : "false";
|
|
4772
4436
|
case "number":
|
|
4773
|
-
return isFinite(
|
|
4437
|
+
return isFinite(t) ? t : "";
|
|
4774
4438
|
default:
|
|
4775
4439
|
return "";
|
|
4776
4440
|
}
|
|
4777
4441
|
};
|
|
4778
|
-
|
|
4779
|
-
return
|
|
4442
|
+
e.exports = function (t, e, n, o) {
|
|
4443
|
+
return e = e || "&", n = n || "=", null === t && (t = void 0), "object" == _typeof(t) ? Object.keys(t).map(function (o) {
|
|
4780
4444
|
var i = encodeURIComponent(r(o)) + n;
|
|
4781
|
-
return Array.isArray(
|
|
4782
|
-
return i + encodeURIComponent(r(
|
|
4783
|
-
}).join(
|
|
4784
|
-
}).join(
|
|
4445
|
+
return Array.isArray(t[o]) ? t[o].map(function (t) {
|
|
4446
|
+
return i + encodeURIComponent(r(t));
|
|
4447
|
+
}).join(e) : i + encodeURIComponent(r(t[o]));
|
|
4448
|
+
}).join(e) : o ? encodeURIComponent(r(o)) + n + encodeURIComponent(r(t)) : "";
|
|
4785
4449
|
};
|
|
4786
4450
|
}, {}],
|
|
4787
|
-
4: [function (
|
|
4451
|
+
4: [function (t, e, n) {
|
|
4788
4452
|
|
|
4789
|
-
function r(
|
|
4790
|
-
return
|
|
4791
|
-
"default":
|
|
4453
|
+
function r(t) {
|
|
4454
|
+
return t && t.__esModule ? t : {
|
|
4455
|
+
"default": t
|
|
4792
4456
|
};
|
|
4793
4457
|
}
|
|
4794
|
-
function o(e,
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
function i(e) {
|
|
4798
|
-
var t = new s["default"]();
|
|
4799
|
-
t.onClose = e.onComplete.bind(e), t.build(), u(e, function (e) {
|
|
4800
|
-
return t.setUri(e.redirectUri);
|
|
4801
|
-
}, function (e) {
|
|
4802
|
-
return t.close(!1);
|
|
4803
|
-
});
|
|
4804
|
-
}
|
|
4805
|
-
function u(e, t, n) {
|
|
4806
|
-
return v["default"].information("zip:checkout:init"), m["default"].Promise(function (t, n) {
|
|
4807
|
-
return e.onCheckout(t, n, {});
|
|
4458
|
+
function o(t, e, n) {
|
|
4459
|
+
return d["default"].information("zip:checkout:init"), v["default"].Promise(function (e, n) {
|
|
4460
|
+
return t.onCheckout(e, n, {});
|
|
4808
4461
|
}).then(function (r) {
|
|
4809
4462
|
var o = r.redirect_uri || r.redirectUri || r.data && (r.data.redirect_uri || r.data.redirectUri);
|
|
4810
|
-
if (!o) return
|
|
4463
|
+
if (!o) return d["default"].debug("zip:checkout:error", "Response does not contain redirectUri property"), n(r), void t.onError({
|
|
4811
4464
|
code: "checkout_error",
|
|
4812
4465
|
message: "The response does not contain the redirectUri property",
|
|
4813
4466
|
detail: r
|
|
4814
4467
|
});
|
|
4815
|
-
|
|
4468
|
+
d["default"].debug("zip:checkout:success", r), e({
|
|
4816
4469
|
redirectUri: o
|
|
4817
4470
|
});
|
|
4818
|
-
})["catch"](function (
|
|
4819
|
-
|
|
4471
|
+
})["catch"](function (e) {
|
|
4472
|
+
d["default"].debug("zip:checkout:error", e), n(e), t.onError({
|
|
4820
4473
|
code: "checkout_error",
|
|
4821
4474
|
message: "Checkout response error",
|
|
4822
|
-
detail:
|
|
4475
|
+
detail: e
|
|
4823
4476
|
});
|
|
4824
4477
|
});
|
|
4825
4478
|
}
|
|
4826
4479
|
Object.defineProperty(n, "__esModule", {
|
|
4827
4480
|
value: !0
|
|
4828
4481
|
}), n.Checkout = void 0;
|
|
4829
|
-
var
|
|
4830
|
-
function
|
|
4831
|
-
for (var n = 0; n <
|
|
4832
|
-
var r =
|
|
4833
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(
|
|
4482
|
+
var i = function () {
|
|
4483
|
+
function t(t, e) {
|
|
4484
|
+
for (var n = 0; n < e.length; n++) {
|
|
4485
|
+
var r = e[n];
|
|
4486
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
|
|
4834
4487
|
}
|
|
4835
4488
|
}
|
|
4836
|
-
return function (
|
|
4837
|
-
return n && e
|
|
4489
|
+
return function (e, n, r) {
|
|
4490
|
+
return n && t(e.prototype, n), r && t(e, r), e;
|
|
4838
4491
|
};
|
|
4839
4492
|
}(),
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4493
|
+
u = t("./modal"),
|
|
4494
|
+
a = r(u),
|
|
4495
|
+
c = t("./options"),
|
|
4496
|
+
s = r(c),
|
|
4497
|
+
f = t("./utility"),
|
|
4843
4498
|
l = r(f),
|
|
4844
|
-
p =
|
|
4499
|
+
p = t("./console"),
|
|
4845
4500
|
d = r(p),
|
|
4846
|
-
h =
|
|
4501
|
+
h = (t("./events"), t("q")),
|
|
4847
4502
|
v = r(h),
|
|
4848
|
-
y = (
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4503
|
+
y = function () {
|
|
4504
|
+
function t() {
|
|
4505
|
+
!function t(e, n) {
|
|
4506
|
+
if (!(e instanceof n)) throw TypeError("Cannot call a class as a function");
|
|
4507
|
+
}(this, t);
|
|
4853
4508
|
}
|
|
4854
|
-
return
|
|
4509
|
+
return i(t, null, [{
|
|
4855
4510
|
key: "init",
|
|
4856
|
-
value: function value(
|
|
4857
|
-
if ("function" != typeof Object.assign && (Object.assign = function (
|
|
4858
|
-
if (null ==
|
|
4859
|
-
|
|
4860
|
-
for (var
|
|
4861
|
-
var n = arguments[
|
|
4862
|
-
if (null != n) for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (
|
|
4511
|
+
value: function value(t) {
|
|
4512
|
+
if ("function" != typeof Object.assign && (Object.assign = function (t) {
|
|
4513
|
+
if (null == t) throw TypeError("Cannot convert undefined or null to object");
|
|
4514
|
+
t = Object(t);
|
|
4515
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
4516
|
+
var n = arguments[e];
|
|
4517
|
+
if (null != n) for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
|
|
4863
4518
|
}
|
|
4864
|
-
return
|
|
4865
|
-
}),
|
|
4866
|
-
|
|
4867
|
-
|
|
4519
|
+
return t;
|
|
4520
|
+
}), t = _extends({}, s["default"], t), !this._validate(t)) {
|
|
4521
|
+
var e, n;
|
|
4522
|
+
return d["default"].setLevel(t.logLevel), t.redirect ? o(t, function (e) {
|
|
4523
|
+
return t.redirectFn(e.redirectUri);
|
|
4524
|
+
}) : (e = t, void ((n = new a["default"]()).onClose = e.onComplete.bind(e), n.build(), o(e, function (t) {
|
|
4525
|
+
return n.setUri(t.redirectUri);
|
|
4526
|
+
}, function (t) {
|
|
4527
|
+
return n.close(!1);
|
|
4528
|
+
})));
|
|
4529
|
+
}
|
|
4868
4530
|
}
|
|
4869
4531
|
}, {
|
|
4870
4532
|
key: "attachButton",
|
|
4871
|
-
value: function value(
|
|
4872
|
-
var n = document.querySelectorAll(
|
|
4533
|
+
value: function value(t, e) {
|
|
4534
|
+
var n = document.querySelectorAll(t);
|
|
4873
4535
|
if (!n.length) return config.onError({
|
|
4874
4536
|
code: "attach_error",
|
|
4875
4537
|
message: "Cannot find button to attach zipMoney checkout"
|
|
4876
4538
|
});
|
|
4877
|
-
for (var r = 0; r < n.length; r++)
|
|
4878
|
-
return Zip.Checkout.init(
|
|
4539
|
+
for (var r = 0; r < n.length; r++) l["default"].addEventHandler(n[r], "click", function () {
|
|
4540
|
+
return Zip.Checkout.init(e);
|
|
4879
4541
|
});
|
|
4880
4542
|
}
|
|
4881
4543
|
}, {
|
|
4882
4544
|
key: "_validate",
|
|
4883
|
-
value: function value(
|
|
4884
|
-
return ["error", "information", "debug"].indexOf(
|
|
4545
|
+
value: function value(t) {
|
|
4546
|
+
return 0 > ["error", "information", "debug"].indexOf(t.logLevel.toLowerCase()) && (t.logLevel = "error"), 0 > ["standard", "express"].indexOf(t.request.toLowerCase()) && (t.request = "standard"), t.onComplete = t.onComplete || function () {}, t.onError = t.onError || function () {}, t.checkoutUri || t.onCheckout !== s["default"].onCheckout ? "express" === t.request ? t.onError({
|
|
4885
4547
|
code: "not_implemented",
|
|
4886
4548
|
message: "This feature is not yet implemented"
|
|
4887
|
-
}) :
|
|
4549
|
+
}) : t.redirect ? void 0 : t.onComplete !== s["default"].onComplete || t.redirectUri ? void 0 : t.onError({
|
|
4888
4550
|
code: "validation",
|
|
4889
4551
|
message: "if onComplete function is not specified then redirectUri must be specified"
|
|
4890
|
-
}) :
|
|
4552
|
+
}) : t.onError({
|
|
4891
4553
|
code: "validation",
|
|
4892
4554
|
message: "if onCheckout function is not specified then checkoutUri must be specified"
|
|
4893
4555
|
});
|
|
4894
4556
|
}
|
|
4895
|
-
}]),
|
|
4557
|
+
}]), t;
|
|
4896
4558
|
}();
|
|
4897
|
-
n.Checkout =
|
|
4559
|
+
n.Checkout = y;
|
|
4898
4560
|
}, {
|
|
4899
4561
|
"./console": 5,
|
|
4900
4562
|
"./events": 6,
|
|
@@ -4903,293 +4565,261 @@
|
|
|
4903
4565
|
"./utility": 10,
|
|
4904
4566
|
q: 2
|
|
4905
4567
|
}],
|
|
4906
|
-
5: [function (
|
|
4568
|
+
5: [function (t, e, n) {
|
|
4907
4569
|
|
|
4908
4570
|
Object.defineProperty(n, "__esModule", {
|
|
4909
4571
|
value: !0
|
|
4910
4572
|
});
|
|
4911
|
-
var r = "error"
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
}
|
|
4922
|
-
},
|
|
4923
|
-
debug: function debug() {
|
|
4924
|
-
if ("debug" === r) {
|
|
4925
|
-
var e;
|
|
4926
|
-
(e = window.console).log.apply(e, arguments);
|
|
4927
|
-
}
|
|
4928
|
-
},
|
|
4929
|
-
setLevel: function setLevel(e) {
|
|
4930
|
-
r = e;
|
|
4573
|
+
var r = "error";
|
|
4574
|
+
n["default"] = {
|
|
4575
|
+
error: function error() {
|
|
4576
|
+
var t;
|
|
4577
|
+
(t = window.console).log.apply(t, arguments);
|
|
4578
|
+
},
|
|
4579
|
+
information: function information() {
|
|
4580
|
+
if ("error" !== r) {
|
|
4581
|
+
var t;
|
|
4582
|
+
(t = window.console).log.apply(t, arguments);
|
|
4931
4583
|
}
|
|
4932
|
-
}
|
|
4933
|
-
|
|
4584
|
+
},
|
|
4585
|
+
debug: function debug() {
|
|
4586
|
+
if ("debug" === r) {
|
|
4587
|
+
var t;
|
|
4588
|
+
(t = window.console).log.apply(t, arguments);
|
|
4589
|
+
}
|
|
4590
|
+
},
|
|
4591
|
+
setLevel: function setLevel(t) {
|
|
4592
|
+
r = t;
|
|
4593
|
+
}
|
|
4594
|
+
};
|
|
4934
4595
|
}, {}],
|
|
4935
|
-
6: [function (
|
|
4936
|
-
(function (
|
|
4596
|
+
6: [function (t, e, n) {
|
|
4597
|
+
(function (e) {
|
|
4937
4598
|
|
|
4938
|
-
function r(e, t) {
|
|
4939
|
-
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
4940
|
-
}
|
|
4941
|
-
function o(e) {
|
|
4942
|
-
var n = new t.CustomEvent("zipmoney", {
|
|
4943
|
-
detail: e
|
|
4944
|
-
});
|
|
4945
|
-
t.dispatchEvent(n);
|
|
4946
|
-
}
|
|
4947
|
-
function i(e) {
|
|
4948
|
-
console.log("Unexpected Event", e);
|
|
4949
|
-
}
|
|
4950
4599
|
Object.defineProperty(n, "__esModule", {
|
|
4951
4600
|
value: !0
|
|
4952
4601
|
}), n.EventListener = void 0;
|
|
4953
|
-
var
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4602
|
+
var r,
|
|
4603
|
+
o = function () {
|
|
4604
|
+
function t(t, e) {
|
|
4605
|
+
for (var n = 0; n < e.length; n++) {
|
|
4606
|
+
var r = e[n];
|
|
4607
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
|
|
4958
4608
|
}
|
|
4959
4609
|
}
|
|
4960
|
-
return function (
|
|
4961
|
-
return n && e
|
|
4610
|
+
return function (e, n, r) {
|
|
4611
|
+
return n && t(e.prototype, n), r && t(e, r), e;
|
|
4962
4612
|
};
|
|
4963
|
-
}()
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
}(c)["default"].isIe) {
|
|
4970
|
-
var a = function a(e, t) {
|
|
4971
|
-
t = t || {
|
|
4613
|
+
}();
|
|
4614
|
+
if (((r = t("./utility")) && r.__esModule ? r : {
|
|
4615
|
+
"default": r
|
|
4616
|
+
})["default"].isIe) {
|
|
4617
|
+
var i = function i(t, e) {
|
|
4618
|
+
e = e || {
|
|
4972
4619
|
bubbles: !1,
|
|
4973
4620
|
cancelable: !1,
|
|
4974
4621
|
detail: void 0
|
|
4975
4622
|
};
|
|
4976
4623
|
var n = document.createEvent("CustomEvent");
|
|
4977
|
-
return n.initCustomEvent(
|
|
4624
|
+
return n.initCustomEvent(t, e.bubbles, e.cancelable, e.detail), n;
|
|
4978
4625
|
};
|
|
4979
|
-
|
|
4626
|
+
i.prototype = e.Event.prototype, e.CustomEvent = i;
|
|
4980
4627
|
}
|
|
4981
|
-
var
|
|
4982
|
-
|
|
4983
|
-
function
|
|
4984
|
-
|
|
4628
|
+
var u = {},
|
|
4629
|
+
a = n.EventListener = function () {
|
|
4630
|
+
function t() {
|
|
4631
|
+
!function t(e, n) {
|
|
4632
|
+
if (!(e instanceof n)) throw TypeError("Cannot call a class as a function");
|
|
4633
|
+
}(this, t);
|
|
4985
4634
|
}
|
|
4986
|
-
return
|
|
4635
|
+
return o(t, null, [{
|
|
4987
4636
|
key: "constructor",
|
|
4988
4637
|
value: function value() {
|
|
4989
|
-
|
|
4638
|
+
u = {};
|
|
4990
4639
|
}
|
|
4991
4640
|
}, {
|
|
4992
4641
|
key: "on",
|
|
4993
|
-
value: function value(
|
|
4994
|
-
|
|
4642
|
+
value: function value(t, e) {
|
|
4643
|
+
u[t] = e;
|
|
4995
4644
|
}
|
|
4996
4645
|
}, {
|
|
4997
4646
|
key: "off",
|
|
4998
|
-
value: function value(
|
|
4999
|
-
|
|
4647
|
+
value: function value(t) {
|
|
4648
|
+
u[t] = null;
|
|
5000
4649
|
}
|
|
5001
|
-
}]),
|
|
4650
|
+
}]), t;
|
|
5002
4651
|
}();
|
|
5003
|
-
|
|
5004
|
-
this.eventType =
|
|
5005
|
-
},
|
|
4652
|
+
a.Event = function (t, e) {
|
|
4653
|
+
this.eventType = t, this.data = e || {};
|
|
4654
|
+
}, a.Event.eventTypes = {
|
|
5006
4655
|
resize: "resize",
|
|
5007
4656
|
transition: "transition",
|
|
5008
4657
|
close: "close",
|
|
5009
4658
|
complete: "complete",
|
|
5010
4659
|
clear: "clear"
|
|
5011
4660
|
};
|
|
5012
|
-
var
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
4661
|
+
var c = window.addEventListener ? "addEventListener" : "attachEvent",
|
|
4662
|
+
s = window[c];
|
|
4663
|
+
s("attachEvent" == c ? "onmessage" : "message", function (t) {
|
|
4664
|
+
var n, r;
|
|
4665
|
+
t.data.zipmoney && (n = t.data.msg, r = new e.CustomEvent("zipmoney", {
|
|
4666
|
+
detail: n
|
|
4667
|
+
}), e.dispatchEvent(r));
|
|
4668
|
+
}, !1), s("zipmoney", function (t) {
|
|
4669
|
+
var e,
|
|
4670
|
+
n = u[t.detail.eventType];
|
|
4671
|
+
n ? n(t.detail.data || {}) : (e = t, console.log("Unexpected Event", e));
|
|
5020
4672
|
}, !1);
|
|
5021
4673
|
}).call(this, "undefined" != typeof commonjsGlobal ? commonjsGlobal : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {});
|
|
5022
4674
|
}, {
|
|
5023
4675
|
"./utility": 10
|
|
5024
4676
|
}],
|
|
5025
|
-
7: [function (
|
|
5026
|
-
(function (
|
|
4677
|
+
7: [function (t, e, n) {
|
|
4678
|
+
(function (e) {
|
|
5027
4679
|
|
|
5028
|
-
var n =
|
|
5029
|
-
r =
|
|
5030
|
-
|
|
4680
|
+
var n = t("./checkout"),
|
|
4681
|
+
r = t("./events");
|
|
4682
|
+
e.Zip = e.Zip || {}, e.Zip.Checkout = n.Checkout, e.zipMoneyEvent = r.EventListener.ZipEvent;
|
|
5031
4683
|
}).call(this, "undefined" != typeof commonjsGlobal ? commonjsGlobal : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {});
|
|
5032
4684
|
}, {
|
|
5033
4685
|
"./checkout": 4,
|
|
5034
4686
|
"./events": 6
|
|
5035
4687
|
}],
|
|
5036
|
-
8: [function (
|
|
4688
|
+
8: [function (t, e, n) {
|
|
5037
4689
|
|
|
5038
|
-
function r(
|
|
5039
|
-
return
|
|
5040
|
-
"default":
|
|
4690
|
+
function r(t) {
|
|
4691
|
+
return t && t.__esModule ? t : {
|
|
4692
|
+
"default": t
|
|
5041
4693
|
};
|
|
5042
4694
|
}
|
|
5043
|
-
function o(
|
|
5044
|
-
|
|
4695
|
+
function o() {
|
|
4696
|
+
return Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
|
|
5045
4697
|
}
|
|
5046
4698
|
function i() {
|
|
5047
|
-
|
|
4699
|
+
var t = document.body,
|
|
4700
|
+
e = document.documentElement;
|
|
4701
|
+
return Math.max(t.scrollHeight, t.offsetHeight, e.clientHeight, e.scrollHeight, e.offsetHeight);
|
|
5048
4702
|
}
|
|
5049
|
-
function u() {
|
|
5050
|
-
var e = document.body,
|
|
5051
|
-
t = document.documentElement;
|
|
5052
|
-
return Math.max(e.scrollHeight, e.offsetHeight, t.clientHeight, t.scrollHeight, t.offsetHeight);
|
|
5053
|
-
}
|
|
5054
|
-
function c(e, t) {
|
|
5055
|
-
var n = document.createElement("div");
|
|
5056
|
-
return n.className = "zipmoney-overlay", _extends(n.style, {
|
|
5057
|
-
position: "absolute",
|
|
5058
|
-
left: "0",
|
|
5059
|
-
top: "0",
|
|
5060
|
-
display: "table-cell",
|
|
5061
|
-
textAlign: "center",
|
|
5062
|
-
verticalAlign: "middle",
|
|
5063
|
-
background: "rgba(0, 0, 0, 0.75)",
|
|
5064
|
-
zIndex: "10000",
|
|
5065
|
-
height: "100%",
|
|
5066
|
-
width: "100%"
|
|
5067
|
-
}), n;
|
|
5068
|
-
}
|
|
5069
|
-
function a(e, t) {
|
|
5070
|
-
var n = document.createElement("iframe");
|
|
5071
|
-
return n.id = "zipmoney-iframe", n.frameborder = 0, _extends(n.style, {
|
|
5072
|
-
padding: "0",
|
|
5073
|
-
border: "none",
|
|
5074
|
-
zIndex: "999999",
|
|
5075
|
-
backgroundColor: "#FFF",
|
|
5076
|
-
backgroundImage: "url(" + k + "spinner.gif)",
|
|
5077
|
-
backgroundRepeat: "no-repeat",
|
|
5078
|
-
backgroundPosition: "50% 50%"
|
|
5079
|
-
}), t ? _extends(n.style, {
|
|
5080
|
-
overflow: "scroll",
|
|
5081
|
-
width: "100%",
|
|
5082
|
-
height: "100%",
|
|
5083
|
-
position: "absolute",
|
|
5084
|
-
top: "0",
|
|
5085
|
-
bottom: "0",
|
|
5086
|
-
left: "0",
|
|
5087
|
-
right: "0",
|
|
5088
|
-
margin: "0"
|
|
5089
|
-
}) : _extends(n.style, {
|
|
5090
|
-
width: b.iframeWidth + "px",
|
|
5091
|
-
minWidth: b.iframeMinWidth + "px",
|
|
5092
|
-
height: b.iframeInitialHeight + "px",
|
|
5093
|
-
margin: b.verticalMargin + "px auto 0 auto",
|
|
5094
|
-
display: "table-row",
|
|
5095
|
-
backgroundSize: "25%",
|
|
5096
|
-
textAlign: "center",
|
|
5097
|
-
boxShadow: "0px 0px 70px 0px rgb(0, 0, 0)"
|
|
5098
|
-
}), n.src = e || "", n;
|
|
5099
|
-
}
|
|
5100
|
-
function s() {
|
|
5101
|
-
var e = document.createElement("img");
|
|
5102
|
-
return e.src = k + "icon-close.png", _extends(e.style, {
|
|
5103
|
-
width: "50px",
|
|
5104
|
-
height: "50px",
|
|
5105
|
-
position: "absolute",
|
|
5106
|
-
top: "20px",
|
|
5107
|
-
right: "20px",
|
|
5108
|
-
cursor: "pointer"
|
|
5109
|
-
}), e;
|
|
5110
|
-
}
|
|
5111
|
-
function f() {
|
|
5112
|
-
var e = document.createElement("div");
|
|
5113
|
-
e.style.width = b.iframeWidth + "px", e.style.minWidth = b.iframeMinWidth + "px", e.style.margin = "10px auto 0 auto", e.style.overflow = "hidden";
|
|
5114
|
-
var t = document.createElement("img");
|
|
5115
|
-
t.src = k + "iframe-secure.png", t.style.cssFloat = "left";
|
|
5116
|
-
var n = document.createElement("img");
|
|
5117
|
-
return n.src = k + "poweredby-trans.png", n.style.cssFloat = "right", e.appendChild(t), e.appendChild(n), e;
|
|
5118
|
-
}
|
|
5119
|
-
function l(e) {
|
|
5120
|
-
for (var t = document.querySelectorAll("html, body"), n = 0; n < t.length; n++) t[n].style.overflowY = e;
|
|
5121
|
-
}
|
|
5122
|
-
function p(e) {
|
|
5123
|
-
var t = document.body.currentStyle || window.getComputedStyle(document.body),
|
|
5124
|
-
n = document.body.offsetHeight,
|
|
5125
|
-
r = parseInt(t.marginTop, 10) + parseInt(t.marginBottom, 10),
|
|
5126
|
-
o = n + r,
|
|
5127
|
-
i = o - parseInt(t.height, 10),
|
|
5128
|
-
u = e - i;
|
|
5129
|
-
document.body.style.height = u + "px";
|
|
4703
|
+
function u(t) {
|
|
4704
|
+
for (var e = document.querySelectorAll("html, body"), n = 0; n < e.length; n++) e[n].style.overflowY = t;
|
|
5130
4705
|
}
|
|
5131
|
-
function
|
|
5132
|
-
document.body.
|
|
4706
|
+
function a(t) {
|
|
4707
|
+
var e = document.body.currentStyle || window.getComputedStyle(document.body),
|
|
4708
|
+
n = document.body.offsetHeight,
|
|
4709
|
+
r = parseInt(e.marginTop, 10) + parseInt(e.marginBottom, 10),
|
|
4710
|
+
o = n + r - parseInt(e.height, 10);
|
|
4711
|
+
document.body.style.height = t - o + "px";
|
|
5133
4712
|
}
|
|
5134
4713
|
Object.defineProperty(n, "__esModule", {
|
|
5135
4714
|
value: !0
|
|
5136
4715
|
});
|
|
5137
|
-
var
|
|
5138
|
-
function
|
|
5139
|
-
for (var n = 0; n <
|
|
5140
|
-
var r =
|
|
5141
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(
|
|
4716
|
+
var c = function () {
|
|
4717
|
+
function t(t, e) {
|
|
4718
|
+
for (var n = 0; n < e.length; n++) {
|
|
4719
|
+
var r = e[n];
|
|
4720
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
|
|
5142
4721
|
}
|
|
5143
4722
|
}
|
|
5144
|
-
return function (
|
|
5145
|
-
return n && e
|
|
4723
|
+
return function (e, n, r) {
|
|
4724
|
+
return n && t(e.prototype, n), r && t(e, r), e;
|
|
5146
4725
|
};
|
|
5147
4726
|
}(),
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
4727
|
+
s = t("./utility"),
|
|
4728
|
+
f = r(s),
|
|
4729
|
+
l = t("./events"),
|
|
4730
|
+
p = t("./console"),
|
|
4731
|
+
d = (r(p), {
|
|
5153
4732
|
iframeWidth: 400,
|
|
5154
4733
|
iframeMinWidth: 320,
|
|
5155
4734
|
iframeInitialHeight: 704,
|
|
5156
4735
|
iframeMinHeight: 600,
|
|
5157
4736
|
verticalMargin: 35
|
|
5158
4737
|
}),
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
function
|
|
5163
|
-
var
|
|
5164
|
-
|
|
5165
|
-
|
|
4738
|
+
h = ["resize", "transition", "close", "complete", "clear"],
|
|
4739
|
+
v = "https://d3k1w8lx8mqizo.cloudfront.net/zm/",
|
|
4740
|
+
y = function () {
|
|
4741
|
+
function t() {
|
|
4742
|
+
var e = this;
|
|
4743
|
+
(function t(e, n) {
|
|
4744
|
+
if (!(e instanceof n)) throw TypeError("Cannot call a class as a function");
|
|
4745
|
+
})(this, t), this._events = [], this._isMobile = f["default"].isMobileDevice(), h.forEach(function (t) {
|
|
4746
|
+
return l.EventListener.on(l.EventListener.Event.eventTypes[t], e[t].bind(e));
|
|
5166
4747
|
});
|
|
5167
4748
|
}
|
|
5168
|
-
return
|
|
4749
|
+
return c(t, [{
|
|
5169
4750
|
key: "build",
|
|
5170
4751
|
value: function value() {
|
|
5171
|
-
this._initialHtmlHeight =
|
|
5172
|
-
var
|
|
4752
|
+
this._initialHtmlHeight = i(), window.scrollTo(0, 0);
|
|
4753
|
+
var t = this._frame = (e = this._frameUri, n = this._isMobile, (r = document.createElement("iframe")).id = "zipmoney-iframe", r.frameborder = 0, _extends(r.style, {
|
|
4754
|
+
padding: "0",
|
|
4755
|
+
border: "none",
|
|
4756
|
+
zIndex: "999999",
|
|
4757
|
+
backgroundColor: "#FFF",
|
|
4758
|
+
backgroundImage: "url(" + v + "spinner.gif)",
|
|
4759
|
+
backgroundRepeat: "no-repeat",
|
|
4760
|
+
backgroundPosition: "50% 50%"
|
|
4761
|
+
}), n ? _extends(r.style, {
|
|
4762
|
+
overflow: "scroll",
|
|
4763
|
+
width: "100%",
|
|
4764
|
+
height: "100%",
|
|
4765
|
+
position: "absolute",
|
|
4766
|
+
top: "0",
|
|
4767
|
+
bottom: "0",
|
|
4768
|
+
left: "0",
|
|
4769
|
+
right: "0",
|
|
4770
|
+
margin: "0"
|
|
4771
|
+
}) : _extends(r.style, {
|
|
4772
|
+
width: d.iframeWidth + "px",
|
|
4773
|
+
minWidth: d.iframeMinWidth + "px",
|
|
4774
|
+
height: d.iframeInitialHeight + "px",
|
|
4775
|
+
margin: d.verticalMargin + "px auto 0 auto",
|
|
4776
|
+
display: "table-row",
|
|
4777
|
+
backgroundSize: "25%",
|
|
4778
|
+
textAlign: "center",
|
|
4779
|
+
boxShadow: "0px 0px 70px 0px rgb(0, 0, 0)"
|
|
4780
|
+
}), r.src = e || "", r);
|
|
5173
4781
|
if (!this._isMobile) {
|
|
5174
|
-
var
|
|
5175
|
-
|
|
4782
|
+
var e,
|
|
4783
|
+
n,
|
|
4784
|
+
r,
|
|
4785
|
+
o,
|
|
4786
|
+
c,
|
|
4787
|
+
s = ((o = document.createElement("img")).src = v + "icon-close.png", _extends(o.style, {
|
|
4788
|
+
width: "50px",
|
|
4789
|
+
height: "50px",
|
|
4790
|
+
position: "absolute",
|
|
4791
|
+
top: "20px",
|
|
4792
|
+
right: "20px",
|
|
4793
|
+
cursor: "pointer"
|
|
4794
|
+
}), o);
|
|
4795
|
+
s.onclick = this.close.bind(this), this._overlay = ((c = document.createElement("div")).className = "zipmoney-overlay", _extends(c.style, {
|
|
4796
|
+
position: "absolute",
|
|
4797
|
+
left: "0",
|
|
4798
|
+
top: "0",
|
|
4799
|
+
display: "table-cell",
|
|
4800
|
+
textAlign: "center",
|
|
4801
|
+
verticalAlign: "middle",
|
|
4802
|
+
background: "rgba(0, 0, 0, 0.75)",
|
|
4803
|
+
zIndex: "10000",
|
|
4804
|
+
height: "100%",
|
|
4805
|
+
width: "100%"
|
|
4806
|
+
}), c), this._overlay.appendChild(s), this._overlay.appendChild(this._frame), t = this._overlay;
|
|
5176
4807
|
}
|
|
5177
|
-
document.body.appendChild(
|
|
4808
|
+
document.body.appendChild(t), this._isMobile && a(this._frame.offsetHeight), u("auto"), this._startMonitoringWindowResize();
|
|
5178
4809
|
}
|
|
5179
4810
|
}, {
|
|
5180
4811
|
key: "setUri",
|
|
5181
|
-
value: function value(
|
|
5182
|
-
this._frameUri =
|
|
4812
|
+
value: function value(t) {
|
|
4813
|
+
this._frameUri = t, this._frame && (this._frame.src = t);
|
|
5183
4814
|
}
|
|
5184
4815
|
}, {
|
|
5185
4816
|
key: "resize",
|
|
5186
|
-
value: function value(
|
|
5187
|
-
var
|
|
5188
|
-
|
|
5189
|
-
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
this._frame.style.height = e + "px", this._overlay && (this._overlay.style.height = Math.max(r, this._initialHtmlHeight, n) + "px"), this._isMobile && p(e);
|
|
4817
|
+
value: function value(t) {
|
|
4818
|
+
var e = this._isMobile ? 16 : 0,
|
|
4819
|
+
t = t >= d.iframeMinHeight ? t : d.iframeMinHeight,
|
|
4820
|
+
n = (t += e) + 2 * d.verticalMargin,
|
|
4821
|
+
r = o();
|
|
4822
|
+
this._frame.style.height = t + "px", this._overlay && (this._overlay.style.height = Math.max(r, this._initialHtmlHeight, n) + "px"), this._isMobile && a(t);
|
|
5193
4823
|
}
|
|
5194
4824
|
}, {
|
|
5195
4825
|
key: "transition",
|
|
@@ -5199,241 +4829,227 @@
|
|
|
5199
4829
|
}, {
|
|
5200
4830
|
key: "close",
|
|
5201
4831
|
value: function value() {
|
|
5202
|
-
var
|
|
5203
|
-
|
|
4832
|
+
var t = !(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0],
|
|
4833
|
+
e = {
|
|
5204
4834
|
state: "cancelled"
|
|
5205
4835
|
};
|
|
5206
|
-
this._events.length && (
|
|
4836
|
+
this._events.length && (e = this._events.pop()), this._destroy(), this.onClose && t && this.onClose(e);
|
|
5207
4837
|
}
|
|
5208
4838
|
}, {
|
|
5209
4839
|
key: "complete",
|
|
5210
|
-
value: function value(
|
|
5211
|
-
this._events.push(
|
|
4840
|
+
value: function value(t) {
|
|
4841
|
+
this._events.push(t);
|
|
5212
4842
|
}
|
|
5213
4843
|
}, {
|
|
5214
4844
|
key: "clear",
|
|
5215
|
-
value: function value(
|
|
4845
|
+
value: function value(t) {
|
|
5216
4846
|
this._events = [];
|
|
5217
4847
|
}
|
|
5218
4848
|
}, {
|
|
5219
4849
|
key: "_startMonitoringWindowResize",
|
|
5220
4850
|
value: function value() {
|
|
5221
|
-
function e(e) {
|
|
5222
|
-
var t = i(),
|
|
5223
|
-
n = u(),
|
|
5224
|
-
r = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
5225
|
-
e._overlay && (e._overlay.style.height = Math.max(t, n) + "px"), e._isMobile || r < b.iframeWidth ? e._frame.style.width = "100%" : e._frame.style.width = b.iframeWidth + "px";
|
|
5226
|
-
}
|
|
5227
4851
|
var t = this;
|
|
5228
|
-
this._resizeHandler =
|
|
5229
|
-
|
|
5230
|
-
|
|
4852
|
+
this._resizeHandler = f["default"].debounce(function () {
|
|
4853
|
+
var e, n, r, u;
|
|
4854
|
+
return e = t, n = o(), r = i(), u = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, void (e._overlay && (e._overlay.style.height = Math.max(n, r) + "px"), e._isMobile || u < d.iframeWidth ? e._frame.style.width = "100%" : e._frame.style.width = d.iframeWidth + "px");
|
|
4855
|
+
}, 250), f["default"].addEventHandler(window, "resize", this._resizeHandler);
|
|
5231
4856
|
}
|
|
5232
4857
|
}, {
|
|
5233
4858
|
key: "_stopMonitoringWindowResize",
|
|
5234
4859
|
value: function value() {
|
|
5235
|
-
|
|
4860
|
+
f["default"].removeEventHandler(window, "resize", this._resizeHandler);
|
|
5236
4861
|
}
|
|
5237
4862
|
}, {
|
|
5238
4863
|
key: "_destroy",
|
|
5239
4864
|
value: function value() {
|
|
5240
|
-
this._stopMonitoringWindowResize(), this._overlay ? document.body.removeChild(this._overlay) : document.body.removeChild(this._frame), this._isMobile &&
|
|
5241
|
-
return
|
|
4865
|
+
this._stopMonitoringWindowResize(), this._overlay ? document.body.removeChild(this._overlay) : document.body.removeChild(this._frame), this._isMobile && (document.body.style.height = "initial"), u("initial"), this._overlay = this._frame = null, h.forEach(function (t) {
|
|
4866
|
+
return l.EventListener.off(l.EventListener.Event.eventTypes[t]);
|
|
5242
4867
|
});
|
|
5243
4868
|
}
|
|
5244
|
-
}]),
|
|
4869
|
+
}]), t;
|
|
5245
4870
|
}();
|
|
5246
|
-
n["default"] =
|
|
4871
|
+
n["default"] = y;
|
|
5247
4872
|
}, {
|
|
5248
4873
|
"./console": 5,
|
|
5249
4874
|
"./events": 6,
|
|
5250
4875
|
"./utility": 10
|
|
5251
4876
|
}],
|
|
5252
|
-
9: [function (
|
|
4877
|
+
9: [function (t, e, n) {
|
|
5253
4878
|
|
|
5254
|
-
function r(
|
|
5255
|
-
return
|
|
5256
|
-
"default":
|
|
4879
|
+
function r(t) {
|
|
4880
|
+
return t && t.__esModule ? t : {
|
|
4881
|
+
"default": t
|
|
5257
4882
|
};
|
|
5258
4883
|
}
|
|
5259
4884
|
Object.defineProperty(n, "__esModule", {
|
|
5260
4885
|
value: !0
|
|
5261
4886
|
});
|
|
5262
|
-
var o =
|
|
4887
|
+
var o = t("./xr"),
|
|
5263
4888
|
i = r(o),
|
|
5264
|
-
u =
|
|
5265
|
-
|
|
4889
|
+
u = t("./console"),
|
|
4890
|
+
a = r(u);
|
|
5266
4891
|
i["default"].configure({
|
|
5267
4892
|
headers: {
|
|
5268
4893
|
"X-Requested-With": "XMLHttpRequest"
|
|
5269
4894
|
}
|
|
5270
|
-
})
|
|
5271
|
-
var a = {
|
|
4895
|
+
}), n["default"] = {
|
|
5272
4896
|
request: "standard",
|
|
5273
4897
|
redirect: !1,
|
|
5274
4898
|
logLevel: "Error",
|
|
5275
|
-
onCheckout: function onCheckout(
|
|
5276
|
-
i["default"].post(this.checkoutUri).then(function (
|
|
5277
|
-
return e
|
|
5278
|
-
})["catch"](
|
|
4899
|
+
onCheckout: function onCheckout(t, e, n) {
|
|
4900
|
+
i["default"].post(this.checkoutUri).then(function (e) {
|
|
4901
|
+
return t(e.data);
|
|
4902
|
+
})["catch"](e);
|
|
5279
4903
|
},
|
|
5280
|
-
onShippingAddressChanged: function onShippingAddressChanged(
|
|
5281
|
-
i["default"].post(this.shippingUri).then(
|
|
4904
|
+
onShippingAddressChanged: function onShippingAddressChanged(t, e, n) {
|
|
4905
|
+
i["default"].post(this.shippingUri).then(t)["catch"](e);
|
|
5282
4906
|
},
|
|
5283
|
-
onComplete: function onComplete(
|
|
5284
|
-
if (
|
|
5285
|
-
var
|
|
5286
|
-
this.redirectFn(this.redirectUri + "?result=" +
|
|
4907
|
+
onComplete: function onComplete(t) {
|
|
4908
|
+
if (a["default"].information("zip:completed", t), "cancelled" !== t.state) {
|
|
4909
|
+
var e = t.checkoutId ? "&checkoutId=" + t.checkoutId : "";
|
|
4910
|
+
this.redirectFn(this.redirectUri + "?result=" + t.state + e);
|
|
5287
4911
|
}
|
|
5288
4912
|
},
|
|
5289
|
-
onError: function onError(
|
|
5290
|
-
|
|
4913
|
+
onError: function onError(t) {
|
|
4914
|
+
a["default"].error(t);
|
|
5291
4915
|
},
|
|
5292
|
-
redirectFn: function redirectFn(
|
|
5293
|
-
window.location.href =
|
|
4916
|
+
redirectFn: function redirectFn(t) {
|
|
4917
|
+
window.location.href = t;
|
|
5294
4918
|
}
|
|
5295
4919
|
};
|
|
5296
|
-
n["default"] = a;
|
|
5297
4920
|
}, {
|
|
5298
4921
|
"./console": 5,
|
|
5299
4922
|
"./xr": 11
|
|
5300
4923
|
}],
|
|
5301
|
-
10: [function (
|
|
4924
|
+
10: [function (t, e, n) {
|
|
5302
4925
|
|
|
5303
|
-
function r(e, t) {
|
|
5304
|
-
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
5305
|
-
}
|
|
5306
4926
|
Object.defineProperty(n, "__esModule", {
|
|
5307
4927
|
value: !0
|
|
5308
4928
|
});
|
|
5309
|
-
var
|
|
5310
|
-
function
|
|
5311
|
-
for (var n = 0; n <
|
|
5312
|
-
var r =
|
|
5313
|
-
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(
|
|
4929
|
+
var r = function () {
|
|
4930
|
+
function t(t, e) {
|
|
4931
|
+
for (var n = 0; n < e.length; n++) {
|
|
4932
|
+
var r = e[n];
|
|
4933
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(t, r.key, r);
|
|
5314
4934
|
}
|
|
5315
4935
|
}
|
|
5316
|
-
return function (
|
|
5317
|
-
return n && e
|
|
4936
|
+
return function (e, n, r) {
|
|
4937
|
+
return n && t(e.prototype, n), r && t(e, r), e;
|
|
5318
4938
|
};
|
|
5319
4939
|
}(),
|
|
5320
|
-
|
|
5321
|
-
function
|
|
5322
|
-
|
|
4940
|
+
o = function () {
|
|
4941
|
+
function t() {
|
|
4942
|
+
!function t(e, n) {
|
|
4943
|
+
if (!(e instanceof n)) throw TypeError("Cannot call a class as a function");
|
|
4944
|
+
}(this, t);
|
|
5323
4945
|
}
|
|
5324
|
-
return
|
|
4946
|
+
return r(t, null, [{
|
|
5325
4947
|
key: "isIe",
|
|
5326
4948
|
value: function value() {
|
|
5327
|
-
var
|
|
5328
|
-
|
|
5329
|
-
n =
|
|
5330
|
-
r =
|
|
5331
|
-
if (n > 0)
|
|
5332
|
-
var o =
|
|
5333
|
-
|
|
4949
|
+
var t = -1,
|
|
4950
|
+
e = window.navigator.userAgent,
|
|
4951
|
+
n = e.indexOf("MSIE "),
|
|
4952
|
+
r = e.indexOf("Trident/");
|
|
4953
|
+
if (n > 0) t = parseInt(e.substring(n + 5, e.indexOf(".", n)), 10);else if (r > 0) {
|
|
4954
|
+
var o = e.indexOf("rv:");
|
|
4955
|
+
t = parseInt(e.substring(o + 3, e.indexOf(".", o)), 10);
|
|
5334
4956
|
}
|
|
5335
|
-
return
|
|
4957
|
+
return t > -1 ? t : void 0;
|
|
5336
4958
|
}
|
|
5337
4959
|
}, {
|
|
5338
4960
|
key: "isMobileDevice",
|
|
5339
4961
|
value: function value() {
|
|
5340
|
-
var
|
|
5341
|
-
return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(
|
|
4962
|
+
var t = navigator.userAgent || navigator.vendor || window.opera;
|
|
4963
|
+
return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0, 4));
|
|
5342
4964
|
}
|
|
5343
4965
|
}, {
|
|
5344
4966
|
key: "debounce",
|
|
5345
|
-
value: function value(
|
|
4967
|
+
value: function value(t, e) {
|
|
5346
4968
|
var n;
|
|
5347
4969
|
return function () {
|
|
5348
4970
|
var r = this,
|
|
5349
4971
|
o = arguments,
|
|
5350
4972
|
i = function i() {
|
|
5351
|
-
n = null,
|
|
4973
|
+
n = null, t.apply(r, o);
|
|
5352
4974
|
},
|
|
5353
4975
|
u = !n;
|
|
5354
|
-
clearTimeout(n), n = setTimeout(i,
|
|
4976
|
+
clearTimeout(n), n = setTimeout(i, e), u && t.apply(r, o);
|
|
5355
4977
|
};
|
|
5356
4978
|
}
|
|
5357
4979
|
}, {
|
|
5358
4980
|
key: "addEventHandler",
|
|
5359
|
-
value: function value(
|
|
5360
|
-
|
|
4981
|
+
value: function value(t, e, n) {
|
|
4982
|
+
t.addEventListener ? t.addEventListener(e, n, !1) : t.attachEvent && t.attachEvent("on" + e, n);
|
|
5361
4983
|
}
|
|
5362
4984
|
}, {
|
|
5363
4985
|
key: "removeEventHandler",
|
|
5364
|
-
value: function value(
|
|
5365
|
-
|
|
4986
|
+
value: function value(t, e, n) {
|
|
4987
|
+
t.removeEventListener ? t.removeEventListener(e, n, !1) : t.detachEvent && t.detachEvent("on" + e, n);
|
|
5366
4988
|
}
|
|
5367
|
-
}]),
|
|
4989
|
+
}]), t;
|
|
5368
4990
|
}();
|
|
5369
|
-
n["default"] =
|
|
4991
|
+
n["default"] = o;
|
|
5370
4992
|
}, {}],
|
|
5371
|
-
11: [function (
|
|
4993
|
+
11: [function (t, e, n) {
|
|
5372
4994
|
|
|
5373
|
-
function r(
|
|
5374
|
-
return
|
|
5375
|
-
"default":
|
|
4995
|
+
function r(t) {
|
|
4996
|
+
return t && t.__esModule ? t : {
|
|
4997
|
+
"default": t
|
|
5376
4998
|
};
|
|
5377
4999
|
}
|
|
5378
|
-
function o(
|
|
5000
|
+
function o(t, e) {
|
|
5379
5001
|
return {
|
|
5380
|
-
status:
|
|
5381
|
-
response:
|
|
5382
|
-
data:
|
|
5383
|
-
xhr:
|
|
5002
|
+
status: t.status,
|
|
5003
|
+
response: t.response,
|
|
5004
|
+
data: e,
|
|
5005
|
+
xhr: t
|
|
5384
5006
|
};
|
|
5385
5007
|
}
|
|
5386
|
-
function i(
|
|
5387
|
-
for (var
|
|
5008
|
+
function i(t) {
|
|
5009
|
+
for (var e = arguments.length, n = Array(e > 1 ? e - 1 : 0), r = 1; r < e; r++) n[r - 1] = arguments[r];
|
|
5388
5010
|
for (var o in n) if ({}.hasOwnProperty.call(n, o)) {
|
|
5389
5011
|
var i = n[o];
|
|
5390
|
-
if ("object" === (void 0 === i ? "undefined" :
|
|
5012
|
+
if ("object" === (void 0 === i ? "undefined" : a(i))) for (var u in i) ({}).hasOwnProperty.call(i, u) && (t[u] = i[u]);
|
|
5391
5013
|
}
|
|
5392
|
-
return
|
|
5393
|
-
}
|
|
5394
|
-
function u(e) {
|
|
5395
|
-
m = i({}, m, e);
|
|
5396
|
-
}
|
|
5397
|
-
function c(e, t) {
|
|
5398
|
-
return (e && e.promise ? e.promise : m.promise || y.promise)(t);
|
|
5014
|
+
return t;
|
|
5399
5015
|
}
|
|
5400
|
-
function
|
|
5401
|
-
|
|
5402
|
-
|
|
5016
|
+
function u(t) {
|
|
5017
|
+
var e, n;
|
|
5018
|
+
return e = t, n = function n(e, _n) {
|
|
5019
|
+
var r = i({}, h, v, t),
|
|
5403
5020
|
u = r.xmlHttpRequest();
|
|
5404
|
-
r.abort &&
|
|
5405
|
-
|
|
5406
|
-
}), u.open(r.method, r.params ? r.url.split("?")[0] + "?" + (0,
|
|
5021
|
+
for (var c in r.abort && t.abort(function () {
|
|
5022
|
+
_n(o(u)), u.abort();
|
|
5023
|
+
}), u.open(r.method, r.params ? r.url.split("?")[0] + "?" + (0, s["default"])(r.params) : r.url, !0), u.withCredentials = r.withCredentials, u.addEventListener(d.LOAD, function () {
|
|
5407
5024
|
if (u.status >= 200 && u.status < 300) {
|
|
5408
|
-
var
|
|
5409
|
-
u.responseText && (
|
|
5410
|
-
} else
|
|
5411
|
-
}), u.addEventListener(
|
|
5412
|
-
return
|
|
5413
|
-
}), u.addEventListener(
|
|
5414
|
-
return
|
|
5415
|
-
}), u.addEventListener(
|
|
5416
|
-
return
|
|
5417
|
-
});
|
|
5418
|
-
for (var
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
});
|
|
5025
|
+
var t = null;
|
|
5026
|
+
u.responseText && (t = !0 === r.raw ? u.responseText : r.load(u.responseText)), e(o(u, t));
|
|
5027
|
+
} else _n(o(u));
|
|
5028
|
+
}), u.addEventListener(d.ABORT, function () {
|
|
5029
|
+
return _n(o(u));
|
|
5030
|
+
}), u.addEventListener(d.ERROR, function () {
|
|
5031
|
+
return _n(o(u));
|
|
5032
|
+
}), u.addEventListener(d.TIMEOUT, function () {
|
|
5033
|
+
return _n(o(u));
|
|
5034
|
+
}), r.headers) ({}).hasOwnProperty.call(r.headers, c) && u.setRequestHeader(c, r.headers[c]);
|
|
5035
|
+
for (var f in r.events) ({}).hasOwnProperty.call(r.events, f) && u.addEventListener(f, r.events[f].bind(null, u), !1);
|
|
5036
|
+
var l = "object" !== a(r.data) || r.raw ? r.data : r.dump(r.data);
|
|
5037
|
+
void 0 !== l ? u.send(l) : u.send();
|
|
5038
|
+
}, (e && e.promise ? e.promise : v.promise || h.promise)(n);
|
|
5423
5039
|
}
|
|
5424
5040
|
Object.defineProperty(n, "__esModule", {
|
|
5425
5041
|
value: !0
|
|
5426
5042
|
});
|
|
5427
|
-
var
|
|
5428
|
-
return _typeof(
|
|
5429
|
-
} : function (
|
|
5430
|
-
return
|
|
5043
|
+
var a = "function" == typeof Symbol && "symbol" == _typeof(Symbol.iterator) ? function (t) {
|
|
5044
|
+
return _typeof(t);
|
|
5045
|
+
} : function (t) {
|
|
5046
|
+
return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : _typeof(t);
|
|
5431
5047
|
},
|
|
5432
|
-
|
|
5048
|
+
c = t("querystring/encode"),
|
|
5049
|
+
s = r(c),
|
|
5050
|
+
f = t("q"),
|
|
5433
5051
|
l = r(f),
|
|
5434
|
-
p =
|
|
5435
|
-
d = r(p),
|
|
5436
|
-
h = {
|
|
5052
|
+
p = {
|
|
5437
5053
|
GET: "GET",
|
|
5438
5054
|
POST: "POST",
|
|
5439
5055
|
PUT: "PUT",
|
|
@@ -5441,7 +5057,7 @@
|
|
|
5441
5057
|
PATCH: "PATCH",
|
|
5442
5058
|
OPTIONS: "OPTIONS"
|
|
5443
5059
|
},
|
|
5444
|
-
|
|
5060
|
+
d = {
|
|
5445
5061
|
READY_STATE_CHANGE: "readystatechange",
|
|
5446
5062
|
LOAD_START: "loadstart",
|
|
5447
5063
|
PROGRESS: "progress",
|
|
@@ -5451,8 +5067,8 @@
|
|
|
5451
5067
|
TIMEOUT: "timeout",
|
|
5452
5068
|
LOAD_END: "loadend"
|
|
5453
5069
|
},
|
|
5454
|
-
|
|
5455
|
-
method:
|
|
5070
|
+
h = {
|
|
5071
|
+
method: p.GET,
|
|
5456
5072
|
data: void 0,
|
|
5457
5073
|
headers: {
|
|
5458
5074
|
Accept: "application/json",
|
|
@@ -5463,47 +5079,49 @@
|
|
|
5463
5079
|
xmlHttpRequest: function xmlHttpRequest() {
|
|
5464
5080
|
return new XMLHttpRequest();
|
|
5465
5081
|
},
|
|
5466
|
-
promise: function promise(
|
|
5467
|
-
return
|
|
5082
|
+
promise: function promise(t) {
|
|
5083
|
+
return l["default"].Promise(t);
|
|
5468
5084
|
},
|
|
5469
5085
|
withCredentials: !1
|
|
5470
5086
|
},
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5087
|
+
v = {};
|
|
5088
|
+
u.assign = i, u.encode = s["default"], u.configure = function t(e) {
|
|
5089
|
+
v = i({}, v, e);
|
|
5090
|
+
}, u.Methods = p, u.Events = d, u.defaults = h, u.get = function (t, e, n) {
|
|
5091
|
+
return u(i({
|
|
5092
|
+
url: t,
|
|
5093
|
+
method: p.GET,
|
|
5094
|
+
params: e
|
|
5477
5095
|
}, n));
|
|
5478
|
-
},
|
|
5479
|
-
return
|
|
5480
|
-
url:
|
|
5481
|
-
method:
|
|
5482
|
-
data:
|
|
5096
|
+
}, u.put = function (t, e, n) {
|
|
5097
|
+
return u(i({
|
|
5098
|
+
url: t,
|
|
5099
|
+
method: p.PUT,
|
|
5100
|
+
data: e
|
|
5483
5101
|
}, n));
|
|
5484
|
-
},
|
|
5485
|
-
return
|
|
5486
|
-
url:
|
|
5487
|
-
method:
|
|
5488
|
-
data:
|
|
5102
|
+
}, u.post = function (t, e, n) {
|
|
5103
|
+
return u(i({
|
|
5104
|
+
url: t,
|
|
5105
|
+
method: p.POST,
|
|
5106
|
+
data: e
|
|
5489
5107
|
}, n));
|
|
5490
|
-
},
|
|
5491
|
-
return
|
|
5492
|
-
url:
|
|
5493
|
-
method:
|
|
5494
|
-
data:
|
|
5108
|
+
}, u.patch = function (t, e, n) {
|
|
5109
|
+
return u(i({
|
|
5110
|
+
url: t,
|
|
5111
|
+
method: p.PATCH,
|
|
5112
|
+
data: e
|
|
5495
5113
|
}, n));
|
|
5496
|
-
},
|
|
5497
|
-
return
|
|
5498
|
-
url:
|
|
5499
|
-
method:
|
|
5500
|
-
},
|
|
5501
|
-
},
|
|
5502
|
-
return
|
|
5503
|
-
url:
|
|
5504
|
-
method:
|
|
5505
|
-
},
|
|
5506
|
-
}, n["default"] =
|
|
5114
|
+
}, u.del = function (t, e) {
|
|
5115
|
+
return u(i({
|
|
5116
|
+
url: t,
|
|
5117
|
+
method: p.DELETE
|
|
5118
|
+
}, e));
|
|
5119
|
+
}, u.options = function (t, e) {
|
|
5120
|
+
return u(i({
|
|
5121
|
+
url: t,
|
|
5122
|
+
method: p.OPTIONS
|
|
5123
|
+
}, e));
|
|
5124
|
+
}, n["default"] = u;
|
|
5507
5125
|
}, {
|
|
5508
5126
|
q: 2,
|
|
5509
5127
|
"querystring/encode": 3
|
|
@@ -6532,7 +6150,7 @@
|
|
|
6532
6150
|
}(Trigger);
|
|
6533
6151
|
|
|
6534
6152
|
var TEMPLATE$2 = "\n <div class=\"checkout-container\">\n <div class=\"checkout-bg-logo\"></div>\n <a href=\"#\" data-close>Close</a>\n </div>\n";
|
|
6535
|
-
var STYLES$1 = "\n .checkout-bg-logo {\n display: block;\n background: url({{url}}) no-repeat;\n width: 100px;\n height: 50px;\n margin: 0 auto;\n border-radius: 10px;\n background-size: contain;\n }\n";
|
|
6153
|
+
var STYLES$1 = "\n .checkout-bg-logo {\n display: block;\n background: url({{url}}) no-repeat;\n width: 100px;\n height: 50px;\n margin: 0 auto;\n border-radius: 10px;\n background-size: contain;\n }\n\n .checkout-overlay {\n z-index: 2147483647;\n }\n\n .checkout-container [data-close] {\n opacity: 1;\n }\n .checkout-container [data-close]:before,\n .checkout-container [data-close]:after {\n background-color: #fff;\n }\n";
|
|
6536
6154
|
var WalletBackground = /*#__PURE__*/function (_Background) {
|
|
6537
6155
|
_inherits(WalletBackground, _Background);
|
|
6538
6156
|
var _super = _createSuper(WalletBackground);
|
|
@@ -8307,6 +7925,7 @@
|
|
|
8307
7925
|
var CARD_SCHEME_SERVICE;
|
|
8308
7926
|
(function (CARD_SCHEME_SERVICE) {
|
|
8309
7927
|
CARD_SCHEME_SERVICE["VISA_SRC"] = "VisaSRC";
|
|
7928
|
+
CARD_SCHEME_SERVICE["MASTERCARD_SRC"] = "MastercardSRCClickToPay";
|
|
8310
7929
|
})(CARD_SCHEME_SERVICE || (CARD_SCHEME_SERVICE = {}));
|
|
8311
7930
|
|
|
8312
7931
|
var ApiInternal = /*#__PURE__*/function (_ApiBase) {
|
|
@@ -8494,6 +8113,7 @@
|
|
|
8494
8113
|
|
|
8495
8114
|
// src/checkout.ts
|
|
8496
8115
|
var Checkout = /*#__PURE__*/function () {
|
|
8116
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
8497
8117
|
function Checkout(_ref3) {
|
|
8498
8118
|
var _this = this,
|
|
8499
8119
|
_this$callback;
|
|
@@ -8507,6 +8127,7 @@
|
|
|
8507
8127
|
onTokensChanged = _ref3.onTokensChanged,
|
|
8508
8128
|
onPaymentSuccess = _ref3.onPaymentSuccess,
|
|
8509
8129
|
onPaymentError = _ref3.onPaymentError,
|
|
8130
|
+
redirectUrl = _ref3.redirectUrl,
|
|
8510
8131
|
title = _ref3.title,
|
|
8511
8132
|
windowFeatures = _ref3.windowFeatures;
|
|
8512
8133
|
_classCallCheck(this, Checkout);
|
|
@@ -8527,6 +8148,7 @@
|
|
|
8527
8148
|
_defineProperty(this, "refreshToken", void 0);
|
|
8528
8149
|
_defineProperty(this, "clientId", void 0);
|
|
8529
8150
|
_defineProperty(this, "onCheckoutClosed", void 0);
|
|
8151
|
+
_defineProperty(this, "redirectUrl", void 0);
|
|
8530
8152
|
_defineProperty(this, "rootUrl", void 0);
|
|
8531
8153
|
_defineProperty(this, "targetOrigin", void 0);
|
|
8532
8154
|
_defineProperty(this, "title", void 0);
|
|
@@ -8543,6 +8165,8 @@
|
|
|
8543
8165
|
}
|
|
8544
8166
|
});
|
|
8545
8167
|
_defineProperty(this, "close", function () {
|
|
8168
|
+
var _this$frame2;
|
|
8169
|
+
(_this$frame2 = _this.frame) === null || _this$frame2 === void 0 || _this$frame2.close();
|
|
8546
8170
|
_this.frame = void 0;
|
|
8547
8171
|
_this.isCheckoutOpen = false;
|
|
8548
8172
|
_this.stopWindowObserver();
|
|
@@ -8623,9 +8247,11 @@
|
|
|
8623
8247
|
}
|
|
8624
8248
|
};
|
|
8625
8249
|
var checkoutMode = mode || "default" /* DEFAULT */;
|
|
8626
|
-
|
|
8250
|
+
var TRAILING_SLASH_REGEX = /\/+$/g;
|
|
8251
|
+
var redirectQueryString = !!redirectUrl ? "&redirectUrl=".concat(redirectUrl) : "";
|
|
8252
|
+
this.rootUrl = url.replaceAll(TRAILING_SLASH_REGEX, "");
|
|
8627
8253
|
this.targetOrigin = window.location.href.replace(/\/$/, "");
|
|
8628
|
-
this.url = "".concat(
|
|
8254
|
+
this.url = "".concat(this.rootUrl, "?orderId=").concat(orderId, "&merchantUrl=").concat(encodeURIComponent(this.targetOrigin), "&mode=").concat(checkoutMode).concat(redirectQueryString);
|
|
8629
8255
|
this.orderId = orderId;
|
|
8630
8256
|
this.clientId = clientId;
|
|
8631
8257
|
this.onCheckoutClosed = onCheckoutClosed;
|
|
@@ -8698,33 +8324,6 @@
|
|
|
8698
8324
|
return "\n ".concat(containerId, " {\n position: relative;\n }\n\n #loading-overlay {\n position: absolute;\n height: 100%;\n width: 100%;\n background: rgba(255, 255, 255, 0.7);\n display: none;\n justify-content: center;\n align-items: center;\n cursor: not-allowed; /* Make it look not clickable */\n }\n\n #loading-overlay::after {\n content: \"\";\n height: 60%;\n aspect-ratio: 1 / 1;\n display: inline-block;\n border: 4px solid #ccc;\n border-top-color: #333;\n border-radius: 50%;\n\n /* Vendor prefixes for animation property */\n -webkit-animation: spin 1s infinite linear;\n -moz-animation: spin 1s infinite linear;\n -o-animation: spin 1s infinite linear;\n animation: spin 1s infinite linear;\n }\n\n @-webkit-keyframes spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n\n @-moz-keyframes spin {\n 0% {\n -moz-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -moz-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n\n @-o-keyframes spin {\n 0% {\n -o-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -o-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n\n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .flypay-v2-checkout-btn {\n width: 100%;\n height: fit-content;\n border: none; /* Remove borders */\n background: transparent; /* Make the button background transparent */\n cursor: pointer; /* Make it look clickable */\n outline: none; /* Remove focus outline */\n padding: 0; /* Remove any default padding */\n }\n\n .flypay-v2-checkout-btn-disabled {\n width: 100%;\n height: fit-content;\n border: none; /* Remove borders */\n background: transparent; /* Make the button background transparent */\n cursor: not-allowed; /* Make it look not clickable */\n outline: none; /* Remove focus outline */\n padding: 0; /* Remove any default padding */\n }\n ");
|
|
8699
8325
|
}
|
|
8700
8326
|
|
|
8701
|
-
var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
8702
|
-
function adopt(value) {
|
|
8703
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
8704
|
-
resolve(value);
|
|
8705
|
-
});
|
|
8706
|
-
}
|
|
8707
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
8708
|
-
function fulfilled(value) {
|
|
8709
|
-
try {
|
|
8710
|
-
step(generator.next(value));
|
|
8711
|
-
} catch (e) {
|
|
8712
|
-
reject(e);
|
|
8713
|
-
}
|
|
8714
|
-
}
|
|
8715
|
-
function rejected(value) {
|
|
8716
|
-
try {
|
|
8717
|
-
step(generator["throw"](value));
|
|
8718
|
-
} catch (e) {
|
|
8719
|
-
reject(e);
|
|
8720
|
-
}
|
|
8721
|
-
}
|
|
8722
|
-
function step(result) {
|
|
8723
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
8724
|
-
}
|
|
8725
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8726
|
-
});
|
|
8727
|
-
};
|
|
8728
8327
|
var FlypayV2WalletService = /*#__PURE__*/function (_WalletService) {
|
|
8729
8328
|
_inherits(FlypayV2WalletService, _WalletService);
|
|
8730
8329
|
var _super = _createSuper(FlypayV2WalletService);
|
|
@@ -8732,80 +8331,48 @@
|
|
|
8732
8331
|
var _this;
|
|
8733
8332
|
_classCallCheck(this, FlypayV2WalletService);
|
|
8734
8333
|
_this = _super.call(this, publicKey, meta);
|
|
8735
|
-
_this.processingButtonClick = false;
|
|
8736
8334
|
_this.onFlypayV2ButtonClick = function () {
|
|
8737
|
-
|
|
8738
|
-
var
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
return _context2.abrupt("return");
|
|
8754
|
-
case 5:
|
|
8755
|
-
this.processingButtonClick = true;
|
|
8756
|
-
this.handleMerchantOnButtonClickEvent().then(function () {
|
|
8757
|
-
return __awaiter(_this2, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
8758
|
-
var _a, _b;
|
|
8759
|
-
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
8760
|
-
while (1) switch (_context.prev = _context.next) {
|
|
8761
|
-
case 0:
|
|
8762
|
-
_context.prev = 0;
|
|
8763
|
-
this.processingButtonClick = false;
|
|
8764
|
-
if (this.orderId) {
|
|
8765
|
-
_context.next = 6;
|
|
8766
|
-
break;
|
|
8767
|
-
}
|
|
8768
|
-
_context.next = 5;
|
|
8769
|
-
return this.getOrderId();
|
|
8770
|
-
case 5:
|
|
8771
|
-
this.orderId = _context.sent;
|
|
8772
|
-
case 6:
|
|
8773
|
-
setLoadingOverlayDisplay('none');
|
|
8774
|
-
this.background = this.initBackground();
|
|
8775
|
-
if (this.orderId) {
|
|
8776
|
-
(_a = this.background) === null || _a === void 0 ? void 0 : _a.initControl();
|
|
8777
|
-
this.flypayV2Checkout(this.orderId);
|
|
8778
|
-
} else {
|
|
8779
|
-
this.eventEmitter.emit(WALLET_EVENT.UNAVAILABLE);
|
|
8780
|
-
}
|
|
8781
|
-
_context.next = 17;
|
|
8782
|
-
break;
|
|
8783
|
-
case 11:
|
|
8784
|
-
_context.prev = 11;
|
|
8785
|
-
_context.t0 = _context["catch"](0);
|
|
8786
|
-
(_b = this.background) === null || _b === void 0 ? void 0 : _b.clear();
|
|
8787
|
-
setLoadingOverlayDisplay('none');
|
|
8788
|
-
this.enable();
|
|
8789
|
-
this.eventEmitter.emit(WALLET_EVENT.UNAVAILABLE, {
|
|
8790
|
-
err: _context.t0
|
|
8791
|
-
});
|
|
8792
|
-
case 17:
|
|
8793
|
-
case "end":
|
|
8794
|
-
return _context.stop();
|
|
8795
|
-
}
|
|
8796
|
-
}, _callee, this, [[0, 11]]);
|
|
8797
|
-
}));
|
|
8798
|
-
})["catch"](function (err) {
|
|
8799
|
-
_this2.processingButtonClick = false;
|
|
8800
|
-
setLoadingOverlayDisplay('none');
|
|
8801
|
-
_this2.enable();
|
|
8802
|
-
});
|
|
8803
|
-
case 7:
|
|
8804
|
-
case "end":
|
|
8805
|
-
return _context2.stop();
|
|
8335
|
+
var setLoadingOverlayDisplay = function setLoadingOverlayDisplay(displayStyle) {
|
|
8336
|
+
var loadingOverlay = document.getElementById('loading-overlay');
|
|
8337
|
+
if (loadingOverlay) loadingOverlay.style.display = displayStyle;
|
|
8338
|
+
};
|
|
8339
|
+
_this.disable();
|
|
8340
|
+
setLoadingOverlayDisplay('flex');
|
|
8341
|
+
_this.handleMerchantOnButtonClickEvent().then(function () {
|
|
8342
|
+
var processButtonClick = function processButtonClick(orderId) {
|
|
8343
|
+
var _a;
|
|
8344
|
+
setLoadingOverlayDisplay('none');
|
|
8345
|
+
_this.background = _this.initBackground();
|
|
8346
|
+
if (_this.orderId) {
|
|
8347
|
+
(_a = _this.background) === null || _a === void 0 ? void 0 : _a.initControl();
|
|
8348
|
+
_this.flypayV2Checkout(_this.orderId);
|
|
8349
|
+
} else {
|
|
8350
|
+
_this.eventEmitter.emit(WALLET_EVENT.UNAVAILABLE);
|
|
8806
8351
|
}
|
|
8807
|
-
}
|
|
8808
|
-
|
|
8352
|
+
};
|
|
8353
|
+
var processFailure = function processFailure(err) {
|
|
8354
|
+
var _a;
|
|
8355
|
+
(_a = _this.background) === null || _a === void 0 ? void 0 : _a.clear();
|
|
8356
|
+
setLoadingOverlayDisplay('none');
|
|
8357
|
+
_this.enable();
|
|
8358
|
+
_this.eventEmitter.emit(WALLET_EVENT.UNAVAILABLE, {
|
|
8359
|
+
err: err
|
|
8360
|
+
});
|
|
8361
|
+
};
|
|
8362
|
+
if (_this.orderId) {
|
|
8363
|
+
processButtonClick(_this.orderId);
|
|
8364
|
+
} else {
|
|
8365
|
+
_this.getOrderId().then(function (orderId) {
|
|
8366
|
+
_this.orderId = orderId;
|
|
8367
|
+
processButtonClick();
|
|
8368
|
+
})["catch"](function (err) {
|
|
8369
|
+
processFailure(err);
|
|
8370
|
+
});
|
|
8371
|
+
}
|
|
8372
|
+
})["catch"](function (err) {
|
|
8373
|
+
setLoadingOverlayDisplay('none');
|
|
8374
|
+
_this.enable();
|
|
8375
|
+
});
|
|
8809
8376
|
};
|
|
8810
8377
|
_this.accessToken = meta === null || meta === void 0 ? void 0 : meta.access_token;
|
|
8811
8378
|
_this.refreshToken = meta === null || meta === void 0 ? void 0 : meta.refresh_token;
|
|
@@ -8866,10 +8433,10 @@
|
|
|
8866
8433
|
}, {
|
|
8867
8434
|
key: "handleMerchantOnButtonClickEvent",
|
|
8868
8435
|
value: function handleMerchantOnButtonClickEvent() {
|
|
8869
|
-
var
|
|
8436
|
+
var _this2 = this;
|
|
8870
8437
|
return new Promise(function (resolve, reject) {
|
|
8871
8438
|
var merchantResult;
|
|
8872
|
-
|
|
8439
|
+
_this2.eventEmitter.emit(WALLET_EVENT.BUTTON_CLICK, {
|
|
8873
8440
|
attachResult: function attachResult(value) {
|
|
8874
8441
|
merchantResult = value;
|
|
8875
8442
|
}
|
|
@@ -8888,9 +8455,9 @@
|
|
|
8888
8455
|
}, {
|
|
8889
8456
|
key: "getOrderId",
|
|
8890
8457
|
value: function getOrderId() {
|
|
8891
|
-
var
|
|
8458
|
+
var _this3 = this;
|
|
8892
8459
|
return new Promise(function (resolve, reject) {
|
|
8893
|
-
return
|
|
8460
|
+
return _this3.eventEmitter.emit(WALLET_EVENT.CALLBACK, {
|
|
8894
8461
|
data: {
|
|
8895
8462
|
request_type: 'CREATE_SESSION'
|
|
8896
8463
|
},
|
|
@@ -8906,45 +8473,44 @@
|
|
|
8906
8473
|
}, {
|
|
8907
8474
|
key: "flypayV2Checkout",
|
|
8908
8475
|
value: function flypayV2Checkout(orderId) {
|
|
8909
|
-
var
|
|
8476
|
+
var _this4 = this;
|
|
8910
8477
|
var _a, _b;
|
|
8911
8478
|
this.checkout = new Checkout(_extends(_extends({
|
|
8912
8479
|
orderId: orderId
|
|
8913
|
-
},
|
|
8914
|
-
auth:
|
|
8915
|
-
access_token: this.accessToken
|
|
8916
|
-
}), this.refreshToken && {
|
|
8480
|
+
}, this.accessToken && this.refreshToken && {
|
|
8481
|
+
auth: {
|
|
8482
|
+
access_token: this.accessToken,
|
|
8917
8483
|
refresh_token: this.refreshToken
|
|
8918
|
-
}
|
|
8484
|
+
},
|
|
8919
8485
|
mode: 'express'
|
|
8920
8486
|
}), {
|
|
8921
8487
|
clientId: ((_a = this.meta) === null || _a === void 0 ? void 0 : _a.gateway_mode) === 'live' ? 'dbbd114e-3583-4db5-915e-59f1b3dcd08b' : '924ac1ce-00f4-44e4-8277-06cae751ef1a',
|
|
8922
8488
|
url: ((_b = this.meta) === null || _b === void 0 ? void 0 : _b.gateway_mode) === 'live' ? 'https://checkout.cxbflypay.com.au' : 'https://checkout.sandbox.cxbflypay.com.au',
|
|
8923
8489
|
onCheckoutClosed: function onCheckoutClosed() {
|
|
8924
8490
|
var _a;
|
|
8925
|
-
|
|
8926
|
-
(_a =
|
|
8927
|
-
|
|
8491
|
+
_this4.eventEmitter.emit(WALLET_EVENT.CHECKOUT_CLOSE);
|
|
8492
|
+
(_a = _this4.background) === null || _a === void 0 ? void 0 : _a.clear();
|
|
8493
|
+
_this4.enable();
|
|
8928
8494
|
},
|
|
8929
8495
|
onError: function onError(err) {
|
|
8930
|
-
return
|
|
8496
|
+
return _this4.eventEmitter.emit(WALLET_EVENT.PAYMENT_ERROR, {
|
|
8931
8497
|
error: err
|
|
8932
8498
|
});
|
|
8933
8499
|
},
|
|
8934
8500
|
onPaymentSuccess: function onPaymentSuccess(data) {
|
|
8935
|
-
return
|
|
8501
|
+
return _this4.eventEmitter.emit(WALLET_EVENT.PAYMENT_SUCCESS, data);
|
|
8936
8502
|
},
|
|
8937
8503
|
onPaymentError: function onPaymentError(err) {
|
|
8938
|
-
return
|
|
8504
|
+
return _this4.eventEmitter.emit(WALLET_EVENT.PAYMENT_ERROR, {
|
|
8939
8505
|
error: err
|
|
8940
8506
|
});
|
|
8941
8507
|
},
|
|
8942
8508
|
onTokensChanged: function onTokensChanged(_ref) {
|
|
8943
8509
|
var accessToken = _ref.accessToken,
|
|
8944
8510
|
refreshToken = _ref.refreshToken;
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
8511
|
+
_this4.accessToken = accessToken;
|
|
8512
|
+
_this4.refreshToken = refreshToken;
|
|
8513
|
+
_this4.eventEmitter.emit(WALLET_EVENT.AUTH_TOKENS_CHANGED, {
|
|
8948
8514
|
accessToken: accessToken,
|
|
8949
8515
|
refreshToken: refreshToken
|
|
8950
8516
|
});
|
|
@@ -8957,15 +8523,15 @@
|
|
|
8957
8523
|
}, {
|
|
8958
8524
|
key: "initBackground",
|
|
8959
8525
|
value: function initBackground() {
|
|
8960
|
-
var
|
|
8961
|
-
var
|
|
8962
|
-
var bg = new WalletBackground(this.link.getNetUrl() + FLYPAY_LOGO_LINK, hideCloseButton);
|
|
8526
|
+
var _this5 = this;
|
|
8527
|
+
var bg = new WalletBackground(this.link.getNetUrl() + FLYPAY_LOGO_LINK);
|
|
8963
8528
|
bg.setBackdropTitle("");
|
|
8964
8529
|
bg.setBackdropDescription("");
|
|
8965
8530
|
bg.onTrigger(TRIGGER$1.CLOSE, function () {
|
|
8966
8531
|
var _a;
|
|
8967
|
-
|
|
8968
|
-
(_a =
|
|
8532
|
+
_this5.checkout.close();
|
|
8533
|
+
(_a = _this5.background) === null || _a === void 0 ? void 0 : _a.clear();
|
|
8534
|
+
_this5.enable();
|
|
8969
8535
|
});
|
|
8970
8536
|
return bg;
|
|
8971
8537
|
}
|
|
@@ -10663,87 +10229,58 @@
|
|
|
10663
10229
|
return VaultDisplayWidget;
|
|
10664
10230
|
}();
|
|
10665
10231
|
|
|
10666
|
-
var VisaSRCStyles = /*#__PURE__*/_createClass(function VisaSRCStyles() {
|
|
10667
|
-
_classCallCheck(this, VisaSRCStyles);
|
|
10668
|
-
});
|
|
10669
|
-
VisaSRCStyles.buttonContainerStyles = "display: flex; flex-direction: column; justify-content: center; align-items: center;";
|
|
10670
|
-
VisaSRCStyles.buttonStyles = "color: #ffff; background-color: #ffbe24; border: none; width: 100%; min-height: 40px; font-size: 16px; font-weight: bold; line-height: 19px; letter-spacing: 0.7px; text-transform: uppercase; border-radius: 4px; margin-bottom: 15px; cursor: pointer;";
|
|
10671
|
-
VisaSRCStyles.footerContainerStyles = "display: flex; flex: 1; flex-wrap: wrap; justify-content: center;";
|
|
10672
|
-
VisaSRCStyles.footerTextStyles = "text-align: center; color: #666666; margin: 2px 0;";
|
|
10673
|
-
VisaSRCStyles.verticalLineStyle = "display: inline-block; padding: 0.5px; background-color: #E5E5E5; height: 15px;";
|
|
10674
|
-
VisaSRCStyles.clickToPayAllCardsStyle = "height: 17px; margin-left: 8px; vertical-align: middle; padding-top: 3px;";
|
|
10675
|
-
// TODO: Remind to add in docs that if merchant's div is smaller than 240px the button styles will broke
|
|
10676
|
-
|
|
10677
10232
|
/**
|
|
10678
10233
|
* List of available event's name in the SRC checkout lifecycle
|
|
10679
10234
|
* @enum EVENT
|
|
10680
10235
|
*
|
|
10681
10236
|
* @type {object}
|
|
10682
|
-
* @param {string}
|
|
10683
|
-
* @param {string}
|
|
10684
|
-
* @param {string}
|
|
10685
|
-
* @param {string}
|
|
10686
|
-
* @param {string} CHECKOUT_COMPLETED=checkoutCompleted
|
|
10687
|
-
* @param {string} CHECKOUT_ERROR=checkoutError
|
|
10237
|
+
* @param {string} IFRAME_LOADED=iframeLoaded Initial event sent when IFrame is initially loaded.
|
|
10238
|
+
* @param {string} CHECKOUT_READY=checkoutReady Event sent when checkout is loaded and ready to be used by customer. Leverage alongside [showCheckout](#SRC+showCheckout) and [hideCheckout](#SRC+hideCheckout).
|
|
10239
|
+
* @param {string} CHECKOUT_POPUP_OPEN=checkoutPopupOpen Event sent when SRC Checkout flow is started, regardless of embedded or windowed mode.
|
|
10240
|
+
* @param {string} CHECKOUT_POPUP_CLOSE=checkoutPopupClose Event sent when SRC Checkout flow is closed, regardless of embedded or windowed mode.
|
|
10241
|
+
* @param {string} CHECKOUT_COMPLETED=checkoutCompleted Event sent on successful checkout by customer. Check [data](#EventDataCheckoutCompletedData) for more information.
|
|
10242
|
+
* @param {string} CHECKOUT_ERROR=checkoutError Event sent on error checkout by customer. Check [data](#EventData) for more information.
|
|
10688
10243
|
*/
|
|
10689
10244
|
var EVENT$2;
|
|
10690
10245
|
(function (EVENT) {
|
|
10691
|
-
EVENT["CHECKOUT_BUTTON_LOADED"] = "checkoutButtonLoaded";
|
|
10692
|
-
EVENT["CHECKOUT_BUTTON_CLICKED"] = "checkoutButtonClicked";
|
|
10693
10246
|
EVENT["IFRAME_LOADED"] = "iframeLoaded";
|
|
10694
10247
|
EVENT["CHECKOUT_READY"] = "checkoutReady";
|
|
10695
10248
|
EVENT["CHECKOUT_COMPLETED"] = "checkoutCompleted";
|
|
10696
10249
|
EVENT["CHECKOUT_ERROR"] = "checkoutError";
|
|
10250
|
+
EVENT["CHECKOUT_POPUP_OPEN"] = "checkoutPopupOpen";
|
|
10251
|
+
EVENT["CHECKOUT_POPUP_CLOSE"] = "checkoutPopupClose";
|
|
10697
10252
|
})(EVENT$2 || (EVENT$2 = {}));
|
|
10253
|
+
/**
|
|
10254
|
+
* List of available event data types
|
|
10255
|
+
* @enum EVENT_DATA_TYPE
|
|
10256
|
+
*
|
|
10257
|
+
* @type {object}
|
|
10258
|
+
* @param {string} CRITICAL_ERROR=CriticalError in this error scenario the checkout is understood to be in a non-recoverable state and should be closed by the merchant and give alternate payment options to the user
|
|
10259
|
+
* @param {string} USER_ERROR=UserError in this error scenario the error in likely a user input error and the checkout is in a recoverable state, so the user will be kept within the checkout and can retry the flow
|
|
10260
|
+
* @param {string} SUCCESS=Success
|
|
10261
|
+
*/
|
|
10262
|
+
var EVENT_DATA_TYPE;
|
|
10263
|
+
(function (EVENT_DATA_TYPE) {
|
|
10264
|
+
EVENT_DATA_TYPE["CRITICAL_ERROR"] = "CriticalError";
|
|
10265
|
+
EVENT_DATA_TYPE["USER_ERROR"] = "UserError";
|
|
10266
|
+
EVENT_DATA_TYPE["SUCCESS"] = "Success";
|
|
10267
|
+
})(EVENT_DATA_TYPE || (EVENT_DATA_TYPE = {}));
|
|
10698
10268
|
var STYLE$2 = {
|
|
10699
|
-
|
|
10700
|
-
|
|
10269
|
+
PRIMARY_BUTTON_COLOR: 'primary_button_color',
|
|
10270
|
+
SECONDARY_BUTTON_COLOR: 'secondary_button_color',
|
|
10271
|
+
PRIMARY_BUTTON_TEXT_COLOR: 'primary_button_text_color',
|
|
10272
|
+
SECONDARY_BUTTON_TEXT_COLOR: 'secondary_button_text_color',
|
|
10701
10273
|
FONT_FAMILY: 'font_family',
|
|
10702
|
-
|
|
10703
|
-
};
|
|
10704
|
-
|
|
10705
|
-
var CARD_SCHEME = {
|
|
10706
|
-
VISA: 'visa',
|
|
10707
|
-
MASTERCARD: 'mastercard',
|
|
10708
|
-
AMEX: 'amex',
|
|
10709
|
-
DISCOVER: 'discover'
|
|
10710
|
-
};
|
|
10711
|
-
var CHEVRON_VMAD_IMG_PATH = '/images/visa-src/Chevron_Large_VMAD.png';
|
|
10712
|
-
var CHEVRON_VMA_IMG_PATH = '/images/visa-src/Chevron_Large_VMA.png';
|
|
10713
|
-
var CHEVRON_VM_IMG_PATH = '/images/visa-src/Chevron_Large_VM.png';
|
|
10714
|
-
var CHEVRON_M_IMG_PATH = '/images/visa-src/Chevron_Large_M.png';
|
|
10715
|
-
var CHEVRON_D_IMG_PATH = '/images/visa-src/Chevron_Large_D.png';
|
|
10716
|
-
var CHEVRON_V_IMG_PATH = '/images/visa-src/Chevron_Large_V.png';
|
|
10717
|
-
var VMAD_IMG_PATH = '/images/visa-src/vmad.svg';
|
|
10718
|
-
var VMA_IMG_PATH = '/images/visa-src/logos/Networks_Large_VMA.png';
|
|
10719
|
-
var VM_IMG_PATH = '/images/visa-src/logos/Networks_Large_VM.png';
|
|
10720
|
-
var M_IMG_PATH = '/images/visa-src/logos/master-logo.png';
|
|
10721
|
-
var D_IMG_PATH = '/images/visa-src/logos/Networks_Large_D.png';
|
|
10722
|
-
var V_IMG_PATH = '/images/visa-src/logos/visa-logo.png';
|
|
10723
|
-
var GenerateCardSchemesLogo = function GenerateCardSchemesLogo(card_scheme) {
|
|
10724
|
-
var chevron = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
10725
|
-
if (!card_scheme || !Array.isArray(card_scheme)) return chevron ? CHEVRON_VMAD_IMG_PATH : VMAD_IMG_PATH;
|
|
10726
|
-
var card_scheme_sort = card_scheme.sort();
|
|
10727
|
-
if (includeArray([CARD_SCHEME.AMEX, CARD_SCHEME.MASTERCARD, CARD_SCHEME.VISA], card_scheme_sort)) return chevron ? CHEVRON_VMA_IMG_PATH : VMA_IMG_PATH;
|
|
10728
|
-
if (includeArray([CARD_SCHEME.MASTERCARD, CARD_SCHEME.VISA], card_scheme_sort)) return chevron ? CHEVRON_VM_IMG_PATH : VM_IMG_PATH;
|
|
10729
|
-
if (includeArray([CARD_SCHEME.MASTERCARD], card_scheme_sort)) return chevron ? CHEVRON_M_IMG_PATH : M_IMG_PATH;
|
|
10730
|
-
if (includeArray([CARD_SCHEME.DISCOVER], card_scheme_sort)) return chevron ? CHEVRON_D_IMG_PATH : D_IMG_PATH;
|
|
10731
|
-
if (includeArray([CARD_SCHEME.VISA], card_scheme_sort)) return chevron ? CHEVRON_V_IMG_PATH : V_IMG_PATH;
|
|
10732
|
-
return chevron ? CHEVRON_V_IMG_PATH : VMAD_IMG_PATH;
|
|
10733
|
-
};
|
|
10734
|
-
var includeArray = function includeArray(condition, card_scheme) {
|
|
10735
|
-
return condition.every(function (card, index) {
|
|
10736
|
-
return card === card_scheme[index];
|
|
10737
|
-
});
|
|
10274
|
+
ENABLE_SRC_POPUP: 'enable_src_popup'
|
|
10738
10275
|
};
|
|
10739
10276
|
|
|
10740
|
-
var
|
|
10741
|
-
function
|
|
10742
|
-
_classCallCheck(this,
|
|
10277
|
+
var MastercardSRC = /*#__PURE__*/function () {
|
|
10278
|
+
function MastercardSRC(iframe_selector, service_id, public_key, meta, eventEmitter, autoResize, env, alias) {
|
|
10279
|
+
_classCallCheck(this, MastercardSRC);
|
|
10743
10280
|
this.meta = meta;
|
|
10744
10281
|
this.eventEmitter = eventEmitter;
|
|
10745
10282
|
this.autoResize = autoResize;
|
|
10746
|
-
this.link = new Link(
|
|
10283
|
+
this.link = new Link(MASTERCARD_SRC);
|
|
10747
10284
|
this.link.setParams(_extends({
|
|
10748
10285
|
service_id: service_id,
|
|
10749
10286
|
public_key: public_key
|
|
@@ -10759,15 +10296,15 @@
|
|
|
10759
10296
|
if (env) this.link.setEnv(env, alias);
|
|
10760
10297
|
this.iFrameContainer = new Container(iframe_selector);
|
|
10761
10298
|
this.iFrame = new IFrame(this.iFrameContainer);
|
|
10762
|
-
this.buttonContainer = new Container(button_selector);
|
|
10763
10299
|
this.iFrameEvent = new IFrameEvent(window);
|
|
10764
10300
|
this.setupIFrameEvents();
|
|
10765
10301
|
}
|
|
10766
|
-
_createClass(
|
|
10302
|
+
_createClass(MastercardSRC, [{
|
|
10767
10303
|
key: "setupIFrameEvents",
|
|
10768
10304
|
value: function setupIFrameEvents() {
|
|
10769
10305
|
var _this = this;
|
|
10770
10306
|
var widgetId = this.link.getParams().widget_id;
|
|
10307
|
+
if (!widgetId) return;
|
|
10771
10308
|
this.iFrameEvent.on(EVENT$2.CHECKOUT_READY, widgetId, function (_ref) {
|
|
10772
10309
|
var data = _ref.data;
|
|
10773
10310
|
_this.eventEmitter.emit(EVENT$2.CHECKOUT_READY, data);
|
|
@@ -10776,8 +10313,16 @@
|
|
|
10776
10313
|
var data = _ref2.data;
|
|
10777
10314
|
_this.eventEmitter.emit(EVENT$2.CHECKOUT_COMPLETED, data);
|
|
10778
10315
|
});
|
|
10779
|
-
this.iFrameEvent.on(EVENT$2.
|
|
10316
|
+
this.iFrameEvent.on(EVENT$2.CHECKOUT_POPUP_OPEN, widgetId, function (_ref3) {
|
|
10780
10317
|
var data = _ref3.data;
|
|
10318
|
+
_this.eventEmitter.emit(EVENT$2.CHECKOUT_POPUP_OPEN, data);
|
|
10319
|
+
});
|
|
10320
|
+
this.iFrameEvent.on(EVENT$2.CHECKOUT_POPUP_CLOSE, widgetId, function (_ref4) {
|
|
10321
|
+
var data = _ref4.data;
|
|
10322
|
+
_this.eventEmitter.emit(EVENT$2.CHECKOUT_POPUP_CLOSE, data);
|
|
10323
|
+
});
|
|
10324
|
+
this.iFrameEvent.on(EVENT$2.CHECKOUT_ERROR, widgetId, function (_ref5) {
|
|
10325
|
+
var data = _ref5.data;
|
|
10781
10326
|
_this.eventEmitter.emit(EVENT$2.CHECKOUT_ERROR, data);
|
|
10782
10327
|
});
|
|
10783
10328
|
if (this.autoResize) this.useAutoResize(true);
|
|
@@ -10786,55 +10331,20 @@
|
|
|
10786
10331
|
key: "load",
|
|
10787
10332
|
value: function load() {
|
|
10788
10333
|
var _this2 = this;
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
var
|
|
10793
|
-
|
|
10794
|
-
if (
|
|
10795
|
-
|
|
10796
|
-
checkoutButton.innerHTML = 'Checkout';
|
|
10797
|
-
var footerContainer = document.createElement('div');
|
|
10798
|
-
footerContainer.setAttribute('style', VisaSRCStyles.footerContainerStyles);
|
|
10799
|
-
var verticalLine = document.createElement('div');
|
|
10800
|
-
verticalLine.setAttribute('style', VisaSRCStyles.verticalLineStyle);
|
|
10801
|
-
var footerText = document.createElement('p');
|
|
10802
|
-
footerText.setAttribute('style', VisaSRCStyles.footerTextStyles);
|
|
10803
|
-
footerText.innerHTML = 'WE ACCEPT';
|
|
10804
|
-
var clickToPayAllCards = document.createElement('img');
|
|
10805
|
-
clickToPayAllCards.setAttribute('style', VisaSRCStyles.clickToPayAllCardsStyle);
|
|
10806
|
-
clickToPayAllCards.src = this.link.getBaseUrl() + "".concat(GenerateCardSchemesLogo((_a = this.meta.customizations) === null || _a === void 0 ? void 0 : _a.card_schemes, true));
|
|
10807
|
-
checkoutButton.onclick = function () {
|
|
10808
|
-
_this2.eventEmitter.emit(EVENT$2.CHECKOUT_BUTTON_CLICKED, {});
|
|
10809
|
-
_this2.iFrame.load(_this2.link.getUrl(), {
|
|
10810
|
-
title: 'Visa SRC checkout'
|
|
10811
|
-
});
|
|
10812
|
-
_this2.iFrame.getElement().onload = function () {
|
|
10813
|
-
return _this2.eventEmitter.emit(EVENT$2.IFRAME_LOADED, {});
|
|
10814
|
-
};
|
|
10334
|
+
this.iFrame.load(this.link.getUrl(), {
|
|
10335
|
+
title: 'Mastercard SRC checkout'
|
|
10336
|
+
});
|
|
10337
|
+
var iframeElement = this.iFrame.getElement();
|
|
10338
|
+
this.iFrame.setStyle('width', '100%');
|
|
10339
|
+
if (iframeElement) iframeElement.onload = function () {
|
|
10340
|
+
return _this2.eventEmitter.emit(EVENT$2.IFRAME_LOADED, {});
|
|
10815
10341
|
};
|
|
10816
|
-
container.appendChild(checkoutButton);
|
|
10817
|
-
container.appendChild(footerContainer);
|
|
10818
|
-
footerContainer.appendChild(footerText);
|
|
10819
|
-
footerContainer.appendChild(clickToPayAllCards);
|
|
10820
|
-
this.buttonContainer.getElement().appendChild(container);
|
|
10821
|
-
this.eventEmitter.emit(EVENT$2.CHECKOUT_BUTTON_LOADED, {});
|
|
10822
10342
|
}
|
|
10823
10343
|
}, {
|
|
10824
10344
|
key: "getEnv",
|
|
10825
10345
|
value: function getEnv() {
|
|
10826
10346
|
return this.link.getEnv();
|
|
10827
10347
|
}
|
|
10828
|
-
}, {
|
|
10829
|
-
key: "hideButton",
|
|
10830
|
-
value: function hideButton(_saveSize) {
|
|
10831
|
-
if (this.buttonContainer.getElement()) this.buttonContainer.getElement().style['display'] = 'none';
|
|
10832
|
-
}
|
|
10833
|
-
}, {
|
|
10834
|
-
key: "showButton",
|
|
10835
|
-
value: function showButton() {
|
|
10836
|
-
if (this.buttonContainer.getElement()) this.buttonContainer.getElement().style['display'] = 'block';
|
|
10837
|
-
}
|
|
10838
10348
|
}, {
|
|
10839
10349
|
key: "hideCheckout",
|
|
10840
10350
|
value: function hideCheckout(saveSize) {
|
|
@@ -10857,83 +10367,25 @@
|
|
|
10857
10367
|
var _this3 = this;
|
|
10858
10368
|
if (this.autoResize && !force) return;
|
|
10859
10369
|
this.autoResize = true;
|
|
10860
|
-
|
|
10861
|
-
|
|
10862
|
-
|
|
10863
|
-
|
|
10864
|
-
|
|
10370
|
+
var params = this.link.getParams();
|
|
10371
|
+
if (!(params === null || params === void 0 ? void 0 : params.widget_id)) return;
|
|
10372
|
+
this.iFrameEvent.on('resize', params.widget_id, function (_ref6) {
|
|
10373
|
+
var data = _ref6.data;
|
|
10374
|
+
var _a, _b;
|
|
10375
|
+
var iframeElement = _this3.iFrame.getElement();
|
|
10376
|
+
if (iframeElement) {
|
|
10377
|
+
iframeElement.scrolling = 'no';
|
|
10378
|
+
if ((_a = data === null || data === void 0 ? void 0 : data.data) === null || _a === void 0 ? void 0 : _a.height) _this3.iFrame.setStyle('height', ((_b = data === null || data === void 0 ? void 0 : data.data) === null || _b === void 0 ? void 0 : _b.height) + 'px');
|
|
10865
10379
|
}
|
|
10866
10380
|
});
|
|
10867
10381
|
}
|
|
10868
10382
|
}]);
|
|
10869
|
-
return
|
|
10383
|
+
return MastercardSRC;
|
|
10870
10384
|
}();
|
|
10871
10385
|
|
|
10872
|
-
/**
|
|
10873
|
-
* Interface of data used for the Visa Checkout.
|
|
10874
|
-
* @interface IVisaSRCMeta
|
|
10875
|
-
*
|
|
10876
|
-
* @type {object}
|
|
10877
|
-
* @param {string} [srci_transaction_id] Used to identify the SRC Id.
|
|
10878
|
-
* @param {object} [dpa_data] Object where the DPA creation data is stored.
|
|
10879
|
-
* @param {string} [dpa_data.dpa_presentation_name] Name in which the DPA is presented in.
|
|
10880
|
-
* @param {string} [dpa_data.dpa_uri] Used for indicating the DPA URI.
|
|
10881
|
-
* @param {object} [dpa_transaction_options] Object that stores options for creating a trasaction with DPA.
|
|
10882
|
-
* @param {string} [dpa_transaction_options.dpa_locale] DPA’s preferred locale, example en_US.
|
|
10883
|
-
* @param {Array} [dpa_transaction_options.dpa_accepted_billing_countries] Used to indicate list of accepted billing countries for DPA.
|
|
10884
|
-
* @param {Array} [dpa_transaction_options.dpa_accepted_shipping_countries] Used to indicate list of accepted shipping countries for DPA.
|
|
10885
|
-
* @param {string} [dpa_transaction_options.dpa_billing_preference] Used for listing the enumeration for billing preferences for DPA. Options are 'ALL', 'POSTAL_COUNTRY' and 'NONE'.
|
|
10886
|
-
* @param {string} [dpa_transaction_options.dpa_shipping_preference] Used for listing the enumeration for shipping preferences for DPA. Options are 'ALL', 'POSTAL_COUNTRY' and 'NONE'.
|
|
10887
|
-
* @param {boolean} [dpa_transaction_options.consumer_name_requested] Used to check if the name of the consumer is needed.
|
|
10888
|
-
* @param {boolean} [dpa_transaction_options.consumer_email_address_requested] Used to check if the email of the consumer is needed.
|
|
10889
|
-
* @param {boolean} [dpa_transaction_options.consumer_phone_number_requested] Used to check if the phone number of the consumer is needed.
|
|
10890
|
-
* @param {object} [dpa_transaction_options.payment_options] Object used to check the payment options that are included.
|
|
10891
|
-
* @param {number} [dpa_transaction_options.payment_options.dpa_dynamic_data_ttl_minutes] The minimum requested validity period for the transaction credentials.
|
|
10892
|
-
* @param {string} [dpa_transaction_options.payment_options.dynamic_data_type] Used for listing the enumeration for dynamic data types. Options are 'TAVV' and 'DTVV'.
|
|
10893
|
-
* @param {boolean} [dpa_transaction_options.payment_options.dpa_pan_requested] Used to check if PAN number was requested.
|
|
10894
|
-
* @param {string} [dpa_transaction_options.review_action] Used for listing the enumeration of review actions. Options are 'pay' and 'continue'.
|
|
10895
|
-
* @param {string} [dpa_transaction_options.checkout_description] Used for indicating the description of the checkout.
|
|
10896
|
-
* @param {string} [dpa_transaction_options.transaction_type] Used for listing the enumeration of the type of the transaction. 'PURCHASE', 'BILL_PAYMENT' and 'MONEY_TRANSFER'
|
|
10897
|
-
* @param {string} [dpa_transaction_options.order_type] Used for listing the enumeration of the type of the order. Options are 'REAUTHORIZATION', 'RECURRING' and 'INSTALLMENT'.
|
|
10898
|
-
* @param {object} [dpa_transaction_options.transaction_amount] Object used to describe the details of the transaction.
|
|
10899
|
-
* @param {number} [dpa_transaction_options.transaction_amount.transaction_amount] Used to indicate the amount of the transaction.
|
|
10900
|
-
* @param {string} [dpa_transaction_options.transaction_amount.transaction_currency_code] Used to indicate the currency code of the transaction. 3 letter ISO code format.
|
|
10901
|
-
* @param {string} [dpa_transaction_options.merchant_order_id] Used to indicate the merchants order Id.
|
|
10902
|
-
* @param {string} [dpa_transaction_options.merchant_category_code] Used to indicate the merchants category code.
|
|
10903
|
-
* @param {string} [dpa_transaction_options.merchant_country_code] Used to indicate the merchants country code. 2 letter ISO code format.
|
|
10904
|
-
* @param {object} [customer] Object where the customer data is stored to prefill in the checkout.
|
|
10905
|
-
* @param {string} [customer.email] Customer email.
|
|
10906
|
-
* @param {string} [customer.first_name] Customer first name.
|
|
10907
|
-
* @param {string} [customer.last_name] Customer last name.
|
|
10908
|
-
* @param {object} [customer.phone] Object where the customer phone is stored.
|
|
10909
|
-
* @param {string} [customer.phone.country_code] Customer phone country code (example "1" for US).
|
|
10910
|
-
* @param {string} [customer.phone.phone] Customer phone number.
|
|
10911
|
-
* @param {object} [customer.payment_source] Object where the customer billing address data is stored.
|
|
10912
|
-
* @param {string} [customer.payment_source.address_line1] Customer billing address line 1.
|
|
10913
|
-
* @param {string} [customer.payment_source.address_line2] Customer billing address line 2.
|
|
10914
|
-
* @param {string} [customer.payment_source.address_city] Customer billing address city.
|
|
10915
|
-
* @param {string} [customer.payment_source.address_postcode] Customer billing address postcode.
|
|
10916
|
-
* @param {string} [customer.payment_source.address_state] Customer billing address state code (if applicable for the country, example "FL" for Florida).
|
|
10917
|
-
* @param {string} [customer.payment_source.address_country] Customer billing address country code (example "US").
|
|
10918
|
-
*/
|
|
10919
|
-
/**
|
|
10920
|
-
* Class SRC include methods for interacting with different secure remote commerce options such as Visa SRC
|
|
10921
|
-
* @constructor
|
|
10922
|
-
*
|
|
10923
|
-
* @param {string} button_selector - Selector of html element. Container for SRC checkout button.
|
|
10924
|
-
* @param {string} iframe_selector - Selector of html element. Container for SRC checkout iFrame.
|
|
10925
|
-
* @param {string} service_id - Card Scheme Service ID
|
|
10926
|
-
* @param {string} public_key_or_access_token - Paydock public key or Access Token
|
|
10927
|
-
* @param {IVisaSRCMeta} meta - Data that configures the SRC checkout
|
|
10928
|
-
* @example
|
|
10929
|
-
* var SRC = new SRC('#checkoutButton', '#checkoutIframe', 'service_id', 'public_key', {});
|
|
10930
|
-
*
|
|
10931
|
-
*/
|
|
10932
10386
|
var SRC = /*#__PURE__*/function () {
|
|
10933
|
-
|
|
10934
|
-
function SRC(button_selector, iframe_selector, service_id, public_key_or_access_token, meta) {
|
|
10387
|
+
function SRC(iframe_selector, service_id, public_key_or_access_token, meta) {
|
|
10935
10388
|
_classCallCheck(this, SRC);
|
|
10936
|
-
this.button_selector = button_selector;
|
|
10937
10389
|
this.iframe_selector = iframe_selector;
|
|
10938
10390
|
this.service_id = service_id;
|
|
10939
10391
|
this.public_key_or_access_token = public_key_or_access_token;
|
|
@@ -10948,11 +10400,13 @@
|
|
|
10948
10400
|
*
|
|
10949
10401
|
* @example
|
|
10950
10402
|
* widget.setStyles({
|
|
10951
|
-
*
|
|
10952
|
-
*
|
|
10953
|
-
*
|
|
10954
|
-
*
|
|
10955
|
-
*
|
|
10403
|
+
* enable_src_popup: true
|
|
10404
|
+
* primary_button_color: 'red',
|
|
10405
|
+
* secondary_button_color: 'blue',
|
|
10406
|
+
* primary_button_text_color: 'white',
|
|
10407
|
+
* secondary_button_text_color: 'white',
|
|
10408
|
+
* font_family: 'Arial',
|
|
10409
|
+
* });
|
|
10956
10410
|
* @param {IStyles} fields - name of styles which can be shown in widget [STYLE]{@link STYLE}
|
|
10957
10411
|
*/
|
|
10958
10412
|
_createClass(SRC, [{
|
|
@@ -10967,10 +10421,6 @@
|
|
|
10967
10421
|
value: function setStyle(param, value) {
|
|
10968
10422
|
if (ObjectHelper.values(STYLE$2).indexOf(param) !== -1) this.style[param] = value;else console.warn("Widget::setStyle[s: unsupported style param ".concat(param));
|
|
10969
10423
|
}
|
|
10970
|
-
/**
|
|
10971
|
-
* The final method after configuring the SRC to start the load process of SRC checkout
|
|
10972
|
-
*
|
|
10973
|
-
*/
|
|
10974
10424
|
}, {
|
|
10975
10425
|
key: "load",
|
|
10976
10426
|
value: function load() {
|
|
@@ -10980,8 +10430,8 @@
|
|
|
10980
10430
|
var type = _ref.type;
|
|
10981
10431
|
_this.meta.customizations = _this.style; // assign the style on the start of the widget
|
|
10982
10432
|
switch (type) {
|
|
10983
|
-
case CARD_SCHEME_SERVICE.
|
|
10984
|
-
_this.provider = new
|
|
10433
|
+
case CARD_SCHEME_SERVICE.MASTERCARD_SRC:
|
|
10434
|
+
_this.provider = new MastercardSRC(_this.iframe_selector, _this.service_id, _this.public_key_or_access_token, _this.meta, _this.eventEmitter, _this.autoResize, _this.env, _this.alias);
|
|
10985
10435
|
break;
|
|
10986
10436
|
}
|
|
10987
10437
|
if (_this.provider) _this.provider.load();
|
|
@@ -11027,8 +10477,9 @@
|
|
|
11027
10477
|
* SRC.on('checkoutCompleted').then(function (token) {
|
|
11028
10478
|
* console.log(token);
|
|
11029
10479
|
* });
|
|
10480
|
+
*
|
|
11030
10481
|
* @param {string} eventName - Available event names [EVENT]{@link EVENT}
|
|
11031
|
-
* @param {listener} [cb]
|
|
10482
|
+
* @param {listener} [cb] - The callback to handle the event. When available, it will send back data of type [EventData]{@link EventData}
|
|
11032
10483
|
* @return {Promise<any> | void}
|
|
11033
10484
|
*/
|
|
11034
10485
|
}, {
|
|
@@ -11042,29 +10493,6 @@
|
|
|
11042
10493
|
});
|
|
11043
10494
|
});
|
|
11044
10495
|
}
|
|
11045
|
-
/**
|
|
11046
|
-
* Using this method you can hide button
|
|
11047
|
-
* @param {boolean} [saveSize=false] - using this param you can save iframe's size (if applicable)
|
|
11048
|
-
*
|
|
11049
|
-
* @example
|
|
11050
|
-
* SRC.hideButton();
|
|
11051
|
-
*/
|
|
11052
|
-
}, {
|
|
11053
|
-
key: "hideButton",
|
|
11054
|
-
value: function hideButton(saveSize) {
|
|
11055
|
-
if (this.provider && typeof this.provider.hideButton === 'function') this.provider.hideButton(saveSize);
|
|
11056
|
-
}
|
|
11057
|
-
/**
|
|
11058
|
-
* Using this method you can show the SRC button after using hideButton method
|
|
11059
|
-
*
|
|
11060
|
-
* @example
|
|
11061
|
-
* SRC.showButton();
|
|
11062
|
-
*/
|
|
11063
|
-
}, {
|
|
11064
|
-
key: "showButton",
|
|
11065
|
-
value: function showButton() {
|
|
11066
|
-
if (this.provider && typeof this.provider.showButton === 'function') this.provider.showButton();
|
|
11067
|
-
}
|
|
11068
10496
|
/**
|
|
11069
10497
|
* Using this method you can hide checkout after load and button click
|
|
11070
10498
|
* @param {boolean} [saveSize=false] - using this param you can save iframe's size (if applicable)
|
|
@@ -11116,6 +10544,51 @@
|
|
|
11116
10544
|
return SRC;
|
|
11117
10545
|
}();
|
|
11118
10546
|
|
|
10547
|
+
/**
|
|
10548
|
+
* Class MastercardSRCClickToPay include methods for interacting with the MastercardSRC checkout and Manual Card option
|
|
10549
|
+
*
|
|
10550
|
+
* @extends SRC
|
|
10551
|
+
*
|
|
10552
|
+
* @constructor
|
|
10553
|
+
*
|
|
10554
|
+
* @param {string} iframe_selector - Selector of html element. Container for SRC checkout iFrame.
|
|
10555
|
+
* @param {string} service_id - Card Scheme Service ID
|
|
10556
|
+
* @param {string} public_key_or_access_token - Paydock public key or Access Token
|
|
10557
|
+
* @param {IMastercardSRCMeta} meta - Data that configures the SRC checkout
|
|
10558
|
+
* @example
|
|
10559
|
+
* var mastercardSRC = new MastercardSRCClickToPay('#checkoutIframe', 'service_id', 'public_key', {});
|
|
10560
|
+
*
|
|
10561
|
+
*/
|
|
10562
|
+
var MastercardSRCClickToPay = /*#__PURE__*/function (_SRC) {
|
|
10563
|
+
_inherits(MastercardSRCClickToPay, _SRC);
|
|
10564
|
+
var _super = _createSuper(MastercardSRCClickToPay);
|
|
10565
|
+
/** @constructs */ // constructs added for correct parse classes jsdoc2md
|
|
10566
|
+
function MastercardSRCClickToPay(iframe_selector, service_id, public_key_or_access_token, meta) {
|
|
10567
|
+
var _this;
|
|
10568
|
+
_classCallCheck(this, MastercardSRCClickToPay);
|
|
10569
|
+
_this = _super.call(this, iframe_selector, service_id, public_key_or_access_token, meta);
|
|
10570
|
+
_this.iframe_selector = iframe_selector;
|
|
10571
|
+
_this.service_id = service_id;
|
|
10572
|
+
_this.public_key_or_access_token = public_key_or_access_token;
|
|
10573
|
+
_this.meta = meta;
|
|
10574
|
+
return _this;
|
|
10575
|
+
}
|
|
10576
|
+
/**
|
|
10577
|
+
* The final method after configuring the SRC to start the load process of SRC checkout
|
|
10578
|
+
*
|
|
10579
|
+
*/
|
|
10580
|
+
_createClass(MastercardSRCClickToPay, [{
|
|
10581
|
+
key: "load",
|
|
10582
|
+
value: function load() {
|
|
10583
|
+
if (this.provider) return;
|
|
10584
|
+
this.meta.customizations = this.style;
|
|
10585
|
+
this.provider = new MastercardSRC(this.iframe_selector, this.service_id, this.public_key_or_access_token, this.meta, this.eventEmitter, this.autoResize, this.env, this.alias);
|
|
10586
|
+
this.provider.load();
|
|
10587
|
+
}
|
|
10588
|
+
}]);
|
|
10589
|
+
return MastercardSRCClickToPay;
|
|
10590
|
+
}(SRC);
|
|
10591
|
+
|
|
11119
10592
|
exports.AfterpayCheckoutButton = AfterpayCheckoutButton;
|
|
11120
10593
|
exports.Api = Api;
|
|
11121
10594
|
exports.CHECKOUT_BUTTON_EVENT = CHECKOUT_BUTTON_EVENT;
|
|
@@ -11129,13 +10602,13 @@
|
|
|
11129
10602
|
exports.HtmlMultiWidget = HtmlMultiWidget;
|
|
11130
10603
|
exports.HtmlPaymentSourceWidget = HtmlPaymentSourceWidget;
|
|
11131
10604
|
exports.HtmlWidget = HtmlWidget;
|
|
10605
|
+
exports.MastercardSRCClickToPay = MastercardSRCClickToPay;
|
|
11132
10606
|
exports.MultiWidget = MultiWidget;
|
|
11133
10607
|
exports.PAYMENT_TYPE = PAYMENT_TYPE;
|
|
11134
10608
|
exports.PURPOSE = PURPOSE;
|
|
11135
10609
|
exports.PaymentSourceBuilder = Builder$1;
|
|
11136
10610
|
exports.PaymentSourceWidget = PaymentSourceWidget;
|
|
11137
10611
|
exports.PaypalCheckoutButton = PaypalCheckoutButton;
|
|
11138
|
-
exports.SRC = SRC;
|
|
11139
10612
|
exports.STYLABLE_ELEMENT = STYLABLE_ELEMENT;
|
|
11140
10613
|
exports.STYLABLE_ELEMENT_STATE = STYLABLE_ELEMENT_STATE;
|
|
11141
10614
|
exports.STYLE = STYLE;
|