wcz-test 7.2.4 → 7.3.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/DialogsContext-CGAKEKKW.js.map +1 -1
- package/dist/DialogsHooks-BZUdpDVJ.js.map +1 -1
- package/dist/FileMeta-CDQ1BQUH.js.map +1 -1
- package/dist/RouterListItemButton-C_jUvB6C.js.map +1 -1
- package/dist/components.js +797 -761
- package/dist/components.js.map +1 -1
- package/dist/hooks.js +4 -4
- package/dist/{i18next-8reizFda.js → i18next-TvJQoHEJ.js} +33 -33
- package/dist/i18next-TvJQoHEJ.js.map +1 -0
- package/dist/{index-wOcJpekI.js → index-CjSQ0_za.js} +6 -6
- package/dist/{index-wOcJpekI.js.map → index-CjSQ0_za.js.map} +1 -1
- package/dist/{index-De6Lo0ff.js → index-D3xlpZgv.js} +427 -406
- package/dist/index-D3xlpZgv.js.map +1 -0
- package/dist/index.js +131 -130
- package/dist/index.js.map +1 -1
- package/dist/lib/auth/msalClient.d.ts +2 -2
- package/dist/manifest.webmanifest +18 -18
- package/dist/middleware/authMiddleware.d.ts +1 -1
- package/dist/middleware.js +31 -32
- package/dist/middleware.js.map +1 -1
- package/dist/models/User.d.ts +0 -1
- package/dist/models.js.map +1 -1
- package/dist/{msalClient-Cem8ZXIU.js → msalClient-BDfKsC3C.js} +3 -4
- package/dist/msalClient-BDfKsC3C.js.map +1 -0
- package/dist/query.js +1 -1
- package/dist/robots.txt +3 -3
- package/dist/{utils-BXxJ2sNo.js → utils-BTQg82mj.js} +24 -24
- package/dist/utils-BTQg82mj.js.map +1 -0
- package/dist/utils.js +4 -4
- package/package.json +16 -15
- package/dist/i18next-8reizFda.js.map +0 -1
- package/dist/index-De6Lo0ff.js.map +0 -1
- package/dist/msalClient-Cem8ZXIU.js.map +0 -1
- package/dist/utils-BXxJ2sNo.js.map +0 -1
package/dist/middleware.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createMiddleware as
|
|
1
|
+
import { createMiddleware as V } from "@tanstack/react-start";
|
|
2
2
|
import { permissions as re } from "virtual:wcz-layout";
|
|
3
|
-
import {
|
|
4
|
-
import { g as ne } from "./msalClient-
|
|
3
|
+
import { s as _ } from "./utils-BTQg82mj.js";
|
|
4
|
+
import { g as ne } from "./msalClient-BDfKsC3C.js";
|
|
5
5
|
const N = new TextEncoder(), v = new TextDecoder();
|
|
6
6
|
function ae(...e) {
|
|
7
7
|
const t = e.reduce((a, { length: i }) => a + i, 0), r = new Uint8Array(t);
|
|
@@ -393,7 +393,7 @@ function be(e, t) {
|
|
|
393
393
|
if (t)
|
|
394
394
|
return new Set(t);
|
|
395
395
|
}
|
|
396
|
-
const
|
|
396
|
+
const O = (e) => w(e) && typeof e.kty == "string", Ae = (e) => e.kty !== "oct" && (e.kty === "AKP" && typeof e.priv == "string" || typeof e.d == "string"), ge = (e) => e.kty !== "oct" && e.d === void 0 && e.priv === void 0, Ke = (e) => e.kty === "oct" && typeof e.k == "string";
|
|
397
397
|
let g;
|
|
398
398
|
const L = async (e, t, r, n = !1) => {
|
|
399
399
|
g ||= /* @__PURE__ */ new WeakMap();
|
|
@@ -515,11 +515,11 @@ async function Te(e, t) {
|
|
|
515
515
|
let r = e.export({ format: "jwk" });
|
|
516
516
|
return L(e, r, t);
|
|
517
517
|
}
|
|
518
|
-
if (
|
|
518
|
+
if (O(e))
|
|
519
519
|
return e.k ? K(e.k) : L(e, e, t, !0);
|
|
520
520
|
throw new Error("unreachable");
|
|
521
521
|
}
|
|
522
|
-
const A = (e) => e?.[Symbol.toStringTag],
|
|
522
|
+
const A = (e) => e?.[Symbol.toStringTag], D = (e, t, r) => {
|
|
523
523
|
if (t.use !== void 0) {
|
|
524
524
|
let n;
|
|
525
525
|
switch (r) {
|
|
@@ -564,8 +564,8 @@ const A = (e) => e?.[Symbol.toStringTag], J = (e, t, r) => {
|
|
|
564
564
|
return !0;
|
|
565
565
|
}, Re = (e, t, r) => {
|
|
566
566
|
if (!(t instanceof Uint8Array)) {
|
|
567
|
-
if (
|
|
568
|
-
if (Ke(t) &&
|
|
567
|
+
if (O(t)) {
|
|
568
|
+
if (Ke(t) && D(e, t, r))
|
|
569
569
|
return;
|
|
570
570
|
throw new TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present');
|
|
571
571
|
}
|
|
@@ -575,16 +575,16 @@ const A = (e) => e?.[Symbol.toStringTag], J = (e, t, r) => {
|
|
|
575
575
|
throw new TypeError(`${A(t)} instances for symmetric algorithms must be of type "secret"`);
|
|
576
576
|
}
|
|
577
577
|
}, We = (e, t, r) => {
|
|
578
|
-
if (
|
|
578
|
+
if (O(t))
|
|
579
579
|
switch (r) {
|
|
580
580
|
case "decrypt":
|
|
581
581
|
case "sign":
|
|
582
|
-
if (Ae(t) &&
|
|
582
|
+
if (Ae(t) && D(e, t, r))
|
|
583
583
|
return;
|
|
584
584
|
throw new TypeError("JSON Web Key for this operation must be a private JWK");
|
|
585
585
|
case "encrypt":
|
|
586
586
|
case "verify":
|
|
587
|
-
if (ge(t) &&
|
|
587
|
+
if (ge(t) && D(e, t, r))
|
|
588
588
|
return;
|
|
589
589
|
throw new TypeError("JSON Web Key for this operation must be a public JWK");
|
|
590
590
|
}
|
|
@@ -650,7 +650,7 @@ function Pe(e, t) {
|
|
|
650
650
|
throw new S(`alg ${e} is not supported either by JOSE or your javascript runtime`);
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
|
-
async function
|
|
653
|
+
async function Je(e, t, r) {
|
|
654
654
|
if (t instanceof Uint8Array) {
|
|
655
655
|
if (!e.startsWith("HS"))
|
|
656
656
|
throw new TypeError(le(t, "CryptoKey", "KeyObject", "JSON Web Key"));
|
|
@@ -658,8 +658,8 @@ async function _e(e, t, r) {
|
|
|
658
658
|
}
|
|
659
659
|
return he(t, e, r), t;
|
|
660
660
|
}
|
|
661
|
-
async function
|
|
662
|
-
const a = await
|
|
661
|
+
async function _e(e, t, r, n) {
|
|
662
|
+
const a = await Je(e, t, "verify");
|
|
663
663
|
me(e, a);
|
|
664
664
|
const i = Pe(e, a.algorithm);
|
|
665
665
|
try {
|
|
@@ -719,7 +719,7 @@ async function De(e, t, r) {
|
|
|
719
719
|
throw new d("Failed to base64url decode the signature");
|
|
720
720
|
}
|
|
721
721
|
const T = await Te(t, o);
|
|
722
|
-
if (!await
|
|
722
|
+
if (!await _e(o, T, l, f))
|
|
723
723
|
throw new fe();
|
|
724
724
|
let p;
|
|
725
725
|
if (s)
|
|
@@ -741,7 +741,7 @@ async function Ie(e, t, r) {
|
|
|
741
741
|
const o = await De({ payload: a, protected: n, signature: i }, t, r), u = { payload: o.payload, protectedHeader: o.protectedHeader };
|
|
742
742
|
return typeof t == "function" ? { ...u, key: o.key } : u;
|
|
743
743
|
}
|
|
744
|
-
const Oe = (e) => Math.floor(e.getTime() / 1e3), j = 60, ee = j * 60,
|
|
744
|
+
const Oe = (e) => Math.floor(e.getTime() / 1e3), j = 60, ee = j * 60, H = ee * 24, He = H * 7, Ne = H * 365.25, Me = /^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i;
|
|
745
745
|
function x(e) {
|
|
746
746
|
const t = Me.exec(e);
|
|
747
747
|
if (!t || t[4] && t[1])
|
|
@@ -773,7 +773,7 @@ function x(e) {
|
|
|
773
773
|
case "day":
|
|
774
774
|
case "days":
|
|
775
775
|
case "d":
|
|
776
|
-
a = Math.round(r *
|
|
776
|
+
a = Math.round(r * H);
|
|
777
777
|
break;
|
|
778
778
|
case "week":
|
|
779
779
|
case "weeks":
|
|
@@ -870,12 +870,12 @@ function $e(e) {
|
|
|
870
870
|
}
|
|
871
871
|
}
|
|
872
872
|
function Fe(e) {
|
|
873
|
-
return e && typeof e == "object" && Array.isArray(e.keys) && e.keys.every(
|
|
873
|
+
return e && typeof e == "object" && Array.isArray(e.keys) && e.keys.every(ke);
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function ke(e) {
|
|
876
876
|
return w(e);
|
|
877
877
|
}
|
|
878
|
-
class
|
|
878
|
+
class Ve {
|
|
879
879
|
#r;
|
|
880
880
|
#s = /* @__PURE__ */ new WeakMap();
|
|
881
881
|
constructor(t) {
|
|
@@ -933,7 +933,7 @@ async function $(e, t, r) {
|
|
|
933
933
|
return n[r];
|
|
934
934
|
}
|
|
935
935
|
function F(e) {
|
|
936
|
-
const t = new
|
|
936
|
+
const t = new Ve(e), r = async (n, a) => t.getKey(n, a);
|
|
937
937
|
return Object.defineProperties(r, {
|
|
938
938
|
jwks: {
|
|
939
939
|
value: () => structuredClone(t.jwks()),
|
|
@@ -946,8 +946,8 @@ function F(e) {
|
|
|
946
946
|
function Be() {
|
|
947
947
|
return typeof WebSocketPair < "u" || typeof navigator < "u" && navigator.userAgent === "Cloudflare-Workers" || typeof EdgeRuntime < "u" && EdgeRuntime === "vercel";
|
|
948
948
|
}
|
|
949
|
-
let
|
|
950
|
-
(typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (
|
|
949
|
+
let I;
|
|
950
|
+
(typeof navigator > "u" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) && (I = "jose/v6.1.3");
|
|
951
951
|
const Ge = /* @__PURE__ */ Symbol();
|
|
952
952
|
async function ze(e, t, r, n = fetch) {
|
|
953
953
|
const a = await n(e, {
|
|
@@ -966,7 +966,7 @@ async function ze(e, t, r, n = fetch) {
|
|
|
966
966
|
throw new h("Failed to parse the JSON Web Key Set HTTP response as JSON");
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
|
-
const
|
|
969
|
+
const J = /* @__PURE__ */ Symbol();
|
|
970
970
|
function qe(e, t) {
|
|
971
971
|
return !(typeof e != "object" || e === null || !("uat" in e) || typeof e.uat != "number" || Date.now() - e.uat >= t || !("jwks" in e) || !w(e.jwks) || !Array.isArray(e.jwks.keys) || !Array.prototype.every.call(e.jwks.keys, w));
|
|
972
972
|
}
|
|
@@ -984,7 +984,7 @@ class Ye {
|
|
|
984
984
|
constructor(t, r) {
|
|
985
985
|
if (!(t instanceof URL))
|
|
986
986
|
throw new TypeError("url must be an instance of URL");
|
|
987
|
-
this.#r = new URL(t.href), this.#s = typeof r?.timeoutDuration == "number" ? r?.timeoutDuration : 5e3, this.#c = typeof r?.cooldownDuration == "number" ? r?.cooldownDuration : 3e4, this.#o = typeof r?.cacheMaxAge == "number" ? r?.cacheMaxAge : 6e5, this.#t = new Headers(r?.headers),
|
|
987
|
+
this.#r = new URL(t.href), this.#s = typeof r?.timeoutDuration == "number" ? r?.timeoutDuration : 5e3, this.#c = typeof r?.cooldownDuration == "number" ? r?.cooldownDuration : 3e4, this.#o = typeof r?.cacheMaxAge == "number" ? r?.cacheMaxAge : 6e5, this.#t = new Headers(r?.headers), I && !this.#t.has("User-Agent") && this.#t.set("User-Agent", I), this.#t.has("accept") || (this.#t.set("accept", "application/json"), this.#t.append("accept", "application/jwk-set+json")), this.#f = r?.[Ge], r?.[J] !== void 0 && (this.#i = r?.[J], qe(r?.[J], this.#o) && (this.#n = this.#i.uat, this.#a = F(this.#i.jwks)));
|
|
988
988
|
}
|
|
989
989
|
pendingFetch() {
|
|
990
990
|
return !!this.#e;
|
|
@@ -1048,7 +1048,7 @@ function Xe(e, t) {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
}), n;
|
|
1050
1050
|
}
|
|
1051
|
-
const nt = (e) =>
|
|
1051
|
+
const nt = (e) => V().server(async ({
|
|
1052
1052
|
next: t,
|
|
1053
1053
|
request: r
|
|
1054
1054
|
}) => {
|
|
@@ -1058,7 +1058,6 @@ const nt = (e) => k().server(async ({
|
|
|
1058
1058
|
id: a.sub,
|
|
1059
1059
|
name: a.name.split("/")[0],
|
|
1060
1060
|
email: a.preferred_username.toLowerCase(),
|
|
1061
|
-
groups: a.groups ?? [],
|
|
1062
1061
|
department: a.department || "",
|
|
1063
1062
|
employeeId: a.employeeId || "",
|
|
1064
1063
|
hasPermission: (s) => re[s].some((u) => (a.groups ?? []).includes(u))
|
|
@@ -1069,7 +1068,7 @@ const nt = (e) => k().server(async ({
|
|
|
1069
1068
|
user: i
|
|
1070
1069
|
}
|
|
1071
1070
|
});
|
|
1072
|
-
}), at = (e) =>
|
|
1071
|
+
}), at = (e) => V({
|
|
1073
1072
|
type: "function"
|
|
1074
1073
|
}).client(async ({
|
|
1075
1074
|
next: t
|
|
@@ -1085,14 +1084,14 @@ async function Qe(e) {
|
|
|
1085
1084
|
const {
|
|
1086
1085
|
payload: t
|
|
1087
1086
|
} = await Ue(e, Ze(), {
|
|
1088
|
-
issuer: `https://login.microsoftonline.com/${
|
|
1089
|
-
audience:
|
|
1087
|
+
issuer: `https://login.microsoftonline.com/${_.ENTRA_TENANT_ID}/v2.0`,
|
|
1088
|
+
audience: _.ENTRA_CLIENT_ID
|
|
1090
1089
|
});
|
|
1091
1090
|
return t;
|
|
1092
1091
|
}
|
|
1093
|
-
let
|
|
1092
|
+
let k = null;
|
|
1094
1093
|
function Ze() {
|
|
1095
|
-
return
|
|
1094
|
+
return k ??= Xe(new URL(`https://login.microsoftonline.com/${_.ENTRA_TENANT_ID}/discovery/v2.0/keys`)), k;
|
|
1096
1095
|
}
|
|
1097
1096
|
export {
|
|
1098
1097
|
nt as authMiddleware,
|