authhero 0.232.0 → 0.233.0
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/authhero.cjs +24 -24
- package/dist/authhero.d.ts +0 -6
- package/dist/authhero.mjs +422 -424
- package/package.json +3 -3
package/dist/authhero.mjs
CHANGED
|
@@ -361,7 +361,7 @@ class _a extends dc {
|
|
|
361
361
|
}
|
|
362
362
|
const h = this.resolve(e, n);
|
|
363
363
|
let g = h == null ? void 0 : h.res;
|
|
364
|
-
const b = (h == null ? void 0 : h.usedKey) || a,
|
|
364
|
+
const b = (h == null ? void 0 : h.usedKey) || a, $ = (h == null ? void 0 : h.exactUsedKey) || a, C = Object.prototype.toString.apply(g), D = ["[object Number]", "[object Function]", "[object RegExp]"], O = n.joinArrays !== void 0 ? n.joinArrays : this.options.joinArrays, A = !this.i18nFormat || this.i18nFormat.handleAsObject, z = !Ne(g) && typeof g != "boolean" && typeof g != "number";
|
|
365
365
|
if (A && g && z && D.indexOf(C) < 0 && !(Ne(O) && Array.isArray(g))) {
|
|
366
366
|
if (!n.returnObjects && !this.options.returnObjects) {
|
|
367
367
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
@@ -372,7 +372,7 @@ class _a extends dc {
|
|
|
372
372
|
return i ? (h.res = q, h.usedParams = this.getUsedParamsDetails(n), h) : q;
|
|
373
373
|
}
|
|
374
374
|
if (s) {
|
|
375
|
-
const q = Array.isArray(g), M = q ? [] : {}, H = q ?
|
|
375
|
+
const q = Array.isArray(g), M = q ? [] : {}, H = q ? $ : b;
|
|
376
376
|
for (const X in g)
|
|
377
377
|
if (Object.prototype.hasOwnProperty.call(g, X)) {
|
|
378
378
|
const W = `${H}${s}${X}`;
|
|
@@ -444,19 +444,19 @@ class _a extends dc {
|
|
|
444
444
|
const h = Ne(e) && (((p = r == null ? void 0 : r.interpolation) == null ? void 0 : p.skipOnVariables) !== void 0 ? r.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
445
445
|
let g;
|
|
446
446
|
if (h) {
|
|
447
|
-
const
|
|
448
|
-
g =
|
|
447
|
+
const $ = e.match(this.interpolator.nestingRegexp);
|
|
448
|
+
g = $ && $.length;
|
|
449
449
|
}
|
|
450
450
|
let b = r.replace && !Ne(r.replace) ? r.replace : r;
|
|
451
451
|
if (this.options.interpolation.defaultVariables && (b = {
|
|
452
452
|
...this.options.interpolation.defaultVariables,
|
|
453
453
|
...b
|
|
454
454
|
}), e = this.interpolator.interpolate(e, b, r.lng || this.language || i.usedLng, r), h) {
|
|
455
|
-
const
|
|
455
|
+
const $ = e.match(this.interpolator.nestingRegexp), C = $ && $.length;
|
|
456
456
|
g < C && (r.nest = !1);
|
|
457
457
|
}
|
|
458
458
|
!r.lng && i && i.res && (r.lng = this.language || i.usedLng), r.nest !== !1 && (e = this.interpolator.nest(e, function() {
|
|
459
|
-
for (var
|
|
459
|
+
for (var $ = arguments.length, C = new Array($), D = 0; D < $; D++)
|
|
460
460
|
C[D] = arguments[D];
|
|
461
461
|
return (s == null ? void 0 : s[0]) === C[0] && !r.context ? (a.logger.warn(`It seems you are nesting recursively key: ${C[0]} in key: ${n[0]}`), null) : a.translate(...C, n);
|
|
462
462
|
}, r)), r.interpolation && this.interpolator.reset();
|
|
@@ -478,7 +478,7 @@ class _a extends dc {
|
|
|
478
478
|
i = p;
|
|
479
479
|
let h = d.namespaces;
|
|
480
480
|
this.options.fallbackNS && (h = h.concat(this.options.fallbackNS));
|
|
481
|
-
const g = n.count !== void 0 && !Ne(n.count), b = g && !n.ordinal && n.count === 0,
|
|
481
|
+
const g = n.count !== void 0 && !Ne(n.count), b = g && !n.ordinal && n.count === 0, $ = n.context !== void 0 && (Ne(n.context) || typeof n.context == "number") && n.context !== "", C = n.lngs ? n.lngs : this.languageUtils.toResolveHierarchy(n.lng || this.language, n.fallbackLng);
|
|
482
482
|
h.forEach((D) => {
|
|
483
483
|
var O, A;
|
|
484
484
|
this.isValidLookup(r) || (l = D, !rh[`${C[0]}-${D}`] && ((O = this.utils) != null && O.hasLoadedNamespace) && !((A = this.utils) != null && A.hasLoadedNamespace(l)) && (rh[`${C[0]}-${D}`] = !0, this.logger.warn(`key "${i}" for languages "${C.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), C.forEach((z) => {
|
|
@@ -492,7 +492,7 @@ class _a extends dc {
|
|
|
492
492
|
let X;
|
|
493
493
|
g && (X = this.pluralResolver.getSuffix(z, n.count, n));
|
|
494
494
|
const W = `${this.options.pluralSeparator}zero`, Y = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
495
|
-
if (g && (q.push(p + X), n.ordinal && X.indexOf(Y) === 0 && q.push(p + X.replace(Y, this.options.pluralSeparator)), b && q.push(p + W)),
|
|
495
|
+
if (g && (q.push(p + X), n.ordinal && X.indexOf(Y) === 0 && q.push(p + X.replace(Y, this.options.pluralSeparator)), b && q.push(p + W)), $) {
|
|
496
496
|
const Ee = `${p}${this.options.contextSeparator}${n.context}`;
|
|
497
497
|
q.push(Ee), g && (q.push(Ee + X), n.ordinal && X.indexOf(Y) === 0 && q.push(Ee + X.replace(Y, this.options.pluralSeparator)), b && q.push(Ee + W));
|
|
498
498
|
}
|
|
@@ -696,13 +696,13 @@ class Zy {
|
|
|
696
696
|
unescapePrefix: h,
|
|
697
697
|
nestingPrefix: g,
|
|
698
698
|
nestingPrefixEscaped: b,
|
|
699
|
-
nestingSuffix:
|
|
699
|
+
nestingSuffix: $,
|
|
700
700
|
nestingSuffixEscaped: C,
|
|
701
701
|
nestingOptionsSeparator: D,
|
|
702
702
|
maxReplaces: O,
|
|
703
703
|
alwaysFormat: A
|
|
704
704
|
} = e.interpolation;
|
|
705
|
-
this.escape = n !== void 0 ? n : Hy, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = s ? li(s) : a || "{{", this.suffix = l ? li(l) : u || "}}", this.formatSeparator = d || ",", this.unescapePrefix = p ? "" : h || "-", this.unescapeSuffix = this.unescapePrefix ? "" : p || "", this.nestingPrefix = g ? li(g) : b || li("$t("), this.nestingSuffix =
|
|
705
|
+
this.escape = n !== void 0 ? n : Hy, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = s ? li(s) : a || "{{", this.suffix = l ? li(l) : u || "}}", this.formatSeparator = d || ",", this.unescapePrefix = p ? "" : h || "-", this.unescapeSuffix = this.unescapePrefix ? "" : p || "", this.nestingPrefix = g ? li(g) : b || li("$t("), this.nestingSuffix = $ ? li($) : C || li(")"), this.nestingOptionsSeparator = D || ",", this.maxReplaces = O || 1e3, this.alwaysFormat = A !== void 0 ? A : !1, this.resetRegExp();
|
|
706
706
|
}
|
|
707
707
|
reset() {
|
|
708
708
|
this.options && this.init(this.options);
|
|
@@ -714,16 +714,16 @@ class Zy {
|
|
|
714
714
|
interpolate(e, n, r, i) {
|
|
715
715
|
var b;
|
|
716
716
|
let s, a, l;
|
|
717
|
-
const u = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, d = (
|
|
718
|
-
if (
|
|
719
|
-
const A = ah(n, u,
|
|
717
|
+
const u = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, d = ($) => {
|
|
718
|
+
if ($.indexOf(this.formatSeparator) < 0) {
|
|
719
|
+
const A = ah(n, u, $, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
720
720
|
return this.alwaysFormat ? this.format(A, void 0, r, {
|
|
721
721
|
...i,
|
|
722
722
|
...n,
|
|
723
|
-
interpolationkey:
|
|
723
|
+
interpolationkey: $
|
|
724
724
|
}) : A;
|
|
725
725
|
}
|
|
726
|
-
const C =
|
|
726
|
+
const C = $.split(this.formatSeparator), D = C.shift().trim(), O = C.join(this.formatSeparator).trim();
|
|
727
727
|
return this.format(ah(n, u, D, this.options.keySeparator, this.options.ignoreJSONStructure), O, r, {
|
|
728
728
|
...i,
|
|
729
729
|
...n,
|
|
@@ -734,12 +734,12 @@ class Zy {
|
|
|
734
734
|
const p = (i == null ? void 0 : i.missingInterpolationHandler) || this.options.missingInterpolationHandler, h = ((b = i == null ? void 0 : i.interpolation) == null ? void 0 : b.skipOnVariables) !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
735
735
|
return [{
|
|
736
736
|
regex: this.regexpUnescape,
|
|
737
|
-
safeValue: (
|
|
737
|
+
safeValue: ($) => Cl($)
|
|
738
738
|
}, {
|
|
739
739
|
regex: this.regexp,
|
|
740
|
-
safeValue: (
|
|
741
|
-
}].forEach((
|
|
742
|
-
for (l = 0; s =
|
|
740
|
+
safeValue: ($) => this.escapeValue ? Cl(this.escape($)) : Cl($)
|
|
741
|
+
}].forEach(($) => {
|
|
742
|
+
for (l = 0; s = $.regex.exec(e); ) {
|
|
743
743
|
const C = s[1].trim();
|
|
744
744
|
if (a = d(C), a === void 0)
|
|
745
745
|
if (typeof p == "function") {
|
|
@@ -753,8 +753,8 @@ class Zy {
|
|
|
753
753
|
} else
|
|
754
754
|
this.logger.warn(`missed to pass in variable ${C} for interpolating ${e}`), a = "";
|
|
755
755
|
else !Ne(a) && !this.useRawValueToEscape && (a = Zf(a));
|
|
756
|
-
const D =
|
|
757
|
-
if (e = e.replace(s[0], D), h ? (
|
|
756
|
+
const D = $.safeValue(a);
|
|
757
|
+
if (e = e.replace(s[0], D), h ? ($.regex.lastIndex += a.length, $.regex.lastIndex -= s[0].length) : $.regex.lastIndex = 0, l++, l >= this.maxReplaces)
|
|
758
758
|
break;
|
|
759
759
|
}
|
|
760
760
|
}), e;
|
|
@@ -767,8 +767,8 @@ class Zy {
|
|
|
767
767
|
const h = u.split(new RegExp(`${p}[ ]*{`));
|
|
768
768
|
let g = `{${h[1]}`;
|
|
769
769
|
u = h[0], g = this.interpolate(g, a);
|
|
770
|
-
const b = g.match(/'/g),
|
|
771
|
-
(((b == null ? void 0 : b.length) ?? 0) % 2 === 0 &&
|
|
770
|
+
const b = g.match(/'/g), $ = g.match(/"/g);
|
|
771
|
+
(((b == null ? void 0 : b.length) ?? 0) % 2 === 0 && !$ || $.length % 2 !== 0) && (g = g.replace(/'/g, '"'));
|
|
772
772
|
try {
|
|
773
773
|
a = JSON.parse(g), d && (a = {
|
|
774
774
|
...d,
|
|
@@ -894,8 +894,8 @@ class ew {
|
|
|
894
894
|
if (this.formats[d]) {
|
|
895
895
|
let g = l;
|
|
896
896
|
try {
|
|
897
|
-
const b = ((h = i == null ? void 0 : i.formatParams) == null ? void 0 : h[i.interpolationkey]) || {},
|
|
898
|
-
g = this.formats[d](l,
|
|
897
|
+
const b = ((h = i == null ? void 0 : i.formatParams) == null ? void 0 : h[i.interpolationkey]) || {}, $ = b.locale || b.lng || i.locale || i.lng || r;
|
|
898
|
+
g = this.formats[d](l, $, {
|
|
899
899
|
...p,
|
|
900
900
|
...i,
|
|
901
901
|
...b
|
|
@@ -1035,16 +1035,16 @@ class nw extends dc {
|
|
|
1035
1035
|
const b = {
|
|
1036
1036
|
...a,
|
|
1037
1037
|
isUpdate: s
|
|
1038
|
-
},
|
|
1039
|
-
if (
|
|
1038
|
+
}, $ = this.backend.create.bind(this.backend);
|
|
1039
|
+
if ($.length < 6)
|
|
1040
1040
|
try {
|
|
1041
1041
|
let C;
|
|
1042
|
-
|
|
1042
|
+
$.length === 5 ? C = $(e, n, r, i, b) : C = $(e, n, r, i), C && typeof C.then == "function" ? C.then((D) => l(null, D)).catch(l) : l(null, C);
|
|
1043
1043
|
} catch (C) {
|
|
1044
1044
|
l(C);
|
|
1045
1045
|
}
|
|
1046
1046
|
else
|
|
1047
|
-
|
|
1047
|
+
$(e, n, r, i, l, b);
|
|
1048
1048
|
}
|
|
1049
1049
|
!e || !e[0] || this.store.addResource(e[0], n, r, i);
|
|
1050
1050
|
}
|
|
@@ -1155,11 +1155,11 @@ class Rs extends dc {
|
|
|
1155
1155
|
}), p && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (g.formatter = s(p), g.formatter.init(g, this.options), this.options.interpolation.format = g.formatter.format.bind(g.formatter)), g.interpolator = new Zy(this.options), g.utils = {
|
|
1156
1156
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
1157
1157
|
}, g.backendConnector = new nw(s(this.modules.backend), g.resourceStore, g, this.options), g.backendConnector.on("*", function(b) {
|
|
1158
|
-
for (var
|
|
1158
|
+
for (var $ = arguments.length, C = new Array($ > 1 ? $ - 1 : 0), D = 1; D < $; D++)
|
|
1159
1159
|
C[D - 1] = arguments[D];
|
|
1160
1160
|
e.emit(b, ...C);
|
|
1161
1161
|
}), this.modules.languageDetector && (g.languageDetector = s(this.modules.languageDetector), g.languageDetector.init && g.languageDetector.init(g, this.options.detection, this.options)), this.modules.i18nFormat && (g.i18nFormat = s(this.modules.i18nFormat), g.i18nFormat.init && g.i18nFormat.init(this)), this.translator = new _a(this.services, this.options), this.translator.on("*", function(b) {
|
|
1162
|
-
for (var
|
|
1162
|
+
for (var $ = arguments.length, C = new Array($ > 1 ? $ - 1 : 0), D = 1; D < $; D++)
|
|
1163
1163
|
C[D - 1] = arguments[D];
|
|
1164
1164
|
e.emit(b, ...C);
|
|
1165
1165
|
}), this.modules.external.forEach((b) => {
|
|
@@ -1265,7 +1265,7 @@ class Rs extends dc {
|
|
|
1265
1265
|
u.lng = u.lng || s.lng, u.lngs = u.lngs || s.lngs, u.ns = u.ns || s.ns, u.keyPrefix !== "" && (u.keyPrefix = u.keyPrefix || r || s.keyPrefix);
|
|
1266
1266
|
const g = i.options.keySeparator || ".";
|
|
1267
1267
|
let b;
|
|
1268
|
-
return u.keyPrefix && Array.isArray(a) ? b = a.map((
|
|
1268
|
+
return u.keyPrefix && Array.isArray(a) ? b = a.map(($) => `${u.keyPrefix}${g}${$}`) : b = u.keyPrefix ? `${u.keyPrefix}${g}${a}` : a, i.t(b, u);
|
|
1269
1269
|
};
|
|
1270
1270
|
return Ne(e) ? s.lng = e : s.lngs = e, s.ns = n, s.keyPrefix = r, s;
|
|
1271
1271
|
}
|
|
@@ -1961,10 +1961,7 @@ const ya = o.object({
|
|
|
1961
1961
|
o.object({
|
|
1962
1962
|
...bi.shape,
|
|
1963
1963
|
tenant: Es,
|
|
1964
|
-
connections: o.array(kn)
|
|
1965
|
-
// Legacy fields for backward compatibility - these are now stored in client_metadata
|
|
1966
|
-
disable_sign_ups: o.boolean(),
|
|
1967
|
-
email_validation: o.string()
|
|
1964
|
+
connections: o.array(kn)
|
|
1968
1965
|
});
|
|
1969
1966
|
const $w = o.enum([
|
|
1970
1967
|
"password_reset",
|
|
@@ -3166,7 +3163,7 @@ const lv = {}, uv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3166
3163
|
throw Error("Illegal arguments: " + typeof j + ", " + typeof F);
|
|
3167
3164
|
j < 4 ? j = 4 : j > 31 && (j = 31);
|
|
3168
3165
|
var P = [];
|
|
3169
|
-
return P.push("$2a$"), j < 10 && P.push("0"), P.push(j.toString()), P.push("$"), P.push(h(r(
|
|
3166
|
+
return P.push("$2a$"), j < 10 && P.push("0"), P.push(j.toString()), P.push("$"), P.push(h(r($), $)), P.join("");
|
|
3170
3167
|
}, e.genSalt = function(j, F, P) {
|
|
3171
3168
|
if (typeof F == "function" && (P = F, F = void 0), typeof j == "function" && (P = j, j = void 0), typeof j > "u")
|
|
3172
3169
|
j = C;
|
|
@@ -3497,7 +3494,7 @@ const lv = {}, uv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
3497
3494
|
Date.now = Date.now || function() {
|
|
3498
3495
|
return +/* @__PURE__ */ new Date();
|
|
3499
3496
|
};
|
|
3500
|
-
var
|
|
3497
|
+
var $ = 16, C = 10, D = 16, O = 100, A = [
|
|
3501
3498
|
608135816,
|
|
3502
3499
|
2242054355,
|
|
3503
3500
|
320440878,
|
|
@@ -4582,8 +4579,8 @@ const lv = {}, uv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
4582
4579
|
return;
|
|
4583
4580
|
} else
|
|
4584
4581
|
throw pe;
|
|
4585
|
-
if (F.length !==
|
|
4586
|
-
if (pe = Error("Illegal salt length: " + F.length + " != " +
|
|
4582
|
+
if (F.length !== $)
|
|
4583
|
+
if (pe = Error("Illegal salt length: " + F.length + " != " + $), N) {
|
|
4587
4584
|
a(N.bind(this, pe));
|
|
4588
4585
|
return;
|
|
4589
4586
|
} else
|
|
@@ -4651,7 +4648,7 @@ const lv = {}, uv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
4651
4648
|
throw k;
|
|
4652
4649
|
var pe = parseInt(F.substring(G, G + 1), 10) * 10, se = parseInt(F.substring(G + 1, G + 2), 10), $e = pe + se, Ce = F.substring(G + 3, G + 25);
|
|
4653
4650
|
j += L >= "a" ? "\0" : "";
|
|
4654
|
-
var ee = l(j), we = g(Ce,
|
|
4651
|
+
var ee = l(j), we = g(Ce, $);
|
|
4655
4652
|
function Un(Fe) {
|
|
4656
4653
|
var Xe = [];
|
|
4657
4654
|
return Xe.push("$2"), L >= "a" && Xe.push(L), Xe.push("$"), $e < 10 && Xe.push("0"), Xe.push($e.toString()), Xe.push("$"), Xe.push(h(we, we.length)), Xe.push(h(Fe, q.length * 4 - 1)), Xe.join("");
|
|
@@ -5689,7 +5686,7 @@ const _b = function(t) {
|
|
|
5689
5686
|
this.options.transformTagName && (u = this.options.transformTagName(u)), n && r && n.tagname !== "!xml" && (r = this.saveTextToParentTag(r, n, i, !1));
|
|
5690
5687
|
const b = n;
|
|
5691
5688
|
if (b && this.options.unpairedTags.indexOf(b.tagname) !== -1 && (n = this.tagsNodeStack.pop(), i = i.substring(0, i.lastIndexOf("."))), u !== e.tagname && (i += i ? "." + u : u), this.isItStopNode(this.options.stopNodes, i, u)) {
|
|
5692
|
-
let
|
|
5689
|
+
let $ = "";
|
|
5693
5690
|
if (p.length > 0 && p.lastIndexOf("/") === p.length - 1)
|
|
5694
5691
|
u[u.length - 1] === "/" ? (u = u.substr(0, u.length - 1), i = i.substr(0, i.length - 1), p = u) : p = p.substr(0, p.length - 1), s = l.closeIndex;
|
|
5695
5692
|
else if (this.options.unpairedTags.indexOf(u) !== -1)
|
|
@@ -5697,18 +5694,18 @@ const _b = function(t) {
|
|
|
5697
5694
|
else {
|
|
5698
5695
|
const D = this.readStopNodeData(t, d, g + 1);
|
|
5699
5696
|
if (!D) throw new Error(`Unexpected end of ${d}`);
|
|
5700
|
-
s = D.i,
|
|
5697
|
+
s = D.i, $ = D.tagContent;
|
|
5701
5698
|
}
|
|
5702
5699
|
const C = new fs(u);
|
|
5703
|
-
u !== p && h && (C[":@"] = this.buildAttributesMap(p, i, u)),
|
|
5700
|
+
u !== p && h && (C[":@"] = this.buildAttributesMap(p, i, u)), $ && ($ = this.parseTextData($, u, i, !0, h, !0, !0)), i = i.substr(0, i.lastIndexOf(".")), C.add(this.options.textNodeName, $), this.addChild(n, C, i);
|
|
5704
5701
|
} else {
|
|
5705
5702
|
if (p.length > 0 && p.lastIndexOf("/") === p.length - 1) {
|
|
5706
5703
|
u[u.length - 1] === "/" ? (u = u.substr(0, u.length - 1), i = i.substr(0, i.length - 1), p = u) : p = p.substr(0, p.length - 1), this.options.transformTagName && (u = this.options.transformTagName(u));
|
|
5707
|
-
const
|
|
5708
|
-
u !== p && h && (
|
|
5704
|
+
const $ = new fs(u);
|
|
5705
|
+
u !== p && h && ($[":@"] = this.buildAttributesMap(p, i, u)), this.addChild(n, $, i), i = i.substr(0, i.lastIndexOf("."));
|
|
5709
5706
|
} else {
|
|
5710
|
-
const
|
|
5711
|
-
this.tagsNodeStack.push(n), u !== p && h && (
|
|
5707
|
+
const $ = new fs(u);
|
|
5708
|
+
this.tagsNodeStack.push(n), u !== p && h && ($[":@"] = this.buildAttributesMap(p, i, u)), this.addChild(n, $, i), n = $;
|
|
5712
5709
|
}
|
|
5713
5710
|
r = "", s = g;
|
|
5714
5711
|
}
|
|
@@ -5939,8 +5936,8 @@ function t_(t, e, n, r) {
|
|
|
5939
5936
|
if (u === void 0) continue;
|
|
5940
5937
|
let d = "";
|
|
5941
5938
|
if (n.length === 0 ? d = u : d = `${n}.${u}`, u === e.textNodeName) {
|
|
5942
|
-
let
|
|
5943
|
-
Lb(d, e) || (
|
|
5939
|
+
let $ = l[u];
|
|
5940
|
+
Lb(d, e) || ($ = e.tagValueProcessor(u, $), $ = n_($, e)), s && (i += r), i += $, s = !1;
|
|
5944
5941
|
continue;
|
|
5945
5942
|
} else if (u === e.cdataPropName) {
|
|
5946
5943
|
s && (i += r), i += `<![CDATA[${l[u][0][e.textNodeName]}]]>`, s = !1;
|
|
@@ -5949,9 +5946,9 @@ function t_(t, e, n, r) {
|
|
|
5949
5946
|
i += r + `<!--${l[u][0][e.textNodeName]}-->`, s = !0;
|
|
5950
5947
|
continue;
|
|
5951
5948
|
} else if (u[0] === "?") {
|
|
5952
|
-
const
|
|
5949
|
+
const $ = $h(l[":@"], e), C = u === "?xml" ? "" : r;
|
|
5953
5950
|
let D = l[u][0][e.textNodeName];
|
|
5954
|
-
D = D.length !== 0 ? " " + D : "", i += C + `<${u}${D}${
|
|
5951
|
+
D = D.length !== 0 ? " " + D : "", i += C + `<${u}${D}${$}?>`, s = !0;
|
|
5955
5952
|
continue;
|
|
5956
5953
|
}
|
|
5957
5954
|
let p = r;
|
|
@@ -6171,7 +6168,7 @@ function Jb(t, e, n) {
|
|
|
6171
6168
|
});
|
|
6172
6169
|
}
|
|
6173
6170
|
async function Yb(t, e, n, r, i) {
|
|
6174
|
-
var b,
|
|
6171
|
+
var b, $, C;
|
|
6175
6172
|
if (!n.redirect_uri)
|
|
6176
6173
|
throw new E(400, {
|
|
6177
6174
|
message: "Missing redirect_uri in authParams"
|
|
@@ -6201,7 +6198,7 @@ async function Yb(t, e, n, r, i) {
|
|
|
6201
6198
|
audience: u || n.client_id,
|
|
6202
6199
|
destination: h.toString(),
|
|
6203
6200
|
inResponseTo: p.requestId,
|
|
6204
|
-
userId: ((C = (
|
|
6201
|
+
userId: ((C = ($ = r.app_metadata) == null ? void 0 : $.vimeo) == null ? void 0 : C.user_id) || r.user_id,
|
|
6205
6202
|
email: r.email,
|
|
6206
6203
|
sessionIndex: i,
|
|
6207
6204
|
signature: {
|
|
@@ -6592,30 +6589,30 @@ async function t3(t, e) {
|
|
|
6592
6589
|
);
|
|
6593
6590
|
if (!b)
|
|
6594
6591
|
return { scopes: a, permissions: [] };
|
|
6595
|
-
const
|
|
6592
|
+
const $ = b.scope || [], C = (d.scopes || []).map(
|
|
6596
6593
|
(q) => q.value
|
|
6597
6594
|
);
|
|
6598
6595
|
if (!p) {
|
|
6599
6596
|
let q;
|
|
6600
|
-
return s.length === 0 ? q =
|
|
6597
|
+
return s.length === 0 ? q = $.filter(
|
|
6601
6598
|
(H) => C.includes(H)
|
|
6602
6599
|
) : q = s.filter(
|
|
6603
|
-
(H) => C.includes(H) &&
|
|
6600
|
+
(H) => C.includes(H) && $.includes(H)
|
|
6604
6601
|
), { scopes: [
|
|
6605
6602
|
.../* @__PURE__ */ new Set([...a, ...q])
|
|
6606
6603
|
], permissions: [] };
|
|
6607
6604
|
}
|
|
6608
6605
|
if (h === "access_token_authz") {
|
|
6609
|
-
const q =
|
|
6606
|
+
const q = $.filter(
|
|
6610
6607
|
(M) => C.includes(M)
|
|
6611
6608
|
);
|
|
6612
6609
|
return { scopes: a, permissions: q };
|
|
6613
6610
|
}
|
|
6614
6611
|
let D;
|
|
6615
|
-
return s.length === 0 ? D =
|
|
6612
|
+
return s.length === 0 ? D = $.filter(
|
|
6616
6613
|
(q) => C.includes(q)
|
|
6617
6614
|
) : D = s.filter(
|
|
6618
|
-
(q) => C.includes(q) &&
|
|
6615
|
+
(q) => C.includes(q) && $.includes(q)
|
|
6619
6616
|
), { scopes: [
|
|
6620
6617
|
.../* @__PURE__ */ new Set([...a, ...D])
|
|
6621
6618
|
], permissions: [] };
|
|
@@ -6662,7 +6659,7 @@ async function va(t, e) {
|
|
|
6662
6659
|
.../* @__PURE__ */ new Set([...l, ...Y])
|
|
6663
6660
|
], permissions: [] };
|
|
6664
6661
|
}
|
|
6665
|
-
const
|
|
6662
|
+
const $ = await t.env.data.userPermissions.list(
|
|
6666
6663
|
n,
|
|
6667
6664
|
r,
|
|
6668
6665
|
void 0,
|
|
@@ -6687,7 +6684,7 @@ async function va(t, e) {
|
|
|
6687
6684
|
j.resource_server_identifier === i && A.push(j.permission_name);
|
|
6688
6685
|
});
|
|
6689
6686
|
const z = /* @__PURE__ */ new Set();
|
|
6690
|
-
|
|
6687
|
+
$.forEach((Y) => {
|
|
6691
6688
|
Y.resource_server_identifier === i && z.add(Y.permission_name);
|
|
6692
6689
|
}), A.forEach((Y) => {
|
|
6693
6690
|
z.add(Y);
|
|
@@ -6726,7 +6723,7 @@ async function yc(t, e) {
|
|
|
6726
6723
|
sid: s,
|
|
6727
6724
|
...a && { org_id: a.id },
|
|
6728
6725
|
...l && l.length > 0 && { permissions: l }
|
|
6729
|
-
},
|
|
6726
|
+
}, $ = r && ((A = n.scope) != null && A.split(" ").includes("openid")) ? {
|
|
6730
6727
|
// The audience for an id token is the client id
|
|
6731
6728
|
aud: n.client_id,
|
|
6732
6729
|
sub: r.user_id,
|
|
@@ -6772,7 +6769,7 @@ async function yc(t, e) {
|
|
|
6772
6769
|
setCustomClaim: (q, M) => {
|
|
6773
6770
|
if (xh.includes(q))
|
|
6774
6771
|
throw new Error(`Cannot overwrite reserved claim '${q}'`);
|
|
6775
|
-
|
|
6772
|
+
$ && ($[q] = M);
|
|
6776
6773
|
}
|
|
6777
6774
|
},
|
|
6778
6775
|
access: {
|
|
@@ -6795,7 +6792,7 @@ async function yc(t, e) {
|
|
|
6795
6792
|
h,
|
|
6796
6793
|
b,
|
|
6797
6794
|
C
|
|
6798
|
-
), O =
|
|
6795
|
+
), O = $ ? await _h("RS256", h, $, C) : void 0;
|
|
6799
6796
|
return {
|
|
6800
6797
|
access_token: D,
|
|
6801
6798
|
refresh_token: e.refresh_token,
|
|
@@ -6884,7 +6881,7 @@ async function a_(t, { user: e, client: n, loginSession: r }) {
|
|
|
6884
6881
|
}), i;
|
|
6885
6882
|
}
|
|
6886
6883
|
async function On(t, e) {
|
|
6887
|
-
var
|
|
6884
|
+
var $, C;
|
|
6888
6885
|
const { authParams: n, client: r, ticketAuth: i } = e;
|
|
6889
6886
|
let { user: s } = e;
|
|
6890
6887
|
const a = n.response_type || cn.CODE, l = n.response_mode || Kn.QUERY, u = Ve(t, {
|
|
@@ -6921,7 +6918,7 @@ async function On(t, e) {
|
|
|
6921
6918
|
});
|
|
6922
6919
|
}
|
|
6923
6920
|
let d = e.refreshToken, p = e.sessionId;
|
|
6924
|
-
if (!p && ((
|
|
6921
|
+
if (!p && (($ = e.loginSession) != null && $.session_id)) {
|
|
6925
6922
|
p = e.loginSession.session_id;
|
|
6926
6923
|
const D = await t.env.data.sessions.get(
|
|
6927
6924
|
r.tenant.id,
|
|
@@ -7070,8 +7067,8 @@ async function n3(t, e) {
|
|
|
7070
7067
|
organizationId: (u = e.organization) == null ? void 0 : u.id
|
|
7071
7068
|
});
|
|
7072
7069
|
else {
|
|
7073
|
-
const
|
|
7074
|
-
if (
|
|
7070
|
+
const $ = (n == null ? void 0 : n.user_id) || ((d = e.user) == null ? void 0 : d.user_id);
|
|
7071
|
+
if (!$)
|
|
7075
7072
|
throw new Oi(400, {
|
|
7076
7073
|
error: "invalid_request",
|
|
7077
7074
|
error_description: "User ID is required for user-based grants"
|
|
@@ -7079,7 +7076,7 @@ async function n3(t, e) {
|
|
|
7079
7076
|
b = await va(t, {
|
|
7080
7077
|
grantType: e.grantType,
|
|
7081
7078
|
tenantId: e.client.tenant.id,
|
|
7082
|
-
userId:
|
|
7079
|
+
userId: $,
|
|
7083
7080
|
clientId: e.client.client_id,
|
|
7084
7081
|
audience: e.authParams.audience,
|
|
7085
7082
|
requestedScopes: ((p = e.authParams.scope) == null ? void 0 : p.split(" ")) || [],
|
|
@@ -7374,19 +7371,19 @@ function l3(t, e) {
|
|
|
7374
7371
|
};
|
|
7375
7372
|
}
|
|
7376
7373
|
async function u3(t, e, n, r) {
|
|
7377
|
-
var i;
|
|
7378
|
-
if (e.disable_sign_ups) {
|
|
7379
|
-
const
|
|
7380
|
-
if (!(
|
|
7374
|
+
var i, s;
|
|
7375
|
+
if (((i = e.client_metadata) == null ? void 0 : i.disable_sign_ups) === "true") {
|
|
7376
|
+
const a = (s = t.var.loginSession) == null ? void 0 : s.authorization_url;
|
|
7377
|
+
if (!(a && new URL(a).searchParams.get("screen_hint") === "signup") && !await Ap({
|
|
7381
7378
|
userAdapter: n.users,
|
|
7382
7379
|
tenant_id: e.tenant.id,
|
|
7383
7380
|
email: r
|
|
7384
7381
|
})) {
|
|
7385
|
-
const
|
|
7382
|
+
const d = Ve(t, {
|
|
7386
7383
|
type: qe.FAILED_SIGNUP,
|
|
7387
7384
|
description: "Public signup is disabled"
|
|
7388
7385
|
});
|
|
7389
|
-
throw await n.logs.create(e.tenant.id,
|
|
7386
|
+
throw await n.logs.create(e.tenant.id, d), new E(400, {
|
|
7390
7387
|
message: "Signups are disabled for this client"
|
|
7391
7388
|
});
|
|
7392
7389
|
}
|
|
@@ -7404,7 +7401,7 @@ function ao(t, e) {
|
|
|
7404
7401
|
};
|
|
7405
7402
|
}
|
|
7406
7403
|
async function d3(t, e, n, r, i, s) {
|
|
7407
|
-
var p, h, g, b,
|
|
7404
|
+
var p, h, g, b, $, C, D, O, A, z, q, M, H, X;
|
|
7408
7405
|
let a = [];
|
|
7409
7406
|
try {
|
|
7410
7407
|
a = (await e.userRoles.list(
|
|
@@ -7484,7 +7481,7 @@ async function d3(t, e, n, r, i, s) {
|
|
|
7484
7481
|
// Not available in current authParams
|
|
7485
7482
|
prompt: (g = i.authParams) == null ? void 0 : g.prompt,
|
|
7486
7483
|
redirect_uri: (b = i.authParams) == null ? void 0 : b.redirect_uri,
|
|
7487
|
-
requested_scopes: ((C = (
|
|
7484
|
+
requested_scopes: ((C = ($ = i.authParams) == null ? void 0 : $.scope) == null ? void 0 : C.split(" ")) || [],
|
|
7488
7485
|
response_mode: (D = i.authParams) == null ? void 0 : D.response_mode,
|
|
7489
7486
|
response_type: (O = i.authParams) == null ? void 0 : O.response_type,
|
|
7490
7487
|
state: (A = i.authParams) == null ? void 0 : A.state,
|
|
@@ -7561,8 +7558,8 @@ async function p3(t, e, n, r, i, s) {
|
|
|
7561
7558
|
redirect: {
|
|
7562
7559
|
sendUserTo: (h, g) => {
|
|
7563
7560
|
const b = new URL(h, t.req.url);
|
|
7564
|
-
b.searchParams.set("state", i.id), g != null && g.query && Object.entries(g.query).forEach(([
|
|
7565
|
-
b.searchParams.set(
|
|
7561
|
+
b.searchParams.set("state", i.id), g != null && g.query && Object.entries(g.query).forEach(([$, C]) => {
|
|
7562
|
+
b.searchParams.set($, C);
|
|
7566
7563
|
}), d = b.toString();
|
|
7567
7564
|
},
|
|
7568
7565
|
encodeToken: (h) => JSON.stringify({
|
|
@@ -7795,7 +7792,7 @@ const kh = qt.extend({
|
|
|
7795
7792
|
per_page: n,
|
|
7796
7793
|
include_totals: r,
|
|
7797
7794
|
q: `email:${d}`
|
|
7798
|
-
})).users.filter((
|
|
7795
|
+
})).users.filter(($) => $.linked_to), [g] = h;
|
|
7799
7796
|
if (!g)
|
|
7800
7797
|
return t.json([]);
|
|
7801
7798
|
const b = await t.env.data.users.get(
|
|
@@ -8648,7 +8645,7 @@ var Nh;
|
|
|
8648
8645
|
} : function(R, I) {
|
|
8649
8646
|
return R[I];
|
|
8650
8647
|
}
|
|
8651
|
-
}, h = Object.getPrototypeOf(Function), g = typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : le(), b = typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : Wt(),
|
|
8648
|
+
}, h = Object.getPrototypeOf(Function), g = typeof Map == "function" && typeof Map.prototype.entries == "function" ? Map : le(), b = typeof Set == "function" && typeof Set.prototype.entries == "function" ? Set : Wt(), $ = typeof WeakMap == "function" ? WeakMap : Lt(), C = i ? Symbol.for("@reflect-metadata:registry") : void 0, D = bn(), O = Et(D);
|
|
8652
8649
|
function A(R, I, V, ne) {
|
|
8653
8650
|
if (ee(V)) {
|
|
8654
8651
|
if (!Pt(R))
|
|
@@ -8810,12 +8807,12 @@ var Nh;
|
|
|
8810
8807
|
if (V.length <= 0)
|
|
8811
8808
|
return ve;
|
|
8812
8809
|
for (var it = new b(), Be = [], c = 0, f = V; c < f.length; c++) {
|
|
8813
|
-
var y = f[c],
|
|
8814
|
-
|
|
8810
|
+
var y = f[c], x = it.has(y);
|
|
8811
|
+
x || (it.add(y), Be.push(y));
|
|
8815
8812
|
}
|
|
8816
8813
|
for (var v = 0, S = ve; v < S.length; v++) {
|
|
8817
|
-
var y = S[v],
|
|
8818
|
-
|
|
8814
|
+
var y = S[v], x = it.has(y);
|
|
8815
|
+
x || (it.add(y), Be.push(y));
|
|
8819
8816
|
}
|
|
8820
8817
|
return Be;
|
|
8821
8818
|
}
|
|
@@ -8975,10 +8972,10 @@ var Nh;
|
|
|
8975
8972
|
function Gt() {
|
|
8976
8973
|
var R;
|
|
8977
8974
|
!ee(C) && typeof n.Reflect < "u" && !(C in n.Reflect) && typeof n.Reflect.defineMetadata == "function" && (R = nn(n.Reflect));
|
|
8978
|
-
var I, V, ne, ve = new
|
|
8975
|
+
var I, V, ne, ve = new $(), it = {
|
|
8979
8976
|
registerProvider: Be,
|
|
8980
8977
|
getProvider: f,
|
|
8981
|
-
setProvider:
|
|
8978
|
+
setProvider: x
|
|
8982
8979
|
};
|
|
8983
8980
|
return it;
|
|
8984
8981
|
function Be(v) {
|
|
@@ -9032,7 +9029,7 @@ var Nh;
|
|
|
9032
9029
|
throw new TypeError();
|
|
9033
9030
|
return I === v || V === v || !ee(ne) && ne.has(v);
|
|
9034
9031
|
}
|
|
9035
|
-
function
|
|
9032
|
+
function x(v, S, J) {
|
|
9036
9033
|
if (!y(J))
|
|
9037
9034
|
throw new Error("Metadata provider not registered.");
|
|
9038
9035
|
var ye = f(v, S);
|
|
@@ -9055,10 +9052,10 @@ var Nh;
|
|
|
9055
9052
|
}), R;
|
|
9056
9053
|
}
|
|
9057
9054
|
function Et(R) {
|
|
9058
|
-
var I = new
|
|
9059
|
-
isProviderFor: function(y,
|
|
9055
|
+
var I = new $(), V = {
|
|
9056
|
+
isProviderFor: function(y, x) {
|
|
9060
9057
|
var v = I.get(y);
|
|
9061
|
-
return ee(v) ? !1 : v.has(
|
|
9058
|
+
return ee(v) ? !1 : v.has(x);
|
|
9062
9059
|
},
|
|
9063
9060
|
OrdinaryDefineOwnMetadata: Be,
|
|
9064
9061
|
OrdinaryHasOwnMetadata: ve,
|
|
@@ -9067,34 +9064,34 @@ var Nh;
|
|
|
9067
9064
|
OrdinaryDeleteMetadata: f
|
|
9068
9065
|
};
|
|
9069
9066
|
return D.registerProvider(V), V;
|
|
9070
|
-
function ne(y,
|
|
9067
|
+
function ne(y, x, v) {
|
|
9071
9068
|
var S = I.get(y), J = !1;
|
|
9072
9069
|
if (ee(S)) {
|
|
9073
9070
|
if (!v)
|
|
9074
9071
|
return;
|
|
9075
9072
|
S = new g(), I.set(y, S), J = !0;
|
|
9076
9073
|
}
|
|
9077
|
-
var ye = S.get(
|
|
9074
|
+
var ye = S.get(x);
|
|
9078
9075
|
if (ee(ye)) {
|
|
9079
9076
|
if (!v)
|
|
9080
9077
|
return;
|
|
9081
|
-
if (ye = new g(), S.set(
|
|
9082
|
-
throw S.delete(
|
|
9078
|
+
if (ye = new g(), S.set(x, ye), !R.setProvider(y, x, V))
|
|
9079
|
+
throw S.delete(x), J && I.delete(y), new Error("Wrong provider for target.");
|
|
9083
9080
|
}
|
|
9084
9081
|
return ye;
|
|
9085
9082
|
}
|
|
9086
|
-
function ve(y,
|
|
9083
|
+
function ve(y, x, v) {
|
|
9087
9084
|
var S = ne(
|
|
9088
|
-
|
|
9085
|
+
x,
|
|
9089
9086
|
v,
|
|
9090
9087
|
/*Create*/
|
|
9091
9088
|
!1
|
|
9092
9089
|
);
|
|
9093
9090
|
return ee(S) ? !1 : te(S.has(y));
|
|
9094
9091
|
}
|
|
9095
|
-
function it(y,
|
|
9092
|
+
function it(y, x, v) {
|
|
9096
9093
|
var S = ne(
|
|
9097
|
-
|
|
9094
|
+
x,
|
|
9098
9095
|
v,
|
|
9099
9096
|
/*Create*/
|
|
9100
9097
|
!1
|
|
@@ -9102,19 +9099,19 @@ var Nh;
|
|
|
9102
9099
|
if (!ee(S))
|
|
9103
9100
|
return S.get(y);
|
|
9104
9101
|
}
|
|
9105
|
-
function Be(y,
|
|
9102
|
+
function Be(y, x, v, S) {
|
|
9106
9103
|
var J = ne(
|
|
9107
9104
|
v,
|
|
9108
9105
|
S,
|
|
9109
9106
|
/*Create*/
|
|
9110
9107
|
!0
|
|
9111
9108
|
);
|
|
9112
|
-
J.set(y,
|
|
9109
|
+
J.set(y, x);
|
|
9113
9110
|
}
|
|
9114
|
-
function c(y,
|
|
9111
|
+
function c(y, x) {
|
|
9115
9112
|
var v = [], S = ne(
|
|
9116
9113
|
y,
|
|
9117
|
-
|
|
9114
|
+
x,
|
|
9118
9115
|
/*Create*/
|
|
9119
9116
|
!1
|
|
9120
9117
|
);
|
|
@@ -9137,9 +9134,9 @@ var Nh;
|
|
|
9137
9134
|
Ie++;
|
|
9138
9135
|
}
|
|
9139
9136
|
}
|
|
9140
|
-
function f(y,
|
|
9137
|
+
function f(y, x, v) {
|
|
9141
9138
|
var S = ne(
|
|
9142
|
-
|
|
9139
|
+
x,
|
|
9143
9140
|
v,
|
|
9144
9141
|
/*Create*/
|
|
9145
9142
|
!1
|
|
@@ -9147,17 +9144,17 @@ var Nh;
|
|
|
9147
9144
|
if (ee(S) || !S.delete(y))
|
|
9148
9145
|
return !1;
|
|
9149
9146
|
if (S.size === 0) {
|
|
9150
|
-
var J = I.get(
|
|
9147
|
+
var J = I.get(x);
|
|
9151
9148
|
ee(J) || (J.delete(v), J.size === 0 && I.delete(J));
|
|
9152
9149
|
}
|
|
9153
9150
|
return !0;
|
|
9154
9151
|
}
|
|
9155
9152
|
}
|
|
9156
9153
|
function nn(R) {
|
|
9157
|
-
var I = R.defineMetadata, V = R.hasOwnMetadata, ne = R.getOwnMetadata, ve = R.getOwnMetadataKeys, it = R.deleteMetadata, Be = new
|
|
9154
|
+
var I = R.defineMetadata, V = R.hasOwnMetadata, ne = R.getOwnMetadata, ve = R.getOwnMetadataKeys, it = R.deleteMetadata, Be = new $(), c = {
|
|
9158
9155
|
isProviderFor: function(f, y) {
|
|
9159
|
-
var
|
|
9160
|
-
return !ee(
|
|
9156
|
+
var x = Be.get(f);
|
|
9157
|
+
return !ee(x) && x.has(y) ? !0 : ve(f, y).length ? (ee(x) && (x = new b(), Be.set(f, x)), x.add(y), !0) : !1;
|
|
9161
9158
|
},
|
|
9162
9159
|
OrdinaryDefineOwnMetadata: I,
|
|
9163
9160
|
OrdinaryHasOwnMetadata: V,
|
|
@@ -9181,8 +9178,8 @@ var Nh;
|
|
|
9181
9178
|
var R = {}, I = [], V = (
|
|
9182
9179
|
/** @class */
|
|
9183
9180
|
function() {
|
|
9184
|
-
function c(f, y,
|
|
9185
|
-
this._index = 0, this._keys = f, this._values = y, this._selector =
|
|
9181
|
+
function c(f, y, x) {
|
|
9182
|
+
this._index = 0, this._keys = f, this._values = y, this._selector = x;
|
|
9186
9183
|
}
|
|
9187
9184
|
return c.prototype["@@iterator"] = function() {
|
|
9188
9185
|
return this;
|
|
@@ -9227,12 +9224,12 @@ var Nh;
|
|
|
9227
9224
|
);
|
|
9228
9225
|
return y >= 0 ? this._values[y] : void 0;
|
|
9229
9226
|
}, c.prototype.set = function(f, y) {
|
|
9230
|
-
var
|
|
9227
|
+
var x = this._find(
|
|
9231
9228
|
f,
|
|
9232
9229
|
/*insert*/
|
|
9233
9230
|
!0
|
|
9234
9231
|
);
|
|
9235
|
-
return this._values[
|
|
9232
|
+
return this._values[x] = y, this;
|
|
9236
9233
|
}, c.prototype.delete = function(f) {
|
|
9237
9234
|
var y = this._find(
|
|
9238
9235
|
f,
|
|
@@ -9240,7 +9237,7 @@ var Nh;
|
|
|
9240
9237
|
!1
|
|
9241
9238
|
);
|
|
9242
9239
|
if (y >= 0) {
|
|
9243
|
-
for (var
|
|
9240
|
+
for (var x = this._keys.length, v = y + 1; v < x; v++)
|
|
9244
9241
|
this._keys[v - 1] = this._keys[v], this._values[v - 1] = this._values[v];
|
|
9245
9242
|
return this._keys.length--, this._values.length--, us(f, this._cacheKey) && (this._cacheKey = R, this._cacheIndex = -2), !0;
|
|
9246
9243
|
}
|
|
@@ -9260,9 +9257,9 @@ var Nh;
|
|
|
9260
9257
|
}, c.prototype._find = function(f, y) {
|
|
9261
9258
|
if (!us(this._cacheKey, f)) {
|
|
9262
9259
|
this._cacheIndex = -1;
|
|
9263
|
-
for (var
|
|
9264
|
-
if (us(this._keys[
|
|
9265
|
-
this._cacheIndex =
|
|
9260
|
+
for (var x = 0; x < this._keys.length; x++)
|
|
9261
|
+
if (us(this._keys[x], f)) {
|
|
9262
|
+
this._cacheIndex = x;
|
|
9266
9263
|
break;
|
|
9267
9264
|
}
|
|
9268
9265
|
}
|
|
@@ -9326,33 +9323,33 @@ var Nh;
|
|
|
9326
9323
|
this._key = ne();
|
|
9327
9324
|
}
|
|
9328
9325
|
return f.prototype.has = function(y) {
|
|
9329
|
-
var
|
|
9326
|
+
var x = ve(
|
|
9330
9327
|
y,
|
|
9331
9328
|
/*create*/
|
|
9332
9329
|
!1
|
|
9333
9330
|
);
|
|
9334
|
-
return
|
|
9331
|
+
return x !== void 0 ? p.has(x, this._key) : !1;
|
|
9335
9332
|
}, f.prototype.get = function(y) {
|
|
9336
|
-
var
|
|
9333
|
+
var x = ve(
|
|
9337
9334
|
y,
|
|
9338
9335
|
/*create*/
|
|
9339
9336
|
!1
|
|
9340
9337
|
);
|
|
9341
|
-
return
|
|
9342
|
-
}, f.prototype.set = function(y,
|
|
9338
|
+
return x !== void 0 ? p.get(x, this._key) : void 0;
|
|
9339
|
+
}, f.prototype.set = function(y, x) {
|
|
9343
9340
|
var v = ve(
|
|
9344
9341
|
y,
|
|
9345
9342
|
/*create*/
|
|
9346
9343
|
!0
|
|
9347
9344
|
);
|
|
9348
|
-
return v[this._key] =
|
|
9345
|
+
return v[this._key] = x, this;
|
|
9349
9346
|
}, f.prototype.delete = function(y) {
|
|
9350
|
-
var
|
|
9347
|
+
var x = ve(
|
|
9351
9348
|
y,
|
|
9352
9349
|
/*create*/
|
|
9353
9350
|
!1
|
|
9354
9351
|
);
|
|
9355
|
-
return
|
|
9352
|
+
return x !== void 0 ? delete x[this._key] : !1;
|
|
9356
9353
|
}, f.prototype.clear = function() {
|
|
9357
9354
|
this._key = ne();
|
|
9358
9355
|
}, f;
|
|
@@ -9374,8 +9371,8 @@ var Nh;
|
|
|
9374
9371
|
return f[V];
|
|
9375
9372
|
}
|
|
9376
9373
|
function it(f, y) {
|
|
9377
|
-
for (var
|
|
9378
|
-
f[
|
|
9374
|
+
for (var x = 0; x < y; ++x)
|
|
9375
|
+
f[x] = Math.random() * 255 | 0;
|
|
9379
9376
|
return f;
|
|
9380
9377
|
}
|
|
9381
9378
|
function Be(f) {
|
|
@@ -9388,9 +9385,9 @@ var Nh;
|
|
|
9388
9385
|
function c() {
|
|
9389
9386
|
var f = Be(R);
|
|
9390
9387
|
f[6] = f[6] & 79 | 64, f[8] = f[8] & 191 | 128;
|
|
9391
|
-
for (var y = "",
|
|
9392
|
-
var v = f[
|
|
9393
|
-
(
|
|
9388
|
+
for (var y = "", x = 0; x < R; ++x) {
|
|
9389
|
+
var v = f[x];
|
|
9390
|
+
(x === 4 || x === 6 || x === 8) && (y += "-"), v < 16 && (y += "0"), y += v.toString(16).toLowerCase();
|
|
9394
9391
|
}
|
|
9395
9392
|
return y;
|
|
9396
9393
|
}
|
|
@@ -11489,13 +11486,13 @@ class jc extends uo {
|
|
|
11489
11486
|
if (g === -1 && (g = r.indexOf("-"), h = -1), g !== -1) {
|
|
11490
11487
|
if (b = r.substring(g + 1), r = r.substring(0, g), b.length !== 2 && b.length !== 4)
|
|
11491
11488
|
throw new Error("Wrong input string for conversion");
|
|
11492
|
-
let
|
|
11493
|
-
if (isNaN(
|
|
11489
|
+
let $ = parseInt(b.substring(0, 2), 10);
|
|
11490
|
+
if (isNaN($.valueOf()))
|
|
11494
11491
|
throw new Error("Wrong input string for conversion");
|
|
11495
|
-
if (l = h *
|
|
11496
|
-
if (
|
|
11492
|
+
if (l = h * $, b.length === 4) {
|
|
11493
|
+
if ($ = parseInt(b.substring(2, 4), 10), isNaN($.valueOf()))
|
|
11497
11494
|
throw new Error("Wrong input string for conversion");
|
|
11498
|
-
u = h *
|
|
11495
|
+
u = h * $;
|
|
11499
11496
|
}
|
|
11500
11497
|
}
|
|
11501
11498
|
}
|
|
@@ -17385,9 +17382,9 @@ class u$ {
|
|
|
17385
17382
|
hash: "SHA-256"
|
|
17386
17383
|
}, p = "signingKey" in e ? { ...d, ...e.signingAlgorithm, ...e.signingKey.algorithm } : { ...d, ...e.signingAlgorithm }, h = mt.resolve(Zr);
|
|
17387
17384
|
u.tbsCertificate.signature = u.signatureAlgorithm = h.toAsnAlgorithm(p);
|
|
17388
|
-
const g = re.serialize(u.tbsCertificate), b = "signingKey" in e ? await n.subtle.sign(p, e.signingKey, g) : e.signature,
|
|
17385
|
+
const g = re.serialize(u.tbsCertificate), b = "signingKey" in e ? await n.subtle.sign(p, e.signingKey, g) : e.signature, $ = mt.resolveAll(So).reverse();
|
|
17389
17386
|
let C = null;
|
|
17390
|
-
for (const D of
|
|
17387
|
+
for (const D of $)
|
|
17391
17388
|
if (C = D.toAsnSignature(p, b), C)
|
|
17392
17389
|
break;
|
|
17393
17390
|
if (!C)
|
|
@@ -19056,16 +19053,16 @@ function mf(t) {
|
|
|
19056
19053
|
message: "Missing bearer token"
|
|
19057
19054
|
});
|
|
19058
19055
|
try {
|
|
19059
|
-
const
|
|
19060
|
-
e.set("user_id",
|
|
19061
|
-
const C =
|
|
19056
|
+
const $ = await Q$(e, b);
|
|
19057
|
+
e.set("user_id", $.sub), e.set("user", $);
|
|
19058
|
+
const C = $.permissions || [], D = ((d = $.scope) == null ? void 0 : d.split(" ")) || [];
|
|
19062
19059
|
if (p.length && !// Should we check both?
|
|
19063
19060
|
(p.some(
|
|
19064
19061
|
(O) => C.includes(O)
|
|
19065
19062
|
) || p.some((O) => D.includes(O))))
|
|
19066
19063
|
throw new E(403, { message: "Unauthorized" });
|
|
19067
|
-
} catch (
|
|
19068
|
-
throw
|
|
19064
|
+
} catch ($) {
|
|
19065
|
+
throw $ instanceof E ? $ : new E(403, { message: "Invalid token" });
|
|
19069
19066
|
}
|
|
19070
19067
|
}
|
|
19071
19068
|
return await n();
|
|
@@ -19587,11 +19584,11 @@ function dl(t, e) {
|
|
|
19587
19584
|
typeof l == "function" ? s[a] = async (...u) => {
|
|
19588
19585
|
const d = performance.now();
|
|
19589
19586
|
try {
|
|
19590
|
-
const p = await l(...u), g = performance.now() - d, b = t.res.headers.get("Server-Timing") || "",
|
|
19591
|
-
return t.res.headers.set("Server-Timing",
|
|
19587
|
+
const p = await l(...u), g = performance.now() - d, b = t.res.headers.get("Server-Timing") || "", $ = b ? `${b}, ${r}-${a};dur=${g.toFixed(2)}` : `${r}-${a};dur=${g.toFixed(2)}`;
|
|
19588
|
+
return t.res.headers.set("Server-Timing", $), p;
|
|
19592
19589
|
} catch (p) {
|
|
19593
|
-
const g = performance.now() - d, b = t.res.headers.get("Server-Timing") || "",
|
|
19594
|
-
throw t.res.headers.set("Server-Timing",
|
|
19590
|
+
const g = performance.now() - d, b = t.res.headers.get("Server-Timing") || "", $ = b ? `${b}, ${r}-${a}-error;dur=${g.toFixed(2)}` : `${r}-${a}-error;dur=${g.toFixed(2)}`;
|
|
19591
|
+
throw t.res.headers.set("Server-Timing", $), p;
|
|
19595
19592
|
}
|
|
19596
19593
|
} : s[a] = l;
|
|
19597
19594
|
n[r] = s;
|
|
@@ -19685,12 +19682,12 @@ function gl(t, e) {
|
|
|
19685
19682
|
keyPrefix: l
|
|
19686
19683
|
} = e, u = new Set(s), d = a.length === 0, p = new Set(a), h = {};
|
|
19687
19684
|
for (const [g, b] of Object.entries(t)) {
|
|
19688
|
-
const
|
|
19685
|
+
const $ = d || p.has(g), C = {};
|
|
19689
19686
|
for (const [D, O] of Object.entries(
|
|
19690
19687
|
b
|
|
19691
19688
|
))
|
|
19692
19689
|
if (typeof O == "function") {
|
|
19693
|
-
if (
|
|
19690
|
+
if (!$) {
|
|
19694
19691
|
C[D] = O;
|
|
19695
19692
|
continue;
|
|
19696
19693
|
}
|
|
@@ -20650,13 +20647,13 @@ const ux = qt.extend({
|
|
|
20650
20647
|
subject_type: p
|
|
20651
20648
|
} = t.req.valid("query"), h = [];
|
|
20652
20649
|
u && h.push(`client_id:"${u}"`), l && h.push(`audience:"${l}"`), d !== void 0 && h.push(`allow_any_organization:${d}`), p && h.push(`subject_type:"${p}"`), s && h.push(`id:>${s}`);
|
|
20653
|
-
const g = h.length > 0 ? h.join(" AND ") : void 0, b = a ?? r,
|
|
20650
|
+
const g = h.length > 0 ? h.join(" AND ") : void 0, b = a ?? r, $ = await t.env.data.clientGrants.list(e, {
|
|
20654
20651
|
page: n,
|
|
20655
20652
|
per_page: b,
|
|
20656
20653
|
include_totals: i,
|
|
20657
20654
|
q: g
|
|
20658
20655
|
});
|
|
20659
|
-
return i ? t.json(
|
|
20656
|
+
return i ? t.json($) : t.json($.client_grants);
|
|
20660
20657
|
}
|
|
20661
20658
|
).openapi(
|
|
20662
20659
|
U({
|
|
@@ -21673,7 +21670,7 @@ class Ox {
|
|
|
21673
21670
|
}
|
|
21674
21671
|
let e = this.H[0], n = this.H[1], r = this.H[2], i = this.H[3], s = this.H[4], a = this.H[5], l = this.H[6], u = this.H[7];
|
|
21675
21672
|
for (let d = 0; d < 64; d++) {
|
|
21676
|
-
const p = (An(s, 6) ^ An(s, 11) ^ An(s, 25)) >>> 0, h = (s & a ^ ~s & l) >>> 0, g = u + p + h + Dx[d] + this.w[d] | 0, b = (An(e, 2) ^ An(e, 13) ^ An(e, 22)) >>> 0,
|
|
21673
|
+
const p = (An(s, 6) ^ An(s, 11) ^ An(s, 25)) >>> 0, h = (s & a ^ ~s & l) >>> 0, g = u + p + h + Dx[d] + this.w[d] | 0, b = (An(e, 2) ^ An(e, 13) ^ An(e, 22)) >>> 0, $ = (e & n ^ e & r ^ n & r) >>> 0, C = b + $ | 0;
|
|
21677
21674
|
u = l, l = a, a = s, s = i + g | 0, i = r, r = n, n = e, e = g + C | 0;
|
|
21678
21675
|
}
|
|
21679
21676
|
this.H[0] = e + this.H[0] | 0, this.H[1] = n + this.H[1] | 0, this.H[2] = r + this.H[2] | 0, this.H[3] = i + this.H[3] | 0, this.H[4] = s + this.H[4] | 0, this.H[5] = a + this.H[5] | 0, this.H[6] = l + this.H[6] | 0, this.H[7] = u + this.H[7] | 0;
|
|
@@ -22549,7 +22546,7 @@ async function ug(t, e, n, r) {
|
|
|
22549
22546
|
});
|
|
22550
22547
|
}
|
|
22551
22548
|
async function dg(t, { code: e, state: n }) {
|
|
22552
|
-
var
|
|
22549
|
+
var $;
|
|
22553
22550
|
const { env: r } = t, i = await r.data.codes.get(
|
|
22554
22551
|
t.var.tenant_id || "",
|
|
22555
22552
|
n,
|
|
@@ -22605,7 +22602,7 @@ async function dg(t, { code: e, state: n }) {
|
|
|
22605
22602
|
i.code_verifier
|
|
22606
22603
|
), { sub: p, ...h } = d;
|
|
22607
22604
|
t.set("user_id", p);
|
|
22608
|
-
const g = ((
|
|
22605
|
+
const g = (($ = d.email) == null ? void 0 : $.toLocaleLowerCase()) || `${l.name}.${p}@${new URL(t.env.ISSUER).hostname}`;
|
|
22609
22606
|
t.set("username", g);
|
|
22610
22607
|
const b = await wc(t, {
|
|
22611
22608
|
client: a,
|
|
@@ -24038,8 +24035,8 @@ var nA = ";ext=", fi = function(e) {
|
|
|
24038
24035
|
return "([".concat(gn, "]{1,").concat(e, "})");
|
|
24039
24036
|
};
|
|
24040
24037
|
function A1(t) {
|
|
24041
|
-
var e = "20", n = "15", r = "9", i = "6", s = "[ \\t,]*", a = "[:\\..]?[ \\t,-]*", l = "#?", u = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", d = "(?:[xx##~~]|int|int)", p = "[- ]+", h = "[ \\t]*", g = "(?:,{2}|;)", b = nA + fi(e),
|
|
24042
|
-
return b + "|" +
|
|
24038
|
+
var e = "20", n = "15", r = "9", i = "6", s = "[ \\t,]*", a = "[:\\..]?[ \\t,-]*", l = "#?", u = "(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)", d = "(?:[xx##~~]|int|int)", p = "[- ]+", h = "[ \\t]*", g = "(?:,{2}|;)", b = nA + fi(e), $ = s + u + a + fi(e) + l, C = s + d + a + fi(r) + l, D = p + fi(i) + "#", O = h + g + a + fi(n) + l, A = h + "(?:,)+" + a + fi(r) + l;
|
|
24039
|
+
return b + "|" + $ + "|" + C + "|" + D + "|" + O + "|" + A;
|
|
24043
24040
|
}
|
|
24044
24041
|
var rA = "[" + gn + "]{" + xf + "}", iA = "[" + Af + "]{0,1}(?:[" + rc + "]*[" + gn + "]){3,}[" + rc + gn + "]*", sA = new RegExp("^[" + Af + "]{0,1}(?:[" + rc + "]*[" + gn + "]){1,2}$", "i"), oA = iA + // Phone number extensions
|
|
24045
24042
|
"(?:" + A1() + ")?", aA = new RegExp(
|
|
@@ -24677,16 +24674,16 @@ function nE(t, e, n) {
|
|
|
24677
24674
|
var b = new bA(p, d, n.metadata);
|
|
24678
24675
|
return u && (b.country = u), g && (b.carrierCode = g), s && (b.ext = s), b.__countryCallingCodeSource = h, b;
|
|
24679
24676
|
}
|
|
24680
|
-
var
|
|
24677
|
+
var $ = (e.extended ? n.hasSelectedNumberingPlan() : u) ? er(d, n.nationalNumberPattern()) : !1;
|
|
24681
24678
|
return e.extended ? {
|
|
24682
24679
|
country: u,
|
|
24683
24680
|
countryCallingCode: p,
|
|
24684
24681
|
carrierCode: g,
|
|
24685
|
-
valid:
|
|
24686
|
-
possible:
|
|
24682
|
+
valid: $,
|
|
24683
|
+
possible: $ ? !0 : !!(e.extended === !0 && n.possibleLengths() && $1(d, n)),
|
|
24687
24684
|
phone: d,
|
|
24688
24685
|
ext: s
|
|
24689
|
-
} :
|
|
24686
|
+
} : $ ? sE(u, d, s) : {};
|
|
24690
24687
|
}
|
|
24691
24688
|
function rE(t, e, n) {
|
|
24692
24689
|
if (t) {
|
|
@@ -25050,7 +25047,7 @@ async function N1(t, {
|
|
|
25050
25047
|
throw new ti(
|
|
25051
25048
|
`${ft(t.env)}invalid-session?state=${b.id}`
|
|
25052
25049
|
);
|
|
25053
|
-
const
|
|
25050
|
+
const $ = await wc(t, {
|
|
25054
25051
|
client: p,
|
|
25055
25052
|
username: d,
|
|
25056
25053
|
provider: u,
|
|
@@ -25059,7 +25056,7 @@ async function N1(t, {
|
|
|
25059
25056
|
ip: t.var.ip
|
|
25060
25057
|
});
|
|
25061
25058
|
return await h.data.codes.used(p.tenant.id, r), {
|
|
25062
|
-
user:
|
|
25059
|
+
user: $,
|
|
25063
25060
|
client: p,
|
|
25064
25061
|
loginSession: b,
|
|
25065
25062
|
session_id: b.session_id,
|
|
@@ -25237,19 +25234,19 @@ const kE = new be().openapi(
|
|
|
25237
25234
|
}
|
|
25238
25235
|
const a = new Headers();
|
|
25239
25236
|
if (s.session_id) {
|
|
25240
|
-
const
|
|
25237
|
+
const $ = wa(
|
|
25241
25238
|
s.client.tenant.id,
|
|
25242
25239
|
s.session_id,
|
|
25243
25240
|
t.var.host || ""
|
|
25244
25241
|
);
|
|
25245
|
-
a.set("Set-Cookie",
|
|
25242
|
+
a.set("Set-Cookie", $);
|
|
25246
25243
|
}
|
|
25247
25244
|
let l = [];
|
|
25248
25245
|
if (s.authParams.audience)
|
|
25249
25246
|
try {
|
|
25250
|
-
let
|
|
25247
|
+
let $;
|
|
25251
25248
|
if (n.grant_type === En.ClientCredential)
|
|
25252
|
-
|
|
25249
|
+
$ = await va(t, {
|
|
25253
25250
|
grantType: En.ClientCredential,
|
|
25254
25251
|
tenantId: s.client.tenant.id,
|
|
25255
25252
|
clientId: s.client.client_id,
|
|
@@ -25263,7 +25260,7 @@ const kE = new be().openapi(
|
|
|
25263
25260
|
error: "invalid_request",
|
|
25264
25261
|
error_description: "User ID is required for user-based grants"
|
|
25265
25262
|
});
|
|
25266
|
-
|
|
25263
|
+
$ = await va(t, {
|
|
25267
25264
|
grantType: n.grant_type,
|
|
25268
25265
|
tenantId: s.client.tenant.id,
|
|
25269
25266
|
userId: s.user.user_id,
|
|
@@ -25273,11 +25270,11 @@ const kE = new be().openapi(
|
|
|
25273
25270
|
organizationId: (b = s.organization) == null ? void 0 : b.id
|
|
25274
25271
|
});
|
|
25275
25272
|
}
|
|
25276
|
-
s.authParams.scope =
|
|
25277
|
-
} catch (
|
|
25278
|
-
if (
|
|
25279
|
-
throw
|
|
25280
|
-
console.error("Error calculating scopes and permissions:",
|
|
25273
|
+
s.authParams.scope = $.scopes.join(" "), l = $.permissions;
|
|
25274
|
+
} catch ($) {
|
|
25275
|
+
if ($ instanceof E)
|
|
25276
|
+
throw $;
|
|
25277
|
+
console.error("Error calculating scopes and permissions:", $);
|
|
25281
25278
|
}
|
|
25282
25279
|
const u = await yc(t, {
|
|
25283
25280
|
...s,
|
|
@@ -25784,7 +25781,7 @@ const IE = new be().openapi(
|
|
|
25784
25781
|
useragent: p,
|
|
25785
25782
|
auth0Client: g
|
|
25786
25783
|
}
|
|
25787
|
-
),
|
|
25784
|
+
), $ = await n.data.codes.create(l.tenant.id, {
|
|
25788
25785
|
code_id: Ar(),
|
|
25789
25786
|
code_type: "otp",
|
|
25790
25787
|
login_id: b.id,
|
|
@@ -25793,14 +25790,14 @@ const IE = new be().openapi(
|
|
|
25793
25790
|
});
|
|
25794
25791
|
return i === "link" ? await If(t, {
|
|
25795
25792
|
to: u,
|
|
25796
|
-
code:
|
|
25793
|
+
code: $.code_id,
|
|
25797
25794
|
authParams: {
|
|
25798
25795
|
...s,
|
|
25799
25796
|
client_id: r
|
|
25800
25797
|
}
|
|
25801
25798
|
}) : await Tf(t, {
|
|
25802
25799
|
to: u,
|
|
25803
|
-
code:
|
|
25800
|
+
code: $.code_id
|
|
25804
25801
|
}), t.html("OK");
|
|
25805
25802
|
}
|
|
25806
25803
|
).openapi(
|
|
@@ -25891,7 +25888,7 @@ const IE = new be().openapi(
|
|
|
25891
25888
|
const q = z;
|
|
25892
25889
|
"message" in q && typeof q.message == "string" && (b = q.message);
|
|
25893
25890
|
}
|
|
25894
|
-
const
|
|
25891
|
+
const $ = t.get("ip"), C = t.get("useragent"), D = t.get("auth0_client"), O = Qn(D), A = await e.data.loginSessions.create(
|
|
25895
25892
|
h.tenant.id,
|
|
25896
25893
|
{
|
|
25897
25894
|
authParams: {
|
|
@@ -25900,7 +25897,7 @@ const IE = new be().openapi(
|
|
|
25900
25897
|
},
|
|
25901
25898
|
expires_at: new Date(Date.now() + ta).toISOString(),
|
|
25902
25899
|
csrf_token: Ke(),
|
|
25903
|
-
ip:
|
|
25900
|
+
ip: $,
|
|
25904
25901
|
useragent: C,
|
|
25905
25902
|
auth0Client: O
|
|
25906
25903
|
}
|
|
@@ -25922,6 +25919,7 @@ class vi extends E {
|
|
|
25922
25919
|
}
|
|
25923
25920
|
}
|
|
25924
25921
|
async function O1(t, e, n, r) {
|
|
25922
|
+
var b;
|
|
25925
25923
|
const { data: i } = t.env, { username: s } = n;
|
|
25926
25924
|
if (t.set("username", s), !s)
|
|
25927
25925
|
throw new E(400, { message: "Username is required" });
|
|
@@ -25932,11 +25930,11 @@ async function O1(t, e, n, r) {
|
|
|
25932
25930
|
provider: "auth2"
|
|
25933
25931
|
});
|
|
25934
25932
|
if (!a) {
|
|
25935
|
-
const
|
|
25933
|
+
const $ = Ve(t, {
|
|
25936
25934
|
type: qe.FAILED_LOGIN_INCORRECT_PASSWORD,
|
|
25937
25935
|
description: "Invalid user"
|
|
25938
25936
|
});
|
|
25939
|
-
throw on(t, i.logs.create(e.tenant.id,
|
|
25937
|
+
throw on(t, i.logs.create(e.tenant.id, $)), new vi(403, {
|
|
25940
25938
|
message: "User not found",
|
|
25941
25939
|
code: "USER_NOT_FOUND"
|
|
25942
25940
|
});
|
|
@@ -25950,11 +25948,11 @@ async function O1(t, e, n, r) {
|
|
|
25950
25948
|
t.set("connection", a.connection), t.set("user_id", l.user_id);
|
|
25951
25949
|
const u = await i.passwords.get(e.tenant.id, a.user_id);
|
|
25952
25950
|
if (!(u && await oo.compare(n.password, u.password))) {
|
|
25953
|
-
const
|
|
25951
|
+
const $ = Ve(t, {
|
|
25954
25952
|
type: qe.FAILED_LOGIN_INCORRECT_PASSWORD,
|
|
25955
25953
|
description: "Invalid password"
|
|
25956
25954
|
});
|
|
25957
|
-
throw on(t, i.logs.create(e.tenant.id,
|
|
25955
|
+
throw on(t, i.logs.create(e.tenant.id, $)), new vi(403, {
|
|
25958
25956
|
message: "Invalid password",
|
|
25959
25957
|
code: "INVALID_PASSWORD"
|
|
25960
25958
|
});
|
|
@@ -25965,25 +25963,25 @@ async function O1(t, e, n, r) {
|
|
|
25965
25963
|
include_totals: !1,
|
|
25966
25964
|
q: `user_id:${l.user_id}`
|
|
25967
25965
|
})).logs.filter(
|
|
25968
|
-
(
|
|
25966
|
+
($) => $.type === qe.FAILED_LOGIN_INCORRECT_PASSWORD && new Date($.date) > new Date(Date.now() - 1e3 * 60 * 5)
|
|
25969
25967
|
).length >= 3) {
|
|
25970
|
-
const
|
|
25968
|
+
const $ = Ve(t, {
|
|
25971
25969
|
// TODO: change to BLOCKED_ACCOUNT_EMAIL
|
|
25972
25970
|
type: qe.FAILED_LOGIN,
|
|
25973
25971
|
description: "Too many failed login attempts"
|
|
25974
25972
|
});
|
|
25975
|
-
throw on(t, i.logs.create(e.tenant.id,
|
|
25973
|
+
throw on(t, i.logs.create(e.tenant.id, $)), new vi(403, {
|
|
25976
25974
|
message: "Too many failed login attempts",
|
|
25977
25975
|
code: "TOO_MANY_FAILED_LOGINS"
|
|
25978
25976
|
});
|
|
25979
25977
|
}
|
|
25980
|
-
if (!a.email_verified && e.email_validation === "enforced") {
|
|
25978
|
+
if (!a.email_verified && ((b = e.client_metadata) == null ? void 0 : b.email_validation) === "enforced") {
|
|
25981
25979
|
await Of(t, a);
|
|
25982
|
-
const
|
|
25980
|
+
const $ = Ve(t, {
|
|
25983
25981
|
type: qe.FAILED_LOGIN,
|
|
25984
25982
|
description: "Email not verified"
|
|
25985
25983
|
});
|
|
25986
|
-
throw await i.logs.create(e.tenant.id,
|
|
25984
|
+
throw await i.logs.create(e.tenant.id, $), new vi(403, {
|
|
25987
25985
|
message: "Email not verified",
|
|
25988
25986
|
code: "EMAIL_NOT_VERIFIED"
|
|
25989
25987
|
});
|
|
@@ -26294,7 +26292,7 @@ async function BE({
|
|
|
26294
26292
|
response_type: p,
|
|
26295
26293
|
organization: h
|
|
26296
26294
|
}) {
|
|
26297
|
-
const { env: g } = t, b = new URL(r),
|
|
26295
|
+
const { env: g } = t, b = new URL(r), $ = `${b.protocol}//${b.host}`;
|
|
26298
26296
|
async function C(W = "Login required") {
|
|
26299
26297
|
const Y = Ve(t, {
|
|
26300
26298
|
type: qe.FAILED_SILENT_AUTH,
|
|
@@ -26302,7 +26300,7 @@ async function BE({
|
|
|
26302
26300
|
});
|
|
26303
26301
|
return await t.env.data.logs.create(e.tenant.id, Y), t.html(
|
|
26304
26302
|
Tu(
|
|
26305
|
-
|
|
26303
|
+
$,
|
|
26306
26304
|
JSON.stringify({
|
|
26307
26305
|
error: "login_required",
|
|
26308
26306
|
error_description: W,
|
|
@@ -26383,7 +26381,7 @@ async function BE({
|
|
|
26383
26381
|
);
|
|
26384
26382
|
return H.set("set-cookie", X), t.html(
|
|
26385
26383
|
Tu(
|
|
26386
|
-
|
|
26384
|
+
$,
|
|
26387
26385
|
JSON.stringify({
|
|
26388
26386
|
...q,
|
|
26389
26387
|
state: i
|
|
@@ -26481,7 +26479,7 @@ const LE = ["email", "sms", "Username-Password-Authentication"], FE = new be().o
|
|
|
26481
26479
|
response_mode: h,
|
|
26482
26480
|
code_challenge: g,
|
|
26483
26481
|
code_challenge_method: b,
|
|
26484
|
-
prompt:
|
|
26482
|
+
prompt: $,
|
|
26485
26483
|
login_ticket: C,
|
|
26486
26484
|
realm: D,
|
|
26487
26485
|
auth0Client: O,
|
|
@@ -26501,7 +26499,7 @@ const LE = ["email", "sms", "Username-Password-Authentication"], FE = new be().o
|
|
|
26501
26499
|
vendor_id: r,
|
|
26502
26500
|
audience: l,
|
|
26503
26501
|
nonce: u,
|
|
26504
|
-
prompt:
|
|
26502
|
+
prompt: $,
|
|
26505
26503
|
response_type: p,
|
|
26506
26504
|
response_mode: h,
|
|
26507
26505
|
code_challenge: g,
|
|
@@ -26528,7 +26526,7 @@ const LE = ["email", "sms", "Username-Password-Authentication"], FE = new be().o
|
|
|
26528
26526
|
M.tenant.id,
|
|
26529
26527
|
t.req.header("cookie")
|
|
26530
26528
|
), Y = W ? await e.data.sessions.get(M.tenant.id, W) : void 0, Ee = Y && !Y.revoked_at ? Y : void 0;
|
|
26531
|
-
if (
|
|
26529
|
+
if ($ == "none") {
|
|
26532
26530
|
if (!p)
|
|
26533
26531
|
throw new E(400, {
|
|
26534
26532
|
message: "Missing response_type"
|
|
@@ -26644,7 +26642,7 @@ const LE = ["email", "sms", "Username-Password-Authentication"], FE = new be().o
|
|
|
26644
26642
|
t.req.header("cookie")
|
|
26645
26643
|
), p = d ? await e.data.sessions.get(a.tenant.id, d) : void 0, h = p && !p.revoked_at ? p : void 0, g = new URL(t.req.url);
|
|
26646
26644
|
t.var.custom_domain && (g.hostname = t.var.custom_domain);
|
|
26647
|
-
const { ip: b, auth0_client:
|
|
26645
|
+
const { ip: b, auth0_client: $, useragent: C } = t.var, D = Qn($), O = await e.data.loginSessions.create(
|
|
26648
26646
|
a.tenant.id,
|
|
26649
26647
|
{
|
|
26650
26648
|
expires_at: new Date(
|
|
@@ -26839,8 +26837,8 @@ var Df = (t, ...e) => {
|
|
|
26839
26837
|
else {
|
|
26840
26838
|
const h = [];
|
|
26841
26839
|
p = l.map(([g, , b]) => {
|
|
26842
|
-
let
|
|
26843
|
-
return
|
|
26840
|
+
let $ = h.indexOf(b);
|
|
26841
|
+
return $ === -1 && (h.push(b), $ = h.length - 1), [g, $];
|
|
26844
26842
|
}).sort((g, b) => g[1] - b[1]).map(([g]) => g);
|
|
26845
26843
|
}
|
|
26846
26844
|
p.forEach((h) => {
|
|
@@ -27556,7 +27554,7 @@ const d8 = (t, e) => {
|
|
|
27556
27554
|
email: i,
|
|
27557
27555
|
client: s
|
|
27558
27556
|
}) => {
|
|
27559
|
-
const a = s.connections.map(({ strategy: q }) => q), l = a.includes("email") || a.includes("Username-Password-Authentication"), u = a.includes("sms"), d = a.includes("facebook"), p = a.includes("google-oauth2"), h = a.includes("apple"), g = a.includes("vipps"), b = d || p || h || g,
|
|
27557
|
+
const a = s.connections.map(({ strategy: q }) => q), l = a.includes("email") || a.includes("Username-Password-Authentication"), u = a.includes("sms"), d = a.includes("facebook"), p = a.includes("google-oauth2"), h = a.includes("apple"), g = a.includes("vipps"), b = d || p || h || g, $ = l || u;
|
|
27560
27558
|
let C = "text", D = "username";
|
|
27561
27559
|
const O = l && u ? "email_or_phone_placeholder" : l ? "email_placeholder" : "phone_placeholder";
|
|
27562
27560
|
let A = B.t(
|
|
@@ -27579,7 +27577,7 @@ const d8 = (t, e) => {
|
|
|
27579
27577
|
defaultValue: "Sign in with your {{authMethod}}"
|
|
27580
27578
|
}) }),
|
|
27581
27579
|
/* @__PURE__ */ _("div", { className: "flex flex-1 flex-col justify-center", children: [
|
|
27582
|
-
|
|
27580
|
+
$ && /* @__PURE__ */ _(Ln, { className: "mb-7", children: [
|
|
27583
27581
|
/* @__PURE__ */ _(
|
|
27584
27582
|
"input",
|
|
27585
27583
|
{
|
|
@@ -27603,7 +27601,7 @@ const d8 = (t, e) => {
|
|
|
27603
27601
|
/* @__PURE__ */ _(We, { className: "text-xs", name: "arrow-right" })
|
|
27604
27602
|
] })
|
|
27605
27603
|
] }),
|
|
27606
|
-
|
|
27604
|
+
$ && b && /* @__PURE__ */ _("div", { className: "relative mb-5 block text-center text-gray-300 dark:text-gray-300", children: [
|
|
27607
27605
|
/* @__PURE__ */ _("div", { className: "absolute left-0 right-0 top-1/2 border-b border-gray-200 dark:border-gray-600" }),
|
|
27608
27606
|
/* @__PURE__ */ _("div", { className: "relative inline-block bg-white px-2 dark:bg-gray-800", children: B.t("continue_social_login") })
|
|
27609
27607
|
] }),
|
|
@@ -27811,7 +27809,7 @@ const d8 = (t, e) => {
|
|
|
27811
27809
|
g,
|
|
27812
27810
|
"otp"
|
|
27813
27811
|
);
|
|
27814
|
-
const
|
|
27812
|
+
const $ = await t.env.data.codes.create(i.tenant.id, {
|
|
27815
27813
|
code_id: g,
|
|
27816
27814
|
code_type: "otp",
|
|
27817
27815
|
login_id: s.id,
|
|
@@ -27829,11 +27827,11 @@ const d8 = (t, e) => {
|
|
|
27829
27827
|
return p === "email" && // This is different to how it works in auth0
|
|
27830
27828
|
C.options.authentication_method === "magic_link" ? await If(t, {
|
|
27831
27829
|
to: d,
|
|
27832
|
-
code:
|
|
27830
|
+
code: $.code_id,
|
|
27833
27831
|
authParams: s.authParams
|
|
27834
27832
|
}) : await Tf(t, {
|
|
27835
27833
|
to: d,
|
|
27836
|
-
code:
|
|
27834
|
+
code: $.code_id
|
|
27837
27835
|
}), t.redirect(`/u/enter-code?state=${n}`);
|
|
27838
27836
|
}
|
|
27839
27837
|
), _n = (t) => /* @__PURE__ */ _(
|
|
@@ -27980,15 +27978,15 @@ var Qs = "_hp", y8 = {
|
|
|
27980
27978
|
if (g.s && g.e)
|
|
27981
27979
|
b = g.e, g.s = !1;
|
|
27982
27980
|
else {
|
|
27983
|
-
const
|
|
27984
|
-
zn(g) ? (g.e && g.d && (g.e.textContent = g.t), g.d = !1, b = g.e || (g.e = document.createTextNode(g.t))) : (b = g.e || (g.e = g.n ? document.createElementNS(g.n, g.tag) : document.createElement(g.tag)), b8(b, g.props, g.pP), G1(g, b,
|
|
27981
|
+
const $ = n || !g.e;
|
|
27982
|
+
zn(g) ? (g.e && g.d && (g.e.textContent = g.t), g.d = !1, b = g.e || (g.e = document.createTextNode(g.t))) : (b = g.e || (g.e = g.n ? document.createElementNS(g.n, g.tag) : document.createElement(g.tag)), b8(b, g.props, g.pP), G1(g, b, $));
|
|
27985
27983
|
}
|
|
27986
27984
|
g.tag === Qs ? l-- : n ? b.parentNode || e.appendChild(b) : a[l] !== b && a[l - 1] !== b && (a[l + 1] === b ? e.appendChild(a[l]) : e.insertBefore(b, u || a[l] || null));
|
|
27987
27985
|
}
|
|
27988
27986
|
if (t.pP && delete t.pP, s.length) {
|
|
27989
27987
|
const p = [], h = [];
|
|
27990
|
-
s.forEach(([, g, , b,
|
|
27991
|
-
g && p.push(g), b && h.push(b),
|
|
27988
|
+
s.forEach(([, g, , b, $]) => {
|
|
27989
|
+
g && p.push(g), b && h.push(b), $ == null || $();
|
|
27992
27990
|
}), p.forEach((g) => g()), h.length && requestAnimationFrame(() => {
|
|
27993
27991
|
h.forEach((g) => g());
|
|
27994
27992
|
});
|
|
@@ -28002,9 +28000,9 @@ var Qs = "_hp", y8 = {
|
|
|
28002
28000
|
n || (n = typeof e.tag == "function" ? $8(t, e) : Co(e.props.children)), ((s = n[0]) == null ? void 0 : s.tag) === "" && n[0][ip] && (i = n[0][ip], t[5].push([t, i, e]));
|
|
28003
28001
|
const h = r ? [...e.pC] : e.vC ? [...e.vC] : void 0, g = [];
|
|
28004
28002
|
let b;
|
|
28005
|
-
for (let
|
|
28006
|
-
Array.isArray(n[
|
|
28007
|
-
let C = E8(n[
|
|
28003
|
+
for (let $ = 0; $ < n.length; $++) {
|
|
28004
|
+
Array.isArray(n[$]) && n.splice($, 1, ...n[$].flat());
|
|
28005
|
+
let C = E8(n[$]);
|
|
28008
28006
|
if (C) {
|
|
28009
28007
|
typeof C.tag == "function" && !C.tag[j1] && (Vi.length > 0 && (C[Je][2] = Vi.map((O) => [O, O.values.at(-1)])), (a = t[5]) != null && a.length && (C[Je][3] = t[5].at(-1)));
|
|
28010
28008
|
let D;
|
|
@@ -28042,12 +28040,12 @@ var Qs = "_hp", y8 = {
|
|
|
28042
28040
|
return;
|
|
28043
28041
|
throw h;
|
|
28044
28042
|
}
|
|
28045
|
-
const [g, b,
|
|
28043
|
+
const [g, b, $] = ((p = e[Je]) == null ? void 0 : p[3]) || [];
|
|
28046
28044
|
if (b) {
|
|
28047
|
-
const C = () => fa([0, !1, t[2]],
|
|
28048
|
-
D.push(C), pa.set(
|
|
28045
|
+
const C = () => fa([0, !1, t[2]], $), D = pa.get($) || [];
|
|
28046
|
+
D.push(C), pa.set($, D);
|
|
28049
28047
|
const O = b(h, () => {
|
|
28050
|
-
const A = pa.get(
|
|
28048
|
+
const A = pa.get($);
|
|
28051
28049
|
if (A) {
|
|
28052
28050
|
const z = A.indexOf(C);
|
|
28053
28051
|
if (z !== -1)
|
|
@@ -28057,8 +28055,8 @@ var Qs = "_hp", y8 = {
|
|
|
28057
28055
|
if (O) {
|
|
28058
28056
|
if (t[0] === 1)
|
|
28059
28057
|
t[1] = !0;
|
|
28060
|
-
else if (ap(t,
|
|
28061
|
-
K1(
|
|
28058
|
+
else if (ap(t, $, [O]), (b.length === 1 || t !== g) && $.c) {
|
|
28059
|
+
K1($, $.c, !1);
|
|
28062
28060
|
return;
|
|
28063
28061
|
}
|
|
28064
28062
|
throw Jg;
|
|
@@ -28230,7 +28228,7 @@ var Qs = "_hp", y8 = {
|
|
|
28230
28228
|
const s = document.head;
|
|
28231
28229
|
let { onLoad: a, onError: l, precedence: u, blocking: d, ...p } = e, h = null, g = !1;
|
|
28232
28230
|
const b = la[t];
|
|
28233
|
-
let
|
|
28231
|
+
let $;
|
|
28234
28232
|
if (b.length > 0) {
|
|
28235
28233
|
const A = s.querySelectorAll(t);
|
|
28236
28234
|
e:
|
|
@@ -28253,7 +28251,7 @@ var Qs = "_hp", y8 = {
|
|
|
28253
28251
|
})());
|
|
28254
28252
|
}
|
|
28255
28253
|
} else
|
|
28256
|
-
|
|
28254
|
+
$ = s.querySelectorAll(t);
|
|
28257
28255
|
u = r ? u ?? "" : void 0, r && (p[ua] = u);
|
|
28258
28256
|
const C = Lf(
|
|
28259
28257
|
(A) => {
|
|
@@ -28267,24 +28265,24 @@ var Qs = "_hp", y8 = {
|
|
|
28267
28265
|
q.getAttribute(ua) === u && (z = !0);
|
|
28268
28266
|
}
|
|
28269
28267
|
s.appendChild(A);
|
|
28270
|
-
} else if (
|
|
28268
|
+
} else if ($) {
|
|
28271
28269
|
let z = !1;
|
|
28272
|
-
for (const q of
|
|
28270
|
+
for (const q of $)
|
|
28273
28271
|
if (q === A) {
|
|
28274
28272
|
z = !0;
|
|
28275
28273
|
break;
|
|
28276
28274
|
}
|
|
28277
28275
|
z || s.insertBefore(
|
|
28278
28276
|
A,
|
|
28279
|
-
s.contains(
|
|
28280
|
-
),
|
|
28277
|
+
s.contains($[0]) ? $[0] : s.querySelector(t)
|
|
28278
|
+
), $ = void 0;
|
|
28281
28279
|
}
|
|
28282
28280
|
},
|
|
28283
28281
|
[u]
|
|
28284
28282
|
), D = Ff(e.ref, (A) => {
|
|
28285
28283
|
var M;
|
|
28286
28284
|
const z = b[0];
|
|
28287
|
-
if (n === 2 && (A.innerHTML = ""), (g ||
|
|
28285
|
+
if (n === 2 && (A.innerHTML = ""), (g || $) && C(A), !l && !a)
|
|
28288
28286
|
return;
|
|
28289
28287
|
let q = hi[M = A.getAttribute(z)] || (hi[M] = new Promise(
|
|
28290
28288
|
(H, X) => {
|
|
@@ -29222,7 +29220,7 @@ const ou = (t) => {
|
|
|
29222
29220
|
),
|
|
29223
29221
|
400
|
|
29224
29222
|
);
|
|
29225
|
-
const g = (p == null ? void 0 : p.authParams.username) === l.authParams.username, b = `auth2|${gc()}`,
|
|
29223
|
+
const g = (p == null ? void 0 : p.authParams.username) === l.authParams.username, b = `auth2|${gc()}`, $ = await r.data.users.create(a.tenant.id, {
|
|
29226
29224
|
user_id: b,
|
|
29227
29225
|
email: l.authParams.username,
|
|
29228
29226
|
email_verified: g,
|
|
@@ -29235,7 +29233,7 @@ const ou = (t) => {
|
|
|
29235
29233
|
password: await oo.hash(n.password, 10),
|
|
29236
29234
|
algorithm: "bcrypt"
|
|
29237
29235
|
}), !g)
|
|
29238
|
-
return await Of(t,
|
|
29236
|
+
return await Of(t, $), t.html(
|
|
29239
29237
|
/* @__PURE__ */ _(
|
|
29240
29238
|
yn,
|
|
29241
29239
|
{
|
|
@@ -30808,13 +30806,13 @@ const ou = (t) => {
|
|
|
30808
30806
|
r.data.users,
|
|
30809
30807
|
i.tenant.id,
|
|
30810
30808
|
u
|
|
30811
|
-
)).filter((
|
|
30809
|
+
)).filter(($) => $.provider !== "auth2");
|
|
30812
30810
|
if (g.length > 0) {
|
|
30813
|
-
const
|
|
30811
|
+
const $ = g.filter(
|
|
30814
30812
|
(C) => !C.linked_to
|
|
30815
30813
|
);
|
|
30816
|
-
|
|
30817
|
-
linked_to: (b =
|
|
30814
|
+
$.length > 1 && console.error("More than one primary user found for email", u), $.length === 0 && console.error("No primary user found for email", u), $.length === 1 && await r.data.users.update(i.tenant.id, d.user_id, {
|
|
30815
|
+
linked_to: (b = $[0]) == null ? void 0 : b.user_id
|
|
30818
30816
|
});
|
|
30819
30817
|
}
|
|
30820
30818
|
return t.html(
|
|
@@ -31143,15 +31141,15 @@ const au = ({
|
|
|
31143
31141
|
);
|
|
31144
31142
|
if (!b || !b.session_id || !b.authParams)
|
|
31145
31143
|
throw new Error("Session expired");
|
|
31146
|
-
const
|
|
31144
|
+
const $ = await t.env.data.sessions.get(
|
|
31147
31145
|
a.tenant.id,
|
|
31148
31146
|
b.session_id
|
|
31149
31147
|
);
|
|
31150
|
-
if (
|
|
31148
|
+
if (!$ || !$.user_id)
|
|
31151
31149
|
throw new Error("Session expired");
|
|
31152
31150
|
const C = await t.env.data.users.get(
|
|
31153
31151
|
t.var.tenant_id,
|
|
31154
|
-
|
|
31152
|
+
$.user_id
|
|
31155
31153
|
);
|
|
31156
31154
|
if (!C)
|
|
31157
31155
|
throw new Error("Session expired");
|
|
@@ -31841,13 +31839,13 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
31841
31839
|
var e = t;
|
|
31842
31840
|
(function(n) {
|
|
31843
31841
|
function r(c) {
|
|
31844
|
-
var f = Array.prototype.slice, y = c.length,
|
|
31842
|
+
var f = Array.prototype.slice, y = c.length, x = function(S, J) {
|
|
31845
31843
|
return function() {
|
|
31846
31844
|
return J.apply(this, S.concat(f.call(arguments)));
|
|
31847
31845
|
};
|
|
31848
31846
|
}, v = function() {
|
|
31849
31847
|
var S = f.call(arguments);
|
|
31850
|
-
return S.length < y ?
|
|
31848
|
+
return S.length < y ? x(S, v) : c.apply(this, f.apply(arguments, [0, y]));
|
|
31851
31849
|
};
|
|
31852
31850
|
return v;
|
|
31853
31851
|
}
|
|
@@ -31855,19 +31853,19 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
31855
31853
|
for (var y = 0; y < f.length; y += 1)
|
|
31856
31854
|
c(f[y], y, f);
|
|
31857
31855
|
}, s = function(c, f, y) {
|
|
31858
|
-
var
|
|
31856
|
+
var x = f;
|
|
31859
31857
|
return i(function(v, S) {
|
|
31860
|
-
|
|
31861
|
-
}, y),
|
|
31858
|
+
x = c(x, v, S);
|
|
31859
|
+
}, y), x;
|
|
31862
31860
|
}, a = function(c, f) {
|
|
31863
31861
|
var y = new Array(f.length);
|
|
31864
|
-
return i(function(
|
|
31865
|
-
y[v] = c(
|
|
31862
|
+
return i(function(x, v) {
|
|
31863
|
+
y[v] = c(x);
|
|
31866
31864
|
}, f), y;
|
|
31867
31865
|
}, l = function(c, f) {
|
|
31868
31866
|
var y = [];
|
|
31869
|
-
return i(function(
|
|
31870
|
-
c(
|
|
31867
|
+
return i(function(x, v) {
|
|
31868
|
+
c(x, v) && y.push(x);
|
|
31871
31869
|
}, f), y;
|
|
31872
31870
|
}, u = function(c, f) {
|
|
31873
31871
|
for (var y = 0; y < c.length; y += 1)
|
|
@@ -31887,17 +31885,17 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
31887
31885
|
return f.join(c);
|
|
31888
31886
|
}, g = function(c, f, y) {
|
|
31889
31887
|
return c + y + f;
|
|
31890
|
-
}, b = Array.prototype.concat,
|
|
31888
|
+
}, b = Array.prototype.concat, $ = 32767;
|
|
31891
31889
|
function C(c) {
|
|
31892
|
-
for (var f = [], y = 0; y < c.length; y +=
|
|
31893
|
-
var
|
|
31894
|
-
f = b.apply(f,
|
|
31890
|
+
for (var f = [], y = 0; y < c.length; y += $) {
|
|
31891
|
+
var x = c.slice(y, y + $);
|
|
31892
|
+
f = b.apply(f, x);
|
|
31895
31893
|
}
|
|
31896
31894
|
return f;
|
|
31897
31895
|
}
|
|
31898
31896
|
function D(c, f) {
|
|
31899
|
-
for (var y = Object(c),
|
|
31900
|
-
var v = arguments[
|
|
31897
|
+
for (var y = Object(c), x = 1; x < arguments.length; x++) {
|
|
31898
|
+
var v = arguments[x];
|
|
31901
31899
|
if (v != null)
|
|
31902
31900
|
for (var S in v)
|
|
31903
31901
|
Object.prototype.hasOwnProperty.call(v, S) && (y[S] = v[S]);
|
|
@@ -32421,65 +32419,65 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
32421
32419
|
[29, 1, -19],
|
|
32422
32420
|
[29, 1, -18]
|
|
32423
32421
|
], A.DOUBLEDOT = 2, A.DOUBLECOLON = 3, A.DOUBLESLASH = 4, A.NOTEQUAL = 5, A.LESSTHANOREQUAL = 6, A.GREATERTHANOREQUAL = 7, A.AND = 8, A.OR = 9, A.MOD = 10, A.DIV = 11, A.MULTIPLYOPERATOR = 12, A.FUNCTIONNAME = 13, A.AXISNAME = 14, A.LITERAL = 15, A.NUMBER = 16, A.ASTERISKNAMETEST = 17, A.QNAME = 18, A.NCNAMECOLONASTERISK = 19, A.NODETYPE = 20, A.PROCESSINGINSTRUCTIONWITHLITERAL = 21, A.EQUALS = 22, A.LESSTHAN = 23, A.GREATERTHAN = 24, A.PLUS = 25, A.MINUS = 26, A.BAR = 27, A.SLASH = 28, A.LEFTPARENTHESIS = 29, A.RIGHTPARENTHESIS = 30, A.COMMA = 31, A.AT = 32, A.LEFTBRACKET = 33, A.RIGHTBRACKET = 34, A.DOT = 35, A.DOLLAR = 36, A.prototype.tokenize = function(c) {
|
|
32424
|
-
for (var f = [], y = [],
|
|
32422
|
+
for (var f = [], y = [], x = c + "\0", v = 0, S = x.charAt(v++); ; ) {
|
|
32425
32423
|
for (; S == " " || S == " " || S == "\r" || S == `
|
|
32426
32424
|
`; )
|
|
32427
|
-
S =
|
|
32428
|
-
if (S == "\0" || v >=
|
|
32425
|
+
S = x.charAt(v++);
|
|
32426
|
+
if (S == "\0" || v >= x.length)
|
|
32429
32427
|
break;
|
|
32430
32428
|
if (S == "(") {
|
|
32431
|
-
f.push(A.LEFTPARENTHESIS), y.push(S), S =
|
|
32429
|
+
f.push(A.LEFTPARENTHESIS), y.push(S), S = x.charAt(v++);
|
|
32432
32430
|
continue;
|
|
32433
32431
|
}
|
|
32434
32432
|
if (S == ")") {
|
|
32435
|
-
f.push(A.RIGHTPARENTHESIS), y.push(S), S =
|
|
32433
|
+
f.push(A.RIGHTPARENTHESIS), y.push(S), S = x.charAt(v++);
|
|
32436
32434
|
continue;
|
|
32437
32435
|
}
|
|
32438
32436
|
if (S == "[") {
|
|
32439
|
-
f.push(A.LEFTBRACKET), y.push(S), S =
|
|
32437
|
+
f.push(A.LEFTBRACKET), y.push(S), S = x.charAt(v++);
|
|
32440
32438
|
continue;
|
|
32441
32439
|
}
|
|
32442
32440
|
if (S == "]") {
|
|
32443
|
-
f.push(A.RIGHTBRACKET), y.push(S), S =
|
|
32441
|
+
f.push(A.RIGHTBRACKET), y.push(S), S = x.charAt(v++);
|
|
32444
32442
|
continue;
|
|
32445
32443
|
}
|
|
32446
32444
|
if (S == "@") {
|
|
32447
|
-
f.push(A.AT), y.push(S), S =
|
|
32445
|
+
f.push(A.AT), y.push(S), S = x.charAt(v++);
|
|
32448
32446
|
continue;
|
|
32449
32447
|
}
|
|
32450
32448
|
if (S == ",") {
|
|
32451
|
-
f.push(A.COMMA), y.push(S), S =
|
|
32449
|
+
f.push(A.COMMA), y.push(S), S = x.charAt(v++);
|
|
32452
32450
|
continue;
|
|
32453
32451
|
}
|
|
32454
32452
|
if (S == "|") {
|
|
32455
|
-
f.push(A.BAR), y.push(S), S =
|
|
32453
|
+
f.push(A.BAR), y.push(S), S = x.charAt(v++);
|
|
32456
32454
|
continue;
|
|
32457
32455
|
}
|
|
32458
32456
|
if (S == "+") {
|
|
32459
|
-
f.push(A.PLUS), y.push(S), S =
|
|
32457
|
+
f.push(A.PLUS), y.push(S), S = x.charAt(v++);
|
|
32460
32458
|
continue;
|
|
32461
32459
|
}
|
|
32462
32460
|
if (S == "-") {
|
|
32463
|
-
f.push(A.MINUS), y.push(S), S =
|
|
32461
|
+
f.push(A.MINUS), y.push(S), S = x.charAt(v++);
|
|
32464
32462
|
continue;
|
|
32465
32463
|
}
|
|
32466
32464
|
if (S == "=") {
|
|
32467
|
-
f.push(A.EQUALS), y.push(S), S =
|
|
32465
|
+
f.push(A.EQUALS), y.push(S), S = x.charAt(v++);
|
|
32468
32466
|
continue;
|
|
32469
32467
|
}
|
|
32470
32468
|
if (S == "$") {
|
|
32471
|
-
f.push(A.DOLLAR), y.push(S), S =
|
|
32469
|
+
f.push(A.DOLLAR), y.push(S), S = x.charAt(v++);
|
|
32472
32470
|
continue;
|
|
32473
32471
|
}
|
|
32474
32472
|
if (S == ".") {
|
|
32475
|
-
if (S =
|
|
32476
|
-
f.push(A.DOUBLEDOT), y.push(".."), S =
|
|
32473
|
+
if (S = x.charAt(v++), S == ".") {
|
|
32474
|
+
f.push(A.DOUBLEDOT), y.push(".."), S = x.charAt(v++);
|
|
32477
32475
|
continue;
|
|
32478
32476
|
}
|
|
32479
32477
|
if (S >= "0" && S <= "9") {
|
|
32480
32478
|
var J = "." + S;
|
|
32481
|
-
for (S =
|
|
32482
|
-
J += S, S =
|
|
32479
|
+
for (S = x.charAt(v++); S >= "0" && S <= "9"; )
|
|
32480
|
+
J += S, S = x.charAt(v++);
|
|
32483
32481
|
f.push(A.NUMBER), y.push(J);
|
|
32484
32482
|
continue;
|
|
32485
32483
|
}
|
|
@@ -32487,20 +32485,20 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
32487
32485
|
continue;
|
|
32488
32486
|
}
|
|
32489
32487
|
if (S == "'" || S == '"') {
|
|
32490
|
-
for (var ye = S, Ie = ""; v <
|
|
32488
|
+
for (var ye = S, Ie = ""; v < x.length && (S = x.charAt(v)) !== ye; )
|
|
32491
32489
|
Ie += S, v += 1;
|
|
32492
32490
|
if (S !== ye)
|
|
32493
32491
|
throw Wt.fromMessage("Unterminated string literal: " + ye + Ie);
|
|
32494
|
-
v += 1, f.push(A.LITERAL), y.push(Ie), S =
|
|
32492
|
+
v += 1, f.push(A.LITERAL), y.push(Ie), S = x.charAt(v++);
|
|
32495
32493
|
continue;
|
|
32496
32494
|
}
|
|
32497
32495
|
if (S >= "0" && S <= "9") {
|
|
32498
32496
|
var J = S;
|
|
32499
|
-
for (S =
|
|
32500
|
-
J += S, S =
|
|
32501
|
-
if (S == "." &&
|
|
32502
|
-
for (J += S, J +=
|
|
32503
|
-
J += S, S =
|
|
32497
|
+
for (S = x.charAt(v++); S >= "0" && S <= "9"; )
|
|
32498
|
+
J += S, S = x.charAt(v++);
|
|
32499
|
+
if (S == "." && x.charAt(v) >= "0" && x.charAt(v) <= "9")
|
|
32500
|
+
for (J += S, J += x.charAt(v++), S = x.charAt(v++); S >= "0" && S <= "9"; )
|
|
32501
|
+
J += S, S = x.charAt(v++);
|
|
32504
32502
|
f.push(A.NUMBER), y.push(J);
|
|
32505
32503
|
continue;
|
|
32506
32504
|
}
|
|
@@ -32508,49 +32506,49 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
32508
32506
|
if (f.length > 0) {
|
|
32509
32507
|
var oe = f[f.length - 1];
|
|
32510
32508
|
if (oe != A.AT && oe != A.DOUBLECOLON && oe != A.LEFTPARENTHESIS && oe != A.LEFTBRACKET && oe != A.AND && oe != A.OR && oe != A.MOD && oe != A.DIV && oe != A.MULTIPLYOPERATOR && oe != A.SLASH && oe != A.DOUBLESLASH && oe != A.BAR && oe != A.PLUS && oe != A.MINUS && oe != A.EQUALS && oe != A.NOTEQUAL && oe != A.LESSTHAN && oe != A.LESSTHANOREQUAL && oe != A.GREATERTHAN && oe != A.GREATERTHANOREQUAL) {
|
|
32511
|
-
f.push(A.MULTIPLYOPERATOR), y.push(S), S =
|
|
32509
|
+
f.push(A.MULTIPLYOPERATOR), y.push(S), S = x.charAt(v++);
|
|
32512
32510
|
continue;
|
|
32513
32511
|
}
|
|
32514
32512
|
}
|
|
32515
|
-
f.push(A.ASTERISKNAMETEST), y.push(S), S =
|
|
32513
|
+
f.push(A.ASTERISKNAMETEST), y.push(S), S = x.charAt(v++);
|
|
32516
32514
|
continue;
|
|
32517
32515
|
}
|
|
32518
|
-
if (S == ":" &&
|
|
32519
|
-
f.push(A.DOUBLECOLON), y.push("::"), v++, S =
|
|
32516
|
+
if (S == ":" && x.charAt(v) == ":") {
|
|
32517
|
+
f.push(A.DOUBLECOLON), y.push("::"), v++, S = x.charAt(v++);
|
|
32520
32518
|
continue;
|
|
32521
32519
|
}
|
|
32522
32520
|
if (S == "/") {
|
|
32523
|
-
if (S =
|
|
32524
|
-
f.push(A.DOUBLESLASH), y.push("//"), S =
|
|
32521
|
+
if (S = x.charAt(v++), S == "/") {
|
|
32522
|
+
f.push(A.DOUBLESLASH), y.push("//"), S = x.charAt(v++);
|
|
32525
32523
|
continue;
|
|
32526
32524
|
}
|
|
32527
32525
|
f.push(A.SLASH), y.push("/");
|
|
32528
32526
|
continue;
|
|
32529
32527
|
}
|
|
32530
|
-
if (S == "!" &&
|
|
32531
|
-
f.push(A.NOTEQUAL), y.push("!="), v++, S =
|
|
32528
|
+
if (S == "!" && x.charAt(v) == "=") {
|
|
32529
|
+
f.push(A.NOTEQUAL), y.push("!="), v++, S = x.charAt(v++);
|
|
32532
32530
|
continue;
|
|
32533
32531
|
}
|
|
32534
32532
|
if (S == "<") {
|
|
32535
|
-
if (
|
|
32536
|
-
f.push(A.LESSTHANOREQUAL), y.push("<="), v++, S =
|
|
32533
|
+
if (x.charAt(v) == "=") {
|
|
32534
|
+
f.push(A.LESSTHANOREQUAL), y.push("<="), v++, S = x.charAt(v++);
|
|
32537
32535
|
continue;
|
|
32538
32536
|
}
|
|
32539
|
-
f.push(A.LESSTHAN), y.push("<"), S =
|
|
32537
|
+
f.push(A.LESSTHAN), y.push("<"), S = x.charAt(v++);
|
|
32540
32538
|
continue;
|
|
32541
32539
|
}
|
|
32542
32540
|
if (S == ">") {
|
|
32543
|
-
if (
|
|
32544
|
-
f.push(A.GREATERTHANOREQUAL), y.push(">="), v++, S =
|
|
32541
|
+
if (x.charAt(v) == "=") {
|
|
32542
|
+
f.push(A.GREATERTHANOREQUAL), y.push(">="), v++, S = x.charAt(v++);
|
|
32545
32543
|
continue;
|
|
32546
32544
|
}
|
|
32547
|
-
f.push(A.GREATERTHAN), y.push(">"), S =
|
|
32545
|
+
f.push(A.GREATERTHAN), y.push(">"), S = x.charAt(v++);
|
|
32548
32546
|
continue;
|
|
32549
32547
|
}
|
|
32550
32548
|
if (S == "_" || le.isLetter(S.charCodeAt(0))) {
|
|
32551
32549
|
var ke = S;
|
|
32552
|
-
for (S =
|
|
32553
|
-
ke += S, S =
|
|
32550
|
+
for (S = x.charAt(v++); le.isNCNameChar(S.charCodeAt(0)); )
|
|
32551
|
+
ke += S, S = x.charAt(v++);
|
|
32554
32552
|
if (f.length > 0) {
|
|
32555
32553
|
var oe = f[f.length - 1];
|
|
32556
32554
|
if (oe != A.AT && oe != A.DOUBLECOLON && oe != A.LEFTPARENTHESIS && oe != A.LEFTBRACKET && oe != A.AND && oe != A.OR && oe != A.MOD && oe != A.DIV && oe != A.MULTIPLYOPERATOR && oe != A.SLASH && oe != A.DOUBLESLASH && oe != A.BAR && oe != A.PLUS && oe != A.MINUS && oe != A.EQUALS && oe != A.NOTEQUAL && oe != A.LESSTHAN && oe != A.LESSTHANOREQUAL && oe != A.GREATERTHAN && oe != A.GREATERTHANOREQUAL) {
|
|
@@ -32573,13 +32571,13 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
32573
32571
|
}
|
|
32574
32572
|
}
|
|
32575
32573
|
if (S == ":") {
|
|
32576
|
-
if (
|
|
32577
|
-
f.push(A.NCNAMECOLONASTERISK), y.push(ke + ":*"), v++, S =
|
|
32574
|
+
if (x.charAt(v) == "*") {
|
|
32575
|
+
f.push(A.NCNAMECOLONASTERISK), y.push(ke + ":*"), v++, S = x.charAt(v++);
|
|
32578
32576
|
continue;
|
|
32579
32577
|
}
|
|
32580
|
-
if (
|
|
32581
|
-
for (ke += ":", S =
|
|
32582
|
-
ke += S, S =
|
|
32578
|
+
if (x.charAt(v) == "_" || le.isLetter(x.charCodeAt(v))) {
|
|
32579
|
+
for (ke += ":", S = x.charAt(v++); le.isNCNameChar(S.charCodeAt(0)); )
|
|
32580
|
+
ke += S, S = x.charAt(v++);
|
|
32583
32581
|
if (S == "(") {
|
|
32584
32582
|
f.push(A.FUNCTIONNAME), y.push(ke);
|
|
32585
32583
|
continue;
|
|
@@ -32587,7 +32585,7 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
32587
32585
|
f.push(A.QNAME), y.push(ke);
|
|
32588
32586
|
continue;
|
|
32589
32587
|
}
|
|
32590
|
-
if (
|
|
32588
|
+
if (x.charAt(v) == ":") {
|
|
32591
32589
|
f.push(A.AXISNAME), y.push(ke);
|
|
32592
32590
|
continue;
|
|
32593
32591
|
}
|
|
@@ -32598,7 +32596,7 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
32598
32596
|
continue;
|
|
32599
32597
|
}
|
|
32600
32598
|
if (ke == "processing-instruction") {
|
|
32601
|
-
|
|
32599
|
+
x.charAt(v) == ")" ? f.push(A.NODETYPE) : f.push(A.PROCESSINGINSTRUCTIONWITHLITERAL), y.push(ke);
|
|
32602
32600
|
continue;
|
|
32603
32601
|
}
|
|
32604
32602
|
f.push(A.FUNCTIONNAME), y.push(ke);
|
|
@@ -32611,9 +32609,9 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
32611
32609
|
}
|
|
32612
32610
|
return f.push(1), y.push("[EOF]"), [f, y];
|
|
32613
32611
|
}, A.SHIFT = "s", A.REDUCE = "r", A.ACCEPT = "a", A.prototype.parse = function(Ie) {
|
|
32614
|
-
var f, y,
|
|
32615
|
-
if (
|
|
32616
|
-
f =
|
|
32612
|
+
var f, y, x = this.tokenize(Ie);
|
|
32613
|
+
if (x != null) {
|
|
32614
|
+
f = x[0], y = x[1];
|
|
32617
32615
|
var v = 0, S = [], J = [], ye = [], Ie, oe, ke;
|
|
32618
32616
|
for (S.push(0), J.push(1), ye.push("_S"), oe = f[v], ke = y[v++]; ; )
|
|
32619
32617
|
switch (Ie = S[S.length - 1], A.actionTable[Ie].charAt(oe - 1)) {
|
|
@@ -32831,12 +32829,12 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
32831
32829
|
we.applyPredicates = function(c, f, y) {
|
|
32832
32830
|
if (c.length === 0)
|
|
32833
32831
|
return y;
|
|
32834
|
-
var
|
|
32832
|
+
var x = f.extend({});
|
|
32835
32833
|
return s(
|
|
32836
32834
|
function(v, S) {
|
|
32837
|
-
return
|
|
32835
|
+
return x.contextSize = v.length, l(
|
|
32838
32836
|
function(J, ye) {
|
|
32839
|
-
return
|
|
32837
|
+
return x.contextNode = J, x.contextPosition = ye + 1, we.predicateMatches(S, x);
|
|
32840
32838
|
},
|
|
32841
32839
|
v
|
|
32842
32840
|
);
|
|
@@ -32850,24 +32848,24 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
32850
32848
|
return y;
|
|
32851
32849
|
if (c.virtualRoot)
|
|
32852
32850
|
return c.virtualRoot;
|
|
32853
|
-
var
|
|
32854
|
-
if (
|
|
32855
|
-
return
|
|
32851
|
+
var x = y.ownerDocument;
|
|
32852
|
+
if (x)
|
|
32853
|
+
return x;
|
|
32856
32854
|
for (var v = y; v.parentNode != null; )
|
|
32857
32855
|
v = v.parentNode;
|
|
32858
32856
|
return v;
|
|
32859
32857
|
}, we.applyStep = function(c, f, y) {
|
|
32860
|
-
var
|
|
32858
|
+
var x = [];
|
|
32861
32859
|
switch (f.contextNode = y, c.axis) {
|
|
32862
32860
|
case te.ANCESTOR:
|
|
32863
32861
|
if (f.contextNode === f.virtualRoot)
|
|
32864
32862
|
break;
|
|
32865
32863
|
var v;
|
|
32866
|
-
for (f.contextNode.nodeType == O.ATTRIBUTE_NODE ? v = we.getOwnerElement(f.contextNode) : v = f.contextNode.parentNode; v != null && (c.nodeTest.matches(v, f) &&
|
|
32864
|
+
for (f.contextNode.nodeType == O.ATTRIBUTE_NODE ? v = we.getOwnerElement(f.contextNode) : v = f.contextNode.parentNode; v != null && (c.nodeTest.matches(v, f) && x.push(v), v !== f.virtualRoot); )
|
|
32867
32865
|
v = v.parentNode;
|
|
32868
32866
|
break;
|
|
32869
32867
|
case te.ANCESTORORSELF:
|
|
32870
|
-
for (var v = f.contextNode; v != null && (c.nodeTest.matches(v, f) &&
|
|
32868
|
+
for (var v = f.contextNode; v != null && (c.nodeTest.matches(v, f) && x.push(v), v !== f.virtualRoot); v = v.nodeType == O.ATTRIBUTE_NODE ? we.getOwnerElement(v) : v.parentNode)
|
|
32871
32869
|
;
|
|
32872
32870
|
break;
|
|
32873
32871
|
case te.ATTRIBUTE:
|
|
@@ -32875,23 +32873,23 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
32875
32873
|
if (S != null)
|
|
32876
32874
|
for (var J = 0; J < S.length; J++) {
|
|
32877
32875
|
var v = S.item(J);
|
|
32878
|
-
c.nodeTest.matches(v, f) &&
|
|
32876
|
+
c.nodeTest.matches(v, f) && x.push(v);
|
|
32879
32877
|
}
|
|
32880
32878
|
break;
|
|
32881
32879
|
case te.CHILD:
|
|
32882
32880
|
for (var v = f.contextNode.firstChild; v != null; v = v.nextSibling)
|
|
32883
|
-
c.nodeTest.matches(v, f) &&
|
|
32881
|
+
c.nodeTest.matches(v, f) && x.push(v);
|
|
32884
32882
|
break;
|
|
32885
32883
|
case te.DESCENDANT:
|
|
32886
32884
|
for (var Ue = [f.contextNode.firstChild]; Ue.length > 0; )
|
|
32887
32885
|
for (var v = Ue.pop(); v != null; )
|
|
32888
|
-
c.nodeTest.matches(v, f) &&
|
|
32886
|
+
c.nodeTest.matches(v, f) && x.push(v), v.firstChild != null ? (Ue.push(v.nextSibling), v = v.firstChild) : v = v.nextSibling;
|
|
32889
32887
|
break;
|
|
32890
32888
|
case te.DESCENDANTORSELF:
|
|
32891
|
-
c.nodeTest.matches(f.contextNode, f) &&
|
|
32889
|
+
c.nodeTest.matches(f.contextNode, f) && x.push(f.contextNode);
|
|
32892
32890
|
for (var Ue = [f.contextNode.firstChild]; Ue.length > 0; )
|
|
32893
32891
|
for (var v = Ue.pop(); v != null; )
|
|
32894
|
-
c.nodeTest.matches(v, f) &&
|
|
32892
|
+
c.nodeTest.matches(v, f) && x.push(v), v.firstChild != null ? (Ue.push(v.nextSibling), v = v.firstChild) : v = v.nextSibling;
|
|
32895
32893
|
break;
|
|
32896
32894
|
case te.FOLLOWING:
|
|
32897
32895
|
if (f.contextNode === f.virtualRoot)
|
|
@@ -32902,14 +32900,14 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
32902
32900
|
Ue.unshift(v.nextSibling);
|
|
32903
32901
|
do
|
|
32904
32902
|
for (var v = Ue.pop(); v != null; )
|
|
32905
|
-
c.nodeTest.matches(v, f) &&
|
|
32903
|
+
c.nodeTest.matches(v, f) && x.push(v), v.firstChild != null ? (Ue.push(v.nextSibling), v = v.firstChild) : v = v.nextSibling;
|
|
32906
32904
|
while (Ue.length > 0);
|
|
32907
32905
|
break;
|
|
32908
32906
|
case te.FOLLOWINGSIBLING:
|
|
32909
32907
|
if (f.contextNode === f.virtualRoot)
|
|
32910
32908
|
break;
|
|
32911
32909
|
for (var v = f.contextNode.nextSibling; v != null; v = v.nextSibling)
|
|
32912
|
-
c.nodeTest.matches(v, f) &&
|
|
32910
|
+
c.nodeTest.matches(v, f) && x.push(v);
|
|
32913
32911
|
break;
|
|
32914
32912
|
case te.NAMESPACE:
|
|
32915
32913
|
var ye = {};
|
|
@@ -32927,12 +32925,12 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
32927
32925
|
}
|
|
32928
32926
|
for (var ke in ye) {
|
|
32929
32927
|
var St = new Bt(ke, ye[ke], f.contextNode);
|
|
32930
|
-
c.nodeTest.matches(St, f) &&
|
|
32928
|
+
c.nodeTest.matches(St, f) && x.push(St);
|
|
32931
32929
|
}
|
|
32932
32930
|
}
|
|
32933
32931
|
break;
|
|
32934
32932
|
case te.PARENT:
|
|
32935
|
-
v = null, f.contextNode !== f.virtualRoot && (f.contextNode.nodeType == O.ATTRIBUTE_NODE ? v = we.getOwnerElement(f.contextNode) : v = f.contextNode.parentNode), v != null && c.nodeTest.matches(v, f) &&
|
|
32933
|
+
v = null, f.contextNode !== f.virtualRoot && (f.contextNode.nodeType == O.ATTRIBUTE_NODE ? v = we.getOwnerElement(f.contextNode) : v = f.contextNode.parentNode), v != null && c.nodeTest.matches(v, f) && x.push(v);
|
|
32936
32934
|
break;
|
|
32937
32935
|
case te.PRECEDING:
|
|
32938
32936
|
var Ue;
|
|
@@ -32941,20 +32939,20 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
32941
32939
|
for (var v = Ue.pop(); v != null; ) {
|
|
32942
32940
|
if (v == f.contextNode)
|
|
32943
32941
|
break e;
|
|
32944
|
-
c.nodeTest.matches(v, f) &&
|
|
32942
|
+
c.nodeTest.matches(v, f) && x.unshift(v), v.firstChild != null ? (Ue.push(v.nextSibling), v = v.firstChild) : v = v.nextSibling;
|
|
32945
32943
|
}
|
|
32946
32944
|
break;
|
|
32947
32945
|
case te.PRECEDINGSIBLING:
|
|
32948
32946
|
if (f.contextNode === f.virtualRoot)
|
|
32949
32947
|
break;
|
|
32950
32948
|
for (var v = f.contextNode.previousSibling; v != null; v = v.previousSibling)
|
|
32951
|
-
c.nodeTest.matches(v, f) &&
|
|
32949
|
+
c.nodeTest.matches(v, f) && x.push(v);
|
|
32952
32950
|
break;
|
|
32953
32951
|
case te.SELF:
|
|
32954
|
-
c.nodeTest.matches(f.contextNode, f) &&
|
|
32952
|
+
c.nodeTest.matches(f.contextNode, f) && x.push(f.contextNode);
|
|
32955
32953
|
break;
|
|
32956
32954
|
}
|
|
32957
|
-
return
|
|
32955
|
+
return x;
|
|
32958
32956
|
};
|
|
32959
32957
|
function Fe(c, f, y) {
|
|
32960
32958
|
return we.applyPredicates(
|
|
@@ -32992,14 +32990,14 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
32992
32990
|
}, we.applyLocationPath = function(c, f, y) {
|
|
32993
32991
|
if (!c)
|
|
32994
32992
|
return y;
|
|
32995
|
-
var
|
|
32996
|
-
return we.applySteps(c.steps, f,
|
|
32993
|
+
var x = c.absolute ? [we.getRoot(f, y)] : y;
|
|
32994
|
+
return we.applySteps(c.steps, f, x);
|
|
32997
32995
|
}, we.prototype.evaluate = function(c) {
|
|
32998
32996
|
var f = D(new Gt(), c), y = this.applyFilter(c, f);
|
|
32999
32997
|
if ("nonNodes" in y)
|
|
33000
32998
|
return y.nonNodes;
|
|
33001
|
-
var
|
|
33002
|
-
return
|
|
32999
|
+
var x = new ce();
|
|
33000
|
+
return x.addArray(we.applyLocationPath(this.locationPath, f, y.nodes)), x;
|
|
33003
33001
|
}, we.predicateMatches = function(c, f) {
|
|
33004
33002
|
var y = c.evaluate(f);
|
|
33005
33003
|
return le.instance_of(y, me) ? f.contextPosition === y.numberValue() : y.booleanValue();
|
|
@@ -33024,8 +33022,8 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33024
33022
|
return c.selectSingleNode("..");
|
|
33025
33023
|
} catch {
|
|
33026
33024
|
}
|
|
33027
|
-
for (var f = c.nodeType == O.DOCUMENT_NODE ? c : c.ownerDocument, y = f.getElementsByTagName("*"),
|
|
33028
|
-
for (var v = y.item(
|
|
33025
|
+
for (var f = c.nodeType == O.DOCUMENT_NODE ? c : c.ownerDocument, y = f.getElementsByTagName("*"), x = 0; x < y.length; x++)
|
|
33026
|
+
for (var v = y.item(x), S = v.attributes, J = 0; J < S.length; J++) {
|
|
33029
33027
|
var ye = S.item(J);
|
|
33030
33028
|
if (ye === c)
|
|
33031
33029
|
return v;
|
|
@@ -33078,9 +33076,9 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33078
33076
|
return u(c, f.nodeType);
|
|
33079
33077
|
};
|
|
33080
33078
|
}, ae.makeNodeTestType = function(c, f, y) {
|
|
33081
|
-
var
|
|
33079
|
+
var x = y || function() {
|
|
33082
33080
|
};
|
|
33083
|
-
return
|
|
33081
|
+
return x.prototype = new ae(c), x.prototype.constructor = x, D(x.prototype, f), x;
|
|
33084
33082
|
}, ae.makeNodeTypeTest = function(c, f, y) {
|
|
33085
33083
|
return new (ae.makeNodeTestType(c, {
|
|
33086
33084
|
matches: ae.isNodeType(f),
|
|
@@ -33089,16 +33087,16 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33089
33087
|
}, ae.hasPrefix = function(c) {
|
|
33090
33088
|
return c.prefix || (c.nodeName || c.tagName).indexOf(":") !== -1;
|
|
33091
33089
|
}, ae.isElementOrAttribute = ae.isNodeType([1, 2]), ae.nameSpaceMatches = function(c, f, y) {
|
|
33092
|
-
var
|
|
33090
|
+
var x = y.namespaceURI || "";
|
|
33093
33091
|
if (!c)
|
|
33094
|
-
return
|
|
33092
|
+
return !x || f.allowAnyNamespaceForNoPrefix && !ae.hasPrefix(y);
|
|
33095
33093
|
var v = f.namespaceResolver.getNamespace(c, f.expressionContextNode);
|
|
33096
33094
|
if (v == null)
|
|
33097
33095
|
throw new Error("Cannot resolve QName " + c);
|
|
33098
|
-
return v ===
|
|
33096
|
+
return v === x;
|
|
33099
33097
|
}, ae.localNameMatches = function(c, f, y) {
|
|
33100
|
-
var
|
|
33101
|
-
return f.caseInsensitive ? c.toLowerCase() ===
|
|
33098
|
+
var x = y.localName || y.nodeName;
|
|
33099
|
+
return f.caseInsensitive ? c.toLowerCase() === x.toLowerCase() : c === x;
|
|
33102
33100
|
}, ae.NameTestPrefixAny = ae.makeNodeTestType(
|
|
33103
33101
|
ae.NAMETESTPREFIXANY,
|
|
33104
33102
|
{
|
|
@@ -33270,12 +33268,12 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33270
33268
|
return this.numberFormat.test(c) ? parseFloat(c) : Number.NaN;
|
|
33271
33269
|
};
|
|
33272
33270
|
function us(c) {
|
|
33273
|
-
for (var f = c.split("e-"), y = f[0].replace(".", ""),
|
|
33271
|
+
for (var f = c.split("e-"), y = f[0].replace(".", ""), x = Number(f[1]), v = 0; v < x - 1; v += 1)
|
|
33274
33272
|
y = "0" + y;
|
|
33275
33273
|
return "0." + y;
|
|
33276
33274
|
}
|
|
33277
33275
|
function Fo(c) {
|
|
33278
|
-
for (var f = c.split("e"), y = f[0].replace(".", ""),
|
|
33276
|
+
for (var f = c.split("e"), y = f[0].replace(".", ""), x = Number(f[1]), v = x + 1 - y.length, S = 0; S < v; S += 1)
|
|
33279
33277
|
y += "0";
|
|
33280
33278
|
return y;
|
|
33281
33279
|
}
|
|
@@ -33369,8 +33367,8 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33369
33367
|
}, lt.prototype.balance = function() {
|
|
33370
33368
|
var c = this.left == null ? 0 : this.left.depth, f = this.right == null ? 0 : this.right.depth;
|
|
33371
33369
|
if (c > f + 1) {
|
|
33372
|
-
var y = this.left.left == null ? 0 : this.left.left.depth,
|
|
33373
|
-
y <
|
|
33370
|
+
var y = this.left.left == null ? 0 : this.left.left.depth, x = this.left.right == null ? 0 : this.left.right.depth;
|
|
33371
|
+
y < x && this.left.rotateRR(), this.rotateLL();
|
|
33374
33372
|
} else if (c + 1 < f) {
|
|
33375
33373
|
var v = this.right.right == null ? 0 : this.right.right.depth, S = this.right.left == null ? 0 : this.right.left.depth;
|
|
33376
33374
|
S > v && this.right.rotateLL(), this.rotateRR();
|
|
@@ -33393,17 +33391,17 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33393
33391
|
var y = c.compareDocumentPosition(f);
|
|
33394
33392
|
return y & 1 || y & 10 ? 1 : y & 20 ? -1 : 0;
|
|
33395
33393
|
}
|
|
33396
|
-
for (var
|
|
33397
|
-
|
|
33394
|
+
for (var x = 0, v = 0, S = c; S != null; S = S.parentNode || S.ownerElement)
|
|
33395
|
+
x++;
|
|
33398
33396
|
for (var J = f; J != null; J = J.parentNode || J.ownerElement)
|
|
33399
33397
|
v++;
|
|
33400
|
-
if (
|
|
33401
|
-
for (;
|
|
33402
|
-
c = c.parentNode || c.ownerElement,
|
|
33398
|
+
if (x > v) {
|
|
33399
|
+
for (; x > v; )
|
|
33400
|
+
c = c.parentNode || c.ownerElement, x--;
|
|
33403
33401
|
if (c === f)
|
|
33404
33402
|
return 1;
|
|
33405
|
-
} else if (v >
|
|
33406
|
-
for (; v >
|
|
33403
|
+
} else if (v > x) {
|
|
33404
|
+
for (; v > x; )
|
|
33407
33405
|
f = f.parentNode || f.ownerElement, v--;
|
|
33408
33406
|
if (c === f)
|
|
33409
33407
|
return -1;
|
|
@@ -33459,8 +33457,8 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33459
33457
|
return c.nodeType == O.DOCUMENT_NODE || c.nodeType == O.ELEMENT_NODE || c.nodeType === O.DOCUMENT_FRAGMENT_NODE ? this.stringForContainerNode(c) : c.nodeType === O.ATTRIBUTE_NODE ? c.value || c.nodeValue : c.isNamespaceNode ? c.namespace : c.nodeValue;
|
|
33460
33458
|
}, ce.prototype.stringForContainerNode = function(c) {
|
|
33461
33459
|
for (var f = "", y = c.firstChild; y != null; y = y.nextSibling) {
|
|
33462
|
-
var
|
|
33463
|
-
(
|
|
33460
|
+
var x = y.nodeType;
|
|
33461
|
+
(x === 1 || x === 3 || x === 4 || x === 9 || x === 11) && (f += this.stringForNode(y));
|
|
33464
33462
|
}
|
|
33465
33463
|
return f;
|
|
33466
33464
|
}, ce.prototype.buildTree = function() {
|
|
@@ -33495,15 +33493,15 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33495
33493
|
}, ce.prototype.toUnsortedArray = function() {
|
|
33496
33494
|
return this.nodes.slice();
|
|
33497
33495
|
}, ce.prototype.compareWithString = function(c, f) {
|
|
33498
|
-
for (var y = this.toUnsortedArray(),
|
|
33499
|
-
var v = y[
|
|
33496
|
+
for (var y = this.toUnsortedArray(), x = 0; x < y.length; x++) {
|
|
33497
|
+
var v = y[x], S = new ge(this.stringForNode(v)), J = f(S, c);
|
|
33500
33498
|
if (J.booleanValue())
|
|
33501
33499
|
return J;
|
|
33502
33500
|
}
|
|
33503
33501
|
return new fe(!1);
|
|
33504
33502
|
}, ce.prototype.compareWithNumber = function(c, f) {
|
|
33505
|
-
for (var y = this.toUnsortedArray(),
|
|
33506
|
-
var v = y[
|
|
33503
|
+
for (var y = this.toUnsortedArray(), x = 0; x < y.length; x++) {
|
|
33504
|
+
var v = y[x], S = new me(this.stringForNode(v)), J = f(S, c);
|
|
33507
33505
|
if (J.booleanValue())
|
|
33508
33506
|
return J;
|
|
33509
33507
|
}
|
|
@@ -33511,10 +33509,10 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33511
33509
|
}, ce.prototype.compareWithBoolean = function(c, f) {
|
|
33512
33510
|
return f(this.bool(), c);
|
|
33513
33511
|
}, ce.prototype.compareWithNodeSet = function(c, f) {
|
|
33514
|
-
for (var y = this.toUnsortedArray(),
|
|
33512
|
+
for (var y = this.toUnsortedArray(), x = function(ye, Ie) {
|
|
33515
33513
|
return f(Ie, ye);
|
|
33516
33514
|
}, v = 0; v < y.length; v++) {
|
|
33517
|
-
var S = new ge(this.stringForNode(y[v])), J = c.compareWithString(S,
|
|
33515
|
+
var S = new ge(this.stringForNode(y[v])), J = c.compareWithString(S, x);
|
|
33518
33516
|
if (J.booleanValue())
|
|
33519
33517
|
return J;
|
|
33520
33518
|
}
|
|
@@ -33565,8 +33563,8 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33565
33563
|
if (c == "xmlns")
|
|
33566
33564
|
return z.XMLNS_NAMESPACE_URI;
|
|
33567
33565
|
for (f.nodeType == O.DOCUMENT_NODE ? f = f.documentElement : f.nodeType == O.ATTRIBUTE_NODE ? f = we.getOwnerElement(f) : f.nodeType != O.ELEMENT_NODE && (f = f.parentNode); f != null && f.nodeType == O.ELEMENT_NODE; ) {
|
|
33568
|
-
for (var y = f.attributes,
|
|
33569
|
-
var v = y.item(
|
|
33566
|
+
for (var y = f.attributes, x = 0; x < y.length; x++) {
|
|
33567
|
+
var v = y.item(x), S = v.name || v.nodeName;
|
|
33570
33568
|
if (S === "xmlns" && c === "" || S === "xmlns:" + c)
|
|
33571
33569
|
return String(v.value || v.nodeValue);
|
|
33572
33570
|
}
|
|
@@ -33593,11 +33591,11 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33593
33591
|
if (arguments.length != 2)
|
|
33594
33592
|
throw new Error("Function id expects (object)");
|
|
33595
33593
|
f = arguments[1].evaluate(c), le.instance_of(f, ce) ? f = f.toArray().join(" ") : f = f.stringValue();
|
|
33596
|
-
for (var y = f.split(/[\x0d\x0a\x09\x20]+/),
|
|
33594
|
+
for (var y = f.split(/[\x0d\x0a\x09\x20]+/), x = new ce(), v = c.contextNode.nodeType == O.DOCUMENT_NODE ? c.contextNode : c.contextNode.ownerDocument, S = 0; S < y.length; S++) {
|
|
33597
33595
|
var J;
|
|
33598
|
-
v.getElementById ? J = v.getElementById(y[S]) : J = le.getElementById(v, y[S]), J != null &&
|
|
33596
|
+
v.getElementById ? J = v.getElementById(y[S]) : J = le.getElementById(v, y[S]), J != null && x.add(J);
|
|
33599
33597
|
}
|
|
33600
|
-
return
|
|
33598
|
+
return x;
|
|
33601
33599
|
}, _e.localName = function(c, f) {
|
|
33602
33600
|
var y;
|
|
33603
33601
|
if (arguments.length == 1)
|
|
@@ -33670,14 +33668,14 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33670
33668
|
var f = arguments[1].evaluate(c).stringValue(), y = arguments[2].evaluate(c).stringValue();
|
|
33671
33669
|
if (y.length == 0)
|
|
33672
33670
|
return new ge(f);
|
|
33673
|
-
var
|
|
33674
|
-
return
|
|
33671
|
+
var x = f.indexOf(y);
|
|
33672
|
+
return x == -1 ? new ge("") : new ge(f.substring(x + y.length));
|
|
33675
33673
|
}, _e.substring = function() {
|
|
33676
33674
|
var c = arguments[0];
|
|
33677
33675
|
if (!(arguments.length == 3 || arguments.length == 4))
|
|
33678
33676
|
throw new Error("Function substring expects (string, number, number?)");
|
|
33679
|
-
var f = arguments[1].evaluate(c).stringValue(), y = Math.round(arguments[2].evaluate(c).numberValue()) - 1,
|
|
33680
|
-
return new ge(f.substring(y,
|
|
33677
|
+
var f = arguments[1].evaluate(c).stringValue(), y = Math.round(arguments[2].evaluate(c).numberValue()) - 1, x = arguments.length == 4 ? y + Math.round(arguments[3].evaluate(c).numberValue()) : void 0;
|
|
33678
|
+
return new ge(f.substring(y, x));
|
|
33681
33679
|
}, _e.stringLength = function() {
|
|
33682
33680
|
var c = arguments[0], f;
|
|
33683
33681
|
if (arguments.length == 1)
|
|
@@ -33695,21 +33693,21 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33695
33693
|
f = arguments[1].evaluate(c).stringValue();
|
|
33696
33694
|
else
|
|
33697
33695
|
throw new Error("Function normalize-space expects (string?)");
|
|
33698
|
-
for (var y = 0,
|
|
33699
|
-
|
|
33700
|
-
for (var v = ""; y <=
|
|
33696
|
+
for (var y = 0, x = f.length - 1; le.isSpace(f.charCodeAt(x)); )
|
|
33697
|
+
x--;
|
|
33698
|
+
for (var v = ""; y <= x && le.isSpace(f.charCodeAt(y)); )
|
|
33701
33699
|
y++;
|
|
33702
|
-
for (; y <=
|
|
33700
|
+
for (; y <= x; )
|
|
33703
33701
|
if (le.isSpace(f.charCodeAt(y)))
|
|
33704
|
-
for (v += " "; y <=
|
|
33702
|
+
for (v += " "; y <= x && le.isSpace(f.charCodeAt(y)); )
|
|
33705
33703
|
y++;
|
|
33706
33704
|
else
|
|
33707
33705
|
v += f.charAt(y), y++;
|
|
33708
33706
|
return new ge(v);
|
|
33709
|
-
}, _e.translate = function(c, f, y,
|
|
33707
|
+
}, _e.translate = function(c, f, y, x) {
|
|
33710
33708
|
if (arguments.length != 4)
|
|
33711
33709
|
throw new Error("Function translate expects (string, string, string)");
|
|
33712
|
-
var v = f.evaluate(c).stringValue(), S = y.evaluate(c).stringValue(), J =
|
|
33710
|
+
var v = f.evaluate(c).stringValue(), S = y.evaluate(c).stringValue(), J = x.evaluate(c).stringValue(), ye = s(function(oe, ke, St) {
|
|
33713
33711
|
return ke in oe || (oe[ke] = St > J.length ? "" : J[St]), oe;
|
|
33714
33712
|
}, {}, S), Ie = h(
|
|
33715
33713
|
"",
|
|
@@ -33740,9 +33738,9 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33740
33738
|
if (arguments.length != 2)
|
|
33741
33739
|
throw new Error("Function lang expects (string)");
|
|
33742
33740
|
for (var f, y = c.contextNode; y != null && y.nodeType != O.DOCUMENT_NODE; y = y.parentNode) {
|
|
33743
|
-
var
|
|
33744
|
-
if (
|
|
33745
|
-
f = String(
|
|
33741
|
+
var x = y.getAttributeNS(z.XML_NAMESPACE_URI, "lang");
|
|
33742
|
+
if (x != null) {
|
|
33743
|
+
f = String(x);
|
|
33746
33744
|
break;
|
|
33747
33745
|
}
|
|
33748
33746
|
}
|
|
@@ -33760,8 +33758,8 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33760
33758
|
if (arguments.length != 2 || !le.instance_of(f = arguments[1].evaluate(c), ce))
|
|
33761
33759
|
throw new Error("Function sum expects (node-set)");
|
|
33762
33760
|
f = f.toUnsortedArray();
|
|
33763
|
-
for (var y = 0,
|
|
33764
|
-
y += new me(ce.prototype.stringForNode(f[
|
|
33761
|
+
for (var y = 0, x = 0; x < f.length; x++)
|
|
33762
|
+
y += new me(ce.prototype.stringForNode(f[x])).numberValue();
|
|
33765
33763
|
return new me(y);
|
|
33766
33764
|
}, _e.floor = function() {
|
|
33767
33765
|
var c = arguments[0];
|
|
@@ -33785,9 +33783,9 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33785
33783
|
}, le.splitQName = function(c) {
|
|
33786
33784
|
var f = c.indexOf(":");
|
|
33787
33785
|
return f == -1 ? [null, c] : [c.substring(0, f), c.substring(f + 1)];
|
|
33788
|
-
}, le.resolveQName = function(c, f, y,
|
|
33786
|
+
}, le.resolveQName = function(c, f, y, x) {
|
|
33789
33787
|
var v = le.splitQName(c);
|
|
33790
|
-
return v[0] != null ? v[0] = f.getNamespace(v[0], y) :
|
|
33788
|
+
return v[0] != null ? v[0] = f.getNamespace(v[0], y) : x ? (v[0] = f.getNamespace("", y), v[0] == null && (v[0] = "")) : v[0] = "", v;
|
|
33791
33789
|
}, le.isSpace = function(c) {
|
|
33792
33790
|
return c == 9 || c == 13 || c == 10 || c == 32;
|
|
33793
33791
|
}, le.isLetter = function(c) {
|
|
@@ -33797,22 +33795,22 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33797
33795
|
}, le.coalesceText = function(c) {
|
|
33798
33796
|
for (var f = c.firstChild; f != null; f = f.nextSibling)
|
|
33799
33797
|
if (f.nodeType == O.TEXT_NODE || f.nodeType == O.CDATA_SECTION_NODE) {
|
|
33800
|
-
var y = f.nodeValue,
|
|
33798
|
+
var y = f.nodeValue, x = f;
|
|
33801
33799
|
for (f = f.nextSibling; f != null && (f.nodeType == O.TEXT_NODE || f.nodeType == O.CDATA_SECTION_NODE); ) {
|
|
33802
33800
|
y += f.nodeValue;
|
|
33803
33801
|
var v = f;
|
|
33804
33802
|
f = f.nextSibling, v.parentNode.removeChild(v);
|
|
33805
33803
|
}
|
|
33806
|
-
if (
|
|
33807
|
-
var S =
|
|
33808
|
-
if (
|
|
33809
|
-
S.removeChild(
|
|
33804
|
+
if (x.nodeType == O.CDATA_SECTION_NODE) {
|
|
33805
|
+
var S = x.parentNode;
|
|
33806
|
+
if (x.nextSibling == null)
|
|
33807
|
+
S.removeChild(x), S.appendChild(S.ownerDocument.createTextNode(y));
|
|
33810
33808
|
else {
|
|
33811
|
-
var J =
|
|
33812
|
-
S.removeChild(
|
|
33809
|
+
var J = x.nextSibling;
|
|
33810
|
+
S.removeChild(x), S.insertBefore(S.ownerDocument.createTextNode(y), J);
|
|
33813
33811
|
}
|
|
33814
33812
|
} else
|
|
33815
|
-
|
|
33813
|
+
x.nodeValue = y;
|
|
33816
33814
|
if (f == null)
|
|
33817
33815
|
break;
|
|
33818
33816
|
} else f.nodeType == O.ELEMENT_NODE && le.coalesceText(f);
|
|
@@ -33829,15 +33827,15 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33829
33827
|
if (c.nodeType == O.ELEMENT_NODE && (c.getAttribute("id") == f || c.getAttributeNS(null, "id") == f))
|
|
33830
33828
|
return c;
|
|
33831
33829
|
for (var y = c.firstChild; y != null; y = y.nextSibling) {
|
|
33832
|
-
var
|
|
33833
|
-
if (
|
|
33834
|
-
return
|
|
33830
|
+
var x = le.getElementById(y, f);
|
|
33831
|
+
if (x != null)
|
|
33832
|
+
return x;
|
|
33835
33833
|
}
|
|
33836
33834
|
return null;
|
|
33837
33835
|
};
|
|
33838
33836
|
var Wt = function() {
|
|
33839
|
-
function c(y,
|
|
33840
|
-
var v =
|
|
33837
|
+
function c(y, x) {
|
|
33838
|
+
var v = x ? ": " + x.toString() : "";
|
|
33841
33839
|
switch (y) {
|
|
33842
33840
|
case f.INVALID_EXPRESSION_ERR:
|
|
33843
33841
|
return "Invalid expression" + v;
|
|
@@ -33846,14 +33844,14 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33846
33844
|
}
|
|
33847
33845
|
return null;
|
|
33848
33846
|
}
|
|
33849
|
-
function f(y,
|
|
33850
|
-
var S = Error.call(this, c(y,
|
|
33851
|
-
return S.code = y, S.exception =
|
|
33847
|
+
function f(y, x, v) {
|
|
33848
|
+
var S = Error.call(this, c(y, x) || v);
|
|
33849
|
+
return S.code = y, S.exception = x, S;
|
|
33852
33850
|
}
|
|
33853
33851
|
return f.prototype = Object.create(Error.prototype), f.prototype.constructor = f, f.superclass = Error, f.prototype.toString = function() {
|
|
33854
33852
|
return this.message;
|
|
33855
|
-
}, f.fromMessage = function(y,
|
|
33856
|
-
return new f(null,
|
|
33853
|
+
}, f.fromMessage = function(y, x) {
|
|
33854
|
+
return new f(null, x, y);
|
|
33857
33855
|
}, f.INVALID_EXPRESSION_ERR = 51, f.TYPE_ERR = 52, f;
|
|
33858
33856
|
}();
|
|
33859
33857
|
Lt.prototype = {}, Lt.prototype.constructor = Lt, Lt.superclass = Object.prototype;
|
|
@@ -33873,8 +33871,8 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33873
33871
|
}
|
|
33874
33872
|
}, Lt.prototype.evaluate = function(c, f, y) {
|
|
33875
33873
|
this.context.expressionContextNode = c, this.context.caseInsensitive = Lt.detectHtmlDom(c);
|
|
33876
|
-
var
|
|
33877
|
-
return new I(
|
|
33874
|
+
var x = this.xpath.evaluate(this.context);
|
|
33875
|
+
return new I(x, f);
|
|
33878
33876
|
}, $n.prototype = {}, $n.prototype.constructor = $n, $n.superclass = Object.prototype;
|
|
33879
33877
|
function $n(c) {
|
|
33880
33878
|
this.xpathNSResolver = c;
|
|
@@ -33933,20 +33931,20 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33933
33931
|
return this.nodes[c];
|
|
33934
33932
|
}, I.ANY_TYPE = 0, I.NUMBER_TYPE = 1, I.STRING_TYPE = 2, I.BOOLEAN_TYPE = 3, I.UNORDERED_NODE_ITERATOR_TYPE = 4, I.ORDERED_NODE_ITERATOR_TYPE = 5, I.UNORDERED_NODE_SNAPSHOT_TYPE = 6, I.ORDERED_NODE_SNAPSHOT_TYPE = 7, I.ANY_UNORDERED_NODE_TYPE = 8, I.FIRST_ORDERED_NODE_TYPE = 9;
|
|
33935
33933
|
function V(c, f) {
|
|
33936
|
-
c.createExpression = function(y,
|
|
33934
|
+
c.createExpression = function(y, x) {
|
|
33937
33935
|
try {
|
|
33938
|
-
return new Lt(y,
|
|
33936
|
+
return new Lt(y, x, f);
|
|
33939
33937
|
} catch (v) {
|
|
33940
33938
|
throw new Wt(Wt.INVALID_EXPRESSION_ERR, v);
|
|
33941
33939
|
}
|
|
33942
33940
|
}, c.createNSResolver = function(y) {
|
|
33943
33941
|
return new R(y);
|
|
33944
|
-
}, c.evaluate = function(y,
|
|
33942
|
+
}, c.evaluate = function(y, x, v, S, J) {
|
|
33945
33943
|
if (S < 0 || S > 9)
|
|
33946
33944
|
throw { code: 0, toString: function() {
|
|
33947
33945
|
return "Request type not supported";
|
|
33948
33946
|
} };
|
|
33949
|
-
return c.createExpression(y, v, f).evaluate(
|
|
33947
|
+
return c.createExpression(y, v, f).evaluate(x, S, J);
|
|
33950
33948
|
};
|
|
33951
33949
|
}
|
|
33952
33950
|
try {
|
|
@@ -33959,7 +33957,7 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
33959
33957
|
} catch {
|
|
33960
33958
|
}
|
|
33961
33959
|
V(n, new A()), function() {
|
|
33962
|
-
var c = new A(), f = new nn(), y = new Et(),
|
|
33960
|
+
var c = new A(), f = new nn(), y = new Et(), x = new bn();
|
|
33963
33961
|
function v(Q) {
|
|
33964
33962
|
return {
|
|
33965
33963
|
getNamespace: function(Oe, kt) {
|
|
@@ -34039,7 +34037,7 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
34039
34037
|
return Q[Oe];
|
|
34040
34038
|
});
|
|
34041
34039
|
}
|
|
34042
|
-
return
|
|
34040
|
+
return x;
|
|
34043
34041
|
}
|
|
34044
34042
|
function Yf(Q, Oe, kt) {
|
|
34045
34043
|
Q in kt && (Oe[Q] = kt[Q]);
|
|
@@ -34130,12 +34128,12 @@ var C6 = {}, ri = {}, Do = {}, bl = {};
|
|
|
34130
34128
|
return this.mappings[y];
|
|
34131
34129
|
}
|
|
34132
34130
|
};
|
|
34133
|
-
return function(y,
|
|
34134
|
-
return n.selectWithResolver(y,
|
|
34131
|
+
return function(y, x, v) {
|
|
34132
|
+
return n.selectWithResolver(y, x, f, v);
|
|
34135
34133
|
};
|
|
34136
|
-
}, n.selectWithResolver = function(c, f, y,
|
|
34134
|
+
}, n.selectWithResolver = function(c, f, y, x) {
|
|
34137
34135
|
var v = new Lt(c, y, new A()), S = I.ANY_TYPE, J = v.evaluate(f, S, null);
|
|
34138
|
-
return J.resultType == I.STRING_TYPE ? J = J.stringValue : J.resultType == I.NUMBER_TYPE ? J = J.numberValue : J.resultType == I.BOOLEAN_TYPE ? J = J.booleanValue : (J = J.nodes,
|
|
34136
|
+
return J.resultType == I.STRING_TYPE ? J = J.stringValue : J.resultType == I.NUMBER_TYPE ? J = J.numberValue : J.resultType == I.BOOLEAN_TYPE ? J = J.booleanValue : (J = J.nodes, x && (J = J[0])), J;
|
|
34139
34137
|
}, n.select1 = function(c, f) {
|
|
34140
34138
|
return n.select(c, f, !0);
|
|
34141
34139
|
};
|
|
@@ -34304,12 +34302,12 @@ Ae.assertIsDocumentFragmentNode = X6;
|
|
|
34304
34302
|
`;
|
|
34305
34303
|
}
|
|
34306
34304
|
t.normalizePem = b;
|
|
34307
|
-
function
|
|
34305
|
+
function $(M) {
|
|
34308
34306
|
if (!t.PEM_FORMAT_REGEX.test(M.trim()))
|
|
34309
34307
|
throw new Error("Invalid PEM format.");
|
|
34310
34308
|
return Buffer.from(M.replace(/(\r\n|\r)/g, "").replace(/-----BEGIN [A-Z\x20]{1,48}-----\n?/, "").replace(/-----END [A-Z\x20]{1,48}-----\n?/, ""), "base64");
|
|
34311
34309
|
}
|
|
34312
|
-
t.pemToDer =
|
|
34310
|
+
t.pemToDer = $;
|
|
34313
34311
|
function C(M, H) {
|
|
34314
34312
|
const X = Buffer.isBuffer(M) ? M.toString("base64").trim() : M.replace(/(\r\n|\r)/g, "").trim();
|
|
34315
34313
|
if (t.PEM_FORMAT_REGEX.test(X))
|
|
@@ -34443,8 +34441,8 @@ class ey {
|
|
|
34443
34441
|
if (Jo.isArrayHasLength(s))
|
|
34444
34442
|
for (const g of s) {
|
|
34445
34443
|
let b = !1;
|
|
34446
|
-
for (const
|
|
34447
|
-
|
|
34444
|
+
for (const $ of p)
|
|
34445
|
+
$.prefix === g.prefix && $.namespaceURI === g.namespaceURI && (b = !0);
|
|
34448
34446
|
b || p.push(g);
|
|
34449
34447
|
}
|
|
34450
34448
|
return p.sort(this.nsCompare), u.push(...p.map((g) => g.prefix ? ` xmlns:${g.prefix}="${g.namespaceURI}"` : ` xmlns="${g.namespaceURI}"`)), { rendered: u.join(""), newDefaultNs: d };
|
|
@@ -35650,16 +35648,16 @@ function Si(t, e, n, r, i) {
|
|
|
35650
35648
|
}
|
|
35651
35649
|
e.push("<", u);
|
|
35652
35650
|
for (var b = 0; b < a; b++) {
|
|
35653
|
-
var
|
|
35654
|
-
|
|
35651
|
+
var $ = s.item(b);
|
|
35652
|
+
$.prefix == "xmlns" ? i.push({ prefix: $.localName, namespace: $.value }) : $.nodeName == "xmlns" && i.push({ prefix: "", namespace: $.value });
|
|
35655
35653
|
}
|
|
35656
35654
|
for (var b = 0; b < a; b++) {
|
|
35657
|
-
var
|
|
35658
|
-
if (ym(
|
|
35659
|
-
var C =
|
|
35655
|
+
var $ = s.item(b);
|
|
35656
|
+
if (ym($, n, i)) {
|
|
35657
|
+
var C = $.prefix || "", D = $.namespaceURI;
|
|
35660
35658
|
du(e, C ? "xmlns:" + C : "xmlns", D), i.push({ prefix: C, namespace: D });
|
|
35661
35659
|
}
|
|
35662
|
-
Si(
|
|
35660
|
+
Si($, e, n, r, i);
|
|
35663
35661
|
}
|
|
35664
35662
|
if (l === u && ym(t, n, i)) {
|
|
35665
35663
|
var C = t.prefix || "", D = t.namespaceURI;
|
|
@@ -37980,7 +37978,7 @@ function pS(t, e, n, r, i) {
|
|
|
37980
37978
|
d = G.index, p = d + G[0].length, g.lineNumber++;
|
|
37981
37979
|
g.columnNumber = L - d + 1;
|
|
37982
37980
|
}
|
|
37983
|
-
for (var d = 0, p = 0, h = /.*(?:\r\n?|\n)|.*$/g, g = r.locator, b = [{ currentNSMap: e }],
|
|
37981
|
+
for (var d = 0, p = 0, h = /.*(?:\r\n?|\n)|.*$/g, g = r.locator, b = [{ currentNSMap: e }], $ = {}, C = 0; ; ) {
|
|
37984
37982
|
try {
|
|
37985
37983
|
var D = t.indexOf("<", C);
|
|
37986
37984
|
if (D < 0) {
|
|
@@ -38013,7 +38011,7 @@ function pS(t, e, n, r, i) {
|
|
|
38013
38011
|
default:
|
|
38014
38012
|
g && u(D);
|
|
38015
38013
|
var Y = new ky(), Ee = b[b.length - 1].currentNSMap, j = fS(t, D, Y, Ee, a, i), F = Y.length;
|
|
38016
|
-
if (!Y.closed && gS(t, j, Y.tagName,
|
|
38014
|
+
if (!Y.closed && gS(t, j, Y.tagName, $) && (Y.closed = !0, n.nbsp || i.warning("unclosed xml attribute")), g && F) {
|
|
38017
38015
|
for (var P = bm(g, {}), N = 0; N < F; N++) {
|
|
38018
38016
|
var k = Y[N];
|
|
38019
38017
|
u(k.offset), k.locator = bm(g, {});
|
|
@@ -38035,7 +38033,7 @@ function bm(t, e) {
|
|
|
38035
38033
|
return e.lineNumber = t.lineNumber, e.columnNumber = t.columnNumber, e;
|
|
38036
38034
|
}
|
|
38037
38035
|
function fS(t, e, n, r, i, s) {
|
|
38038
|
-
function a(g, b,
|
|
38036
|
+
function a(g, b, $) {
|
|
38039
38037
|
n.attributeNames.hasOwnProperty(g) && s.fatalError("Attribute " + g + " redefined"), n.addValue(
|
|
38040
38038
|
g,
|
|
38041
38039
|
// @see https://www.w3.org/TR/xml/#AVNormalize
|
|
@@ -38043,7 +38041,7 @@ function fS(t, e, n, r, i, s) {
|
|
|
38043
38041
|
// - recursive replacement of (DTD) entity references
|
|
38044
38042
|
// - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA
|
|
38045
38043
|
b.replace(/[\t\n\r]/g, " ").replace(/&#?\w+;/g, i),
|
|
38046
|
-
|
|
38044
|
+
$
|
|
38047
38045
|
);
|
|
38048
38046
|
}
|
|
38049
38047
|
for (var l, u, d = ++e, p = _s; ; ) {
|
|
@@ -38853,8 +38851,8 @@ class Vn {
|
|
|
38853
38851
|
if (n = Re.findChildren(e, "Transforms"), n.length !== 0) {
|
|
38854
38852
|
const p = n[0], h = Re.findChildren(p, "Transform");
|
|
38855
38853
|
for (const b of h) {
|
|
38856
|
-
const
|
|
38857
|
-
|
|
38854
|
+
const $ = Re.findAttr(b, "Algorithm");
|
|
38855
|
+
$ && l.push($.value);
|
|
38858
38856
|
}
|
|
38859
38857
|
const g = Re.findChildren(h[h.length - 1], "InclusiveNamespaces");
|
|
38860
38858
|
Re.isArrayHasLength(g) && (u = g.flatMap((b) => (b.getAttribute("PrefixList") ?? "").split(" ")).filter((b) => b.length > 0));
|
|
@@ -38933,13 +38931,13 @@ class Vn {
|
|
|
38933
38931
|
p ? (a += `:${p}`, u = `${p}:`) : u = "", Object.keys(h).forEach(function(H) {
|
|
38934
38932
|
H !== "xmlns" && H !== a && l.push(`${H}="${h[H]}"`);
|
|
38935
38933
|
}), l.push(`${a}="http://www.w3.org/2000/09/xmldsig#"`);
|
|
38936
|
-
let
|
|
38937
|
-
|
|
38934
|
+
let $ = `<${u}Signature ${l.join(" ")}>`;
|
|
38935
|
+
$ += this.createSignedInfo(s, p), $ += this.getKeyInfo(p), $ += `</${u}Signature>`, this.originalXmlWithIds = s.toString();
|
|
38938
38936
|
let C = "";
|
|
38939
38937
|
Object.keys(b).forEach(function(H) {
|
|
38940
38938
|
C += `xmlns:${H}="${b[H]}" `;
|
|
38941
38939
|
});
|
|
38942
|
-
const D = `<Dummy ${C}>${
|
|
38940
|
+
const D = `<Dummy ${C}>${$}</Dummy>`, A = new Ir.DOMParser().parseFromString(D).documentElement.firstChild, z = Xt.select1(g.reference, s);
|
|
38943
38941
|
if (!Ft.isNodeLike(z)) {
|
|
38944
38942
|
const H = new Error(`the following xpath cannot be used because it was not found: ${g.reference}`);
|
|
38945
38943
|
if (i) {
|
|
@@ -40738,7 +40736,7 @@ function _G(t, e) {
|
|
|
40738
40736
|
), u = n ? await t.connections.list(n) : { connections: [] }, d = l.connections.map((p) => {
|
|
40739
40737
|
var b;
|
|
40740
40738
|
const h = (b = u.connections) == null ? void 0 : b.find(
|
|
40741
|
-
(
|
|
40739
|
+
($) => $.name === p.name
|
|
40742
40740
|
);
|
|
40743
40741
|
if (!(h != null && h.options))
|
|
40744
40742
|
return p;
|