@soyio/soyio-widget 2.15.0 → 2.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +480 -482
- package/dist/index.umd.cjs +15 -19
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -50,7 +50,7 @@ function gn(c, d) {
|
|
|
50
50
|
return Object.freeze(Object.defineProperty(c, Symbol.toStringTag, { value: "Module" }));
|
|
51
51
|
}
|
|
52
52
|
const be = !!(typeof window != "undefined" && window.document && window.document.createElement), Ct = 200;
|
|
53
|
-
class
|
|
53
|
+
class He {
|
|
54
54
|
constructor() {
|
|
55
55
|
N(this, "tooltipElement", null);
|
|
56
56
|
N(this, "tooltipContent", null);
|
|
@@ -116,7 +116,7 @@ class Fe {
|
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
118
|
for (const [, k] of Object.entries(A))
|
|
119
|
-
if (
|
|
119
|
+
if (He.fitsInViewport(k, f, v, y, E))
|
|
120
120
|
return k;
|
|
121
121
|
const D = A.top;
|
|
122
122
|
return D.left = Math.max(S, Math.min(D.left, y - f - S)), D.top = Math.max(S, Math.min(D.top, E - v - S)), D;
|
|
@@ -178,7 +178,7 @@ function Wn() {
|
|
|
178
178
|
})));
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function Mt(c, d) {
|
|
182
182
|
const {
|
|
183
183
|
onHeightChange: h,
|
|
184
184
|
onIframeReady: f,
|
|
@@ -236,7 +236,7 @@ const zt = "https://app.soyio.id", Lt = "https://sandbox.soyio.id", An = "https:
|
|
|
236
236
|
"DENIED_CAMERA_PERMISSION",
|
|
237
237
|
"REJECTED_SIGNATURE",
|
|
238
238
|
"CLOSE_POPUP"
|
|
239
|
-
],
|
|
239
|
+
], jn = "WIDGET_CLOSED", Mn = 420, zn = 720, Ln = 500, kn = {
|
|
240
240
|
minWidth: "375px"
|
|
241
241
|
}, Un = {
|
|
242
242
|
minWidth: "0px"
|
|
@@ -253,7 +253,7 @@ class We {
|
|
|
253
253
|
N(this, "defaultIframeCSSConfig", kn);
|
|
254
254
|
N(this, "Skeleton", null);
|
|
255
255
|
N(this, "defaultUniqueId");
|
|
256
|
-
this.options = d, this.appearance = d.appearance || null, this.tooltipManager = new
|
|
256
|
+
this.options = d, this.appearance = d.appearance || null, this.tooltipManager = new He(), this.defaultUniqueId = We.generateUniqueId();
|
|
257
257
|
}
|
|
258
258
|
static generateUniqueId() {
|
|
259
259
|
return On();
|
|
@@ -288,7 +288,7 @@ class We {
|
|
|
288
288
|
onTooltipChange: this.handleTooltipChange.bind(this),
|
|
289
289
|
onInfo: this.options.onEvent.bind(this)
|
|
290
290
|
};
|
|
291
|
-
|
|
291
|
+
Mt(this.uniqueIdentifier, d);
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
294
|
mount(d) {
|
|
@@ -402,8 +402,8 @@ class Hn {
|
|
|
402
402
|
animation: shimmer 1.5s infinite;
|
|
403
403
|
border-radius: 0.125rem;
|
|
404
404
|
`;
|
|
405
|
-
const
|
|
406
|
-
if (
|
|
405
|
+
const X = document.createElement("div");
|
|
406
|
+
if (X.style.cssText = `
|
|
407
407
|
height: 0.875rem;
|
|
408
408
|
width: 60%;
|
|
409
409
|
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
|
@@ -411,15 +411,15 @@ class Hn {
|
|
|
411
411
|
animation: shimmer 1.5s infinite;
|
|
412
412
|
border-radius: 0.125rem;
|
|
413
413
|
`, !document.getElementById("skeleton-animation")) {
|
|
414
|
-
const
|
|
415
|
-
|
|
414
|
+
const J = document.createElement("style");
|
|
415
|
+
J.id = "skeleton-animation", J.textContent = `
|
|
416
416
|
@keyframes shimmer {
|
|
417
417
|
0% { background-position: 200% 0; }
|
|
418
418
|
100% { background-position: -200% 0; }
|
|
419
419
|
}
|
|
420
|
-
`, document.head.appendChild(
|
|
420
|
+
`, document.head.appendChild(J);
|
|
421
421
|
}
|
|
422
|
-
f.appendChild(v), f.appendChild(y), f.appendChild(E), D.appendChild(k), D.appendChild(
|
|
422
|
+
f.appendChild(v), f.appendChild(y), f.appendChild(E), D.appendChild(k), D.appendChild(X), S.appendChild(A), S.appendChild(D), h.appendChild(f), h.appendChild(S), this.element.appendChild(h);
|
|
423
423
|
}
|
|
424
424
|
cleanupExistingSkeleton() {
|
|
425
425
|
const d = document.getElementById(this.identifier);
|
|
@@ -432,7 +432,7 @@ class Hn {
|
|
|
432
432
|
this.element.style.opacity = "0", setTimeout(() => this.element.remove(), 300);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
|
-
const
|
|
435
|
+
const _e = "2.15.1";
|
|
436
436
|
function _n(c) {
|
|
437
437
|
var E;
|
|
438
438
|
const d = [
|
|
@@ -442,7 +442,7 @@ function _n(c) {
|
|
|
442
442
|
"optionalReconsentBehavior",
|
|
443
443
|
"mandatoryReconsentBehavior"
|
|
444
444
|
], h = (E = c.isSandbox) != null ? E : !1, f = c.developmentUrl || (h ? Lt : zt), v = new URLSearchParams();
|
|
445
|
-
v.set("sdkVersion",
|
|
445
|
+
v.set("sdkVersion", _e), d.forEach((S) => {
|
|
446
446
|
c[S] && v.set(S, c[S]);
|
|
447
447
|
});
|
|
448
448
|
const y = v.toString();
|
|
@@ -475,7 +475,7 @@ class kt extends We {
|
|
|
475
475
|
}
|
|
476
476
|
setupListeners() {
|
|
477
477
|
return _(this, null, function* () {
|
|
478
|
-
yield Pt(kt.prototype, this, "setupListeners").call(this),
|
|
478
|
+
yield Pt(kt.prototype, this, "setupListeners").call(this), Mt(this.uniqueIdentifier, {
|
|
479
479
|
onStateChange: this.handleStateChange.bind(this)
|
|
480
480
|
});
|
|
481
481
|
});
|
|
@@ -487,7 +487,7 @@ class kt extends We {
|
|
|
487
487
|
function qn(c) {
|
|
488
488
|
var y, E, S;
|
|
489
489
|
const d = (y = c.isSandbox) != null ? y : !1, h = c.developmentUrl || (d ? Nn : An), f = new URLSearchParams();
|
|
490
|
-
f.set("sdkVersion",
|
|
490
|
+
f.set("sdkVersion", _e), c.sessionToken ? f.set("sessionToken", c.sessionToken) : c.companyId && f.set("companyId", c.companyId), (E = c.enabledFeatures) != null && E.length && f.set("enabledFeatures", c.enabledFeatures.join(",")), (S = c.dataSubjects) != null && S.length && f.set("dataSubjects", c.dataSubjects.join(",")), c.requestReference && f.set("requestReference", c.requestReference);
|
|
491
491
|
const v = f.toString();
|
|
492
492
|
return `${h}${v ? `?${v}` : ""}`;
|
|
493
493
|
}
|
|
@@ -507,42 +507,40 @@ class ir extends We {
|
|
|
507
507
|
}
|
|
508
508
|
const ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
509
509
|
__proto__: null
|
|
510
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
511
|
-
function
|
|
510
|
+
}, Symbol.toStringTag, { value: "Module" })), Bn = "WIDGET_EVENT";
|
|
511
|
+
function $n(c) {
|
|
512
512
|
let d = "widget/";
|
|
513
513
|
return "disclosureRequestId" in c.configProps ? d += ["disclosures", c.configProps.disclosureRequestId].join("/") : d += c.request, d;
|
|
514
514
|
}
|
|
515
515
|
function Gn(c) {
|
|
516
516
|
var y;
|
|
517
|
-
const d = (y = c.isSandbox) != null ? y : !1, h = c.developmentUrl || (d ? Lt : zt), f = Object.entries(c.configProps).filter(([E, S]) => S || E === "disclosureRequestId").map(([E, S]) => `${E}=${encodeURIComponent(S)}`).join("&"), v =
|
|
518
|
-
return `${h}/${v}?sdk=web&sdkVersion=${
|
|
517
|
+
const d = (y = c.isSandbox) != null ? y : !1, h = c.developmentUrl || (d ? Lt : zt), f = Object.entries(c.configProps).filter(([E, S]) => S || E === "disclosureRequestId").map(([E, S]) => `${E}=${encodeURIComponent(S)}`).join("&"), v = $n(c);
|
|
518
|
+
return `${h}/${v}?sdk=web&sdkVersion=${_e}&${f}`;
|
|
519
519
|
}
|
|
520
|
-
let
|
|
521
|
-
function
|
|
522
|
-
|
|
520
|
+
let Z = null, ke = null;
|
|
521
|
+
function Fe(c = null) {
|
|
522
|
+
Z && !Z.closed && Z.focus(), c == null || c.preventDefault();
|
|
523
523
|
}
|
|
524
|
-
function
|
|
525
|
-
document.body.style.filter = "", document.body.removeEventListener("click",
|
|
524
|
+
function Pe() {
|
|
525
|
+
document.body.style.filter = "", document.body.removeEventListener("click", Fe);
|
|
526
526
|
}
|
|
527
527
|
function Vn() {
|
|
528
|
-
|
|
529
|
-
(!
|
|
528
|
+
ke = setInterval(() => {
|
|
529
|
+
(!Z || Z.closed) && (ke && clearInterval(ke), Pe());
|
|
530
530
|
}, Ln);
|
|
531
531
|
}
|
|
532
532
|
function Jn(c) {
|
|
533
|
-
const d = Gn(c), h =
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
`
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
left=${D}`
|
|
542
|
-
), Ue(), Vn();
|
|
533
|
+
const d = Gn(c), h = Mn, f = zn, v = window.screenLeft !== void 0 ? window.screenLeft : window.screenX, y = window.screenTop !== void 0 ? window.screenTop : window.screenY, E = window.innerWidth || document.documentElement.clientWidth || window.screen.width, S = window.innerHeight || document.documentElement.clientHeight || window.screen.height, A = E / window.screen.availWidth, D = (E - h) / 2 / A + v, k = (S - f) / 2 / A + y, X = [
|
|
534
|
+
"scrollbars=yes",
|
|
535
|
+
`width=${h}`,
|
|
536
|
+
`height=${f}`,
|
|
537
|
+
`top=${k}`,
|
|
538
|
+
`left=${D}`
|
|
539
|
+
].join(","), J = window.open("about:blank", "Soyio", X);
|
|
540
|
+
J ? (Z = J, Z.location.href = d, document.body.style.filter = "blur(5px)", document.body.addEventListener("click", Fe), Fe(), Vn()) : (Pe(), alert("Debes habilitar las ventanas emergentes para poder iniciar el flujo."));
|
|
543
541
|
}
|
|
544
542
|
function Yn() {
|
|
545
|
-
|
|
543
|
+
Z && (Z.close(), Z = null), Pe();
|
|
546
544
|
}
|
|
547
545
|
let me = null;
|
|
548
546
|
function Zn() {
|
|
@@ -551,8 +549,8 @@ function Zn() {
|
|
|
551
549
|
function Kn(c) {
|
|
552
550
|
return _(this, null, function* () {
|
|
553
551
|
const { onEvent: d } = c, h = yield Promise.resolve().then(() => qe);
|
|
554
|
-
me && Zn(), me = h.on(
|
|
555
|
-
return d(f), Dn.includes(f.eventName) ? Yn() : f.eventName ===
|
|
552
|
+
me && Zn(), me = h.on(Bn, (v) => _(null, [v], function* ({ data: f }) {
|
|
553
|
+
return d(f), Dn.includes(f.eventName) ? Yn() : f.eventName === jn && Pe(), Promise.resolve();
|
|
556
554
|
}));
|
|
557
555
|
});
|
|
558
556
|
}
|
|
@@ -575,13 +573,13 @@ Ie = new WeakSet(), Ut = function(d) {
|
|
|
575
573
|
function Qn(c) {
|
|
576
574
|
return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
|
|
577
575
|
}
|
|
578
|
-
var
|
|
576
|
+
var Ue = { exports: {} }, xe = { exports: {} }, er = xe.exports, Dt;
|
|
579
577
|
function tr() {
|
|
580
|
-
return Dt || (Dt = 1, function(c, d) {
|
|
578
|
+
return Dt || (Dt = 1, (function(c, d) {
|
|
581
579
|
(function(h, f) {
|
|
582
580
|
c.exports = f();
|
|
583
|
-
})(typeof self != "undefined" ? self : er, function() {
|
|
584
|
-
return function(h) {
|
|
581
|
+
})(typeof self != "undefined" ? self : er, (function() {
|
|
582
|
+
return (function(h) {
|
|
585
583
|
var f = {};
|
|
586
584
|
function v(y) {
|
|
587
585
|
if (f[y]) return f[y].exports;
|
|
@@ -623,37 +621,37 @@ function tr() {
|
|
|
623
621
|
}, v.o = function(y, E) {
|
|
624
622
|
return {}.hasOwnProperty.call(y, E);
|
|
625
623
|
}, v.p = "", v(v.s = 0);
|
|
626
|
-
}([function(h, f, v) {
|
|
627
|
-
v.r(f), v.d(f, "Promise", function() {
|
|
624
|
+
})([function(h, f, v) {
|
|
625
|
+
v.r(f), v.d(f, "Promise", (function() {
|
|
628
626
|
return P;
|
|
629
|
-
}), v.d(f, "TYPES", function() {
|
|
627
|
+
})), v.d(f, "TYPES", (function() {
|
|
630
628
|
return cn;
|
|
631
|
-
}), v.d(f, "ProxyWindow", function() {
|
|
632
|
-
return
|
|
633
|
-
}), v.d(f, "setup", function() {
|
|
629
|
+
})), v.d(f, "ProxyWindow", (function() {
|
|
630
|
+
return $;
|
|
631
|
+
})), v.d(f, "setup", (function() {
|
|
634
632
|
return Et;
|
|
635
|
-
}), v.d(f, "destroy", function() {
|
|
633
|
+
})), v.d(f, "destroy", (function() {
|
|
636
634
|
return un;
|
|
637
|
-
}), v.d(f, "serializeMessage", function() {
|
|
635
|
+
})), v.d(f, "serializeMessage", (function() {
|
|
638
636
|
return rn;
|
|
639
|
-
}), v.d(f, "deserializeMessage", function() {
|
|
637
|
+
})), v.d(f, "deserializeMessage", (function() {
|
|
640
638
|
return on;
|
|
641
|
-
}), v.d(f, "createProxyWindow", function() {
|
|
639
|
+
})), v.d(f, "createProxyWindow", (function() {
|
|
642
640
|
return an;
|
|
643
|
-
}), v.d(f, "toProxyWindow", function() {
|
|
641
|
+
})), v.d(f, "toProxyWindow", (function() {
|
|
644
642
|
return sn;
|
|
645
|
-
}), v.d(f, "on", function() {
|
|
646
|
-
return
|
|
647
|
-
}), v.d(f, "once", function() {
|
|
643
|
+
})), v.d(f, "on", (function() {
|
|
644
|
+
return re;
|
|
645
|
+
})), v.d(f, "once", (function() {
|
|
648
646
|
return nn;
|
|
649
|
-
}), v.d(f, "send", function() {
|
|
647
|
+
})), v.d(f, "send", (function() {
|
|
650
648
|
return K;
|
|
651
|
-
}), v.d(f, "markWindowKnown", function() {
|
|
649
|
+
})), v.d(f, "markWindowKnown", (function() {
|
|
652
650
|
return ut;
|
|
653
|
-
}), v.d(f, "cleanUpWindow", function() {
|
|
651
|
+
})), v.d(f, "cleanUpWindow", (function() {
|
|
654
652
|
return dn;
|
|
655
|
-
}), v.d(f, "bridge", function() {
|
|
656
|
-
});
|
|
653
|
+
})), v.d(f, "bridge", (function() {
|
|
654
|
+
}));
|
|
657
655
|
function y(e) {
|
|
658
656
|
return {}.toString.call(e) === "[object RegExp]";
|
|
659
657
|
}
|
|
@@ -678,13 +676,13 @@ function tr() {
|
|
|
678
676
|
} catch (n) {
|
|
679
677
|
}
|
|
680
678
|
}
|
|
681
|
-
function
|
|
679
|
+
function X(e) {
|
|
682
680
|
if (e === void 0 && (e = window), e && !k(e)) try {
|
|
683
681
|
return e.opener;
|
|
684
682
|
} catch (n) {
|
|
685
683
|
}
|
|
686
684
|
}
|
|
687
|
-
function
|
|
685
|
+
function J(e) {
|
|
688
686
|
try {
|
|
689
687
|
return !0;
|
|
690
688
|
} catch (n) {
|
|
@@ -700,7 +698,7 @@ function tr() {
|
|
|
700
698
|
if (t === "file:") return "file://";
|
|
701
699
|
if (t === "about:") {
|
|
702
700
|
var r = k(e);
|
|
703
|
-
return r &&
|
|
701
|
+
return r && J() ? pe(r) : "about://";
|
|
704
702
|
}
|
|
705
703
|
var o = n.host;
|
|
706
704
|
if (!o) throw new Error("Can not read window host");
|
|
@@ -711,8 +709,8 @@ function tr() {
|
|
|
711
709
|
var n = pe(e);
|
|
712
710
|
return n && e.mockDomain && e.mockDomain.indexOf("mock:") === 0 ? e.mockDomain : n;
|
|
713
711
|
}
|
|
714
|
-
function
|
|
715
|
-
if (!function(n) {
|
|
712
|
+
function Q(e) {
|
|
713
|
+
if (!(function(n) {
|
|
716
714
|
try {
|
|
717
715
|
if (n === window) return !0;
|
|
718
716
|
} catch (r) {
|
|
@@ -723,13 +721,13 @@ function tr() {
|
|
|
723
721
|
} catch (r) {
|
|
724
722
|
}
|
|
725
723
|
try {
|
|
726
|
-
if (D(n) &&
|
|
724
|
+
if (D(n) && J()) return !0;
|
|
727
725
|
} catch (r) {
|
|
728
726
|
}
|
|
729
727
|
try {
|
|
730
|
-
if (function(r) {
|
|
728
|
+
if ((function(r) {
|
|
731
729
|
return r === void 0 && (r = window), A(r) === "mock:";
|
|
732
|
-
}(n) &&
|
|
730
|
+
})(n) && J()) return !0;
|
|
733
731
|
} catch (r) {
|
|
734
732
|
}
|
|
735
733
|
try {
|
|
@@ -737,21 +735,21 @@ function tr() {
|
|
|
737
735
|
} catch (r) {
|
|
738
736
|
}
|
|
739
737
|
return !1;
|
|
740
|
-
}(e)) return !1;
|
|
738
|
+
})(e)) return !1;
|
|
741
739
|
try {
|
|
742
|
-
if (e === window || D(e) &&
|
|
740
|
+
if (e === window || D(e) && J() || F(window) === F(e)) return !0;
|
|
743
741
|
} catch (n) {
|
|
744
742
|
}
|
|
745
743
|
return !1;
|
|
746
744
|
}
|
|
747
745
|
function ve(e) {
|
|
748
|
-
if (!
|
|
746
|
+
if (!Q(e)) throw new Error("Expected window to be same domain");
|
|
749
747
|
return e;
|
|
750
748
|
}
|
|
751
|
-
function
|
|
749
|
+
function Be(e, n) {
|
|
752
750
|
if (!e || !n) return !1;
|
|
753
751
|
var t = k(n);
|
|
754
|
-
return t ? t === e : function(r) {
|
|
752
|
+
return t ? t === e : (function(r) {
|
|
755
753
|
var o = [];
|
|
756
754
|
try {
|
|
757
755
|
for (; r.parent !== r; )
|
|
@@ -759,9 +757,9 @@ function tr() {
|
|
|
759
757
|
} catch (i) {
|
|
760
758
|
}
|
|
761
759
|
return o;
|
|
762
|
-
}(n).indexOf(e) !== -1;
|
|
760
|
+
})(n).indexOf(e) !== -1;
|
|
763
761
|
}
|
|
764
|
-
function
|
|
762
|
+
function $e(e) {
|
|
765
763
|
var n = [], t;
|
|
766
764
|
try {
|
|
767
765
|
t = e.frames;
|
|
@@ -816,7 +814,7 @@ function tr() {
|
|
|
816
814
|
} catch (o) {
|
|
817
815
|
return !o || o.message !== E;
|
|
818
816
|
}
|
|
819
|
-
if (n &&
|
|
817
|
+
if (n && Q(e)) try {
|
|
820
818
|
if (e.mockclosed) return !0;
|
|
821
819
|
} catch (o) {
|
|
822
820
|
}
|
|
@@ -824,16 +822,16 @@ function tr() {
|
|
|
824
822
|
if (!e.parent || !e.top) return !0;
|
|
825
823
|
} catch (o) {
|
|
826
824
|
}
|
|
827
|
-
var t = function(o, i) {
|
|
825
|
+
var t = (function(o, i) {
|
|
828
826
|
for (var a = 0; a < o.length; a++) try {
|
|
829
827
|
if (o[a] === i) return a;
|
|
830
828
|
} catch (l) {
|
|
831
829
|
}
|
|
832
830
|
return -1;
|
|
833
|
-
}(Ht, e);
|
|
831
|
+
})(Ht, e);
|
|
834
832
|
if (t !== -1) {
|
|
835
833
|
var r = _t[t];
|
|
836
|
-
if (r && function(o) {
|
|
834
|
+
if (r && (function(o) {
|
|
837
835
|
if (!o.contentWindow || !o.parentNode) return !0;
|
|
838
836
|
var i = o.ownerDocument;
|
|
839
837
|
if (i && i.documentElement && !i.documentElement.contains(o)) {
|
|
@@ -841,21 +839,21 @@ function tr() {
|
|
|
841
839
|
if (!a.host || !i.documentElement.contains(a.host)) return !0;
|
|
842
840
|
}
|
|
843
841
|
return !1;
|
|
844
|
-
}(r)) return !0;
|
|
842
|
+
})(r)) return !0;
|
|
845
843
|
}
|
|
846
844
|
return !1;
|
|
847
845
|
}
|
|
848
846
|
function Ge(e) {
|
|
849
|
-
return e === void 0 && (e = window),
|
|
847
|
+
return e === void 0 && (e = window), X(e = e || window) || k(e) || void 0;
|
|
850
848
|
}
|
|
851
|
-
function
|
|
849
|
+
function oe(e, n) {
|
|
852
850
|
if (typeof e == "string") {
|
|
853
851
|
if (typeof n == "string") return e === "*" || n === e;
|
|
854
852
|
if (y(n) || Array.isArray(n)) return !1;
|
|
855
853
|
}
|
|
856
|
-
return y(e) ? y(n) ? e.toString() === n.toString() : !Array.isArray(n) && !!n.match(e) : !!Array.isArray(e) && (Array.isArray(n) ? JSON.stringify(e) === JSON.stringify(n) : !y(n) && e.some(function(t) {
|
|
857
|
-
return
|
|
858
|
-
}));
|
|
854
|
+
return y(e) ? y(n) ? e.toString() === n.toString() : !Array.isArray(n) && !!n.match(e) : !!Array.isArray(e) && (Array.isArray(n) ? JSON.stringify(e) === JSON.stringify(n) : !y(n) && e.some((function(t) {
|
|
855
|
+
return oe(t, n);
|
|
856
|
+
})));
|
|
859
857
|
}
|
|
860
858
|
function we(e) {
|
|
861
859
|
try {
|
|
@@ -900,16 +898,16 @@ function tr() {
|
|
|
900
898
|
return !1;
|
|
901
899
|
}
|
|
902
900
|
function Ve(e) {
|
|
903
|
-
if (
|
|
901
|
+
if (Q(e)) return ve(e).frameElement;
|
|
904
902
|
for (var n = 0, t = document.querySelectorAll("iframe"); n < t.length; n++) {
|
|
905
903
|
var r = t[n];
|
|
906
904
|
if (r && r.contentWindow && r.contentWindow === e) return r;
|
|
907
905
|
}
|
|
908
906
|
}
|
|
909
907
|
function qt(e) {
|
|
910
|
-
if (function(t) {
|
|
908
|
+
if ((function(t) {
|
|
911
909
|
return t === void 0 && (t = window), !!k(t);
|
|
912
|
-
}(e)) {
|
|
910
|
+
})(e)) {
|
|
913
911
|
var n = Ve(e);
|
|
914
912
|
if (n && n.parentElement) {
|
|
915
913
|
n.parentElement.removeChild(n);
|
|
@@ -921,7 +919,7 @@ function tr() {
|
|
|
921
919
|
} catch (t) {
|
|
922
920
|
}
|
|
923
921
|
}
|
|
924
|
-
function
|
|
922
|
+
function ee(e) {
|
|
925
923
|
try {
|
|
926
924
|
if (!e) return !1;
|
|
927
925
|
if (typeof Promise != "undefined" && e instanceof Promise) return !0;
|
|
@@ -937,31 +935,31 @@ function tr() {
|
|
|
937
935
|
}
|
|
938
936
|
return !1;
|
|
939
937
|
}
|
|
940
|
-
var Je = [], ie = [],
|
|
938
|
+
var Je = [], ie = [], Ce = 0, ae;
|
|
941
939
|
function Ye() {
|
|
942
|
-
if (!
|
|
940
|
+
if (!Ce && ae) {
|
|
943
941
|
var e = ae;
|
|
944
942
|
ae = null, e.resolve();
|
|
945
943
|
}
|
|
946
944
|
}
|
|
947
|
-
function
|
|
948
|
-
|
|
945
|
+
function Te() {
|
|
946
|
+
Ce += 1;
|
|
949
947
|
}
|
|
950
948
|
function se() {
|
|
951
|
-
|
|
949
|
+
Ce -= 1, Ye();
|
|
952
950
|
}
|
|
953
|
-
var P = function() {
|
|
951
|
+
var P = (function() {
|
|
954
952
|
function e(t) {
|
|
955
953
|
var r = this;
|
|
956
954
|
if (this.resolved = void 0, this.rejected = void 0, this.errorHandled = void 0, this.value = void 0, this.error = void 0, this.handlers = void 0, this.dispatching = void 0, this.stack = void 0, this.resolved = !1, this.rejected = !1, this.errorHandled = !1, this.handlers = [], t) {
|
|
957
955
|
var o, i, a = !1, l = !1, u = !1;
|
|
958
|
-
|
|
956
|
+
Te();
|
|
959
957
|
try {
|
|
960
|
-
t(function(s) {
|
|
958
|
+
t((function(s) {
|
|
961
959
|
u ? r.resolve(s) : (a = !0, o = s);
|
|
962
|
-
}, function(s) {
|
|
960
|
+
}), (function(s) {
|
|
963
961
|
u ? r.reject(s) : (l = !0, i = s);
|
|
964
|
-
});
|
|
962
|
+
}));
|
|
965
963
|
} catch (s) {
|
|
966
964
|
se(), this.reject(s);
|
|
967
965
|
return;
|
|
@@ -972,38 +970,38 @@ function tr() {
|
|
|
972
970
|
var n = e.prototype;
|
|
973
971
|
return n.resolve = function(t) {
|
|
974
972
|
if (this.resolved || this.rejected) return this;
|
|
975
|
-
if (
|
|
973
|
+
if (ee(t)) throw new Error("Can not resolve promise with another promise");
|
|
976
974
|
return this.resolved = !0, this.value = t, this.dispatch(), this;
|
|
977
975
|
}, n.reject = function(t) {
|
|
978
976
|
var r = this;
|
|
979
977
|
if (this.resolved || this.rejected) return this;
|
|
980
|
-
if (
|
|
978
|
+
if (ee(t)) throw new Error("Can not reject promise with another promise");
|
|
981
979
|
if (!t) {
|
|
982
980
|
var o = t && typeof t.toString == "function" ? t.toString() : {}.toString.call(t);
|
|
983
981
|
t = new Error("Expected reject to be called with Error, got " + o);
|
|
984
982
|
}
|
|
985
|
-
return this.rejected = !0, this.error = t, this.errorHandled || setTimeout(function() {
|
|
986
|
-
r.errorHandled || function(i, a) {
|
|
983
|
+
return this.rejected = !0, this.error = t, this.errorHandled || setTimeout((function() {
|
|
984
|
+
r.errorHandled || (function(i, a) {
|
|
987
985
|
if (Je.indexOf(i) === -1) {
|
|
988
|
-
Je.push(i), setTimeout(function() {
|
|
986
|
+
Je.push(i), setTimeout((function() {
|
|
989
987
|
throw i;
|
|
990
|
-
}, 1);
|
|
988
|
+
}), 1);
|
|
991
989
|
for (var l = 0; l < ie.length; l++) ie[l](i, a);
|
|
992
990
|
}
|
|
993
|
-
}(t, r);
|
|
994
|
-
}, 1), this.dispatch(), this;
|
|
991
|
+
})(t, r);
|
|
992
|
+
}), 1), this.dispatch(), this;
|
|
995
993
|
}, n.asyncReject = function(t) {
|
|
996
994
|
return this.errorHandled = !0, this.reject(t), this;
|
|
997
995
|
}, n.dispatch = function() {
|
|
998
996
|
var t = this.resolved, r = this.rejected, o = this.handlers;
|
|
999
997
|
if (!this.dispatching && (t || r)) {
|
|
1000
|
-
this.dispatching = !0,
|
|
998
|
+
this.dispatching = !0, Te();
|
|
1001
999
|
for (var i = function(g, I) {
|
|
1002
|
-
return g.then(function(x) {
|
|
1000
|
+
return g.then((function(x) {
|
|
1003
1001
|
I.resolve(x);
|
|
1004
|
-
}, function(x) {
|
|
1002
|
+
}), (function(x) {
|
|
1005
1003
|
I.reject(x);
|
|
1006
|
-
});
|
|
1004
|
+
}));
|
|
1007
1005
|
}, a = 0; a < o.length; a++) {
|
|
1008
1006
|
var l = o[a], u = l.onSuccess, s = l.onError, w = l.promise, m = void 0;
|
|
1009
1007
|
if (t) try {
|
|
@@ -1027,7 +1025,7 @@ function tr() {
|
|
|
1027
1025
|
if (m instanceof e && (m.resolved || m.rejected)) {
|
|
1028
1026
|
var p = m;
|
|
1029
1027
|
p.resolved ? w.resolve(p.value) : w.reject(p.error), p.errorHandled = !0;
|
|
1030
|
-
} else
|
|
1028
|
+
} else ee(m) ? m instanceof e && (m.resolved || m.rejected) ? m.resolved ? w.resolve(m.value) : w.reject(m.error) : i(m, w) : w.resolve(m);
|
|
1031
1029
|
}
|
|
1032
1030
|
o.length = 0, this.dispatching = !1, se();
|
|
1033
1031
|
}
|
|
@@ -1044,33 +1042,33 @@ function tr() {
|
|
|
1044
1042
|
return this.then(void 0, t);
|
|
1045
1043
|
}, n.finally = function(t) {
|
|
1046
1044
|
if (t && typeof t != "function" && !t.call) throw new Error("Promise.finally expected a function");
|
|
1047
|
-
return this.then(function(r) {
|
|
1048
|
-
return e.try(t).then(function() {
|
|
1045
|
+
return this.then((function(r) {
|
|
1046
|
+
return e.try(t).then((function() {
|
|
1049
1047
|
return r;
|
|
1050
|
-
});
|
|
1051
|
-
}, function(r) {
|
|
1052
|
-
return e.try(t).then(function() {
|
|
1048
|
+
}));
|
|
1049
|
+
}), (function(r) {
|
|
1050
|
+
return e.try(t).then((function() {
|
|
1053
1051
|
throw r;
|
|
1054
|
-
});
|
|
1055
|
-
});
|
|
1052
|
+
}));
|
|
1053
|
+
}));
|
|
1056
1054
|
}, n.timeout = function(t, r) {
|
|
1057
1055
|
var o = this;
|
|
1058
1056
|
if (this.resolved || this.rejected) return this;
|
|
1059
|
-
var i = setTimeout(function() {
|
|
1057
|
+
var i = setTimeout((function() {
|
|
1060
1058
|
o.resolved || o.rejected || o.reject(r || new Error("Promise timed out after " + t + "ms"));
|
|
1061
|
-
}, t);
|
|
1062
|
-
return this.then(function(a) {
|
|
1059
|
+
}), t);
|
|
1060
|
+
return this.then((function(a) {
|
|
1063
1061
|
return clearTimeout(i), a;
|
|
1064
|
-
});
|
|
1062
|
+
}));
|
|
1065
1063
|
}, n.toPromise = function() {
|
|
1066
1064
|
if (typeof Promise == "undefined") throw new TypeError("Could not find Promise");
|
|
1067
1065
|
return Promise.resolve(this);
|
|
1068
1066
|
}, n.lazy = function() {
|
|
1069
1067
|
return this.errorHandled = !0, this;
|
|
1070
1068
|
}, e.resolve = function(t) {
|
|
1071
|
-
return t instanceof e ? t :
|
|
1069
|
+
return t instanceof e ? t : ee(t) ? new e((function(r, o) {
|
|
1072
1070
|
return t.then(r, o);
|
|
1073
|
-
}) : new e().resolve(t);
|
|
1071
|
+
})) : new e().resolve(t);
|
|
1074
1072
|
}, e.reject = function(t) {
|
|
1075
1073
|
return new e().reject(t);
|
|
1076
1074
|
}, e.asyncReject = function(t) {
|
|
@@ -1080,11 +1078,11 @@ function tr() {
|
|
|
1080
1078
|
if (!o)
|
|
1081
1079
|
return r.resolve(i), r;
|
|
1082
1080
|
for (var a = function(s, w, m) {
|
|
1083
|
-
return w.then(function(p) {
|
|
1081
|
+
return w.then((function(p) {
|
|
1084
1082
|
i[s] = p, (o -= 1) == 0 && r.resolve(i);
|
|
1085
|
-
}, function(p) {
|
|
1083
|
+
}), (function(p) {
|
|
1086
1084
|
m.reject(p);
|
|
1087
|
-
});
|
|
1085
|
+
}));
|
|
1088
1086
|
}, l = 0; l < t.length; l++) {
|
|
1089
1087
|
var u = t[l];
|
|
1090
1088
|
if (u instanceof e) {
|
|
@@ -1092,7 +1090,7 @@ function tr() {
|
|
|
1092
1090
|
i[l] = u.value, o -= 1;
|
|
1093
1091
|
continue;
|
|
1094
1092
|
}
|
|
1095
|
-
} else if (!
|
|
1093
|
+
} else if (!ee(u)) {
|
|
1096
1094
|
i[l] = u, o -= 1;
|
|
1097
1095
|
continue;
|
|
1098
1096
|
}
|
|
@@ -1103,29 +1101,29 @@ function tr() {
|
|
|
1103
1101
|
var r = {}, o = [], i = function(l) {
|
|
1104
1102
|
if (t.hasOwnProperty(l)) {
|
|
1105
1103
|
var u = t[l];
|
|
1106
|
-
|
|
1104
|
+
ee(u) ? o.push(u.then((function(s) {
|
|
1107
1105
|
r[l] = s;
|
|
1108
|
-
})) : r[l] = u;
|
|
1106
|
+
}))) : r[l] = u;
|
|
1109
1107
|
}
|
|
1110
1108
|
};
|
|
1111
1109
|
for (var a in t) i(a);
|
|
1112
|
-
return e.all(o).then(function() {
|
|
1110
|
+
return e.all(o).then((function() {
|
|
1113
1111
|
return r;
|
|
1114
|
-
});
|
|
1112
|
+
}));
|
|
1115
1113
|
}, e.map = function(t, r) {
|
|
1116
1114
|
return e.all(t.map(r));
|
|
1117
1115
|
}, e.onPossiblyUnhandledException = function(t) {
|
|
1118
|
-
return function(r) {
|
|
1116
|
+
return (function(r) {
|
|
1119
1117
|
return ie.push(r), {
|
|
1120
1118
|
cancel: function() {
|
|
1121
1119
|
ie.splice(ie.indexOf(r), 1);
|
|
1122
1120
|
}
|
|
1123
1121
|
};
|
|
1124
|
-
}(t);
|
|
1122
|
+
})(t);
|
|
1125
1123
|
}, e.try = function(t, r, o) {
|
|
1126
1124
|
if (t && typeof t != "function" && !t.call) throw new Error("Promise.try expected a function");
|
|
1127
1125
|
var i;
|
|
1128
|
-
|
|
1126
|
+
Te();
|
|
1129
1127
|
try {
|
|
1130
1128
|
i = t.apply(r, o || []);
|
|
1131
1129
|
} catch (a) {
|
|
@@ -1133,18 +1131,18 @@ function tr() {
|
|
|
1133
1131
|
}
|
|
1134
1132
|
return se(), e.resolve(i);
|
|
1135
1133
|
}, e.delay = function(t) {
|
|
1136
|
-
return new e(function(r) {
|
|
1134
|
+
return new e((function(r) {
|
|
1137
1135
|
setTimeout(r, t);
|
|
1138
|
-
});
|
|
1136
|
+
}));
|
|
1139
1137
|
}, e.isPromise = function(t) {
|
|
1140
|
-
return !!(t && t instanceof e) ||
|
|
1138
|
+
return !!(t && t instanceof e) || ee(t);
|
|
1141
1139
|
}, e.flush = function() {
|
|
1142
|
-
return function(t) {
|
|
1140
|
+
return (function(t) {
|
|
1143
1141
|
var r = ae = ae || new t();
|
|
1144
1142
|
return Ye(), r;
|
|
1145
|
-
}(e);
|
|
1143
|
+
})(e);
|
|
1146
1144
|
}, e;
|
|
1147
|
-
}();
|
|
1145
|
+
})();
|
|
1148
1146
|
function ge(e, n) {
|
|
1149
1147
|
for (var t = 0; t < e.length; t++) try {
|
|
1150
1148
|
if (e[t] === n) return t;
|
|
@@ -1152,9 +1150,9 @@ function tr() {
|
|
|
1152
1150
|
}
|
|
1153
1151
|
return -1;
|
|
1154
1152
|
}
|
|
1155
|
-
var
|
|
1153
|
+
var Re = (function() {
|
|
1156
1154
|
function e() {
|
|
1157
|
-
if (this.name = void 0, this.weakmap = void 0, this.keys = void 0, this.values = void 0, this.name = "__weakmap_" + (1e9 * Math.random() >>> 0) + "__", function() {
|
|
1155
|
+
if (this.name = void 0, this.weakmap = void 0, this.keys = void 0, this.values = void 0, this.name = "__weakmap_" + (1e9 * Math.random() >>> 0) + "__", (function() {
|
|
1158
1156
|
if (typeof WeakMap == "undefined" || Object.freeze === void 0) return !1;
|
|
1159
1157
|
try {
|
|
1160
1158
|
var t = /* @__PURE__ */ new WeakMap(), r = {};
|
|
@@ -1162,7 +1160,7 @@ function tr() {
|
|
|
1162
1160
|
} catch (o) {
|
|
1163
1161
|
return !1;
|
|
1164
1162
|
}
|
|
1165
|
-
}()) try {
|
|
1163
|
+
})()) try {
|
|
1166
1164
|
this.weakmap = /* @__PURE__ */ new WeakMap();
|
|
1167
1165
|
} catch (t) {
|
|
1168
1166
|
}
|
|
@@ -1253,7 +1251,7 @@ function tr() {
|
|
|
1253
1251
|
var o = r();
|
|
1254
1252
|
return this.set(t, o), o;
|
|
1255
1253
|
}, e;
|
|
1256
|
-
}();
|
|
1254
|
+
})();
|
|
1257
1255
|
function Ze(e) {
|
|
1258
1256
|
return e.name || e.__name__ || e.displayName || "anonymous";
|
|
1259
1257
|
}
|
|
@@ -1264,33 +1262,33 @@ function tr() {
|
|
|
1264
1262
|
}
|
|
1265
1263
|
return e.__name__ = e.displayName = n, e;
|
|
1266
1264
|
}
|
|
1267
|
-
function
|
|
1265
|
+
function Y() {
|
|
1268
1266
|
var e = "0123456789abcdef";
|
|
1269
|
-
return "uid_" + "xxxxxxxxxx".replace(/./g, function() {
|
|
1267
|
+
return "uid_" + "xxxxxxxxxx".replace(/./g, (function() {
|
|
1270
1268
|
return e.charAt(Math.floor(Math.random() * e.length));
|
|
1271
|
-
}) + "_" + function(n) {
|
|
1272
|
-
if (typeof btoa == "function") return btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g, function(t, r) {
|
|
1269
|
+
})) + "_" + (function(n) {
|
|
1270
|
+
if (typeof btoa == "function") return btoa(encodeURIComponent(n).replace(/%([0-9A-F]{2})/g, (function(t, r) {
|
|
1273
1271
|
return String.fromCharCode(parseInt(r, 16));
|
|
1274
|
-
})).replace(/[=]/g, "");
|
|
1272
|
+
}))).replace(/[=]/g, "");
|
|
1275
1273
|
if (typeof Buffer != "undefined") return Buffer.from(n, "utf8").toString("base64").replace(/[=]/g, "");
|
|
1276
1274
|
throw new Error("Can not find window.btoa or Buffer");
|
|
1277
|
-
}((/* @__PURE__ */ new Date()).toISOString().slice(11, 19).replace("T", ".")).replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
|
1275
|
+
})((/* @__PURE__ */ new Date()).toISOString().slice(11, 19).replace("T", ".")).replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
|
1278
1276
|
}
|
|
1279
1277
|
var ye;
|
|
1280
1278
|
function Xe(e) {
|
|
1281
1279
|
try {
|
|
1282
|
-
return JSON.stringify([].slice.call(e), function(n, t) {
|
|
1283
|
-
return typeof t == "function" ? "memoize[" + function(r) {
|
|
1284
|
-
if (ye = ye || new
|
|
1280
|
+
return JSON.stringify([].slice.call(e), (function(n, t) {
|
|
1281
|
+
return typeof t == "function" ? "memoize[" + (function(r) {
|
|
1282
|
+
if (ye = ye || new Re(), r == null || typeof r != "object" && typeof r != "function") throw new Error("Invalid object");
|
|
1285
1283
|
var o = ye.get(r);
|
|
1286
|
-
return o || (o = typeof r + ":" +
|
|
1287
|
-
}(t) + "]" : typeof window != "undefined" && t instanceof window.Element || t !== null && typeof t == "object" && t.nodeType === 1 && typeof t.style == "object" && typeof t.ownerDocument == "object" ? {} : t;
|
|
1288
|
-
});
|
|
1284
|
+
return o || (o = typeof r + ":" + Y(), ye.set(r, o)), o;
|
|
1285
|
+
})(t) + "]" : typeof window != "undefined" && t instanceof window.Element || t !== null && typeof t == "object" && t.nodeType === 1 && typeof t.style == "object" && typeof t.ownerDocument == "object" ? {} : t;
|
|
1286
|
+
}));
|
|
1289
1287
|
} catch (n) {
|
|
1290
1288
|
throw new Error("Arguments not serializable -- can not be used to memoize");
|
|
1291
1289
|
}
|
|
1292
1290
|
}
|
|
1293
|
-
function
|
|
1291
|
+
function Bt() {
|
|
1294
1292
|
return {};
|
|
1295
1293
|
}
|
|
1296
1294
|
var ue = 0, Qe = 0;
|
|
@@ -1302,7 +1300,7 @@ function tr() {
|
|
|
1302
1300
|
for (var s = arguments.length, w = new Array(s), m = 0; m < s; m++) w[m] = arguments[m];
|
|
1303
1301
|
l < Qe && (i = null, a = null, l = ue, ue += 1);
|
|
1304
1302
|
var p;
|
|
1305
|
-
p = r ? (a = a || new
|
|
1303
|
+
p = r ? (a = a || new Re()).getOrSet(this, Bt) : i = i || {};
|
|
1306
1304
|
var g;
|
|
1307
1305
|
try {
|
|
1308
1306
|
g = Xe(w);
|
|
@@ -1324,22 +1322,22 @@ function tr() {
|
|
|
1324
1322
|
ce.clear = function() {
|
|
1325
1323
|
Qe = ue;
|
|
1326
1324
|
};
|
|
1327
|
-
function
|
|
1325
|
+
function $t(e) {
|
|
1328
1326
|
var n = {};
|
|
1329
1327
|
function t() {
|
|
1330
1328
|
for (var r = arguments, o = this, i = arguments.length, a = new Array(i), l = 0; l < i; l++) a[l] = arguments[l];
|
|
1331
1329
|
var u = Xe(a);
|
|
1332
|
-
return n.hasOwnProperty(u) || (n[u] = P.try(function() {
|
|
1330
|
+
return n.hasOwnProperty(u) || (n[u] = P.try((function() {
|
|
1333
1331
|
return e.apply(o, r);
|
|
1334
|
-
}).finally(function() {
|
|
1332
|
+
})).finally((function() {
|
|
1335
1333
|
delete n[u];
|
|
1336
|
-
})), n[u];
|
|
1334
|
+
}))), n[u];
|
|
1337
1335
|
}
|
|
1338
1336
|
return t.reset = function() {
|
|
1339
1337
|
n = {};
|
|
1340
1338
|
}, Ke(t, Ze(e) + "::promiseMemoized");
|
|
1341
1339
|
}
|
|
1342
|
-
function
|
|
1340
|
+
function te() {
|
|
1343
1341
|
}
|
|
1344
1342
|
function de(e, n) {
|
|
1345
1343
|
if (n === void 0 && (n = 1), n >= 3) return "stringifyError stack overflow";
|
|
@@ -1361,13 +1359,13 @@ function tr() {
|
|
|
1361
1359
|
function et(e) {
|
|
1362
1360
|
return typeof e == "string" ? e : e.toString && typeof e.toString == "function" ? e.toString() : {}.toString.call(e);
|
|
1363
1361
|
}
|
|
1364
|
-
ce(function(e) {
|
|
1362
|
+
ce((function(e) {
|
|
1365
1363
|
if (Object.values) return Object.values(e);
|
|
1366
1364
|
var n = [];
|
|
1367
1365
|
for (var t in e) e.hasOwnProperty(t) && n.push(e[t]);
|
|
1368
1366
|
return n;
|
|
1369
|
-
});
|
|
1370
|
-
function
|
|
1367
|
+
}));
|
|
1368
|
+
function Oe(e) {
|
|
1371
1369
|
return {}.toString.call(e) === "[object RegExp]";
|
|
1372
1370
|
}
|
|
1373
1371
|
function fe(e, n, t) {
|
|
@@ -1386,25 +1384,25 @@ function tr() {
|
|
|
1386
1384
|
function rt() {
|
|
1387
1385
|
return !!document.body && document.readyState === "interactive";
|
|
1388
1386
|
}
|
|
1389
|
-
ce(function() {
|
|
1390
|
-
return new P(function(e) {
|
|
1387
|
+
ce((function() {
|
|
1388
|
+
return new P((function(e) {
|
|
1391
1389
|
if (nt() || rt()) return e();
|
|
1392
|
-
var n = setInterval(function() {
|
|
1390
|
+
var n = setInterval((function() {
|
|
1393
1391
|
if (nt() || rt())
|
|
1394
1392
|
return clearInterval(n), e();
|
|
1395
|
-
}, 10);
|
|
1396
|
-
});
|
|
1397
|
-
});
|
|
1398
|
-
var Ee = typeof document != "undefined" ? document.currentScript : null, Gt = ce(function() {
|
|
1399
|
-
if (Ee || (Ee = function() {
|
|
1393
|
+
}), 10);
|
|
1394
|
+
}));
|
|
1395
|
+
}));
|
|
1396
|
+
var Ee = typeof document != "undefined" ? document.currentScript : null, Gt = ce((function() {
|
|
1397
|
+
if (Ee || (Ee = (function() {
|
|
1400
1398
|
try {
|
|
1401
|
-
var e = function() {
|
|
1399
|
+
var e = (function() {
|
|
1402
1400
|
try {
|
|
1403
1401
|
throw new Error("_");
|
|
1404
1402
|
} catch (a) {
|
|
1405
1403
|
return a.stack || "";
|
|
1406
1404
|
}
|
|
1407
|
-
}(), n = /.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e), t = n && n[1];
|
|
1405
|
+
})(), n = /.*at [^(]*\((.*):(.+):(.+)\)$/gi.exec(e), t = n && n[1];
|
|
1408
1406
|
if (!t) return;
|
|
1409
1407
|
for (var r = 0, o = [].slice.call(document.getElementsByTagName("script")).reverse(); r < o.length; r++) {
|
|
1410
1408
|
var i = o[r];
|
|
@@ -1412,10 +1410,10 @@ function tr() {
|
|
|
1412
1410
|
}
|
|
1413
1411
|
} catch (a) {
|
|
1414
1412
|
}
|
|
1415
|
-
}())) return Ee;
|
|
1413
|
+
})())) return Ee;
|
|
1416
1414
|
throw new Error("Can not determine current script");
|
|
1417
|
-
}), Vt =
|
|
1418
|
-
ce(function() {
|
|
1415
|
+
})), Vt = Y();
|
|
1416
|
+
ce((function() {
|
|
1419
1417
|
var e;
|
|
1420
1418
|
try {
|
|
1421
1419
|
e = Gt();
|
|
@@ -1425,20 +1423,20 @@ function tr() {
|
|
|
1425
1423
|
var n = e.getAttribute("data-uid");
|
|
1426
1424
|
if (n && typeof n == "string" || (n = e.getAttribute("data-uid-auto")) && typeof n == "string") return n;
|
|
1427
1425
|
if (e.src) {
|
|
1428
|
-
var t = function(r) {
|
|
1426
|
+
var t = (function(r) {
|
|
1429
1427
|
for (var o = "", i = 0; i < r.length; i++) {
|
|
1430
1428
|
var a = r[i].charCodeAt(0) * i;
|
|
1431
1429
|
r[i + 1] && (a += r[i + 1].charCodeAt(0) * (i - 1)), o += String.fromCharCode(97 + Math.abs(a) % 26);
|
|
1432
1430
|
}
|
|
1433
1431
|
return o;
|
|
1434
|
-
}(JSON.stringify({
|
|
1432
|
+
})(JSON.stringify({
|
|
1435
1433
|
src: e.src,
|
|
1436
1434
|
dataset: e.dataset
|
|
1437
1435
|
}));
|
|
1438
1436
|
n = "uid_" + t.slice(t.length - 30);
|
|
1439
|
-
} else n =
|
|
1437
|
+
} else n = Y();
|
|
1440
1438
|
return e.setAttribute("data-uid-auto", n), n;
|
|
1441
|
-
});
|
|
1439
|
+
}));
|
|
1442
1440
|
function le(e) {
|
|
1443
1441
|
e === void 0 && (e = window);
|
|
1444
1442
|
var n = "__post_robot_10_0_46__";
|
|
@@ -1448,7 +1446,7 @@ function tr() {
|
|
|
1448
1446
|
return {};
|
|
1449
1447
|
};
|
|
1450
1448
|
function z(e, n) {
|
|
1451
|
-
return e === void 0 && (e = "store"), n === void 0 && (n = ot), fe(le(), e, function() {
|
|
1449
|
+
return e === void 0 && (e = "store"), n === void 0 && (n = ot), fe(le(), e, (function() {
|
|
1452
1450
|
var t = n();
|
|
1453
1451
|
return {
|
|
1454
1452
|
has: function(r) {
|
|
@@ -1473,7 +1471,7 @@ function tr() {
|
|
|
1473
1471
|
return Object.keys(t);
|
|
1474
1472
|
}
|
|
1475
1473
|
};
|
|
1476
|
-
});
|
|
1474
|
+
}));
|
|
1477
1475
|
}
|
|
1478
1476
|
var Jt = function() {
|
|
1479
1477
|
};
|
|
@@ -1482,8 +1480,8 @@ function tr() {
|
|
|
1482
1480
|
return e.WINDOW_WILDCARD = e.WINDOW_WILDCARD || new Jt(), e.WINDOW_WILDCARD;
|
|
1483
1481
|
}
|
|
1484
1482
|
function H(e, n) {
|
|
1485
|
-
return e === void 0 && (e = "store"), n === void 0 && (n = ot), z("windowStore").getOrSet(e, function() {
|
|
1486
|
-
var t = new
|
|
1483
|
+
return e === void 0 && (e = "store"), n === void 0 && (n = ot), z("windowStore").getOrSet(e, (function() {
|
|
1484
|
+
var t = new Re(), r = function(o) {
|
|
1487
1485
|
return t.getOrSet(o, n);
|
|
1488
1486
|
};
|
|
1489
1487
|
return {
|
|
@@ -1504,10 +1502,10 @@ function tr() {
|
|
|
1504
1502
|
return fe(r(o), e, i);
|
|
1505
1503
|
}
|
|
1506
1504
|
};
|
|
1507
|
-
});
|
|
1505
|
+
}));
|
|
1508
1506
|
}
|
|
1509
1507
|
function it() {
|
|
1510
|
-
return z("instance").getOrSet("instanceID",
|
|
1508
|
+
return z("instance").getOrSet("instanceID", Y);
|
|
1511
1509
|
}
|
|
1512
1510
|
function at(e, n) {
|
|
1513
1511
|
var t = n.domain, r = H("helloPromises"), o = r.get(e);
|
|
@@ -1519,13 +1517,13 @@ function tr() {
|
|
|
1519
1517
|
});
|
|
1520
1518
|
return r.set(e, i), i;
|
|
1521
1519
|
}
|
|
1522
|
-
function
|
|
1520
|
+
function Ae(e, n) {
|
|
1523
1521
|
return (0, n.send)(e, "postrobot_hello", {
|
|
1524
1522
|
instanceID: it()
|
|
1525
1523
|
}, {
|
|
1526
1524
|
domain: "*",
|
|
1527
1525
|
timeout: -1
|
|
1528
|
-
}).then(function(t) {
|
|
1526
|
+
}).then((function(t) {
|
|
1529
1527
|
var r = t.origin, o = t.data.instanceID;
|
|
1530
1528
|
return at(e, {
|
|
1531
1529
|
domain: r
|
|
@@ -1534,28 +1532,28 @@ function tr() {
|
|
|
1534
1532
|
domain: r,
|
|
1535
1533
|
instanceID: o
|
|
1536
1534
|
};
|
|
1537
|
-
});
|
|
1535
|
+
}));
|
|
1538
1536
|
}
|
|
1539
1537
|
function st(e, n) {
|
|
1540
1538
|
var t = n.send;
|
|
1541
|
-
return H("windowInstanceIDPromises").getOrSet(e, function() {
|
|
1542
|
-
return
|
|
1539
|
+
return H("windowInstanceIDPromises").getOrSet(e, (function() {
|
|
1540
|
+
return Ae(e, {
|
|
1543
1541
|
send: t
|
|
1544
|
-
}).then(function(r) {
|
|
1542
|
+
}).then((function(r) {
|
|
1545
1543
|
return r.instanceID;
|
|
1546
|
-
});
|
|
1547
|
-
});
|
|
1544
|
+
}));
|
|
1545
|
+
}));
|
|
1548
1546
|
}
|
|
1549
1547
|
function ut(e) {
|
|
1550
1548
|
H("knownWindows").set(e, !0);
|
|
1551
1549
|
}
|
|
1552
|
-
function
|
|
1550
|
+
function Ne(e) {
|
|
1553
1551
|
return typeof e == "object" && e !== null && typeof e.__type__ == "string";
|
|
1554
1552
|
}
|
|
1555
1553
|
function ct(e) {
|
|
1556
1554
|
return e === void 0 ? "undefined" : e === null ? "null" : Array.isArray(e) ? "array" : typeof e == "function" ? "function" : typeof e == "object" ? e instanceof Error ? "error" : typeof e.then == "function" ? "promise" : {}.toString.call(e) === "[object RegExp]" ? "regex" : {}.toString.call(e) === "[object Date]" ? "date" : "object" : typeof e == "string" ? "string" : typeof e == "number" ? "number" : typeof e == "boolean" ? "boolean" : void 0;
|
|
1557
1555
|
}
|
|
1558
|
-
function
|
|
1556
|
+
function ne(e, n) {
|
|
1559
1557
|
return {
|
|
1560
1558
|
__type__: e,
|
|
1561
1559
|
__val__: n
|
|
@@ -1563,7 +1561,7 @@ function tr() {
|
|
|
1563
1561
|
}
|
|
1564
1562
|
var q, Yt = ((q = {}).function = function() {
|
|
1565
1563
|
}, q.error = function(e) {
|
|
1566
|
-
return
|
|
1564
|
+
return ne("error", {
|
|
1567
1565
|
message: e.message,
|
|
1568
1566
|
stack: e.stack,
|
|
1569
1567
|
code: e.code,
|
|
@@ -1571,9 +1569,9 @@ function tr() {
|
|
|
1571
1569
|
});
|
|
1572
1570
|
}, q.promise = function() {
|
|
1573
1571
|
}, q.regex = function(e) {
|
|
1574
|
-
return
|
|
1572
|
+
return ne("regex", e.source);
|
|
1575
1573
|
}, q.date = function(e) {
|
|
1576
|
-
return
|
|
1574
|
+
return ne("date", e.toJSON());
|
|
1577
1575
|
}, q.array = function(e) {
|
|
1578
1576
|
return e;
|
|
1579
1577
|
}, q.object = function(e) {
|
|
@@ -1587,98 +1585,98 @@ function tr() {
|
|
|
1587
1585
|
}, q.null = function(e) {
|
|
1588
1586
|
return e;
|
|
1589
1587
|
}, q[void 0] = function(e) {
|
|
1590
|
-
return
|
|
1591
|
-
}, q), Zt = {},
|
|
1588
|
+
return ne("undefined", e);
|
|
1589
|
+
}, q), Zt = {}, B, Kt = ((B = {}).function = function() {
|
|
1592
1590
|
throw new Error("Function serialization is not implemented; nothing to deserialize");
|
|
1593
|
-
},
|
|
1591
|
+
}, B.error = function(e) {
|
|
1594
1592
|
var n = e.stack, t = e.code, r = e.data, o = new Error(e.message);
|
|
1595
1593
|
return o.code = t, r && (o.data = r), o.stack = n + `
|
|
1596
1594
|
|
|
1597
1595
|
` + o.stack, o;
|
|
1598
|
-
},
|
|
1596
|
+
}, B.promise = function() {
|
|
1599
1597
|
throw new Error("Promise serialization is not implemented; nothing to deserialize");
|
|
1600
|
-
},
|
|
1598
|
+
}, B.regex = function(e) {
|
|
1601
1599
|
return new RegExp(e);
|
|
1602
|
-
},
|
|
1600
|
+
}, B.date = function(e) {
|
|
1603
1601
|
return new Date(e);
|
|
1604
|
-
},
|
|
1602
|
+
}, B.array = function(e) {
|
|
1605
1603
|
return e;
|
|
1606
|
-
},
|
|
1604
|
+
}, B.object = function(e) {
|
|
1607
1605
|
return e;
|
|
1608
|
-
},
|
|
1606
|
+
}, B.string = function(e) {
|
|
1609
1607
|
return e;
|
|
1610
|
-
},
|
|
1608
|
+
}, B.number = function(e) {
|
|
1611
1609
|
return e;
|
|
1612
|
-
},
|
|
1610
|
+
}, B.boolean = function(e) {
|
|
1613
1611
|
return e;
|
|
1614
|
-
},
|
|
1612
|
+
}, B.null = function(e) {
|
|
1615
1613
|
return e;
|
|
1616
|
-
},
|
|
1617
|
-
},
|
|
1618
|
-
new P(function(e) {
|
|
1614
|
+
}, B[void 0] = function() {
|
|
1615
|
+
}, B), Xt = {};
|
|
1616
|
+
new P((function(e) {
|
|
1619
1617
|
if (window.document && window.document.body) return e(window.document.body);
|
|
1620
|
-
var n = setInterval(function() {
|
|
1618
|
+
var n = setInterval((function() {
|
|
1621
1619
|
if (window.document && window.document.body)
|
|
1622
1620
|
return clearInterval(n), e(window.document.body);
|
|
1623
|
-
}, 10);
|
|
1624
|
-
});
|
|
1625
|
-
function
|
|
1621
|
+
}), 10);
|
|
1622
|
+
}));
|
|
1623
|
+
function De() {
|
|
1626
1624
|
for (var e = z("idToProxyWindow"), n = 0, t = e.keys(); n < t.length; n++) {
|
|
1627
1625
|
var r = t[n];
|
|
1628
1626
|
e.get(r).shouldClean() && e.del(r);
|
|
1629
1627
|
}
|
|
1630
1628
|
}
|
|
1631
1629
|
function dt(e, n) {
|
|
1632
|
-
var t = n.send, r = n.id, o = r === void 0 ?
|
|
1633
|
-
if (
|
|
1634
|
-
}), a = e.then(function(u) {
|
|
1630
|
+
var t = n.send, r = n.id, o = r === void 0 ? Y() : r, i = e.then((function(u) {
|
|
1631
|
+
if (Q(u)) return ve(u).name;
|
|
1632
|
+
})), a = e.then((function(u) {
|
|
1635
1633
|
if (G(u)) throw new Error("Window is closed, can not determine type");
|
|
1636
|
-
return
|
|
1637
|
-
});
|
|
1638
|
-
i.catch(
|
|
1634
|
+
return X(u) ? "popup" : "iframe";
|
|
1635
|
+
}));
|
|
1636
|
+
i.catch(te), a.catch(te);
|
|
1639
1637
|
var l = function() {
|
|
1640
|
-
return e.then(function(u) {
|
|
1641
|
-
if (!G(u)) return
|
|
1642
|
-
});
|
|
1638
|
+
return e.then((function(u) {
|
|
1639
|
+
if (!G(u)) return Q(u) ? ve(u).name : i;
|
|
1640
|
+
}));
|
|
1643
1641
|
};
|
|
1644
1642
|
return {
|
|
1645
1643
|
id: o,
|
|
1646
1644
|
getType: function() {
|
|
1647
1645
|
return a;
|
|
1648
1646
|
},
|
|
1649
|
-
getInstanceID:
|
|
1650
|
-
return e.then(function(u) {
|
|
1647
|
+
getInstanceID: $t((function() {
|
|
1648
|
+
return e.then((function(u) {
|
|
1651
1649
|
return st(u, {
|
|
1652
1650
|
send: t
|
|
1653
1651
|
});
|
|
1654
|
-
});
|
|
1655
|
-
}),
|
|
1652
|
+
}));
|
|
1653
|
+
})),
|
|
1656
1654
|
close: function() {
|
|
1657
1655
|
return e.then(qt);
|
|
1658
1656
|
},
|
|
1659
1657
|
getName: l,
|
|
1660
1658
|
focus: function() {
|
|
1661
|
-
return e.then(function(u) {
|
|
1659
|
+
return e.then((function(u) {
|
|
1662
1660
|
u.focus();
|
|
1663
|
-
});
|
|
1661
|
+
}));
|
|
1664
1662
|
},
|
|
1665
1663
|
isClosed: function() {
|
|
1666
|
-
return e.then(function(u) {
|
|
1664
|
+
return e.then((function(u) {
|
|
1667
1665
|
return G(u);
|
|
1668
|
-
});
|
|
1666
|
+
}));
|
|
1669
1667
|
},
|
|
1670
1668
|
setLocation: function(u, s) {
|
|
1671
|
-
return s === void 0 && (s = {}), e.then(function(w) {
|
|
1669
|
+
return s === void 0 && (s = {}), e.then((function(w) {
|
|
1672
1670
|
var m = window.location.protocol + "//" + window.location.host, p = s.method, g = p === void 0 ? "get" : p, I = s.body;
|
|
1673
1671
|
if (u.indexOf("/") === 0) u = "" + m + u;
|
|
1674
1672
|
else if (!u.match(/^https?:\/\//) && u.indexOf(m) !== 0) throw new Error("Expected url to be http or https url, or absolute path, got " + JSON.stringify(u));
|
|
1675
|
-
if (g === "post") return l().then(function(x) {
|
|
1673
|
+
if (g === "post") return l().then((function(x) {
|
|
1676
1674
|
if (!x) throw new Error("Can not post to window without target name");
|
|
1677
1675
|
(function(b) {
|
|
1678
|
-
var C = b.url,
|
|
1679
|
-
if (W.setAttribute("target",
|
|
1680
|
-
var
|
|
1681
|
-
|
|
1676
|
+
var C = b.url, M = b.target, R = b.body, T = b.method, L = T === void 0 ? "post" : T, W = document.createElement("form");
|
|
1677
|
+
if (W.setAttribute("target", M), W.setAttribute("method", L), W.setAttribute("action", C), W.style.display = "none", R) for (var O = 0, V = Object.keys(R); O < V.length; O++) {
|
|
1678
|
+
var j, he = V[O], Le = document.createElement("input");
|
|
1679
|
+
Le.setAttribute("name", he), Le.setAttribute("value", (j = R[he]) == null ? void 0 : j.toString()), W.appendChild(Le);
|
|
1682
1680
|
}
|
|
1683
1681
|
tt().appendChild(W), W.submit(), tt().removeChild(W);
|
|
1684
1682
|
})({
|
|
@@ -1687,9 +1685,9 @@ function tr() {
|
|
|
1687
1685
|
method: g,
|
|
1688
1686
|
body: I
|
|
1689
1687
|
});
|
|
1690
|
-
});
|
|
1688
|
+
}));
|
|
1691
1689
|
if (g !== "get") throw new Error("Unsupported method: " + g);
|
|
1692
|
-
if (
|
|
1690
|
+
if (Q(w)) try {
|
|
1693
1691
|
if (w.location && typeof w.location.replace == "function") {
|
|
1694
1692
|
w.location.replace(u);
|
|
1695
1693
|
return;
|
|
@@ -1697,18 +1695,18 @@ function tr() {
|
|
|
1697
1695
|
} catch (x) {
|
|
1698
1696
|
}
|
|
1699
1697
|
w.location = u;
|
|
1700
|
-
});
|
|
1698
|
+
}));
|
|
1701
1699
|
},
|
|
1702
1700
|
setName: function(u) {
|
|
1703
|
-
return e.then(function(s) {
|
|
1704
|
-
var w =
|
|
1701
|
+
return e.then((function(s) {
|
|
1702
|
+
var w = Q(s), m = Ve(s);
|
|
1705
1703
|
if (!w) throw new Error("Can not set name for cross-domain window: " + u);
|
|
1706
1704
|
ve(s).name = u, m && m.setAttribute("name", u), i = P.resolve(u);
|
|
1707
|
-
});
|
|
1705
|
+
}));
|
|
1708
1706
|
}
|
|
1709
1707
|
};
|
|
1710
1708
|
}
|
|
1711
|
-
var
|
|
1709
|
+
var $ = (function() {
|
|
1712
1710
|
function e(t) {
|
|
1713
1711
|
var r = t.send, o = t.win, i = t.serializedWindow;
|
|
1714
1712
|
this.id = void 0, this.isProxyWindow = !0, this.serializedWindow = void 0, this.actualWindow = void 0, this.actualWindowPromise = void 0, this.send = void 0, this.name = void 0, this.actualWindowPromise = new P(), this.serializedWindow = i || dt(this.actualWindowPromise, {
|
|
@@ -1723,37 +1721,37 @@ function tr() {
|
|
|
1723
1721
|
}, n.getType = function() {
|
|
1724
1722
|
return this.serializedWindow.getType();
|
|
1725
1723
|
}, n.isPopup = function() {
|
|
1726
|
-
return this.getType().then(function(t) {
|
|
1724
|
+
return this.getType().then((function(t) {
|
|
1727
1725
|
return t === "popup";
|
|
1728
|
-
});
|
|
1726
|
+
}));
|
|
1729
1727
|
}, n.setLocation = function(t, r) {
|
|
1730
1728
|
var o = this;
|
|
1731
|
-
return this.serializedWindow.setLocation(t, r).then(function() {
|
|
1729
|
+
return this.serializedWindow.setLocation(t, r).then((function() {
|
|
1732
1730
|
return o;
|
|
1733
|
-
});
|
|
1731
|
+
}));
|
|
1734
1732
|
}, n.getName = function() {
|
|
1735
1733
|
return this.serializedWindow.getName();
|
|
1736
1734
|
}, n.setName = function(t) {
|
|
1737
1735
|
var r = this;
|
|
1738
|
-
return this.serializedWindow.setName(t).then(function() {
|
|
1736
|
+
return this.serializedWindow.setName(t).then((function() {
|
|
1739
1737
|
return r;
|
|
1740
|
-
});
|
|
1738
|
+
}));
|
|
1741
1739
|
}, n.close = function() {
|
|
1742
1740
|
var t = this;
|
|
1743
|
-
return this.serializedWindow.close().then(function() {
|
|
1741
|
+
return this.serializedWindow.close().then((function() {
|
|
1744
1742
|
return t;
|
|
1745
|
-
});
|
|
1743
|
+
}));
|
|
1746
1744
|
}, n.focus = function() {
|
|
1747
1745
|
var t = this, r = this.isPopup(), o = this.getName(), i = P.hash({
|
|
1748
1746
|
isPopup: r,
|
|
1749
1747
|
name: o
|
|
1750
|
-
}).then(function(l) {
|
|
1748
|
+
}).then((function(l) {
|
|
1751
1749
|
var u = l.name;
|
|
1752
1750
|
l.isPopup && u && window.open("", u, "noopener");
|
|
1753
|
-
}), a = this.serializedWindow.focus();
|
|
1754
|
-
return P.all([i, a]).then(function() {
|
|
1751
|
+
})), a = this.serializedWindow.focus();
|
|
1752
|
+
return P.all([i, a]).then((function() {
|
|
1755
1753
|
return t;
|
|
1756
|
-
});
|
|
1754
|
+
}));
|
|
1757
1755
|
}, n.isClosed = function() {
|
|
1758
1756
|
return this.serializedWindow.isClosed();
|
|
1759
1757
|
}, n.getWindow = function() {
|
|
@@ -1768,19 +1766,19 @@ function tr() {
|
|
|
1768
1766
|
return this.actualWindowPromise;
|
|
1769
1767
|
}, n.matchWindow = function(t, r) {
|
|
1770
1768
|
var o = this, i = r.send;
|
|
1771
|
-
return P.try(function() {
|
|
1769
|
+
return P.try((function() {
|
|
1772
1770
|
return o.actualWindow ? t === o.actualWindow : P.hash({
|
|
1773
1771
|
proxyInstanceID: o.getInstanceID(),
|
|
1774
1772
|
knownWindowInstanceID: st(t, {
|
|
1775
1773
|
send: i
|
|
1776
1774
|
})
|
|
1777
|
-
}).then(function(a) {
|
|
1775
|
+
}).then((function(a) {
|
|
1778
1776
|
var l = a.proxyInstanceID === a.knownWindowInstanceID;
|
|
1779
1777
|
return l && o.setWindow(t, {
|
|
1780
1778
|
send: i
|
|
1781
1779
|
}), l;
|
|
1782
|
-
});
|
|
1783
|
-
});
|
|
1780
|
+
}));
|
|
1781
|
+
}));
|
|
1784
1782
|
}, n.unwrap = function() {
|
|
1785
1783
|
return this.actualWindow || this;
|
|
1786
1784
|
}, n.getInstanceID = function() {
|
|
@@ -1793,12 +1791,12 @@ function tr() {
|
|
|
1793
1791
|
return e.isProxyWindow(t) ? t.unwrap() : t;
|
|
1794
1792
|
}, e.serialize = function(t, r) {
|
|
1795
1793
|
var o = r.send;
|
|
1796
|
-
return
|
|
1794
|
+
return De(), e.toProxyWindow(t, {
|
|
1797
1795
|
send: o
|
|
1798
1796
|
}).serialize();
|
|
1799
1797
|
}, e.deserialize = function(t, r) {
|
|
1800
1798
|
var o = r.send;
|
|
1801
|
-
return
|
|
1799
|
+
return De(), z("idToProxyWindow").get(t.id) || new e({
|
|
1802
1800
|
serializedWindow: t,
|
|
1803
1801
|
send: o
|
|
1804
1802
|
});
|
|
@@ -1806,24 +1804,24 @@ function tr() {
|
|
|
1806
1804
|
return !!(t && !we(t) && t.isProxyWindow);
|
|
1807
1805
|
}, e.toProxyWindow = function(t, r) {
|
|
1808
1806
|
var o = r.send;
|
|
1809
|
-
if (
|
|
1807
|
+
if (De(), e.isProxyWindow(t)) return t;
|
|
1810
1808
|
var i = t;
|
|
1811
1809
|
return H("winToProxyWindow").get(i) || new e({
|
|
1812
1810
|
win: i,
|
|
1813
1811
|
send: o
|
|
1814
1812
|
});
|
|
1815
1813
|
}, e;
|
|
1816
|
-
}();
|
|
1817
|
-
function
|
|
1814
|
+
})();
|
|
1815
|
+
function je(e, n, t, r, o) {
|
|
1818
1816
|
var i = H("methodStore"), a = z("proxyWindowMethods");
|
|
1819
|
-
|
|
1817
|
+
$.isProxyWindow(r) ? a.set(e, {
|
|
1820
1818
|
val: n,
|
|
1821
1819
|
name: t,
|
|
1822
1820
|
domain: o,
|
|
1823
1821
|
source: r
|
|
1824
|
-
}) : (a.del(e), i.getOrSet(r, function() {
|
|
1822
|
+
}) : (a.del(e), i.getOrSet(r, (function() {
|
|
1825
1823
|
return {};
|
|
1826
|
-
})[e] = {
|
|
1824
|
+
}))[e] = {
|
|
1827
1825
|
domain: o,
|
|
1828
1826
|
name: t,
|
|
1829
1827
|
val: n,
|
|
@@ -1832,89 +1830,89 @@ function tr() {
|
|
|
1832
1830
|
}
|
|
1833
1831
|
function ft(e, n) {
|
|
1834
1832
|
var t = H("methodStore"), r = z("proxyWindowMethods");
|
|
1835
|
-
return t.getOrSet(e, function() {
|
|
1833
|
+
return t.getOrSet(e, (function() {
|
|
1836
1834
|
return {};
|
|
1837
|
-
})[n] || r.get(n);
|
|
1835
|
+
}))[n] || r.get(n);
|
|
1838
1836
|
}
|
|
1839
1837
|
function lt(e, n, t, r, o) {
|
|
1840
1838
|
a = (i = {
|
|
1841
1839
|
on: o.on,
|
|
1842
1840
|
send: o.send
|
|
1843
|
-
}).on, l = i.send, z("builtinListeners").getOrSet("functionCalls", function() {
|
|
1841
|
+
}).on, l = i.send, z("builtinListeners").getOrSet("functionCalls", (function() {
|
|
1844
1842
|
return a("postrobot_method", {
|
|
1845
1843
|
domain: "*"
|
|
1846
|
-
}, function(w) {
|
|
1844
|
+
}, (function(w) {
|
|
1847
1845
|
var m = w.source, p = w.origin, g = w.data, I = g.id, x = g.name, b = ft(m, I);
|
|
1848
1846
|
if (!b) throw new Error("Could not find method '" + x + "' with id: " + g.id + " in " + F(window));
|
|
1849
|
-
var C = b.source,
|
|
1850
|
-
return P.try(function() {
|
|
1851
|
-
if (!
|
|
1852
|
-
if (
|
|
1847
|
+
var C = b.source, M = b.domain, R = b.val;
|
|
1848
|
+
return P.try((function() {
|
|
1849
|
+
if (!oe(M, p)) throw new Error("Method '" + g.name + "' domain " + JSON.stringify(Oe(b.domain) ? b.domain.source : b.domain) + " does not match origin " + p + " in " + F(window));
|
|
1850
|
+
if ($.isProxyWindow(C)) return C.matchWindow(m, {
|
|
1853
1851
|
send: l
|
|
1854
|
-
}).then(function(T) {
|
|
1852
|
+
}).then((function(T) {
|
|
1855
1853
|
if (!T) throw new Error("Method call '" + g.name + "' failed - proxy window does not match source in " + F(window));
|
|
1856
|
-
});
|
|
1857
|
-
}).then(function() {
|
|
1854
|
+
}));
|
|
1855
|
+
})).then((function() {
|
|
1858
1856
|
return R.apply({
|
|
1859
1857
|
source: m,
|
|
1860
1858
|
origin: p
|
|
1861
1859
|
}, g.args);
|
|
1862
|
-
}, function(T) {
|
|
1863
|
-
return P.try(function() {
|
|
1860
|
+
}), (function(T) {
|
|
1861
|
+
return P.try((function() {
|
|
1864
1862
|
if (R.onError) return R.onError(T);
|
|
1865
|
-
}).then(function() {
|
|
1866
|
-
throw T.stack && (T.stack = "Remote call to " + x + "(" + function(L) {
|
|
1867
|
-
return L === void 0 && (L = []), (W = L, [].slice.call(W)).map(function(O) {
|
|
1863
|
+
})).then((function() {
|
|
1864
|
+
throw T.stack && (T.stack = "Remote call to " + x + "(" + (function(L) {
|
|
1865
|
+
return L === void 0 && (L = []), (W = L, [].slice.call(W)).map((function(O) {
|
|
1868
1866
|
return typeof O == "string" ? "'" + O + "'" : O === void 0 ? "undefined" : O === null ? "null" : typeof O == "boolean" ? O.toString() : Array.isArray(O) ? "[ ... ]" : typeof O == "object" ? "{ ... }" : typeof O == "function" ? "() => { ... }" : "<" + typeof O + ">";
|
|
1869
|
-
}).join(", ");
|
|
1867
|
+
})).join(", ");
|
|
1870
1868
|
var W;
|
|
1871
|
-
}(g.args) + `) failed
|
|
1869
|
+
})(g.args) + `) failed
|
|
1872
1870
|
|
|
1873
1871
|
` + T.stack), T;
|
|
1874
|
-
});
|
|
1875
|
-
}).then(function(T) {
|
|
1872
|
+
}));
|
|
1873
|
+
})).then((function(T) {
|
|
1876
1874
|
return {
|
|
1877
1875
|
result: T,
|
|
1878
1876
|
id: I,
|
|
1879
1877
|
name: x
|
|
1880
1878
|
};
|
|
1881
|
-
});
|
|
1882
|
-
});
|
|
1883
|
-
});
|
|
1884
|
-
var i, a, l, u = t.__id__ ||
|
|
1885
|
-
e =
|
|
1879
|
+
}));
|
|
1880
|
+
}));
|
|
1881
|
+
}));
|
|
1882
|
+
var i, a, l, u = t.__id__ || Y();
|
|
1883
|
+
e = $.unwrap(e);
|
|
1886
1884
|
var s = t.__name__ || t.name || r;
|
|
1887
|
-
return typeof s == "string" && typeof s.indexOf == "function" && s.indexOf("anonymous::") === 0 && (s = s.replace("anonymous::", r + "::")),
|
|
1888
|
-
|
|
1889
|
-
})) :
|
|
1885
|
+
return typeof s == "string" && typeof s.indexOf == "function" && s.indexOf("anonymous::") === 0 && (s = s.replace("anonymous::", r + "::")), $.isProxyWindow(e) ? (je(u, t, s, e, n), e.awaitWindow().then((function(w) {
|
|
1886
|
+
je(u, t, s, w, n);
|
|
1887
|
+
}))) : je(u, t, s, e, n), ne("cross_domain_function", {
|
|
1890
1888
|
id: u,
|
|
1891
1889
|
name: s
|
|
1892
1890
|
});
|
|
1893
1891
|
}
|
|
1894
1892
|
function ht(e, n, t, r) {
|
|
1895
1893
|
var o, i = r.on, a = r.send;
|
|
1896
|
-
return function(l, u) {
|
|
1894
|
+
return (function(l, u) {
|
|
1897
1895
|
u === void 0 && (u = Zt);
|
|
1898
|
-
var s = JSON.stringify(l, function(w) {
|
|
1896
|
+
var s = JSON.stringify(l, (function(w) {
|
|
1899
1897
|
var m = this[w];
|
|
1900
|
-
if (
|
|
1898
|
+
if (Ne(this)) return m;
|
|
1901
1899
|
var p = ct(m);
|
|
1902
1900
|
if (!p) return m;
|
|
1903
1901
|
var g = u[p] || Yt[p];
|
|
1904
1902
|
return g ? g(m, w) : m;
|
|
1905
|
-
});
|
|
1903
|
+
}));
|
|
1906
1904
|
return s === void 0 ? "undefined" : s;
|
|
1907
|
-
}(t, ((o = {}).promise = function(l, u) {
|
|
1908
|
-
return function(s, w, m, p, g) {
|
|
1909
|
-
return
|
|
1910
|
-
then: lt(s, w, function(I, x) {
|
|
1905
|
+
})(t, ((o = {}).promise = function(l, u) {
|
|
1906
|
+
return (function(s, w, m, p, g) {
|
|
1907
|
+
return ne("cross_domain_zalgo_promise", {
|
|
1908
|
+
then: lt(s, w, (function(I, x) {
|
|
1911
1909
|
return m.then(I, x);
|
|
1912
|
-
}, p, {
|
|
1910
|
+
}), p, {
|
|
1913
1911
|
on: g.on,
|
|
1914
1912
|
send: g.send
|
|
1915
1913
|
})
|
|
1916
1914
|
});
|
|
1917
|
-
}(e, n, l, u, {
|
|
1915
|
+
})(e, n, l, u, {
|
|
1918
1916
|
on: i,
|
|
1919
1917
|
send: a
|
|
1920
1918
|
});
|
|
@@ -1924,40 +1922,40 @@ function tr() {
|
|
|
1924
1922
|
send: a
|
|
1925
1923
|
});
|
|
1926
1924
|
}, o.object = function(l) {
|
|
1927
|
-
return we(l) ||
|
|
1925
|
+
return we(l) || $.isProxyWindow(l) ? ne("cross_domain_window", $.serialize(l, {
|
|
1928
1926
|
send: a
|
|
1929
1927
|
})) : l;
|
|
1930
1928
|
}, o));
|
|
1931
1929
|
}
|
|
1932
1930
|
function mt(e, n, t, r) {
|
|
1933
1931
|
var o, i = r.send;
|
|
1934
|
-
return function(a, l) {
|
|
1935
|
-
if (l === void 0 && (l = Xt), a !== "undefined") return JSON.parse(a, function(u, s) {
|
|
1936
|
-
if (
|
|
1932
|
+
return (function(a, l) {
|
|
1933
|
+
if (l === void 0 && (l = Xt), a !== "undefined") return JSON.parse(a, (function(u, s) {
|
|
1934
|
+
if (Ne(this)) return s;
|
|
1937
1935
|
var w, m;
|
|
1938
|
-
if (
|
|
1936
|
+
if (Ne(s) ? (w = s.__type__, m = s.__val__) : (w = ct(s), m = s), !w) return m;
|
|
1939
1937
|
var p = l[w] || Kt[w];
|
|
1940
1938
|
return p ? p(m, u) : m;
|
|
1941
|
-
});
|
|
1942
|
-
}(t, ((o = {}).cross_domain_zalgo_promise = function(a) {
|
|
1943
|
-
return function(l, u, s) {
|
|
1939
|
+
}));
|
|
1940
|
+
})(t, ((o = {}).cross_domain_zalgo_promise = function(a) {
|
|
1941
|
+
return (function(l, u, s) {
|
|
1944
1942
|
return new P(s.then);
|
|
1945
|
-
}(0, 0, a);
|
|
1943
|
+
})(0, 0, a);
|
|
1946
1944
|
}, o.cross_domain_function = function(a) {
|
|
1947
|
-
return function(l, u, s, w) {
|
|
1945
|
+
return (function(l, u, s, w) {
|
|
1948
1946
|
var m = s.id, p = s.name, g = w.send, I = function(b) {
|
|
1949
1947
|
b === void 0 && (b = {});
|
|
1950
1948
|
function C() {
|
|
1951
|
-
var
|
|
1952
|
-
return
|
|
1949
|
+
var M = arguments;
|
|
1950
|
+
return $.toProxyWindow(l, {
|
|
1953
1951
|
send: g
|
|
1954
|
-
}).awaitWindow().then(function(R) {
|
|
1952
|
+
}).awaitWindow().then((function(R) {
|
|
1955
1953
|
var T = ft(R, m);
|
|
1956
1954
|
if (T && T.val !== C) return T.val.apply({
|
|
1957
1955
|
source: window,
|
|
1958
1956
|
origin: F()
|
|
1959
|
-
},
|
|
1960
|
-
var L = [].slice.call(
|
|
1957
|
+
}, M);
|
|
1958
|
+
var L = [].slice.call(M);
|
|
1961
1959
|
return b.fireAndForget ? g(R, "postrobot_method", {
|
|
1962
1960
|
id: m,
|
|
1963
1961
|
name: p,
|
|
@@ -1972,23 +1970,23 @@ function tr() {
|
|
|
1972
1970
|
}, {
|
|
1973
1971
|
domain: u,
|
|
1974
1972
|
fireAndForget: !1
|
|
1975
|
-
}).then(function(W) {
|
|
1973
|
+
}).then((function(W) {
|
|
1976
1974
|
return W.data.result;
|
|
1977
|
-
});
|
|
1978
|
-
}).catch(function(R) {
|
|
1975
|
+
}));
|
|
1976
|
+
})).catch((function(R) {
|
|
1979
1977
|
throw R;
|
|
1980
|
-
});
|
|
1978
|
+
}));
|
|
1981
1979
|
}
|
|
1982
1980
|
return C.__name__ = p, C.__origin__ = u, C.__source__ = l, C.__id__ = m, C.origin = u, C;
|
|
1983
1981
|
}, x = I();
|
|
1984
1982
|
return x.fireAndForget = I({
|
|
1985
1983
|
fireAndForget: !0
|
|
1986
1984
|
}), x;
|
|
1987
|
-
}(e, n, a, {
|
|
1985
|
+
})(e, n, a, {
|
|
1988
1986
|
send: i
|
|
1989
1987
|
});
|
|
1990
1988
|
}, o.cross_domain_window = function(a) {
|
|
1991
|
-
return
|
|
1989
|
+
return $.deserialize(a, {
|
|
1992
1990
|
send: i
|
|
1993
1991
|
});
|
|
1994
1992
|
}, o));
|
|
@@ -1997,13 +1995,13 @@ function tr() {
|
|
|
1997
1995
|
Me.postrobot_post_message = function(e, n, t) {
|
|
1998
1996
|
t.indexOf("file:") === 0 && (t = "*"), e.postMessage(n, t);
|
|
1999
1997
|
};
|
|
2000
|
-
function
|
|
1998
|
+
function ze(e, n, t, r) {
|
|
2001
1999
|
var o = r.on, i = r.send;
|
|
2002
|
-
return P.try(function() {
|
|
2003
|
-
var a = H().getOrSet(e, function() {
|
|
2000
|
+
return P.try((function() {
|
|
2001
|
+
var a = H().getOrSet(e, (function() {
|
|
2004
2002
|
return {};
|
|
2005
|
-
});
|
|
2006
|
-
return a.buffer = a.buffer || [], a.buffer.push(t), a.flush = a.flush || P.flush().then(function() {
|
|
2003
|
+
}));
|
|
2004
|
+
return a.buffer = a.buffer || [], a.buffer.push(t), a.flush = a.flush || P.flush().then((function() {
|
|
2007
2005
|
if (G(e)) throw new Error("Window is closed");
|
|
2008
2006
|
var l = ht(e, n, ((u = {}).__post_robot_10_0_46__ = a.buffer || [], u), {
|
|
2009
2007
|
on: o,
|
|
@@ -2020,15 +2018,15 @@ function tr() {
|
|
|
2020
2018
|
}
|
|
2021
2019
|
if (w.length === s.length) throw new Error(`All post-robot messaging strategies failed:
|
|
2022
2020
|
|
|
2023
|
-
` + w.map(function(g, I) {
|
|
2021
|
+
` + w.map((function(g, I) {
|
|
2024
2022
|
return I + ". " + de(g);
|
|
2025
|
-
}).join(`
|
|
2023
|
+
})).join(`
|
|
2026
2024
|
|
|
2027
2025
|
`));
|
|
2028
|
-
}), a.flush.then(function() {
|
|
2026
|
+
})), a.flush.then((function() {
|
|
2029
2027
|
delete a.flush;
|
|
2030
|
-
});
|
|
2031
|
-
}).then(
|
|
2028
|
+
}));
|
|
2029
|
+
})).then(te);
|
|
2032
2030
|
}
|
|
2033
2031
|
function pt(e) {
|
|
2034
2032
|
return z("responseListeners").get(e);
|
|
@@ -2053,7 +2051,7 @@ function tr() {
|
|
|
2053
2051
|
if (s[r]) return s[r];
|
|
2054
2052
|
if (s.__domain_regex__) for (var w = 0, m = s.__domain_regex__; w < m.length; w++) {
|
|
2055
2053
|
var p = m[w], g = p.listener;
|
|
2056
|
-
if (
|
|
2054
|
+
if (oe(p.regex, r)) return g;
|
|
2057
2055
|
}
|
|
2058
2056
|
}
|
|
2059
2057
|
if (s["*"]) return s["*"];
|
|
@@ -2069,10 +2067,10 @@ function tr() {
|
|
|
2069
2067
|
domain: n
|
|
2070
2068
|
}), l = t.name === "postrobot_method" && t.data && typeof t.data.name == "string" ? t.data.name + "()" : t.name;
|
|
2071
2069
|
function u(s, w, m) {
|
|
2072
|
-
return P.flush().then(function() {
|
|
2070
|
+
return P.flush().then((function() {
|
|
2073
2071
|
if (!t.fireAndForget && !G(e)) try {
|
|
2074
|
-
return
|
|
2075
|
-
id:
|
|
2072
|
+
return ze(e, n, {
|
|
2073
|
+
id: Y(),
|
|
2076
2074
|
origin: F(window),
|
|
2077
2075
|
type: "postrobot_message_response",
|
|
2078
2076
|
hash: t.hash,
|
|
@@ -2089,12 +2087,12 @@ function tr() {
|
|
|
2089
2087
|
|
|
2090
2088
|
` + de(p));
|
|
2091
2089
|
}
|
|
2092
|
-
});
|
|
2090
|
+
}));
|
|
2093
2091
|
}
|
|
2094
|
-
return P.all([P.flush().then(function() {
|
|
2092
|
+
return P.all([P.flush().then((function() {
|
|
2095
2093
|
if (!t.fireAndForget && !G(e)) try {
|
|
2096
|
-
return
|
|
2097
|
-
id:
|
|
2094
|
+
return ze(e, n, {
|
|
2095
|
+
id: Y(),
|
|
2098
2096
|
origin: F(window),
|
|
2099
2097
|
type: "postrobot_message_ack",
|
|
2100
2098
|
hash: t.hash,
|
|
@@ -2108,28 +2106,28 @@ function tr() {
|
|
|
2108
2106
|
|
|
2109
2107
|
` + de(s));
|
|
2110
2108
|
}
|
|
2111
|
-
}), P.try(function() {
|
|
2109
|
+
})), P.try((function() {
|
|
2112
2110
|
if (!a) throw new Error("No handler found for post message: " + t.name + " from " + n + " in " + window.location.protocol + "//" + window.location.host + window.location.pathname);
|
|
2113
2111
|
return a.handler({
|
|
2114
2112
|
source: e,
|
|
2115
2113
|
origin: n,
|
|
2116
2114
|
data: t.data
|
|
2117
2115
|
});
|
|
2118
|
-
}).then(function(s) {
|
|
2116
|
+
})).then((function(s) {
|
|
2119
2117
|
return u("success", s);
|
|
2120
|
-
}, function(s) {
|
|
2118
|
+
}), (function(s) {
|
|
2121
2119
|
return u("error", null, s);
|
|
2122
|
-
})]).then(
|
|
2120
|
+
}))]).then(te).catch((function(s) {
|
|
2123
2121
|
if (a && a.handleError) return a.handleError(s);
|
|
2124
2122
|
throw s;
|
|
2125
|
-
});
|
|
2123
|
+
}));
|
|
2126
2124
|
}
|
|
2127
2125
|
function en(e, n, t) {
|
|
2128
2126
|
if (!wt(t.hash)) {
|
|
2129
2127
|
var r = pt(t.hash);
|
|
2130
2128
|
if (!r) throw new Error("No handler found for post message ack for message: " + t.name + " from " + n + " in " + window.location.protocol + "//" + window.location.host + window.location.pathname);
|
|
2131
2129
|
try {
|
|
2132
|
-
if (!
|
|
2130
|
+
if (!oe(r.domain, n)) throw new Error("Ack origin " + n + " does not match domain " + r.domain.toString());
|
|
2133
2131
|
if (e !== r.win) throw new Error("Ack source does not match registered window");
|
|
2134
2132
|
} catch (o) {
|
|
2135
2133
|
r.promise.reject(o);
|
|
@@ -2141,7 +2139,7 @@ function tr() {
|
|
|
2141
2139
|
if (!wt(t.hash)) {
|
|
2142
2140
|
var r = pt(t.hash);
|
|
2143
2141
|
if (!r) throw new Error("No handler found for post message response for message: " + t.name + " from " + n + " in " + window.location.protocol + "//" + window.location.host + window.location.pathname);
|
|
2144
|
-
if (!
|
|
2142
|
+
if (!oe(r.domain, n)) throw new Error("Response origin " + n + " does not match domain " + (o = r.domain, Array.isArray(o) ? "(" + o.join(" | ") + ")" : y(o) ? "RegExp(" + o.toString() + ")" : o.toString()));
|
|
2145
2143
|
var o;
|
|
2146
2144
|
if (e !== r.win) throw new Error("Response source does not match registered window");
|
|
2147
2145
|
vt(t.hash), t.ack === "error" ? r.promise.reject(t.error) : t.ack === "success" && r.promise.resolve({
|
|
@@ -2158,21 +2156,21 @@ function tr() {
|
|
|
2158
2156
|
} catch (w) {
|
|
2159
2157
|
return;
|
|
2160
2158
|
}
|
|
2161
|
-
var i = e.source, a = e.origin, l = function(w, m, p, g) {
|
|
2159
|
+
var i = e.source, a = e.origin, l = (function(w, m, p, g) {
|
|
2162
2160
|
var I = g.on, x = g.send, b;
|
|
2163
2161
|
try {
|
|
2164
2162
|
b = mt(m, p, w, {
|
|
2165
2163
|
on: I,
|
|
2166
2164
|
send: x
|
|
2167
2165
|
});
|
|
2168
|
-
} catch (
|
|
2166
|
+
} catch (M) {
|
|
2169
2167
|
return;
|
|
2170
2168
|
}
|
|
2171
2169
|
if (b && typeof b == "object" && b !== null) {
|
|
2172
2170
|
var C = b.__post_robot_10_0_46__;
|
|
2173
2171
|
if (Array.isArray(C)) return C;
|
|
2174
2172
|
}
|
|
2175
|
-
}(e.data, i, a, {
|
|
2173
|
+
})(e.data, i, a, {
|
|
2176
2174
|
on: t,
|
|
2177
2175
|
send: r
|
|
2178
2176
|
});
|
|
@@ -2188,32 +2186,32 @@ function tr() {
|
|
|
2188
2186
|
send: r
|
|
2189
2187
|
}) : s.type === "postrobot_message_response" ? tn(i, a, s) : s.type === "postrobot_message_ack" && en(i, a, s);
|
|
2190
2188
|
} catch (w) {
|
|
2191
|
-
setTimeout(function() {
|
|
2189
|
+
setTimeout((function() {
|
|
2192
2190
|
throw w;
|
|
2193
|
-
}, 0);
|
|
2191
|
+
}), 0);
|
|
2194
2192
|
}
|
|
2195
2193
|
}
|
|
2196
2194
|
}
|
|
2197
2195
|
}
|
|
2198
|
-
function
|
|
2196
|
+
function re(e, n, t) {
|
|
2199
2197
|
if (!e) throw new Error("Expected name");
|
|
2200
2198
|
if (typeof (n = n || {}) == "function" && (t = n, n = {}), !t) throw new Error("Expected handler");
|
|
2201
|
-
var r = function o(i, a) {
|
|
2199
|
+
var r = (function o(i, a) {
|
|
2202
2200
|
var l = i.name, u = i.win, s = i.domain, w = H("requestListeners");
|
|
2203
2201
|
if (!l || typeof l != "string") throw new Error("Name required to add request listener");
|
|
2204
|
-
if (u && u !== "*" &&
|
|
2205
|
-
var m = u.awaitWindow().then(function(
|
|
2202
|
+
if (u && u !== "*" && $.isProxyWindow(u)) {
|
|
2203
|
+
var m = u.awaitWindow().then((function(j) {
|
|
2206
2204
|
return o({
|
|
2207
2205
|
name: l,
|
|
2208
|
-
win:
|
|
2206
|
+
win: j,
|
|
2209
2207
|
domain: s
|
|
2210
2208
|
}, a);
|
|
2211
|
-
});
|
|
2209
|
+
}));
|
|
2212
2210
|
return {
|
|
2213
2211
|
cancel: function() {
|
|
2214
|
-
m.then(function(
|
|
2215
|
-
return
|
|
2216
|
-
},
|
|
2212
|
+
m.then((function(j) {
|
|
2213
|
+
return j.cancel();
|
|
2214
|
+
}), te);
|
|
2217
2215
|
}
|
|
2218
2216
|
};
|
|
2219
2217
|
}
|
|
@@ -2226,19 +2224,19 @@ function tr() {
|
|
|
2226
2224
|
}, a));
|
|
2227
2225
|
return {
|
|
2228
2226
|
cancel: function() {
|
|
2229
|
-
for (var
|
|
2227
|
+
for (var j = 0; j < g.length; j++) g[j].cancel();
|
|
2230
2228
|
}
|
|
2231
2229
|
};
|
|
2232
2230
|
}
|
|
2233
2231
|
if (Array.isArray(s)) {
|
|
2234
|
-
for (var b = [], C = 0,
|
|
2232
|
+
for (var b = [], C = 0, M = s; C < M.length; C++) b.push(o({
|
|
2235
2233
|
name: l,
|
|
2236
2234
|
win: p,
|
|
2237
|
-
domain:
|
|
2235
|
+
domain: M[C]
|
|
2238
2236
|
}, a));
|
|
2239
2237
|
return {
|
|
2240
2238
|
cancel: function() {
|
|
2241
|
-
for (var
|
|
2239
|
+
for (var j = 0; j < b.length; j++) b[j].cancel();
|
|
2242
2240
|
}
|
|
2243
2241
|
};
|
|
2244
2242
|
}
|
|
@@ -2250,14 +2248,14 @@ function tr() {
|
|
|
2250
2248
|
p && p !== "*" || (p = Se());
|
|
2251
2249
|
var T = (s = s || "*").toString();
|
|
2252
2250
|
if (R) throw p && s ? new Error("Request listener already exists for " + l + " on domain " + s.toString() + " for " + (p === Se() ? "wildcard" : "specified") + " window") : p ? new Error("Request listener already exists for " + l + " for " + (p === Se() ? "wildcard" : "specified") + " window") : s ? new Error("Request listener already exists for " + l + " on domain " + s.toString()) : new Error("Request listener already exists for " + l);
|
|
2253
|
-
var L = w.getOrSet(p, function() {
|
|
2251
|
+
var L = w.getOrSet(p, (function() {
|
|
2254
2252
|
return {};
|
|
2255
|
-
}), W = fe(L, l, function() {
|
|
2253
|
+
})), W = fe(L, l, (function() {
|
|
2256
2254
|
return {};
|
|
2257
|
-
}), O, V;
|
|
2258
|
-
return
|
|
2255
|
+
})), O, V;
|
|
2256
|
+
return Oe(s) ? (O = fe(W, "__domain_regex__", (function() {
|
|
2259
2257
|
return [];
|
|
2260
|
-
})).push(V = {
|
|
2258
|
+
}))).push(V = {
|
|
2261
2259
|
regex: s,
|
|
2262
2260
|
listener: a
|
|
2263
2261
|
}) : W[T] = a, {
|
|
@@ -2265,7 +2263,7 @@ function tr() {
|
|
|
2265
2263
|
delete W[T], V && (O.splice(O.indexOf(V, 1)), O.length || delete W.__domain_regex__), Object.keys(W).length || delete L[l], p && !Object.keys(L).length && w.del(p);
|
|
2266
2264
|
}
|
|
2267
2265
|
};
|
|
2268
|
-
}({
|
|
2266
|
+
})({
|
|
2269
2267
|
name: e,
|
|
2270
2268
|
win: n.window,
|
|
2271
2269
|
domain: n.domain || "*"
|
|
@@ -2286,24 +2284,24 @@ function tr() {
|
|
|
2286
2284
|
var r = new P(), o;
|
|
2287
2285
|
return n.errorHandler = function(i) {
|
|
2288
2286
|
o.cancel(), r.reject(i);
|
|
2289
|
-
}, o =
|
|
2287
|
+
}, o = re(e, n, (function(i) {
|
|
2290
2288
|
if (o.cancel(), r.resolve(i), t) return t(i);
|
|
2291
|
-
}), r.cancel = o.cancel, r;
|
|
2289
|
+
})), r.cancel = o.cancel, r;
|
|
2292
2290
|
}
|
|
2293
2291
|
var K = function e(n, t, r, o) {
|
|
2294
2292
|
var i = (o = o || {}).domain || "*", a = o.timeout || -1, l = o.timeout || 5e3, u = o.fireAndForget || !1;
|
|
2295
|
-
return
|
|
2293
|
+
return $.toProxyWindow(n, {
|
|
2296
2294
|
send: e
|
|
2297
|
-
}).awaitWindow().then(function(s) {
|
|
2298
|
-
return P.try(function() {
|
|
2299
|
-
if (function(w, m, p) {
|
|
2295
|
+
}).awaitWindow().then((function(s) {
|
|
2296
|
+
return P.try((function() {
|
|
2297
|
+
if ((function(w, m, p) {
|
|
2300
2298
|
if (!w) throw new Error("Expected name");
|
|
2301
|
-
if (typeof p != "string" && !Array.isArray(p) && !
|
|
2299
|
+
if (typeof p != "string" && !Array.isArray(p) && !Oe(p)) throw new TypeError("Can not send " + w + ". Expected domain " + JSON.stringify(p) + " to be a string, array, or regex");
|
|
2302
2300
|
if (G(m)) throw new Error("Can not send " + w + ". Target window is closed");
|
|
2303
|
-
}(t, s, i), function(w, m) {
|
|
2301
|
+
})(t, s, i), (function(w, m) {
|
|
2304
2302
|
var p = Ge(m);
|
|
2305
2303
|
if (p) return p === w;
|
|
2306
|
-
if (m === w || function(x) {
|
|
2304
|
+
if (m === w || (function(x) {
|
|
2307
2305
|
x === void 0 && (x = window);
|
|
2308
2306
|
try {
|
|
2309
2307
|
if (x.top) return x.top;
|
|
@@ -2311,60 +2309,60 @@ function tr() {
|
|
|
2311
2309
|
}
|
|
2312
2310
|
if (k(x) === x) return x;
|
|
2313
2311
|
try {
|
|
2314
|
-
if (
|
|
2312
|
+
if (Be(window, x) && window.top) return window.top;
|
|
2315
2313
|
} catch (R) {
|
|
2316
2314
|
}
|
|
2317
2315
|
try {
|
|
2318
|
-
if (
|
|
2316
|
+
if (Be(x, window) && window.top) return window.top;
|
|
2319
2317
|
} catch (R) {
|
|
2320
2318
|
}
|
|
2321
|
-
for (var b = 0, C = function R(T) {
|
|
2322
|
-
for (var L = [], W = 0, O =
|
|
2319
|
+
for (var b = 0, C = (function R(T) {
|
|
2320
|
+
for (var L = [], W = 0, O = $e(T); W < O.length; W++) {
|
|
2323
2321
|
var V = O[W];
|
|
2324
2322
|
L.push(V);
|
|
2325
|
-
for (var
|
|
2323
|
+
for (var j = 0, he = R(V); j < he.length; j++) L.push(he[j]);
|
|
2326
2324
|
}
|
|
2327
2325
|
return L;
|
|
2328
|
-
}(x); b < C.length; b++) {
|
|
2329
|
-
var
|
|
2326
|
+
})(x); b < C.length; b++) {
|
|
2327
|
+
var M = C[b];
|
|
2330
2328
|
try {
|
|
2331
|
-
if (
|
|
2329
|
+
if (M.top) return M.top;
|
|
2332
2330
|
} catch (R) {
|
|
2333
2331
|
}
|
|
2334
|
-
if (k(
|
|
2332
|
+
if (k(M) === M) return M;
|
|
2335
2333
|
}
|
|
2336
|
-
}(m) === m) return !1;
|
|
2337
|
-
for (var g = 0, I =
|
|
2334
|
+
})(m) === m) return !1;
|
|
2335
|
+
for (var g = 0, I = $e(w); g < I.length; g++) if (I[g] === m) return !0;
|
|
2338
2336
|
return !1;
|
|
2339
|
-
}(window, s)) return function(w, m, p) {
|
|
2337
|
+
})(window, s)) return (function(w, m, p) {
|
|
2340
2338
|
m === void 0 && (m = 5e3), p === void 0 && (p = "Window");
|
|
2341
|
-
var g = function(I) {
|
|
2342
|
-
return H("helloPromises").getOrSet(I, function() {
|
|
2339
|
+
var g = (function(I) {
|
|
2340
|
+
return H("helloPromises").getOrSet(I, (function() {
|
|
2343
2341
|
return new P();
|
|
2344
|
-
});
|
|
2345
|
-
}(w);
|
|
2342
|
+
}));
|
|
2343
|
+
})(w);
|
|
2346
2344
|
return m !== -1 && (g = g.timeout(m, new Error(p + " did not load after " + m + "ms"))), g;
|
|
2347
|
-
}(s, l);
|
|
2348
|
-
}).then(function(w) {
|
|
2349
|
-
return function(m, p, g, I) {
|
|
2345
|
+
})(s, l);
|
|
2346
|
+
})).then((function(w) {
|
|
2347
|
+
return (function(m, p, g, I) {
|
|
2350
2348
|
var x = I.send;
|
|
2351
|
-
return P.try(function() {
|
|
2352
|
-
return typeof p == "string" ? p : P.try(function() {
|
|
2353
|
-
return g ||
|
|
2349
|
+
return P.try((function() {
|
|
2350
|
+
return typeof p == "string" ? p : P.try((function() {
|
|
2351
|
+
return g || Ae(m, {
|
|
2354
2352
|
send: x
|
|
2355
|
-
}).then(function(b) {
|
|
2353
|
+
}).then((function(b) {
|
|
2356
2354
|
return b.domain;
|
|
2357
|
-
});
|
|
2358
|
-
}).then(function(b) {
|
|
2359
|
-
if (!
|
|
2355
|
+
}));
|
|
2356
|
+
})).then((function(b) {
|
|
2357
|
+
if (!oe(p, p)) throw new Error("Domain " + et(p) + " does not match " + et(p));
|
|
2360
2358
|
return b;
|
|
2361
|
-
});
|
|
2362
|
-
});
|
|
2363
|
-
}(s, i, (w === void 0 ? {} : w).domain, {
|
|
2359
|
+
}));
|
|
2360
|
+
}));
|
|
2361
|
+
})(s, i, (w === void 0 ? {} : w).domain, {
|
|
2364
2362
|
send: e
|
|
2365
2363
|
});
|
|
2366
|
-
}).then(function(w) {
|
|
2367
|
-
var m = w, p = t === "postrobot_method" && r && typeof r.name == "string" ? r.name + "()" : t, g = new P(), I = t + "_" +
|
|
2364
|
+
})).then((function(w) {
|
|
2365
|
+
var m = w, p = t === "postrobot_method" && r && typeof r.name == "string" ? r.name + "()" : t, g = new P(), I = t + "_" + Y();
|
|
2368
2366
|
if (!u) {
|
|
2369
2367
|
var x = {
|
|
2370
2368
|
name: t,
|
|
@@ -2375,38 +2373,38 @@ function tr() {
|
|
|
2375
2373
|
(function(W, O) {
|
|
2376
2374
|
z("responseListeners").set(W, O);
|
|
2377
2375
|
})(I, x);
|
|
2378
|
-
var b = H("requestPromises").getOrSet(s, function() {
|
|
2376
|
+
var b = H("requestPromises").getOrSet(s, (function() {
|
|
2379
2377
|
return [];
|
|
2380
|
-
});
|
|
2381
|
-
b.push(g), g.catch(function() {
|
|
2378
|
+
}));
|
|
2379
|
+
b.push(g), g.catch((function() {
|
|
2382
2380
|
(function(W) {
|
|
2383
2381
|
z("erroredResponseListeners").set(W, !0);
|
|
2384
2382
|
})(I), vt(I);
|
|
2385
|
-
});
|
|
2386
|
-
var C = function(W) {
|
|
2383
|
+
}));
|
|
2384
|
+
var C = (function(W) {
|
|
2387
2385
|
return H("knownWindows").get(W, !1);
|
|
2388
|
-
}(s) ? 1e4 : 2e3,
|
|
2386
|
+
})(s) ? 1e4 : 2e3, M = a, R = C, T = M, L = (function(W, O) {
|
|
2389
2387
|
var V;
|
|
2390
|
-
return function
|
|
2391
|
-
V = setTimeout(function() {
|
|
2388
|
+
return (function j() {
|
|
2389
|
+
V = setTimeout((function() {
|
|
2392
2390
|
(function() {
|
|
2393
2391
|
if (G(s)) return g.reject(new Error("Window closed for " + t + " before " + (x.ack ? "response" : "ack")));
|
|
2394
2392
|
if (x.cancelled) return g.reject(new Error("Response listener was cancelled for " + t));
|
|
2395
|
-
R = Math.max(R - 500, 0), T !== -1 && (T = Math.max(T - 500, 0)), x.ack || R !== 0 ? T === 0 && g.reject(new Error("No response for postMessage " + p + " in " + F() + " in " +
|
|
2396
|
-
})(),
|
|
2397
|
-
}, 500);
|
|
2398
|
-
}(), {
|
|
2393
|
+
R = Math.max(R - 500, 0), T !== -1 && (T = Math.max(T - 500, 0)), x.ack || R !== 0 ? T === 0 && g.reject(new Error("No response for postMessage " + p + " in " + F() + " in " + M + "ms")) : g.reject(new Error("No ack for postMessage " + p + " in " + F() + " in " + C + "ms"));
|
|
2394
|
+
})(), j();
|
|
2395
|
+
}), 500);
|
|
2396
|
+
})(), {
|
|
2399
2397
|
cancel: function() {
|
|
2400
2398
|
clearTimeout(V);
|
|
2401
2399
|
}
|
|
2402
2400
|
};
|
|
2403
|
-
}();
|
|
2404
|
-
g.finally(function() {
|
|
2401
|
+
})();
|
|
2402
|
+
g.finally((function() {
|
|
2405
2403
|
L.cancel(), b.splice(b.indexOf(g, 1));
|
|
2406
|
-
}).catch(
|
|
2404
|
+
})).catch(te);
|
|
2407
2405
|
}
|
|
2408
|
-
return
|
|
2409
|
-
id:
|
|
2406
|
+
return ze(s, m, {
|
|
2407
|
+
id: Y(),
|
|
2410
2408
|
origin: F(window),
|
|
2411
2409
|
type: "postrobot_message_request",
|
|
2412
2410
|
hash: I,
|
|
@@ -2414,21 +2412,21 @@ function tr() {
|
|
|
2414
2412
|
data: r,
|
|
2415
2413
|
fireAndForget: u
|
|
2416
2414
|
}, {
|
|
2417
|
-
on:
|
|
2415
|
+
on: re,
|
|
2418
2416
|
send: e
|
|
2419
|
-
}).then(function() {
|
|
2417
|
+
}).then((function() {
|
|
2420
2418
|
return u ? g.resolve() : g;
|
|
2421
|
-
}, function(W) {
|
|
2419
|
+
}), (function(W) {
|
|
2422
2420
|
throw new Error("Send request message failed for " + p + " in " + F() + `
|
|
2423
2421
|
|
|
2424
2422
|
` + de(W));
|
|
2425
|
-
});
|
|
2426
|
-
});
|
|
2427
|
-
});
|
|
2423
|
+
}));
|
|
2424
|
+
}));
|
|
2425
|
+
}));
|
|
2428
2426
|
};
|
|
2429
2427
|
function rn(e, n, t) {
|
|
2430
2428
|
return ht(e, n, t, {
|
|
2431
|
-
on:
|
|
2429
|
+
on: re,
|
|
2432
2430
|
send: K
|
|
2433
2431
|
});
|
|
2434
2432
|
}
|
|
@@ -2438,38 +2436,38 @@ function tr() {
|
|
|
2438
2436
|
});
|
|
2439
2437
|
}
|
|
2440
2438
|
function an(e) {
|
|
2441
|
-
return new
|
|
2439
|
+
return new $({
|
|
2442
2440
|
send: K,
|
|
2443
2441
|
win: e
|
|
2444
2442
|
});
|
|
2445
2443
|
}
|
|
2446
2444
|
function sn(e) {
|
|
2447
|
-
return
|
|
2445
|
+
return $.toProxyWindow(e, {
|
|
2448
2446
|
send: K
|
|
2449
2447
|
});
|
|
2450
2448
|
}
|
|
2451
2449
|
function Et() {
|
|
2452
2450
|
le().initialized || (le().initialized = !0, n = (e = {
|
|
2453
|
-
on:
|
|
2451
|
+
on: re,
|
|
2454
2452
|
send: K
|
|
2455
2453
|
}).on, t = e.send, (r = le()).receiveMessage = r.receiveMessage || function(o) {
|
|
2456
2454
|
return yt(o, {
|
|
2457
2455
|
on: n,
|
|
2458
2456
|
send: t
|
|
2459
2457
|
});
|
|
2460
|
-
}, function(o) {
|
|
2458
|
+
}, (function(o) {
|
|
2461
2459
|
var i = o.on, a = o.send;
|
|
2462
|
-
z().getOrSet("postMessageListener", function() {
|
|
2463
|
-
return function(l, u, s) {
|
|
2460
|
+
z().getOrSet("postMessageListener", (function() {
|
|
2461
|
+
return (function(l, u, s) {
|
|
2464
2462
|
return l.addEventListener("message", s), {
|
|
2465
2463
|
cancel: function() {
|
|
2466
2464
|
l.removeEventListener("message", s);
|
|
2467
2465
|
}
|
|
2468
2466
|
};
|
|
2469
|
-
}(window, 0, function(l) {
|
|
2467
|
+
})(window, 0, (function(l) {
|
|
2470
2468
|
(function(u, s) {
|
|
2471
2469
|
var w = s.on, m = s.send;
|
|
2472
|
-
P.try(function() {
|
|
2470
|
+
P.try((function() {
|
|
2473
2471
|
var p = u.source || u.sourceElement, g = u.origin || u.originalEvent && u.originalEvent.origin, I = u.data;
|
|
2474
2472
|
if (g === "null" && (g = "file://"), p) {
|
|
2475
2473
|
if (!g) throw new Error("Post message did not have origin domain");
|
|
@@ -2482,35 +2480,35 @@ function tr() {
|
|
|
2482
2480
|
send: m
|
|
2483
2481
|
});
|
|
2484
2482
|
}
|
|
2485
|
-
});
|
|
2483
|
+
}));
|
|
2486
2484
|
})(l, {
|
|
2487
2485
|
on: i,
|
|
2488
2486
|
send: a
|
|
2489
2487
|
});
|
|
2490
|
-
});
|
|
2491
|
-
});
|
|
2492
|
-
}({
|
|
2493
|
-
on:
|
|
2488
|
+
}));
|
|
2489
|
+
}));
|
|
2490
|
+
})({
|
|
2491
|
+
on: re,
|
|
2494
2492
|
send: K
|
|
2495
|
-
}), function(o) {
|
|
2493
|
+
}), (function(o) {
|
|
2496
2494
|
var i = o.on, a = o.send;
|
|
2497
|
-
z("builtinListeners").getOrSet("helloListener", function() {
|
|
2495
|
+
z("builtinListeners").getOrSet("helloListener", (function() {
|
|
2498
2496
|
var l = i("postrobot_hello", {
|
|
2499
2497
|
domain: "*"
|
|
2500
|
-
}, function(s) {
|
|
2498
|
+
}, (function(s) {
|
|
2501
2499
|
return at(s.source, {
|
|
2502
2500
|
domain: s.origin
|
|
2503
2501
|
}), {
|
|
2504
2502
|
instanceID: it()
|
|
2505
2503
|
};
|
|
2506
|
-
}), u = Ge();
|
|
2507
|
-
return u &&
|
|
2504
|
+
})), u = Ge();
|
|
2505
|
+
return u && Ae(u, {
|
|
2508
2506
|
send: a
|
|
2509
|
-
}).catch(function(s) {
|
|
2510
|
-
}), l;
|
|
2511
|
-
});
|
|
2512
|
-
}({
|
|
2513
|
-
on:
|
|
2507
|
+
}).catch((function(s) {
|
|
2508
|
+
})), l;
|
|
2509
|
+
}));
|
|
2510
|
+
})({
|
|
2511
|
+
on: re,
|
|
2514
2512
|
send: K
|
|
2515
2513
|
}));
|
|
2516
2514
|
var e, n, t, r;
|
|
@@ -2527,18 +2525,18 @@ function tr() {
|
|
|
2527
2525
|
}
|
|
2528
2526
|
var cn = !0;
|
|
2529
2527
|
function dn(e) {
|
|
2530
|
-
for (var n = 0, t = H("requestPromises").get(e, []); n < t.length; n++) t[n].reject(new Error("Window " + (G(e) ? "closed" : "cleaned up") + " before response")).catch(
|
|
2528
|
+
for (var n = 0, t = H("requestPromises").get(e, []); n < t.length; n++) t[n].reject(new Error("Window " + (G(e) ? "closed" : "cleaned up") + " before response")).catch(te);
|
|
2531
2529
|
}
|
|
2532
2530
|
Et();
|
|
2533
2531
|
}]);
|
|
2534
|
-
});
|
|
2535
|
-
}(xe)), xe.exports;
|
|
2532
|
+
}));
|
|
2533
|
+
})(xe)), xe.exports;
|
|
2536
2534
|
}
|
|
2537
|
-
var
|
|
2535
|
+
var jt;
|
|
2538
2536
|
function nr() {
|
|
2539
|
-
return
|
|
2537
|
+
return jt || (jt = 1, (function(c) {
|
|
2540
2538
|
c.exports = tr(), c.exports.default = c.exports;
|
|
2541
|
-
}(
|
|
2539
|
+
})(Ue)), Ue.exports;
|
|
2542
2540
|
}
|
|
2543
2541
|
var Ft = nr();
|
|
2544
2542
|
const rr = /* @__PURE__ */ Qn(Ft), qe = /* @__PURE__ */ gn({
|
|
@@ -2550,6 +2548,6 @@ export {
|
|
|
2550
2548
|
ir as PrivacyCenterBox,
|
|
2551
2549
|
ar as SoyioTypes,
|
|
2552
2550
|
sr as SoyioWidget,
|
|
2553
|
-
|
|
2551
|
+
He as _TooltipManager,
|
|
2554
2552
|
sr as default
|
|
2555
2553
|
};
|