@persona/relay 0.1.3 → 0.1.4
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.d.ts +4 -4
- package/dist/relay.cjs +2 -2
- package/dist/relay.cjs.map +1 -1
- package/dist/relay.js +124 -117
- package/dist/relay.js.map +1 -1
- package/dist/relay.umd.js +3 -3
- package/dist/relay.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/relay.js
CHANGED
|
@@ -169,7 +169,7 @@ var Ue, Vr;
|
|
|
169
169
|
function _e() {
|
|
170
170
|
if (Vr) return Ue;
|
|
171
171
|
Vr = 1;
|
|
172
|
-
var e = typeof Map == "function" && Map.prototype, i = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, u = e && i && typeof i.get == "function" ? i.get : null, l = e && Map.prototype.forEach, g = typeof Set == "function" && Set.prototype, w = Object.getOwnPropertyDescriptor && g ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, R = g && w && typeof w.get == "function" ? w.get : null, v = g && Set.prototype.forEach, O = typeof WeakMap == "function" && WeakMap.prototype, p = O ? WeakMap.prototype.has : null, m = typeof WeakSet == "function" && WeakSet.prototype, y = m ? WeakSet.prototype.has : null, M = typeof WeakRef == "function" && WeakRef.prototype, A = M ? WeakRef.prototype.deref : null, a = Boolean.prototype.valueOf, f = Object.prototype.toString, o = Function.prototype.toString, I = String.prototype.match, h = String.prototype.slice, S = String.prototype.replace, D = String.prototype.toUpperCase, P = String.prototype.toLowerCase, b = RegExp.prototype.test, n = Array.prototype.concat, c = Array.prototype.join, d = Array.prototype.slice, E = Math.floor, _ = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, x = Object.getOwnPropertySymbols, U = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, F = typeof Symbol == "function" && typeof Symbol.iterator == "object",
|
|
172
|
+
var e = typeof Map == "function" && Map.prototype, i = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, u = e && i && typeof i.get == "function" ? i.get : null, l = e && Map.prototype.forEach, g = typeof Set == "function" && Set.prototype, w = Object.getOwnPropertyDescriptor && g ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, R = g && w && typeof w.get == "function" ? w.get : null, v = g && Set.prototype.forEach, O = typeof WeakMap == "function" && WeakMap.prototype, p = O ? WeakMap.prototype.has : null, m = typeof WeakSet == "function" && WeakSet.prototype, y = m ? WeakSet.prototype.has : null, M = typeof WeakRef == "function" && WeakRef.prototype, A = M ? WeakRef.prototype.deref : null, a = Boolean.prototype.valueOf, f = Object.prototype.toString, o = Function.prototype.toString, I = String.prototype.match, h = String.prototype.slice, S = String.prototype.replace, D = String.prototype.toUpperCase, P = String.prototype.toLowerCase, b = RegExp.prototype.test, n = Array.prototype.concat, c = Array.prototype.join, d = Array.prototype.slice, E = Math.floor, _ = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, x = Object.getOwnPropertySymbols, U = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, F = typeof Symbol == "function" && typeof Symbol.iterator == "object", z = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === F || !0) ? Symbol.toStringTag : null, $ = Object.prototype.propertyIsEnumerable, G = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(r) {
|
|
173
173
|
return r.__proto__;
|
|
174
174
|
} : null);
|
|
175
175
|
function s(r, t) {
|
|
@@ -179,13 +179,13 @@ function _e() {
|
|
|
179
179
|
if (typeof r == "number") {
|
|
180
180
|
var B = r < 0 ? -E(-r) : E(r);
|
|
181
181
|
if (B !== r) {
|
|
182
|
-
var
|
|
183
|
-
return S.call(
|
|
182
|
+
var W = String(B), q = h.call(t, W.length + 1);
|
|
183
|
+
return S.call(W, N, "$&_") + "." + S.call(S.call(q, /([0-9]{3})/g, "$&_"), /_$/, "");
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
return S.call(t, N, "$&_");
|
|
187
187
|
}
|
|
188
|
-
var
|
|
188
|
+
var L = pn, K = L.custom, X = Q(K) ? K : null, ie = {
|
|
189
189
|
__proto__: null,
|
|
190
190
|
double: '"',
|
|
191
191
|
single: "'"
|
|
@@ -194,7 +194,7 @@ function _e() {
|
|
|
194
194
|
double: /(["\\])/g,
|
|
195
195
|
single: /(['\\])/g
|
|
196
196
|
};
|
|
197
|
-
Ue = function r(t, N, B,
|
|
197
|
+
Ue = function r(t, N, B, W) {
|
|
198
198
|
var q = N || {};
|
|
199
199
|
if (J(q, "quoteStyle") && !J(ie, q.quoteStyle))
|
|
200
200
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
@@ -230,22 +230,22 @@ function _e() {
|
|
|
230
230
|
if (typeof B > "u" && (B = 0), B >= Fe && Fe > 0 && typeof t == "object")
|
|
231
231
|
return fe(t) ? "[Array]" : "[Object]";
|
|
232
232
|
var we = en(q, B);
|
|
233
|
-
if (typeof
|
|
234
|
-
|
|
235
|
-
else if (ce(
|
|
233
|
+
if (typeof W > "u")
|
|
234
|
+
W = [];
|
|
235
|
+
else if (ce(W, t) >= 0)
|
|
236
236
|
return "[Circular]";
|
|
237
237
|
function ne(Se, Ie, tn) {
|
|
238
|
-
if (Ie && (
|
|
238
|
+
if (Ie && (W = d.call(W), W.push(Ie)), tn) {
|
|
239
239
|
var Hr = {
|
|
240
240
|
depth: q.depth
|
|
241
241
|
};
|
|
242
|
-
return J(q, "quoteStyle") && (Hr.quoteStyle = q.quoteStyle), r(Se, Hr, B + 1,
|
|
242
|
+
return J(q, "quoteStyle") && (Hr.quoteStyle = q.quoteStyle), r(Se, Hr, B + 1, W);
|
|
243
243
|
}
|
|
244
|
-
return r(Se, q, B + 1,
|
|
244
|
+
return r(Se, q, B + 1, W);
|
|
245
245
|
}
|
|
246
246
|
if (typeof t == "function" && !j(t)) {
|
|
247
|
-
var
|
|
248
|
-
return "[Function" + (
|
|
247
|
+
var Tr = ve(t), Br = Re(t, ne);
|
|
248
|
+
return "[Function" + (Tr ? ": " + Tr : " (anonymous)") + "]" + (Br.length > 0 ? " { " + c.call(Br, ", ") + " }" : "");
|
|
249
249
|
}
|
|
250
250
|
if (Q(t)) {
|
|
251
251
|
var Ur = F ? S.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : U.call(t);
|
|
@@ -267,22 +267,22 @@ function _e() {
|
|
|
267
267
|
return !("cause" in Error.prototype) && "cause" in t && !$.call(t, "cause") ? "{ [" + String(t) + "] " + c.call(n.call("[cause]: " + ne(t.cause), $e), ", ") + " }" : $e.length === 0 ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + c.call($e, ", ") + " }";
|
|
268
268
|
}
|
|
269
269
|
if (typeof t == "object" && se) {
|
|
270
|
-
if (X && typeof t[X] == "function" &&
|
|
271
|
-
return
|
|
270
|
+
if (X && typeof t[X] == "function" && L)
|
|
271
|
+
return L(t, { depth: Fe - B });
|
|
272
272
|
if (se !== "symbol" && typeof t.inspect == "function")
|
|
273
273
|
return t.inspect();
|
|
274
274
|
}
|
|
275
275
|
if (te(t)) {
|
|
276
|
-
var
|
|
276
|
+
var Wr = [];
|
|
277
277
|
return l && l.call(t, function(Se, Ie) {
|
|
278
|
-
|
|
279
|
-
}),
|
|
278
|
+
Wr.push(ne(Ie, t, !0) + " => " + ne(Se, t));
|
|
279
|
+
}), Lr("Map", u.call(t), Wr, we);
|
|
280
280
|
}
|
|
281
281
|
if (ge(t)) {
|
|
282
|
-
var
|
|
282
|
+
var zr = [];
|
|
283
283
|
return v && v.call(t, function(Se) {
|
|
284
|
-
|
|
285
|
-
}),
|
|
284
|
+
zr.push(ne(Se, t));
|
|
285
|
+
}), Lr("Set", R.call(t), zr, we);
|
|
286
286
|
}
|
|
287
287
|
if (he(t))
|
|
288
288
|
return qe("WeakMap");
|
|
@@ -290,7 +290,7 @@ function _e() {
|
|
|
290
290
|
return qe("WeakSet");
|
|
291
291
|
if (me(t))
|
|
292
292
|
return qe("WeakRef");
|
|
293
|
-
if (
|
|
293
|
+
if (T(t))
|
|
294
294
|
return Ee(ne(Number(t)));
|
|
295
295
|
if (ee(t))
|
|
296
296
|
return Ee(ne(_.call(t)));
|
|
@@ -303,20 +303,20 @@ function _e() {
|
|
|
303
303
|
if (typeof globalThis < "u" && t === globalThis || typeof Kr < "u" && t === Kr)
|
|
304
304
|
return "{ [object globalThis] }";
|
|
305
305
|
if (!ue(t) && !j(t)) {
|
|
306
|
-
var Ne = Re(t, ne), kr = G ? G(t) === Object.prototype : t instanceof Object || t.constructor === Object,
|
|
307
|
-
return Ne.length === 0 ?
|
|
306
|
+
var Ne = Re(t, ne), kr = G ? G(t) === Object.prototype : t instanceof Object || t.constructor === Object, Le = t instanceof Object ? "" : "null prototype", Gr = !kr && z && Object(t) === t && z in t ? h.call(re(t), 8, -1) : Le ? "Object" : "", rn = kr || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "", Te = rn + (Gr || Le ? "[" + c.call(n.call([], Gr || [], Le || []), ": ") + "] " : "");
|
|
307
|
+
return Ne.length === 0 ? Te + "{}" : we ? Te + "{" + Me(Ne, we) + "}" : Te + "{ " + c.call(Ne, ", ") + " }";
|
|
308
308
|
}
|
|
309
309
|
return String(t);
|
|
310
310
|
};
|
|
311
311
|
function le(r, t, N) {
|
|
312
|
-
var B = N.quoteStyle || t,
|
|
313
|
-
return
|
|
312
|
+
var B = N.quoteStyle || t, W = ie[B];
|
|
313
|
+
return W + r + W;
|
|
314
314
|
}
|
|
315
315
|
function ae(r) {
|
|
316
316
|
return S.call(String(r), /"/g, """);
|
|
317
317
|
}
|
|
318
318
|
function Z(r) {
|
|
319
|
-
return !
|
|
319
|
+
return !z || !(typeof r == "object" && (z in r || typeof r[z] < "u"));
|
|
320
320
|
}
|
|
321
321
|
function fe(r) {
|
|
322
322
|
return re(r) === "[object Array]" && Z(r);
|
|
@@ -333,7 +333,7 @@ function _e() {
|
|
|
333
333
|
function k(r) {
|
|
334
334
|
return re(r) === "[object String]" && Z(r);
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function T(r) {
|
|
337
337
|
return re(r) === "[object Number]" && Z(r);
|
|
338
338
|
}
|
|
339
339
|
function H(r) {
|
|
@@ -461,9 +461,9 @@ function _e() {
|
|
|
461
461
|
var N = r.length - t.maxStringLength, B = "... " + N + " more character" + (N > 1 ? "s" : "");
|
|
462
462
|
return Nr(h.call(r, 0, t.maxStringLength), t) + B;
|
|
463
463
|
}
|
|
464
|
-
var
|
|
465
|
-
|
|
466
|
-
var q = S.call(S.call(r,
|
|
464
|
+
var W = oe[t.quoteStyle || "single"];
|
|
465
|
+
W.lastIndex = 0;
|
|
466
|
+
var q = S.call(S.call(r, W, "\\$1"), /[\x00-\x1f]/g, Xt);
|
|
467
467
|
return le(q, "single", t);
|
|
468
468
|
}
|
|
469
469
|
function Xt(r) {
|
|
@@ -482,9 +482,9 @@ function _e() {
|
|
|
482
482
|
function qe(r) {
|
|
483
483
|
return r + " { ? }";
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
var
|
|
487
|
-
return r + " (" + t + ") {" +
|
|
485
|
+
function Lr(r, t, N, B) {
|
|
486
|
+
var W = B ? Me(N, B) : c.call(N, ", ");
|
|
487
|
+
return r + " (" + t + ") {" + W + "}";
|
|
488
488
|
}
|
|
489
489
|
function Zt(r) {
|
|
490
490
|
for (var t = 0; t < r.length; t++)
|
|
@@ -518,8 +518,8 @@ function _e() {
|
|
|
518
518
|
var N = fe(r), B = [];
|
|
519
519
|
if (N) {
|
|
520
520
|
B.length = r.length;
|
|
521
|
-
for (var
|
|
522
|
-
B[
|
|
521
|
+
for (var W = 0; W < r.length; W++)
|
|
522
|
+
B[W] = J(r, W) ? t(r[W], r) : "";
|
|
523
523
|
}
|
|
524
524
|
var q = typeof x == "function" ? x(r) : [], se;
|
|
525
525
|
if (F) {
|
|
@@ -536,9 +536,9 @@ function _e() {
|
|
|
536
536
|
}
|
|
537
537
|
return Ue;
|
|
538
538
|
}
|
|
539
|
-
var
|
|
539
|
+
var We, Jr;
|
|
540
540
|
function yn() {
|
|
541
|
-
if (Jr) return
|
|
541
|
+
if (Jr) return We;
|
|
542
542
|
Jr = 1;
|
|
543
543
|
var e = /* @__PURE__ */ _e(), i = /* @__PURE__ */ be(), u = function(v, O, p) {
|
|
544
544
|
for (var m = v, y; (y = m.next) != null; m = y)
|
|
@@ -565,7 +565,7 @@ function yn() {
|
|
|
565
565
|
if (v)
|
|
566
566
|
return u(v, O, !0);
|
|
567
567
|
};
|
|
568
|
-
return
|
|
568
|
+
return We = function() {
|
|
569
569
|
var O, p = {
|
|
570
570
|
assert: function(m) {
|
|
571
571
|
if (!p.has(m))
|
|
@@ -593,11 +593,11 @@ function yn() {
|
|
|
593
593
|
}
|
|
594
594
|
};
|
|
595
595
|
return p;
|
|
596
|
-
},
|
|
596
|
+
}, We;
|
|
597
597
|
}
|
|
598
|
-
var
|
|
598
|
+
var ze, Yr;
|
|
599
599
|
function Ut() {
|
|
600
|
-
return Yr || (Yr = 1,
|
|
600
|
+
return Yr || (Yr = 1, ze = Object), ze;
|
|
601
601
|
}
|
|
602
602
|
var ke, Xr;
|
|
603
603
|
function dn() {
|
|
@@ -667,7 +667,7 @@ function _n() {
|
|
|
667
667
|
return pt || (pt = 1, nr = Object.getOwnPropertyDescriptor), nr;
|
|
668
668
|
}
|
|
669
669
|
var ar, yt;
|
|
670
|
-
function
|
|
670
|
+
function Wt() {
|
|
671
671
|
if (yt) return ar;
|
|
672
672
|
yt = 1;
|
|
673
673
|
var e = /* @__PURE__ */ _n();
|
|
@@ -732,7 +732,7 @@ function Mn() {
|
|
|
732
732
|
}, lr;
|
|
733
733
|
}
|
|
734
734
|
var fr, mt;
|
|
735
|
-
function
|
|
735
|
+
function zt() {
|
|
736
736
|
return mt || (mt = 1, fr = typeof Reflect < "u" && Reflect.getPrototypeOf || null), fr;
|
|
737
737
|
}
|
|
738
738
|
var ur, gt;
|
|
@@ -828,7 +828,7 @@ var mr, Pt;
|
|
|
828
828
|
function $n() {
|
|
829
829
|
if (Pt) return mr;
|
|
830
830
|
Pt = 1;
|
|
831
|
-
var e = Ht(), i = /* @__PURE__ */
|
|
831
|
+
var e = Ht(), i = /* @__PURE__ */ Wt(), u;
|
|
832
832
|
try {
|
|
833
833
|
u = /** @type {{ __proto__?: typeof Array.prototype }} */
|
|
834
834
|
[].__proto__ === Array.prototype;
|
|
@@ -852,7 +852,7 @@ var gr, It;
|
|
|
852
852
|
function Nn() {
|
|
853
853
|
if (It) return gr;
|
|
854
854
|
It = 1;
|
|
855
|
-
var e =
|
|
855
|
+
var e = zt(), i = kt(), u = /* @__PURE__ */ $n();
|
|
856
856
|
return gr = e ? function(g) {
|
|
857
857
|
return e(g);
|
|
858
858
|
} : i ? function(g) {
|
|
@@ -864,7 +864,7 @@ function Nn() {
|
|
|
864
864
|
} : null, gr;
|
|
865
865
|
}
|
|
866
866
|
var wr, _t;
|
|
867
|
-
function
|
|
867
|
+
function Ln() {
|
|
868
868
|
if (_t) return wr;
|
|
869
869
|
_t = 1;
|
|
870
870
|
var e = Function.prototype.call, i = Object.prototype.hasOwnProperty, u = xe();
|
|
@@ -879,7 +879,7 @@ function Cr() {
|
|
|
879
879
|
return o('"use strict"; return (' + j + ").constructor;")();
|
|
880
880
|
} catch {
|
|
881
881
|
}
|
|
882
|
-
}, h = /* @__PURE__ */
|
|
882
|
+
}, h = /* @__PURE__ */ Wt(), S = /* @__PURE__ */ xn(), D = function() {
|
|
883
883
|
throw new v();
|
|
884
884
|
}, P = h ? (function() {
|
|
885
885
|
try {
|
|
@@ -891,7 +891,7 @@ function Cr() {
|
|
|
891
891
|
return D;
|
|
892
892
|
}
|
|
893
893
|
}
|
|
894
|
-
})() : D, b = Mn()(), n = Nn(), c = kt(), d =
|
|
894
|
+
})() : D, b = Mn()(), n = Nn(), c = kt(), d = zt(), E = Gt(), _ = Dr(), x = {}, U = typeof Uint8Array > "u" || !n ? e : n(Uint8Array), F = {
|
|
895
895
|
__proto__: null,
|
|
896
896
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
897
897
|
"%Array%": Array,
|
|
@@ -979,8 +979,8 @@ function Cr() {
|
|
|
979
979
|
try {
|
|
980
980
|
null.error;
|
|
981
981
|
} catch (j) {
|
|
982
|
-
var
|
|
983
|
-
F["%Error.prototype%"] =
|
|
982
|
+
var z = n(n(j));
|
|
983
|
+
F["%Error.prototype%"] = z;
|
|
984
984
|
}
|
|
985
985
|
var $ = function j(C) {
|
|
986
986
|
var k;
|
|
@@ -991,8 +991,8 @@ function Cr() {
|
|
|
991
991
|
else if (C === "%AsyncGeneratorFunction%")
|
|
992
992
|
k = I("async function* () {}");
|
|
993
993
|
else if (C === "%AsyncGenerator%") {
|
|
994
|
-
var
|
|
995
|
-
|
|
994
|
+
var T = j("%AsyncGeneratorFunction%");
|
|
995
|
+
T && (k = T.prototype);
|
|
996
996
|
} else if (C === "%AsyncIteratorPrototype%") {
|
|
997
997
|
var H = j("%AsyncGenerator%");
|
|
998
998
|
H && n && (k = n(H.prototype));
|
|
@@ -1051,25 +1051,25 @@ function Cr() {
|
|
|
1051
1051
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
1052
1052
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
1053
1053
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
1054
|
-
}, s = xe(),
|
|
1055
|
-
var k = oe(C, 0, 1),
|
|
1056
|
-
if (k === "%" &&
|
|
1054
|
+
}, s = xe(), L = /* @__PURE__ */ Ln(), K = s.call(_, Array.prototype.concat), X = s.call(E, Array.prototype.splice), ie = s.call(_, String.prototype.replace), oe = s.call(_, String.prototype.slice), le = s.call(_, RegExp.prototype.exec), ae = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Z = /\\(\\)?/g, fe = function(C) {
|
|
1055
|
+
var k = oe(C, 0, 1), T = oe(C, -1);
|
|
1056
|
+
if (k === "%" && T !== "%")
|
|
1057
1057
|
throw new R("invalid intrinsic syntax, expected closing `%`");
|
|
1058
|
-
if (
|
|
1058
|
+
if (T === "%" && k !== "%")
|
|
1059
1059
|
throw new R("invalid intrinsic syntax, expected opening `%`");
|
|
1060
1060
|
var H = [];
|
|
1061
1061
|
return ie(C, ae, function(Q, ee, V, J) {
|
|
1062
1062
|
H[H.length] = V ? ie(J, Z, "$1") : ee || Q;
|
|
1063
1063
|
}), H;
|
|
1064
1064
|
}, ue = function(C, k) {
|
|
1065
|
-
var
|
|
1066
|
-
if (
|
|
1067
|
-
var Q = F[
|
|
1068
|
-
if (Q === x && (Q = $(
|
|
1065
|
+
var T = C, H;
|
|
1066
|
+
if (L(G, T) && (H = G[T], T = "%" + H[0] + "%"), L(F, T)) {
|
|
1067
|
+
var Q = F[T];
|
|
1068
|
+
if (Q === x && (Q = $(T)), typeof Q > "u" && !k)
|
|
1069
1069
|
throw new v("intrinsic " + C + " exists, but is not available. Please file an issue!");
|
|
1070
1070
|
return {
|
|
1071
1071
|
alias: H,
|
|
1072
|
-
name:
|
|
1072
|
+
name: T,
|
|
1073
1073
|
value: Q
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
@@ -1082,13 +1082,13 @@ function Cr() {
|
|
|
1082
1082
|
throw new v('"allowMissing" argument must be a boolean');
|
|
1083
1083
|
if (le(/^%?[^%]*%?$/, C) === null)
|
|
1084
1084
|
throw new R("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
1085
|
-
var
|
|
1086
|
-
re && (H = re[0], X(
|
|
1087
|
-
for (var ve = 1, ce = !0; ve <
|
|
1088
|
-
var te =
|
|
1085
|
+
var T = fe(C), H = T.length > 0 ? T[0] : "", Q = ue("%" + H + "%", k), ee = Q.name, V = Q.value, J = !1, re = Q.alias;
|
|
1086
|
+
re && (H = re[0], X(T, K([0, 1], re)));
|
|
1087
|
+
for (var ve = 1, ce = !0; ve < T.length; ve += 1) {
|
|
1088
|
+
var te = T[ve], he = oe(te, 0, 1), me = oe(te, -1);
|
|
1089
1089
|
if ((he === '"' || he === "'" || he === "`" || me === '"' || me === "'" || me === "`") && he !== me)
|
|
1090
1090
|
throw new R("property names with quotes must have matching quotes");
|
|
1091
|
-
if ((te === "constructor" || !ce) && (J = !0), H += "." + te, ee = "%" + H + "%",
|
|
1091
|
+
if ((te === "constructor" || !ce) && (J = !0), H += "." + te, ee = "%" + H + "%", L(F, ee))
|
|
1092
1092
|
V = F[ee];
|
|
1093
1093
|
else if (V != null) {
|
|
1094
1094
|
if (!(te in V)) {
|
|
@@ -1096,11 +1096,11 @@ function Cr() {
|
|
|
1096
1096
|
throw new v("base intrinsic for " + C + " exists, but the property is not available.");
|
|
1097
1097
|
return;
|
|
1098
1098
|
}
|
|
1099
|
-
if (h && ve + 1 >=
|
|
1099
|
+
if (h && ve + 1 >= T.length) {
|
|
1100
1100
|
var ge = h(V, te);
|
|
1101
1101
|
ce = !!ge, ce && "get" in ge && !("originalValue" in ge.get) ? V = ge.get : V = V[te];
|
|
1102
1102
|
} else
|
|
1103
|
-
ce =
|
|
1103
|
+
ce = L(V, te), V = V[te];
|
|
1104
1104
|
ce && !J && (F[ee] = V);
|
|
1105
1105
|
}
|
|
1106
1106
|
}
|
|
@@ -1157,7 +1157,7 @@ function Kt() {
|
|
|
1157
1157
|
}, Er;
|
|
1158
1158
|
}
|
|
1159
1159
|
var Or, Ft;
|
|
1160
|
-
function
|
|
1160
|
+
function Tn() {
|
|
1161
1161
|
if (Ft) return Or;
|
|
1162
1162
|
Ft = 1;
|
|
1163
1163
|
var e = /* @__PURE__ */ Cr(), i = /* @__PURE__ */ jt(), u = /* @__PURE__ */ _e(), l = Kt(), g = /* @__PURE__ */ be(), w = e("%WeakMap%", !0), R = i("WeakMap.prototype.get", !0), v = i("WeakMap.prototype.set", !0), O = i("WeakMap.prototype.has", !0), p = i("WeakMap.prototype.delete", !0);
|
|
@@ -1195,7 +1195,7 @@ var Ar, Dt;
|
|
|
1195
1195
|
function Qt() {
|
|
1196
1196
|
if (Dt) return Ar;
|
|
1197
1197
|
Dt = 1;
|
|
1198
|
-
var e = /* @__PURE__ */ be(), i = /* @__PURE__ */ _e(), u = yn(), l = Kt(), g =
|
|
1198
|
+
var e = /* @__PURE__ */ be(), i = /* @__PURE__ */ _e(), u = yn(), l = Kt(), g = Tn(), w = g || l || u;
|
|
1199
1199
|
return Ar = function() {
|
|
1200
1200
|
var v, O = {
|
|
1201
1201
|
assert: function(p) {
|
|
@@ -1294,8 +1294,8 @@ function Vt() {
|
|
|
1294
1294
|
if (!n || typeof n != "object") {
|
|
1295
1295
|
if (R(c)) {
|
|
1296
1296
|
for (var x = Object.keys(c), U = d && d.plainObjects ? { __proto__: null, 0: n } : { 0: n }, F = 0; F < x.length; F++) {
|
|
1297
|
-
var
|
|
1298
|
-
U[
|
|
1297
|
+
var z = parseInt(x[F], 10);
|
|
1298
|
+
U[z + 1] = c[x[F]];
|
|
1299
1299
|
}
|
|
1300
1300
|
return w(U, v(c) + 1);
|
|
1301
1301
|
}
|
|
@@ -1303,17 +1303,17 @@ function Vt() {
|
|
|
1303
1303
|
return d && typeof d.arrayLimit == "number" && $.length > d.arrayLimit ? w(y($, d), $.length - 1) : $;
|
|
1304
1304
|
}
|
|
1305
1305
|
var G = n;
|
|
1306
|
-
return l(n) && !l(c) && (G = y(n, d)), l(n) && l(c) ? (c.forEach(function(s,
|
|
1307
|
-
if (u.call(n,
|
|
1308
|
-
var K = n[
|
|
1309
|
-
K && typeof K == "object" && s && typeof s == "object" ? n[
|
|
1306
|
+
return l(n) && !l(c) && (G = y(n, d)), l(n) && l(c) ? (c.forEach(function(s, L) {
|
|
1307
|
+
if (u.call(n, L)) {
|
|
1308
|
+
var K = n[L];
|
|
1309
|
+
K && typeof K == "object" && s && typeof s == "object" ? n[L] = b(K, s, d) : n[n.length] = s;
|
|
1310
1310
|
} else
|
|
1311
|
-
n[
|
|
1312
|
-
}), n) : Object.keys(c).reduce(function(s,
|
|
1313
|
-
var K = c[
|
|
1314
|
-
if (u.call(s,
|
|
1315
|
-
var X = parseInt(
|
|
1316
|
-
String(X) ===
|
|
1311
|
+
n[L] = s;
|
|
1312
|
+
}), n) : Object.keys(c).reduce(function(s, L) {
|
|
1313
|
+
var K = c[L];
|
|
1314
|
+
if (u.call(s, L) ? s[L] = b(s[L], K, d) : s[L] = K, R(c) && !R(s) && w(s, v(c)), R(s)) {
|
|
1315
|
+
var X = parseInt(L, 10);
|
|
1316
|
+
String(X) === L && X >= 0 && X > v(s) && O(s, X);
|
|
1317
1317
|
}
|
|
1318
1318
|
return s;
|
|
1319
1319
|
}, G);
|
|
@@ -1335,14 +1335,14 @@ function Vt() {
|
|
|
1335
1335
|
return n;
|
|
1336
1336
|
var x = n;
|
|
1337
1337
|
if (typeof n == "symbol" ? x = Symbol.prototype.toString.call(n) : typeof n != "string" && (x = String(n)), d === "iso-8859-1")
|
|
1338
|
-
return escape(x).replace(/%u[0-9a-f]{4}/gi, function(
|
|
1339
|
-
return "%26%23" + parseInt(
|
|
1338
|
+
return escape(x).replace(/%u[0-9a-f]{4}/gi, function(L) {
|
|
1339
|
+
return "%26%23" + parseInt(L.slice(2), 16) + "%3B";
|
|
1340
1340
|
});
|
|
1341
1341
|
for (var U = "", F = 0; F < x.length; F += f) {
|
|
1342
|
-
for (var
|
|
1343
|
-
var s =
|
|
1342
|
+
for (var z = x.length >= f ? x.slice(F, F + f) : x, $ = [], G = 0; G < z.length; ++G) {
|
|
1343
|
+
var s = z.charCodeAt(G);
|
|
1344
1344
|
if (s === 45 || s === 46 || s === 95 || s === 126 || s >= 48 && s <= 57 || s >= 65 && s <= 90 || s >= 97 && s <= 122 || _ === e.RFC1738 && (s === 40 || s === 41)) {
|
|
1345
|
-
$[$.length] =
|
|
1345
|
+
$[$.length] = z.charAt(G);
|
|
1346
1346
|
continue;
|
|
1347
1347
|
}
|
|
1348
1348
|
if (s < 128) {
|
|
@@ -1357,7 +1357,7 @@ function Vt() {
|
|
|
1357
1357
|
$[$.length] = p[224 | s >> 12] + p[128 | s >> 6 & 63] + p[128 | s & 63];
|
|
1358
1358
|
continue;
|
|
1359
1359
|
}
|
|
1360
|
-
G += 1, s = 65536 + ((s & 1023) << 10 |
|
|
1360
|
+
G += 1, s = 65536 + ((s & 1023) << 10 | z.charCodeAt(G) & 1023), $[$.length] = p[240 | s >> 18] + p[128 | s >> 12 & 63] + p[128 | s >> 6 & 63] + p[128 | s & 63];
|
|
1361
1361
|
}
|
|
1362
1362
|
U += $.join("");
|
|
1363
1363
|
}
|
|
@@ -1365,8 +1365,8 @@ function Vt() {
|
|
|
1365
1365
|
}, I = function(n) {
|
|
1366
1366
|
for (var c = [{ obj: { o: n }, prop: "o" }], d = [], E = 0; E < c.length; ++E)
|
|
1367
1367
|
for (var _ = c[E], x = _.obj[_.prop], U = Object.keys(x), F = 0; F < U.length; ++F) {
|
|
1368
|
-
var
|
|
1369
|
-
typeof $ == "object" && $ !== null && d.indexOf($) === -1 && (c[c.length] = { obj: x, prop:
|
|
1368
|
+
var z = U[F], $ = x[z];
|
|
1369
|
+
typeof $ == "object" && $ !== null && d.indexOf($) === -1 && (c[c.length] = { obj: x, prop: z }, d[d.length] = $);
|
|
1370
1370
|
}
|
|
1371
1371
|
return m(c), n;
|
|
1372
1372
|
}, h = function(n) {
|
|
@@ -1445,26 +1445,26 @@ function Bn() {
|
|
|
1445
1445
|
strictNullHandling: !1
|
|
1446
1446
|
}, y = function(o) {
|
|
1447
1447
|
return typeof o == "string" || typeof o == "number" || typeof o == "boolean" || typeof o == "symbol" || typeof o == "bigint";
|
|
1448
|
-
}, M = {}, A = function f(o, I, h, S, D, P, b, n, c, d, E, _, x, U, F,
|
|
1449
|
-
for (var s = o,
|
|
1450
|
-
var ie =
|
|
1448
|
+
}, M = {}, A = function f(o, I, h, S, D, P, b, n, c, d, E, _, x, U, F, z, $, G) {
|
|
1449
|
+
for (var s = o, L = G, K = 0, X = !1; (L = L.get(M)) !== void 0 && !X; ) {
|
|
1450
|
+
var ie = L.get(o);
|
|
1451
1451
|
if (K += 1, typeof ie < "u") {
|
|
1452
1452
|
if (ie === K)
|
|
1453
1453
|
throw new RangeError("Cyclic object value");
|
|
1454
1454
|
X = !0;
|
|
1455
1455
|
}
|
|
1456
|
-
typeof
|
|
1456
|
+
typeof L.get(M) > "u" && (K = 0);
|
|
1457
1457
|
}
|
|
1458
1458
|
if (typeof d == "function" ? s = d(I, s) : s instanceof Date ? s = x(s) : h === "comma" && w(s) && (s = i.maybeMap(s, function(ee) {
|
|
1459
1459
|
return ee instanceof Date ? x(ee) : ee;
|
|
1460
1460
|
})), s === null) {
|
|
1461
1461
|
if (P)
|
|
1462
|
-
return c && !
|
|
1462
|
+
return c && !z ? c(I, m.encoder, $, "key", U) : I;
|
|
1463
1463
|
s = "";
|
|
1464
1464
|
}
|
|
1465
1465
|
if (y(s) || i.isBuffer(s)) {
|
|
1466
1466
|
if (c) {
|
|
1467
|
-
var oe =
|
|
1467
|
+
var oe = z ? I : c(I, m.encoder, $, "key", U);
|
|
1468
1468
|
return [F(oe) + "=" + F(c(s, m.encoder, $, "value", U))];
|
|
1469
1469
|
}
|
|
1470
1470
|
return [F(I) + "=" + F(String(s))];
|
|
@@ -1474,7 +1474,7 @@ function Bn() {
|
|
|
1474
1474
|
return le;
|
|
1475
1475
|
var ae;
|
|
1476
1476
|
if (h === "comma" && w(s))
|
|
1477
|
-
|
|
1477
|
+
z && c && (s = i.maybeMap(s, c)), ae = [{ value: s.length > 0 ? s.join(",") || null : void 0 }];
|
|
1478
1478
|
else if (w(d))
|
|
1479
1479
|
ae = d;
|
|
1480
1480
|
else {
|
|
@@ -1487,7 +1487,7 @@ function Bn() {
|
|
|
1487
1487
|
for (var j = 0; j < ae.length; ++j) {
|
|
1488
1488
|
var C = ae[j], k = typeof C == "object" && C && typeof C.value < "u" ? C.value : s[C];
|
|
1489
1489
|
if (!(b && k === null)) {
|
|
1490
|
-
var
|
|
1490
|
+
var T = _ && n ? String(C).replace(/\./g, "%2E") : String(C), H = w(s) ? typeof h == "function" ? h(ue, T) : ue : ue + (_ ? "." + T : "[" + T + "]");
|
|
1491
1491
|
G.set(o, K);
|
|
1492
1492
|
var Q = e();
|
|
1493
1493
|
Q.set(M, G), v(le, f(
|
|
@@ -1499,14 +1499,14 @@ function Bn() {
|
|
|
1499
1499
|
P,
|
|
1500
1500
|
b,
|
|
1501
1501
|
n,
|
|
1502
|
-
h === "comma" &&
|
|
1502
|
+
h === "comma" && z && w(s) ? null : c,
|
|
1503
1503
|
d,
|
|
1504
1504
|
E,
|
|
1505
1505
|
_,
|
|
1506
1506
|
x,
|
|
1507
1507
|
U,
|
|
1508
1508
|
F,
|
|
1509
|
-
|
|
1509
|
+
z,
|
|
1510
1510
|
$,
|
|
1511
1511
|
Q
|
|
1512
1512
|
));
|
|
@@ -1594,10 +1594,10 @@ function Bn() {
|
|
|
1594
1594
|
return h.charsetSentinel && (h.charset === "iso-8859-1" ? U += "utf8=%26%2310003%3B&" : U += "utf8=%E2%9C%93&"), x.length > 0 ? U + x : "";
|
|
1595
1595
|
}, Ir;
|
|
1596
1596
|
}
|
|
1597
|
-
var _r,
|
|
1597
|
+
var _r, Lt;
|
|
1598
1598
|
function Un() {
|
|
1599
|
-
if (
|
|
1600
|
-
|
|
1599
|
+
if (Lt) return _r;
|
|
1600
|
+
Lt = 1;
|
|
1601
1601
|
var e = /* @__PURE__ */ Vt(), i = Object.prototype.hasOwnProperty, u = Array.isArray, l = {
|
|
1602
1602
|
allowDots: !1,
|
|
1603
1603
|
allowEmptyArrays: !1,
|
|
@@ -1786,10 +1786,10 @@ function Un() {
|
|
|
1786
1786
|
return f.allowSparse === !0 ? I : e.compact(I);
|
|
1787
1787
|
}, _r;
|
|
1788
1788
|
}
|
|
1789
|
-
var xr,
|
|
1790
|
-
function
|
|
1791
|
-
if (
|
|
1792
|
-
|
|
1789
|
+
var xr, Tt;
|
|
1790
|
+
function Wn() {
|
|
1791
|
+
if (Tt) return xr;
|
|
1792
|
+
Tt = 1;
|
|
1793
1793
|
var e = /* @__PURE__ */ Bn(), i = /* @__PURE__ */ Un(), u = /* @__PURE__ */ $r();
|
|
1794
1794
|
return xr = {
|
|
1795
1795
|
formats: u,
|
|
@@ -1797,8 +1797,8 @@ function zn() {
|
|
|
1797
1797
|
stringify: e
|
|
1798
1798
|
}, xr;
|
|
1799
1799
|
}
|
|
1800
|
-
var
|
|
1801
|
-
const kn = "0.1.
|
|
1800
|
+
var zn = /* @__PURE__ */ Wn();
|
|
1801
|
+
const kn = "0.1.4", Gn = [
|
|
1802
1802
|
"allow-scripts",
|
|
1803
1803
|
// Run the widget app
|
|
1804
1804
|
"allow-same-origin",
|
|
@@ -1813,7 +1813,7 @@ const kn = "0.1.3", Gn = [
|
|
|
1813
1813
|
function qr(e, i, { accessToken: u, host: l, theme: g }, w = "/relay-widget") {
|
|
1814
1814
|
if (!u)
|
|
1815
1815
|
throw new Error("[PersonaRelay] accessToken is required to initialize the relay widget");
|
|
1816
|
-
const R = Fr(l), v =
|
|
1816
|
+
const R = Fr(l), v = zn.stringify(
|
|
1817
1817
|
{
|
|
1818
1818
|
"client-version": kn,
|
|
1819
1819
|
"container-id": i,
|
|
@@ -1838,7 +1838,7 @@ class jn {
|
|
|
1838
1838
|
* @param options - Configuration options for the widget
|
|
1839
1839
|
*/
|
|
1840
1840
|
constructor(i, u) {
|
|
1841
|
-
this.relayCSS = new on("relay-widget-styles"), this.
|
|
1841
|
+
this.relayCSS = new on("relay-widget-styles"), this.removeResizeListener = null, this.options = u, this.baseUrl = Fr(this.options.host), this.containerParent = this.resolveContainer(i), this.containerId = an(), this.containerElement = Bt("div", {
|
|
1842
1842
|
class: "relay-widget__container",
|
|
1843
1843
|
id: this.containerId
|
|
1844
1844
|
}), this.iframeElement = document.createElement("iframe"), this.popoverIframeElement = document.createElement("iframe"), this.fullscreenIframeElement = document.createElement("iframe"), this.unsubscribeFromEvents = fn(this.containerId, {
|
|
@@ -1907,7 +1907,7 @@ class jn {
|
|
|
1907
1907
|
document.body.classList.remove("relay-widget__scroll-locked");
|
|
1908
1908
|
}
|
|
1909
1909
|
/**
|
|
1910
|
-
* Sends
|
|
1910
|
+
* Sends current document body dimensions to iframes for mobile detection.
|
|
1911
1911
|
*/
|
|
1912
1912
|
sendResize() {
|
|
1913
1913
|
const { clientWidth: i, clientHeight: u } = document.body, l = {
|
|
@@ -1918,11 +1918,18 @@ class jn {
|
|
|
1918
1918
|
this.iframeElement.contentWindow?.postMessage(l, this.baseUrl), this.popoverIframeElement.contentWindow?.postMessage(l, this.baseUrl), this.fullscreenIframeElement.contentWindow?.postMessage(l, this.baseUrl);
|
|
1919
1919
|
}
|
|
1920
1920
|
/**
|
|
1921
|
-
* Observes the
|
|
1922
|
-
*
|
|
1921
|
+
* Observes the document body for size changes and forwards
|
|
1922
|
+
* resize events to iframes via postMessage. Also sends
|
|
1923
|
+
* once to each on initial iframe load.
|
|
1923
1924
|
*/
|
|
1924
1925
|
setupResizeObserver() {
|
|
1925
|
-
this.iframeElement.addEventListener("load", () => this.sendResize(), {
|
|
1926
|
+
this.iframeElement.addEventListener("load", () => this.sendResize(), {
|
|
1927
|
+
once: !0
|
|
1928
|
+
}), this.popoverIframeElement.addEventListener("load", () => this.sendResize(), {
|
|
1929
|
+
once: !0
|
|
1930
|
+
}), this.fullscreenIframeElement.addEventListener("load", () => this.sendResize(), {
|
|
1931
|
+
once: !0
|
|
1932
|
+
});
|
|
1926
1933
|
const i = () => this.sendResize();
|
|
1927
1934
|
window.addEventListener("resize", i), this.removeResizeListener = () => window.removeEventListener("resize", i);
|
|
1928
1935
|
}
|
|
@@ -1932,7 +1939,7 @@ class jn {
|
|
|
1932
1939
|
*/
|
|
1933
1940
|
destroy() {
|
|
1934
1941
|
const i = { action: Mr.Destroy, metadata: {} };
|
|
1935
|
-
this.iframeElement.contentWindow?.postMessage(i, this.baseUrl), this.popoverIframeElement.contentWindow?.postMessage(i, this.baseUrl), this.fullscreenIframeElement.contentWindow?.postMessage(i, this.baseUrl), this.relayCSS.unmount(), this.unlockScroll(), this.
|
|
1942
|
+
this.iframeElement.contentWindow?.postMessage(i, this.baseUrl), this.popoverIframeElement.contentWindow?.postMessage(i, this.baseUrl), this.fullscreenIframeElement.contentWindow?.postMessage(i, this.baseUrl), this.relayCSS.unmount(), this.unlockScroll(), this.removeResizeListener?.(), this.removeResizeListener = null, this.containerElement.parentNode && this.containerParent.removeChild(this.containerElement), this.fullscreenIframeElement.parentNode && this.fullscreenIframeElement.parentNode.removeChild(this.fullscreenIframeElement), this.unsubscribeFromEvents();
|
|
1936
1943
|
}
|
|
1937
1944
|
}
|
|
1938
1945
|
export {
|