@wssto2/vue-core 0.15.3 → 0.17.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.
Files changed (153) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +4 -3
  3. package/bin/architecture/engine.mjs +3 -0
  4. package/bin/architecture/permissions.mjs +56 -0
  5. package/bin/architecture/rules.mjs +17 -0
  6. package/bin/commands/check-architecture.mjs +19 -0
  7. package/bin/config.mjs +2 -0
  8. package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-BH3f0hda.js → AccessGate.vue_vue_type_script_setup_true_lang-Bg8JFAOT.js} +1 -1
  9. package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-DybAIOHS.js → ActionRow.vue_vue_type_script_setup_true_lang-B5IMNnTf.js} +4 -4
  10. package/dist/{Activity-DM9t5d3D.js → Activity-CiYn5E6A.js} +7 -7
  11. package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-uO4EAmBb.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-oXWQTfBs.js} +170 -168
  12. package/dist/{Changes-DYpysvfX.js → Changes-Cy8STpLX.js} +3 -3
  13. package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-qxeSTAKV.js → CollectionPage.vue_vue_type_script_setup_true_lang-Dr6nFNBB.js} +6 -6
  14. package/dist/{DataTable.vue_vue_type_script_setup_true_lang-DbRS37n3.js → DataTable.vue_vue_type_script_setup_true_lang-D372wlxR.js} +1 -1
  15. package/dist/{DateField.vue_vue_type_script_setup_true_lang-DzCvYHAf.js → DateField.vue_vue_type_script_setup_true_lang-D0KcfW8R.js} +17 -16
  16. package/dist/{DeadLetters-vt9vhJD7.js → DeadLetters-DhJkMpd_.js} +4 -4
  17. package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-dsO1m9Mm.js → FormGroup.vue_vue_type_script_setup_true_lang-lvAuBG-0.js} +2 -2
  18. package/dist/FormRow.vue_vue_type_script_setup_true_lang-CpgNVQF4.js +160 -0
  19. package/dist/{FormView.vue_vue_type_script_setup_true_lang-Bq_Qa4py.js → FormView.vue_vue_type_script_setup_true_lang-D01Jr4UU.js} +5 -5
  20. package/dist/{General-oUI2MiwO.js → General-CwTPC5UP.js} +11 -11
  21. package/dist/{IncidentRecord-CQdv_bN5.js → IncidentRecord-hXEGuLGg.js} +14 -14
  22. package/dist/{IncidentsList-DwQ0wuM8.js → IncidentsList-C41VyDwK.js} +6 -6
  23. package/dist/{NewRolePage-C-wbA-uW.js → NewRolePage-BYYZJkK7.js} +3 -3
  24. package/dist/{NumberField.vue_vue_type_script_setup_true_lang-U-_kcnGr.js → NumberField.vue_vue_type_script_setup_true_lang-BhNZgEW6.js} +7 -6
  25. package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-BPDh9s2m.js → PersonAccess.vue_vue_type_script_setup_true_lang-mYFuG-Y3.js} +56 -56
  26. package/dist/{ProfilePage-Di77M2cX.js → ProfilePage-DGEsIycR.js} +13 -13
  27. package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-CZtvUH5L.js → RecordHeader.vue_vue_type_script_setup_true_lang-B3BnYg1x.js} +1 -1
  28. package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-uLrX13ab.js → ResourcePage.vue_vue_type_script_setup_true_lang-1iZtj3rh.js} +1 -1
  29. package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-V2D7fhR9.js → RoleEditor.vue_vue_type_script_setup_true_lang-BslSDDiM.js} +10 -10
  30. package/dist/{RolePage-Crp71rRb.js → RolePage-C08ZUqw1.js} +9 -9
  31. package/dist/{RolesPage-DKXXnnDV.js → RolesPage-FOuY1VKg.js} +10 -10
  32. package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-5ogQCj8M.js → SectionNavigator.vue_vue_type_script_setup_true_lang-DCTFxfPB.js} +2 -2
  33. package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-zv_AxpBn.js → SegmentedField.vue_vue_type_script_setup_true_lang-CLR6EvzO.js} +13 -12
  34. package/dist/{SelectField.vue_vue_type_script_setup_true_lang-CLkoPbGm.js → SelectField.vue_vue_type_script_setup_true_lang-D5xYofdb.js} +10 -9
  35. package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-C7WKxJ9i.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-CDr4WNIb.js} +9 -9
  36. package/dist/{ServiceAccountRecord-CTU10RWy.js → ServiceAccountRecord-kWwIQGZb.js} +12 -12
  37. package/dist/{ServiceAccountsList-BVRjoswH.js → ServiceAccountsList-CKy9_YHP.js} +8 -8
  38. package/dist/{Sessions-BHwMrF7c.js → Sessions-BDc8gdYH.js} +4 -4
  39. package/dist/{SettingsPage-lRWvsMYK.js → SettingsPage-t-8kmFVT.js} +13 -13
  40. package/dist/{SignIn-HnujOMRY.js → SignIn-CqtkvtCZ.js} +7 -7
  41. package/dist/{SignInPage-c886Fvd7.js → SignInPage-DcdNKZIb.js} +4 -4
  42. package/dist/{SignIns-BsTlN2Zc.js → SignIns-D4-nGu0B.js} +3 -3
  43. package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-Ds4q0bbl.js → SwitchField.vue_vue_type_script_setup_true_lang-CLtcuofe.js} +15 -14
  44. package/dist/{TextField.vue_vue_type_script_setup_true_lang-CWIeeZRE.js → TextField.vue_vue_type_script_setup_true_lang-CVGh-p3J.js} +7 -6
  45. package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-D2j4s96s.js → TextareaField.vue_vue_type_script_setup_true_lang-YxUlNHSk.js} +6 -5
  46. package/dist/{TimeField.vue_vue_type_script_setup_true_lang-C1mLvOkc.js → TimeField.vue_vue_type_script_setup_true_lang-DHNC_MLt.js} +30 -29
  47. package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-jCXYFLtq.js → Timestamp.vue_vue_type_script_setup_true_lang-d_KuxWjH.js} +1 -1
  48. package/dist/{UserRecord-DrbpVHh9.js → UserRecord-CwZCr9Im.js} +10 -10
  49. package/dist/{UsersList-M5tBxrox.js → UsersList-Cn19sFgv.js} +4 -4
  50. package/dist/access/index.js +4 -4
  51. package/dist/app/application.d.ts +2 -0
  52. package/dist/app/index.js +2 -2
  53. package/dist/app/validate.d.ts +3 -1
  54. package/dist/{application-C900Wz0A.js → application-CDSweJb9.js} +144 -142
  55. package/dist/back-LcLlFodC.js +63 -0
  56. package/dist/{chrome-nUcmVu8G.js → chrome-kMBKIB1N.js} +2 -2
  57. package/dist/collection/authors.d.ts +27 -0
  58. package/dist/collection/index.d.ts +2 -0
  59. package/dist/collection/index.js +81 -76
  60. package/dist/config/index.d.ts +42 -0
  61. package/dist/config/index.js +12 -3
  62. package/dist/content/Panel.vue.d.ts +1 -1
  63. package/dist/content/index.js +2 -2
  64. package/dist/{contributions-9CPT-Z5v.js → contributions-B0x5x5xD.js} +1 -1
  65. package/dist/form/CommandDialog.vue.d.ts +1 -1
  66. package/dist/form/DateField.vue.d.ts +1 -1
  67. package/dist/form/DateTimeField.vue.d.ts +1 -1
  68. package/dist/form/FileField.vue.d.ts +1 -1
  69. package/dist/form/FormRow.vue.d.ts +2 -2
  70. package/dist/form/I18nField.vue.d.ts +2 -2
  71. package/dist/form/TextField.vue.d.ts +1 -1
  72. package/dist/form/TextareaField.vue.d.ts +2 -2
  73. package/dist/form/date/value.d.ts +21 -0
  74. package/dist/form/index.d.ts +1 -0
  75. package/dist/form/index.js +745 -715
  76. package/dist/format/format.d.ts +8 -2
  77. package/dist/format/index.js +1 -1
  78. package/dist/format-C_HXlOYQ.js +136 -0
  79. package/dist/{guards-6fJxfUtk.js → guards-CNJ0ATVC.js} +1 -1
  80. package/dist/i18n/index.d.ts +14 -2
  81. package/dist/i18n/index.js +84 -73
  82. package/dist/i18n/messages.d.ts +10 -1
  83. package/dist/i18n/runtime.d.ts +3 -1
  84. package/dist/identity/index.js +3 -3
  85. package/dist/identity/profile/EmailChangeDialog.vue.d.ts +2 -2
  86. package/dist/identity/users/list.d.ts +1 -1
  87. package/dist/incidents/index.js +1 -1
  88. package/dist/{index-_hDHxrt5.js → index-1HS7O2-e.js} +9 -9
  89. package/dist/{index-DM_nWOYf.js → index-BA2w8uwD.js} +86 -86
  90. package/dist/{index-vES_D5ls.js → index-SLJWm40T.js} +4 -4
  91. package/dist/index.d.ts +1 -1
  92. package/dist/index.js +1 -1
  93. package/dist/modal/DiscardChangesModal.vue.d.ts +2 -2
  94. package/dist/modal/Modal.vue.d.ts +2 -2
  95. package/dist/modal/Sheet.vue.d.ts +2 -2
  96. package/dist/modules/identity/routes.d.ts +1 -1
  97. package/dist/modules/identity/schemas.d.ts +2 -2
  98. package/dist/{navigation-DMJ6akat.js → navigation-d-JAPBGA.js} +1 -1
  99. package/dist/{neighbors-DrEahe7B.js → neighbors-Dg_LU9ry.js} +32 -31
  100. package/dist/notifications/index.js +1 -1
  101. package/dist/onboarding/index.js +1 -1
  102. package/dist/options-mOOX6JSS.js +214 -0
  103. package/dist/overlay/AlertDialog.vue.d.ts +3 -3
  104. package/dist/overlay/Menu.vue.d.ts +2 -2
  105. package/dist/overlay/PhotoViewer.vue.d.ts +2 -2
  106. package/dist/overlay/Popover.vue.d.ts +2 -2
  107. package/dist/page/SectionNavigator.vue.d.ts +1 -1
  108. package/dist/page/SectionPanel.vue.d.ts +1 -1
  109. package/dist/page/back.d.ts +37 -0
  110. package/dist/page/index.d.ts +1 -0
  111. package/dist/page/index.js +46 -42
  112. package/dist/phone/index.js +57 -56
  113. package/dist/platform/index.d.ts +10 -1
  114. package/dist/platform/index.js +16 -15
  115. package/dist/platform/platform.d.ts +4 -2
  116. package/dist/{platform-ORzRR3Tw.js → platform-DU9QFts8.js} +7 -6
  117. package/dist/playwright/config.d.ts +33 -0
  118. package/dist/playwright/index.d.ts +2 -0
  119. package/dist/playwright/index.js +192 -171
  120. package/dist/resource/index.js +1 -1
  121. package/dist/router/index.js +3 -3
  122. package/dist/router/sections.d.ts +1 -1
  123. package/dist/{rowLayout-QKfNHsML.js → rowLayout-PIuD7MGo.js} +2 -2
  124. package/dist/sections-BpiRLntE.js +54 -0
  125. package/dist/{serverMessages-Ce8-MK4e.js → serverMessages-C_KkDvpT.js} +1 -1
  126. package/dist/shell/index.js +5 -5
  127. package/dist/state/NextStepPanel.vue.d.ts +63 -0
  128. package/dist/state/PhaseTiles.vue.d.ts +20 -0
  129. package/dist/state/PhaseTrack.vue.d.ts +48 -0
  130. package/dist/state/RequirementList.vue.d.ts +10 -0
  131. package/dist/state/TodoRow.vue.d.ts +52 -0
  132. package/dist/state/index.d.ts +9 -0
  133. package/dist/state/index.js +731 -126
  134. package/dist/state/phaseStep.d.ts +7 -0
  135. package/dist/state/phaseTile.d.ts +10 -0
  136. package/dist/state/requirementItem.d.ts +16 -0
  137. package/dist/state/todoRow.d.ts +8 -0
  138. package/dist/{state-QDaxntgR.js → state-z1iPF1DT.js} +1 -1
  139. package/dist/styles.css +1 -1
  140. package/dist/{suggestions-q_v3M7G6.js → suggestions-DeMgs_ki.js} +1 -1
  141. package/dist/testing/format.d.ts +1 -1
  142. package/dist/testing/index.js +31 -31
  143. package/dist/{useCommand-DAMgQ5NE.js → useCommand-DQKvro1n.js} +2 -2
  144. package/dist/{useGroupSheet-B-Hs4gNO.js → useGroupSheet-CRw3MUmX.js} +3 -3
  145. package/dist/{usePreferences-BfMXVbSO.js → usePreferences-DB29UTFD.js} +1 -1
  146. package/dist/{useRecordDialog-QPKFH1Ww.js → useRecordDialog-0azHxxvm.js} +1 -1
  147. package/dist/{useResourceForm-Oa6bk3NI.js → useResourceForm-zVuWerSn.js} +1 -1
  148. package/dist/{useSaveChrome-7huA3FzR.js → useSaveChrome-DB9OwIjT.js} +1 -1
  149. package/dist/{useTypedEntry-CITij2C_.js → useTypedEntry-BsMV66Yc.js} +46 -45
  150. package/package.json +1 -1
  151. package/dist/format-Cp1h0vsC.js +0 -125
  152. package/dist/options-B48UiYsG.js +0 -368
  153. package/dist/sections-DI_JhgQG.js +0 -53
@@ -1,29 +1,30 @@
1
- const u = (n, s) => ({ success: !0, data: n, ...s === void 0 ? {} : { meta: s } }), te = (n, s = {}) => u(n, { total: n.length, page: 1, per_page: 20, last_page: 1, from: n.length === 0 ? 0 : 1, to: n.length, ...s }), O = (n, s, e = {}) => u({ data: n, total: n.length, per_page: 20, current_page: 1, last_page: 1, from: n.length ? 1 : 0, to: n.length, ...s ? { meta: { views: s } } : {}, ...e }), a = (n, s = 200) => ({ status: s, contentType: "application/json", body: JSON.stringify(n) }), w = () => ({ status: 204, body: "" }), R = (n) => ({ status: 200, contentType: "text/event-stream", body: n.map((s) => `data: ${JSON.stringify(s)}
1
+ import { devices as j } from "@playwright/test";
2
+ const f = (n, s) => ({ success: !0, data: n, ...s === void 0 ? {} : { meta: s } }), ae = (n, s = {}) => f(n, { total: n.length, page: 1, per_page: 20, last_page: 1, from: n.length === 0 ? 0 : 1, to: n.length, ...s }), O = (n, s, e = {}) => f({ data: n, total: n.length, per_page: 20, current_page: 1, last_page: 1, from: n.length ? 1 : 0, to: n.length, ...s ? { meta: { views: s } } : {}, ...e }), a = (n, s = 200) => ({ status: s, contentType: "application/json", body: JSON.stringify(n) }), w = () => ({ status: 204, body: "" }), M = (n) => ({ status: 200, contentType: "text/event-stream", body: n.map((s) => `data: ${JSON.stringify(s)}
2
3
 
3
- `).join("") }), j = (n, s, e = {}) => a({ success: !1, error: s, code: s, ...e.params === void 0 ? {} : { params: e.params }, ...e.field ? { fields: { [e.field]: s } } : {} }, n), z = "2099-01-01T00:00:00.000Z", Z = { id: 1, login: "admin", name: "Test Admin", email: "admin@test.com", locale: "en" };
4
- function M(n, s = {}, e = { level: "organization" }) {
4
+ `).join("") }), R = (n, s, e = {}) => a({ success: !1, error: s, code: s, ...e.params === void 0 ? {} : { params: e.params }, ...e.field ? { fields: { [e.field]: s } } : {} }, n), F = "2099-01-01T00:00:00.000Z", Z = { id: 1, login: "admin", name: "Test Admin", email: "admin@test.com", locale: "en" };
5
+ function z(n, s = {}, e = { level: "organization" }) {
5
6
  const i = e.id === void 0 ? { level: e.level } : { level: e.level, id: e.id };
6
7
  return {
7
8
  subject: { kind: "user", id: 1 },
8
9
  root: e.level === "organization",
9
- permissions: Object.fromEntries(n.map((o) => [o, { scope: i, qualifier: s[o] ?? "all", clauses: [] }]))
10
+ permissions: Object.fromEntries(n.map((l) => [l, { scope: i, qualifier: s[l] ?? "all", clauses: [] }]))
10
11
  };
11
12
  }
12
- function F(n = [], s = {}) {
13
- return { user: Z, expires_at: z, navigation: [], access: M(n), ...s };
13
+ function J(n = [], s = {}) {
14
+ return { user: Z, expires_at: F, navigation: [], access: z(n), ...s };
14
15
  }
15
- const J = (n = [], s = {}) => u(F(n, s));
16
- async function ae(n, s = [], e = {}) {
16
+ const W = (n = [], s = {}) => f(J(n, s));
17
+ async function le(n, s = [], e = {}) {
17
18
  await n.route(
18
19
  "**/api/v1/auth/me",
19
- (i) => i.fulfill(a(J(s, { user: { ...Z, ...e.user }, navigation: e.navigation ?? [], access: M(s, e.access, e.scope) })))
20
+ (i) => i.fulfill(a(W(s, { user: { ...Z, ...e.user }, navigation: e.navigation ?? [], access: z(s, e.access, e.scope) })))
20
21
  );
21
22
  }
22
- function S(n) {
23
- const s = n.request(), e = new URL(s.url()), i = s.method(), o = i === "GET" || !s.postData() ? void 0 : s.postDataJSON();
24
- return { method: i, url: e, path: e.pathname.replace(/^\/api\/v1/, ""), body: o };
23
+ function D(n) {
24
+ const s = n.request(), e = new URL(s.url()), i = s.method(), l = i === "GET" || !s.postData() ? void 0 : s.postDataJSON();
25
+ return { method: i, url: e, path: e.pathname.replace(/^\/api\/v1/, ""), body: l };
25
26
  }
26
- const W = { level: "organization", id: null, name: null }, re = (n, s, e) => ({ level: n, id: s, name: e }), D = (n, s = {}) => {
27
+ const B = { level: "organization", id: null, name: null }, ce = (n, s, e) => ({ level: n, id: s, name: e }), A = (n, s = {}) => {
27
28
  const e = /^\d+$/.test(n), i = s.grants ?? [];
28
29
  return {
29
30
  ref: n,
@@ -39,73 +40,73 @@ const W = { level: "organization", id: null, name: null }, re = (n, s, e) => ({
39
40
  ...s,
40
41
  grants: i
41
42
  };
42
- }, U = ({ grants: n, ...s }) => s, B = (n, s, e, i = null) => ({ id: n, role: U(s), scope: e, created_by: i, created_at: "2026-01-01T00:00:00Z" }), le = (n) => j(400, "authz.invalid", { params: { problems: n } }), H = (n, s) => {
43
- const e = new Map(n.grants.map((o) => [o.permission, o.qualifier])), i = new Map(s.grants.map((o) => [o.permission, o.qualifier]));
43
+ }, I = ({ grants: n, ...s }) => s, H = (n, s, e, i = null) => ({ id: n, role: I(s), scope: e, created_by: i, created_at: "2026-01-01T00:00:00Z" }), oe = (n) => R(400, "authz.invalid", { params: { problems: n } }), X = (n, s) => {
44
+ const e = new Map(n.grants.map((l) => [l.permission, l.qualifier])), i = new Map(s.grants.map((l) => [l.permission, l.qualifier]));
44
45
  return {
45
- only_in_role: n.grants.filter((o) => !i.has(o.permission)),
46
- only_in_other: s.grants.filter((o) => !e.has(o.permission)),
47
- different: n.grants.filter((o) => i.has(o.permission) && i.get(o.permission) !== o.qualifier).map((o) => ({ permission: o.permission, role: o.qualifier, other: i.get(o.permission) }))
46
+ only_in_role: n.grants.filter((l) => !i.has(l.permission)),
47
+ only_in_other: s.grants.filter((l) => !e.has(l.permission)),
48
+ different: n.grants.filter((l) => i.has(l.permission) && i.get(l.permission) !== l.qualifier).map((l) => ({ permission: l.permission, role: l.qualifier, other: i.get(l.permission) }))
48
49
  };
49
- }, X = (n, s) => {
50
+ }, Y = (n, s) => {
50
51
  const e = /* @__PURE__ */ new Map();
51
52
  for (const i of n)
52
- for (const o of s.find((t) => t.ref === i.role.ref)?.grants ?? []) {
53
- const t = e.get(o.permission) ?? { permission: o.permission, unavailable: !1, grants: [] };
54
- t.grants.push({ qualifier: o.qualifier, scope: i.scope, attrs: i.role.attrs, binding_id: i.id, role_key: i.role.key ?? "", role_name: i.role.name }), e.set(o.permission, t);
53
+ for (const l of s.find((t) => t.ref === i.role.ref)?.grants ?? []) {
54
+ const t = e.get(l.permission) ?? { permission: l.permission, unavailable: !1, grants: [] };
55
+ t.grants.push({ qualifier: l.qualifier, scope: i.scope, attrs: i.role.attrs, binding_id: i.id, role_key: i.role.key ?? "", role_name: i.role.name }), e.set(l.permission, t);
55
56
  }
56
57
  return [...e.values()];
57
- }, N = (n) => Math.max(0, ...n) + 1;
58
- async function ce(n, s = {}) {
58
+ }, C = (n) => Math.max(0, ...n) + 1;
59
+ async function ue(n, s = {}) {
59
60
  const e = {
60
61
  calls: [],
61
62
  roles: structuredClone(s.roles ?? []),
62
63
  bindings: structuredClone(s.bindings ?? {}),
63
64
  reads: []
64
65
  }, i = s.places ?? { root_level: "organization", root: !0, places: [] };
65
- let o = s.next?.role ?? N(e.roles.flatMap((l) => l.id === null ? [] : [l.id])), t = s.next?.binding ?? N(Object.values(e.bindings).flat().map((l) => l.id));
66
- const f = (l) => e.roles.find((d) => d.ref === l);
67
- return await n.route(/\/api\/v1\/iam\/(roles|bindable-roles|service-accounts\/bindable-roles|users\/\d+\/(access|scopes|bindings)|service-accounts\/\d+\/(access|scopes|bindings))/, async (l) => {
66
+ let l = s.next?.role ?? C(e.roles.flatMap((r) => r.id === null ? [] : [r.id])), t = s.next?.binding ?? C(Object.values(e.bindings).flat().map((r) => r.id));
67
+ const u = (r) => e.roles.find((d) => d.ref === r);
68
+ return await n.route(/\/api\/v1\/iam\/(roles|bindable-roles|service-accounts\/bindable-roles|users\/\d+\/(access|scopes|bindings)|service-accounts\/\d+\/(access|scopes|bindings))/, async (r) => {
68
69
  var _;
69
- const { method: d, url: p, path: v, body: g } = S(l);
70
- if (d !== "GET" ? e.calls.push({ method: d, path: v, body: g }) : e.reads.push(`${v}${p.search}`), await s.hook?.(l, p, d, g)) return;
71
- if (v === "/iam/bindable-roles" || v === "/iam/service-accounts/bindable-roles") return l.fulfill(a(u({ roles: s.bindable ?? e.roles.filter((r) => r.predefined) })));
70
+ const { method: d, url: p, path: v, body: g } = D(r);
71
+ if (d !== "GET" ? e.calls.push({ method: d, path: v, body: g }) : e.reads.push(`${v}${p.search}`), await s.hook?.(r, p, d, g)) return;
72
+ if (v === "/iam/bindable-roles" || v === "/iam/service-accounts/bindable-roles") return r.fulfill(a(f({ roles: s.bindable ?? e.roles.filter((c) => c.predefined) })));
72
73
  const m = /^\/iam\/roles(?:\/([^/]+)(?:\/(holders|compare|replace))?)?$/.exec(v);
73
74
  if (m) {
74
- const [, r, c] = m;
75
- if (!r) {
76
- if (d === "GET") return l.fulfill(a(u({ roles: e.roles.map(U) })));
77
- const b = g, E = D(String(o++), { name: b.name, description: b.description, grants: b.grants, attrs: b.attrs, holders: 0 });
78
- return e.roles.push(E), l.fulfill(a(u(E), 201));
75
+ const [, c, o] = m;
76
+ if (!c) {
77
+ if (d === "GET") return r.fulfill(a(f({ roles: e.roles.map(I) })));
78
+ const b = g, E = A(String(l++), { name: b.name, description: b.description, grants: b.grants, attrs: b.attrs, holders: 0 });
79
+ return e.roles.push(E), r.fulfill(a(f(E), 201));
79
80
  }
80
- const h = f(r);
81
- if (!h) return l.fulfill(a({ success: !1, message: "not found", code: "access.role_not_found" }, 404));
82
- if (c === "holders") return l.fulfill(a(u({ holders: s.holders?.[r] ?? [] })));
83
- if (c === "compare") {
84
- const b = f(p.searchParams.get("with") ?? "");
85
- return b ? l.fulfill(a(u(H(h, b)))) : l.fulfill(a({ success: !1, message: "not found" }, 404));
81
+ const h = u(c);
82
+ if (!h) return r.fulfill(a({ success: !1, message: "not found", code: "access.role_not_found" }, 404));
83
+ if (o === "holders") return r.fulfill(a(f({ holders: s.holders?.[c] ?? [] })));
84
+ if (o === "compare") {
85
+ const b = u(p.searchParams.get("with") ?? "");
86
+ return b ? r.fulfill(a(f(X(h, b)))) : r.fulfill(a({ success: !1, message: "not found" }, 404));
86
87
  }
87
- if (c === "replace") return l.fulfill(a(u({ rebound: h.holders })));
88
- if (d === "GET") return l.fulfill(a(u(h)));
88
+ if (o === "replace") return r.fulfill(a(f({ rebound: h.holders })));
89
+ if (d === "GET") return r.fulfill(a(f(h)));
89
90
  if (d === "DELETE")
90
- return e.roles = e.roles.filter((b) => b.ref !== r), l.fulfill(w());
91
+ return e.roles = e.roles.filter((b) => b.ref !== c), r.fulfill(w());
91
92
  const T = g;
92
- return Object.assign(h, { name: T.name, description: T.description, grants: T.grants, attrs: T.attrs, permission_count: T.grants.length }), l.fulfill(a(u(h)));
93
+ return Object.assign(h, { name: T.name, description: T.description, grants: T.grants, attrs: T.attrs, permission_count: T.grants.length }), r.fulfill(a(f(h)));
93
94
  }
94
95
  const y = /^\/iam\/(users|service-accounts)\/(\d+)\/(access|scopes|bindings)(?:\/(\d+))?$/.exec(v);
95
96
  if (y) {
96
- const [, r, c, h, T] = y, b = `${r === "users" ? "user" : "service"}:${c}`, E = (_ = e.bindings)[b] ?? (_[b] = []);
97
- if (h === "scopes") return l.fulfill(a(u(i)));
97
+ const [, c, o, h, T] = y, b = `${c === "users" ? "user" : "service"}:${o}`, E = (_ = e.bindings)[b] ?? (_[b] = []);
98
+ if (h === "scopes") return r.fulfill(a(f(i)));
98
99
  if (h === "access")
99
- return l.fulfill(a(u({ subject: { kind: r === "users" ? "user" : "service", id: Number(c) }, bindings: E, effective: X(E, e.roles), can_manage: s.canManage ?? !0 })));
100
+ return r.fulfill(a(f({ subject: { kind: c === "users" ? "user" : "service", id: Number(o) }, bindings: E, effective: Y(E, e.roles), can_manage: s.canManage ?? !0 })));
100
101
  if (d === "DELETE")
101
- return e.bindings[b] = E.filter((q) => q.id !== Number(T)), l.fulfill(w());
102
- const k = g, I = k.level === "organization" ? W : { level: k.level, id: k.scope_id ?? null, name: i.places.find((q) => q.id === k.scope_id && q.level === k.level)?.name ?? null }, P = B(t++, f(k.role_ref) ?? D(k.role_ref), I);
103
- return E.push(P), l.fulfill(a(u(P), 201));
102
+ return e.bindings[b] = E.filter((S) => S.id !== Number(T)), r.fulfill(w());
103
+ const k = g, U = k.level === "organization" ? B : { level: k.level, id: k.scope_id ?? null, name: i.places.find((S) => S.id === k.scope_id && S.level === k.level)?.name ?? null }, q = H(t++, u(k.role_ref) ?? A(k.role_ref), U);
104
+ return E.push(q), r.fulfill(a(f(q), 201));
104
105
  }
105
- return l.fallback();
106
+ return r.fallback();
106
107
  }), e;
107
108
  }
108
- const oe = (n, s, e = {}) => ({
109
+ const fe = (n, s, e = {}) => ({
109
110
  id: n,
110
111
  category: e.category ?? "general",
111
112
  title: s,
@@ -114,7 +115,7 @@ const oe = (n, s, e = {}) => ({
114
115
  data: {},
115
116
  read_at: e.read ? "2026-09-14T11:00:00Z" : null,
116
117
  created_at: "2026-09-14T12:00:00Z"
117
- }), C = (n, s = "default") => ({ enabled: n, source: s }), Y = (n, s, e = {}) => ({
118
+ }), N = (n, s = "default") => ({ enabled: n, source: s }), K = (n, s, e = {}) => ({
118
119
  id: n,
119
120
  label: s,
120
121
  platform: "windows",
@@ -125,7 +126,7 @@ const oe = (n, s, e = {}) => ({
125
126
  last_success_at: null,
126
127
  ...e
127
128
  });
128
- async function fe(n, s = {}) {
129
+ async function de(n, s = {}) {
129
130
  const e = {
130
131
  calls: [],
131
132
  items: s.items ?? [],
@@ -135,32 +136,32 @@ async function fe(n, s = {}) {
135
136
  devices: s.devices ?? [],
136
137
  streams: 0
137
138
  }, i = () => e.unread = s.unread ?? e.items.filter((t) => t.read_at === null).length;
138
- i(), await n.route(/\/api\/v1\/notifications(\/|\?|$)/, (t) => o(t));
139
- async function o(t) {
140
- const { method: f, url: l, body: d } = S(t), p = l.pathname.replace("/api/v1/notifications", "") || "/";
141
- f !== "GET" && e.calls.push({ method: f, path: p, body: d });
142
- const v = () => a(u({ unread_count: e.unread })), g = () => u({ items: e.devices });
139
+ i(), await n.route(/\/api\/v1\/notifications(\/|\?|$)/, (t) => l(t));
140
+ async function l(t) {
141
+ const { method: u, url: r, body: d } = D(t), p = r.pathname.replace("/api/v1/notifications", "") || "/";
142
+ u !== "GET" && e.calls.push({ method: u, path: p, body: d });
143
+ const v = () => a(f({ unread_count: e.unread })), g = () => f({ items: e.devices });
143
144
  if (p === "/stream")
144
- return e.streams++, t.fulfill(R(s.stream?.(e.streams, e) ?? [{ type: "unread", unread_count: e.unread }]));
145
- if (p === "/" && f === "GET") {
145
+ return e.streams++, t.fulfill(M(s.stream?.(e.streams, e) ?? [{ type: "unread", unread_count: e.unread }]));
146
+ if (p === "/" && u === "GET") {
146
147
  if (s.failList?.()) return t.fulfill(a({ success: !1, message: "Server error" }, 500));
147
- const r = Number(l.searchParams.get("before_id") ?? 0);
148
- return t.fulfill(a(u({ items: e.items.filter((c) => !r || c.id < r), has_more: !1 })));
148
+ const c = Number(r.searchParams.get("before_id") ?? 0);
149
+ return t.fulfill(a(f({ items: e.items.filter((o) => !c || o.id < c), has_more: !1 })));
149
150
  }
150
151
  if (p === "/unread") return t.fulfill(v());
151
152
  if (p === "/read") {
152
- const r = d.up_to_id;
153
- return e.items.forEach((c) => {
154
- c.id <= r && c.read_at === null && (c.read_at = "2026-09-14T12:30:00Z");
153
+ const c = d.up_to_id;
154
+ return e.items.forEach((o) => {
155
+ o.id <= c && o.read_at === null && (o.read_at = "2026-09-14T12:30:00Z");
155
156
  }), i(), t.fulfill(v());
156
157
  }
157
158
  const m = p.match(/^\/(\d+)\/read$/);
158
159
  if (m) {
159
- const r = e.items.find((c) => c.id === Number(m[1]));
160
- return r && (r.read_at = "2026-09-14T12:30:00Z"), i(), t.fulfill(v());
160
+ const c = e.items.find((o) => o.id === Number(m[1]));
161
+ return c && (c.read_at = "2026-09-14T12:30:00Z"), i(), t.fulfill(v());
161
162
  }
162
163
  if (p === "/preferences")
163
- return t.fulfill(a(u({
164
+ return t.fulfill(a(f({
164
165
  email_available: s.emailAvailable ?? !0,
165
166
  push_available: s.pushAvailable ?? s.push?.enabled ?? !1,
166
167
  categories: e.categories,
@@ -168,32 +169,32 @@ async function fe(n, s = {}) {
168
169
  time_zone: s.timeZone ?? "UTC"
169
170
  })));
170
171
  const y = p.match(/^\/preferences\/([^/]+?)(\/push)?$/);
171
- if (y && f === "PUT") {
172
- const r = e.categories.find((c) => c.category === decodeURIComponent(y[1]));
173
- return y[2] ? r.push = C(d.push, "person") : r.email = C(d.email, "person"), t.fulfill(a(u(r)));
172
+ if (y && u === "PUT") {
173
+ const c = e.categories.find((o) => o.category === decodeURIComponent(y[1]));
174
+ return y[2] ? c.push = N(d.push, "person") : c.email = N(d.email, "person"), t.fulfill(a(f(c)));
174
175
  }
175
176
  if (p === "/quiet-hours")
176
- return e.quiet = d, t.fulfill(a(u(e.quiet)));
177
- if (p === "/push") return t.fulfill(a(u(s.push ?? { enabled: !1, public_key: "" })));
178
- if (p === "/devices" && f === "GET") return t.fulfill(a(g()));
179
- if (p === "/devices" && f === "POST") {
180
- const r = s.registers ?? Y(1, "Mac · Chrome", { platform: "macos" });
181
- return e.devices = [r, ...e.devices.filter((c) => c.id !== r.id)], t.fulfill(a(u(r)));
177
+ return e.quiet = d, t.fulfill(a(f(e.quiet)));
178
+ if (p === "/push") return t.fulfill(a(f(s.push ?? { enabled: !1, public_key: "" })));
179
+ if (p === "/devices" && u === "GET") return t.fulfill(a(g()));
180
+ if (p === "/devices" && u === "POST") {
181
+ const c = s.registers ?? K(1, "Mac · Chrome", { platform: "macos" });
182
+ return e.devices = [c, ...e.devices.filter((o) => o.id !== c.id)], t.fulfill(a(f(c)));
182
183
  }
183
184
  if (p === "/devices/unsubscribe") {
184
- const r = s.registers;
185
- return e.devices = e.devices.filter((c) => c.endpoint_hash !== r?.endpoint_hash), t.fulfill(a(g()));
185
+ const c = s.registers;
186
+ return e.devices = e.devices.filter((o) => o.endpoint_hash !== c?.endpoint_hash), t.fulfill(a(g()));
186
187
  }
187
188
  const _ = p.match(/^\/devices\/(\d+)(\/test)?$/);
188
189
  if (_) {
189
- const r = Number(_[1]);
190
- return f === "PATCH" && (e.devices = e.devices.map((c) => c.id === r ? { ...c, label: d.label } : c)), f === "DELETE" && (e.devices = e.devices.filter((c) => c.id !== r)), t.fulfill(a(f === "PATCH" ? u(e.devices.find((c) => c.id === r)) : g()));
190
+ const c = Number(_[1]);
191
+ return u === "PATCH" && (e.devices = e.devices.map((o) => o.id === c ? { ...o, label: d.label } : o)), u === "DELETE" && (e.devices = e.devices.filter((o) => o.id !== c)), t.fulfill(a(u === "PATCH" ? f(e.devices.find((o) => o.id === c)) : g()));
191
192
  }
192
- return t.fulfill(a(u({})));
193
+ return t.fulfill(a(f({})));
193
194
  }
194
195
  return e;
195
196
  }
196
- const K = "2099-01-01T09:30:00.000Z", Q = "2020-01-01T00:00:00.000Z", $ = "new@example.test", A = (n) => new Date(Date.now() - n * 6e4).toISOString(), V = (n = {}) => ({
197
+ const Q = "2099-01-01T09:30:00.000Z", V = "2020-01-01T00:00:00.000Z", $ = "new@example.test", P = (n) => new Date(Date.now() - n * 6e4).toISOString(), ee = (n = {}) => ({
197
198
  id: 1,
198
199
  login: "admin",
199
200
  name: "Test Admin",
@@ -203,44 +204,44 @@ const K = "2099-01-01T09:30:00.000Z", Q = "2020-01-01T00:00:00.000Z", $ = "new@e
203
204
  created_at: "2025-02-03T10:12:00Z",
204
205
  pending_email: null,
205
206
  ...n
206
- }), ee = (n = {}) => ({ email: $, expires_at: K, resend_available_at: Q, attempts_left: 3, ...n }), se = (n, s, e = {}) => ({
207
+ }), se = (n = {}) => ({ email: $, expires_at: Q, resend_available_at: V, attempts_left: 3, ...n }), ne = (n, s, e = {}) => ({
207
208
  id: n,
208
209
  device: s,
209
210
  ip: "10.20.4.12",
210
211
  opened_by: null,
211
212
  current: !1,
212
- last_used_at: A(2),
213
+ last_used_at: P(2),
213
214
  expires_at: new Date(Date.now() + 6 * 36e5).toISOString(),
214
- created_at: A(300),
215
+ created_at: P(300),
215
216
  ...e
216
- }), ne = (n, s, e = {}) => ({
217
+ }), ie = (n, s, e = {}) => ({
217
218
  id: n,
218
219
  event: s,
219
220
  ip: "93.142.8.201",
220
221
  device: "Chrome · Windows",
221
222
  actor: null,
222
- created_at: A(n * 20),
223
+ created_at: P(n * 20),
223
224
  ...e
224
225
  });
225
- async function ue(n, s = {}) {
226
- const e = [], i = s.answers ?? {}, o = () => ee({ email: s.newEmail ?? $ }), t = { profile: s.profile ?? V(), sessions: s.sessions ?? [se(11, "Chrome · Linux", { current: !0 })], signins: s.signins ?? [ne(1, "signed_in")] };
227
- return await n.route("**/api/v1/iam/profile**", (f) => {
228
- const { method: l, path: d, body: p } = S(f);
229
- if (l !== "GET" && e.push({ method: l, path: d, body: p ?? null }), d === "/iam/profile" && l === "GET") return f.fulfill(a(u(t.profile)));
230
- if (d === "/iam/profile/email" && l === "POST")
231
- return i.request ? f.fulfill(i.request()) : (t.profile = { ...t.profile, pending_email: o() }, f.fulfill(a(u(o()))));
232
- if (d === "/iam/profile/email/resend") return f.fulfill(i.resend ? i.resend() : a(u(o())));
226
+ async function me(n, s = {}) {
227
+ const e = [], i = s.answers ?? {}, l = () => se({ email: s.newEmail ?? $ }), t = { profile: s.profile ?? ee(), sessions: s.sessions ?? [ne(11, "Chrome · Linux", { current: !0 })], signins: s.signins ?? [ie(1, "signed_in")] };
228
+ return await n.route("**/api/v1/iam/profile**", (u) => {
229
+ const { method: r, path: d, body: p } = D(u);
230
+ if (r !== "GET" && e.push({ method: r, path: d, body: p ?? null }), d === "/iam/profile" && r === "GET") return u.fulfill(a(f(t.profile)));
231
+ if (d === "/iam/profile/email" && r === "POST")
232
+ return i.request ? u.fulfill(i.request()) : (t.profile = { ...t.profile, pending_email: l() }, u.fulfill(a(f(l()))));
233
+ if (d === "/iam/profile/email/resend") return u.fulfill(i.resend ? i.resend() : a(f(l())));
233
234
  if (d === "/iam/profile/email/confirm")
234
- return i.confirm ? f.fulfill(i.confirm()) : (t.profile = { ...t.profile, email: s.newEmail ?? $, pending_email: null }, f.fulfill(a(u(t.profile))));
235
- if (d === "/iam/profile/email" && l === "DELETE")
236
- return i.cancel ? f.fulfill(i.cancel()) : (t.profile = { ...t.profile, pending_email: null }, f.fulfill(w()));
237
- if (d === "/iam/profile/password") return f.fulfill(i.password ? i.password() : w());
238
- if (d === "/iam/profile/sessions" && l === "GET") return f.fulfill(a(u({ sessions: t.sessions })));
235
+ return i.confirm ? u.fulfill(i.confirm()) : (t.profile = { ...t.profile, email: s.newEmail ?? $, pending_email: null }, u.fulfill(a(f(t.profile))));
236
+ if (d === "/iam/profile/email" && r === "DELETE")
237
+ return i.cancel ? u.fulfill(i.cancel()) : (t.profile = { ...t.profile, pending_email: null }, u.fulfill(w()));
238
+ if (d === "/iam/profile/password") return u.fulfill(i.password ? i.password() : w());
239
+ if (d === "/iam/profile/sessions" && r === "GET") return u.fulfill(a(f({ sessions: t.sessions })));
239
240
  const v = /^\/iam\/profile\/sessions\/(\d+)$/.exec(d);
240
- return v && l === "DELETE" ? (t.sessions = t.sessions.filter((g) => g.id !== Number(v[1])), f.fulfill(w())) : d === "/iam/profile/signins" ? f.fulfill(a(O(t.signins))) : f.fallback();
241
+ return v && r === "DELETE" ? (t.sessions = t.sessions.filter((g) => g.id !== Number(v[1])), u.fulfill(w())) : d === "/iam/profile/signins" ? u.fulfill(a(O(t.signins))) : u.fallback();
241
242
  }), { calls: e, state: t };
242
243
  }
243
- const x = (n) => new Date(Date.now() - n * 6e4).toISOString(), G = (n, s, e = {}) => ({
244
+ const x = (n) => new Date(Date.now() - n * 6e4).toISOString(), L = (n, s, e = {}) => ({
244
245
  id: n,
245
246
  login: s.split(" ")[0].toLowerCase(),
246
247
  name: s,
@@ -253,7 +254,7 @@ const x = (n) => new Date(Date.now() - n * 6e4).toISOString(), G = (n, s, e = {}
253
254
  locked_until: null,
254
255
  created_at: "2025-02-03T10:12:00Z",
255
256
  ...e
256
- }), de = (n, s, e = {}) => ({
257
+ }), pe = (n, s, e = {}) => ({
257
258
  id: n,
258
259
  device: s,
259
260
  ip: "10.20.4.12",
@@ -263,7 +264,7 @@ const x = (n) => new Date(Date.now() - n * 6e4).toISOString(), G = (n, s, e = {}
263
264
  opened_by: null,
264
265
  current: !1,
265
266
  ...e
266
- }), me = (n, s, e = {}) => ({
267
+ }), ge = (n, s, e = {}) => ({
267
268
  id: n,
268
269
  event: s,
269
270
  ip: "93.142.8.201",
@@ -271,7 +272,7 @@ const x = (n) => new Date(Date.now() - n * 6e4).toISOString(), G = (n, s, e = {}
271
272
  actor: null,
272
273
  created_at: x(n * 20),
273
274
  ...e
274
- }), pe = (n, s, e = {}) => ({
275
+ }), ve = (n, s, e = {}) => ({
275
276
  id: n,
276
277
  action: s,
277
278
  fields: [],
@@ -280,7 +281,7 @@ const x = (n) => new Date(Date.now() - n * 6e4).toISOString(), G = (n, s, e = {}
280
281
  actor: { id: 4, name: "Test Manager" },
281
282
  created_at: x(n * 90),
282
283
  ...e
283
- }), ge = (n, s, e, i, o = {}) => ({
284
+ }), he = (n, s, e, i, l = {}) => ({
284
285
  id: n,
285
286
  area: "general",
286
287
  record_type: s,
@@ -288,8 +289,8 @@ const x = (n) => new Date(Date.now() - n * 6e4).toISOString(), G = (n, s, e = {}
288
289
  action: i,
289
290
  signed_in_as: null,
290
291
  created_at: x(n * 40),
291
- ...o
292
- }), ve = (n, s, e = {}) => ({
292
+ ...l
293
+ }), _e = (n, s, e = {}) => ({
293
294
  id: n,
294
295
  name: s,
295
296
  description: "",
@@ -301,7 +302,7 @@ const x = (n) => new Date(Date.now() - n * 6e4).toISOString(), G = (n, s, e = {}
301
302
  last_used_at: x(3),
302
303
  deactivated_at: null,
303
304
  ...e
304
- }), ie = (n = {}) => ({
305
+ }), te = (n = {}) => ({
305
306
  people: [],
306
307
  sessions: [],
307
308
  signins: [],
@@ -311,93 +312,113 @@ const x = (n) => new Date(Date.now() - n * 6e4).toISOString(), G = (n, s, e = {}
311
312
  keys: {},
312
313
  notManageable: !1,
313
314
  ...n
314
- }), L = (n) => a({ success: !1, error: "not found", message: "not found", ...n ? { code: n } : {} }, 404);
315
- async function he(n, s = {}) {
316
- const e = s.writes ?? [], i = s.state ?? ie(), o = ({ method: t, path: f, url: l, body: d }) => {
317
- if (f === "/iam/users" && t === "GET") {
318
- const g = l.searchParams.get("view") ?? "active", m = (l.searchParams.get("search") ?? "").toLowerCase(), y = i.people.filter((r) => (!m || r.name.toLowerCase().includes(m)) && (s.filter?.(r, l.searchParams) ?? !0)), _ = (r) => y.filter((c) => r === "all" || c.status === r).length;
319
- return a(O(y.filter((r) => g === "all" || r.status === g), ["active", "locked", "inactive", "all"].map((r) => ({ key: r, count: _(r) }))));
315
+ }), G = (n) => a({ success: !1, error: "not found", message: "not found", ...n ? { code: n } : {} }, 404);
316
+ async function be(n, s = {}) {
317
+ const e = s.writes ?? [], i = s.state ?? te(), l = ({ method: t, path: u, url: r, body: d }) => {
318
+ if (u === "/iam/users" && t === "GET") {
319
+ const g = r.searchParams.get("view") ?? "active", m = (r.searchParams.get("search") ?? "").toLowerCase(), y = i.people.filter((c) => (!m || c.name.toLowerCase().includes(m)) && (s.filter?.(c, r.searchParams) ?? !0)), _ = (c) => y.filter((o) => c === "all" || o.status === c).length;
320
+ return a(O(y.filter((c) => g === "all" || c.status === g), ["active", "locked", "inactive", "all"].map((c) => ({ key: c, count: _(c) }))));
320
321
  }
321
- if (f === "/iam/users" && t === "POST") {
322
- const g = d, m = G(Math.max(0, ...i.people.map((y) => y.id)) + 1, g.name, g);
323
- return i.people.push(m), a(u(m));
322
+ if (u === "/iam/users" && t === "POST") {
323
+ const g = d, m = L(Math.max(0, ...i.people.map((y) => y.id)) + 1, g.name, g);
324
+ return i.people.push(m), a(f(m));
324
325
  }
325
- const p = /^\/iam\/users\/(\d+)(?:\/(.*))?$/.exec(f);
326
+ const p = /^\/iam\/users\/(\d+)(?:\/(.*))?$/.exec(u);
326
327
  if (p) {
327
- const g = Number(p[1]), m = p[2] ?? "", _ = i.people.find((c) => c.id === g) ?? G(g, "Unknown Person");
328
+ const g = Number(p[1]), m = p[2] ?? "", _ = i.people.find((o) => o.id === g) ?? L(g, "Unknown Person");
328
329
  if (m === "") {
329
330
  if (t === "PUT") {
330
- const c = d, h = c.ext === void 0 ? _.ext : { ..._.ext, ...c.ext };
331
- return a(u({ ..._, ...c, ...h === void 0 ? {} : { ext: h } }));
331
+ const o = d, h = o.ext === void 0 ? _.ext : { ..._.ext, ...o.ext };
332
+ return a(f({ ..._, ...o, ...h === void 0 ? {} : { ext: h } }));
332
333
  }
333
- return t === "DELETE" ? w() : a(u(_));
334
+ return t === "DELETE" ? w() : a(f(_));
334
335
  }
335
- if (m === "sessions" && t === "GET") return a(u({ sessions: i.sessions }));
336
+ if (m === "sessions" && t === "GET") return a(f({ sessions: i.sessions }));
336
337
  if (m === "sessions" && t === "DELETE")
337
338
  return i.sessions = [], w();
338
- const r = /^sessions\/(\d+)$/.exec(m);
339
- if (r && t === "DELETE")
340
- return i.sessions = i.sessions.filter((c) => c.id !== Number(r[1])), w();
339
+ const c = /^sessions\/(\d+)$/.exec(m);
340
+ if (c && t === "DELETE")
341
+ return i.sessions = i.sessions.filter((o) => o.id !== Number(c[1])), w();
341
342
  if (m === "signins") {
342
- const h = l.searchParams.get("view") === "failed" ? i.signins.filter((T) => ["wrong_password", "locked_out", "refused_inactive"].includes(T.event)) : i.signins;
343
+ const h = r.searchParams.get("view") === "failed" ? i.signins.filter((T) => ["wrong_password", "locked_out", "refused_inactive"].includes(T.event)) : i.signins;
343
344
  return a(O(h, [{ key: "all", count: i.signins.length }, { key: "failed", count: i.signins.filter((T) => ["wrong_password", "locked_out", "refused_inactive"].includes(T.event)).length }]));
344
345
  }
345
346
  if (m === "changes") return a(O(i.changes, [{ key: "all", count: i.changes.length }]));
346
347
  if (m === "activity") {
347
- const c = l.searchParams.get("area");
348
- return a(O(c ? i.activity.filter((h) => h.area === c) : i.activity, [{ key: "all", count: i.activity.length }]));
348
+ const o = r.searchParams.get("area");
349
+ return a(O(o ? i.activity.filter((h) => h.area === o) : i.activity, [{ key: "all", count: i.activity.length }]));
349
350
  }
350
- return m === "deactivate" || m === "activate" ? a(u({})) : m === "password" ? w() : m === "unlock" ? (_.locked_until = null, _.status = "active", a(u({ unlocked: !0 }))) : void 0;
351
+ return m === "deactivate" || m === "activate" ? a(f({})) : m === "password" ? w() : m === "unlock" ? (_.locked_until = null, _.status = "active", a(f({ unlocked: !0 }))) : void 0;
351
352
  }
352
- if (f === "/iam/service-accounts") return a(u({ service_accounts: i.serviceAccounts }));
353
- const v = /^\/iam\/service-accounts\/(\d+)(?:\/(keys))?$/.exec(f);
353
+ if (u === "/iam/service-accounts") return a(f({ service_accounts: i.serviceAccounts }));
354
+ const v = /^\/iam\/service-accounts\/(\d+)(?:\/(keys))?$/.exec(u);
354
355
  if (v && t === "GET") {
355
356
  const g = i.serviceAccounts.find((m) => m.id === Number(v[1]));
356
- return g ? a(u(v[2] ? { keys: i.keys[g.id] ?? [] } : g)) : L();
357
+ return g ? a(f(v[2] ? { keys: i.keys[g.id] ?? [] } : g)) : G();
357
358
  }
358
359
  };
359
360
  return await n.route(/\/api\/v1\/iam\/(users|service-accounts)(\/|\?|$)/, (t) => {
360
- const { method: f, url: l, path: d, body: p } = S(t), v = { method: f, path: d, url: l, body: p }, m = (f !== "GET" && i.notManageable && /^\/iam\/users\/\d+/.test(d) ? L("identity.account.not_found") : void 0) ?? s.hook?.(v, i) ?? o(v);
361
- return m ? (f !== "GET" && e.push({ method: f, path: d, body: p ?? null }), t.fulfill(m)) : t.fallback();
361
+ const { method: u, url: r, path: d, body: p } = D(t), v = { method: u, path: d, url: r, body: p }, m = (u !== "GET" && i.notManageable && /^\/iam\/users\/\d+/.test(d) ? G("identity.account.not_found") : void 0) ?? s.hook?.(v, i) ?? l(v);
362
+ return m ? (u !== "GET" && e.push({ method: u, path: d, body: p ?? null }), t.fulfill(m)) : t.fallback();
362
363
  }), { writes: e, state: i };
363
364
  }
365
+ function ye(n = {}, s = {}) {
366
+ const e = Number(process.env.E2E_PORT || n.port || 5173), i = `http://127.0.0.1:${e}`, l = !!process.env.CI;
367
+ n.timezone && (process.env.TZ = n.timezone);
368
+ const { use: t, webServer: u, ...r } = s;
369
+ return {
370
+ testDir: n.testDir ?? "./e2e",
371
+ testIgnore: n.ignore ?? [],
372
+ outputDir: "./e2e-results",
373
+ fullyParallel: !0,
374
+ forbidOnly: l,
375
+ retries: l ? 2 : 0,
376
+ workers: l ? 2 : void 0,
377
+ reporter: [[l ? "github" : "html"], ["json", { outputFile: n.report ?? "e2e-timings/results.json" }]],
378
+ use: { baseURL: i, ...n.timezone ? { timezoneId: n.timezone } : {}, trace: "on-first-retry", ...t },
379
+ projects: [{ name: "chromium", use: { ...j["Desktop Chrome"] } }],
380
+ webServer: { command: `npm run dev -- --port ${e}`, url: i, reuseExistingServer: !l, timeout: 3e4, ...u },
381
+ ...r
382
+ };
383
+ }
364
384
  export {
365
385
  $ as NEW_EMAIL,
366
- W as ORGANIZATION,
367
- M as accessOf,
368
- ge as activity,
386
+ B as ORGANIZATION,
387
+ z as accessOf,
388
+ he as activity,
369
389
  x as ago,
370
- J as authBody,
371
- F as authResponse,
372
- B as bindingOf,
373
- pe as change,
390
+ W as authBody,
391
+ J as authResponse,
392
+ H as bindingOf,
393
+ ve as change,
374
394
  O as datatable,
375
395
  Z as defaultUser,
376
- Y as device,
377
- ie as freshState,
378
- le as invalid,
396
+ K as device,
397
+ te as freshState,
398
+ oe as invalid,
379
399
  a as json,
380
- ae as mockAuth,
400
+ le as mockAuth,
381
401
  w as noContent,
382
- oe as notification,
383
- u as ok,
384
- se as ownSession,
385
- ne as ownSignin,
386
- te as pageOk,
387
- ee as pendingChange,
388
- G as person,
389
- V as profile,
390
- j as refusal,
391
- D as role,
392
- re as scopeOf,
393
- ce as serveAccess,
394
- fe as serveNotifications,
395
- ue as serveProfile,
396
- he as serveUsers,
397
- ve as serviceAccount,
398
- de as session,
399
- C as setting,
400
- me as signin,
401
- R as sse,
402
- U as summary
402
+ fe as notification,
403
+ f as ok,
404
+ ne as ownSession,
405
+ ie as ownSignin,
406
+ ae as pageOk,
407
+ se as pendingChange,
408
+ L as person,
409
+ ye as playwrightConfig,
410
+ ee as profile,
411
+ R as refusal,
412
+ A as role,
413
+ ce as scopeOf,
414
+ ue as serveAccess,
415
+ de as serveNotifications,
416
+ me as serveProfile,
417
+ be as serveUsers,
418
+ _e as serviceAccount,
419
+ pe as session,
420
+ N as setting,
421
+ ge as signin,
422
+ M as sse,
423
+ I as summary
403
424
  };
@@ -1,7 +1,7 @@
1
1
  import { p as g, u as m, a as l, b as R } from "../routeResource-DlTsGTg_.js";
2
2
  import { c as a } from "../current-CslcEPXp.js";
3
3
  import { A as n } from "../error-CD7x0Jrz.js";
4
- import { _ as w, a as x } from "../ResourcePage.vue_vue_type_script_setup_true_lang-uLrX13ab.js";
4
+ import { _ as w, a as x } from "../ResourcePage.vue_vue_type_script_setup_true_lang-1iZtj3rh.js";
5
5
  async function i(t, e) {
6
6
  return (await a().platform.http.get(t, { signal: e.signal })).data;
7
7
  }
@@ -1,9 +1,9 @@
1
1
  import { _ as a, c as o, a as r, i as t } from "../NoAccess.vue_vue_type_script_setup_true_lang-BHzZtZ50.js";
2
2
  import { d as c } from "../defineRoutes-BGAdiIrt.js";
3
3
  import { A as u, f as p, i as f, r as A, u as m } from "../access-DmAceEo5.js";
4
- import { i as l, r as x } from "../guards-6fJxfUtk.js";
5
- import { u as y } from "../sections-DI_JhgQG.js";
6
- import { b as v, c as N, n as H, u as b } from "../navigation-DMJ6akat.js";
4
+ import { i as l, r as x } from "../guards-CNJ0ATVC.js";
5
+ import { u as y } from "../sections-BpiRLntE.js";
6
+ import { b as v, c as N, n as H, u as b } from "../navigation-d-JAPBGA.js";
7
7
  export {
8
8
  u as AppRouterView,
9
9
  a as NoAccess,
@@ -41,7 +41,7 @@ export interface RouteSections {
41
41
  *
42
42
  * A section the session may not open (`meta.access`) is left out. A page inside a section is a
43
43
  * sibling route without `meta.section` and with `meta.sectionParent` naming the section's route.
44
- * Links keep the query (a list's state) and carry only the params their own path declares.
44
+ * Links keep the query (a list's state, `?back=`) and carry only the params their own path declares.
45
45
  */
46
46
  export declare function useRouteSections(): RouteSections;
47
47
  /**
@@ -6,9 +6,9 @@ import { _ as J } from "./Icon.vue_vue_type_script_lang-BhhsFYwp.js";
6
6
  import { _ as Ne } from "./Menu.vue_vue_type_script_setup_true_lang-Cqu4Ebsb.js";
7
7
  import { _ as ze } from "./Tooltip.vue_vue_type_script_setup_true_lang-C1C1qeBj.js";
8
8
  import { _ as he } from "./EmptyState.vue_vue_type_script_setup_true_lang-DbZiO2RF.js";
9
- import { u as Fe } from "./format-Cp1h0vsC.js";
9
+ import { u as Fe } from "./format-C_HXlOYQ.js";
10
10
  import { _ as Ve } from "./Badge.vue_vue_type_script_setup_true_lang-DJyZc0C7.js";
11
- import { _ as Oe } from "./Timestamp.vue_vue_type_script_setup_true_lang-jCXYFLtq.js";
11
+ import { _ as Oe } from "./Timestamp.vue_vue_type_script_setup_true_lang-d_KuxWjH.js";
12
12
  import { _ as me } from "./Highlight.vue_vue_type_script_setup_true_lang-DZGBmwcX.js";
13
13
  import { a as je } from "./mediaQuery-CygcXmFW.js";
14
14
  const Ue = ["data-row-click-ignore"], be = "col-start-1 row-start-1", Ye = "col-span-full row-start-2 max-w-full", ke = /* @__PURE__ */ oe({