zudoku 0.66.0 → 0.66.2

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 (105) hide show
  1. package/dist/config/validators/validate.d.ts +0 -2
  2. package/dist/config/validators/validate.js +0 -1
  3. package/dist/config/validators/validate.js.map +1 -1
  4. package/dist/flat-config.d.ts +1 -1
  5. package/dist/lib/authentication/ui/ZudokuAuthUi.js +5 -1
  6. package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -1
  7. package/dist/vite/config.js +1 -4
  8. package/dist/vite/config.js.map +1 -1
  9. package/lib/ActionButton-DUgvSylL.js +25 -0
  10. package/lib/ActionButton-DUgvSylL.js.map +1 -0
  11. package/lib/{ClaudeLogo-PxFjou9w.js → ClaudeLogo-CGRfGTk2.js} +2 -2
  12. package/lib/{ClaudeLogo-PxFjou9w.js.map → ClaudeLogo-CGRfGTk2.js.map} +1 -1
  13. package/lib/Drawer-Ci7XwhqT.js.map +1 -1
  14. package/lib/{ErrorAlert-BqjbNHIn.js → ErrorAlert-BUlG32M9.js} +6 -6
  15. package/lib/{ErrorAlert-BqjbNHIn.js.map → ErrorAlert-BUlG32M9.js.map} +1 -1
  16. package/lib/{MdxPage-CVFatbHw.js → MdxPage-Bjf72BP3.js} +7 -7
  17. package/lib/{MdxPage-CVFatbHw.js.map → MdxPage-Bjf72BP3.js.map} +1 -1
  18. package/lib/{Mermaid-CIFixY6C.js → Mermaid-D_VSX7_Q.js} +3 -3
  19. package/lib/{Mermaid-CIFixY6C.js.map → Mermaid-D_VSX7_Q.js.map} +1 -1
  20. package/lib/{OAuthErrorPage-Dup79DJk.js → OAuthErrorPage-1Ekji0PK.js} +6 -6
  21. package/lib/{OAuthErrorPage-Dup79DJk.js.map → OAuthErrorPage-1Ekji0PK.js.map} +1 -1
  22. package/lib/{OasProvider-BJeMq29o.js → OasProvider-BZxmTyMM.js} +3 -3
  23. package/lib/{OasProvider-BJeMq29o.js.map → OasProvider-BZxmTyMM.js.map} +1 -1
  24. package/lib/{OperationList-ff3ZvQsO.js → OperationList-B7nPIFB8.js} +329 -348
  25. package/lib/OperationList-B7nPIFB8.js.map +1 -0
  26. package/lib/{RouteGuard-BXy13JSz.js → RouteGuard-9wjejsKm.js} +3 -3
  27. package/lib/{RouteGuard-BXy13JSz.js.map → RouteGuard-9wjejsKm.js.map} +1 -1
  28. package/lib/{RouterError-CKOZTsDD.js → RouterError-DfTZblpv.js} +2 -2
  29. package/lib/{RouterError-CKOZTsDD.js.map → RouterError-DfTZblpv.js.map} +1 -1
  30. package/lib/{SchemaList-BSC1KM3v.js → SchemaList-16_obkku.js} +7 -7
  31. package/lib/{SchemaList-BSC1KM3v.js.map → SchemaList-16_obkku.js.map} +1 -1
  32. package/lib/{SchemaView-CgwJ9gtb.js → SchemaView-eyvR4bRt.js} +3 -3
  33. package/lib/{SchemaView-CgwJ9gtb.js.map → SchemaView-eyvR4bRt.js.map} +1 -1
  34. package/lib/Select-CkxXP5I7.js +243 -0
  35. package/lib/Select-CkxXP5I7.js.map +1 -0
  36. package/lib/Separator-CTPSeW1S.js +27 -0
  37. package/lib/Separator-CTPSeW1S.js.map +1 -0
  38. package/lib/{SignUp-Pm_LGm6T.js → SignUp-D54_QWFy.js} +3 -3
  39. package/lib/{SignUp-Pm_LGm6T.js.map → SignUp-D54_QWFy.js.map} +1 -1
  40. package/lib/{SyntaxHighlight-bkmst3oV.js → SyntaxHighlight-j_HRSPCU.js} +1508 -1492
  41. package/lib/SyntaxHighlight-j_HRSPCU.js.map +1 -0
  42. package/lib/{Toc-TUXNFbKl.js → Toc-z05x698-.js} +2 -2
  43. package/lib/{Toc-TUXNFbKl.js.map → Toc-z05x698-.js.map} +1 -1
  44. package/lib/{ZudokuContext-np1wheDl.js → ZudokuContext-BXldanA8.js} +5 -5
  45. package/lib/{ZudokuContext-np1wheDl.js.map → ZudokuContext-BXldanA8.js.map} +1 -1
  46. package/lib/chunk-PVWAREVJ-dLIqswPy.js.map +1 -1
  47. package/lib/{circular-XPj_dwqA.js → circular-D5sYCIWL.js} +2 -2
  48. package/lib/{circular-XPj_dwqA.js.map → circular-D5sYCIWL.js.map} +1 -1
  49. package/lib/{createServer-D01nCTNp.js → createServer-BlwU7lIr.js} +4 -4
  50. package/lib/{createServer-D01nCTNp.js.map → createServer-BlwU7lIr.js.map} +1 -1
  51. package/lib/createVariantComponent-B9_dVBvu.js +35 -0
  52. package/lib/createVariantComponent-B9_dVBvu.js.map +1 -0
  53. package/lib/{errors-B0hNTPFO.js → errors-BtC4Kn2j.js} +2 -2
  54. package/lib/{errors-B0hNTPFO.js.map → errors-BtC4Kn2j.js.map} +1 -1
  55. package/lib/firebase-Ibm_tv3G.js +7366 -0
  56. package/lib/firebase-Ibm_tv3G.js.map +1 -0
  57. package/lib/{hook-CvSwcbk6.js → hook-BNxidGQq.js} +2 -2
  58. package/lib/{hook-CvSwcbk6.js.map → hook-BNxidGQq.js.map} +1 -1
  59. package/lib/{index-Bjc_QsUR.js → index-CeVTNcfF.js} +452 -476
  60. package/lib/index-CeVTNcfF.js.map +1 -0
  61. package/lib/index-CrcNWbel.js.map +1 -1
  62. package/lib/{index-DnMgJWrI.js → index-Css56y3F.js} +3 -3
  63. package/lib/{index-DnMgJWrI.js.map → index-Css56y3F.js.map} +1 -1
  64. package/lib/{index-mfkNWYG-.js → index-DSOi7zVM.js} +5 -5
  65. package/lib/{index-mfkNWYG-.js.map → index-DSOi7zVM.js.map} +1 -1
  66. package/lib/{index-DscsS121.js → index-eKVhlB94.js} +2 -2
  67. package/lib/{index-DscsS121.js.map → index-eKVhlB94.js.map} +1 -1
  68. package/lib/index.esm-BYObtETB.js.map +1 -1
  69. package/lib/index.esm-BoKBnRoT.js +32 -0
  70. package/lib/index.esm-BoKBnRoT.js.map +1 -0
  71. package/lib/index.esm-DtzT_KoE.js.map +1 -1
  72. package/lib/jsx-runtime-BzflLqGi.js.map +1 -1
  73. package/lib/{mutation-BlmnL5qL.js → mutation-BoVlx8yA.js} +2 -2
  74. package/lib/{mutation-BlmnL5qL.js.map → mutation-BoVlx8yA.js.map} +1 -1
  75. package/lib/ui/Carousel.js.map +1 -1
  76. package/lib/ui/SyntaxHighlight.js +2 -2
  77. package/lib/useMutation-C6RqWmTS.js +97 -0
  78. package/lib/useMutation-C6RqWmTS.js.map +1 -0
  79. package/lib/zudoku.__internal.js +6 -6
  80. package/lib/zudoku.__internal.js.map +1 -1
  81. package/lib/zudoku.auth-auth0.js +1 -1
  82. package/lib/zudoku.auth-azureb2c.js +4 -4
  83. package/lib/zudoku.auth-clerk.js +2 -2
  84. package/lib/zudoku.auth-firebase.js +9 -0
  85. package/lib/zudoku.auth-firebase.js.map +1 -0
  86. package/lib/zudoku.auth-openid.js +4 -4
  87. package/lib/zudoku.auth-supabase.js +4 -4
  88. package/lib/zudoku.components.js +5 -5
  89. package/lib/zudoku.hooks.js +3 -3
  90. package/lib/zudoku.mermaid.js +3 -3
  91. package/lib/zudoku.plugin-api-catalog.js +4 -4
  92. package/lib/zudoku.plugin-api-keys.js +162 -178
  93. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  94. package/lib/zudoku.plugin-custom-pages.js +1 -1
  95. package/lib/zudoku.plugin-markdown.js +1 -1
  96. package/lib/zudoku.plugin-openapi.js +2 -2
  97. package/lib/zudoku.plugin-search-pagefind.js +2 -2
  98. package/lib/zudoku.router.js.map +1 -1
  99. package/package.json +19 -15
  100. package/src/lib/authentication/ui/ZudokuAuthUi.tsx +11 -1
  101. package/lib/OperationList-ff3ZvQsO.js.map +0 -1
  102. package/lib/Select-VmDZ-nKe.js +0 -337
  103. package/lib/Select-VmDZ-nKe.js.map +0 -1
  104. package/lib/SyntaxHighlight-bkmst3oV.js.map +0 -1
  105. package/lib/index-Bjc_QsUR.js.map +0 -1
@@ -1,47 +1,47 @@
1
1
  import { j as e } from "./jsx-runtime-BzflLqGi.js";
2
- import { CircleSlashIcon as F, CheckIcon as fe, XIcon as he, PencilLineIcon as pe, RefreshCwIcon as me, TrashIcon as xe, KeyRoundIcon as ye } from "lucide-react";
3
- import { R as ge } from "./RouterError-CKOZTsDD.js";
4
- import { i as I } from "./invariant-CGOLuIIz.js";
5
- import { O as je, u as Ce } from "./chunk-PVWAREVJ-dLIqswPy.js";
6
- import { u as ve } from "./hook-CvSwcbk6.js";
7
- import { D as we, a as Y } from "./ErrorAlert-BqjbNHIn.js";
2
+ import { CircleSlashIcon as $, CheckIcon as ue, XIcon as fe, PencilLineIcon as he, RefreshCwIcon as pe, TrashIcon as me, KeyRoundIcon as xe } from "lucide-react";
3
+ import { R as ye } from "./RouterError-DfTZblpv.js";
4
+ import { i as A } from "./invariant-CGOLuIIz.js";
5
+ import { O as ge, u as je } from "./chunk-PVWAREVJ-dLIqswPy.js";
6
+ import { u as Ce } from "./hook-BNxidGQq.js";
7
+ import { D as ve, a as Y } from "./ErrorAlert-BUlG32M9.js";
8
8
  import { Button as v } from "./ui/Button.js";
9
- import { a as ne, g as ie, e as be } from "./ZudokuContext-np1wheDl.js";
10
- import { u as O, S as ke, a as Ne, b as Ke, c as Ee, d as De, e as Z, f as Ae } from "./Select-VmDZ-nKe.js";
11
- import * as $ from "react";
12
- import Pe, { createContext as Q, useRef as D, useLayoutEffect as Ie, useEffect as re, useId as _, useContext as B, useInsertionEffect as Re, useMemo as L, useCallback as Se, Children as Te, isValidElement as Oe, useState as E, forwardRef as Me } from "react";
13
- import { A as M, a as q, b as qe } from "./Mermaid-CIFixY6C.js";
14
- import { C as $e, a as ze } from "./Card-KFniaZn5.js";
15
- import { e as H, f as A, D as V, g as G, a as J, b as U, c as W, d as ae } from "./Dialog-BQciPiHN.js";
9
+ import { a as ne, f as ie, e as we } from "./ZudokuContext-BXldanA8.js";
10
+ import { u as T } from "./useMutation-C6RqWmTS.js";
11
+ import * as q from "react";
12
+ import ke, { createContext as Q, useRef as N, useLayoutEffect as be, useEffect as re, useId as _, useContext as H, useInsertionEffect as Ke, useMemo as F, useCallback as Ee, Children as De, isValidElement as Ne, useState as D } from "react";
13
+ import { A as O, a as M, b as Pe } from "./Mermaid-D_VSX7_Q.js";
14
+ import { C as Ae, a as Ie } from "./Card-KFniaZn5.js";
15
+ import { e as V, f as P, D as B, g as G, a as J, b as U, c as W, d as ae } from "./Dialog-BQciPiHN.js";
16
+ import { S as Re, a as Se, b as Te, c as Oe, d as Me, e as Z, f as qe } from "./Select-CkxXP5I7.js";
16
17
  import { Input as oe } from "./ui/Input.js";
17
- import { c as P } from "./cn-dYga0KKN.js";
18
- import { a as Fe } from "./index.esm-BYObtETB.js";
19
- import { B as Le } from "./Button-CynVW1JV.js";
20
- import { S as Qe } from "./Spinner-CI6bRyZw.js";
21
- import { b as _e } from "./index-DnMgJWrI.js";
22
- const Be = () => {
23
- const t = ve();
24
- return t.isAuthEnabled && t.isPending ? null : t.isAuthEnabled ? t.isAuthenticated ? /* @__PURE__ */ e.jsx(je, {}) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: [
18
+ import { c as L } from "./cn-dYga0KKN.js";
19
+ import { a as ze } from "./index.esm-BYObtETB.js";
20
+ import { A as $e } from "./ActionButton-DUgvSylL.js";
21
+ import { b as Fe } from "./index-Css56y3F.js";
22
+ const Le = () => {
23
+ const t = Ce();
24
+ return t.isAuthEnabled && t.isPending ? null : t.isAuthEnabled ? t.isAuthenticated ? /* @__PURE__ */ e.jsx(ge, {}) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: [
25
25
  "Please login first to view this page",
26
26
  /* @__PURE__ */ e.jsx(v, { onClick: () => t.login(), children: "Login" })
27
- ] }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: /* @__PURE__ */ e.jsxs(we, { className: "max-w-[600px]", children: [
27
+ ] }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: /* @__PURE__ */ e.jsxs(ve, { className: "max-w-[600px]", children: [
28
28
  "Authentication needs to be enabled for API keys to work. Enable it in your Zudoku configuration under ",
29
29
  /* @__PURE__ */ e.jsx("code", { children: "authentication" }),
30
30
  "."
31
31
  ] }) });
32
- }, He = Q({});
32
+ }, Qe = Q({});
33
33
  function le(t) {
34
- const r = D(null);
34
+ const r = N(null);
35
35
  return r.current === null && (r.current = t()), r.current;
36
36
  }
37
- const Ve = typeof window < "u", Ge = Ve ? Ie : re, ce = /* @__PURE__ */ Q(null);
38
- function Je(t) {
37
+ const _e = typeof window < "u", He = _e ? be : re, ce = /* @__PURE__ */ Q(null);
38
+ function Ve(t) {
39
39
  return typeof t == "object" && t !== null;
40
40
  }
41
- function Ue(t) {
42
- return Je(t) && "offsetHeight" in t;
41
+ function Be(t) {
42
+ return Ve(t) && "offsetHeight" in t;
43
43
  }
44
- const We = Q({
44
+ const Ge = Q({
45
45
  transformPagePoint: (t) => t,
46
46
  isStatic: !1,
47
47
  reducedMotion: "never"
@@ -51,7 +51,7 @@ function ee(t, r) {
51
51
  return t(r);
52
52
  t != null && (t.current = r);
53
53
  }
54
- function Xe(...t) {
54
+ function Je(...t) {
55
55
  return (r) => {
56
56
  let s = !1;
57
57
  const n = t.map((i) => {
@@ -67,14 +67,14 @@ function Xe(...t) {
67
67
  };
68
68
  };
69
69
  }
70
- function Ye(...t) {
71
- return $.useCallback(Xe(...t), t);
70
+ function Ue(...t) {
71
+ return q.useCallback(Je(...t), t);
72
72
  }
73
- class Ze extends $.Component {
73
+ class We extends q.Component {
74
74
  getSnapshotBeforeUpdate(r) {
75
75
  const s = this.props.childRef.current;
76
76
  if (s && r.isPresent && !this.props.isPresent) {
77
- const n = s.offsetParent, i = Ue(n) && n.offsetWidth || 0, a = this.props.sizeRef.current;
77
+ const n = s.offsetParent, i = Be(n) && n.offsetWidth || 0, a = this.props.sizeRef.current;
78
78
  a.height = s.offsetHeight || 0, a.width = s.offsetWidth || 0, a.top = s.offsetTop, a.left = s.offsetLeft, a.right = i - a.width - a.left;
79
79
  }
80
80
  return null;
@@ -88,63 +88,63 @@ class Ze extends $.Component {
88
88
  return this.props.children;
89
89
  }
90
90
  }
91
- function et({ children: t, isPresent: r, anchorX: s, root: n }) {
92
- const i = _(), a = D(null), l = D({
91
+ function Xe({ children: t, isPresent: r, anchorX: s, root: n }) {
92
+ const i = _(), a = N(null), l = N({
93
93
  width: 0,
94
94
  height: 0,
95
95
  top: 0,
96
96
  left: 0,
97
97
  right: 0
98
- }), { nonce: u } = B(We), f = Ye(a, t?.ref);
99
- return Re(() => {
98
+ }), { nonce: u } = H(Ge), f = Ue(a, t?.ref);
99
+ return Ke(() => {
100
100
  const { width: d, height: y, top: h, left: x, right: p } = l.current;
101
101
  if (r || !a.current || !d || !y)
102
102
  return;
103
- const b = s === "left" ? `left: ${x}` : `right: ${p}`;
103
+ const k = s === "left" ? `left: ${x}` : `right: ${p}`;
104
104
  a.current.dataset.motionPopId = i;
105
105
  const m = document.createElement("style");
106
106
  u && (m.nonce = u);
107
- const N = n ?? document.head;
108
- return N.appendChild(m), m.sheet && m.sheet.insertRule(`
107
+ const K = n ?? document.head;
108
+ return K.appendChild(m), m.sheet && m.sheet.insertRule(`
109
109
  [data-motion-pop-id="${i}"] {
110
110
  position: absolute !important;
111
111
  width: ${d}px !important;
112
112
  height: ${y}px !important;
113
- ${b}px !important;
113
+ ${k}px !important;
114
114
  top: ${h}px !important;
115
115
  }
116
116
  `), () => {
117
- N.contains(m) && N.removeChild(m);
117
+ K.contains(m) && K.removeChild(m);
118
118
  };
119
- }, [r]), e.jsx(Ze, { isPresent: r, childRef: a, sizeRef: l, children: $.cloneElement(t, { ref: f }) });
119
+ }, [r]), e.jsx(We, { isPresent: r, childRef: a, sizeRef: l, children: q.cloneElement(t, { ref: f }) });
120
120
  }
121
- const tt = ({ children: t, initial: r, isPresent: s, onExitComplete: n, custom: i, presenceAffectsLayout: a, mode: l, anchorX: u, root: f }) => {
122
- const d = le(st), y = _();
123
- let h = !0, x = L(() => (h = !1, {
121
+ const Ye = ({ children: t, initial: r, isPresent: s, onExitComplete: n, custom: i, presenceAffectsLayout: a, mode: l, anchorX: u, root: f }) => {
122
+ const d = le(Ze), y = _();
123
+ let h = !0, x = F(() => (h = !1, {
124
124
  id: y,
125
125
  initial: r,
126
126
  isPresent: s,
127
127
  custom: i,
128
128
  onExitComplete: (p) => {
129
129
  d.set(p, !0);
130
- for (const b of d.values())
131
- if (!b)
130
+ for (const k of d.values())
131
+ if (!k)
132
132
  return;
133
133
  n && n();
134
134
  },
135
135
  register: (p) => (d.set(p, !1), () => d.delete(p))
136
136
  }), [s, d, n]);
137
- return a && h && (x = { ...x }), L(() => {
138
- d.forEach((p, b) => d.set(b, !1));
139
- }, [s]), $.useEffect(() => {
137
+ return a && h && (x = { ...x }), F(() => {
138
+ d.forEach((p, k) => d.set(k, !1));
139
+ }, [s]), q.useEffect(() => {
140
140
  !s && !d.size && n && n();
141
- }, [s]), l === "popLayout" && (t = e.jsx(et, { isPresent: s, anchorX: u, root: f, children: t })), e.jsx(ce.Provider, { value: x, children: t });
141
+ }, [s]), l === "popLayout" && (t = e.jsx(Xe, { isPresent: s, anchorX: u, root: f, children: t })), e.jsx(ce.Provider, { value: x, children: t });
142
142
  };
143
- function st() {
143
+ function Ze() {
144
144
  return /* @__PURE__ */ new Map();
145
145
  }
146
- function nt(t = !0) {
147
- const r = B(ce);
146
+ function et(t = !0) {
147
+ const r = H(ce);
148
148
  if (r === null)
149
149
  return [!0, null];
150
150
  const { isPresent: s, onExitComplete: n, register: i } = r, a = _();
@@ -152,78 +152,62 @@ function nt(t = !0) {
152
152
  if (t)
153
153
  return i(a);
154
154
  }, [t]);
155
- const l = Se(() => t && n && n(a), [a, n, t]);
155
+ const l = Ee(() => t && n && n(a), [a, n, t]);
156
156
  return !s && n ? [!1, l] : [!0];
157
157
  }
158
- const R = (t) => t.key || "";
158
+ const I = (t) => t.key || "";
159
159
  function te(t) {
160
160
  const r = [];
161
- return Te.forEach(t, (s) => {
162
- Oe(s) && r.push(s);
161
+ return De.forEach(t, (s) => {
162
+ Ne(s) && r.push(s);
163
163
  }), r;
164
164
  }
165
- const it = ({ children: t, custom: r, initial: s = !0, onExitComplete: n, presenceAffectsLayout: i = !0, mode: a = "sync", propagate: l = !1, anchorX: u = "left", root: f }) => {
166
- const [d, y] = nt(l), h = L(() => te(t), [t]), x = l && !d ? [] : h.map(R), p = D(!0), b = D(h), m = le(() => /* @__PURE__ */ new Map()), [N, o] = E(h), [c, j] = E(h);
167
- Ge(() => {
168
- p.current = !1, b.current = h;
165
+ const tt = ({ children: t, custom: r, initial: s = !0, onExitComplete: n, presenceAffectsLayout: i = !0, mode: a = "sync", propagate: l = !1, anchorX: u = "left", root: f }) => {
166
+ const [d, y] = et(l), h = F(() => te(t), [t]), x = l && !d ? [] : h.map(I), p = N(!0), k = N(h), m = le(() => /* @__PURE__ */ new Map()), [K, o] = D(h), [c, j] = D(h);
167
+ He(() => {
168
+ p.current = !1, k.current = h;
169
169
  for (let C = 0; C < c.length; C++) {
170
- const g = R(c[C]);
170
+ const g = I(c[C]);
171
171
  x.includes(g) ? m.delete(g) : m.get(g) !== !0 && m.set(g, !1);
172
172
  }
173
173
  }, [c, x.length, x.join("-")]);
174
174
  const w = [];
175
- if (h !== N) {
175
+ if (h !== K) {
176
176
  let C = [...h];
177
177
  for (let g = 0; g < c.length; g++) {
178
- const K = c[g], z = R(K);
179
- x.includes(z) || (C.splice(g, 0, K), w.push(K));
178
+ const E = c[g], z = I(E);
179
+ x.includes(z) || (C.splice(g, 0, E), w.push(E));
180
180
  }
181
181
  return a === "wait" && w.length && (C = w), j(te(C)), o(h), null;
182
182
  }
183
183
  process.env.NODE_ENV !== "production" && a === "wait" && c.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
184
- const { forceRender: k } = B(He);
184
+ const { forceRender: b } = H(Qe);
185
185
  return e.jsx(e.Fragment, { children: c.map((C) => {
186
- const g = R(C), K = l && !d ? !1 : h === c || x.includes(g), z = () => {
186
+ const g = I(C), E = l && !d ? !1 : h === c || x.includes(g), z = () => {
187
187
  if (m.has(g))
188
188
  m.set(g, !0);
189
189
  else
190
190
  return;
191
191
  let X = !0;
192
- m.forEach((ue) => {
193
- ue || (X = !1);
194
- }), X && (k?.(), j(b.current), l && y?.(), n && n());
192
+ m.forEach((de) => {
193
+ de || (X = !1);
194
+ }), X && (b?.(), j(k.current), l && y?.(), n && n());
195
195
  };
196
- return e.jsx(tt, { isPresent: K, initial: !p.current || s ? void 0 : !1, custom: r, presenceAffectsLayout: i, mode: a, root: f, onExitComplete: K ? void 0 : z, anchorX: u, children: C }, g);
196
+ return e.jsx(Ye, { isPresent: E, initial: !p.current || s ? void 0 : !1, custom: r, presenceAffectsLayout: i, mode: a, root: f, onExitComplete: E ? void 0 : z, anchorX: u, children: C }, g);
197
197
  }) });
198
- }, de = Me(
199
- ({ isPending: t, children: r, className: s, ...n }, i) => /* @__PURE__ */ e.jsxs(
200
- Le,
201
- {
202
- ref: i,
203
- disabled: t,
204
- ...n,
205
- className: P("relative", s),
206
- children: [
207
- t && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 grid place-items-center", children: /* @__PURE__ */ e.jsx(Qe, {}) }),
208
- /* @__PURE__ */ e.jsx("span", { className: P("block", t && "invisible"), children: r })
209
- ]
210
- }
211
- )
212
- );
213
- de.displayName = "ActionButton";
214
- const rt = ({
198
+ }, st = ({
215
199
  service: t,
216
200
  onOpenChange: r
217
201
  }) => {
218
- const s = ne(), n = ie(), i = Ce(), a = Fe({
202
+ const s = ne(), n = ie(), i = je(), a = ze({
219
203
  defaultValues: {
220
204
  expiresOn: "30"
221
205
  }
222
- }), l = _e(), u = O({
206
+ }), l = Fe(), u = T({
223
207
  mutationFn: ({ description: f, expiresOn: d }) => {
224
208
  if (!t.createKey)
225
209
  throw new Error("createKey not implemented");
226
- const y = d !== "never" ? at(Number(d)) : void 0;
210
+ const y = d !== "never" ? nt(Number(d)) : void 0;
227
211
  return t.createKey({
228
212
  apiKey: {
229
213
  description: f || "Secret Key",
@@ -249,22 +233,22 @@ const rt = ({
249
233
  )
250
234
  ),
251
235
  children: [
252
- u.error && /* @__PURE__ */ e.jsxs(M, { variant: "destructive", className: "mb-4", children: [
253
- /* @__PURE__ */ e.jsx(q, { children: "Error" }),
254
- /* @__PURE__ */ e.jsx(qe, { children: u.error.message })
236
+ u.error && /* @__PURE__ */ e.jsxs(O, { variant: "destructive", className: "mb-4", children: [
237
+ /* @__PURE__ */ e.jsx(M, { children: "Error" }),
238
+ /* @__PURE__ */ e.jsx(Pe, { children: u.error.message })
255
239
  ] }),
256
240
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 flex-col text-sm font-medium", children: [
257
241
  "Name",
258
242
  /* @__PURE__ */ e.jsx(oe, { ...a.register("description") }),
259
243
  "Expiration",
260
244
  /* @__PURE__ */ e.jsxs(
261
- ke,
245
+ Re,
262
246
  {
263
247
  onValueChange: (f) => a.setValue("expiresOn", f),
264
248
  defaultValue: a.getValues("expiresOn"),
265
249
  children: [
266
- /* @__PURE__ */ e.jsx(Ne, { children: /* @__PURE__ */ e.jsx(Ke, {}) }),
267
- /* @__PURE__ */ e.jsx(Ee, { children: /* @__PURE__ */ e.jsxs(De, { children: [
250
+ /* @__PURE__ */ e.jsx(Se, { children: /* @__PURE__ */ e.jsx(Te, {}) }),
251
+ /* @__PURE__ */ e.jsx(Oe, { children: /* @__PURE__ */ e.jsxs(Me, { children: [
268
252
  [7, 30, 60, 90].map((f) => /* @__PURE__ */ e.jsxs(Z, { value: String(f), children: [
269
253
  f,
270
254
  " days"
@@ -274,15 +258,15 @@ const rt = ({
274
258
  ]
275
259
  }
276
260
  ),
277
- /* @__PURE__ */ e.jsxs(H, { children: [
278
- /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(v, { variant: "outline", children: "Cancel" }) }),
279
- /* @__PURE__ */ e.jsx(de, { isPending: u.isPending, children: "Generate Key" })
261
+ /* @__PURE__ */ e.jsxs(V, { children: [
262
+ /* @__PURE__ */ e.jsx(P, { asChild: !0, children: /* @__PURE__ */ e.jsx(v, { variant: "outline", children: "Cancel" }) }),
263
+ /* @__PURE__ */ e.jsx($e, { isPending: u.isPending, children: "Generate Key" })
280
264
  ] })
281
265
  ] })
282
266
  ]
283
267
  }
284
268
  ) : null;
285
- }, at = (t) => {
269
+ }, nt = (t) => {
286
270
  const r = /* @__PURE__ */ new Date();
287
271
  return r.setDate(r.getDate() + t), r.toISOString();
288
272
  }, se = ({
@@ -293,21 +277,21 @@ const rt = ({
293
277
  buttonVariant: i = "outline"
294
278
  }) => {
295
279
  const a = /* @__PURE__ */ e.jsx(v, { variant: i, children: "Create API Key" });
296
- return /* @__PURE__ */ e.jsxs(V, { open: r, onOpenChange: s, children: [
280
+ return /* @__PURE__ */ e.jsxs(B, { open: r, onOpenChange: s, children: [
297
281
  /* @__PURE__ */ e.jsx(G, { asChild: !0, children: n ?? a }),
298
282
  /* @__PURE__ */ e.jsxs(J, { children: [
299
283
  /* @__PURE__ */ e.jsx(U, { children: /* @__PURE__ */ e.jsx(W, { children: "Create API Key" }) }),
300
- /* @__PURE__ */ e.jsx(rt, { service: t, onOpenChange: s })
284
+ /* @__PURE__ */ e.jsx(st, { service: t, onOpenChange: s })
301
285
  ] })
302
286
  ] });
303
- }, ot = ({ service: t }) => {
304
- const r = ne(), s = ie(), [n, i] = E(
287
+ }, it = ({ service: t }) => {
288
+ const r = ne(), s = ie(), [n, i] = D(
305
289
  null
306
- ), [a, l] = E(""), { data: u, isFetching: f } = be({
290
+ ), [a, l] = D(""), { data: u, isFetching: f } = we({
307
291
  queryFn: () => t.getConsumers(r),
308
292
  queryKey: ["api-keys"],
309
293
  retry: !1
310
- }), [d, y] = E(!1), h = O({
294
+ }), [d, y] = D(!1), h = T({
311
295
  mutationFn: ({
312
296
  consumerId: o,
313
297
  keyId: c
@@ -321,10 +305,10 @@ const rt = ({
321
305
  const j = s.getQueryData([
322
306
  "api-keys"
323
307
  ]);
324
- return s.setQueryData(["api-keys"], (w) => w && w.map((k) => k.id === o ? {
325
- ...k,
326
- apiKeys: k.apiKeys.filter((C) => C.id !== c)
327
- } : k)), { previousData: j };
308
+ return s.setQueryData(["api-keys"], (w) => w && w.map((b) => b.id === o ? {
309
+ ...b,
310
+ apiKeys: b.apiKeys.filter((C) => C.id !== c)
311
+ } : b)), { previousData: j };
328
312
  },
329
313
  onError: (o, c, j) => {
330
314
  j?.previousData && s.setQueryData(["api-keys"], j.previousData);
@@ -332,7 +316,7 @@ const rt = ({
332
316
  onSuccess: () => {
333
317
  s.invalidateQueries({ queryKey: ["api-keys"] });
334
318
  }
335
- }), x = O({
319
+ }), x = T({
336
320
  mutationFn: ({
337
321
  consumerId: o,
338
322
  label: c
@@ -344,10 +328,10 @@ const rt = ({
344
328
  onMutate: async ({ consumerId: o, label: c }) => {
345
329
  await s.cancelQueries({ queryKey: ["api-keys"] });
346
330
  const j = s.getQueryData(["api-keys"]);
347
- return s.setQueryData(["api-keys"], (w) => w && w.map((k) => k.id === o ? {
348
- ...k,
331
+ return s.setQueryData(["api-keys"], (w) => w && w.map((b) => b.id === o ? {
332
+ ...b,
349
333
  label: c
350
- } : k)), { previousData: j };
334
+ } : b)), { previousData: j };
351
335
  },
352
336
  onError: (o, c, j) => {
353
337
  j?.previousData && s.setQueryData(["api-keys"], j.previousData);
@@ -355,21 +339,21 @@ const rt = ({
355
339
  onSuccess: () => {
356
340
  s.invalidateQueries({ queryKey: ["api-keys"] });
357
341
  }
358
- }), p = O({
342
+ }), p = T({
359
343
  mutationFn: (o) => {
360
344
  if (!t.rollKey)
361
345
  throw new Error("rollKey not implemented");
362
346
  return t.rollKey(o, r);
363
347
  },
364
348
  onSuccess: () => s.invalidateQueries({ queryKey: ["api-keys"] })
365
- }), b = (o, c) => {
349
+ }), k = (o, c) => {
366
350
  i(o), l(c);
367
351
  }, m = (o) => {
368
352
  a.trim() && x.mutate({
369
353
  consumerId: o,
370
354
  label: a.trim()
371
355
  }), i(null), l("");
372
- }, N = () => {
356
+ }, K = () => {
373
357
  i(null), l("");
374
358
  };
375
359
  return /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-md h-full pt-(--padding-content-top) pb-(--padding-content-bottom)", children: [
@@ -388,17 +372,17 @@ const rt = ({
388
372
  /* @__PURE__ */ e.jsx("p", { children: "Create, manage, and monitor your API keys" }),
389
373
  /* @__PURE__ */ e.jsx(Y.Target, { name: "api-keys-list-page-before-keys" }),
390
374
  /* @__PURE__ */ e.jsx("div", { className: "h-8" }),
391
- p.isError && /* @__PURE__ */ e.jsxs(M, { variant: "destructive", className: "mb-4", children: [
392
- /* @__PURE__ */ e.jsx(F, { size: 16 }),
393
- /* @__PURE__ */ e.jsx(q, { children: p.error.message })
375
+ p.isError && /* @__PURE__ */ e.jsxs(O, { variant: "destructive", className: "mb-4", children: [
376
+ /* @__PURE__ */ e.jsx($, { size: 16 }),
377
+ /* @__PURE__ */ e.jsx(M, { children: p.error.message })
394
378
  ] }),
395
- x.isError && /* @__PURE__ */ e.jsxs(M, { variant: "destructive", className: "mb-4", children: [
396
- /* @__PURE__ */ e.jsx(F, { size: 16 }),
397
- /* @__PURE__ */ e.jsx(q, { children: x.error.message })
379
+ x.isError && /* @__PURE__ */ e.jsxs(O, { variant: "destructive", className: "mb-4", children: [
380
+ /* @__PURE__ */ e.jsx($, { size: 16 }),
381
+ /* @__PURE__ */ e.jsx(M, { children: x.error.message })
398
382
  ] }),
399
- h.isError && /* @__PURE__ */ e.jsxs(M, { variant: "destructive", className: "mb-4", children: [
400
- /* @__PURE__ */ e.jsx(F, { size: 16 }),
401
- /* @__PURE__ */ e.jsx(q, { children: h.error.message })
383
+ h.isError && /* @__PURE__ */ e.jsxs(O, { variant: "destructive", className: "mb-4", children: [
384
+ /* @__PURE__ */ e.jsx($, { size: 16 }),
385
+ /* @__PURE__ */ e.jsx(M, { children: h.error.message })
402
386
  ] }),
403
387
  /* @__PURE__ */ e.jsx("div", { className: "", children: u.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "flex col-span-full flex-col justify-center gap-4 items-center p-8 border rounded-sm bg-muted/30 text-muted-foreground", children: [
404
388
  /* @__PURE__ */ e.jsxs("p", { className: "text-center", children: [
@@ -417,15 +401,15 @@ const rt = ({
417
401
  ] }) : /* @__PURE__ */ e.jsx(
418
402
  "ul",
419
403
  {
420
- className: P(
404
+ className: L(
421
405
  "grid grid-cols-[1fr_min-content] divide-y divide-border col-span-6"
422
406
  ),
423
407
  children: u.map((o) => /* @__PURE__ */ e.jsxs(
424
- $e,
408
+ Ae,
425
409
  {
426
410
  className: "grid grid-cols-subgrid col-span-full items-center mb-4 group",
427
411
  children: [
428
- /* @__PURE__ */ e.jsxs(ze, { className: "border-b col-span-full grid-cols-subgrid grid", children: [
412
+ /* @__PURE__ */ e.jsxs(Ie, { className: "border-b col-span-full grid-cols-subgrid grid", children: [
429
413
  /* @__PURE__ */ e.jsxs("div", { className: "h-10 flex flex-col text-sm justify-center", children: [
430
414
  /* @__PURE__ */ e.jsxs("div", { className: "font-medium text-lg flex items-center gap-2", children: [
431
415
  n === o.id ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
@@ -436,7 +420,7 @@ const rt = ({
436
420
  value: a,
437
421
  onChange: (c) => l(c.target.value),
438
422
  onKeyDown: (c) => {
439
- c.key === "Enter" ? m(o.id) : c.key === "Escape" && N();
423
+ c.key === "Enter" ? m(o.id) : c.key === "Escape" && K();
440
424
  },
441
425
  className: "text-lg font-medium",
442
426
  autoFocus: !0
@@ -450,7 +434,7 @@ const rt = ({
450
434
  variant: "ghost",
451
435
  onClick: () => m(o.id),
452
436
  disabled: !a.trim(),
453
- children: /* @__PURE__ */ e.jsx(fe, { size: 16 })
437
+ children: /* @__PURE__ */ e.jsx(ue, { size: 16 })
454
438
  }
455
439
  ),
456
440
  /* @__PURE__ */ e.jsx(
@@ -458,8 +442,8 @@ const rt = ({
458
442
  {
459
443
  size: "icon",
460
444
  variant: "ghost",
461
- onClick: N,
462
- children: /* @__PURE__ */ e.jsx(he, { size: 16 })
445
+ onClick: K,
446
+ children: /* @__PURE__ */ e.jsx(fe, { size: 16 })
463
447
  }
464
448
  )
465
449
  ] })
@@ -484,19 +468,19 @@ const rt = ({
484
468
  v,
485
469
  {
486
470
  variant: "ghost",
487
- onClick: () => b(o.id, o.label),
488
- className: P(
471
+ onClick: () => k(o.id, o.label),
472
+ className: L(
489
473
  "flex gap-2",
490
474
  n === o.id && "opacity-0! pointer-events-none"
491
475
  ),
492
476
  disabled: n === o.id,
493
477
  children: [
494
- /* @__PURE__ */ e.jsx(pe, { size: 16 }),
478
+ /* @__PURE__ */ e.jsx(he, { size: 16 }),
495
479
  /* @__PURE__ */ e.jsx("span", { className: "hidden md:block", children: "Edit label" })
496
480
  ]
497
481
  }
498
482
  ),
499
- t.rollKey && /* @__PURE__ */ e.jsxs(V, { children: [
483
+ t.rollKey && /* @__PURE__ */ e.jsxs(B, { children: [
500
484
  /* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
501
485
  v,
502
486
  {
@@ -506,7 +490,7 @@ const rt = ({
506
490
  className: "flex items-center gap-2",
507
491
  children: [
508
492
  /* @__PURE__ */ e.jsx(
509
- me,
493
+ pe,
510
494
  {
511
495
  size: 16,
512
496
  className: p.isPending ? "animate-spin" : void 0
@@ -521,9 +505,9 @@ const rt = ({
521
505
  /* @__PURE__ */ e.jsx(W, { children: "Roll API Key" }),
522
506
  /* @__PURE__ */ e.jsx(ae, { children: "Are you sure you want to roll this API key?" })
523
507
  ] }),
524
- /* @__PURE__ */ e.jsxs(H, { children: [
525
- /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(v, { variant: "outline", children: "Cancel" }) }),
526
- /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(
508
+ /* @__PURE__ */ e.jsxs(V, { children: [
509
+ /* @__PURE__ */ e.jsx(P, { asChild: !0, children: /* @__PURE__ */ e.jsx(v, { variant: "outline", children: "Cancel" }) }),
510
+ /* @__PURE__ */ e.jsx(P, { asChild: !0, children: /* @__PURE__ */ e.jsx(
527
511
  v,
528
512
  {
529
513
  onClick: () => {
@@ -537,9 +521,9 @@ const rt = ({
537
521
  ] })
538
522
  ] })
539
523
  ] }),
540
- /* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(it, { children: o.apiKeys.map((c) => /* @__PURE__ */ e.jsxs(Pe.Fragment, { children: [
524
+ /* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(tt, { children: o.apiKeys.map((c) => /* @__PURE__ */ e.jsxs(ke.Fragment, { children: [
541
525
  /* @__PURE__ */ e.jsx(
542
- ct,
526
+ at,
543
527
  {
544
528
  apiKey: c,
545
529
  onDeleteKey: () => {
@@ -560,21 +544,21 @@ const rt = ({
560
544
  }
561
545
  ) })
562
546
  ] });
563
- }, lt = (t) => {
547
+ }, rt = (t) => {
564
548
  const r = /* @__PURE__ */ new Date(), s = new Date(t), n = Math.floor((r.getTime() - s.getTime()) / 1e3), i = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
565
549
  return n < 60 ? i.format(-n, "second") : n < 3600 ? i.format(-Math.floor(n / 60), "minute") : n < 86400 ? i.format(-Math.floor(n / 3600), "hour") : n < 2592e3 ? i.format(-Math.floor(n / 86400), "day") : n < 31536e3 ? i.format(-Math.floor(n / 2592e3), "month") : i.format(-Math.floor(n / 31536e3), "year");
566
- }, ct = ({
550
+ }, at = ({
567
551
  apiKey: t,
568
552
  onDeleteKey: r,
569
553
  className: s
570
554
  }) => {
571
- const [n, i] = E(!1), { key: a, createdOn: l, expiresOn: u } = t, f = u && new Date(u) < /* @__PURE__ */ new Date(), d = u ? Math.ceil(
555
+ const [n, i] = D(!1), { key: a, createdOn: l, expiresOn: u } = t, f = u && new Date(u) < /* @__PURE__ */ new Date(), d = u ? Math.ceil(
572
556
  (new Date(u).getTime() - Date.now()) / (1e3 * 60 * 60 * 24)
573
557
  ) : 1 / 0, y = d <= 7 && !f;
574
- return /* @__PURE__ */ e.jsxs("div", { className: P("grid col-span-full grid-cols-subgrid p-6", s), children: [
558
+ return /* @__PURE__ */ e.jsxs("div", { className: L("grid col-span-full grid-cols-subgrid p-6", s), children: [
575
559
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
576
560
  /* @__PURE__ */ e.jsx(
577
- Ae,
561
+ qe,
578
562
  {
579
563
  className: "max-w-fit w-full",
580
564
  secret: a,
@@ -586,7 +570,7 @@ const rt = ({
586
570
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 mt-0.5 text-nowrap", children: [
587
571
  l && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
588
572
  "Created ",
589
- lt(l),
573
+ rt(l),
590
574
  "."
591
575
  ] }),
592
576
  " ",
@@ -604,16 +588,16 @@ const rt = ({
604
588
  ] })
605
589
  ] })
606
590
  ] }),
607
- /* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: u && r && /* @__PURE__ */ e.jsxs(V, { children: [
608
- /* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsx(v, { variant: "ghost", size: "icon", children: /* @__PURE__ */ e.jsx(xe, { size: 16 }) }) }),
591
+ /* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: u && r && /* @__PURE__ */ e.jsxs(B, { children: [
592
+ /* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsx(v, { variant: "ghost", size: "icon", children: /* @__PURE__ */ e.jsx(me, { size: 16 }) }) }),
609
593
  /* @__PURE__ */ e.jsxs(J, { children: [
610
594
  /* @__PURE__ */ e.jsxs(U, { children: [
611
595
  /* @__PURE__ */ e.jsx(W, { children: "Delete API Key" }),
612
596
  /* @__PURE__ */ e.jsx(ae, { children: "Are you sure you want to delete this API key?" })
613
597
  ] }),
614
- /* @__PURE__ */ e.jsxs(H, { children: [
615
- /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(v, { variant: "outline", children: "Cancel" }) }),
616
- /* @__PURE__ */ e.jsx(A, { asChild: !0, children: /* @__PURE__ */ e.jsx(
598
+ /* @__PURE__ */ e.jsxs(V, { children: [
599
+ /* @__PURE__ */ e.jsx(P, { asChild: !0, children: /* @__PURE__ */ e.jsx(v, { variant: "outline", children: "Cancel" }) }),
600
+ /* @__PURE__ */ e.jsx(P, { asChild: !0, children: /* @__PURE__ */ e.jsx(
617
601
  v,
618
602
  {
619
603
  onClick: () => {
@@ -626,36 +610,36 @@ const rt = ({
626
610
  ] })
627
611
  ] }) })
628
612
  ] });
629
- }, S = "https://api.zuploedge.com/v2/client", dt = async (t) => {
613
+ }, R = "https://api.zuploedge.com/v2/client", ot = async (t) => {
630
614
  try {
631
615
  return await t.json();
632
616
  } catch {
633
617
  return;
634
618
  }
635
- }, T = async (t) => {
619
+ }, S = async (t) => {
636
620
  const r = t.headers.get("content-type");
637
621
  if (!t.ok && r?.includes("application/problem+json")) {
638
- const s = await dt(t);
622
+ const s = await ot(t);
639
623
  if (s.type && s.title)
640
624
  throw new Error(s.detail ?? s.title);
641
625
  }
642
- }, ut = (t, r) => ({
626
+ }, lt = (t, r) => ({
643
627
  deleteKey: async (s, n, i) => {
644
628
  const a = new Request(
645
- S + `/${t}/consumers/${s}/keys/${n}`,
629
+ R + `/${t}/consumers/${s}/keys/${n}`,
646
630
  {
647
631
  method: "DELETE"
648
632
  }
649
633
  );
650
634
  await i.signRequest(a);
651
635
  const l = await fetch(a);
652
- await T(l), I(l.ok, "Failed to delete API key");
636
+ await S(l), A(l.ok, "Failed to delete API key");
653
637
  },
654
638
  updateConsumer: async (s, n) => {
655
639
  const i = await fetch(
656
640
  await n.signRequest(
657
641
  new Request(
658
- S + `/${t}/consumers/${s.id}`,
642
+ R + `/${t}/consumers/${s.id}`,
659
643
  {
660
644
  method: "PATCH",
661
645
  headers: {
@@ -668,13 +652,13 @@ const rt = ({
668
652
  )
669
653
  )
670
654
  );
671
- await T(i), I(i.ok, "Failed to update API key description");
655
+ await S(i), A(i.ok, "Failed to update API key description");
672
656
  },
673
657
  rollKey: async (s, n) => {
674
658
  const i = await fetch(
675
659
  await n.signRequest(
676
660
  new Request(
677
- S + `/${t}/consumers/${s}/roll-key`,
661
+ R + `/${t}/consumers/${s}/roll-key`,
678
662
  {
679
663
  method: "POST",
680
664
  headers: {
@@ -685,15 +669,15 @@ const rt = ({
685
669
  )
686
670
  )
687
671
  );
688
- await T(i), I(i.ok, "Failed to delete API key");
672
+ await S(i), A(i.ok, "Failed to delete API key");
689
673
  },
690
674
  getConsumers: async (s) => {
691
675
  const n = new Request(
692
- `${S}/${t}/consumers`
676
+ `${R}/${t}/consumers`
693
677
  );
694
678
  await s.signRequest(n);
695
679
  const i = await fetch(n);
696
- return await T(i), I(i.ok, "Failed to fetch API keys"), (await i.json()).data.map((l) => ({
680
+ return await S(i), A(i.ok, "Failed to fetch API keys"), (await i.json()).data.map((l) => ({
697
681
  id: l.id,
698
682
  label: l.label || l.subject || "API Key",
699
683
  apiKeys: l.apiKeys.data,
@@ -701,15 +685,15 @@ const rt = ({
701
685
  }));
702
686
  },
703
687
  ...r
704
- }), Rt = (t) => t, St = (t) => {
705
- const r = "deploymentName" in t ? ut(t.deploymentName, t) : t;
688
+ }), Pt = (t) => t, At = (t) => {
689
+ const r = "deploymentName" in t ? lt(t.deploymentName, t) : t;
706
690
  return {
707
691
  getProfileMenuItems: () => [
708
692
  {
709
693
  label: "API Keys",
710
694
  path: "/settings/api-keys",
711
695
  category: "middle",
712
- icon: ye
696
+ icon: xe
713
697
  }
714
698
  ],
715
699
  getIdentities: async (s) => {
@@ -728,12 +712,12 @@ const rt = ({
728
712
  },
729
713
  getRoutes: () => [
730
714
  {
731
- element: /* @__PURE__ */ e.jsx(Be, {}),
732
- errorElement: /* @__PURE__ */ e.jsx(ge, {}),
715
+ element: /* @__PURE__ */ e.jsx(Le, {}),
716
+ errorElement: /* @__PURE__ */ e.jsx(ye, {}),
733
717
  children: [
734
718
  {
735
719
  path: "/settings/api-keys",
736
- element: /* @__PURE__ */ e.jsx(ot, { service: r })
720
+ element: /* @__PURE__ */ e.jsx(it, { service: r })
737
721
  }
738
722
  ]
739
723
  }
@@ -741,7 +725,7 @@ const rt = ({
741
725
  };
742
726
  };
743
727
  export {
744
- St as apiKeyPlugin,
745
- Rt as createApiKeyService
728
+ At as apiKeyPlugin,
729
+ Pt as createApiKeyService
746
730
  };
747
731
  //# sourceMappingURL=zudoku.plugin-api-keys.js.map