authhero 0.226.0 → 0.227.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.mjs CHANGED
@@ -361,8 +361,8 @@ 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, x = (h == null ? void 0 : h.exactUsedKey) || a, C = Object.prototype.toString.apply(g), O = ["[object Number]", "[object Function]", "[object RegExp]"], D = 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
- if (A && g && z && O.indexOf(C) < 0 && !(Ne(D) && Array.isArray(g))) {
364
+ const b = (h == null ? void 0 : h.usedKey) || a, A = (h == null ? void 0 : h.exactUsedKey) || a, T = Object.prototype.toString.apply(g), O = ["[object Number]", "[object Function]", "[object RegExp]"], D = n.joinArrays !== void 0 ? n.joinArrays : this.options.joinArrays, x = !this.i18nFormat || this.i18nFormat.handleAsObject, z = !Ne(g) && typeof g != "boolean" && typeof g != "number";
365
+ if (x && g && z && O.indexOf(T) < 0 && !(Ne(D) && 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!");
368
368
  const q = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(b, g, {
@@ -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 ? [] : {}, K = q ? x : b;
375
+ const q = Array.isArray(g), M = q ? [] : {}, K = q ? A : b;
376
376
  for (const W in g)
377
377
  if (Object.prototype.hasOwnProperty.call(g, W)) {
378
378
  const Z = `${K}${s}${W}`;
@@ -384,7 +384,7 @@ class _a extends dc {
384
384
  }
385
385
  g = M;
386
386
  }
387
- } else if (A && Ne(D) && Array.isArray(g))
387
+ } else if (x && Ne(D) && Array.isArray(g))
388
388
  g = g.join(D), g && (g = this.extendTranslation(g, e, n, r));
389
389
  else {
390
390
  let q = !1, M = !1;
@@ -444,21 +444,21 @@ 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 x = e.match(this.interpolator.nestingRegexp);
448
- g = x && x.length;
447
+ const A = e.match(this.interpolator.nestingRegexp);
448
+ g = A && A.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 x = e.match(this.interpolator.nestingRegexp), C = x && x.length;
456
- g < C && (r.nest = !1);
455
+ const A = e.match(this.interpolator.nestingRegexp), T = A && A.length;
456
+ g < T && (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 x = arguments.length, C = new Array(x), O = 0; O < x; O++)
460
- C[O] = arguments[O];
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);
459
+ for (var A = arguments.length, T = new Array(A), O = 0; O < A; O++)
460
+ T[O] = arguments[O];
461
+ return (s == null ? void 0 : s[0]) === T[0] && !r.context ? (a.logger.warn(`It seems you are nesting recursively key: ${T[0]} in key: ${n[0]}`), null) : a.translate(...T, n);
462
462
  }, r)), r.interpolation && this.interpolator.reset();
463
463
  }
464
464
  const l = r.postProcess || this.options.postProcess, u = Ne(l) ? [l] : l;
@@ -478,10 +478,10 @@ 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, x = 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);
481
+ const g = n.count !== void 0 && !Ne(n.count), b = g && !n.ordinal && n.count === 0, A = n.context !== void 0 && (Ne(n.context) || typeof n.context == "number") && n.context !== "", T = n.lngs ? n.lngs : this.languageUtils.toResolveHierarchy(n.lng || this.language, n.fallbackLng);
482
482
  h.forEach((O) => {
483
- var D, A;
484
- this.isValidLookup(r) || (l = O, !rh[`${C[0]}-${O}`] && ((D = this.utils) != null && D.hasLoadedNamespace) && !((A = this.utils) != null && A.hasLoadedNamespace(l)) && (rh[`${C[0]}-${O}`] = !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) => {
483
+ var D, x;
484
+ this.isValidLookup(r) || (l = O, !rh[`${T[0]}-${O}`] && ((D = this.utils) != null && D.hasLoadedNamespace) && !((x = this.utils) != null && x.hasLoadedNamespace(l)) && (rh[`${T[0]}-${O}`] = !0, this.logger.warn(`key "${i}" for languages "${T.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!!!")), T.forEach((z) => {
485
485
  var K;
486
486
  if (this.isValidLookup(r)) return;
487
487
  a = z;
@@ -492,7 +492,7 @@ class _a extends dc {
492
492
  let W;
493
493
  g && (W = this.pluralResolver.getSuffix(z, n.count, n));
494
494
  const Z = `${this.options.pluralSeparator}zero`, Y = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
495
- if (g && (q.push(p + W), n.ordinal && W.indexOf(Y) === 0 && q.push(p + W.replace(Y, this.options.pluralSeparator)), b && q.push(p + Z)), x) {
495
+ if (g && (q.push(p + W), n.ordinal && W.indexOf(Y) === 0 && q.push(p + W.replace(Y, this.options.pluralSeparator)), b && q.push(p + Z)), A) {
496
496
  const Se = `${p}${this.options.contextSeparator}${n.context}`;
497
497
  q.push(Se), g && (q.push(Se + W), n.ordinal && W.indexOf(Y) === 0 && q.push(Se + W.replace(Y, this.options.pluralSeparator)), b && q.push(Se + Z));
498
498
  }
@@ -696,13 +696,13 @@ class Yy {
696
696
  unescapePrefix: h,
697
697
  nestingPrefix: g,
698
698
  nestingPrefixEscaped: b,
699
- nestingSuffix: x,
700
- nestingSuffixEscaped: C,
699
+ nestingSuffix: A,
700
+ nestingSuffixEscaped: T,
701
701
  nestingOptionsSeparator: O,
702
702
  maxReplaces: D,
703
- alwaysFormat: A
703
+ alwaysFormat: x
704
704
  } = e.interpolation;
705
- this.escape = n !== void 0 ? n : Vy, 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 = x ? li(x) : C || li(")"), this.nestingOptionsSeparator = O || ",", this.maxReplaces = D || 1e3, this.alwaysFormat = A !== void 0 ? A : !1, this.resetRegExp();
705
+ this.escape = n !== void 0 ? n : Vy, 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 = A ? li(A) : T || li(")"), this.nestingOptionsSeparator = O || ",", this.maxReplaces = D || 1e3, this.alwaysFormat = x !== void 0 ? x : !1, this.resetRegExp();
706
706
  }
707
707
  reset() {
708
708
  this.options && this.init(this.options);
@@ -714,16 +714,16 @@ class Yy {
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 = (x) => {
718
- if (x.indexOf(this.formatSeparator) < 0) {
719
- const A = ah(n, u, x, this.options.keySeparator, this.options.ignoreJSONStructure);
720
- return this.alwaysFormat ? this.format(A, void 0, r, {
717
+ const u = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, d = (A) => {
718
+ if (A.indexOf(this.formatSeparator) < 0) {
719
+ const x = ah(n, u, A, this.options.keySeparator, this.options.ignoreJSONStructure);
720
+ return this.alwaysFormat ? this.format(x, void 0, r, {
721
721
  ...i,
722
722
  ...n,
723
- interpolationkey: x
724
- }) : A;
723
+ interpolationkey: A
724
+ }) : x;
725
725
  }
726
- const C = x.split(this.formatSeparator), O = C.shift().trim(), D = C.join(this.formatSeparator).trim();
726
+ const T = A.split(this.formatSeparator), O = T.shift().trim(), D = T.join(this.formatSeparator).trim();
727
727
  return this.format(ah(n, u, O, this.options.keySeparator, this.options.ignoreJSONStructure), D, r, {
728
728
  ...i,
729
729
  ...n,
@@ -734,27 +734,27 @@ class Yy {
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: (x) => Cl(x)
737
+ safeValue: (A) => Cl(A)
738
738
  }, {
739
739
  regex: this.regexp,
740
- safeValue: (x) => this.escapeValue ? Cl(this.escape(x)) : Cl(x)
741
- }].forEach((x) => {
742
- for (l = 0; s = x.regex.exec(e); ) {
743
- const C = s[1].trim();
744
- if (a = d(C), a === void 0)
740
+ safeValue: (A) => this.escapeValue ? Cl(this.escape(A)) : Cl(A)
741
+ }].forEach((A) => {
742
+ for (l = 0; s = A.regex.exec(e); ) {
743
+ const T = s[1].trim();
744
+ if (a = d(T), a === void 0)
745
745
  if (typeof p == "function") {
746
746
  const D = p(e, s, i);
747
747
  a = Ne(D) ? D : "";
748
- } else if (i && Object.prototype.hasOwnProperty.call(i, C))
748
+ } else if (i && Object.prototype.hasOwnProperty.call(i, T))
749
749
  a = "";
750
750
  else if (h) {
751
751
  a = s[0];
752
752
  continue;
753
753
  } else
754
- this.logger.warn(`missed to pass in variable ${C} for interpolating ${e}`), a = "";
754
+ this.logger.warn(`missed to pass in variable ${T} for interpolating ${e}`), a = "";
755
755
  else !Ne(a) && !this.useRawValueToEscape && (a = Zf(a));
756
- const O = x.safeValue(a);
757
- if (e = e.replace(s[0], O), h ? (x.regex.lastIndex += a.length, x.regex.lastIndex -= s[0].length) : x.regex.lastIndex = 0, l++, l >= this.maxReplaces)
756
+ const O = A.safeValue(a);
757
+ if (e = e.replace(s[0], O), h ? (A.regex.lastIndex += a.length, A.regex.lastIndex -= s[0].length) : A.regex.lastIndex = 0, l++, l >= this.maxReplaces)
758
758
  break;
759
759
  }
760
760
  }), e;
@@ -767,15 +767,15 @@ class Yy {
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), x = g.match(/"/g);
771
- (((b == null ? void 0 : b.length) ?? 0) % 2 === 0 && !x || x.length % 2 !== 0) && (g = g.replace(/'/g, '"'));
770
+ const b = g.match(/'/g), A = g.match(/"/g);
771
+ (((b == null ? void 0 : b.length) ?? 0) % 2 === 0 && !A || A.length % 2 !== 0) && (g = g.replace(/'/g, '"'));
772
772
  try {
773
773
  a = JSON.parse(g), d && (a = {
774
774
  ...d,
775
775
  ...a
776
776
  });
777
- } catch (C) {
778
- return this.logger.warn(`failed parsing options string in nesting for key ${u}`, C), `${u}${p}${g}`;
777
+ } catch (T) {
778
+ return this.logger.warn(`failed parsing options string in nesting for key ${u}`, T), `${u}${p}${g}`;
779
779
  }
780
780
  return a.defaultValue && a.defaultValue.indexOf(this.prefix) > -1 && delete a.defaultValue, u;
781
781
  };
@@ -894,8 +894,8 @@ class Qy {
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]) || {}, x = b.locale || b.lng || i.locale || i.lng || r;
898
- g = this.formats[d](l, x, {
897
+ const b = ((h = i == null ? void 0 : i.formatParams) == null ? void 0 : h[i.interpolationkey]) || {}, A = b.locale || b.lng || i.locale || i.lng || r;
898
+ g = this.formats[d](l, A, {
899
899
  ...p,
900
900
  ...i,
901
901
  ...b
@@ -1035,16 +1035,16 @@ class tw extends dc {
1035
1035
  const b = {
1036
1036
  ...a,
1037
1037
  isUpdate: s
1038
- }, x = this.backend.create.bind(this.backend);
1039
- if (x.length < 6)
1038
+ }, A = this.backend.create.bind(this.backend);
1039
+ if (A.length < 6)
1040
1040
  try {
1041
- let C;
1042
- x.length === 5 ? C = x(e, n, r, i, b) : C = x(e, n, r, i), C && typeof C.then == "function" ? C.then((O) => l(null, O)).catch(l) : l(null, C);
1043
- } catch (C) {
1044
- l(C);
1041
+ let T;
1042
+ A.length === 5 ? T = A(e, n, r, i, b) : T = A(e, n, r, i), T && typeof T.then == "function" ? T.then((O) => l(null, O)).catch(l) : l(null, T);
1043
+ } catch (T) {
1044
+ l(T);
1045
1045
  }
1046
1046
  else
1047
- x(e, n, r, i, l, b);
1047
+ A(e, n, r, i, l, b);
1048
1048
  }
1049
1049
  !e || !e[0] || this.store.addResource(e[0], n, r, i);
1050
1050
  }
@@ -1155,13 +1155,13 @@ 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 Yy(this.options), g.utils = {
1156
1156
  hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
1157
1157
  }, g.backendConnector = new tw(s(this.modules.backend), g.resourceStore, g, this.options), g.backendConnector.on("*", function(b) {
1158
- for (var x = arguments.length, C = new Array(x > 1 ? x - 1 : 0), O = 1; O < x; O++)
1159
- C[O - 1] = arguments[O];
1160
- e.emit(b, ...C);
1158
+ for (var A = arguments.length, T = new Array(A > 1 ? A - 1 : 0), O = 1; O < A; O++)
1159
+ T[O - 1] = arguments[O];
1160
+ e.emit(b, ...T);
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 x = arguments.length, C = new Array(x > 1 ? x - 1 : 0), O = 1; O < x; O++)
1163
- C[O - 1] = arguments[O];
1164
- e.emit(b, ...C);
1162
+ for (var A = arguments.length, T = new Array(A > 1 ? A - 1 : 0), O = 1; O < A; O++)
1163
+ T[O - 1] = arguments[O];
1164
+ e.emit(b, ...T);
1165
1165
  }), this.modules.external.forEach((b) => {
1166
1166
  b.init && b.init(this);
1167
1167
  });
@@ -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((x) => `${u.keyPrefix}${g}${x}`) : b = u.keyPrefix ? `${u.keyPrefix}${g}${a}` : a, i.t(b, u);
1268
+ return u.keyPrefix && Array.isArray(a) ? b = a.map((A) => `${u.keyPrefix}${g}${A}`) : 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
  }
@@ -3047,8 +3047,8 @@ const rv = new be().openapi(
3047
3047
  }
3048
3048
  }),
3049
3049
  async (t) => {
3050
- const { "tenant-id": e } = t.req.valid("header"), n = await t.env.data.branding.get(e);
3051
- return n ? t.json(n) : t.json(iv);
3050
+ const e = await t.env.data.branding.get(t.var.tenant_id);
3051
+ return e ? t.json(e) : t.json(iv);
3052
3052
  }
3053
3053
  ).openapi(
3054
3054
  U({
@@ -3079,8 +3079,8 @@ const rv = new be().openapi(
3079
3079
  }
3080
3080
  }),
3081
3081
  async (t) => {
3082
- const { "tenant-id": e } = t.req.valid("header"), n = t.req.valid("json");
3083
- return await t.env.data.branding.set(e, n), t.text("OK");
3082
+ const e = t.req.valid("json");
3083
+ return await t.env.data.branding.set(t.var.tenant_id, e), t.text("OK");
3084
3084
  }
3085
3085
  ).route("/themes", rv);
3086
3086
  var E = class extends Error {
@@ -3162,14 +3162,14 @@ const cv = {}, lv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
3162
3162
  n = null, e.setRandomFallback = function(j) {
3163
3163
  n = j;
3164
3164
  }, e.genSaltSync = function(j, F) {
3165
- if (j = j || C, typeof j != "number")
3165
+ if (j = j || T, typeof j != "number")
3166
3166
  throw Error("Illegal arguments: " + typeof j + ", " + typeof F);
3167
3167
  j < 4 ? j = 4 : j > 31 && (j = 31);
3168
3168
  var P = [];
3169
- return P.push("$2a$"), j < 10 && P.push("0"), P.push(j.toString()), P.push("$"), P.push(h(r(x), x)), P.join("");
3169
+ return P.push("$2a$"), j < 10 && P.push("0"), P.push(j.toString()), P.push("$"), P.push(h(r(A), A)), P.join("");
3170
3170
  }, e.genSalt = function(j, F, P) {
3171
3171
  if (typeof F == "function" && (P = F, F = void 0), typeof j == "function" && (P = j, j = void 0), typeof j > "u")
3172
- j = C;
3172
+ j = T;
3173
3173
  else if (typeof j != "number")
3174
3174
  throw Error("illegal arguments: " + typeof j);
3175
3175
  function N(k) {
@@ -3196,7 +3196,7 @@ const cv = {}, lv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
3196
3196
  });
3197
3197
  });
3198
3198
  }, e.hashSync = function(j, F) {
3199
- if (typeof F > "u" && (F = C), typeof F == "number" && (F = e.genSaltSync(F)), typeof j != "string" || typeof F != "string")
3199
+ if (typeof F > "u" && (F = T), typeof F == "number" && (F = e.genSaltSync(F)), typeof j != "string" || typeof F != "string")
3200
3200
  throw Error("Illegal arguments: " + typeof j + ", " + typeof F);
3201
3201
  return Se(j, F);
3202
3202
  }, e.hash = function(j, F, P, N) {
@@ -3497,7 +3497,7 @@ const cv = {}, lv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
3497
3497
  Date.now = Date.now || function() {
3498
3498
  return +/* @__PURE__ */ new Date();
3499
3499
  };
3500
- var x = 16, C = 10, O = 16, D = 100, A = [
3500
+ var A = 16, T = 10, O = 16, D = 100, x = [
3501
3501
  608135816,
3502
3502
  2242054355,
3503
3503
  320440878,
@@ -4582,15 +4582,15 @@ const cv = {}, lv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
4582
4582
  return;
4583
4583
  } else
4584
4584
  throw pe;
4585
- if (F.length !== x)
4586
- if (pe = Error("Illegal salt length: " + F.length + " != " + x), N) {
4585
+ if (F.length !== A)
4586
+ if (pe = Error("Illegal salt length: " + F.length + " != " + A), N) {
4587
4587
  a(N.bind(this, pe));
4588
4588
  return;
4589
4589
  } else
4590
4590
  throw pe;
4591
4591
  P = 1 << P >>> 0;
4592
4592
  var se, $e, Ce = 0, ee;
4593
- Int32Array ? (se = new Int32Array(A), $e = new Int32Array(z)) : (se = A.slice(), $e = z.slice()), Z(F, j, se, $e);
4593
+ Int32Array ? (se = new Int32Array(x), $e = new Int32Array(z)) : (se = x.slice(), $e = z.slice()), Z(F, j, se, $e);
4594
4594
  function we() {
4595
4595
  if (k && k(Ce / P), Ce < P)
4596
4596
  for (var Fe = Date.now(); Ce < P && (Ce = Ce + 1, W(j, se, $e), W(F, se, $e), !(Date.now() - Fe > D)); )
@@ -4651,7 +4651,7 @@ const cv = {}, lv = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
4651
4651
  throw k;
4652
4652
  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
4653
  j += L >= "a" ? "\0" : "";
4654
- var ee = l(j), we = g(Ce, x);
4654
+ var ee = l(j), we = g(Ce, A);
4655
4655
  function Un(Fe) {
4656
4656
  var Xe = [];
4657
4657
  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 +5689,7 @@ const mb = function(t) {
5689
5689
  this.options.transformTagName && (u = this.options.transformTagName(u)), n && r && n.tagname !== "!xml" && (r = this.saveTextToParentTag(r, n, i, !1));
5690
5690
  const b = n;
5691
5691
  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 x = "";
5692
+ let A = "";
5693
5693
  if (p.length > 0 && p.lastIndexOf("/") === p.length - 1)
5694
5694
  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
5695
  else if (this.options.unpairedTags.indexOf(u) !== -1)
@@ -5697,18 +5697,18 @@ const mb = function(t) {
5697
5697
  else {
5698
5698
  const O = this.readStopNodeData(t, d, g + 1);
5699
5699
  if (!O) throw new Error(`Unexpected end of ${d}`);
5700
- s = O.i, x = O.tagContent;
5700
+ s = O.i, A = O.tagContent;
5701
5701
  }
5702
- const C = new fs(u);
5703
- u !== p && h && (C[":@"] = this.buildAttributesMap(p, i, u)), x && (x = this.parseTextData(x, u, i, !0, h, !0, !0)), i = i.substr(0, i.lastIndexOf(".")), C.add(this.options.textNodeName, x), this.addChild(n, C, i);
5702
+ const T = new fs(u);
5703
+ u !== p && h && (T[":@"] = this.buildAttributesMap(p, i, u)), A && (A = this.parseTextData(A, u, i, !0, h, !0, !0)), i = i.substr(0, i.lastIndexOf(".")), T.add(this.options.textNodeName, A), this.addChild(n, T, i);
5704
5704
  } else {
5705
5705
  if (p.length > 0 && p.lastIndexOf("/") === p.length - 1) {
5706
5706
  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 x = new fs(u);
5708
- u !== p && h && (x[":@"] = this.buildAttributesMap(p, i, u)), this.addChild(n, x, i), i = i.substr(0, i.lastIndexOf("."));
5707
+ const A = new fs(u);
5708
+ u !== p && h && (A[":@"] = this.buildAttributesMap(p, i, u)), this.addChild(n, A, i), i = i.substr(0, i.lastIndexOf("."));
5709
5709
  } else {
5710
- const x = new fs(u);
5711
- this.tagsNodeStack.push(n), u !== p && h && (x[":@"] = this.buildAttributesMap(p, i, u)), this.addChild(n, x, i), n = x;
5710
+ const A = new fs(u);
5711
+ this.tagsNodeStack.push(n), u !== p && h && (A[":@"] = this.buildAttributesMap(p, i, u)), this.addChild(n, A, i), n = A;
5712
5712
  }
5713
5713
  r = "", s = g;
5714
5714
  }
@@ -5939,8 +5939,8 @@ function e_(t, e, n, r) {
5939
5939
  if (u === void 0) continue;
5940
5940
  let d = "";
5941
5941
  if (n.length === 0 ? d = u : d = `${n}.${u}`, u === e.textNodeName) {
5942
- let x = l[u];
5943
- Bb(d, e) || (x = e.tagValueProcessor(u, x), x = t_(x, e)), s && (i += r), i += x, s = !1;
5942
+ let A = l[u];
5943
+ Bb(d, e) || (A = e.tagValueProcessor(u, A), A = t_(A, e)), s && (i += r), i += A, s = !1;
5944
5944
  continue;
5945
5945
  } else if (u === e.cdataPropName) {
5946
5946
  s && (i += r), i += `<![CDATA[${l[u][0][e.textNodeName]}]]>`, s = !1;
@@ -5949,9 +5949,9 @@ function e_(t, e, n, r) {
5949
5949
  i += r + `<!--${l[u][0][e.textNodeName]}-->`, s = !0;
5950
5950
  continue;
5951
5951
  } else if (u[0] === "?") {
5952
- const x = $h(l[":@"], e), C = u === "?xml" ? "" : r;
5952
+ const A = $h(l[":@"], e), T = u === "?xml" ? "" : r;
5953
5953
  let O = l[u][0][e.textNodeName];
5954
- O = O.length !== 0 ? " " + O : "", i += C + `<${u}${O}${x}?>`, s = !0;
5954
+ O = O.length !== 0 ? " " + O : "", i += T + `<${u}${O}${A}?>`, s = !0;
5955
5955
  continue;
5956
5956
  }
5957
5957
  let p = r;
@@ -6171,7 +6171,7 @@ function Xb(t, e, n) {
6171
6171
  });
6172
6172
  }
6173
6173
  async function Jb(t, e, n, r, i) {
6174
- var b, x, C;
6174
+ var b, A, T;
6175
6175
  if (!n.redirect_uri)
6176
6176
  throw new E(400, {
6177
6177
  message: "Missing redirect_uri in authParams"
@@ -6201,7 +6201,7 @@ async function Jb(t, e, n, r, i) {
6201
6201
  audience: u || n.client_id,
6202
6202
  destination: h.toString(),
6203
6203
  inResponseTo: p.requestId,
6204
- userId: ((C = (x = r.app_metadata) == null ? void 0 : x.vimeo) == null ? void 0 : C.user_id) || r.user_id,
6204
+ userId: ((T = (A = r.app_metadata) == null ? void 0 : A.vimeo) == null ? void 0 : T.user_id) || r.user_id,
6205
6205
  email: r.email,
6206
6206
  sessionIndex: i,
6207
6207
  signature: {
@@ -6574,7 +6574,7 @@ const r_ = [
6574
6574
  // Returns phone_number and phone_number_verified
6575
6575
  ];
6576
6576
  async function e3(t, e) {
6577
- var A, z;
6577
+ var x, z;
6578
6578
  const { tenantId: n, clientId: r, audience: i, requestedScopes: s } = e, a = s.filter(
6579
6579
  (q) => r_.includes(q)
6580
6580
  ), u = (await t.env.data.resourceServers.list(n)).resource_servers.filter(
@@ -6585,37 +6585,37 @@ async function e3(t, e) {
6585
6585
  const d = u[0];
6586
6586
  if (!d)
6587
6587
  return { scopes: a, permissions: [] };
6588
- const p = ((A = d.options) == null ? void 0 : A.enforce_policies) === !0, h = ((z = d.options) == null ? void 0 : z.token_dialect) || "access_token", b = (await t.env.data.clientGrants.list(n, {
6588
+ const p = ((x = d.options) == null ? void 0 : x.enforce_policies) === !0, h = ((z = d.options) == null ? void 0 : z.token_dialect) || "access_token", b = (await t.env.data.clientGrants.list(n, {
6589
6589
  q: `client_id:"${r}"`
6590
6590
  })).client_grants.find(
6591
6591
  (q) => q.audience === i
6592
6592
  );
6593
6593
  if (!b)
6594
6594
  return { scopes: a, permissions: [] };
6595
- const x = b.scope || [], C = (d.scopes || []).map(
6595
+ const A = b.scope || [], T = (d.scopes || []).map(
6596
6596
  (q) => q.value
6597
6597
  );
6598
6598
  if (!p) {
6599
6599
  let q;
6600
- return s.length === 0 ? q = x.filter(
6601
- (K) => C.includes(K)
6600
+ return s.length === 0 ? q = A.filter(
6601
+ (K) => T.includes(K)
6602
6602
  ) : q = s.filter(
6603
- (K) => C.includes(K) && x.includes(K)
6603
+ (K) => T.includes(K) && A.includes(K)
6604
6604
  ), { scopes: [
6605
6605
  .../* @__PURE__ */ new Set([...a, ...q])
6606
6606
  ], permissions: [] };
6607
6607
  }
6608
6608
  if (h === "access_token_authz") {
6609
- const q = x.filter(
6610
- (M) => C.includes(M)
6609
+ const q = A.filter(
6610
+ (M) => T.includes(M)
6611
6611
  );
6612
6612
  return { scopes: a, permissions: q };
6613
6613
  }
6614
6614
  let O;
6615
- return s.length === 0 ? O = x.filter(
6616
- (q) => C.includes(q)
6615
+ return s.length === 0 ? O = A.filter(
6616
+ (q) => T.includes(q)
6617
6617
  ) : O = s.filter(
6618
- (q) => C.includes(q) && x.includes(q)
6618
+ (q) => T.includes(q) && A.includes(q)
6619
6619
  ), { scopes: [
6620
6620
  .../* @__PURE__ */ new Set([...a, ...O])
6621
6621
  ], permissions: [] };
@@ -6662,13 +6662,13 @@ async function va(t, e) {
6662
6662
  .../* @__PURE__ */ new Set([...l, ...Y])
6663
6663
  ], permissions: [] };
6664
6664
  }
6665
- const x = await t.env.data.userPermissions.list(
6665
+ const A = await t.env.data.userPermissions.list(
6666
6666
  n,
6667
6667
  r,
6668
6668
  void 0,
6669
6669
  a
6670
6670
  // Pass organizationId to get scoped permissions
6671
- ), C = await t.env.data.userRoles.list(
6671
+ ), T = await t.env.data.userRoles.list(
6672
6672
  n,
6673
6673
  r,
6674
6674
  void 0,
@@ -6678,18 +6678,18 @@ async function va(t, e) {
6678
6678
  r,
6679
6679
  void 0,
6680
6680
  a
6681
- ) : [], D = [...C, ...O], A = [];
6681
+ ) : [], D = [...T, ...O], x = [];
6682
6682
  for (const Y of D)
6683
6683
  (await t.env.data.rolePermissions.list(
6684
6684
  n,
6685
6685
  Y.id
6686
6686
  )).forEach((j) => {
6687
- j.resource_server_identifier === i && A.push(j.permission_name);
6687
+ j.resource_server_identifier === i && x.push(j.permission_name);
6688
6688
  });
6689
6689
  const z = /* @__PURE__ */ new Set();
6690
- x.forEach((Y) => {
6690
+ A.forEach((Y) => {
6691
6691
  Y.resource_server_identifier === i && z.add(Y.permission_name);
6692
- }), A.forEach((Y) => {
6692
+ }), x.forEach((Y) => {
6693
6693
  z.add(Y);
6694
6694
  });
6695
6695
  const q = Array.from(z);
@@ -6708,7 +6708,7 @@ async function va(t, e) {
6708
6708
  }
6709
6709
  const xh = ["sub", "iss", "aud", "exp", "nbf", "iat", "jti"];
6710
6710
  async function yc(t, e) {
6711
- var A, z;
6711
+ var x, z;
6712
6712
  const { authParams: n, user: r, client: i, session_id: s, organization: a, permissions: l } = e, { signingKeys: u } = await t.env.data.keys.list({
6713
6713
  q: "type:jwt_signing"
6714
6714
  }), d = u.filter(
@@ -6726,7 +6726,7 @@ async function yc(t, e) {
6726
6726
  sid: s,
6727
6727
  ...a && { org_id: a.id },
6728
6728
  ...l && l.length > 0 && { permissions: l }
6729
- }, x = r && ((A = n.scope) != null && A.split(" ").includes("openid")) ? {
6729
+ }, A = r && ((x = n.scope) != null && x.split(" ").includes("openid")) ? {
6730
6730
  // The audience for an id token is the client id
6731
6731
  aud: n.client_id,
6732
6732
  sub: r.user_id,
@@ -6772,7 +6772,7 @@ async function yc(t, e) {
6772
6772
  setCustomClaim: (q, M) => {
6773
6773
  if (xh.includes(q))
6774
6774
  throw new Error(`Cannot overwrite reserved claim '${q}'`);
6775
- x && (x[q] = M);
6775
+ A && (A[q] = M);
6776
6776
  }
6777
6777
  },
6778
6778
  access: {
@@ -6784,7 +6784,7 @@ async function yc(t, e) {
6784
6784
  }
6785
6785
  }
6786
6786
  );
6787
- const C = {
6787
+ const T = {
6788
6788
  includeIssuedTimestamp: !0,
6789
6789
  expiresIn: new mp(1, "d"),
6790
6790
  headers: {
@@ -6794,8 +6794,8 @@ async function yc(t, e) {
6794
6794
  "RS256",
6795
6795
  h,
6796
6796
  b,
6797
- C
6798
- ), D = x ? await _h("RS256", h, x, C) : void 0;
6797
+ T
6798
+ ), D = A ? await _h("RS256", h, A, T) : void 0;
6799
6799
  return {
6800
6800
  access_token: O,
6801
6801
  refresh_token: e.refresh_token,
@@ -6884,7 +6884,7 @@ async function o_(t, { user: e, client: n, loginSession: r }) {
6884
6884
  }), i;
6885
6885
  }
6886
6886
  async function On(t, e) {
6887
- var x, C;
6887
+ var A, T;
6888
6888
  const { authParams: n, client: r, ticketAuth: i } = e;
6889
6889
  let { user: s } = e;
6890
6890
  const a = n.response_type || cn.CODE, l = n.response_mode || Kn.QUERY, u = Ve(t, {
@@ -6904,7 +6904,7 @@ async function On(t, e) {
6904
6904
  throw new E(500, {
6905
6905
  message: "Login session not found for ticket auth."
6906
6906
  });
6907
- const O = bv(), D = We(12), A = await t.env.data.codes.create(r.tenant.id, {
6907
+ const O = bv(), D = We(12), x = await t.env.data.codes.create(r.tenant.id, {
6908
6908
  code_id: We(),
6909
6909
  code_type: "ticket",
6910
6910
  login_id: e.loginSession.id,
@@ -6915,13 +6915,13 @@ async function On(t, e) {
6915
6915
  nonce: n.nonce
6916
6916
  });
6917
6917
  return t.json({
6918
- login_ticket: A.code_id,
6918
+ login_ticket: x.code_id,
6919
6919
  co_verifier: O,
6920
6920
  co_id: D
6921
6921
  });
6922
6922
  }
6923
6923
  let d = e.refreshToken, p = e.sessionId;
6924
- if (!p && ((x = e.loginSession) != null && x.session_id)) {
6924
+ if (!p && ((A = e.loginSession) != null && A.session_id)) {
6925
6925
  p = e.loginSession.session_id;
6926
6926
  const O = await t.env.data.sessions.get(
6927
6927
  r.tenant.id,
@@ -6941,7 +6941,7 @@ async function On(t, e) {
6941
6941
  loginSession: e.loginSession
6942
6942
  })).id;
6943
6943
  }
6944
- if (!d && ((C = n.scope) != null && C.split(" ").includes("offline_access")) && ![cn.TOKEN, cn.CODE].includes(
6944
+ if (!d && ((T = n.scope) != null && T.split(" ").includes("offline_access")) && ![cn.TOKEN, cn.CODE].includes(
6945
6945
  a
6946
6946
  ) && (d = (await s_(t, {
6947
6947
  user: s,
@@ -6993,10 +6993,10 @@ async function On(t, e) {
6993
6993
  console.warn(
6994
6994
  "Session ID not available for WEB_MESSAGE, cookie will not be set."
6995
6995
  );
6996
- const D = new URL(n.redirect_uri), A = `${D.protocol}//${D.host}`;
6996
+ const D = new URL(n.redirect_uri), x = `${D.protocol}//${D.host}`;
6997
6997
  return t.html(
6998
6998
  Tu(
6999
- A,
6999
+ x,
7000
7000
  JSON.stringify({ ...h, state: n.state })
7001
7001
  ),
7002
7002
  {
@@ -7050,7 +7050,7 @@ async function t3(t, e) {
7050
7050
  // Should be enough for most cases
7051
7051
  }
7052
7052
  )).userOrganizations.some(
7053
- (C) => C.organization_id === e.organization.id
7053
+ (T) => T.organization_id === e.organization.id
7054
7054
  ))
7055
7055
  throw new Oi(403, {
7056
7056
  error: "access_denied",
@@ -7070,8 +7070,8 @@ async function t3(t, e) {
7070
7070
  organizationId: (u = e.organization) == null ? void 0 : u.id
7071
7071
  });
7072
7072
  else {
7073
- const x = (n == null ? void 0 : n.user_id) || ((d = e.user) == null ? void 0 : d.user_id);
7074
- if (!x)
7073
+ const A = (n == null ? void 0 : n.user_id) || ((d = e.user) == null ? void 0 : d.user_id);
7074
+ if (!A)
7075
7075
  throw new Oi(400, {
7076
7076
  error: "invalid_request",
7077
7077
  error_description: "User ID is required for user-based grants"
@@ -7079,7 +7079,7 @@ async function t3(t, e) {
7079
7079
  b = await va(t, {
7080
7080
  grantType: e.grantType,
7081
7081
  tenantId: e.client.tenant.id,
7082
- userId: x,
7082
+ userId: A,
7083
7083
  clientId: e.client.client_id,
7084
7084
  audience: e.authParams.audience,
7085
7085
  requestedScopes: ((p = e.authParams.scope) == null ? void 0 : p.split(" ")) || [],
@@ -7637,45 +7637,45 @@ const kh = qt.extend({
7637
7637
  }
7638
7638
  }),
7639
7639
  async (t) => {
7640
- const { page: e, per_page: n, include_totals: r, sort: i, q: s } = t.req.valid("query"), { "tenant-id": a } = t.req.valid("header");
7640
+ const { page: e, per_page: n, include_totals: r, sort: i, q: s } = t.req.valid("query");
7641
7641
  if (s != null && s.includes("identities.profileData.email")) {
7642
- const p = s.split("=")[1], g = (await t.env.data.users.list(a, {
7642
+ const d = s.split("=")[1], h = (await t.env.data.users.list(t.var.tenant_id, {
7643
7643
  page: e,
7644
7644
  per_page: n,
7645
7645
  include_totals: r,
7646
- q: `email:${p}`
7647
- })).users.filter((C) => C.linked_to), [b] = g;
7648
- if (!b)
7646
+ q: `email:${d}`
7647
+ })).users.filter((A) => A.linked_to), [g] = h;
7648
+ if (!g)
7649
7649
  return t.json([]);
7650
- const x = await t.env.data.users.get(
7651
- a,
7650
+ const b = await t.env.data.users.get(
7651
+ t.var.tenant_id,
7652
7652
  // we know linked_to is truthy here but typescript cannot read .filter() logic above
7653
7653
  // possible to fix!
7654
- b.linked_to
7654
+ g.linked_to
7655
7655
  );
7656
- if (!x)
7656
+ if (!b)
7657
7657
  throw new E(500, {
7658
7658
  message: "Primary account not found"
7659
7659
  });
7660
- return t.json([Mn.parse(x)]);
7660
+ return t.json([Mn.parse(b)]);
7661
7661
  }
7662
- const l = ["-_exists_:linked_to"];
7663
- s && l.push(s);
7664
- const u = await t.env.data.users.list(a, {
7662
+ const a = ["-_exists_:linked_to"];
7663
+ s && a.push(s);
7664
+ const l = await t.env.data.users.list(t.var.tenant_id, {
7665
7665
  page: e,
7666
7666
  per_page: n,
7667
7667
  include_totals: r,
7668
7668
  sort: bt(i),
7669
- q: l.join(" ")
7670
- }), d = u.users.filter((p) => !p.linked_to);
7669
+ q: a.join(" ")
7670
+ }), u = l.users.filter((d) => !d.linked_to);
7671
7671
  return r ? t.json(
7672
7672
  kh.parse({
7673
- users: d,
7674
- length: u.length,
7675
- start: u.start,
7676
- limit: u.limit
7673
+ users: u,
7674
+ length: l.length,
7675
+ start: l.start,
7676
+ limit: l.limit
7677
7677
  })
7678
- ) : t.json(o.array(Mn).parse(d));
7678
+ ) : t.json(o.array(Mn).parse(u));
7679
7679
  }
7680
7680
  ).openapi(
7681
7681
  U({
@@ -7707,14 +7707,14 @@ const kh = qt.extend({
7707
7707
  }
7708
7708
  }),
7709
7709
  async (t) => {
7710
- const { user_id: e } = t.req.valid("param"), { "tenant-id": n } = t.req.valid("header"), r = await t.env.data.users.get(n, e);
7711
- if (!r)
7710
+ const { user_id: e } = t.req.valid("param"), n = await t.env.data.users.get(t.var.tenant_id, e);
7711
+ if (!n)
7712
7712
  throw new E(404);
7713
- if (r.linked_to)
7713
+ if (n.linked_to)
7714
7714
  throw new E(404, {
7715
7715
  message: "User is linked to another user"
7716
7716
  });
7717
- return t.json(r);
7717
+ return t.json(n);
7718
7718
  }
7719
7719
  ).openapi(
7720
7720
  U({
@@ -7741,8 +7741,11 @@ const kh = qt.extend({
7741
7741
  }
7742
7742
  }),
7743
7743
  async (t) => {
7744
- const { user_id: e } = t.req.valid("param"), { "tenant-id": n } = t.req.valid("header");
7745
- if (!await t.env.data.users.remove(n, e))
7744
+ const { user_id: e } = t.req.valid("param");
7745
+ if (!await t.env.data.users.remove(
7746
+ t.var.tenant_id,
7747
+ e
7748
+ ))
7746
7749
  throw new E(404);
7747
7750
  return t.text("OK");
7748
7751
  }
@@ -7780,55 +7783,55 @@ const kh = qt.extend({
7780
7783
  }
7781
7784
  }),
7782
7785
  async (t) => {
7783
- const { "tenant-id": e } = t.req.valid("header"), n = t.req.valid("json");
7784
- t.set("body", n);
7786
+ const e = t.req.valid("json");
7787
+ t.set("body", e);
7785
7788
  const {
7786
- email: r,
7787
- phone_number: i,
7788
- name: s,
7789
- linked_to: a,
7790
- email_verified: l,
7791
- provider: u,
7792
- connection: d
7793
- } = n, p = `${n.provider}|${n.user_id || gc()}`;
7789
+ email: n,
7790
+ phone_number: r,
7791
+ name: i,
7792
+ linked_to: s,
7793
+ email_verified: a,
7794
+ provider: l,
7795
+ connection: u
7796
+ } = e, d = `${e.provider}|${e.user_id || gc()}`;
7794
7797
  try {
7795
- const h = await t.env.data.users.create(e, {
7796
- email: r,
7797
- user_id: p,
7798
- name: s || r || i,
7799
- phone_number: i,
7800
- provider: u,
7801
- connection: d,
7802
- linked_to: a ?? void 0,
7803
- email_verified: l || !1,
7798
+ const p = await t.env.data.users.create(t.var.tenant_id, {
7799
+ email: n,
7800
+ user_id: d,
7801
+ name: i || n || r,
7802
+ phone_number: r,
7803
+ provider: l,
7804
+ connection: u,
7805
+ linked_to: s ?? void 0,
7806
+ email_verified: a || !1,
7804
7807
  last_ip: "",
7805
7808
  is_social: !1,
7806
7809
  last_login: (/* @__PURE__ */ new Date()).toISOString()
7807
7810
  });
7808
- t.set("user_id", h.user_id);
7809
- const g = Ve(t, {
7811
+ t.set("user_id", p.user_id);
7812
+ const h = Ve(t, {
7810
7813
  type: qe.SUCCESS_API_OPERATION,
7811
7814
  description: "User created"
7812
7815
  });
7813
- on(t, t.env.data.logs.create(e, g));
7814
- const b = {
7815
- ...h,
7816
+ on(t, t.env.data.logs.create(t.var.tenant_id, h));
7817
+ const g = {
7818
+ ...p,
7816
7819
  identities: [
7817
7820
  {
7818
- connection: h.connection,
7819
- provider: h.provider,
7820
- user_id: gh(h.user_id),
7821
- isSocial: h.is_social
7821
+ connection: p.connection,
7822
+ provider: p.provider,
7823
+ user_id: gh(p.user_id),
7824
+ isSocial: p.is_social
7822
7825
  }
7823
7826
  ]
7824
7827
  };
7825
- return t.json(Mn.parse(b), {
7828
+ return t.json(Mn.parse(g), {
7826
7829
  status: 201
7827
7830
  });
7828
- } catch (h) {
7829
- throw h.message === "User already exists" ? new E(409, {
7831
+ } catch (p) {
7832
+ throw p.message === "User already exists" ? new E(409, {
7830
7833
  message: "User already exists"
7831
- }) : h;
7834
+ }) : p;
7832
7835
  }
7833
7836
  }
7834
7837
  ).openapi(
@@ -7867,48 +7870,51 @@ const kh = qt.extend({
7867
7870
  }
7868
7871
  }),
7869
7872
  async (t) => {
7870
- var p;
7871
- const { data: e } = t.env, { "tenant-id": n } = t.req.valid("header"), r = t.req.valid("json"), { user_id: i } = t.req.valid("param"), { verify_email: s, password: a, ...l } = r, u = await e.users.get(n, i);
7872
- if (!u)
7873
+ var d;
7874
+ const { data: e } = t.env, n = t.req.valid("json"), { user_id: r } = t.req.valid("param"), { verify_email: i, password: s, ...a } = n, l = await e.users.get(t.var.tenant_id, r);
7875
+ if (!l)
7873
7876
  throw new E(404);
7874
- if (l.email && l.email !== u.email) {
7875
- const h = await xp(
7877
+ if (a.email && a.email !== l.email) {
7878
+ const p = await xp(
7876
7879
  t.env.data.users,
7877
- n,
7878
- l.email
7880
+ t.var.tenant_id,
7881
+ a.email
7879
7882
  );
7880
- if (h.length && h.some((g) => g.user_id !== i))
7883
+ if (p.length && p.some((h) => h.user_id !== r))
7881
7884
  throw new E(409, {
7882
7885
  message: "Another user with the same email address already exists."
7883
7886
  });
7884
7887
  }
7885
- if (u.linked_to)
7888
+ if (l.linked_to)
7886
7889
  throw new E(404, {
7887
7890
  // not the auth0 error message but I'd rather deviate here
7888
7891
  message: "User is linked to another user"
7889
7892
  });
7890
- if (await t.env.data.users.update(n, i, l), a) {
7891
- const h = (p = u.identities) == null ? void 0 : p.find(
7892
- (x) => x.connection === "Username-Password-Authentication"
7893
+ if (await t.env.data.users.update(t.var.tenant_id, r, a), s) {
7894
+ const p = (d = l.identities) == null ? void 0 : d.find(
7895
+ (b) => b.connection === "Username-Password-Authentication"
7893
7896
  );
7894
- if (!h)
7897
+ if (!p)
7895
7898
  throw new E(400, {
7896
7899
  message: "User does not have a password identity"
7897
7900
  });
7898
- const g = {
7899
- user_id: h.user_id,
7900
- password: await oo.hash(a, 10),
7901
+ const h = {
7902
+ user_id: p.user_id,
7903
+ password: await oo.hash(s, 10),
7901
7904
  algorithm: "bcrypt"
7902
7905
  };
7903
7906
  await e.passwords.get(
7904
- n,
7905
- h.user_id
7906
- ) ? await e.passwords.update(n, g) : await e.passwords.create(n, g);
7907
+ t.var.tenant_id,
7908
+ p.user_id
7909
+ ) ? await e.passwords.update(t.var.tenant_id, h) : await e.passwords.create(t.var.tenant_id, h);
7907
7910
  }
7908
- const d = await t.env.data.users.get(n, i);
7909
- if (!d)
7911
+ const u = await t.env.data.users.get(
7912
+ t.var.tenant_id,
7913
+ r
7914
+ );
7915
+ if (!u)
7910
7916
  throw new E(500);
7911
- return t.json(d);
7917
+ return t.json(u);
7912
7918
  }
7913
7919
  ).openapi(
7914
7920
  U({
@@ -7961,26 +7967,26 @@ const kh = qt.extend({
7961
7967
  }
7962
7968
  }),
7963
7969
  async (t) => {
7964
- const { "tenant-id": e } = t.req.valid("header"), n = t.req.valid("json"), { user_id: r } = t.req.valid("param"), i = "link_with" in n ? n.link_with : n.user_id, s = await t.env.data.users.get(e, r);
7965
- if (!s)
7970
+ const e = t.req.valid("json"), { user_id: n } = t.req.valid("param"), r = "link_with" in e ? e.link_with : e.user_id, i = await t.env.data.users.get(t.var.tenant_id, n);
7971
+ if (!i)
7966
7972
  throw new E(400, {
7967
7973
  message: "Linking an inexistent identity is not allowed."
7968
7974
  });
7969
- await t.env.data.users.update(e, i, {
7970
- linked_to: r
7975
+ await t.env.data.users.update(t.var.tenant_id, r, {
7976
+ linked_to: n
7971
7977
  });
7972
- const a = await t.env.data.users.list(e, {
7978
+ const s = await t.env.data.users.list(t.var.tenant_id, {
7973
7979
  page: 0,
7974
7980
  per_page: 10,
7975
7981
  include_totals: !1,
7976
- q: `linked_to:${r}`
7977
- }), l = [s, ...a.users].map((u) => ({
7978
- connection: u.connection,
7979
- provider: u.provider,
7980
- user_id: gh(u.user_id),
7981
- isSocial: u.is_social
7982
+ q: `linked_to:${n}`
7983
+ }), a = [i, ...s.users].map((l) => ({
7984
+ connection: l.connection,
7985
+ provider: l.provider,
7986
+ user_id: gh(l.user_id),
7987
+ isSocial: l.is_social
7982
7988
  }));
7983
- return t.json(l, { status: 201 });
7989
+ return t.json(a, { status: 201 });
7984
7990
  }
7985
7991
  ).openapi(
7986
7992
  U({
@@ -8014,17 +8020,17 @@ const kh = qt.extend({
8014
8020
  }
8015
8021
  }),
8016
8022
  async (t) => {
8017
- const { "tenant-id": e } = t.req.valid("header"), { user_id: n, provider: r, linked_user_id: i } = t.req.valid("param");
8023
+ const { user_id: e, provider: n, linked_user_id: r } = t.req.valid("param");
8018
8024
  await t.env.data.users.unlink(
8025
+ t.var.tenant_id,
8019
8026
  e,
8020
8027
  n,
8021
- r,
8022
- i
8028
+ r
8023
8029
  );
8024
- const s = await t.env.data.users.get(e, n);
8025
- if (!s)
8030
+ const i = await t.env.data.users.get(t.var.tenant_id, e);
8031
+ if (!i)
8026
8032
  throw new E(404);
8027
- return t.json([Mn.parse(s)]);
8033
+ return t.json([Mn.parse(i)]);
8028
8034
  }
8029
8035
  ).openapi(
8030
8036
  U({
@@ -8060,13 +8066,13 @@ const kh = qt.extend({
8060
8066
  }
8061
8067
  }),
8062
8068
  async (t) => {
8063
- const { user_id: e } = t.req.valid("param"), { include_totals: n, page: r, per_page: i } = t.req.valid("query"), { "tenant-id": s } = t.req.valid("header"), a = await t.env.data.sessions.list(s, {
8069
+ const { user_id: e } = t.req.valid("param"), { include_totals: n, page: r, per_page: i } = t.req.valid("query"), s = await t.env.data.sessions.list(t.var.tenant_id, {
8064
8070
  page: r,
8065
8071
  per_page: i,
8066
8072
  include_totals: n,
8067
8073
  q: `user_id:${e}`
8068
8074
  });
8069
- return n ? t.json(a) : t.json(a.sessions);
8075
+ return n ? t.json(s) : t.json(s.sessions);
8070
8076
  }
8071
8077
  ).openapi(
8072
8078
  U({
@@ -8099,23 +8105,23 @@ const kh = qt.extend({
8099
8105
  }
8100
8106
  }),
8101
8107
  async (t) => {
8102
- const { user_id: e } = t.req.valid("param"), { "tenant-id": n } = t.req.valid("header"), { page: r, per_page: i, sort: s, q: a } = t.req.valid("query");
8103
- if (!await t.env.data.users.get(n, e))
8108
+ const { user_id: e } = t.req.valid("param"), { page: n, per_page: r, sort: i, q: s } = t.req.valid("query");
8109
+ if (!await t.env.data.users.get(t.var.tenant_id, e))
8104
8110
  throw new E(404, {
8105
8111
  message: "User not found"
8106
8112
  });
8107
- const u = await t.env.data.userPermissions.list(
8108
- n,
8113
+ const l = await t.env.data.userPermissions.list(
8114
+ t.var.tenant_id,
8109
8115
  e,
8110
8116
  {
8111
- page: r,
8112
- per_page: i,
8117
+ page: n,
8118
+ per_page: r,
8113
8119
  include_totals: !1,
8114
- sort: bt(s),
8115
- q: a
8120
+ sort: bt(i),
8121
+ q: s
8116
8122
  }
8117
8123
  );
8118
- return t.json(u);
8124
+ return t.json(l);
8119
8125
  }
8120
8126
  ).openapi(
8121
8127
  U({
@@ -8156,19 +8162,19 @@ const kh = qt.extend({
8156
8162
  }
8157
8163
  }),
8158
8164
  async (t) => {
8159
- const { user_id: e } = t.req.valid("param"), { "tenant-id": n } = t.req.valid("header"), { permissions: r } = t.req.valid("json");
8160
- if (!await t.env.data.users.get(n, e))
8165
+ const { user_id: e } = t.req.valid("param"), { permissions: n } = t.req.valid("json");
8166
+ if (!await t.env.data.users.get(t.var.tenant_id, e))
8161
8167
  throw new E(404, {
8162
8168
  message: "User not found"
8163
8169
  });
8164
- for (const s of r)
8170
+ for (const i of n)
8165
8171
  if (!await t.env.data.userPermissions.create(
8166
- n,
8172
+ t.var.tenant_id,
8167
8173
  e,
8168
8174
  {
8169
8175
  user_id: e,
8170
- resource_server_identifier: s.resource_server_identifier,
8171
- permission_name: s.permission_name
8176
+ resource_server_identifier: i.resource_server_identifier,
8177
+ permission_name: i.permission_name
8172
8178
  }
8173
8179
  ))
8174
8180
  throw new E(500, {
@@ -8218,16 +8224,16 @@ const kh = qt.extend({
8218
8224
  }
8219
8225
  }),
8220
8226
  async (t) => {
8221
- const { user_id: e } = t.req.valid("param"), { "tenant-id": n } = t.req.valid("header"), { permissions: r } = t.req.valid("json");
8222
- if (!await t.env.data.users.get(n, e))
8227
+ const { user_id: e } = t.req.valid("param"), { permissions: n } = t.req.valid("json");
8228
+ if (!await t.env.data.users.get(t.var.tenant_id, e))
8223
8229
  throw new E(404, {
8224
8230
  message: "User not found"
8225
8231
  });
8226
- for (const s of r)
8232
+ for (const i of n)
8227
8233
  if (!await t.env.data.userPermissions.remove(
8228
- n,
8234
+ t.var.tenant_id,
8229
8235
  e,
8230
- s
8236
+ i
8231
8237
  ))
8232
8238
  throw new E(500, {
8233
8239
  message: "Failed to remove permissions from user"
@@ -8252,16 +8258,16 @@ const kh = qt.extend({
8252
8258
  }
8253
8259
  }),
8254
8260
  async (t) => {
8255
- const { user_id: e } = t.req.valid("param"), { "tenant-id": n } = t.req.valid("header");
8256
- if (!await t.env.data.users.get(n, e)) throw new E(404, { message: "User not found" });
8257
- const i = await t.env.data.userRoles.list(
8258
- n,
8261
+ const { user_id: e } = t.req.valid("param");
8262
+ if (!await t.env.data.users.get(t.var.tenant_id, e)) throw new E(404, { message: "User not found" });
8263
+ const r = await t.env.data.userRoles.list(
8264
+ t.var.tenant_id,
8259
8265
  e,
8260
8266
  void 0,
8261
8267
  ""
8262
8268
  // Global roles should have empty string organization_id
8263
8269
  );
8264
- return t.json(i);
8270
+ return t.json(r);
8265
8271
  }
8266
8272
  ).openapi(
8267
8273
  U({
@@ -8283,13 +8289,13 @@ const kh = qt.extend({
8283
8289
  responses: { 201: { description: "Roles assigned to user" } }
8284
8290
  }),
8285
8291
  async (t) => {
8286
- const { user_id: e } = t.req.valid("param"), { "tenant-id": n } = t.req.valid("header"), { roles: r } = t.req.valid("json");
8287
- if (!await t.env.data.users.get(n, e)) throw new E(404, { message: "User not found" });
8288
- for (const s of r)
8292
+ const { user_id: e } = t.req.valid("param"), { roles: n } = t.req.valid("json");
8293
+ if (!await t.env.data.users.get(t.var.tenant_id, e)) throw new E(404, { message: "User not found" });
8294
+ for (const i of n)
8289
8295
  if (!await t.env.data.userRoles.create(
8290
- n,
8296
+ t.var.tenant_id,
8291
8297
  e,
8292
- s,
8298
+ i,
8293
8299
  ""
8294
8300
  // Global roles should have empty string organization_id
8295
8301
  ))
@@ -8321,13 +8327,13 @@ const kh = qt.extend({
8321
8327
  responses: { 200: { description: "Roles removed from user" } }
8322
8328
  }),
8323
8329
  async (t) => {
8324
- const { user_id: e } = t.req.valid("param"), { "tenant-id": n } = t.req.valid("header"), { roles: r } = t.req.valid("json");
8325
- if (!await t.env.data.users.get(n, e)) throw new E(404, { message: "User not found" });
8326
- for (const s of r)
8330
+ const { user_id: e } = t.req.valid("param"), { roles: n } = t.req.valid("json");
8331
+ if (!await t.env.data.users.get(t.var.tenant_id, e)) throw new E(404, { message: "User not found" });
8332
+ for (const i of n)
8327
8333
  if (!await t.env.data.userRoles.remove(
8328
- n,
8334
+ t.var.tenant_id,
8329
8335
  e,
8330
- s,
8336
+ i,
8331
8337
  ""
8332
8338
  // Global roles should have empty string organization_id
8333
8339
  ))
@@ -8366,24 +8372,24 @@ const kh = qt.extend({
8366
8372
  }
8367
8373
  }),
8368
8374
  async (t) => {
8369
- const { user_id: e } = t.req.valid("param"), { "tenant-id": n } = t.req.valid("header"), { page: r, per_page: i, include_totals: s, sort: a } = t.req.valid("query");
8370
- if (!await t.env.data.users.get(n, e))
8375
+ const { user_id: e } = t.req.valid("param"), { page: n, per_page: r, include_totals: i, sort: s } = t.req.valid("query");
8376
+ if (!await t.env.data.users.get(t.var.tenant_id, e))
8371
8377
  throw new E(404, { message: "User not found" });
8372
- const u = await t.env.data.userOrganizations.listUserOrganizations(
8373
- n,
8378
+ const l = await t.env.data.userOrganizations.listUserOrganizations(
8379
+ t.var.tenant_id,
8374
8380
  e,
8375
8381
  {
8376
- page: r,
8377
- per_page: i,
8378
- sort: bt(a)
8382
+ page: n,
8383
+ per_page: r,
8384
+ sort: bt(s)
8379
8385
  }
8380
8386
  );
8381
- return s ? t.json({
8382
- organizations: u.organizations,
8383
- start: u.start,
8384
- limit: u.limit,
8385
- length: u.length
8386
- }) : t.json(u.organizations);
8387
+ return i ? t.json({
8388
+ organizations: l.organizations,
8389
+ start: l.start,
8390
+ limit: l.limit,
8391
+ length: l.length
8392
+ }) : t.json(l.organizations);
8387
8393
  }
8388
8394
  ).openapi(
8389
8395
  U({
@@ -8407,23 +8413,26 @@ const kh = qt.extend({
8407
8413
  }
8408
8414
  }),
8409
8415
  async (t) => {
8410
- const { user_id: e, organization_id: n } = t.req.valid("param"), { "tenant-id": r } = t.req.valid("header");
8411
- if (!await t.env.data.users.get(r, e))
8416
+ const { user_id: e, organization_id: n } = t.req.valid("param");
8417
+ if (!await t.env.data.users.get(t.var.tenant_id, e))
8412
8418
  throw new E(404, { message: "User not found" });
8413
- const a = (await t.env.data.userOrganizations.list(r, {
8414
- q: `user_id:${e}`,
8415
- per_page: 100
8416
- // Should be enough for most cases
8417
- })).userOrganizations.find(
8418
- (l) => l.organization_id === n
8419
+ const s = (await t.env.data.userOrganizations.list(
8420
+ t.var.tenant_id,
8421
+ {
8422
+ q: `user_id:${e}`,
8423
+ per_page: 100
8424
+ // Should be enough for most cases
8425
+ }
8426
+ )).userOrganizations.find(
8427
+ (a) => a.organization_id === n
8419
8428
  );
8420
- if (!a)
8429
+ if (!s)
8421
8430
  throw new E(404, {
8422
8431
  message: "User is not a member of this organization"
8423
8432
  });
8424
8433
  return await t.env.data.userOrganizations.remove(
8425
- r,
8426
- a.id
8434
+ t.var.tenant_id,
8435
+ s.id
8427
8436
  ), t.json({
8428
8437
  message: "User removed from organization successfully"
8429
8438
  });
@@ -8488,8 +8497,8 @@ var Nh;
8488
8497
  } : function(R, I) {
8489
8498
  return R[I];
8490
8499
  }
8491
- }, 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(), x = typeof WeakMap == "function" ? WeakMap : Lt(), C = i ? Symbol.for("@reflect-metadata:registry") : void 0, O = bn(), D = Et(O);
8492
- function A(R, I, V, ne) {
8500
+ }, 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(), A = typeof WeakMap == "function" ? WeakMap : Lt(), T = i ? Symbol.for("@reflect-metadata:registry") : void 0, O = bn(), D = Et(O);
8501
+ function x(R, I, V, ne) {
8493
8502
  if (ee(V)) {
8494
8503
  if (!Pt(R))
8495
8504
  throw new TypeError();
@@ -8506,7 +8515,7 @@ var Nh;
8506
8515
  return we(ne) && (ne = void 0), V = rt(V), P(R, I, V, ne);
8507
8516
  }
8508
8517
  }
8509
- e("decorate", A);
8518
+ e("decorate", x);
8510
8519
  function z(R, I) {
8511
8520
  function V(ne, ve) {
8512
8521
  if (!Fe(ne))
@@ -8814,8 +8823,8 @@ var Nh;
8814
8823
  }
8815
8824
  function Gt() {
8816
8825
  var R;
8817
- !ee(C) && typeof n.Reflect < "u" && !(C in n.Reflect) && typeof n.Reflect.defineMetadata == "function" && (R = nn(n.Reflect));
8818
- var I, V, ne, ve = new x(), it = {
8826
+ !ee(T) && typeof n.Reflect < "u" && !(T in n.Reflect) && typeof n.Reflect.defineMetadata == "function" && (R = nn(n.Reflect));
8827
+ var I, V, ne, ve = new A(), it = {
8819
8828
  registerProvider: Be,
8820
8829
  getProvider: f,
8821
8830
  setProvider: $
@@ -8887,7 +8896,7 @@ var Nh;
8887
8896
  }
8888
8897
  function bn() {
8889
8898
  var R;
8890
- return !ee(C) && Fe(n.Reflect) && Object.isExtensible(n.Reflect) && (R = n.Reflect[C]), ee(R) && (R = Gt()), !ee(C) && Fe(n.Reflect) && Object.isExtensible(n.Reflect) && Object.defineProperty(n.Reflect, C, {
8899
+ return !ee(T) && Fe(n.Reflect) && Object.isExtensible(n.Reflect) && (R = n.Reflect[T]), ee(R) && (R = Gt()), !ee(T) && Fe(n.Reflect) && Object.isExtensible(n.Reflect) && Object.defineProperty(n.Reflect, T, {
8891
8900
  enumerable: !1,
8892
8901
  configurable: !1,
8893
8902
  writable: !1,
@@ -8895,7 +8904,7 @@ var Nh;
8895
8904
  }), R;
8896
8905
  }
8897
8906
  function Et(R) {
8898
- var I = new x(), V = {
8907
+ var I = new A(), V = {
8899
8908
  isProviderFor: function(y, $) {
8900
8909
  var v = I.get(y);
8901
8910
  return ee(v) ? !1 : v.has($);
@@ -8994,7 +9003,7 @@ var Nh;
8994
9003
  }
8995
9004
  }
8996
9005
  function nn(R) {
8997
- var I = R.defineMetadata, V = R.hasOwnMetadata, ne = R.getOwnMetadata, ve = R.getOwnMetadataKeys, it = R.deleteMetadata, Be = new x(), c = {
9006
+ var I = R.defineMetadata, V = R.hasOwnMetadata, ne = R.getOwnMetadata, ve = R.getOwnMetadataKeys, it = R.deleteMetadata, Be = new A(), c = {
8998
9007
  isProviderFor: function(f, y) {
8999
9008
  var $ = Be.get(f);
9000
9009
  return !ee($) && $.has(y) ? !0 : ve(f, y).length ? (ee($) && ($ = new b(), Be.set(f, $)), $.add(y), !0) : !1;
@@ -11329,13 +11338,13 @@ class jc extends uo {
11329
11338
  if (g === -1 && (g = r.indexOf("-"), h = -1), g !== -1) {
11330
11339
  if (b = r.substring(g + 1), r = r.substring(0, g), b.length !== 2 && b.length !== 4)
11331
11340
  throw new Error("Wrong input string for conversion");
11332
- let x = parseInt(b.substring(0, 2), 10);
11333
- if (isNaN(x.valueOf()))
11341
+ let A = parseInt(b.substring(0, 2), 10);
11342
+ if (isNaN(A.valueOf()))
11334
11343
  throw new Error("Wrong input string for conversion");
11335
- if (l = h * x, b.length === 4) {
11336
- if (x = parseInt(b.substring(2, 4), 10), isNaN(x.valueOf()))
11344
+ if (l = h * A, b.length === 4) {
11345
+ if (A = parseInt(b.substring(2, 4), 10), isNaN(A.valueOf()))
11337
11346
  throw new Error("Wrong input string for conversion");
11338
- u = h * x;
11347
+ u = h * A;
11339
11348
  }
11340
11349
  }
11341
11350
  }
@@ -11757,10 +11766,10 @@ var H;
11757
11766
  (function(t) {
11758
11767
  t[t.Sequence = 0] = "Sequence", t[t.Set = 1] = "Set", t[t.Choice = 2] = "Choice";
11759
11768
  })(H || (H = {}));
11760
- var T;
11769
+ var C;
11761
11770
  (function(t) {
11762
11771
  t[t.Any = 1] = "Any", t[t.Boolean = 2] = "Boolean", t[t.OctetString = 3] = "OctetString", t[t.BitString = 4] = "BitString", t[t.Integer = 5] = "Integer", t[t.Enumerated = 6] = "Enumerated", t[t.ObjectIdentifier = 7] = "ObjectIdentifier", t[t.Utf8String = 8] = "Utf8String", t[t.BmpString = 9] = "BmpString", t[t.UniversalString = 10] = "UniversalString", t[t.NumericString = 11] = "NumericString", t[t.PrintableString = 12] = "PrintableString", t[t.TeletexString = 13] = "TeletexString", t[t.VideotexString = 14] = "VideotexString", t[t.IA5String = 15] = "IA5String", t[t.GraphicString = 16] = "GraphicString", t[t.VisibleString = 17] = "VisibleString", t[t.GeneralString = 18] = "GeneralString", t[t.CharacterString = 19] = "CharacterString", t[t.UTCTime = 20] = "UTCTime", t[t.GeneralizedTime = 21] = "GeneralizedTime", t[t.DATE = 22] = "DATE", t[t.TimeOfDay = 23] = "TimeOfDay", t[t.DateTime = 24] = "DateTime", t[t.Duration = 25] = "Duration", t[t.TIME = 26] = "TIME", t[t.Null = 27] = "Null";
11763
- })(T || (T = {}));
11772
+ })(C || (C = {}));
11764
11773
  class Pc {
11765
11774
  constructor(e, n = 0) {
11766
11775
  if (this.unusedBits = 0, this.value = new ArrayBuffer(0), e)
@@ -11876,49 +11885,49 @@ const s2 = en(ir), z3 = en(Ec), V3 = en(Sc), H3 = en(kc), K3 = en(Nc), G3 = en(C
11876
11885
  };
11877
11886
  function ks(t) {
11878
11887
  switch (t) {
11879
- case T.Any:
11888
+ case C.Any:
11880
11889
  return P3;
11881
- case T.BitString:
11890
+ case C.BitString:
11882
11891
  return F3;
11883
- case T.BmpString:
11892
+ case C.BmpString:
11884
11893
  return z3;
11885
- case T.Boolean:
11894
+ case C.Boolean:
11886
11895
  return M3;
11887
- case T.CharacterString:
11896
+ case C.CharacterString:
11888
11897
  return Q3;
11889
- case T.Enumerated:
11898
+ case C.Enumerated:
11890
11899
  return L3;
11891
- case T.GeneralString:
11900
+ case C.GeneralString:
11892
11901
  return Z3;
11893
- case T.GeneralizedTime:
11902
+ case C.GeneralizedTime:
11894
11903
  return t4;
11895
- case T.GraphicString:
11904
+ case C.GraphicString:
11896
11905
  return J3;
11897
- case T.IA5String:
11906
+ case C.IA5String:
11898
11907
  return X3;
11899
- case T.Integer:
11908
+ case C.Integer:
11900
11909
  return B3;
11901
- case T.Null:
11910
+ case C.Null:
11902
11911
  return n4;
11903
- case T.NumericString:
11912
+ case C.NumericString:
11904
11913
  return H3;
11905
- case T.ObjectIdentifier:
11914
+ case C.ObjectIdentifier:
11906
11915
  return U3;
11907
- case T.OctetString:
11916
+ case C.OctetString:
11908
11917
  return xa;
11909
- case T.PrintableString:
11918
+ case C.PrintableString:
11910
11919
  return K3;
11911
- case T.TeletexString:
11920
+ case C.TeletexString:
11912
11921
  return G3;
11913
- case T.UTCTime:
11922
+ case C.UTCTime:
11914
11923
  return e4;
11915
- case T.UniversalString:
11924
+ case C.UniversalString:
11916
11925
  return V3;
11917
- case T.Utf8String:
11926
+ case C.Utf8String:
11918
11927
  return s2;
11919
- case T.VideotexString:
11928
+ case C.VideotexString:
11920
11929
  return W3;
11921
- case T.VisibleString:
11930
+ case C.VisibleString:
11922
11931
  return Y3;
11923
11932
  default:
11924
11933
  return null;
@@ -11973,7 +11982,7 @@ class i4 {
11973
11982
  const a = r.items[s], l = n ? s : "";
11974
11983
  let u;
11975
11984
  if (typeof a.type == "number") {
11976
- const p = T[a.type], h = i2[p];
11985
+ const p = C[a.type], h = i2[p];
11977
11986
  if (!h)
11978
11987
  throw new Error(`Cannot get ASN1 class by name '${p}'`);
11979
11988
  u = new h({ name: l });
@@ -12239,7 +12248,7 @@ class s4 {
12239
12248
  if (Hn(r))
12240
12249
  a = new r().toSchema("");
12241
12250
  else {
12242
- const l = T[r], u = i2[l];
12251
+ const l = C[r], u = i2[l];
12243
12252
  if (!u)
12244
12253
  throw new Error(`Cannot get '${l}' class from asn1js module`);
12245
12254
  a = new u();
@@ -12364,7 +12373,7 @@ class Bp {
12364
12373
  if (typeof e.type == "number") {
12365
12374
  const a = e.converter;
12366
12375
  if (!a)
12367
- throw new Error(`Property '${n}' doesn't have converter for type ${T[e.type]} in schema '${r.name}'`);
12376
+ throw new Error(`Property '${n}' doesn't have converter for type ${C[e.type]} in schema '${r.name}'`);
12368
12377
  if (e.repeated) {
12369
12378
  if (!Array.isArray(i))
12370
12379
  throw new TypeError("Parameter 'objProp' should be type of Array.");
@@ -12530,19 +12539,19 @@ let gt = class {
12530
12539
  }
12531
12540
  };
12532
12541
  m([
12533
- w({ type: T.TeletexString })
12542
+ w({ type: C.TeletexString })
12534
12543
  ], gt.prototype, "teletexString", void 0);
12535
12544
  m([
12536
- w({ type: T.PrintableString })
12545
+ w({ type: C.PrintableString })
12537
12546
  ], gt.prototype, "printableString", void 0);
12538
12547
  m([
12539
- w({ type: T.UniversalString })
12548
+ w({ type: C.UniversalString })
12540
12549
  ], gt.prototype, "universalString", void 0);
12541
12550
  m([
12542
- w({ type: T.Utf8String })
12551
+ w({ type: C.Utf8String })
12543
12552
  ], gt.prototype, "utf8String", void 0);
12544
12553
  m([
12545
- w({ type: T.BmpString })
12554
+ w({ type: C.BmpString })
12546
12555
  ], gt.prototype, "bmpString", void 0);
12547
12556
  gt = m([
12548
12557
  J({ type: H.Choice })
@@ -12556,10 +12565,10 @@ let Ri = class extends gt {
12556
12565
  }
12557
12566
  };
12558
12567
  m([
12559
- w({ type: T.IA5String })
12568
+ w({ type: C.IA5String })
12560
12569
  ], Ri.prototype, "ia5String", void 0);
12561
12570
  m([
12562
- w({ type: T.Any })
12571
+ w({ type: C.Any })
12563
12572
  ], Ri.prototype, "anyValue", void 0);
12564
12573
  Ri = m([
12565
12574
  J({ type: H.Choice })
@@ -12570,7 +12579,7 @@ class Bc {
12570
12579
  }
12571
12580
  }
12572
12581
  m([
12573
- w({ type: T.ObjectIdentifier })
12582
+ w({ type: C.ObjectIdentifier })
12574
12583
  ], Bc.prototype, "type", void 0);
12575
12584
  m([
12576
12585
  w({ type: Ri })
@@ -12609,10 +12618,10 @@ class Bs {
12609
12618
  }
12610
12619
  }
12611
12620
  m([
12612
- w({ type: T.ObjectIdentifier })
12621
+ w({ type: C.ObjectIdentifier })
12613
12622
  ], Bs.prototype, "typeId", void 0);
12614
12623
  m([
12615
- w({ type: T.Any, context: 0 })
12624
+ w({ type: C.Any, context: 0 })
12616
12625
  ], Bs.prototype, "value", void 0);
12617
12626
  class Lp {
12618
12627
  constructor(e = {}) {
@@ -12634,13 +12643,13 @@ m([
12634
12643
  w({ type: Bs, context: 0, implicit: !0 })
12635
12644
  ], Te.prototype, "otherName", void 0);
12636
12645
  m([
12637
- w({ type: T.IA5String, context: 1, implicit: !0 })
12646
+ w({ type: C.IA5String, context: 1, implicit: !0 })
12638
12647
  ], Te.prototype, "rfc822Name", void 0);
12639
12648
  m([
12640
- w({ type: T.IA5String, context: 2, implicit: !0 })
12649
+ w({ type: C.IA5String, context: 2, implicit: !0 })
12641
12650
  ], Te.prototype, "dNSName", void 0);
12642
12651
  m([
12643
- w({ type: T.Any, context: 3, implicit: !0 })
12652
+ w({ type: C.Any, context: 3, implicit: !0 })
12644
12653
  ], Te.prototype, "x400Address", void 0);
12645
12654
  m([
12646
12655
  w({ type: et, context: 4, implicit: !1 })
@@ -12649,18 +12658,18 @@ m([
12649
12658
  w({ type: Lp, context: 5 })
12650
12659
  ], Te.prototype, "ediPartyName", void 0);
12651
12660
  m([
12652
- w({ type: T.IA5String, context: 6, implicit: !0 })
12661
+ w({ type: C.IA5String, context: 6, implicit: !0 })
12653
12662
  ], Te.prototype, "uniformResourceIdentifier", void 0);
12654
12663
  m([
12655
12664
  w({
12656
- type: T.OctetString,
12665
+ type: C.OctetString,
12657
12666
  context: 7,
12658
12667
  implicit: !0,
12659
12668
  converter: o4
12660
12669
  })
12661
12670
  ], Te.prototype, "iPAddress", void 0);
12662
12671
  m([
12663
- w({ type: T.ObjectIdentifier, context: 8, implicit: !0 })
12672
+ w({ type: C.ObjectIdentifier, context: 8, implicit: !0 })
12664
12673
  ], Te.prototype, "registeredID", void 0);
12665
12674
  Te = m([
12666
12675
  J({ type: H.Choice })
@@ -12674,7 +12683,7 @@ class po {
12674
12683
  }
12675
12684
  }
12676
12685
  m([
12677
- w({ type: T.ObjectIdentifier })
12686
+ w({ type: C.ObjectIdentifier })
12678
12687
  ], po.prototype, "accessMethod", void 0);
12679
12688
  m([
12680
12689
  w({ type: Te })
@@ -12703,7 +12712,7 @@ m([
12703
12712
  ], Br.prototype, "authorityCertIssuer", void 0);
12704
12713
  m([
12705
12714
  w({
12706
- type: T.Integer,
12715
+ type: C.Integer,
12707
12716
  context: 2,
12708
12717
  optional: !0,
12709
12718
  implicit: !0,
@@ -12717,10 +12726,10 @@ class Aa {
12717
12726
  }
12718
12727
  }
12719
12728
  m([
12720
- w({ type: T.Boolean, defaultValue: !1 })
12729
+ w({ type: C.Boolean, defaultValue: !1 })
12721
12730
  ], Aa.prototype, "cA", void 0);
12722
12731
  m([
12723
- w({ type: T.Integer, optional: !0 })
12732
+ w({ type: C.Integer, optional: !0 })
12724
12733
  ], Aa.prototype, "pathLenConstraint", void 0);
12725
12734
  var Mu;
12726
12735
  let yt = Mu = class extends Pe {
@@ -12751,16 +12760,16 @@ let Wn = class {
12751
12760
  }
12752
12761
  };
12753
12762
  m([
12754
- w({ type: T.IA5String })
12763
+ w({ type: C.IA5String })
12755
12764
  ], Wn.prototype, "ia5String", void 0);
12756
12765
  m([
12757
- w({ type: T.VisibleString })
12766
+ w({ type: C.VisibleString })
12758
12767
  ], Wn.prototype, "visibleString", void 0);
12759
12768
  m([
12760
- w({ type: T.BmpString })
12769
+ w({ type: C.BmpString })
12761
12770
  ], Wn.prototype, "bmpString", void 0);
12762
12771
  m([
12763
- w({ type: T.Utf8String })
12772
+ w({ type: C.Utf8String })
12764
12773
  ], Wn.prototype, "utf8String", void 0);
12765
12774
  Wn = m([
12766
12775
  J({ type: H.Choice })
@@ -12774,7 +12783,7 @@ m([
12774
12783
  w({ type: Wn })
12775
12784
  ], Mp.prototype, "organization", void 0);
12776
12785
  m([
12777
- w({ type: T.Integer, repeated: "sequence" })
12786
+ w({ type: C.Integer, repeated: "sequence" })
12778
12787
  ], Mp.prototype, "noticeNumbers", void 0);
12779
12788
  class qp {
12780
12789
  constructor(e = {}) {
@@ -12793,7 +12802,7 @@ let Ea = class {
12793
12802
  }
12794
12803
  };
12795
12804
  m([
12796
- w({ type: T.IA5String })
12805
+ w({ type: C.IA5String })
12797
12806
  ], Ea.prototype, "cPSuri", void 0);
12798
12807
  m([
12799
12808
  w({ type: qp })
@@ -12807,10 +12816,10 @@ class zp {
12807
12816
  }
12808
12817
  }
12809
12818
  m([
12810
- w({ type: T.ObjectIdentifier })
12819
+ w({ type: C.ObjectIdentifier })
12811
12820
  ], zp.prototype, "policyQualifierId", void 0);
12812
12821
  m([
12813
- w({ type: T.Any })
12822
+ w({ type: C.Any })
12814
12823
  ], zp.prototype, "qualifier", void 0);
12815
12824
  class Fc {
12816
12825
  constructor(e = {}) {
@@ -12818,7 +12827,7 @@ class Fc {
12818
12827
  }
12819
12828
  }
12820
12829
  m([
12821
- w({ type: T.ObjectIdentifier })
12830
+ w({ type: C.ObjectIdentifier })
12822
12831
  ], Fc.prototype, "policyIdentifier", void 0);
12823
12832
  m([
12824
12833
  w({ type: zp, repeated: "sequence", optional: !0 })
@@ -12837,7 +12846,7 @@ let ka = class {
12837
12846
  }
12838
12847
  };
12839
12848
  m([
12840
- w({ type: T.Integer })
12849
+ w({ type: C.Integer })
12841
12850
  ], ka.prototype, "value", void 0);
12842
12851
  ka = m([
12843
12852
  J({ type: H.Choice })
@@ -12918,7 +12927,7 @@ m([
12918
12927
  ], _t.prototype, "distributionPoint", void 0);
12919
12928
  m([
12920
12929
  w({
12921
- type: T.Boolean,
12930
+ type: C.Boolean,
12922
12931
  context: 1,
12923
12932
  defaultValue: _t.ONLY,
12924
12933
  implicit: !0
@@ -12926,7 +12935,7 @@ m([
12926
12935
  ], _t.prototype, "onlyContainsUserCerts", void 0);
12927
12936
  m([
12928
12937
  w({
12929
- type: T.Boolean,
12938
+ type: C.Boolean,
12930
12939
  context: 2,
12931
12940
  defaultValue: _t.ONLY,
12932
12941
  implicit: !0
@@ -12937,7 +12946,7 @@ m([
12937
12946
  ], _t.prototype, "onlySomeReasons", void 0);
12938
12947
  m([
12939
12948
  w({
12940
- type: T.Boolean,
12949
+ type: C.Boolean,
12941
12950
  context: 4,
12942
12951
  defaultValue: _t.ONLY,
12943
12952
  implicit: !0
@@ -12945,7 +12954,7 @@ m([
12945
12954
  ], _t.prototype, "indirectCRL", void 0);
12946
12955
  m([
12947
12956
  w({
12948
- type: T.Boolean,
12957
+ type: C.Boolean,
12949
12958
  context: 5,
12950
12959
  defaultValue: _t.ONLY,
12951
12960
  implicit: !0
@@ -12967,7 +12976,7 @@ let Gu = class {
12967
12976
  }
12968
12977
  };
12969
12978
  m([
12970
- w({ type: T.Enumerated })
12979
+ w({ type: C.Enumerated })
12971
12980
  ], Gu.prototype, "reason", void 0);
12972
12981
  Gu = m([
12973
12982
  J({ type: H.Choice })
@@ -12980,7 +12989,7 @@ let Na = Wu = class extends Pe {
12980
12989
  }
12981
12990
  };
12982
12991
  Na = Wu = m([
12983
- J({ type: H.Sequence, itemType: T.ObjectIdentifier })
12992
+ J({ type: H.Sequence, itemType: C.ObjectIdentifier })
12984
12993
  ], Na);
12985
12994
  const c4 = `${Qi}.1`, l4 = `${Qi}.2`, u4 = `${Qi}.3`, d4 = `${Qi}.4`, p4 = `${Qi}.8`, f4 = `${Qi}.9`;
12986
12995
  let Xu = class {
@@ -12989,7 +12998,7 @@ let Xu = class {
12989
12998
  }
12990
12999
  };
12991
13000
  m([
12992
- w({ type: T.Integer, converter: He })
13001
+ w({ type: C.Integer, converter: He })
12993
13002
  ], Xu.prototype, "value", void 0);
12994
13003
  Xu = m([
12995
13004
  J({ type: H.Choice })
@@ -13000,7 +13009,7 @@ let Ju = class {
13000
13009
  }
13001
13010
  };
13002
13011
  m([
13003
- w({ type: T.GeneralizedTime })
13012
+ w({ type: C.GeneralizedTime })
13004
13013
  ], Ju.prototype, "value", void 0);
13005
13014
  Ju = m([
13006
13015
  J({ type: H.Choice })
@@ -13039,10 +13048,10 @@ m([
13039
13048
  w({ type: Te })
13040
13049
  ], Uc.prototype, "base", void 0);
13041
13050
  m([
13042
- w({ type: T.Integer, context: 0, defaultValue: 0, implicit: !0 })
13051
+ w({ type: C.Integer, context: 0, defaultValue: 0, implicit: !0 })
13043
13052
  ], Uc.prototype, "minimum", void 0);
13044
13053
  m([
13045
- w({ type: T.Integer, context: 1, optional: !0, implicit: !0 })
13054
+ w({ type: C.Integer, context: 1, optional: !0, implicit: !0 })
13046
13055
  ], Uc.prototype, "maximum", void 0);
13047
13056
  let Ca = Zu = class extends Pe {
13048
13057
  constructor(e) {
@@ -13070,7 +13079,7 @@ class h2 {
13070
13079
  }
13071
13080
  m([
13072
13081
  w({
13073
- type: T.Integer,
13082
+ type: C.Integer,
13074
13083
  context: 0,
13075
13084
  implicit: !0,
13076
13085
  optional: !0,
@@ -13079,7 +13088,7 @@ m([
13079
13088
  ], h2.prototype, "requireExplicitPolicy", void 0);
13080
13089
  m([
13081
13090
  w({
13082
- type: T.Integer,
13091
+ type: C.Integer,
13083
13092
  context: 1,
13084
13093
  implicit: !0,
13085
13094
  optional: !0,
@@ -13093,10 +13102,10 @@ class Vp {
13093
13102
  }
13094
13103
  }
13095
13104
  m([
13096
- w({ type: T.ObjectIdentifier })
13105
+ w({ type: C.ObjectIdentifier })
13097
13106
  ], Vp.prototype, "issuerDomainPolicy", void 0);
13098
13107
  m([
13099
- w({ type: T.ObjectIdentifier })
13108
+ w({ type: C.ObjectIdentifier })
13100
13109
  ], Vp.prototype, "subjectDomainPolicy", void 0);
13101
13110
  let qh = Qu = class extends Pe {
13102
13111
  constructor(e) {
@@ -13122,10 +13131,10 @@ let Xn = class {
13122
13131
  }
13123
13132
  };
13124
13133
  m([
13125
- w({ type: T.ObjectIdentifier })
13134
+ w({ type: C.ObjectIdentifier })
13126
13135
  ], Xn.prototype, "type", void 0);
13127
13136
  m([
13128
- w({ type: T.Any, repeated: "set" })
13137
+ w({ type: C.Any, repeated: "set" })
13129
13138
  ], Xn.prototype, "values", void 0);
13130
13139
  var nd;
13131
13140
  let zh = nd = class extends Pe {
@@ -13145,10 +13154,10 @@ class _2 {
13145
13154
  }
13146
13155
  }
13147
13156
  m([
13148
- w({ type: T.GeneralizedTime, context: 0, implicit: !0, optional: !0 })
13157
+ w({ type: C.GeneralizedTime, context: 0, implicit: !0, optional: !0 })
13149
13158
  ], _2.prototype, "notBefore", void 0);
13150
13159
  m([
13151
- w({ type: T.GeneralizedTime, context: 1, implicit: !0, optional: !0 })
13160
+ w({ type: C.GeneralizedTime, context: 1, implicit: !0, optional: !0 })
13152
13161
  ], _2.prototype, "notAfter", void 0);
13153
13162
  var Cs;
13154
13163
  (function(t) {
@@ -13169,7 +13178,7 @@ class w2 {
13169
13178
  }
13170
13179
  }
13171
13180
  m([
13172
- w({ type: T.GeneralString })
13181
+ w({ type: C.GeneralString })
13173
13182
  ], w2.prototype, "entrustVers", void 0);
13174
13183
  m([
13175
13184
  w({ type: y2 })
@@ -13193,12 +13202,12 @@ class ue {
13193
13202
  }
13194
13203
  m([
13195
13204
  w({
13196
- type: T.ObjectIdentifier
13205
+ type: C.ObjectIdentifier
13197
13206
  })
13198
13207
  ], ue.prototype, "algorithm", void 0);
13199
13208
  m([
13200
13209
  w({
13201
- type: T.Any,
13210
+ type: C.Any,
13202
13211
  optional: !0
13203
13212
  })
13204
13213
  ], ue.prototype, "parameters", void 0);
@@ -13211,7 +13220,7 @@ m([
13211
13220
  w({ type: ue })
13212
13221
  ], an.prototype, "algorithm", void 0);
13213
13222
  m([
13214
- w({ type: T.BitString })
13223
+ w({ type: C.BitString })
13215
13224
  ], an.prototype, "subjectPublicKey", void 0);
13216
13225
  let pt = class {
13217
13226
  constructor(e) {
@@ -13231,12 +13240,12 @@ let pt = class {
13231
13240
  };
13232
13241
  m([
13233
13242
  w({
13234
- type: T.UTCTime
13243
+ type: C.UTCTime
13235
13244
  })
13236
13245
  ], pt.prototype, "utcTime", void 0);
13237
13246
  m([
13238
13247
  w({
13239
- type: T.GeneralizedTime
13248
+ type: C.GeneralizedTime
13240
13249
  })
13241
13250
  ], pt.prototype, "generalTime", void 0);
13242
13251
  pt = m([
@@ -13261,11 +13270,11 @@ let Qt = class v2 {
13261
13270
  };
13262
13271
  Qt.CRITICAL = !1;
13263
13272
  m([
13264
- w({ type: T.ObjectIdentifier })
13273
+ w({ type: C.ObjectIdentifier })
13265
13274
  ], Qt.prototype, "extnID", void 0);
13266
13275
  m([
13267
13276
  w({
13268
- type: T.Boolean,
13277
+ type: C.Boolean,
13269
13278
  defaultValue: Qt.CRITICAL
13270
13279
  })
13271
13280
  ], Qt.prototype, "critical", void 0);
@@ -13291,14 +13300,14 @@ class Vt {
13291
13300
  }
13292
13301
  m([
13293
13302
  w({
13294
- type: T.Integer,
13303
+ type: C.Integer,
13295
13304
  context: 0,
13296
13305
  defaultValue: Kr.v1
13297
13306
  })
13298
13307
  ], Vt.prototype, "version", void 0);
13299
13308
  m([
13300
13309
  w({
13301
- type: T.Integer,
13310
+ type: C.Integer,
13302
13311
  converter: He
13303
13312
  })
13304
13313
  ], Vt.prototype, "serialNumber", void 0);
@@ -13319,14 +13328,14 @@ m([
13319
13328
  ], Vt.prototype, "subjectPublicKeyInfo", void 0);
13320
13329
  m([
13321
13330
  w({
13322
- type: T.BitString,
13331
+ type: C.BitString,
13323
13332
  context: 1,
13324
13333
  implicit: !0,
13325
13334
  optional: !0
13326
13335
  })
13327
13336
  ], Vt.prototype, "issuerUniqueID", void 0);
13328
13337
  m([
13329
- w({ type: T.BitString, context: 2, implicit: !0, optional: !0 })
13338
+ w({ type: C.BitString, context: 2, implicit: !0, optional: !0 })
13330
13339
  ], Vt.prototype, "subjectUniqueID", void 0);
13331
13340
  m([
13332
13341
  w({ type: br, context: 3, optional: !0 })
@@ -13343,7 +13352,7 @@ m([
13343
13352
  w({ type: ue })
13344
13353
  ], Gr.prototype, "signatureAlgorithm", void 0);
13345
13354
  m([
13346
- w({ type: T.BitString })
13355
+ w({ type: C.BitString })
13347
13356
  ], Gr.prototype, "signatureValue", void 0);
13348
13357
  class Mc {
13349
13358
  constructor(e = {}) {
@@ -13351,7 +13360,7 @@ class Mc {
13351
13360
  }
13352
13361
  }
13353
13362
  m([
13354
- w({ type: T.Integer, converter: He })
13363
+ w({ type: C.Integer, converter: He })
13355
13364
  ], Mc.prototype, "userCertificate", void 0);
13356
13365
  m([
13357
13366
  w({ type: pt })
@@ -13365,7 +13374,7 @@ class or {
13365
13374
  }
13366
13375
  }
13367
13376
  m([
13368
- w({ type: T.Integer, optional: !0 })
13377
+ w({ type: C.Integer, optional: !0 })
13369
13378
  ], or.prototype, "version", void 0);
13370
13379
  m([
13371
13380
  w({ type: ue })
@@ -13397,7 +13406,7 @@ m([
13397
13406
  w({ type: ue })
13398
13407
  ], Hp.prototype, "signatureAlgorithm", void 0);
13399
13408
  m([
13400
- w({ type: T.BitString })
13409
+ w({ type: C.BitString })
13401
13410
  ], Hp.prototype, "signature", void 0);
13402
13411
  class ts {
13403
13412
  constructor(e = {}) {
@@ -13408,7 +13417,7 @@ m([
13408
13417
  w({ type: et })
13409
13418
  ], ts.prototype, "issuer", void 0);
13410
13419
  m([
13411
- w({ type: T.Integer, converter: He })
13420
+ w({ type: C.Integer, converter: He })
13412
13421
  ], ts.prototype, "serialNumber", void 0);
13413
13422
  let Pi = class {
13414
13423
  constructor(e = {}) {
@@ -13464,10 +13473,10 @@ let ns = class {
13464
13473
  }
13465
13474
  };
13466
13475
  m([
13467
- w({ type: T.ObjectIdentifier })
13476
+ w({ type: C.ObjectIdentifier })
13468
13477
  ], ns.prototype, "attrType", void 0);
13469
13478
  m([
13470
- w({ type: T.Any, repeated: "set" })
13479
+ w({ type: C.Any, repeated: "set" })
13471
13480
  ], ns.prototype, "attrValues", void 0);
13472
13481
  var od;
13473
13482
  class jn {
@@ -13476,7 +13485,7 @@ class jn {
13476
13485
  }
13477
13486
  }
13478
13487
  m([
13479
- w({ type: T.Integer })
13488
+ w({ type: C.Integer })
13480
13489
  ], jn.prototype, "version", void 0);
13481
13490
  m([
13482
13491
  w({ type: Pi })
@@ -13523,7 +13532,7 @@ m([
13523
13532
  w({ type: Te })
13524
13533
  ], Kp.prototype, "acIssuer", void 0);
13525
13534
  m([
13526
- w({ type: T.Integer })
13535
+ w({ type: C.Integer })
13527
13536
  ], Kp.prototype, "acSerial", void 0);
13528
13537
  m([
13529
13538
  w({ type: Xn, repeated: "sequence" })
@@ -13535,7 +13544,7 @@ let Da = ad = class extends Pe {
13535
13544
  }
13536
13545
  };
13537
13546
  Da = ad = m([
13538
- J({ type: H.Sequence, itemType: T.ObjectIdentifier })
13547
+ J({ type: H.Sequence, itemType: C.ObjectIdentifier })
13539
13548
  ], Da);
13540
13549
  class qc {
13541
13550
  constructor(e = {}) {
@@ -13543,7 +13552,7 @@ class qc {
13543
13552
  }
13544
13553
  }
13545
13554
  m([
13546
- w({ type: T.Integer, optional: !0 })
13555
+ w({ type: C.Integer, optional: !0 })
13547
13556
  ], qc.prototype, "pathLenConstraint", void 0);
13548
13557
  m([
13549
13558
  w({ type: Da, implicit: !0, context: 0, optional: !0 })
@@ -13552,7 +13561,7 @@ m([
13552
13561
  w({ type: Da, implicit: !0, context: 1, optional: !0 })
13553
13562
  ], qc.prototype, "excludedAttrs", void 0);
13554
13563
  m([
13555
- w({ type: T.Boolean, defaultValue: !0 })
13564
+ w({ type: C.Boolean, defaultValue: !0 })
13556
13565
  ], qc.prototype, "permitUnSpecified", void 0);
13557
13566
  class ai {
13558
13567
  constructor(e = {}) {
@@ -13563,10 +13572,10 @@ m([
13563
13572
  w({ type: yt })
13564
13573
  ], ai.prototype, "issuer", void 0);
13565
13574
  m([
13566
- w({ type: T.Integer, converter: He })
13575
+ w({ type: C.Integer, converter: He })
13567
13576
  ], ai.prototype, "serial", void 0);
13568
13577
  m([
13569
- w({ type: T.BitString, optional: !0 })
13578
+ w({ type: C.BitString, optional: !0 })
13570
13579
  ], ai.prototype, "issuerUID", void 0);
13571
13580
  var cd;
13572
13581
  (function(t) {
@@ -13578,16 +13587,16 @@ class ci {
13578
13587
  }
13579
13588
  }
13580
13589
  m([
13581
- w({ type: T.Enumerated })
13590
+ w({ type: C.Enumerated })
13582
13591
  ], ci.prototype, "digestedObjectType", void 0);
13583
13592
  m([
13584
- w({ type: T.ObjectIdentifier, optional: !0 })
13593
+ w({ type: C.ObjectIdentifier, optional: !0 })
13585
13594
  ], ci.prototype, "otherObjectTypeID", void 0);
13586
13595
  m([
13587
13596
  w({ type: ue })
13588
13597
  ], ci.prototype, "digestAlgorithm", void 0);
13589
13598
  m([
13590
- w({ type: T.BitString })
13599
+ w({ type: C.BitString })
13591
13600
  ], ci.prototype, "objectDigest", void 0);
13592
13601
  class zc {
13593
13602
  constructor(e = {}) {
@@ -13623,10 +13632,10 @@ class Vc {
13623
13632
  }
13624
13633
  }
13625
13634
  m([
13626
- w({ type: T.GeneralizedTime })
13635
+ w({ type: C.GeneralizedTime })
13627
13636
  ], Vc.prototype, "notBeforeTime", void 0);
13628
13637
  m([
13629
- w({ type: T.GeneralizedTime })
13638
+ w({ type: C.GeneralizedTime })
13630
13639
  ], Vc.prototype, "notAfterTime", void 0);
13631
13640
  class ho {
13632
13641
  constructor(e = {}) {
@@ -13652,7 +13661,7 @@ class vn {
13652
13661
  }
13653
13662
  }
13654
13663
  m([
13655
- w({ type: T.Integer })
13664
+ w({ type: C.Integer })
13656
13665
  ], vn.prototype, "version", void 0);
13657
13666
  m([
13658
13667
  w({ type: ho })
@@ -13664,7 +13673,7 @@ m([
13664
13673
  w({ type: ue })
13665
13674
  ], vn.prototype, "signature", void 0);
13666
13675
  m([
13667
- w({ type: T.Integer, converter: He })
13676
+ w({ type: C.Integer, converter: He })
13668
13677
  ], vn.prototype, "serialNumber", void 0);
13669
13678
  m([
13670
13679
  w({ type: Vc })
@@ -13673,7 +13682,7 @@ m([
13673
13682
  w({ type: Xn, repeated: "sequence" })
13674
13683
  ], vn.prototype, "attributes", void 0);
13675
13684
  m([
13676
- w({ type: T.BitString, optional: !0 })
13685
+ w({ type: C.BitString, optional: !0 })
13677
13686
  ], vn.prototype, "issuerUniqueID", void 0);
13678
13687
  m([
13679
13688
  w({ type: br, optional: !0 })
@@ -13690,7 +13699,7 @@ m([
13690
13699
  w({ type: ue })
13691
13700
  ], Hc.prototype, "signatureAlgorithm", void 0);
13692
13701
  m([
13693
- w({ type: T.BitString })
13702
+ w({ type: C.BitString })
13694
13703
  ], Hc.prototype, "signatureValue", void 0);
13695
13704
  var Ra;
13696
13705
  (function(t) {
@@ -13704,10 +13713,10 @@ class Gp {
13704
13713
  }
13705
13714
  }
13706
13715
  m([
13707
- w({ type: T.ObjectIdentifier, implicit: !0, context: 0 })
13716
+ w({ type: C.ObjectIdentifier, implicit: !0, context: 0 })
13708
13717
  ], Gp.prototype, "type", void 0);
13709
13718
  m([
13710
- w({ type: T.Any, implicit: !0, context: 1 })
13719
+ w({ type: C.Any, implicit: !0, context: 1 })
13711
13720
  ], Gp.prototype, "value", void 0);
13712
13721
  class Wp {
13713
13722
  constructor(e = {}) {
@@ -13715,7 +13724,7 @@ class Wp {
13715
13724
  }
13716
13725
  }
13717
13726
  m([
13718
- w({ type: T.ObjectIdentifier })
13727
+ w({ type: C.ObjectIdentifier })
13719
13728
  ], Wp.prototype, "policyId", void 0);
13720
13729
  m([
13721
13730
  w({ type: ud, defaultValue: new ud(Ra.unclassified) })
@@ -13732,10 +13741,10 @@ m([
13732
13741
  w({ type: De })
13733
13742
  ], Kc.prototype, "cotets", void 0);
13734
13743
  m([
13735
- w({ type: T.ObjectIdentifier })
13744
+ w({ type: C.ObjectIdentifier })
13736
13745
  ], Kc.prototype, "oid", void 0);
13737
13746
  m([
13738
- w({ type: T.Utf8String })
13747
+ w({ type: C.Utf8String })
13739
13748
  ], Kc.prototype, "string", void 0);
13740
13749
  class b2 {
13741
13750
  constructor(e = {}) {
@@ -13829,10 +13838,10 @@ class Jp {
13829
13838
  }
13830
13839
  }
13831
13840
  m([
13832
- w({ type: T.ObjectIdentifier })
13841
+ w({ type: C.ObjectIdentifier })
13833
13842
  ], Jp.prototype, "otherCertFormat", void 0);
13834
13843
  m([
13835
- w({ type: T.Any })
13844
+ w({ type: C.Any })
13836
13845
  ], Jp.prototype, "otherCert", void 0);
13837
13846
  let Fi = class {
13838
13847
  constructor(e = {}) {
@@ -13865,10 +13874,10 @@ class rs {
13865
13874
  }
13866
13875
  }
13867
13876
  m([
13868
- w({ type: T.ObjectIdentifier })
13877
+ w({ type: C.ObjectIdentifier })
13869
13878
  ], rs.prototype, "contentType", void 0);
13870
13879
  m([
13871
- w({ type: T.Any, context: 0 })
13880
+ w({ type: C.Any, context: 0 })
13872
13881
  ], rs.prototype, "content", void 0);
13873
13882
  let Fs = class {
13874
13883
  constructor(e = {}) {
@@ -13879,7 +13888,7 @@ m([
13879
13888
  w({ type: De })
13880
13889
  ], Fs.prototype, "single", void 0);
13881
13890
  m([
13882
- w({ type: T.Any })
13891
+ w({ type: C.Any })
13883
13892
  ], Fs.prototype, "any", void 0);
13884
13893
  Fs = m([
13885
13894
  J({ type: H.Choice })
@@ -13890,7 +13899,7 @@ class Wc {
13890
13899
  }
13891
13900
  }
13892
13901
  m([
13893
- w({ type: T.ObjectIdentifier })
13902
+ w({ type: C.ObjectIdentifier })
13894
13903
  ], Wc.prototype, "eContentType", void 0);
13895
13904
  m([
13896
13905
  w({ type: Fs, context: 0, optional: !0 })
@@ -13922,7 +13931,7 @@ class go {
13922
13931
  }
13923
13932
  }
13924
13933
  m([
13925
- w({ type: T.ObjectIdentifier })
13934
+ w({ type: C.ObjectIdentifier })
13926
13935
  ], go.prototype, "contentType", void 0);
13927
13936
  m([
13928
13937
  w({ type: Ia })
@@ -13936,10 +13945,10 @@ class Xc {
13936
13945
  }
13937
13946
  }
13938
13947
  m([
13939
- w({ type: T.ObjectIdentifier })
13948
+ w({ type: C.ObjectIdentifier })
13940
13949
  ], Xc.prototype, "keyAttrId", void 0);
13941
13950
  m([
13942
- w({ type: T.Any, optional: !0 })
13951
+ w({ type: C.Any, optional: !0 })
13943
13952
  ], Xc.prototype, "keyAttr", void 0);
13944
13953
  var gd;
13945
13954
  class Jc {
@@ -13951,7 +13960,7 @@ m([
13951
13960
  w({ type: yr })
13952
13961
  ], Jc.prototype, "subjectKeyIdentifier", void 0);
13953
13962
  m([
13954
- w({ type: T.GeneralizedTime, optional: !0 })
13963
+ w({ type: C.GeneralizedTime, optional: !0 })
13955
13964
  ], Jc.prototype, "date", void 0);
13956
13965
  m([
13957
13966
  w({ type: Xc, optional: !0 })
@@ -13998,7 +14007,7 @@ m([
13998
14007
  w({ type: ue })
13999
14008
  ], Zp.prototype, "algorithm", void 0);
14000
14009
  m([
14001
- w({ type: T.BitString })
14010
+ w({ type: C.BitString })
14002
14011
  ], Zp.prototype, "publicKey", void 0);
14003
14012
  let Wr = class {
14004
14013
  constructor(e = {}) {
@@ -14023,7 +14032,7 @@ class is {
14023
14032
  }
14024
14033
  }
14025
14034
  m([
14026
- w({ type: T.Integer })
14035
+ w({ type: C.Integer })
14027
14036
  ], is.prototype, "version", void 0);
14028
14037
  m([
14029
14038
  w({ type: Wr, context: 0 })
@@ -14057,7 +14066,7 @@ class mo {
14057
14066
  }
14058
14067
  }
14059
14068
  m([
14060
- w({ type: T.Integer })
14069
+ w({ type: C.Integer })
14061
14070
  ], mo.prototype, "version", void 0);
14062
14071
  m([
14063
14072
  w({ type: Mi })
@@ -14077,7 +14086,7 @@ m([
14077
14086
  w({ type: De })
14078
14087
  ], _o.prototype, "keyIdentifier", void 0);
14079
14088
  m([
14080
- w({ type: T.GeneralizedTime, optional: !0 })
14089
+ w({ type: C.GeneralizedTime, optional: !0 })
14081
14090
  ], _o.prototype, "date", void 0);
14082
14091
  m([
14083
14092
  w({ type: Xc, optional: !0 })
@@ -14088,7 +14097,7 @@ class yo {
14088
14097
  }
14089
14098
  }
14090
14099
  m([
14091
- w({ type: T.Integer })
14100
+ w({ type: C.Integer })
14092
14101
  ], yo.prototype, "version", void 0);
14093
14102
  m([
14094
14103
  w({ type: _o })
@@ -14105,7 +14114,7 @@ class wo {
14105
14114
  }
14106
14115
  }
14107
14116
  m([
14108
- w({ type: T.Integer })
14117
+ w({ type: C.Integer })
14109
14118
  ], wo.prototype, "version", void 0);
14110
14119
  m([
14111
14120
  w({ type: sd, context: 0, optional: !0 })
@@ -14122,10 +14131,10 @@ class Qp {
14122
14131
  }
14123
14132
  }
14124
14133
  m([
14125
- w({ type: T.ObjectIdentifier })
14134
+ w({ type: C.ObjectIdentifier })
14126
14135
  ], Qp.prototype, "oriType", void 0);
14127
14136
  m([
14128
- w({ type: T.Any })
14137
+ w({ type: C.Any })
14129
14138
  ], Qp.prototype, "oriValue", void 0);
14130
14139
  let $r = class {
14131
14140
  constructor(e = {}) {
@@ -14166,10 +14175,10 @@ class Yc {
14166
14175
  }
14167
14176
  }
14168
14177
  m([
14169
- w({ type: T.ObjectIdentifier })
14178
+ w({ type: C.ObjectIdentifier })
14170
14179
  ], Yc.prototype, "otherRevInfoFormat", void 0);
14171
14180
  m([
14172
- w({ type: T.Any })
14181
+ w({ type: C.Any })
14173
14182
  ], Yc.prototype, "otherRevInfo", void 0);
14174
14183
  let La = class {
14175
14184
  constructor(e = {}) {
@@ -14216,7 +14225,7 @@ class vo {
14216
14225
  }
14217
14226
  }
14218
14227
  m([
14219
- w({ type: T.Integer })
14228
+ w({ type: C.Integer })
14220
14229
  ], vo.prototype, "version", void 0);
14221
14230
  m([
14222
14231
  w({ type: ef, context: 0, implicit: !0, optional: !0 })
@@ -14246,7 +14255,7 @@ class ss {
14246
14255
  }
14247
14256
  }
14248
14257
  m([
14249
- w({ type: T.Integer })
14258
+ w({ type: C.Integer })
14250
14259
  ], ss.prototype, "version", void 0);
14251
14260
  m([
14252
14261
  w({ type: Ua })
@@ -14276,10 +14285,10 @@ let qs = class {
14276
14285
  }
14277
14286
  };
14278
14287
  m([
14279
- w({ type: T.ObjectIdentifier })
14288
+ w({ type: C.ObjectIdentifier })
14280
14289
  ], qs.prototype, "fieldType", void 0);
14281
14290
  m([
14282
- w({ type: T.Any })
14291
+ w({ type: C.Any })
14283
14292
  ], qs.prototype, "parameters", void 0);
14284
14293
  qs = m([
14285
14294
  J({ type: H.Sequence })
@@ -14292,13 +14301,13 @@ let qi = class {
14292
14301
  }
14293
14302
  };
14294
14303
  m([
14295
- w({ type: T.OctetString })
14304
+ w({ type: C.OctetString })
14296
14305
  ], qi.prototype, "a", void 0);
14297
14306
  m([
14298
- w({ type: T.OctetString })
14307
+ w({ type: C.OctetString })
14299
14308
  ], qi.prototype, "b", void 0);
14300
14309
  m([
14301
- w({ type: T.BitString, optional: !0 })
14310
+ w({ type: C.BitString, optional: !0 })
14302
14311
  ], qi.prototype, "seed", void 0);
14303
14312
  qi = m([
14304
14313
  J({ type: H.Sequence })
@@ -14313,7 +14322,7 @@ let Yn = class {
14313
14322
  }
14314
14323
  };
14315
14324
  m([
14316
- w({ type: T.Integer })
14325
+ w({ type: C.Integer })
14317
14326
  ], Yn.prototype, "version", void 0);
14318
14327
  m([
14319
14328
  w({ type: qs })
@@ -14325,10 +14334,10 @@ m([
14325
14334
  w({ type: w4 })
14326
14335
  ], Yn.prototype, "base", void 0);
14327
14336
  m([
14328
- w({ type: T.Integer, converter: He })
14337
+ w({ type: C.Integer, converter: He })
14329
14338
  ], Yn.prototype, "order", void 0);
14330
14339
  m([
14331
- w({ type: T.Integer, optional: !0 })
14340
+ w({ type: C.Integer, optional: !0 })
14332
14341
  ], Yn.prototype, "cofactor", void 0);
14333
14342
  Yn = m([
14334
14343
  J({ type: H.Sequence })
@@ -14339,10 +14348,10 @@ let xr = class {
14339
14348
  }
14340
14349
  };
14341
14350
  m([
14342
- w({ type: T.ObjectIdentifier })
14351
+ w({ type: C.ObjectIdentifier })
14343
14352
  ], xr.prototype, "namedCurve", void 0);
14344
14353
  m([
14345
- w({ type: T.Null })
14354
+ w({ type: C.Null })
14346
14355
  ], xr.prototype, "implicitCurve", void 0);
14347
14356
  m([
14348
14357
  w({ type: Yn })
@@ -14356,7 +14365,7 @@ class Zc {
14356
14365
  }
14357
14366
  }
14358
14367
  m([
14359
- w({ type: T.Integer })
14368
+ w({ type: C.Integer })
14360
14369
  ], Zc.prototype, "version", void 0);
14361
14370
  m([
14362
14371
  w({ type: De })
@@ -14365,7 +14374,7 @@ m([
14365
14374
  w({ type: xr, context: 0, optional: !0 })
14366
14375
  ], Zc.prototype, "parameters", void 0);
14367
14376
  m([
14368
- w({ type: T.BitString, context: 1, optional: !0 })
14377
+ w({ type: C.BitString, context: 1, optional: !0 })
14369
14378
  ], Zc.prototype, "publicKey", void 0);
14370
14379
  class Ma {
14371
14380
  constructor(e = {}) {
@@ -14373,10 +14382,10 @@ class Ma {
14373
14382
  }
14374
14383
  }
14375
14384
  m([
14376
- w({ type: T.Integer, converter: He })
14385
+ w({ type: C.Integer, converter: He })
14377
14386
  ], Ma.prototype, "r", void 0);
14378
14387
  m([
14379
- w({ type: T.Integer, converter: He })
14388
+ w({ type: C.Integer, converter: He })
14380
14389
  ], Ma.prototype, "s", void 0);
14381
14390
  const Ot = "1.2.840.113549.1.1", Xr = `${Ot}.1`, v4 = `${Ot}.7`, b4 = `${Ot}.9`, Ts = `${Ot}.10`, $4 = `${Ot}.2`, x4 = `${Ot}.4`, qa = `${Ot}.5`, A4 = `${Ot}.14`, $d = `${Ot}.11`, za = `${Ot}.12`, Va = `${Ot}.13`, A2 = `${Ot}.15`, E2 = `${Ot}.16`, Ha = "1.3.14.3.2.26", S2 = "2.16.840.1.101.3.4.2.4", Ka = "2.16.840.1.101.3.4.2.1", Ga = "2.16.840.1.101.3.4.2.2", Wa = "2.16.840.1.101.3.4.2.3", E4 = "2.16.840.1.101.3.4.2.5", S4 = "2.16.840.1.101.3.4.2.6", k4 = "1.2.840.113549.2.2", N4 = "1.2.840.113549.2.5", Qc = `${Ot}.8`;
14382
14391
  function ot(t) {
@@ -14465,10 +14474,10 @@ m([
14465
14474
  w({ type: ue, context: 1, defaultValue: k2 })
14466
14475
  ], Yr.prototype, "maskGenAlgorithm", void 0);
14467
14476
  m([
14468
- w({ type: T.Integer, context: 2, defaultValue: 20 })
14477
+ w({ type: C.Integer, context: 2, defaultValue: 20 })
14469
14478
  ], Yr.prototype, "saltLength", void 0);
14470
14479
  m([
14471
- w({ type: T.Integer, context: 3, defaultValue: 1 })
14480
+ w({ type: C.Integer, context: 3, defaultValue: 1 })
14472
14481
  ], Yr.prototype, "trailerField", void 0);
14473
14482
  new ue({
14474
14483
  algorithm: Ts,
@@ -14492,13 +14501,13 @@ class nl {
14492
14501
  }
14493
14502
  }
14494
14503
  m([
14495
- w({ type: T.Integer, converter: He })
14504
+ w({ type: C.Integer, converter: He })
14496
14505
  ], nl.prototype, "prime", void 0);
14497
14506
  m([
14498
- w({ type: T.Integer, converter: He })
14507
+ w({ type: C.Integer, converter: He })
14499
14508
  ], nl.prototype, "exponent", void 0);
14500
14509
  m([
14501
- w({ type: T.Integer, converter: He })
14510
+ w({ type: C.Integer, converter: He })
14502
14511
  ], nl.prototype, "coefficient", void 0);
14503
14512
  let Ad = xd = class extends Pe {
14504
14513
  constructor(e) {
@@ -14514,31 +14523,31 @@ class Pn {
14514
14523
  }
14515
14524
  }
14516
14525
  m([
14517
- w({ type: T.Integer })
14526
+ w({ type: C.Integer })
14518
14527
  ], Pn.prototype, "version", void 0);
14519
14528
  m([
14520
- w({ type: T.Integer, converter: He })
14529
+ w({ type: C.Integer, converter: He })
14521
14530
  ], Pn.prototype, "modulus", void 0);
14522
14531
  m([
14523
- w({ type: T.Integer, converter: He })
14532
+ w({ type: C.Integer, converter: He })
14524
14533
  ], Pn.prototype, "publicExponent", void 0);
14525
14534
  m([
14526
- w({ type: T.Integer, converter: He })
14535
+ w({ type: C.Integer, converter: He })
14527
14536
  ], Pn.prototype, "privateExponent", void 0);
14528
14537
  m([
14529
- w({ type: T.Integer, converter: He })
14538
+ w({ type: C.Integer, converter: He })
14530
14539
  ], Pn.prototype, "prime1", void 0);
14531
14540
  m([
14532
- w({ type: T.Integer, converter: He })
14541
+ w({ type: C.Integer, converter: He })
14533
14542
  ], Pn.prototype, "prime2", void 0);
14534
14543
  m([
14535
- w({ type: T.Integer, converter: He })
14544
+ w({ type: C.Integer, converter: He })
14536
14545
  ], Pn.prototype, "exponent1", void 0);
14537
14546
  m([
14538
- w({ type: T.Integer, converter: He })
14547
+ w({ type: C.Integer, converter: He })
14539
14548
  ], Pn.prototype, "exponent2", void 0);
14540
14549
  m([
14541
- w({ type: T.Integer, converter: He })
14550
+ w({ type: C.Integer, converter: He })
14542
14551
  ], Pn.prototype, "coefficient", void 0);
14543
14552
  m([
14544
14553
  w({ type: Ad, optional: !0 })
@@ -14549,10 +14558,10 @@ class of {
14549
14558
  }
14550
14559
  }
14551
14560
  m([
14552
- w({ type: T.Integer, converter: He })
14561
+ w({ type: C.Integer, converter: He })
14553
14562
  ], of.prototype, "modulus", void 0);
14554
14563
  m([
14555
- w({ type: T.Integer, converter: He })
14564
+ w({ type: C.Integer, converter: He })
14556
14565
  ], of.prototype, "publicExponent", void 0);
14557
14566
  var Ed;
14558
14567
  (function(t) {
@@ -15100,10 +15109,10 @@ class il {
15100
15109
  }
15101
15110
  }
15102
15111
  m([
15103
- w({ type: T.ObjectIdentifier })
15112
+ w({ type: C.ObjectIdentifier })
15104
15113
  ], il.prototype, "attrId", void 0);
15105
15114
  m([
15106
- w({ type: T.Any, repeated: "set" })
15115
+ w({ type: C.Any, repeated: "set" })
15107
15116
  ], il.prototype, "attrValues", void 0);
15108
15117
  let Qh = Nd = class extends Pe {
15109
15118
  constructor(e) {
@@ -15128,10 +15137,10 @@ class O2 {
15128
15137
  }
15129
15138
  }
15130
15139
  m([
15131
- w({ type: T.ObjectIdentifier })
15140
+ w({ type: C.ObjectIdentifier })
15132
15141
  ], O2.prototype, "certId", void 0);
15133
15142
  m([
15134
- w({ type: T.Any, context: 0 })
15143
+ w({ type: C.Any, context: 0 })
15135
15144
  ], O2.prototype, "certValue", void 0);
15136
15145
  class D2 {
15137
15146
  constructor(e = {}) {
@@ -15139,10 +15148,10 @@ class D2 {
15139
15148
  }
15140
15149
  }
15141
15150
  m([
15142
- w({ type: T.ObjectIdentifier })
15151
+ w({ type: C.ObjectIdentifier })
15143
15152
  ], D2.prototype, "crlId", void 0);
15144
15153
  m([
15145
- w({ type: T.Any, context: 0 })
15154
+ w({ type: C.Any, context: 0 })
15146
15155
  ], D2.prototype, "crltValue", void 0);
15147
15156
  class R2 extends De {
15148
15157
  }
@@ -15177,7 +15186,7 @@ class $o {
15177
15186
  }
15178
15187
  }
15179
15188
  m([
15180
- w({ type: T.Integer })
15189
+ w({ type: C.Integer })
15181
15190
  ], $o.prototype, "version", void 0);
15182
15191
  m([
15183
15192
  w({ type: ue })
@@ -15204,10 +15213,10 @@ class P2 {
15204
15213
  }
15205
15214
  }
15206
15215
  m([
15207
- w({ type: T.ObjectIdentifier })
15216
+ w({ type: C.ObjectIdentifier })
15208
15217
  ], P2.prototype, "secretTypeId", void 0);
15209
15218
  m([
15210
- w({ type: T.Any, context: 0 })
15219
+ w({ type: C.Any, context: 0 })
15211
15220
  ], P2.prototype, "secretValue", void 0);
15212
15221
  class xo {
15213
15222
  constructor(e = {}) {
@@ -15221,7 +15230,7 @@ m([
15221
15230
  w({ type: De })
15222
15231
  ], xo.prototype, "macSalt", void 0);
15223
15232
  m([
15224
- w({ type: T.Integer, defaultValue: 1 })
15233
+ w({ type: C.Integer, defaultValue: 1 })
15225
15234
  ], xo.prototype, "iterations", void 0);
15226
15235
  class ol {
15227
15236
  constructor(e = {}) {
@@ -15229,7 +15238,7 @@ class ol {
15229
15238
  }
15230
15239
  }
15231
15240
  m([
15232
- w({ type: T.Integer })
15241
+ w({ type: C.Integer })
15233
15242
  ], ol.prototype, "version", void 0);
15234
15243
  m([
15235
15244
  w({ type: rs })
@@ -15244,10 +15253,10 @@ class al {
15244
15253
  }
15245
15254
  }
15246
15255
  m([
15247
- w({ type: T.ObjectIdentifier })
15256
+ w({ type: C.ObjectIdentifier })
15248
15257
  ], al.prototype, "bagId", void 0);
15249
15258
  m([
15250
- w({ type: T.Any, context: 0 })
15259
+ w({ type: C.Any, context: 0 })
15251
15260
  ], al.prototype, "bagValue", void 0);
15252
15261
  m([
15253
15262
  w({ type: il, repeated: "set", optional: !0 })
@@ -15271,7 +15280,7 @@ let Ja = class extends gt {
15271
15280
  }
15272
15281
  };
15273
15282
  m([
15274
- w({ type: T.IA5String })
15283
+ w({ type: C.IA5String })
15275
15284
  ], Ja.prototype, "ia5String", void 0);
15276
15285
  Ja = m([
15277
15286
  J({ type: H.Choice })
@@ -15300,7 +15309,7 @@ let Bd = class {
15300
15309
  }
15301
15310
  };
15302
15311
  m([
15303
- w({ type: T.IA5String })
15312
+ w({ type: C.IA5String })
15304
15313
  ], Bd.prototype, "value", void 0);
15305
15314
  Bd = m([
15306
15315
  J({ type: H.Choice })
@@ -15321,7 +15330,7 @@ let Ld = class {
15321
15330
  }
15322
15331
  };
15323
15332
  m([
15324
- w({ type: T.GeneralizedTime })
15333
+ w({ type: C.GeneralizedTime })
15325
15334
  ], Ld.prototype, "value", void 0);
15326
15335
  Ld = m([
15327
15336
  J({ type: H.Choice })
@@ -15340,7 +15349,7 @@ let Fd = class {
15340
15349
  }
15341
15350
  };
15342
15351
  m([
15343
- w({ type: T.PrintableString })
15352
+ w({ type: C.PrintableString })
15344
15353
  ], Fd.prototype, "value", void 0);
15345
15354
  Fd = m([
15346
15355
  J({ type: H.Choice })
@@ -15354,7 +15363,7 @@ let Ya = class {
15354
15363
  }
15355
15364
  };
15356
15365
  m([
15357
- w({ type: T.PrintableString })
15366
+ w({ type: C.PrintableString })
15358
15367
  ], Ya.prototype, "value", void 0);
15359
15368
  Ya = m([
15360
15369
  J({ type: H.Choice })
@@ -15378,7 +15387,7 @@ let Ud = class {
15378
15387
  }
15379
15388
  };
15380
15389
  m([
15381
- w({ type: T.ObjectIdentifier })
15390
+ w({ type: C.ObjectIdentifier })
15382
15391
  ], Ud.prototype, "value", void 0);
15383
15392
  Ud = m([
15384
15393
  J({ type: H.Choice })
@@ -15397,7 +15406,7 @@ let Md = class {
15397
15406
  }
15398
15407
  };
15399
15408
  m([
15400
- w({ type: T.Integer })
15409
+ w({ type: C.Integer })
15401
15410
  ], Md.prototype, "value", void 0);
15402
15411
  Md = m([
15403
15412
  J({ type: H.Choice })
@@ -15437,7 +15446,7 @@ let qd = class {
15437
15446
  }
15438
15447
  };
15439
15448
  m([
15440
- w({ type: T.BmpString })
15449
+ w({ type: C.BmpString })
15441
15450
  ], qd.prototype, "value", void 0);
15442
15451
  qd = m([
15443
15452
  J({ type: H.Choice })
@@ -15470,7 +15479,7 @@ class os {
15470
15479
  }
15471
15480
  }
15472
15481
  m([
15473
- w({ type: T.Integer })
15482
+ w({ type: C.Integer })
15474
15483
  ], os.prototype, "version", void 0);
15475
15484
  m([
15476
15485
  w({ type: et })
@@ -15493,7 +15502,7 @@ m([
15493
15502
  w({ type: ue })
15494
15503
  ], zs.prototype, "signatureAlgorithm", void 0);
15495
15504
  m([
15496
- w({ type: T.BitString })
15505
+ w({ type: C.BitString })
15497
15506
  ], zs.prototype, "signature", void 0);
15498
15507
  /*!
15499
15508
  * MIT License
@@ -17225,14 +17234,14 @@ class c$ {
17225
17234
  hash: "SHA-256"
17226
17235
  }, p = "signingKey" in e ? { ...d, ...e.signingAlgorithm, ...e.signingKey.algorithm } : { ...d, ...e.signingAlgorithm }, h = mt.resolve(Zr);
17227
17236
  u.tbsCertificate.signature = u.signatureAlgorithm = h.toAsnAlgorithm(p);
17228
- const g = re.serialize(u.tbsCertificate), b = "signingKey" in e ? await n.subtle.sign(p, e.signingKey, g) : e.signature, x = mt.resolveAll(So).reverse();
17229
- let C = null;
17230
- for (const O of x)
17231
- if (C = O.toAsnSignature(p, b), C)
17237
+ const g = re.serialize(u.tbsCertificate), b = "signingKey" in e ? await n.subtle.sign(p, e.signingKey, g) : e.signature, A = mt.resolveAll(So).reverse();
17238
+ let T = null;
17239
+ for (const O of A)
17240
+ if (T = O.toAsnSignature(p, b), T)
17232
17241
  break;
17233
- if (!C)
17242
+ if (!T)
17234
17243
  throw Error("Cannot convert ASN.1 signature value to WebCrypto format");
17235
- return u.signatureValue = C, new ll(re.serialize(u));
17244
+ return u.signatureValue = T, new ll(re.serialize(u));
17236
17245
  }
17237
17246
  static generateSerialNumber(e, n) {
17238
17247
  let r = e && e.length && e.some((s) => s > 0) ? new Uint8Array(e) : void 0;
@@ -17884,14 +17893,14 @@ const m$ = qt.extend({
17884
17893
  }
17885
17894
  }),
17886
17895
  async (t) => {
17887
- const { page: e, per_page: n, include_totals: r, sort: i, q: s } = t.req.valid("query"), { "tenant-id": a } = t.req.valid("header"), l = await t.env.data.logs.list(a, {
17896
+ const { page: e, per_page: n, include_totals: r, sort: i, q: s } = t.req.valid("query"), a = await t.env.data.logs.list(t.var.tenant_id, {
17888
17897
  page: e,
17889
17898
  per_page: n,
17890
17899
  include_totals: r,
17891
17900
  sort: bt(i),
17892
17901
  q: s
17893
17902
  });
17894
- return r ? t.json(l) : t.json(l.logs);
17903
+ return r ? t.json(a) : t.json(a.logs);
17895
17904
  }
17896
17905
  ).openapi(
17897
17906
  U({
@@ -17923,10 +17932,10 @@ const m$ = qt.extend({
17923
17932
  }
17924
17933
  }),
17925
17934
  async (t) => {
17926
- const { "tenant-id": e } = t.req.valid("header"), { id: n } = t.req.valid("param"), r = await t.env.data.logs.get(e, n);
17927
- if (!r)
17935
+ const { id: e } = t.req.valid("param"), n = await t.env.data.logs.get(t.var.tenant_id, e);
17936
+ if (!n)
17928
17937
  throw new E(404);
17929
- return t.json(r);
17938
+ return t.json(n);
17930
17939
  }
17931
17940
  ), v$ = 17, b$ = {
17932
17941
  organization: "org_",
@@ -17980,14 +17989,14 @@ const E$ = qt.extend({
17980
17989
  }
17981
17990
  }),
17982
17991
  async (t) => {
17983
- const { "tenant-id": e } = t.req.valid("header"), { page: n, per_page: r, include_totals: i, sort: s, q: a } = t.req.valid("query"), l = await t.env.data.hooks.list(e, {
17984
- page: n,
17985
- per_page: r,
17986
- include_totals: i,
17987
- sort: bt(s),
17988
- q: a
17992
+ const { page: e, per_page: n, include_totals: r, sort: i, q: s } = t.req.valid("query"), a = await t.env.data.hooks.list(t.var.tenant_id, {
17993
+ page: e,
17994
+ per_page: n,
17995
+ include_totals: r,
17996
+ sort: bt(i),
17997
+ q: s
17989
17998
  });
17990
- return i ? t.json(l) : t.json(l.hooks);
17999
+ return r ? t.json(a) : t.json(a.hooks);
17991
18000
  }
17992
18001
  ).openapi(
17993
18002
  U({
@@ -18024,11 +18033,14 @@ const E$ = qt.extend({
18024
18033
  }
18025
18034
  }),
18026
18035
  async (t) => {
18027
- const { "tenant-id": e } = t.req.valid("header"), n = t.req.valid("json"), r = {
18028
- ...n,
18029
- hook_id: n.hook_id || A$()
18030
- }, i = await t.env.data.hooks.create(e, r);
18031
- return t.json(i, { status: 201 });
18036
+ const e = t.req.valid("json"), n = {
18037
+ ...e,
18038
+ hook_id: e.hook_id || A$()
18039
+ }, r = await t.env.data.hooks.create(
18040
+ t.var.tenant_id,
18041
+ n
18042
+ );
18043
+ return t.json(r, { status: 201 });
18032
18044
  }
18033
18045
  ).openapi(
18034
18046
  U({
@@ -18075,12 +18087,12 @@ const E$ = qt.extend({
18075
18087
  }
18076
18088
  }),
18077
18089
  async (t) => {
18078
- const { "tenant-id": e } = t.req.valid("header"), { hook_id: n } = t.req.valid("param"), r = t.req.valid("json");
18079
- await t.env.data.hooks.update(e, n, r);
18080
- const i = await t.env.data.hooks.get(e, n);
18081
- if (!i)
18090
+ const { hook_id: e } = t.req.valid("param"), n = t.req.valid("json");
18091
+ await t.env.data.hooks.update(t.var.tenant_id, e, n);
18092
+ const r = await t.env.data.hooks.get(t.var.tenant_id, e);
18093
+ if (!r)
18082
18094
  throw new E(404, { message: "Hook not found" });
18083
- return t.json(i);
18095
+ return t.json(r);
18084
18096
  }
18085
18097
  ).openapi(
18086
18098
  U({
@@ -18115,10 +18127,10 @@ const E$ = qt.extend({
18115
18127
  }
18116
18128
  }),
18117
18129
  async (t) => {
18118
- const { "tenant-id": e } = t.req.valid("header"), { hook_id: n } = t.req.valid("param"), r = await t.env.data.hooks.get(e, n);
18119
- if (!r)
18130
+ const { hook_id: e } = t.req.valid("param"), n = await t.env.data.hooks.get(t.var.tenant_id, e);
18131
+ if (!n)
18120
18132
  throw new E(404, { message: "Hook not found" });
18121
- return t.json(r);
18133
+ return t.json(n);
18122
18134
  }
18123
18135
  ).openapi(
18124
18136
  U({
@@ -18145,8 +18157,11 @@ const E$ = qt.extend({
18145
18157
  }
18146
18158
  }),
18147
18159
  async (t) => {
18148
- const { "tenant-id": e } = t.req.valid("header"), { hook_id: n } = t.req.valid("param");
18149
- if (!await t.env.data.hooks.remove(e, n))
18160
+ const { hook_id: e } = t.req.valid("param");
18161
+ if (!await t.env.data.hooks.remove(
18162
+ t.var.tenant_id,
18163
+ e
18164
+ ))
18150
18165
  throw new E(404, { message: "Hook not found" });
18151
18166
  return t.text("OK");
18152
18167
  }
@@ -18183,20 +18198,20 @@ const E$ = qt.extend({
18183
18198
  }
18184
18199
  }),
18185
18200
  async (t) => {
18186
- const { "tenant-id": e } = t.req.valid("header"), {
18187
- page: n,
18188
- per_page: r,
18189
- include_totals: i = !1,
18190
- sort: s,
18191
- q: a
18192
- } = t.req.valid("query"), l = await t.env.data.connections.list(e, {
18193
- page: n,
18194
- per_page: r,
18195
- include_totals: i,
18196
- sort: bt(s),
18197
- q: a
18201
+ const {
18202
+ page: e,
18203
+ per_page: n,
18204
+ include_totals: r = !1,
18205
+ sort: i,
18206
+ q: s
18207
+ } = t.req.valid("query"), a = await t.env.data.connections.list(t.var.tenant_id, {
18208
+ page: e,
18209
+ per_page: n,
18210
+ include_totals: r,
18211
+ sort: bt(i),
18212
+ q: s
18198
18213
  });
18199
- return i ? t.json(l) : t.json(l.connections);
18214
+ return r ? t.json(a) : t.json(a.connections);
18200
18215
  }
18201
18216
  ).openapi(
18202
18217
  U({
@@ -18228,10 +18243,13 @@ const E$ = qt.extend({
18228
18243
  }
18229
18244
  }),
18230
18245
  async (t) => {
18231
- const { "tenant-id": e } = t.req.valid("header"), { id: n } = t.req.valid("param"), r = await t.env.data.connections.get(e, n);
18232
- if (!r)
18246
+ const { id: e } = t.req.valid("param"), n = await t.env.data.connections.get(
18247
+ t.var.tenant_id,
18248
+ e
18249
+ );
18250
+ if (!n)
18233
18251
  throw new E(404);
18234
- return t.json(r);
18252
+ return t.json(n);
18235
18253
  }
18236
18254
  ).openapi(
18237
18255
  U({
@@ -18258,8 +18276,11 @@ const E$ = qt.extend({
18258
18276
  }
18259
18277
  }),
18260
18278
  async (t) => {
18261
- const { "tenant-id": e } = t.req.valid("header"), { id: n } = t.req.valid("param");
18262
- if (!await t.env.data.connections.remove(e, n))
18279
+ const { id: e } = t.req.valid("param");
18280
+ if (!await t.env.data.connections.remove(
18281
+ t.var.tenant_id,
18282
+ e
18283
+ ))
18263
18284
  throw new E(404, {
18264
18285
  message: "Connection not found"
18265
18286
  });
@@ -18302,17 +18323,24 @@ const E$ = qt.extend({
18302
18323
  }
18303
18324
  }),
18304
18325
  async (t) => {
18305
- const { "tenant-id": e } = t.req.valid("header"), { id: n } = t.req.valid("param"), r = t.req.valid("json");
18306
- if (!await t.env.data.connections.update(e, n, r))
18326
+ const { id: e } = t.req.valid("param"), n = t.req.valid("json");
18327
+ if (!await t.env.data.connections.update(
18328
+ t.var.tenant_id,
18329
+ e,
18330
+ n
18331
+ ))
18307
18332
  throw new E(404, {
18308
18333
  message: "Connection not found"
18309
18334
  });
18310
- const s = await t.env.data.connections.get(e, n);
18311
- if (!s)
18335
+ const i = await t.env.data.connections.get(
18336
+ t.var.tenant_id,
18337
+ e
18338
+ );
18339
+ if (!i)
18312
18340
  throw new E(404, {
18313
18341
  message: "Connection not found"
18314
18342
  });
18315
- return t.json(s);
18343
+ return t.json(i);
18316
18344
  }
18317
18345
  ).openapi(
18318
18346
  U({
@@ -18348,14 +18376,14 @@ const E$ = qt.extend({
18348
18376
  }
18349
18377
  }),
18350
18378
  async (t) => {
18351
- const { "tenant-id": e } = t.req.valid("header"), n = t.req.valid("json"), r = {
18352
- ...n,
18353
- id: n.id || x$()
18354
- }, i = await t.env.data.connections.create(
18355
- e,
18356
- r
18379
+ const e = t.req.valid("json"), n = {
18380
+ ...e,
18381
+ id: e.id || x$()
18382
+ }, r = await t.env.data.connections.create(
18383
+ t.var.tenant_id,
18384
+ n
18357
18385
  );
18358
- return t.json(i, { status: 201 });
18386
+ return t.json(r, { status: 201 });
18359
18387
  }
18360
18388
  ), C$ = new be().openapi(
18361
18389
  U({
@@ -18384,8 +18412,10 @@ const E$ = qt.extend({
18384
18412
  }
18385
18413
  }),
18386
18414
  async (t) => {
18387
- const { "tenant-id": e } = t.req.valid("header"), n = await t.env.data.promptSettings.get(e);
18388
- return n ? t.json(n) : t.json(Ol.parse({}));
18415
+ const e = await t.env.data.promptSettings.get(
18416
+ t.var.tenant_id
18417
+ );
18418
+ return e ? t.json(e) : t.json(Ol.parse({}));
18389
18419
  }
18390
18420
  ).openapi(
18391
18421
  U({
@@ -18416,8 +18446,13 @@ const E$ = qt.extend({
18416
18446
  }
18417
18447
  }),
18418
18448
  async (t) => {
18419
- const { "tenant-id": e } = t.req.valid("header"), n = t.req.valid("json"), r = await t.env.data.promptSettings.get(e);
18420
- return Object.assign(r, n), await t.env.data.promptSettings.set(e, r), t.json(r);
18449
+ const e = t.req.valid("json"), n = await t.env.data.promptSettings.get(
18450
+ t.var.tenant_id
18451
+ );
18452
+ return Object.assign(n, e), await t.env.data.promptSettings.set(
18453
+ t.var.tenant_id,
18454
+ n
18455
+ ), t.json(n);
18421
18456
  }
18422
18457
  );
18423
18458
  let eg = !1;
@@ -18870,16 +18905,16 @@ function mf(t) {
18870
18905
  message: "Missing bearer token"
18871
18906
  });
18872
18907
  try {
18873
- const x = await Y$(e, b);
18874
- e.set("user_id", x.sub), e.set("user", x);
18875
- const C = x.permissions || [], O = ((d = x.scope) == null ? void 0 : d.split(" ")) || [];
18908
+ const A = await Y$(e, b);
18909
+ e.set("user_id", A.sub), e.set("user", A);
18910
+ const T = A.permissions || [], O = ((d = A.scope) == null ? void 0 : d.split(" ")) || [];
18876
18911
  if (p.length && !// Should we check both?
18877
18912
  (p.some(
18878
- (D) => C.includes(D)
18913
+ (D) => T.includes(D)
18879
18914
  ) || p.some((D) => O.includes(D))))
18880
18915
  throw new E(403, { message: "Unauthorized" });
18881
- } catch (x) {
18882
- throw x instanceof E ? x : new E(403, { message: "Invalid token" });
18916
+ } catch (A) {
18917
+ throw A instanceof E ? A : new E(403, { message: "Invalid token" });
18883
18918
  }
18884
18919
  }
18885
18920
  return await n();
@@ -18912,10 +18947,12 @@ const ex = new be().openapi(
18912
18947
  }
18913
18948
  }),
18914
18949
  async (t) => {
18915
- const { "tenant-id": e } = t.req.valid("header"), n = await t.env.data.emailProviders.get(e);
18916
- if (!n)
18950
+ const e = await t.env.data.emailProviders.get(
18951
+ t.var.tenant_id
18952
+ );
18953
+ if (!e)
18917
18954
  throw new E(404, { message: "Email provider not found" });
18918
- return t.json(n);
18955
+ return t.json(e);
18919
18956
  }
18920
18957
  ).openapi(
18921
18958
  U({
@@ -18946,8 +18983,11 @@ const ex = new be().openapi(
18946
18983
  }
18947
18984
  }),
18948
18985
  async (t) => {
18949
- const { "tenant-id": e } = t.req.valid("header"), n = t.req.valid("json");
18950
- return await t.env.data.emailProviders.create(e, n), t.text("OK", { status: 201 });
18986
+ const e = t.req.valid("json");
18987
+ return await t.env.data.emailProviders.create(
18988
+ t.var.tenant_id,
18989
+ e
18990
+ ), t.text("OK", { status: 201 });
18951
18991
  }
18952
18992
  ).openapi(
18953
18993
  U({
@@ -18978,8 +19018,8 @@ const ex = new be().openapi(
18978
19018
  }
18979
19019
  }),
18980
19020
  async (t) => {
18981
- const { "tenant-id": e } = t.req.valid("header"), n = t.req.valid("json");
18982
- return await t.env.data.emailProviders.update(e, n), t.text("OK");
19021
+ const e = t.req.valid("json");
19022
+ return await t.env.data.emailProviders.update(t.var.tenant_id, e), t.text("OK");
18983
19023
  }
18984
19024
  ), tx = new be().openapi(
18985
19025
  U({
@@ -19011,10 +19051,10 @@ const ex = new be().openapi(
19011
19051
  }
19012
19052
  }),
19013
19053
  async (t) => {
19014
- const { "tenant-id": e } = t.req.valid("header"), { id: n } = t.req.valid("param"), r = await t.env.data.sessions.get(e, n);
19015
- if (!r)
19054
+ const { id: e } = t.req.valid("param"), n = await t.env.data.sessions.get(t.var.tenant_id, e);
19055
+ if (!n)
19016
19056
  throw new E(404);
19017
- return t.json(r);
19057
+ return t.json(n);
19018
19058
  }
19019
19059
  ).openapi(
19020
19060
  U({
@@ -19041,8 +19081,8 @@ const ex = new be().openapi(
19041
19081
  }
19042
19082
  }),
19043
19083
  async (t) => {
19044
- const { "tenant-id": e } = t.req.valid("header"), { id: n } = t.req.valid("param");
19045
- if (!await t.env.data.sessions.remove(e, n))
19084
+ const { id: e } = t.req.valid("param");
19085
+ if (!await t.env.data.sessions.remove(t.var.tenant_id, e))
19046
19086
  throw new E(404, {
19047
19087
  message: "Session not found"
19048
19088
  });
@@ -19073,8 +19113,8 @@ const ex = new be().openapi(
19073
19113
  }
19074
19114
  }),
19075
19115
  async (t) => {
19076
- const { "tenant-id": e } = t.req.valid("header"), { id: n } = t.req.valid("param");
19077
- if (!await t.env.data.sessions.update(e, n, {
19116
+ const { id: e } = t.req.valid("param");
19117
+ if (!await t.env.data.sessions.update(t.var.tenant_id, e, {
19078
19118
  revoked_at: (/* @__PURE__ */ new Date()).toDateString()
19079
19119
  }))
19080
19120
  throw new E(404, {
@@ -19112,10 +19152,13 @@ const ex = new be().openapi(
19112
19152
  }
19113
19153
  }),
19114
19154
  async (t) => {
19115
- const { "tenant-id": e } = t.req.valid("header"), { id: n } = t.req.valid("param"), r = await t.env.data.refreshTokens.get(e, n);
19116
- if (!r)
19155
+ const { id: e } = t.req.valid("param"), n = await t.env.data.refreshTokens.get(
19156
+ t.var.tenant_id,
19157
+ e
19158
+ );
19159
+ if (!n)
19117
19160
  throw new E(404);
19118
- return t.json(r);
19161
+ return t.json(n);
19119
19162
  }
19120
19163
  ).openapi(
19121
19164
  U({
@@ -19142,8 +19185,11 @@ const ex = new be().openapi(
19142
19185
  }
19143
19186
  }),
19144
19187
  async (t) => {
19145
- const { "tenant-id": e } = t.req.valid("header"), { id: n } = t.req.valid("param");
19146
- if (!await t.env.data.refreshTokens.remove(e, n))
19188
+ const { id: e } = t.req.valid("param");
19189
+ if (!await t.env.data.refreshTokens.remove(
19190
+ t.var.tenant_id,
19191
+ e
19192
+ ))
19147
19193
  throw new E(404, {
19148
19194
  message: "Session not found"
19149
19195
  });
@@ -19177,8 +19223,8 @@ const ex = new be().openapi(
19177
19223
  }
19178
19224
  }),
19179
19225
  async (t) => {
19180
- const { "tenant-id": e } = t.req.valid("header"), n = await t.env.data.customDomains.list(e);
19181
- return t.json(n);
19226
+ const e = await t.env.data.customDomains.list(t.var.tenant_id);
19227
+ return t.json(e);
19182
19228
  }
19183
19229
  ).openapi(
19184
19230
  U({
@@ -19210,10 +19256,13 @@ const ex = new be().openapi(
19210
19256
  }
19211
19257
  }),
19212
19258
  async (t) => {
19213
- const { "tenant-id": e } = t.req.valid("header"), { id: n } = t.req.valid("param"), r = await t.env.data.customDomains.get(e, n);
19214
- if (!r)
19259
+ const { id: e } = t.req.valid("param"), n = await t.env.data.customDomains.get(
19260
+ t.var.tenant_id,
19261
+ e
19262
+ );
19263
+ if (!n)
19215
19264
  throw new E(404);
19216
- return t.json(r);
19265
+ return t.json(n);
19217
19266
  }
19218
19267
  ).openapi(
19219
19268
  U({
@@ -19240,8 +19289,11 @@ const ex = new be().openapi(
19240
19289
  }
19241
19290
  }),
19242
19291
  async (t) => {
19243
- const { "tenant-id": e } = t.req.valid("header"), { id: n } = t.req.valid("param");
19244
- if (!await t.env.data.customDomains.remove(e, n))
19292
+ const { id: e } = t.req.valid("param");
19293
+ if (!await t.env.data.customDomains.remove(
19294
+ t.var.tenant_id,
19295
+ e
19296
+ ))
19245
19297
  throw new E(404, {
19246
19298
  message: "Custom domain not found"
19247
19299
  });
@@ -19284,17 +19336,20 @@ const ex = new be().openapi(
19284
19336
  }
19285
19337
  }),
19286
19338
  async (t) => {
19287
- const { "tenant-id": e } = t.req.valid("header"), { id: n } = t.req.valid("param"), r = t.req.valid("json");
19339
+ const { id: e } = t.req.valid("param"), n = t.req.valid("json");
19288
19340
  if (!await t.env.data.customDomains.update(
19341
+ t.var.tenant_id,
19289
19342
  e,
19290
- n,
19291
- r
19343
+ n
19292
19344
  ))
19293
19345
  throw new E(404);
19294
- const s = await t.env.data.customDomains.get(e, n);
19295
- if (!s)
19346
+ const i = await t.env.data.customDomains.get(
19347
+ t.var.tenant_id,
19348
+ e
19349
+ );
19350
+ if (!i)
19296
19351
  throw new E(404);
19297
- return t.json(s);
19352
+ return t.json(i);
19298
19353
  }
19299
19354
  ).openapi(
19300
19355
  U({
@@ -19330,11 +19385,11 @@ const ex = new be().openapi(
19330
19385
  }
19331
19386
  }),
19332
19387
  async (t) => {
19333
- const { "tenant-id": e } = t.req.valid("header"), n = t.req.valid("json"), r = await t.env.data.customDomains.create(
19334
- e,
19335
- n
19388
+ const e = t.req.valid("json"), n = await t.env.data.customDomains.create(
19389
+ t.var.tenant_id,
19390
+ e
19336
19391
  );
19337
- return t.json(r, { status: 201 });
19392
+ return t.json(n, { status: 201 });
19338
19393
  }
19339
19394
  ).openapi(
19340
19395
  U({
@@ -19381,11 +19436,11 @@ function dl(t, e) {
19381
19436
  typeof l == "function" ? s[a] = async (...u) => {
19382
19437
  const d = performance.now();
19383
19438
  try {
19384
- const p = await l(...u), g = performance.now() - d, b = t.res.headers.get("Server-Timing") || "", x = b ? `${b}, ${r}-${a};dur=${g.toFixed(2)}` : `${r}-${a};dur=${g.toFixed(2)}`;
19385
- return t.res.headers.set("Server-Timing", x), p;
19439
+ const p = await l(...u), g = performance.now() - d, b = t.res.headers.get("Server-Timing") || "", A = b ? `${b}, ${r}-${a};dur=${g.toFixed(2)}` : `${r}-${a};dur=${g.toFixed(2)}`;
19440
+ return t.res.headers.set("Server-Timing", A), p;
19386
19441
  } catch (p) {
19387
- const g = performance.now() - d, b = t.res.headers.get("Server-Timing") || "", x = b ? `${b}, ${r}-${a}-error;dur=${g.toFixed(2)}` : `${r}-${a}-error;dur=${g.toFixed(2)}`;
19388
- throw t.res.headers.set("Server-Timing", x), p;
19442
+ const g = performance.now() - d, b = t.res.headers.get("Server-Timing") || "", A = b ? `${b}, ${r}-${a}-error;dur=${g.toFixed(2)}` : `${r}-${a}-error;dur=${g.toFixed(2)}`;
19443
+ throw t.res.headers.set("Server-Timing", A), p;
19389
19444
  }
19390
19445
  } : s[a] = l;
19391
19446
  n[r] = s;
@@ -19479,21 +19534,21 @@ function gl(t, e) {
19479
19534
  keyPrefix: l
19480
19535
  } = e, u = new Set(s), d = a.length === 0, p = new Set(a), h = {};
19481
19536
  for (const [g, b] of Object.entries(t)) {
19482
- const x = d || p.has(g), C = {};
19537
+ const A = d || p.has(g), T = {};
19483
19538
  for (const [O, D] of Object.entries(
19484
19539
  b
19485
19540
  ))
19486
19541
  if (typeof D == "function") {
19487
- if (!x) {
19488
- C[O] = D;
19542
+ if (!A) {
19543
+ T[O] = D;
19489
19544
  continue;
19490
19545
  }
19491
- const A = `${g}:${O}`;
19492
- if (u.has(A)) {
19493
- C[O] = D;
19546
+ const x = `${g}:${O}`;
19547
+ if (u.has(x)) {
19548
+ T[O] = D;
19494
19549
  continue;
19495
19550
  }
19496
- const z = i[A] ?? r, q = [
19551
+ const z = i[x] ?? r, q = [
19497
19552
  "create",
19498
19553
  "update",
19499
19554
  "remove",
@@ -19501,7 +19556,7 @@ function gl(t, e) {
19501
19556
  "set",
19502
19557
  "used"
19503
19558
  ].includes(O);
19504
- C[O] = async (...M) => {
19559
+ T[O] = async (...M) => {
19505
19560
  if (q)
19506
19561
  return await D.apply(b, M);
19507
19562
  const K = ox(
@@ -19530,8 +19585,8 @@ function gl(t, e) {
19530
19585
  return Z;
19531
19586
  };
19532
19587
  } else
19533
- C[O] = D;
19534
- h[g] = C;
19588
+ T[O] = D;
19589
+ h[g] = T;
19535
19590
  }
19536
19591
  return h;
19537
19592
  }
@@ -19833,14 +19888,14 @@ const cx = qt.extend({
19833
19888
  }
19834
19889
  }),
19835
19890
  async (t) => {
19836
- const { page: e, per_page: n, include_totals: r, sort: i, q: s } = t.req.valid("query"), { "tenant-id": a } = t.req.valid("header"), l = await t.env.data.roles.list(a, {
19891
+ const { page: e, per_page: n, include_totals: r, sort: i, q: s } = t.req.valid("query"), a = await t.env.data.roles.list(t.var.tenant_id, {
19837
19892
  page: e,
19838
19893
  per_page: n,
19839
19894
  include_totals: r,
19840
19895
  sort: bt(i),
19841
19896
  q: s
19842
19897
  });
19843
- return r ? t.json(l) : t.json(l.roles);
19898
+ return r ? t.json(a) : t.json(a.roles);
19844
19899
  }
19845
19900
  ).openapi(
19846
19901
  U({
@@ -19872,10 +19927,10 @@ const cx = qt.extend({
19872
19927
  }
19873
19928
  }),
19874
19929
  async (t) => {
19875
- const { id: e } = t.req.valid("param"), { "tenant-id": n } = t.req.valid("header"), r = await t.env.data.roles.get(n, e);
19876
- if (!r)
19930
+ const { id: e } = t.req.valid("param"), n = await t.env.data.roles.get(t.var.tenant_id, e);
19931
+ if (!n)
19877
19932
  throw new E(404);
19878
- return t.json(r);
19933
+ return t.json(n);
19879
19934
  }
19880
19935
  ).openapi(
19881
19936
  U({
@@ -19911,8 +19966,8 @@ const cx = qt.extend({
19911
19966
  }
19912
19967
  }),
19913
19968
  async (t) => {
19914
- const { "tenant-id": e } = t.req.valid("header"), n = t.req.valid("json"), r = await t.env.data.roles.create(e, n);
19915
- return t.json(r, { status: 201 });
19969
+ const e = t.req.valid("json"), n = await t.env.data.roles.create(t.var.tenant_id, e);
19970
+ return t.json(n, { status: 201 });
19916
19971
  }
19917
19972
  ).openapi(
19918
19973
  U({
@@ -19951,11 +20006,15 @@ const cx = qt.extend({
19951
20006
  }
19952
20007
  }),
19953
20008
  async (t) => {
19954
- const { id: e } = t.req.valid("param"), { "tenant-id": n } = t.req.valid("header"), r = t.req.valid("json");
19955
- if (!await t.env.data.roles.update(n, e, r))
20009
+ const { id: e } = t.req.valid("param"), n = t.req.valid("json");
20010
+ if (!await t.env.data.roles.update(
20011
+ t.var.tenant_id,
20012
+ e,
20013
+ n
20014
+ ))
19956
20015
  throw new E(404);
19957
- const s = await t.env.data.roles.get(n, e);
19958
- return t.json(s);
20016
+ const i = await t.env.data.roles.get(t.var.tenant_id, e);
20017
+ return t.json(i);
19959
20018
  }
19960
20019
  ).openapi(
19961
20020
  U({
@@ -19982,8 +20041,8 @@ const cx = qt.extend({
19982
20041
  }
19983
20042
  }),
19984
20043
  async (t) => {
19985
- const { id: e } = t.req.valid("param"), { "tenant-id": n } = t.req.valid("header");
19986
- if (!await t.env.data.roles.remove(n, e))
20044
+ const { id: e } = t.req.valid("param");
20045
+ if (!await t.env.data.roles.remove(t.var.tenant_id, e))
19987
20046
  throw new E(404);
19988
20047
  return t.text("OK");
19989
20048
  }
@@ -20018,23 +20077,23 @@ const cx = qt.extend({
20018
20077
  }
20019
20078
  }),
20020
20079
  async (t) => {
20021
- const { id: e } = t.req.valid("param"), { "tenant-id": n } = t.req.valid("header"), { page: r, per_page: i, sort: s, q: a } = t.req.valid("query");
20022
- if (!await t.env.data.roles.get(n, e))
20080
+ const { id: e } = t.req.valid("param"), { page: n, per_page: r, sort: i, q: s } = t.req.valid("query");
20081
+ if (!await t.env.data.roles.get(t.var.tenant_id, e))
20023
20082
  throw new E(404, {
20024
20083
  message: "Role not found"
20025
20084
  });
20026
- const u = await t.env.data.rolePermissions.list(
20027
- n,
20085
+ const l = await t.env.data.rolePermissions.list(
20086
+ t.var.tenant_id,
20028
20087
  e,
20029
20088
  {
20030
- page: r,
20031
- per_page: i,
20089
+ page: n,
20090
+ per_page: r,
20032
20091
  include_totals: !1,
20033
- sort: bt(s),
20034
- q: a
20092
+ sort: bt(i),
20093
+ q: s
20035
20094
  }
20036
20095
  );
20037
- return t.json(u);
20096
+ return t.json(l);
20038
20097
  }
20039
20098
  ).openapi(
20040
20099
  U({
@@ -20075,18 +20134,18 @@ const cx = qt.extend({
20075
20134
  }
20076
20135
  }),
20077
20136
  async (t) => {
20078
- const { id: e } = t.req.valid("param"), { "tenant-id": n } = t.req.valid("header"), { permissions: r } = t.req.valid("json");
20079
- if (!await t.env.data.roles.get(n, e))
20137
+ const { id: e } = t.req.valid("param"), { permissions: n } = t.req.valid("json");
20138
+ if (!await t.env.data.roles.get(t.var.tenant_id, e))
20080
20139
  throw new E(404, {
20081
20140
  message: "Role not found"
20082
20141
  });
20083
20142
  if (!await t.env.data.rolePermissions.assign(
20084
- n,
20143
+ t.var.tenant_id,
20085
20144
  e,
20086
- r.map((a) => ({
20145
+ n.map((s) => ({
20087
20146
  role_id: e,
20088
- resource_server_identifier: a.resource_server_identifier,
20089
- permission_name: a.permission_name
20147
+ resource_server_identifier: s.resource_server_identifier,
20148
+ permission_name: s.permission_name
20090
20149
  }))
20091
20150
  ))
20092
20151
  throw new E(500, {
@@ -20136,15 +20195,15 @@ const cx = qt.extend({
20136
20195
  }
20137
20196
  }),
20138
20197
  async (t) => {
20139
- const { id: e } = t.req.valid("param"), { "tenant-id": n } = t.req.valid("header"), { permissions: r } = t.req.valid("json");
20140
- if (!await t.env.data.roles.get(n, e))
20198
+ const { id: e } = t.req.valid("param"), { permissions: n } = t.req.valid("json");
20199
+ if (!await t.env.data.roles.get(t.var.tenant_id, e))
20141
20200
  throw new E(404, {
20142
20201
  message: "Role not found"
20143
20202
  });
20144
20203
  if (!await t.env.data.rolePermissions.remove(
20145
- n,
20204
+ t.var.tenant_id,
20146
20205
  e,
20147
- r
20206
+ n
20148
20207
  ))
20149
20208
  throw new E(500, {
20150
20209
  message: "Failed to remove permissions from role"
@@ -20440,13 +20499,13 @@ const cx = qt.extend({
20440
20499
  subject_type: p
20441
20500
  } = t.req.valid("query"), h = [];
20442
20501
  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}`);
20443
- const g = h.length > 0 ? h.join(" AND ") : void 0, b = a ?? r, x = await t.env.data.clientGrants.list(e, {
20502
+ const g = h.length > 0 ? h.join(" AND ") : void 0, b = a ?? r, A = await t.env.data.clientGrants.list(e, {
20444
20503
  page: n,
20445
20504
  per_page: b,
20446
20505
  include_totals: i,
20447
20506
  q: g
20448
20507
  });
20449
- return i ? t.json(x) : t.json(x.client_grants);
20508
+ return i ? t.json(A) : t.json(A.client_grants);
20450
20509
  }
20451
20510
  ).openapi(
20452
20511
  U({
@@ -21463,8 +21522,8 @@ class Tx {
21463
21522
  }
21464
21523
  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];
21465
21524
  for (let d = 0; d < 64; d++) {
21466
- const p = (An(s, 6) ^ An(s, 11) ^ An(s, 25)) >>> 0, h = (s & a ^ ~s & l) >>> 0, g = u + p + h + Ix[d] + this.w[d] | 0, b = (An(e, 2) ^ An(e, 13) ^ An(e, 22)) >>> 0, x = (e & n ^ e & r ^ n & r) >>> 0, C = b + x | 0;
21467
- u = l, l = a, a = s, s = i + g | 0, i = r, r = n, n = e, e = g + C | 0;
21525
+ const p = (An(s, 6) ^ An(s, 11) ^ An(s, 25)) >>> 0, h = (s & a ^ ~s & l) >>> 0, g = u + p + h + Ix[d] + this.w[d] | 0, b = (An(e, 2) ^ An(e, 13) ^ An(e, 22)) >>> 0, A = (e & n ^ e & r ^ n & r) >>> 0, T = b + A | 0;
21526
+ u = l, l = a, a = s, s = i + g | 0, i = r, r = n, n = e, e = g + T | 0;
21468
21527
  }
21469
21528
  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;
21470
21529
  }
@@ -22339,7 +22398,7 @@ async function ug(t, e, n, r) {
22339
22398
  });
22340
22399
  }
22341
22400
  async function dg(t, { code: e, state: n }) {
22342
- var x;
22401
+ var A;
22343
22402
  const { env: r } = t, i = await r.data.codes.get(
22344
22403
  t.var.tenant_id || "",
22345
22404
  n,
@@ -22354,9 +22413,9 @@ async function dg(t, { code: e, state: n }) {
22354
22413
  if (!s)
22355
22414
  throw new E(403, { message: "Session not found" });
22356
22415
  if (s.authorization_url) {
22357
- const C = new URL(s.authorization_url).hostname, O = t.var.host || "";
22358
- if (C !== O && C) {
22359
- const D = new URL(`https://${C}/callback`);
22416
+ const T = new URL(s.authorization_url).hostname, O = t.var.host || "";
22417
+ if (T !== O && T) {
22418
+ const D = new URL(`https://${T}/callback`);
22360
22419
  return D.searchParams.set("state", n), D.searchParams.set("code", e), new Response("Redirecting", {
22361
22420
  status: 307,
22362
22421
  // Temporary Redirect - preserves the HTTP method
@@ -22372,21 +22431,21 @@ async function dg(t, { code: e, state: n }) {
22372
22431
  );
22373
22432
  t.set("client_id", a.client_id), t.set("tenant_id", a.tenant.id);
22374
22433
  const l = a.connections.find(
22375
- (C) => C.id === i.connection_id
22434
+ (T) => T.id === i.connection_id
22376
22435
  );
22377
22436
  if (!l) {
22378
- const C = Ve(t, {
22437
+ const T = Ve(t, {
22379
22438
  type: qe.FAILED_LOGIN,
22380
22439
  description: "Connection not found"
22381
22440
  });
22382
- throw await r.data.logs.create(a.tenant.id, C), new E(403, { message: "Connection not found" });
22441
+ throw await r.data.logs.create(a.tenant.id, T), new E(403, { message: "Connection not found" });
22383
22442
  }
22384
22443
  if (t.set("connection", l.name), !s.authParams.redirect_uri) {
22385
- const C = Ve(t, {
22444
+ const T = Ve(t, {
22386
22445
  type: qe.FAILED_LOGIN,
22387
22446
  description: "Redirect URI not defined"
22388
22447
  });
22389
- throw await r.data.logs.create(a.tenant.id, C), new E(403, { message: "Redirect URI not defined" });
22448
+ throw await r.data.logs.create(a.tenant.id, T), new E(403, { message: "Redirect URI not defined" });
22390
22449
  }
22391
22450
  const d = await _1(t, l.strategy).validateAuthorizationCodeAndGetUser(
22392
22451
  t,
@@ -22395,7 +22454,7 @@ async function dg(t, { code: e, state: n }) {
22395
22454
  i.code_verifier
22396
22455
  ), { sub: p, ...h } = d;
22397
22456
  t.set("user_id", p);
22398
- const g = ((x = d.email) == null ? void 0 : x.toLocaleLowerCase()) || `${l.name}.${p}@${new URL(t.env.ISSUER).hostname}`;
22457
+ const g = ((A = d.email) == null ? void 0 : A.toLocaleLowerCase()) || `${l.name}.${p}@${new URL(t.env.ISSUER).hostname}`;
22399
22458
  t.set("username", g);
22400
22459
  const b = await wc(t, {
22401
22460
  client: a,
@@ -23832,8 +23891,8 @@ var eA = ";ext=", fi = function(e) {
23832
23891
  return "([".concat(gn, "]{1,").concat(e, "})");
23833
23892
  };
23834
23893
  function x1(t) {
23835
- 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 = eA + fi(e), x = s + u + a + fi(e) + l, C = s + d + a + fi(r) + l, O = p + fi(i) + "#", D = h + g + a + fi(n) + l, A = h + "(?:,)+" + a + fi(r) + l;
23836
- return b + "|" + x + "|" + C + "|" + O + "|" + D + "|" + A;
23894
+ 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 = eA + fi(e), A = s + u + a + fi(e) + l, T = s + d + a + fi(r) + l, O = p + fi(i) + "#", D = h + g + a + fi(n) + l, x = h + "(?:,)+" + a + fi(r) + l;
23895
+ return b + "|" + A + "|" + T + "|" + O + "|" + D + "|" + x;
23837
23896
  }
23838
23897
  var tA = "[" + gn + "]{" + xf + "}", nA = "[" + Af + "]{0,1}(?:[" + rc + "]*[" + gn + "]){3,}[" + rc + gn + "]*", rA = new RegExp("^[" + Af + "]{0,1}(?:[" + rc + "]*[" + gn + "]){1,2}$", "i"), iA = nA + // Phone number extensions
23839
23898
  "(?:" + x1() + ")?", sA = new RegExp(
@@ -24471,16 +24530,16 @@ function eE(t, e, n) {
24471
24530
  var b = new wA(p, d, n.metadata);
24472
24531
  return u && (b.country = u), g && (b.carrierCode = g), s && (b.ext = s), b.__countryCallingCodeSource = h, b;
24473
24532
  }
24474
- var x = (e.extended ? n.hasSelectedNumberingPlan() : u) ? er(d, n.nationalNumberPattern()) : !1;
24533
+ var A = (e.extended ? n.hasSelectedNumberingPlan() : u) ? er(d, n.nationalNumberPattern()) : !1;
24475
24534
  return e.extended ? {
24476
24535
  country: u,
24477
24536
  countryCallingCode: p,
24478
24537
  carrierCode: g,
24479
- valid: x,
24480
- possible: x ? !0 : !!(e.extended === !0 && n.possibleLengths() && b1(d, n)),
24538
+ valid: A,
24539
+ possible: A ? !0 : !!(e.extended === !0 && n.possibleLengths() && b1(d, n)),
24481
24540
  phone: d,
24482
24541
  ext: s
24483
- } : x ? rE(u, d, s) : {};
24542
+ } : A ? rE(u, d, s) : {};
24484
24543
  }
24485
24544
  function tE(t, e, n) {
24486
24545
  if (t) {
@@ -24844,7 +24903,7 @@ async function k1(t, {
24844
24903
  throw new ti(
24845
24904
  `${ft(t.env)}invalid-session?state=${b.id}`
24846
24905
  );
24847
- const x = await wc(t, {
24906
+ const A = await wc(t, {
24848
24907
  client: p,
24849
24908
  username: d,
24850
24909
  provider: u,
@@ -24853,7 +24912,7 @@ async function k1(t, {
24853
24912
  ip: t.var.ip
24854
24913
  });
24855
24914
  return await h.data.codes.used(p.tenant.id, r), {
24856
- user: x,
24915
+ user: A,
24857
24916
  client: p,
24858
24917
  loginSession: b,
24859
24918
  session_id: b.session_id,
@@ -25575,7 +25634,7 @@ const TE = new be().openapi(
25575
25634
  useragent: p,
25576
25635
  auth0Client: g
25577
25636
  }
25578
- ), x = await n.data.codes.create(l.tenant.id, {
25637
+ ), A = await n.data.codes.create(l.tenant.id, {
25579
25638
  code_id: Ar(),
25580
25639
  code_type: "otp",
25581
25640
  login_id: b.id,
@@ -25584,14 +25643,14 @@ const TE = new be().openapi(
25584
25643
  });
25585
25644
  return i === "link" ? await If(t, {
25586
25645
  to: u,
25587
- code: x.code_id,
25646
+ code: A.code_id,
25588
25647
  authParams: {
25589
25648
  ...s,
25590
25649
  client_id: r
25591
25650
  }
25592
25651
  }) : await Tf(t, {
25593
25652
  to: u,
25594
- code: x.code_id
25653
+ code: A.code_id
25595
25654
  }), t.html("OK");
25596
25655
  }
25597
25656
  ).openapi(
@@ -25682,7 +25741,7 @@ const TE = new be().openapi(
25682
25741
  const q = z;
25683
25742
  "message" in q && typeof q.message == "string" && (b = q.message);
25684
25743
  }
25685
- const x = t.get("ip"), C = t.get("useragent"), O = t.get("auth0_client"), D = Qn(O), A = await e.data.loginSessions.create(
25744
+ const A = t.get("ip"), T = t.get("useragent"), O = t.get("auth0_client"), D = Qn(O), x = await e.data.loginSessions.create(
25686
25745
  h.tenant.id,
25687
25746
  {
25688
25747
  authParams: {
@@ -25691,13 +25750,13 @@ const TE = new be().openapi(
25691
25750
  },
25692
25751
  expires_at: new Date(Date.now() + ta).toISOString(),
25693
25752
  csrf_token: We(),
25694
- ip: x,
25695
- useragent: C,
25753
+ ip: A,
25754
+ useragent: T,
25696
25755
  auth0Client: D
25697
25756
  }
25698
25757
  );
25699
25758
  return t.redirect(
25700
- `${ft(t.env)}invalid-session?state=${A.id}&error=${encodeURIComponent(b)}`,
25759
+ `${ft(t.env)}invalid-session?state=${x.id}&error=${encodeURIComponent(b)}`,
25701
25760
  302
25702
25761
  );
25703
25762
  }
@@ -26085,7 +26144,7 @@ async function PE({
26085
26144
  response_type: p
26086
26145
  }) {
26087
26146
  const { env: h } = t, g = new URL(r), b = `${g.protocol}//${g.host}`;
26088
- async function x(K = "Login required") {
26147
+ async function A(K = "Login required") {
26089
26148
  const W = Ve(t, {
26090
26149
  type: qe.FAILED_SILENT_AUTH,
26091
26150
  description: K
@@ -26102,11 +26161,11 @@ async function PE({
26102
26161
  );
26103
26162
  }
26104
26163
  if (!n || (n == null ? void 0 : n.expires_at) && new Date(n.expires_at) < /* @__PURE__ */ new Date() || (n == null ? void 0 : n.idle_expires_at) && new Date(n.idle_expires_at) < /* @__PURE__ */ new Date())
26105
- return x();
26164
+ return A();
26106
26165
  t.set("user_id", n.user_id);
26107
26166
  const O = await h.data.users.get(e.tenant.id, n.user_id);
26108
26167
  if (!O)
26109
- return console.error("User not found", n.user_id), x("User not found");
26168
+ return console.error("User not found", n.user_id), A("User not found");
26110
26169
  t.set("username", O.email), t.set("connection", O.connection);
26111
26170
  const D = {
26112
26171
  client: e,
@@ -26123,7 +26182,7 @@ async function PE({
26123
26182
  },
26124
26183
  user: O,
26125
26184
  session_id: n.id
26126
- }, A = p === cn.CODE ? await i_(t, {
26185
+ }, x = p === cn.CODE ? await i_(t, {
26127
26186
  user: O,
26128
26187
  client: e,
26129
26188
  authParams: D.authParams,
@@ -26157,7 +26216,7 @@ async function PE({
26157
26216
  Tu(
26158
26217
  b,
26159
26218
  JSON.stringify({
26160
- ...A,
26219
+ ...x,
26161
26220
  state: i
26162
26221
  })
26163
26222
  ),
@@ -26253,11 +26312,11 @@ const BE = ["email", "sms", "Username-Password-Authentication"], LE = new be().o
26253
26312
  response_mode: h,
26254
26313
  code_challenge: g,
26255
26314
  code_challenge_method: b,
26256
- prompt: x,
26257
- login_ticket: C,
26315
+ prompt: A,
26316
+ login_ticket: T,
26258
26317
  realm: O,
26259
26318
  auth0Client: D,
26260
- login_hint: A,
26319
+ login_hint: x,
26261
26320
  ui_locales: z,
26262
26321
  organization: q
26263
26322
  } = t.req.valid("query");
@@ -26273,12 +26332,12 @@ const BE = ["email", "sms", "Username-Password-Authentication"], LE = new be().o
26273
26332
  vendor_id: r,
26274
26333
  audience: l,
26275
26334
  nonce: u,
26276
- prompt: x,
26335
+ prompt: A,
26277
26336
  response_type: p,
26278
26337
  response_mode: h,
26279
26338
  code_challenge: g,
26280
26339
  code_challenge_method: b,
26281
- username: A,
26340
+ username: x,
26282
26341
  ui_locales: z,
26283
26342
  organization: q
26284
26343
  }, W = t.req.header("origin");
@@ -26299,7 +26358,7 @@ const BE = ["email", "sms", "Username-Password-Authentication"], LE = new be().o
26299
26358
  M.tenant.id,
26300
26359
  t.req.header("cookie")
26301
26360
  ), Y = Z ? await e.data.sessions.get(M.tenant.id, Z) : void 0, Se = Y && !Y.revoked_at ? Y : void 0;
26302
- if (x == "none") {
26361
+ if (A == "none") {
26303
26362
  if (!p)
26304
26363
  throw new E(400, {
26305
26364
  message: "Missing response_type"
@@ -26327,11 +26386,11 @@ const BE = ["email", "sms", "Username-Password-Authentication"], LE = new be().o
26327
26386
  );
26328
26387
  if (d && d !== "email")
26329
26388
  return ug(t, M, d, K);
26330
- if (C) {
26389
+ if (T) {
26331
26390
  const F = await jE(
26332
26391
  t,
26333
26392
  M.tenant.id,
26334
- C,
26393
+ T,
26335
26394
  K,
26336
26395
  O
26337
26396
  );
@@ -26344,7 +26403,7 @@ const BE = ["email", "sms", "Username-Password-Authentication"], LE = new be().o
26344
26403
  authParams: K,
26345
26404
  session: Se || void 0,
26346
26405
  connection: d,
26347
- login_hint: A
26406
+ login_hint: x
26348
26407
  });
26349
26408
  return j instanceof Response ? j : t.json(j);
26350
26409
  }
@@ -26400,8 +26459,8 @@ const BE = ["email", "sms", "Username-Password-Authentication"], LE = new be().o
26400
26459
  message: `Origin ${u} not allowed`
26401
26460
  });
26402
26461
  if (l.redirect_uri) {
26403
- const A = a.callbacks || [];
26404
- if (t.var.host && (A.push(`${pl(t.env)}/*`), A.push(`${ft(t.env)}/*`)), !wf(l.redirect_uri, A, {
26462
+ const x = a.callbacks || [];
26463
+ if (t.var.host && (x.push(`${pl(t.env)}/*`), x.push(`${ft(t.env)}/*`)), !wf(l.redirect_uri, x, {
26405
26464
  allowPathWildcards: !0
26406
26465
  }))
26407
26466
  throw new E(400, {
@@ -26413,7 +26472,7 @@ const BE = ["email", "sms", "Username-Password-Authentication"], LE = new be().o
26413
26472
  t.req.header("cookie")
26414
26473
  ), 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);
26415
26474
  t.var.custom_domain && (g.hostname = t.var.custom_domain);
26416
- const { ip: b, auth0_client: x, useragent: C } = t.var, O = Qn(x), D = await e.data.loginSessions.create(
26475
+ const { ip: b, auth0_client: A, useragent: T } = t.var, O = Qn(A), D = await e.data.loginSessions.create(
26417
26476
  a.tenant.id,
26418
26477
  {
26419
26478
  expires_at: new Date(
@@ -26423,7 +26482,7 @@ const BE = ["email", "sms", "Username-Password-Authentication"], LE = new be().o
26423
26482
  csrf_token: We(),
26424
26483
  authorization_url: g.toString(),
26425
26484
  ip: b,
26426
- useragent: C,
26485
+ useragent: T,
26427
26486
  auth0Client: O
26428
26487
  }
26429
26488
  );
@@ -26447,8 +26506,8 @@ const BE = ["email", "sms", "Username-Password-Authentication"], LE = new be().o
26447
26506
  );
26448
26507
  return z.searchParams.set("state", D.id), t.redirect(z.toString());
26449
26508
  }
26450
- const A = new URL("/u/account", t.req.url);
26451
- return A.searchParams.set("state", D.id), t.redirect(A.toString());
26509
+ const x = new URL("/u/account", t.req.url);
26510
+ return x.searchParams.set("state", D.id), t.redirect(x.toString());
26452
26511
  }
26453
26512
  return t.redirect(
26454
26513
  `${ft(t.env)}login/identifier?state=${encodeURIComponent(D.id)}`
@@ -26608,8 +26667,8 @@ var Df = (t, ...e) => {
26608
26667
  else {
26609
26668
  const h = [];
26610
26669
  p = l.map(([g, , b]) => {
26611
- let x = h.indexOf(b);
26612
- return x === -1 && (h.push(b), x = h.length - 1), [g, x];
26670
+ let A = h.indexOf(b);
26671
+ return A === -1 && (h.push(b), A = h.length - 1), [g, A];
26613
26672
  }).sort((g, b) => g[1] - b[1]).map(([g]) => g);
26614
26673
  }
26615
26674
  p.forEach((h) => {
@@ -27325,10 +27384,10 @@ const u8 = (t, e) => {
27325
27384
  email: i,
27326
27385
  client: s
27327
27386
  }) => {
27328
- 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, x = l || u;
27329
- let C = "text", O = "username";
27387
+ 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, A = l || u;
27388
+ let T = "text", O = "username";
27330
27389
  const D = l && u ? "email_or_phone_placeholder" : l ? "email_placeholder" : "phone_placeholder";
27331
- let A = B.t(
27390
+ let x = B.t(
27332
27391
  D,
27333
27392
  l && u ? "Email or Phone Number" : l ? "Email Address" : "Phone Number"
27334
27393
  );
@@ -27348,13 +27407,13 @@ const u8 = (t, e) => {
27348
27407
  defaultValue: "Sign in with your {{authMethod}}"
27349
27408
  }) }),
27350
27409
  /* @__PURE__ */ _("div", { className: "flex flex-1 flex-col justify-center", children: [
27351
- x && /* @__PURE__ */ _(Ln, { className: "mb-7", children: [
27410
+ A && /* @__PURE__ */ _(Ln, { className: "mb-7", children: [
27352
27411
  /* @__PURE__ */ _(
27353
27412
  "input",
27354
27413
  {
27355
- type: C,
27414
+ type: T,
27356
27415
  name: O,
27357
- placeholder: A,
27416
+ placeholder: x,
27358
27417
  className: mn(
27359
27418
  "mb-2 w-full rounded-lg border bg-gray-100 px-4 py-5 text-base placeholder:text-gray-300 dark:bg-gray-600 md:text-base",
27360
27419
  {
@@ -27372,7 +27431,7 @@ const u8 = (t, e) => {
27372
27431
  /* @__PURE__ */ _(Ge, { className: "text-xs", name: "arrow-right" })
27373
27432
  ] })
27374
27433
  ] }),
27375
- x && b && /* @__PURE__ */ _("div", { className: "relative mb-5 block text-center text-gray-300 dark:text-gray-300", children: [
27434
+ A && b && /* @__PURE__ */ _("div", { className: "relative mb-5 block text-center text-gray-300 dark:text-gray-300", children: [
27376
27435
  /* @__PURE__ */ _("div", { className: "absolute left-0 right-0 top-1/2 border-b border-gray-200 dark:border-gray-600" }),
27377
27436
  /* @__PURE__ */ _("div", { className: "relative inline-block bg-white px-2 dark:bg-gray-800", children: B.t("continue_social_login") })
27378
27437
  ] }),
@@ -27580,29 +27639,29 @@ const u8 = (t, e) => {
27580
27639
  g,
27581
27640
  "otp"
27582
27641
  );
27583
- const x = await t.env.data.codes.create(i.tenant.id, {
27642
+ const A = await t.env.data.codes.create(i.tenant.id, {
27584
27643
  code_id: g,
27585
27644
  code_type: "otp",
27586
27645
  login_id: s.id,
27587
27646
  expires_at: new Date(Date.now() + ta).toISOString(),
27588
27647
  redirect_uri: s.authParams.redirect_uri
27589
- }), C = i.connections.find(
27648
+ }), T = i.connections.find(
27590
27649
  (O) => O.strategy === p
27591
27650
  );
27592
- if (!C)
27651
+ if (!T)
27593
27652
  throw new E(400, {
27594
27653
  message: B.t("connection_not_found", {
27595
27654
  connection: p
27596
27655
  })
27597
27656
  });
27598
27657
  return p === "email" && // This is different to how it works in auth0
27599
- C.options.authentication_method === "magic_link" ? await If(t, {
27658
+ T.options.authentication_method === "magic_link" ? await If(t, {
27600
27659
  to: d,
27601
- code: x.code_id,
27660
+ code: A.code_id,
27602
27661
  authParams: s.authParams
27603
27662
  }) : await Tf(t, {
27604
27663
  to: d,
27605
- code: x.code_id
27664
+ code: A.code_id
27606
27665
  }), t.redirect(`/u/enter-code?state=${n}`);
27607
27666
  }
27608
27667
  ), _n = (t) => /* @__PURE__ */ _(
@@ -27749,15 +27808,15 @@ var Qs = "_hp", _8 = {
27749
27808
  if (g.s && g.e)
27750
27809
  b = g.e, g.s = !1;
27751
27810
  else {
27752
- const x = n || !g.e;
27753
- 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)), v8(b, g.props, g.pP), K1(g, b, x));
27811
+ const A = n || !g.e;
27812
+ 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)), v8(b, g.props, g.pP), K1(g, b, A));
27754
27813
  }
27755
27814
  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));
27756
27815
  }
27757
27816
  if (t.pP && delete t.pP, s.length) {
27758
27817
  const p = [], h = [];
27759
- s.forEach(([, g, , b, x]) => {
27760
- g && p.push(g), b && h.push(b), x == null || x();
27818
+ s.forEach(([, g, , b, A]) => {
27819
+ g && p.push(g), b && h.push(b), A == null || A();
27761
27820
  }), p.forEach((g) => g()), h.length && requestAnimationFrame(() => {
27762
27821
  h.forEach((g) => g());
27763
27822
  });
@@ -27771,37 +27830,37 @@ var Qs = "_hp", _8 = {
27771
27830
  n || (n = typeof e.tag == "function" ? b8(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]));
27772
27831
  const h = r ? [...e.pC] : e.vC ? [...e.vC] : void 0, g = [];
27773
27832
  let b;
27774
- for (let x = 0; x < n.length; x++) {
27775
- Array.isArray(n[x]) && n.splice(x, 1, ...n[x].flat());
27776
- let C = A8(n[x]);
27777
- if (C) {
27778
- typeof C.tag == "function" && !C.tag[R1] && (Vi.length > 0 && (C[Je][2] = Vi.map((D) => [D, D.values.at(-1)])), (a = t[5]) != null && a.length && (C[Je][3] = t[5].at(-1)));
27833
+ for (let A = 0; A < n.length; A++) {
27834
+ Array.isArray(n[A]) && n.splice(A, 1, ...n[A].flat());
27835
+ let T = A8(n[A]);
27836
+ if (T) {
27837
+ typeof T.tag == "function" && !T.tag[R1] && (Vi.length > 0 && (T[Je][2] = Vi.map((D) => [D, D.values.at(-1)])), (a = t[5]) != null && a.length && (T[Je][3] = t[5].at(-1)));
27779
27838
  let O;
27780
27839
  if (h && h.length) {
27781
27840
  const D = h.findIndex(
27782
- zn(C) ? (A) => zn(A) : C.key !== void 0 ? (A) => A.key === C.key && A.tag === C.tag : (A) => A.tag === C.tag
27841
+ zn(T) ? (x) => zn(x) : T.key !== void 0 ? (x) => x.key === T.key && x.tag === T.tag : (x) => x.tag === T.tag
27783
27842
  );
27784
27843
  D !== -1 && (O = h[D], h.splice(D, 1));
27785
27844
  }
27786
27845
  if (O)
27787
- if (zn(C))
27788
- O.t !== C.t && (O.t = C.t, O.d = !0), C = O;
27846
+ if (zn(T))
27847
+ O.t !== T.t && (O.t = T.t, O.d = !0), T = O;
27789
27848
  else {
27790
27849
  const D = O.pP = O.props;
27791
- if (O.props = C.props, O.f || (O.f = C.f || e.f), typeof C.tag == "function") {
27792
- const A = O[Je][2];
27793
- O[Je][2] = C[Je][2] || [], O[Je][3] = C[Je][3], !O.f && ((O.o || O) === C.o || (u = (l = O.tag)[ME]) != null && u.call(l, D, O.props)) && x8(A, O[Je][2]) && (O.s = !0);
27850
+ if (O.props = T.props, O.f || (O.f = T.f || e.f), typeof T.tag == "function") {
27851
+ const x = O[Je][2];
27852
+ O[Je][2] = T[Je][2] || [], O[Je][3] = T[Je][3], !O.f && ((O.o || O) === T.o || (u = (l = O.tag)[ME]) != null && u.call(l, D, O.props)) && x8(x, O[Je][2]) && (O.s = !0);
27794
27853
  }
27795
- C = O;
27854
+ T = O;
27796
27855
  }
27797
- else if (!zn(C) && Hi) {
27856
+ else if (!zn(T) && Hi) {
27798
27857
  const D = ls(Hi);
27799
- D && (C.n = D);
27858
+ D && (T.n = D);
27800
27859
  }
27801
- if (!zn(C) && !C.s && (ap(t, C), delete C.f), g.push(C), b && !b.s && !C.s)
27860
+ if (!zn(T) && !T.s && (ap(t, T), delete T.f), g.push(T), b && !b.s && !T.s)
27802
27861
  for (let D = b; D && !zn(D); D = (d = D.vC) == null ? void 0 : d.at(-1))
27803
- D.nN = C;
27804
- b = C;
27862
+ D.nN = T;
27863
+ b = T;
27805
27864
  }
27806
27865
  }
27807
27866
  e.vR = r ? [...e.vC, ...h || []] : h || [], e.vC = g, r && delete e.pC;
@@ -27811,23 +27870,23 @@ var Qs = "_hp", _8 = {
27811
27870
  return;
27812
27871
  throw h;
27813
27872
  }
27814
- const [g, b, x] = ((p = e[Je]) == null ? void 0 : p[3]) || [];
27873
+ const [g, b, A] = ((p = e[Je]) == null ? void 0 : p[3]) || [];
27815
27874
  if (b) {
27816
- const C = () => fa([0, !1, t[2]], x), O = pa.get(x) || [];
27817
- O.push(C), pa.set(x, O);
27875
+ const T = () => fa([0, !1, t[2]], A), O = pa.get(A) || [];
27876
+ O.push(T), pa.set(A, O);
27818
27877
  const D = b(h, () => {
27819
- const A = pa.get(x);
27820
- if (A) {
27821
- const z = A.indexOf(C);
27878
+ const x = pa.get(A);
27879
+ if (x) {
27880
+ const z = x.indexOf(T);
27822
27881
  if (z !== -1)
27823
- return A.splice(z, 1), C();
27882
+ return x.splice(z, 1), T();
27824
27883
  }
27825
27884
  });
27826
27885
  if (D) {
27827
27886
  if (t[0] === 1)
27828
27887
  t[1] = !0;
27829
- else if (ap(t, x, [D]), (b.length === 1 || t !== g) && x.c) {
27830
- H1(x, x.c, !1);
27888
+ else if (ap(t, A, [D]), (b.length === 1 || t !== g) && A.c) {
27889
+ H1(A, A.c, !1);
27831
27890
  return;
27832
27891
  }
27833
27892
  throw Xg;
@@ -27999,11 +28058,11 @@ var Qs = "_hp", _8 = {
27999
28058
  const s = document.head;
28000
28059
  let { onLoad: a, onError: l, precedence: u, blocking: d, ...p } = e, h = null, g = !1;
28001
28060
  const b = la[t];
28002
- let x;
28061
+ let A;
28003
28062
  if (b.length > 0) {
28004
- const A = s.querySelectorAll(t);
28063
+ const x = s.querySelectorAll(t);
28005
28064
  e:
28006
- for (const z of A)
28065
+ for (const z of x)
28007
28066
  for (const q of la[t])
28008
28067
  if (z.getAttribute(q) === e[q]) {
28009
28068
  h = z;
@@ -28022,52 +28081,52 @@ var Qs = "_hp", _8 = {
28022
28081
  })());
28023
28082
  }
28024
28083
  } else
28025
- x = s.querySelectorAll(t);
28084
+ A = s.querySelectorAll(t);
28026
28085
  u = r ? u ?? "" : void 0, r && (p[ua] = u);
28027
- const C = Lf(
28028
- (A) => {
28086
+ const T = Lf(
28087
+ (x) => {
28029
28088
  if (b.length > 0) {
28030
28089
  let z = !1;
28031
28090
  for (const q of s.querySelectorAll(t)) {
28032
28091
  if (z && q.getAttribute(ua) !== u) {
28033
- s.insertBefore(A, q);
28092
+ s.insertBefore(x, q);
28034
28093
  return;
28035
28094
  }
28036
28095
  q.getAttribute(ua) === u && (z = !0);
28037
28096
  }
28038
- s.appendChild(A);
28039
- } else if (x) {
28097
+ s.appendChild(x);
28098
+ } else if (A) {
28040
28099
  let z = !1;
28041
- for (const q of x)
28042
- if (q === A) {
28100
+ for (const q of A)
28101
+ if (q === x) {
28043
28102
  z = !0;
28044
28103
  break;
28045
28104
  }
28046
28105
  z || s.insertBefore(
28047
- A,
28048
- s.contains(x[0]) ? x[0] : s.querySelector(t)
28049
- ), x = void 0;
28106
+ x,
28107
+ s.contains(A[0]) ? A[0] : s.querySelector(t)
28108
+ ), A = void 0;
28050
28109
  }
28051
28110
  },
28052
28111
  [u]
28053
- ), O = Ff(e.ref, (A) => {
28112
+ ), O = Ff(e.ref, (x) => {
28054
28113
  var M;
28055
28114
  const z = b[0];
28056
- if (n === 2 && (A.innerHTML = ""), (g || x) && C(A), !l && !a)
28115
+ if (n === 2 && (x.innerHTML = ""), (g || A) && T(x), !l && !a)
28057
28116
  return;
28058
- let q = hi[M = A.getAttribute(z)] || (hi[M] = new Promise(
28117
+ let q = hi[M = x.getAttribute(z)] || (hi[M] = new Promise(
28059
28118
  (K, W) => {
28060
- A.addEventListener("load", K), A.addEventListener("error", W);
28119
+ x.addEventListener("load", K), x.addEventListener("error", W);
28061
28120
  }
28062
28121
  ));
28063
28122
  a && (q = q.then(a)), l && (q = q.catch(l)), q.catch(() => {
28064
28123
  });
28065
28124
  });
28066
28125
  if (i && d === "render") {
28067
- const A = la[t][0];
28068
- if (e[A]) {
28069
- const z = e[A], q = hi[z] || (hi[z] = new Promise((M, K) => {
28070
- C(h), h.addEventListener("load", M), h.addEventListener("error", K);
28126
+ const x = la[t][0];
28127
+ if (e[x]) {
28128
+ const z = e[x], q = hi[z] || (hi[z] = new Promise((M, K) => {
28129
+ T(h), h.addEventListener("load", M), h.addEventListener("error", K);
28071
28130
  }));
28072
28131
  N8(q);
28073
28132
  }
@@ -28991,7 +29050,7 @@ const ou = (t) => {
28991
29050
  ),
28992
29051
  400
28993
29052
  );
28994
- const g = (p == null ? void 0 : p.authParams.username) === l.authParams.username, b = `auth2|${gc()}`, x = await r.data.users.create(a.tenant.id, {
29053
+ const g = (p == null ? void 0 : p.authParams.username) === l.authParams.username, b = `auth2|${gc()}`, A = await r.data.users.create(a.tenant.id, {
28995
29054
  user_id: b,
28996
29055
  email: l.authParams.username,
28997
29056
  email_verified: g,
@@ -29004,7 +29063,7 @@ const ou = (t) => {
29004
29063
  password: await oo.hash(n.password, 10),
29005
29064
  algorithm: "bcrypt"
29006
29065
  }), !g)
29007
- return await Of(t, x), t.html(
29066
+ return await Of(t, A), t.html(
29008
29067
  /* @__PURE__ */ _(
29009
29068
  yn,
29010
29069
  {
@@ -29017,7 +29076,7 @@ const ou = (t) => {
29017
29076
  }
29018
29077
  )
29019
29078
  );
29020
- const C = await I1(
29079
+ const T = await I1(
29021
29080
  t,
29022
29081
  a,
29023
29082
  {
@@ -29026,7 +29085,7 @@ const ou = (t) => {
29026
29085
  },
29027
29086
  l
29028
29087
  );
29029
- return On(t, C);
29088
+ return On(t, T);
29030
29089
  } catch (u) {
29031
29090
  let d = B.t("unknown_error_message"), p = 400;
29032
29091
  return u instanceof E ? (d = u.message || d, p = u.status === 400 ? 400 : 500) : u instanceof vi ? d = u.message || d : u instanceof Error && (d = u.message || d, p = 500), t.html(
@@ -30577,13 +30636,13 @@ const ou = (t) => {
30577
30636
  r.data.users,
30578
30637
  i.tenant.id,
30579
30638
  u
30580
- )).filter((x) => x.provider !== "auth2");
30639
+ )).filter((A) => A.provider !== "auth2");
30581
30640
  if (g.length > 0) {
30582
- const x = g.filter(
30583
- (C) => !C.linked_to
30641
+ const A = g.filter(
30642
+ (T) => !T.linked_to
30584
30643
  );
30585
- x.length > 1 && console.error("More than one primary user found for email", u), x.length === 0 && console.error("No primary user found for email", u), x.length === 1 && await r.data.users.update(i.tenant.id, d.user_id, {
30586
- linked_to: (b = x[0]) == null ? void 0 : b.user_id
30644
+ A.length > 1 && console.error("More than one primary user found for email", u), A.length === 0 && console.error("No primary user found for email", u), A.length === 1 && await r.data.users.update(i.tenant.id, d.user_id, {
30645
+ linked_to: (b = A[0]) == null ? void 0 : b.user_id
30587
30646
  });
30588
30647
  }
30589
30648
  return t.html(
@@ -30887,8 +30946,8 @@ const au = ({
30887
30946
  const p = await t.req.parseBody(), h = [], g = {};
30888
30947
  for (const D of d)
30889
30948
  if (D.type === "LEGAL") {
30890
- const A = D.id, z = !!D.required, q = p[A];
30891
- z && (!q || q === "") ? h.push(A) : typeof q == "string" && (g[A] = q);
30949
+ const x = D.id, z = !!D.required, q = p[x];
30950
+ z && (!q || q === "") ? h.push(x) : typeof q == "string" && (g[x] = q);
30892
30951
  }
30893
30952
  if (h.length > 0)
30894
30953
  return t.html(
@@ -30912,22 +30971,22 @@ const au = ({
30912
30971
  );
30913
30972
  if (!b || !b.session_id || !b.authParams)
30914
30973
  throw new Error("Session expired");
30915
- const x = await t.env.data.sessions.get(
30974
+ const A = await t.env.data.sessions.get(
30916
30975
  a.tenant.id,
30917
30976
  b.session_id
30918
30977
  );
30919
- if (!x || !x.user_id)
30978
+ if (!A || !A.user_id)
30920
30979
  throw new Error("Session expired");
30921
- const C = await t.env.data.users.get(
30980
+ const T = await t.env.data.users.get(
30922
30981
  t.var.tenant_id,
30923
- x.user_id
30982
+ A.user_id
30924
30983
  );
30925
- if (!C)
30984
+ if (!T)
30926
30985
  throw new Error("Session expired");
30927
30986
  return await On(t, {
30928
30987
  authParams: b.authParams,
30929
30988
  client: a,
30930
- user: C,
30989
+ user: T,
30931
30990
  loginSession: b,
30932
30991
  skipHooks: !0
30933
30992
  });
@@ -31656,10 +31715,10 @@ var N6 = {}, ri = {}, Do = {}, bl = {};
31656
31715
  return f.join(c);
31657
31716
  }, g = function(c, f, y) {
31658
31717
  return c + y + f;
31659
- }, b = Array.prototype.concat, x = 32767;
31660
- function C(c) {
31661
- for (var f = [], y = 0; y < c.length; y += x) {
31662
- var $ = c.slice(y, y + x);
31718
+ }, b = Array.prototype.concat, A = 32767;
31719
+ function T(c) {
31720
+ for (var f = [], y = 0; y < c.length; y += A) {
31721
+ var $ = c.slice(y, y + A);
31663
31722
  f = b.apply(f, $);
31664
31723
  }
31665
31724
  return f;
@@ -31684,11 +31743,11 @@ var N6 = {}, ri = {}, Do = {}, bl = {};
31684
31743
  DOCUMENT_TYPE_NODE: 10,
31685
31744
  DOCUMENT_FRAGMENT_NODE: 11
31686
31745
  };
31687
- A.prototype = new Object(), A.prototype.constructor = A, A.superclass = Object.prototype;
31688
- function A() {
31746
+ x.prototype = new Object(), x.prototype.constructor = x, x.superclass = Object.prototype;
31747
+ function x() {
31689
31748
  this.init();
31690
31749
  }
31691
- A.prototype.init = function() {
31750
+ x.prototype.init = function() {
31692
31751
  this.reduceActions = [], this.reduceActions[3] = function(c) {
31693
31752
  return new Y(c[0], c[2]);
31694
31753
  }, this.reduceActions[5] = function(c) {
@@ -31790,7 +31849,7 @@ var N6 = {}, ri = {}, Do = {}, bl = {};
31790
31849
  }, this.reduceActions[70] = function(c) {
31791
31850
  return new ae.NameTestQName(c[0]);
31792
31851
  };
31793
- }, A.actionTable = [
31852
+ }, x.actionTable = [
31794
31853
  " s s sssssssss s ss s ss",
31795
31854
  " s ",
31796
31855
  "r rrrrrrrrr rrrrrrr rr r ",
@@ -31899,7 +31958,7 @@ var N6 = {}, ri = {}, Do = {}, bl = {};
31899
31958
  " s s sssssssss s ss s ss",
31900
31959
  "r rrrrrrrrr rrrrrrr rr rr ",
31901
31960
  " r "
31902
- ], A.actionTableNumber = [
31961
+ ], x.actionTableNumber = [
31903
31962
  ` 1 0 /.-,+*)(' & %$ # "!`,
31904
31963
  " J ",
31905
31964
  "a aaaaaaaaa aaaaaaa aa a ",
@@ -32008,7 +32067,7 @@ var N6 = {}, ri = {}, Do = {}, bl = {};
32008
32067
  ` 1 0 /.-,+*)(' & %$ # "!`,
32009
32068
  "] ]]]]]]]]] ]]]]]]] ]] ]] ",
32010
32069
  " G "
32011
- ], A.gotoTable = [
32070
+ ], x.gotoTable = [
32012
32071
  "3456789:;<=>?@ AB CDEFGH IJ ",
32013
32072
  " ",
32014
32073
  " ",
@@ -32117,7 +32176,7 @@ var N6 = {}, ri = {}, Do = {}, bl = {};
32117
32176
  "o456789:;<=>?@ ABŒqCDEFGH IJ ",
32118
32177
  " ",
32119
32178
  " "
32120
- ], A.productions = [
32179
+ ], x.productions = [
32121
32180
  [1, 1, 2],
32122
32181
  [2, 1, 3],
32123
32182
  [3, 1, 4],
@@ -32189,7 +32248,7 @@ var N6 = {}, ri = {}, Do = {}, bl = {};
32189
32248
  [29, 1, -17],
32190
32249
  [29, 1, -19],
32191
32250
  [29, 1, -18]
32192
- ], 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) {
32251
+ ], x.DOUBLEDOT = 2, x.DOUBLECOLON = 3, x.DOUBLESLASH = 4, x.NOTEQUAL = 5, x.LESSTHANOREQUAL = 6, x.GREATERTHANOREQUAL = 7, x.AND = 8, x.OR = 9, x.MOD = 10, x.DIV = 11, x.MULTIPLYOPERATOR = 12, x.FUNCTIONNAME = 13, x.AXISNAME = 14, x.LITERAL = 15, x.NUMBER = 16, x.ASTERISKNAMETEST = 17, x.QNAME = 18, x.NCNAMECOLONASTERISK = 19, x.NODETYPE = 20, x.PROCESSINGINSTRUCTIONWITHLITERAL = 21, x.EQUALS = 22, x.LESSTHAN = 23, x.GREATERTHAN = 24, x.PLUS = 25, x.MINUS = 26, x.BAR = 27, x.SLASH = 28, x.LEFTPARENTHESIS = 29, x.RIGHTPARENTHESIS = 30, x.COMMA = 31, x.AT = 32, x.LEFTBRACKET = 33, x.RIGHTBRACKET = 34, x.DOT = 35, x.DOLLAR = 36, x.prototype.tokenize = function(c) {
32193
32252
  for (var f = [], y = [], $ = c + "\0", v = 0, S = $.charAt(v++); ; ) {
32194
32253
  for (; S == " " || S == " " || S == "\r" || S == `
32195
32254
  `; )
@@ -32197,62 +32256,62 @@ var N6 = {}, ri = {}, Do = {}, bl = {};
32197
32256
  if (S == "\0" || v >= $.length)
32198
32257
  break;
32199
32258
  if (S == "(") {
32200
- f.push(A.LEFTPARENTHESIS), y.push(S), S = $.charAt(v++);
32259
+ f.push(x.LEFTPARENTHESIS), y.push(S), S = $.charAt(v++);
32201
32260
  continue;
32202
32261
  }
32203
32262
  if (S == ")") {
32204
- f.push(A.RIGHTPARENTHESIS), y.push(S), S = $.charAt(v++);
32263
+ f.push(x.RIGHTPARENTHESIS), y.push(S), S = $.charAt(v++);
32205
32264
  continue;
32206
32265
  }
32207
32266
  if (S == "[") {
32208
- f.push(A.LEFTBRACKET), y.push(S), S = $.charAt(v++);
32267
+ f.push(x.LEFTBRACKET), y.push(S), S = $.charAt(v++);
32209
32268
  continue;
32210
32269
  }
32211
32270
  if (S == "]") {
32212
- f.push(A.RIGHTBRACKET), y.push(S), S = $.charAt(v++);
32271
+ f.push(x.RIGHTBRACKET), y.push(S), S = $.charAt(v++);
32213
32272
  continue;
32214
32273
  }
32215
32274
  if (S == "@") {
32216
- f.push(A.AT), y.push(S), S = $.charAt(v++);
32275
+ f.push(x.AT), y.push(S), S = $.charAt(v++);
32217
32276
  continue;
32218
32277
  }
32219
32278
  if (S == ",") {
32220
- f.push(A.COMMA), y.push(S), S = $.charAt(v++);
32279
+ f.push(x.COMMA), y.push(S), S = $.charAt(v++);
32221
32280
  continue;
32222
32281
  }
32223
32282
  if (S == "|") {
32224
- f.push(A.BAR), y.push(S), S = $.charAt(v++);
32283
+ f.push(x.BAR), y.push(S), S = $.charAt(v++);
32225
32284
  continue;
32226
32285
  }
32227
32286
  if (S == "+") {
32228
- f.push(A.PLUS), y.push(S), S = $.charAt(v++);
32287
+ f.push(x.PLUS), y.push(S), S = $.charAt(v++);
32229
32288
  continue;
32230
32289
  }
32231
32290
  if (S == "-") {
32232
- f.push(A.MINUS), y.push(S), S = $.charAt(v++);
32291
+ f.push(x.MINUS), y.push(S), S = $.charAt(v++);
32233
32292
  continue;
32234
32293
  }
32235
32294
  if (S == "=") {
32236
- f.push(A.EQUALS), y.push(S), S = $.charAt(v++);
32295
+ f.push(x.EQUALS), y.push(S), S = $.charAt(v++);
32237
32296
  continue;
32238
32297
  }
32239
32298
  if (S == "$") {
32240
- f.push(A.DOLLAR), y.push(S), S = $.charAt(v++);
32299
+ f.push(x.DOLLAR), y.push(S), S = $.charAt(v++);
32241
32300
  continue;
32242
32301
  }
32243
32302
  if (S == ".") {
32244
32303
  if (S = $.charAt(v++), S == ".") {
32245
- f.push(A.DOUBLEDOT), y.push(".."), S = $.charAt(v++);
32304
+ f.push(x.DOUBLEDOT), y.push(".."), S = $.charAt(v++);
32246
32305
  continue;
32247
32306
  }
32248
32307
  if (S >= "0" && S <= "9") {
32249
32308
  var X = "." + S;
32250
32309
  for (S = $.charAt(v++); S >= "0" && S <= "9"; )
32251
32310
  X += S, S = $.charAt(v++);
32252
- f.push(A.NUMBER), y.push(X);
32311
+ f.push(x.NUMBER), y.push(X);
32253
32312
  continue;
32254
32313
  }
32255
- f.push(A.DOT), y.push(".");
32314
+ f.push(x.DOT), y.push(".");
32256
32315
  continue;
32257
32316
  }
32258
32317
  if (S == "'" || S == '"') {
@@ -32260,7 +32319,7 @@ var N6 = {}, ri = {}, Do = {}, bl = {};
32260
32319
  Ie += S, v += 1;
32261
32320
  if (S !== ye)
32262
32321
  throw Wt.fromMessage("Unterminated string literal: " + ye + Ie);
32263
- v += 1, f.push(A.LITERAL), y.push(Ie), S = $.charAt(v++);
32322
+ v += 1, f.push(x.LITERAL), y.push(Ie), S = $.charAt(v++);
32264
32323
  continue;
32265
32324
  }
32266
32325
  if (S >= "0" && S <= "9") {
@@ -32270,50 +32329,50 @@ var N6 = {}, ri = {}, Do = {}, bl = {};
32270
32329
  if (S == "." && $.charAt(v) >= "0" && $.charAt(v) <= "9")
32271
32330
  for (X += S, X += $.charAt(v++), S = $.charAt(v++); S >= "0" && S <= "9"; )
32272
32331
  X += S, S = $.charAt(v++);
32273
- f.push(A.NUMBER), y.push(X);
32332
+ f.push(x.NUMBER), y.push(X);
32274
32333
  continue;
32275
32334
  }
32276
32335
  if (S == "*") {
32277
32336
  if (f.length > 0) {
32278
32337
  var oe = f[f.length - 1];
32279
- 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) {
32280
- f.push(A.MULTIPLYOPERATOR), y.push(S), S = $.charAt(v++);
32338
+ if (oe != x.AT && oe != x.DOUBLECOLON && oe != x.LEFTPARENTHESIS && oe != x.LEFTBRACKET && oe != x.AND && oe != x.OR && oe != x.MOD && oe != x.DIV && oe != x.MULTIPLYOPERATOR && oe != x.SLASH && oe != x.DOUBLESLASH && oe != x.BAR && oe != x.PLUS && oe != x.MINUS && oe != x.EQUALS && oe != x.NOTEQUAL && oe != x.LESSTHAN && oe != x.LESSTHANOREQUAL && oe != x.GREATERTHAN && oe != x.GREATERTHANOREQUAL) {
32339
+ f.push(x.MULTIPLYOPERATOR), y.push(S), S = $.charAt(v++);
32281
32340
  continue;
32282
32341
  }
32283
32342
  }
32284
- f.push(A.ASTERISKNAMETEST), y.push(S), S = $.charAt(v++);
32343
+ f.push(x.ASTERISKNAMETEST), y.push(S), S = $.charAt(v++);
32285
32344
  continue;
32286
32345
  }
32287
32346
  if (S == ":" && $.charAt(v) == ":") {
32288
- f.push(A.DOUBLECOLON), y.push("::"), v++, S = $.charAt(v++);
32347
+ f.push(x.DOUBLECOLON), y.push("::"), v++, S = $.charAt(v++);
32289
32348
  continue;
32290
32349
  }
32291
32350
  if (S == "/") {
32292
32351
  if (S = $.charAt(v++), S == "/") {
32293
- f.push(A.DOUBLESLASH), y.push("//"), S = $.charAt(v++);
32352
+ f.push(x.DOUBLESLASH), y.push("//"), S = $.charAt(v++);
32294
32353
  continue;
32295
32354
  }
32296
- f.push(A.SLASH), y.push("/");
32355
+ f.push(x.SLASH), y.push("/");
32297
32356
  continue;
32298
32357
  }
32299
32358
  if (S == "!" && $.charAt(v) == "=") {
32300
- f.push(A.NOTEQUAL), y.push("!="), v++, S = $.charAt(v++);
32359
+ f.push(x.NOTEQUAL), y.push("!="), v++, S = $.charAt(v++);
32301
32360
  continue;
32302
32361
  }
32303
32362
  if (S == "<") {
32304
32363
  if ($.charAt(v) == "=") {
32305
- f.push(A.LESSTHANOREQUAL), y.push("<="), v++, S = $.charAt(v++);
32364
+ f.push(x.LESSTHANOREQUAL), y.push("<="), v++, S = $.charAt(v++);
32306
32365
  continue;
32307
32366
  }
32308
- f.push(A.LESSTHAN), y.push("<"), S = $.charAt(v++);
32367
+ f.push(x.LESSTHAN), y.push("<"), S = $.charAt(v++);
32309
32368
  continue;
32310
32369
  }
32311
32370
  if (S == ">") {
32312
32371
  if ($.charAt(v) == "=") {
32313
- f.push(A.GREATERTHANOREQUAL), y.push(">="), v++, S = $.charAt(v++);
32372
+ f.push(x.GREATERTHANOREQUAL), y.push(">="), v++, S = $.charAt(v++);
32314
32373
  continue;
32315
32374
  }
32316
- f.push(A.GREATERTHAN), y.push(">"), S = $.charAt(v++);
32375
+ f.push(x.GREATERTHAN), y.push(">"), S = $.charAt(v++);
32317
32376
  continue;
32318
32377
  }
32319
32378
  if (S == "_" || le.isLetter(S.charCodeAt(0))) {
@@ -32322,80 +32381,80 @@ var N6 = {}, ri = {}, Do = {}, bl = {};
32322
32381
  ke += S, S = $.charAt(v++);
32323
32382
  if (f.length > 0) {
32324
32383
  var oe = f[f.length - 1];
32325
- 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) {
32384
+ if (oe != x.AT && oe != x.DOUBLECOLON && oe != x.LEFTPARENTHESIS && oe != x.LEFTBRACKET && oe != x.AND && oe != x.OR && oe != x.MOD && oe != x.DIV && oe != x.MULTIPLYOPERATOR && oe != x.SLASH && oe != x.DOUBLESLASH && oe != x.BAR && oe != x.PLUS && oe != x.MINUS && oe != x.EQUALS && oe != x.NOTEQUAL && oe != x.LESSTHAN && oe != x.LESSTHANOREQUAL && oe != x.GREATERTHAN && oe != x.GREATERTHANOREQUAL) {
32326
32385
  if (ke == "and") {
32327
- f.push(A.AND), y.push(ke);
32386
+ f.push(x.AND), y.push(ke);
32328
32387
  continue;
32329
32388
  }
32330
32389
  if (ke == "or") {
32331
- f.push(A.OR), y.push(ke);
32390
+ f.push(x.OR), y.push(ke);
32332
32391
  continue;
32333
32392
  }
32334
32393
  if (ke == "mod") {
32335
- f.push(A.MOD), y.push(ke);
32394
+ f.push(x.MOD), y.push(ke);
32336
32395
  continue;
32337
32396
  }
32338
32397
  if (ke == "div") {
32339
- f.push(A.DIV), y.push(ke);
32398
+ f.push(x.DIV), y.push(ke);
32340
32399
  continue;
32341
32400
  }
32342
32401
  }
32343
32402
  }
32344
32403
  if (S == ":") {
32345
32404
  if ($.charAt(v) == "*") {
32346
- f.push(A.NCNAMECOLONASTERISK), y.push(ke + ":*"), v++, S = $.charAt(v++);
32405
+ f.push(x.NCNAMECOLONASTERISK), y.push(ke + ":*"), v++, S = $.charAt(v++);
32347
32406
  continue;
32348
32407
  }
32349
32408
  if ($.charAt(v) == "_" || le.isLetter($.charCodeAt(v))) {
32350
32409
  for (ke += ":", S = $.charAt(v++); le.isNCNameChar(S.charCodeAt(0)); )
32351
32410
  ke += S, S = $.charAt(v++);
32352
32411
  if (S == "(") {
32353
- f.push(A.FUNCTIONNAME), y.push(ke);
32412
+ f.push(x.FUNCTIONNAME), y.push(ke);
32354
32413
  continue;
32355
32414
  }
32356
- f.push(A.QNAME), y.push(ke);
32415
+ f.push(x.QNAME), y.push(ke);
32357
32416
  continue;
32358
32417
  }
32359
32418
  if ($.charAt(v) == ":") {
32360
- f.push(A.AXISNAME), y.push(ke);
32419
+ f.push(x.AXISNAME), y.push(ke);
32361
32420
  continue;
32362
32421
  }
32363
32422
  }
32364
32423
  if (S == "(") {
32365
32424
  if (ke == "comment" || ke == "text" || ke == "node") {
32366
- f.push(A.NODETYPE), y.push(ke);
32425
+ f.push(x.NODETYPE), y.push(ke);
32367
32426
  continue;
32368
32427
  }
32369
32428
  if (ke == "processing-instruction") {
32370
- $.charAt(v) == ")" ? f.push(A.NODETYPE) : f.push(A.PROCESSINGINSTRUCTIONWITHLITERAL), y.push(ke);
32429
+ $.charAt(v) == ")" ? f.push(x.NODETYPE) : f.push(x.PROCESSINGINSTRUCTIONWITHLITERAL), y.push(ke);
32371
32430
  continue;
32372
32431
  }
32373
- f.push(A.FUNCTIONNAME), y.push(ke);
32432
+ f.push(x.FUNCTIONNAME), y.push(ke);
32374
32433
  continue;
32375
32434
  }
32376
- f.push(A.QNAME), y.push(ke);
32435
+ f.push(x.QNAME), y.push(ke);
32377
32436
  continue;
32378
32437
  }
32379
32438
  throw new Error("Unexpected character " + S);
32380
32439
  }
32381
32440
  return f.push(1), y.push("[EOF]"), [f, y];
32382
- }, A.SHIFT = "s", A.REDUCE = "r", A.ACCEPT = "a", A.prototype.parse = function(Ie) {
32441
+ }, x.SHIFT = "s", x.REDUCE = "r", x.ACCEPT = "a", x.prototype.parse = function(Ie) {
32383
32442
  var f, y, $ = this.tokenize(Ie);
32384
32443
  if ($ != null) {
32385
32444
  f = $[0], y = $[1];
32386
32445
  var v = 0, S = [], X = [], ye = [], Ie, oe, ke;
32387
32446
  for (S.push(0), X.push(1), ye.push("_S"), oe = f[v], ke = y[v++]; ; )
32388
- switch (Ie = S[S.length - 1], A.actionTable[Ie].charAt(oe - 1)) {
32389
- case A.SHIFT:
32390
- X.push(-oe), ye.push(ke), S.push(A.actionTableNumber[Ie].charCodeAt(oe - 1) - 32), oe = f[v], ke = y[v++];
32447
+ switch (Ie = S[S.length - 1], x.actionTable[Ie].charAt(oe - 1)) {
32448
+ case x.SHIFT:
32449
+ X.push(-oe), ye.push(ke), S.push(x.actionTableNumber[Ie].charCodeAt(oe - 1) - 32), oe = f[v], ke = y[v++];
32391
32450
  break;
32392
- case A.REDUCE:
32393
- for (var St = A.productions[A.actionTableNumber[Ie].charCodeAt(oe - 1) - 32][1], Ue = [], ur = 0; ur < St; ur++)
32451
+ case x.REDUCE:
32452
+ for (var St = x.productions[x.actionTableNumber[Ie].charCodeAt(oe - 1) - 32][1], Ue = [], ur = 0; ur < St; ur++)
32394
32453
  X.pop(), Ue.unshift(ye.pop()), S.pop();
32395
32454
  var dr = S[S.length - 1];
32396
- X.push(A.productions[A.actionTableNumber[Ie].charCodeAt(oe - 1) - 32][0]), this.reduceActions[A.actionTableNumber[Ie].charCodeAt(oe - 1) - 32] == null ? ye.push(Ue[0]) : ye.push(this.reduceActions[A.actionTableNumber[Ie].charCodeAt(oe - 1) - 32](Ue)), S.push(A.gotoTable[dr].charCodeAt(A.productions[A.actionTableNumber[Ie].charCodeAt(oe - 1) - 32][0] - 2) - 33);
32455
+ X.push(x.productions[x.actionTableNumber[Ie].charCodeAt(oe - 1) - 32][0]), this.reduceActions[x.actionTableNumber[Ie].charCodeAt(oe - 1) - 32] == null ? ye.push(Ue[0]) : ye.push(this.reduceActions[x.actionTableNumber[Ie].charCodeAt(oe - 1) - 32](Ue)), S.push(x.gotoTable[dr].charCodeAt(x.productions[x.actionTableNumber[Ie].charCodeAt(oe - 1) - 32][0] - 2) - 33);
32397
32456
  break;
32398
- case A.ACCEPT:
32457
+ case x.ACCEPT:
32399
32458
  return new z(ye.pop());
32400
32459
  default:
32401
32460
  throw new Error("XPath parse error");
@@ -32733,7 +32792,7 @@ var N6 = {}, ri = {}, Do = {}, bl = {};
32733
32792
  );
32734
32793
  }
32735
32794
  function Xe(c, f, y) {
32736
- return C(
32795
+ return T(
32737
32796
  a(
32738
32797
  Fe.bind(null, y, c),
32739
32798
  f
@@ -33724,11 +33783,11 @@ var N6 = {}, ri = {}, Do = {}, bl = {};
33724
33783
  document.implementation && document.implementation.hasFeature && document.implementation.hasFeature("XPath", null) && (ne = !1);
33725
33784
  } catch {
33726
33785
  }
33727
- ne && V(document, new A());
33786
+ ne && V(document, new x());
33728
33787
  } catch {
33729
33788
  }
33730
- V(n, new A()), function() {
33731
- var c = new A(), f = new nn(), y = new Et(), $ = new bn();
33789
+ V(n, new x()), function() {
33790
+ var c = new x(), f = new nn(), y = new Et(), $ = new bn();
33732
33791
  function v(Q) {
33733
33792
  return {
33734
33793
  getNamespace: function(Oe, kt) {
@@ -33857,7 +33916,7 @@ var N6 = {}, ri = {}, Do = {}, bl = {};
33857
33916
  n,
33858
33917
  {
33859
33918
  XPath: z,
33860
- XPathParser: A,
33919
+ XPathParser: x,
33861
33920
  XPathResult: I,
33862
33921
  Step: te,
33863
33922
  PathExpr: we,
@@ -33903,7 +33962,7 @@ var N6 = {}, ri = {}, Do = {}, bl = {};
33903
33962
  return n.selectWithResolver(y, $, f, v);
33904
33963
  };
33905
33964
  }, n.selectWithResolver = function(c, f, y, $) {
33906
- var v = new Lt(c, y, new A()), S = I.ANY_TYPE, X = v.evaluate(f, S, null);
33965
+ var v = new Lt(c, y, new x()), S = I.ANY_TYPE, X = v.evaluate(f, S, null);
33907
33966
  return X.resultType == I.STRING_TYPE ? X = X.stringValue : X.resultType == I.NUMBER_TYPE ? X = X.numberValue : X.resultType == I.BOOLEAN_TYPE ? X = X.booleanValue : (X = X.nodes, $ && (X = X[0])), X;
33908
33967
  }, n.select1 = function(c, f) {
33909
33968
  return n.select(c, f, !0);
@@ -34073,13 +34132,13 @@ Ae.assertIsDocumentFragmentNode = W6;
34073
34132
  `;
34074
34133
  }
34075
34134
  t.normalizePem = b;
34076
- function x(M) {
34135
+ function A(M) {
34077
34136
  if (!t.PEM_FORMAT_REGEX.test(M.trim()))
34078
34137
  throw new Error("Invalid PEM format.");
34079
34138
  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");
34080
34139
  }
34081
- t.pemToDer = x;
34082
- function C(M, K) {
34140
+ t.pemToDer = A;
34141
+ function T(M, K) {
34083
34142
  const W = Buffer.isBuffer(M) ? M.toString("base64").trim() : M.replace(/(\r\n|\r)/g, "").trim();
34084
34143
  if (t.PEM_FORMAT_REGEX.test(W))
34085
34144
  return b(W);
@@ -34093,7 +34152,7 @@ ${W.replace(/ /g, "")}
34093
34152
  }
34094
34153
  throw new Error("Unknown DER format.");
34095
34154
  }
34096
- t.derToPem = C;
34155
+ t.derToPem = T;
34097
34156
  function O(M, K = []) {
34098
34157
  if (!n.isElementNode(M.parentNode))
34099
34158
  return K;
@@ -34119,7 +34178,7 @@ ${W.replace(/ /g, "")}
34119
34178
  }
34120
34179
  return M.prefix || "";
34121
34180
  }
34122
- function A(M) {
34181
+ function x(M) {
34123
34182
  return M.every((K) => n.isElementNode(K));
34124
34183
  }
34125
34184
  function z(M, K, W) {
@@ -34128,7 +34187,7 @@ ${W.replace(/ /g, "")}
34128
34187
  const Z = e.selectWithResolver(K, M, W);
34129
34188
  if (!r(Z))
34130
34189
  return [];
34131
- if (!A(Z))
34190
+ if (!x(Z))
34132
34191
  throw new Error("Document subset must be list of elements");
34133
34192
  const Y = O(Z[0]), Se = [];
34134
34193
  for (let P = 0; P < Y.length; P++) {
@@ -34212,8 +34271,8 @@ class Q1 {
34212
34271
  if (Jo.isArrayHasLength(s))
34213
34272
  for (const g of s) {
34214
34273
  let b = !1;
34215
- for (const x of p)
34216
- x.prefix === g.prefix && x.namespaceURI === g.namespaceURI && (b = !0);
34274
+ for (const A of p)
34275
+ A.prefix === g.prefix && A.namespaceURI === g.namespaceURI && (b = !0);
34217
34276
  b || p.push(g);
34218
34277
  }
34219
34278
  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 };
@@ -35419,20 +35478,20 @@ function Si(t, e, n, r, i) {
35419
35478
  }
35420
35479
  e.push("<", u);
35421
35480
  for (var b = 0; b < a; b++) {
35422
- var x = s.item(b);
35423
- x.prefix == "xmlns" ? i.push({ prefix: x.localName, namespace: x.value }) : x.nodeName == "xmlns" && i.push({ prefix: "", namespace: x.value });
35481
+ var A = s.item(b);
35482
+ A.prefix == "xmlns" ? i.push({ prefix: A.localName, namespace: A.value }) : A.nodeName == "xmlns" && i.push({ prefix: "", namespace: A.value });
35424
35483
  }
35425
35484
  for (var b = 0; b < a; b++) {
35426
- var x = s.item(b);
35427
- if (_m(x, n, i)) {
35428
- var C = x.prefix || "", O = x.namespaceURI;
35429
- du(e, C ? "xmlns:" + C : "xmlns", O), i.push({ prefix: C, namespace: O });
35485
+ var A = s.item(b);
35486
+ if (_m(A, n, i)) {
35487
+ var T = A.prefix || "", O = A.namespaceURI;
35488
+ du(e, T ? "xmlns:" + T : "xmlns", O), i.push({ prefix: T, namespace: O });
35430
35489
  }
35431
- Si(x, e, n, r, i);
35490
+ Si(A, e, n, r, i);
35432
35491
  }
35433
35492
  if (l === u && _m(t, n, i)) {
35434
- var C = t.prefix || "", O = t.namespaceURI;
35435
- du(e, C ? "xmlns:" + C : "xmlns", O), i.push({ prefix: C, namespace: O });
35493
+ var T = t.prefix || "", O = t.namespaceURI;
35494
+ du(e, T ? "xmlns:" + T : "xmlns", O), i.push({ prefix: T, namespace: O });
35436
35495
  }
35437
35496
  if (D || n && !/^(?:meta|link|img|br|hr|input)$/i.test(l)) {
35438
35497
  if (e.push(">"), n && /^script$/i.test(l))
@@ -35461,9 +35520,9 @@ function Si(t, e, n, r, i) {
35461
35520
  case ay:
35462
35521
  return e.push("<!--", t.data, "-->");
35463
35522
  case ly:
35464
- var A = t.publicId, z = t.systemId;
35465
- if (e.push("<!DOCTYPE ", t.name), A)
35466
- e.push(" PUBLIC ", A), z && z != "." && e.push(" ", z), e.push(">");
35523
+ var x = t.publicId, z = t.systemId;
35524
+ if (e.push("<!DOCTYPE ", t.name), x)
35525
+ e.push(" PUBLIC ", x), z && z != "." && e.push(" ", z), e.push(">");
35467
35526
  else if (z && z != ".")
35468
35527
  e.push(" SYSTEM ", z, ">");
35469
35528
  else {
@@ -37739,9 +37798,9 @@ function dS(t, e, n, r, i) {
37739
37798
  return Object.hasOwnProperty.call(n, G) ? n[G] : G.charAt(0) === "#" ? s(parseInt(G.substr(1).replace("x", "0x"))) : (i.error("entity not found:" + L), L);
37740
37799
  }
37741
37800
  function l(L) {
37742
- if (L > C) {
37743
- var G = t.substring(C, L).replace(/&#?\w+;/g, a);
37744
- g && u(C), r.characters(G, 0, L - C), C = L;
37801
+ if (L > T) {
37802
+ var G = t.substring(T, L).replace(/&#?\w+;/g, a);
37803
+ g && u(T), r.characters(G, 0, L - T), T = L;
37745
37804
  }
37746
37805
  }
37747
37806
  function u(L, G) {
@@ -37749,17 +37808,17 @@ function dS(t, e, n, r, i) {
37749
37808
  d = G.index, p = d + G[0].length, g.lineNumber++;
37750
37809
  g.columnNumber = L - d + 1;
37751
37810
  }
37752
- for (var d = 0, p = 0, h = /.*(?:\r\n?|\n)|.*$/g, g = r.locator, b = [{ currentNSMap: e }], x = {}, C = 0; ; ) {
37811
+ for (var d = 0, p = 0, h = /.*(?:\r\n?|\n)|.*$/g, g = r.locator, b = [{ currentNSMap: e }], A = {}, T = 0; ; ) {
37753
37812
  try {
37754
- var O = t.indexOf("<", C);
37813
+ var O = t.indexOf("<", T);
37755
37814
  if (O < 0) {
37756
- if (!t.substr(C).match(/^\s*$/)) {
37757
- var D = r.doc, A = D.createTextNode(t.substr(C));
37758
- D.appendChild(A), r.currentElement = A;
37815
+ if (!t.substr(T).match(/^\s*$/)) {
37816
+ var D = r.doc, x = D.createTextNode(t.substr(T));
37817
+ D.appendChild(x), r.currentElement = x;
37759
37818
  }
37760
37819
  return;
37761
37820
  }
37762
- switch (O > C && l(O), t.charAt(O + 1)) {
37821
+ switch (O > T && l(O), t.charAt(O + 1)) {
37763
37822
  case "/":
37764
37823
  var j = t.indexOf(">", O + 3), z = t.substring(O + 2, j).replace(/[ \t\n\r]+$/g, ""), q = b.pop();
37765
37824
  j < 0 ? (z = t.substring(O + 2).replace(/[\s<].*/, ""), i.error("end tag name: " + z + " is not complete:" + q.tagName), j = O + 1 + z.length) : z.match(/\s</) && (z = z.replace(/[\s<].*/, ""), i.error("end tag name: " + z + " maybe not complete"), j = O + 1 + z.length);
@@ -37782,7 +37841,7 @@ function dS(t, e, n, r, i) {
37782
37841
  default:
37783
37842
  g && u(O);
37784
37843
  var Y = new Sy(), Se = b[b.length - 1].currentNSMap, j = pS(t, O, Y, Se, a, i), F = Y.length;
37785
- if (!Y.closed && hS(t, j, Y.tagName, x) && (Y.closed = !0, n.nbsp || i.warning("unclosed xml attribute")), g && F) {
37844
+ if (!Y.closed && hS(t, j, Y.tagName, A) && (Y.closed = !0, n.nbsp || i.warning("unclosed xml attribute")), g && F) {
37786
37845
  for (var P = vm(g, {}), N = 0; N < F; N++) {
37787
37846
  var k = Y[N];
37788
37847
  u(k.offset), k.locator = vm(g, {});
@@ -37797,14 +37856,14 @@ function dS(t, e, n, r, i) {
37797
37856
  throw L;
37798
37857
  i.error("element parse error: " + L), j = -1;
37799
37858
  }
37800
- j > C ? C = j : l(Math.max(O, C) + 1);
37859
+ j > T ? T = j : l(Math.max(O, T) + 1);
37801
37860
  }
37802
37861
  }
37803
37862
  function vm(t, e) {
37804
37863
  return e.lineNumber = t.lineNumber, e.columnNumber = t.columnNumber, e;
37805
37864
  }
37806
37865
  function pS(t, e, n, r, i, s) {
37807
- function a(g, b, x) {
37866
+ function a(g, b, A) {
37808
37867
  n.attributeNames.hasOwnProperty(g) && s.fatalError("Attribute " + g + " redefined"), n.addValue(
37809
37868
  g,
37810
37869
  // @see https://www.w3.org/TR/xml/#AVNormalize
@@ -37812,7 +37871,7 @@ function pS(t, e, n, r, i, s) {
37812
37871
  // - recursive replacement of (DTD) entity references
37813
37872
  // - trimming and collapsing multiple spaces into a single one for attributes that are not of type CDATA
37814
37873
  b.replace(/[\t\n\r]/g, " ").replace(/&#?\w+;/g, i),
37815
- x
37874
+ A
37816
37875
  );
37817
37876
  }
37818
37877
  for (var l, u, d = ++e, p = _s; ; ) {
@@ -38622,8 +38681,8 @@ class Vn {
38622
38681
  if (n = Re.findChildren(e, "Transforms"), n.length !== 0) {
38623
38682
  const p = n[0], h = Re.findChildren(p, "Transform");
38624
38683
  for (const b of h) {
38625
- const x = Re.findAttr(b, "Algorithm");
38626
- x && l.push(x.value);
38684
+ const A = Re.findAttr(b, "Algorithm");
38685
+ A && l.push(A.value);
38627
38686
  }
38628
38687
  const g = Re.findChildren(h[h.length - 1], "InclusiveNamespaces");
38629
38688
  Re.isArrayHasLength(g) && (u = g.flatMap((b) => (b.getAttribute("PrefixList") ?? "").split(" ")).filter((b) => b.length > 0));
@@ -38702,13 +38761,13 @@ class Vn {
38702
38761
  p ? (a += `:${p}`, u = `${p}:`) : u = "", Object.keys(h).forEach(function(K) {
38703
38762
  K !== "xmlns" && K !== a && l.push(`${K}="${h[K]}"`);
38704
38763
  }), l.push(`${a}="http://www.w3.org/2000/09/xmldsig#"`);
38705
- let x = `<${u}Signature ${l.join(" ")}>`;
38706
- x += this.createSignedInfo(s, p), x += this.getKeyInfo(p), x += `</${u}Signature>`, this.originalXmlWithIds = s.toString();
38707
- let C = "";
38764
+ let A = `<${u}Signature ${l.join(" ")}>`;
38765
+ A += this.createSignedInfo(s, p), A += this.getKeyInfo(p), A += `</${u}Signature>`, this.originalXmlWithIds = s.toString();
38766
+ let T = "";
38708
38767
  Object.keys(b).forEach(function(K) {
38709
- C += `xmlns:${K}="${b[K]}" `;
38768
+ T += `xmlns:${K}="${b[K]}" `;
38710
38769
  });
38711
- const O = `<Dummy ${C}>${x}</Dummy>`, A = new Ir.DOMParser().parseFromString(O).documentElement.firstChild, z = Xt.select1(g.reference, s);
38770
+ const O = `<Dummy ${T}>${A}</Dummy>`, x = new Ir.DOMParser().parseFromString(O).documentElement.firstChild, z = Xt.select1(g.reference, s);
38712
38771
  if (!Ft.isNodeLike(z)) {
38713
38772
  const K = new Error(`the following xpath cannot be used because it was not found: ${g.reference}`);
38714
38773
  if (i) {
@@ -38718,19 +38777,19 @@ class Vn {
38718
38777
  throw K;
38719
38778
  }
38720
38779
  if (g.action === "append")
38721
- z.appendChild(A);
38780
+ z.appendChild(x);
38722
38781
  else if (g.action === "prepend")
38723
- z.insertBefore(A, z.firstChild);
38782
+ z.insertBefore(x, z.firstChild);
38724
38783
  else if (g.action === "before") {
38725
38784
  if (z.parentNode == null)
38726
38785
  throw new Error("`location.reference` refers to the root node (by default), so we can't insert `before`");
38727
- z.parentNode.insertBefore(A, z);
38786
+ z.parentNode.insertBefore(x, z);
38728
38787
  } else if (g.action === "after") {
38729
38788
  if (z.parentNode == null)
38730
38789
  throw new Error("`location.reference` refers to the root node (by default), so we can't insert `after`");
38731
- z.parentNode.insertBefore(A, z.nextSibling);
38790
+ z.parentNode.insertBefore(x, z.nextSibling);
38732
38791
  }
38733
- this.signatureNode = A;
38792
+ this.signatureNode = x;
38734
38793
  const q = Re.findChildren(this.signatureNode, "SignedInfo");
38735
38794
  if (q.length === 0) {
38736
38795
  const K = new Error("could not find SignedInfo element in the message");
@@ -38742,8 +38801,8 @@ class Vn {
38742
38801
  }
38743
38802
  const M = q[0];
38744
38803
  typeof i == "function" ? this.calculateSignatureValue(s, (K, W) => {
38745
- K ? i(K) : (this.signatureValue = W || "", A.insertBefore(this.createSignature(p), M.nextSibling), this.signatureXml = A.toString(), this.signedXml = s.toString(), i(null, this));
38746
- }) : (this.calculateSignatureValue(s), A.insertBefore(this.createSignature(p), M.nextSibling), this.signatureXml = A.toString(), this.signedXml = s.toString());
38804
+ K ? i(K) : (this.signatureValue = W || "", x.insertBefore(this.createSignature(p), M.nextSibling), this.signatureXml = x.toString(), this.signedXml = s.toString(), i(null, this));
38805
+ }) : (this.calculateSignatureValue(s), x.insertBefore(this.createSignature(p), M.nextSibling), this.signatureXml = x.toString(), this.signedXml = s.toString());
38747
38806
  }
38748
38807
  getKeyInfo(e) {
38749
38808
  const n = e ? `${e}:` : "";
@@ -40507,7 +40566,7 @@ function mG(t, e) {
40507
40566
  ), u = n ? await t.connections.list(n) : { connections: [] }, d = l.connections.map((p) => {
40508
40567
  var b;
40509
40568
  const h = (b = u.connections) == null ? void 0 : b.find(
40510
- (x) => x.name === p.name
40569
+ (A) => A.name === p.name
40511
40570
  );
40512
40571
  if (!(h != null && h.options))
40513
40572
  return p;