zudoku 0.33.2-local.4 → 0.34.1

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 (150) hide show
  1. package/README.md +121 -0
  2. package/dist/config/loader.d.ts +3 -2
  3. package/dist/config/loader.js +10 -20
  4. package/dist/config/loader.js.map +1 -1
  5. package/dist/config/validators/common.d.ts +346 -346
  6. package/dist/config/validators/validate.d.ts +165 -165
  7. package/dist/lib/components/AnchorLink.d.ts +2 -2
  8. package/dist/lib/components/AnchorLink.js +4 -4
  9. package/dist/lib/components/AnchorLink.js.map +1 -1
  10. package/dist/lib/components/Heading.d.ts +1 -1
  11. package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
  12. package/dist/lib/components/navigation/SidebarItem.js +6 -5
  13. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  14. package/dist/lib/core/ZudokuContext.d.ts +4 -0
  15. package/dist/lib/core/ZudokuContext.js.map +1 -1
  16. package/dist/lib/plugins/openapi/OperationList.js +4 -1
  17. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  18. package/dist/lib/plugins/openapi/OperationListItem.d.ts +1 -1
  19. package/dist/lib/plugins/openapi/OperationListItem.js +5 -3
  20. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  21. package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
  22. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  23. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  24. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +1 -0
  25. package/dist/lib/plugins/openapi/graphql/graphql.js +2 -0
  26. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  27. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +2 -2
  28. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -5
  29. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  30. package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
  31. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  32. package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +11 -0
  33. package/dist/lib/plugins/openapi/playground/IdentityDialog.js +14 -0
  34. package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -0
  35. package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +7 -0
  36. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +10 -0
  37. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
  38. package/dist/lib/plugins/openapi/playground/Playground.d.ts +9 -1
  39. package/dist/lib/plugins/openapi/playground/Playground.js +75 -24
  40. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  41. package/dist/lib/plugins/openapi/playground/QueryParams.js +1 -1
  42. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  43. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +7 -0
  44. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +8 -0
  45. package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -0
  46. package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +17 -0
  47. package/dist/lib/plugins/openapi/playground/rememberedIdentity.js +11 -0
  48. package/dist/lib/plugins/openapi/playground/rememberedIdentity.js.map +1 -0
  49. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +19 -13
  50. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  51. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +6 -4
  52. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +4 -3
  53. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
  54. package/dist/lib/ui/Checkbox.d.ts +2 -8
  55. package/dist/lib/ui/Checkbox.js +1 -13
  56. package/dist/lib/ui/Checkbox.js.map +1 -1
  57. package/dist/lib/ui/Command.d.ts +6 -6
  58. package/dist/lib/ui/Select.js +1 -1
  59. package/dist/lib/ui/Select.js.map +1 -1
  60. package/dist/lib/ui/SyntaxHighlight.d.ts +2 -1
  61. package/dist/lib/ui/SyntaxHighlight.js +19 -15
  62. package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
  63. package/dist/lib/util/MdxComponents.d.ts +1 -1
  64. package/dist/lib/util/MdxComponents.js +2 -2
  65. package/dist/lib/util/MdxComponents.js.map +1 -1
  66. package/dist/vite/config.js +3 -7
  67. package/dist/vite/config.js.map +1 -1
  68. package/lib/{AuthenticationPlugin-BCYuduZ9.js → AuthenticationPlugin-4ip08maU.js} +3 -3
  69. package/lib/{AuthenticationPlugin-BCYuduZ9.js.map → AuthenticationPlugin-4ip08maU.js.map} +1 -1
  70. package/lib/Callout-B_sEhkYd.js +211 -0
  71. package/lib/Callout-B_sEhkYd.js.map +1 -0
  72. package/lib/{Dialog-mi6BrnrM.js → Dialog-sbgekbjb.js} +48 -33
  73. package/lib/{Dialog-mi6BrnrM.js.map → Dialog-sbgekbjb.js.map} +1 -1
  74. package/lib/{Markdown-DofXBcqg.js → Markdown-DZXjQjpH.js} +4099 -3848
  75. package/lib/Markdown-DZXjQjpH.js.map +1 -0
  76. package/lib/{MdxPage-KJcNWIgt.js → MdxPage-52vRwa_7.js} +13 -13
  77. package/lib/{MdxPage-KJcNWIgt.js.map → MdxPage-52vRwa_7.js.map} +1 -1
  78. package/lib/{OasProvider-HcqBeC4H.js → OasProvider-CR2nG1Eg.js} +4 -4
  79. package/lib/{OasProvider-HcqBeC4H.js.map → OasProvider-CR2nG1Eg.js.map} +1 -1
  80. package/lib/{OperationList-C3wnbFxp.js → OperationList-DndcCJUG.js} +1097 -1052
  81. package/lib/{OperationList-C3wnbFxp.js.map → OperationList-DndcCJUG.js.map} +1 -1
  82. package/lib/{Select-Co6MuS4j.js → Select-FAYHOYTy.js} +35 -35
  83. package/lib/{Select-Co6MuS4j.js.map → Select-FAYHOYTy.js.map} +1 -1
  84. package/lib/{SlotletProvider-CYFNHuok.js → SlotletProvider-TydSHROc.js} +4 -4
  85. package/lib/{SlotletProvider-CYFNHuok.js.map → SlotletProvider-TydSHROc.js.map} +1 -1
  86. package/lib/{chunk-IR6S3I6Y-CRDBmIgK.js → chunk-HA7DTUK3-ZGg2W6yV.js} +276 -276
  87. package/lib/chunk-HA7DTUK3-ZGg2W6yV.js.map +1 -0
  88. package/lib/{hook-LTe5qHSc.js → hook-CfCFKZ-2.js} +10 -7
  89. package/lib/{hook-LTe5qHSc.js.map → hook-CfCFKZ-2.js.map} +1 -1
  90. package/lib/index-DK7IuUyR.js +2201 -0
  91. package/lib/index-DK7IuUyR.js.map +1 -0
  92. package/lib/index.esm-CltAN0Tf.js +711 -0
  93. package/lib/index.esm-CltAN0Tf.js.map +1 -0
  94. package/lib/objectEntries-BS7aAgOm.js +12 -0
  95. package/lib/objectEntries-BS7aAgOm.js.map +1 -0
  96. package/lib/ui/Checkbox.js +15 -25
  97. package/lib/ui/Checkbox.js.map +1 -1
  98. package/lib/ui/Command.js +1 -1
  99. package/lib/ui/Select.js +1 -1
  100. package/lib/ui/Select.js.map +1 -1
  101. package/lib/ui/SyntaxHighlight.js +483 -502
  102. package/lib/ui/SyntaxHighlight.js.map +1 -1
  103. package/lib/{useExposedProps-D76yras4.js → useExposedProps-BslIn-FE.js} +2 -2
  104. package/lib/{useExposedProps-D76yras4.js.map → useExposedProps-BslIn-FE.js.map} +1 -1
  105. package/lib/zudoku.auth-auth0.js +1 -1
  106. package/lib/zudoku.auth-clerk.js +2 -2
  107. package/lib/zudoku.auth-openid.js +3 -3
  108. package/lib/zudoku.components.js +1390 -32
  109. package/lib/zudoku.components.js.map +1 -1
  110. package/lib/zudoku.hooks.js +1 -1
  111. package/lib/zudoku.plugin-api-catalog.js +5 -5
  112. package/lib/zudoku.plugin-api-keys.js +4 -4
  113. package/lib/zudoku.plugin-custom-pages.js +2 -2
  114. package/lib/zudoku.plugin-markdown.js +1 -1
  115. package/lib/zudoku.plugin-openapi.js +3 -3
  116. package/lib/zudoku.plugin-redirect.js +1 -1
  117. package/lib/zudoku.plugin-search-pagefind.js +84 -154
  118. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  119. package/package.json +5 -5
  120. package/src/lib/components/AnchorLink.tsx +7 -7
  121. package/src/lib/components/navigation/SidebarItem.tsx +8 -23
  122. package/src/lib/core/ZudokuContext.ts +4 -0
  123. package/src/lib/plugins/openapi/OperationList.tsx +73 -33
  124. package/src/lib/plugins/openapi/OperationListItem.tsx +105 -92
  125. package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
  126. package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
  127. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +30 -32
  128. package/src/lib/plugins/openapi/playground/Headers.tsx +0 -1
  129. package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +74 -0
  130. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +54 -0
  131. package/src/lib/plugins/openapi/playground/Playground.tsx +164 -133
  132. package/src/lib/plugins/openapi/playground/QueryParams.tsx +0 -1
  133. package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
  134. package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
  135. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +24 -4
  136. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +66 -45
  137. package/src/lib/ui/Checkbox.tsx +8 -24
  138. package/src/lib/ui/Select.tsx +1 -1
  139. package/src/lib/ui/SyntaxHighlight.tsx +94 -96
  140. package/src/lib/util/MdxComponents.tsx +2 -2
  141. package/lib/Command-CrTA1FX0.js +0 -140
  142. package/lib/Command-CrTA1FX0.js.map +0 -1
  143. package/lib/Markdown-DofXBcqg.js.map +0 -1
  144. package/lib/chunk-IR6S3I6Y-CRDBmIgK.js.map +0 -1
  145. package/lib/index-CtkRMvMw.js +0 -2052
  146. package/lib/index-CtkRMvMw.js.map +0 -1
  147. package/lib/index-vn5bsvmU.js +0 -1399
  148. package/lib/index-vn5bsvmU.js.map +0 -1
  149. package/lib/useScrollToAnchor-DKyrbZoy.js +0 -977
  150. package/lib/useScrollToAnchor-DKyrbZoy.js.map +0 -1
@@ -1,977 +0,0 @@
1
- var Te = Object.defineProperty;
2
- var xe = (e, t, r) => t in e ? Te(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var T = (e, t, r) => xe(e, typeof t != "symbol" ? t + "" : t, r);
4
- import y, { Component as Y, useState as J, useEffect as ie, useCallback as Ce } from "react";
5
- import { g as X } from "./_commonjsHelpers-BkfeUUK-.js";
6
- import { u as le, L as Ae, d as we, g as U, b as Ee } from "./chunk-IR6S3I6Y-CRDBmIgK.js";
7
- import { u as Z } from "./Markdown-DofXBcqg.js";
8
- import { j as u } from "./jsx-runtime-CYK1ROHF.js";
9
- import { c as Oe } from "./index-CPNSgwSb.js";
10
- import { ChevronRightIcon as ke, ExternalLinkIcon as Se } from "lucide-react";
11
- import { f as je, j as ce } from "./hook-LTe5qHSc.js";
12
- import { c as S } from "./cn-qaFjX9_3.js";
13
- import * as M from "@radix-ui/react-collapsible";
14
- const z = {}, ue = y.createContext(z);
15
- function Ie(e) {
16
- const t = y.useContext(ue);
17
- return y.useMemo(
18
- function() {
19
- return typeof e == "function" ? e(t) : { ...t, ...e };
20
- },
21
- [t, e]
22
- );
23
- }
24
- function Tt(e) {
25
- let t;
26
- return e.disableParentContext ? t = typeof e.components == "function" ? e.components(z) : e.components || z : t = Ie(e.components), y.createElement(
27
- ue.Provider,
28
- { value: t },
29
- e.children
30
- );
31
- }
32
- var $, Q;
33
- function He() {
34
- if (Q) return $;
35
- Q = 1;
36
- var e = typeof Element < "u", t = typeof Map == "function", r = typeof Set == "function", n = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
37
- function a(s, o) {
38
- if (s === o) return !0;
39
- if (s && o && typeof s == "object" && typeof o == "object") {
40
- if (s.constructor !== o.constructor) return !1;
41
- var c, i, l;
42
- if (Array.isArray(s)) {
43
- if (c = s.length, c != o.length) return !1;
44
- for (i = c; i-- !== 0; )
45
- if (!a(s[i], o[i])) return !1;
46
- return !0;
47
- }
48
- var f;
49
- if (t && s instanceof Map && o instanceof Map) {
50
- if (s.size !== o.size) return !1;
51
- for (f = s.entries(); !(i = f.next()).done; )
52
- if (!o.has(i.value[0])) return !1;
53
- for (f = s.entries(); !(i = f.next()).done; )
54
- if (!a(i.value[1], o.get(i.value[0]))) return !1;
55
- return !0;
56
- }
57
- if (r && s instanceof Set && o instanceof Set) {
58
- if (s.size !== o.size) return !1;
59
- for (f = s.entries(); !(i = f.next()).done; )
60
- if (!o.has(i.value[0])) return !1;
61
- return !0;
62
- }
63
- if (n && ArrayBuffer.isView(s) && ArrayBuffer.isView(o)) {
64
- if (c = s.length, c != o.length) return !1;
65
- for (i = c; i-- !== 0; )
66
- if (s[i] !== o[i]) return !1;
67
- return !0;
68
- }
69
- if (s.constructor === RegExp) return s.source === o.source && s.flags === o.flags;
70
- if (s.valueOf !== Object.prototype.valueOf && typeof s.valueOf == "function" && typeof o.valueOf == "function") return s.valueOf() === o.valueOf();
71
- if (s.toString !== Object.prototype.toString && typeof s.toString == "function" && typeof o.toString == "function") return s.toString() === o.toString();
72
- if (l = Object.keys(s), c = l.length, c !== Object.keys(o).length) return !1;
73
- for (i = c; i-- !== 0; )
74
- if (!Object.prototype.hasOwnProperty.call(o, l[i])) return !1;
75
- if (e && s instanceof Element) return !1;
76
- for (i = c; i-- !== 0; )
77
- if (!((l[i] === "_owner" || l[i] === "__v" || l[i] === "__o") && s.$$typeof) && !a(s[l[i]], o[l[i]]))
78
- return !1;
79
- return !0;
80
- }
81
- return s !== s && o !== o;
82
- }
83
- return $ = function(o, c) {
84
- try {
85
- return a(o, c);
86
- } catch (i) {
87
- if ((i.message || "").match(/stack|recursion/i))
88
- return console.warn("react-fast-compare cannot handle circular refs"), !1;
89
- throw i;
90
- }
91
- }, $;
92
- }
93
- var Pe = He();
94
- const Me = /* @__PURE__ */ X(Pe);
95
- var D, ee;
96
- function $e() {
97
- if (ee) return D;
98
- ee = 1;
99
- var e = function(t, r, n, a, s, o, c, i) {
100
- if (process.env.NODE_ENV !== "production" && r === void 0)
101
- throw new Error("invariant requires an error message argument");
102
- if (!t) {
103
- var l;
104
- if (r === void 0)
105
- l = new Error(
106
- "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
107
- );
108
- else {
109
- var f = [n, a, s, o, c, i], d = 0;
110
- l = new Error(
111
- r.replace(/%s/g, function() {
112
- return f[d++];
113
- })
114
- ), l.name = "Invariant Violation";
115
- }
116
- throw l.framesToPop = 1, l;
117
- }
118
- };
119
- return D = e, D;
120
- }
121
- var De = $e();
122
- const te = /* @__PURE__ */ X(De);
123
- var N, re;
124
- function Ne() {
125
- return re || (re = 1, N = function(t, r, n, a) {
126
- var s = n ? n.call(a, t, r) : void 0;
127
- if (s !== void 0)
128
- return !!s;
129
- if (t === r)
130
- return !0;
131
- if (typeof t != "object" || !t || typeof r != "object" || !r)
132
- return !1;
133
- var o = Object.keys(t), c = Object.keys(r);
134
- if (o.length !== c.length)
135
- return !1;
136
- for (var i = Object.prototype.hasOwnProperty.bind(r), l = 0; l < o.length; l++) {
137
- var f = o[l];
138
- if (!i(f))
139
- return !1;
140
- var d = t[f], h = r[f];
141
- if (s = n ? n.call(a, d, h, f) : void 0, s === !1 || s === void 0 && d !== h)
142
- return !1;
143
- }
144
- return !0;
145
- }), N;
146
- }
147
- var _e = Ne();
148
- const Re = /* @__PURE__ */ X(_e);
149
- var fe = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "head", e.HTML = "html", e.LINK = "link", e.META = "meta", e.NOSCRIPT = "noscript", e.SCRIPT = "script", e.STYLE = "style", e.TITLE = "title", e.FRAGMENT = "Symbol(react.fragment)", e))(fe || {}), _ = {
150
- link: { rel: ["amphtml", "canonical", "alternate"] },
151
- script: { type: ["application/ld+json"] },
152
- meta: {
153
- charset: "",
154
- name: ["generator", "robots", "description"],
155
- property: [
156
- "og:type",
157
- "og:title",
158
- "og:url",
159
- "og:image",
160
- "og:image:alt",
161
- "og:description",
162
- "twitter:url",
163
- "twitter:title",
164
- "twitter:description",
165
- "twitter:image",
166
- "twitter:image:alt",
167
- "twitter:card",
168
- "twitter:site"
169
- ]
170
- }
171
- }, ne = Object.values(fe), G = {
172
- accesskey: "accessKey",
173
- charset: "charSet",
174
- class: "className",
175
- contenteditable: "contentEditable",
176
- contextmenu: "contextMenu",
177
- "http-equiv": "httpEquiv",
178
- itemprop: "itemProp",
179
- tabindex: "tabIndex"
180
- }, Le = Object.entries(G).reduce(
181
- (e, [t, r]) => (e[r] = t, e),
182
- {}
183
- ), v = "data-rh", A = {
184
- DEFAULT_TITLE: "defaultTitle",
185
- DEFER: "defer",
186
- ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",
187
- ON_CHANGE_CLIENT_STATE: "onChangeClientState",
188
- TITLE_TEMPLATE: "titleTemplate",
189
- PRIORITIZE_SEO_TAGS: "prioritizeSeoTags"
190
- }, w = (e, t) => {
191
- for (let r = e.length - 1; r >= 0; r -= 1) {
192
- const n = e[r];
193
- if (Object.prototype.hasOwnProperty.call(n, t))
194
- return n[t];
195
- }
196
- return null;
197
- }, Fe = (e) => {
198
- let t = w(
199
- e,
200
- "title"
201
- /* TITLE */
202
- );
203
- const r = w(e, A.TITLE_TEMPLATE);
204
- if (Array.isArray(t) && (t = t.join("")), r && t)
205
- return r.replace(/%s/g, () => t);
206
- const n = w(e, A.DEFAULT_TITLE);
207
- return t || n || void 0;
208
- }, qe = (e) => w(e, A.ON_CHANGE_CLIENT_STATE) || (() => {
209
- }), R = (e, t) => t.filter((r) => typeof r[e] < "u").map((r) => r[e]).reduce((r, n) => ({ ...r, ...n }), {}), Ue = (e, t) => t.filter((r) => typeof r.base < "u").map((r) => r.base).reverse().reduce((r, n) => {
210
- if (!r.length) {
211
- const a = Object.keys(n);
212
- for (let s = 0; s < a.length; s += 1) {
213
- const c = a[s].toLowerCase();
214
- if (e.indexOf(c) !== -1 && n[c])
215
- return r.concat(n);
216
- }
217
- }
218
- return r;
219
- }, []), ze = (e) => console && typeof console.warn == "function" && console.warn(e), O = (e, t, r) => {
220
- const n = {};
221
- return r.filter((a) => Array.isArray(a[e]) ? !0 : (typeof a[e] < "u" && ze(
222
- `Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`
223
- ), !1)).map((a) => a[e]).reverse().reduce((a, s) => {
224
- const o = {};
225
- s.filter((i) => {
226
- let l;
227
- const f = Object.keys(i);
228
- for (let h = 0; h < f.length; h += 1) {
229
- const p = f[h], b = p.toLowerCase();
230
- t.indexOf(b) !== -1 && !(l === "rel" && i[l].toLowerCase() === "canonical") && !(b === "rel" && i[b].toLowerCase() === "stylesheet") && (l = b), t.indexOf(p) !== -1 && (p === "innerHTML" || p === "cssText" || p === "itemprop") && (l = p);
231
- }
232
- if (!l || !i[l])
233
- return !1;
234
- const d = i[l].toLowerCase();
235
- return n[l] || (n[l] = {}), o[l] || (o[l] = {}), n[l][d] ? !1 : (o[l][d] = !0, !0);
236
- }).reverse().forEach((i) => a.push(i));
237
- const c = Object.keys(o);
238
- for (let i = 0; i < c.length; i += 1) {
239
- const l = c[i], f = {
240
- ...n[l],
241
- ...o[l]
242
- };
243
- n[l] = f;
244
- }
245
- return a;
246
- }, []).reverse();
247
- }, Ve = (e, t) => {
248
- if (Array.isArray(e) && e.length) {
249
- for (let r = 0; r < e.length; r += 1)
250
- if (e[r][t])
251
- return !0;
252
- }
253
- return !1;
254
- }, Ke = (e) => ({
255
- baseTag: Ue([
256
- "href"
257
- /* HREF */
258
- ], e),
259
- bodyAttributes: R("bodyAttributes", e),
260
- defer: w(e, A.DEFER),
261
- encode: w(e, A.ENCODE_SPECIAL_CHARACTERS),
262
- htmlAttributes: R("htmlAttributes", e),
263
- linkTags: O(
264
- "link",
265
- [
266
- "rel",
267
- "href"
268
- /* HREF */
269
- ],
270
- e
271
- ),
272
- metaTags: O(
273
- "meta",
274
- [
275
- "name",
276
- "charset",
277
- "http-equiv",
278
- "property",
279
- "itemprop"
280
- /* ITEM_PROP */
281
- ],
282
- e
283
- ),
284
- noscriptTags: O("noscript", [
285
- "innerHTML"
286
- /* INNER_HTML */
287
- ], e),
288
- onChangeClientState: qe(e),
289
- scriptTags: O(
290
- "script",
291
- [
292
- "src",
293
- "innerHTML"
294
- /* INNER_HTML */
295
- ],
296
- e
297
- ),
298
- styleTags: O("style", [
299
- "cssText"
300
- /* CSS_TEXT */
301
- ], e),
302
- title: Fe(e),
303
- titleAttributes: R("titleAttributes", e),
304
- prioritizeSeoTags: Ve(e, A.PRIORITIZE_SEO_TAGS)
305
- }), de = (e) => Array.isArray(e) ? e.join("") : e, Be = (e, t) => {
306
- const r = Object.keys(e);
307
- for (let n = 0; n < r.length; n += 1)
308
- if (t[r[n]] && t[r[n]].includes(e[r[n]]))
309
- return !0;
310
- return !1;
311
- }, L = (e, t) => Array.isArray(e) ? e.reduce(
312
- (r, n) => (Be(n, t) ? r.priority.push(n) : r.default.push(n), r),
313
- { priority: [], default: [] }
314
- ) : { default: e, priority: [] }, se = (e, t) => ({
315
- ...e,
316
- [t]: void 0
317
- }), We = [
318
- "noscript",
319
- "script",
320
- "style"
321
- /* STYLE */
322
- ], V = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;"), pe = (e) => Object.keys(e).reduce((t, r) => {
323
- const n = typeof e[r] < "u" ? `${r}="${e[r]}"` : `${r}`;
324
- return t ? `${t} ${n}` : n;
325
- }, ""), Ye = (e, t, r, n) => {
326
- const a = pe(r), s = de(t);
327
- return a ? `<${e} ${v}="true" ${a}>${V(
328
- s,
329
- n
330
- )}</${e}>` : `<${e} ${v}="true">${V(
331
- s,
332
- n
333
- )}</${e}>`;
334
- }, Xe = (e, t, r = !0) => t.reduce((n, a) => {
335
- const s = a, o = Object.keys(s).filter(
336
- (l) => !(l === "innerHTML" || l === "cssText")
337
- ).reduce((l, f) => {
338
- const d = typeof s[f] > "u" ? f : `${f}="${V(s[f], r)}"`;
339
- return l ? `${l} ${d}` : d;
340
- }, ""), c = s.innerHTML || s.cssText || "", i = We.indexOf(e) === -1;
341
- return `${n}<${e} ${v}="true" ${o}${i ? "/>" : `>${c}</${e}>`}`;
342
- }, ""), he = (e, t = {}) => Object.keys(e).reduce((r, n) => {
343
- const a = G[n];
344
- return r[a || n] = e[n], r;
345
- }, t), Ze = (e, t, r) => {
346
- const n = {
347
- key: t,
348
- [v]: !0
349
- }, a = he(r, n);
350
- return [y.createElement("title", a, t)];
351
- }, P = (e, t) => t.map((r, n) => {
352
- const a = {
353
- key: n,
354
- [v]: !0
355
- };
356
- return Object.keys(r).forEach((s) => {
357
- const c = G[s] || s;
358
- if (c === "innerHTML" || c === "cssText") {
359
- const i = r.innerHTML || r.cssText;
360
- a.dangerouslySetInnerHTML = { __html: i };
361
- } else
362
- a[c] = r[s];
363
- }), y.createElement(e, a);
364
- }), g = (e, t, r = !0) => {
365
- switch (e) {
366
- case "title":
367
- return {
368
- toComponent: () => Ze(e, t.title, t.titleAttributes),
369
- toString: () => Ye(e, t.title, t.titleAttributes, r)
370
- };
371
- case "bodyAttributes":
372
- case "htmlAttributes":
373
- return {
374
- toComponent: () => he(t),
375
- toString: () => pe(t)
376
- };
377
- default:
378
- return {
379
- toComponent: () => P(e, t),
380
- toString: () => Xe(e, t, r)
381
- };
382
- }
383
- }, Ge = ({ metaTags: e, linkTags: t, scriptTags: r, encode: n }) => {
384
- const a = L(e, _.meta), s = L(t, _.link), o = L(r, _.script);
385
- return {
386
- priorityMethods: {
387
- toComponent: () => [
388
- ...P("meta", a.priority),
389
- ...P("link", s.priority),
390
- ...P("script", o.priority)
391
- ],
392
- toString: () => (
393
- // generate all the tags as strings and concatenate them
394
- `${g("meta", a.priority, n)} ${g(
395
- "link",
396
- s.priority,
397
- n
398
- )} ${g("script", o.priority, n)}`
399
- )
400
- },
401
- metaTags: a.default,
402
- linkTags: s.default,
403
- scriptTags: o.default
404
- };
405
- }, Je = (e) => {
406
- const {
407
- baseTag: t,
408
- bodyAttributes: r,
409
- encode: n = !0,
410
- htmlAttributes: a,
411
- noscriptTags: s,
412
- styleTags: o,
413
- title: c = "",
414
- titleAttributes: i,
415
- prioritizeSeoTags: l
416
- } = e;
417
- let { linkTags: f, metaTags: d, scriptTags: h } = e, p = {
418
- toComponent: () => {
419
- },
420
- toString: () => ""
421
- };
422
- return l && ({ priorityMethods: p, linkTags: f, metaTags: d, scriptTags: h } = Ge(e)), {
423
- priority: p,
424
- base: g("base", t, n),
425
- bodyAttributes: g("bodyAttributes", r, n),
426
- htmlAttributes: g("htmlAttributes", a, n),
427
- link: g("link", f, n),
428
- meta: g("meta", d, n),
429
- noscript: g("noscript", s, n),
430
- script: g("script", h, n),
431
- style: g("style", o, n),
432
- title: g("title", { title: c, titleAttributes: i }, n)
433
- };
434
- }, K = Je, H = [], me = !!(typeof window < "u" && window.document && window.document.createElement), B = class {
435
- constructor(e, t) {
436
- T(this, "instances", []);
437
- T(this, "canUseDOM", me);
438
- T(this, "context");
439
- T(this, "value", {
440
- setHelmet: (e) => {
441
- this.context.helmet = e;
442
- },
443
- helmetInstances: {
444
- get: () => this.canUseDOM ? H : this.instances,
445
- add: (e) => {
446
- (this.canUseDOM ? H : this.instances).push(e);
447
- },
448
- remove: (e) => {
449
- const t = (this.canUseDOM ? H : this.instances).indexOf(e);
450
- (this.canUseDOM ? H : this.instances).splice(t, 1);
451
- }
452
- }
453
- });
454
- this.context = e, this.canUseDOM = t || !1, t || (e.helmet = K({
455
- baseTag: [],
456
- bodyAttributes: {},
457
- htmlAttributes: {},
458
- linkTags: [],
459
- metaTags: [],
460
- noscriptTags: [],
461
- scriptTags: [],
462
- styleTags: [],
463
- title: "",
464
- titleAttributes: {}
465
- }));
466
- }
467
- }, Qe = {}, ge = y.createContext(Qe), x, et = (x = class extends Y {
468
- constructor(r) {
469
- super(r);
470
- T(this, "helmetData");
471
- this.helmetData = new B(this.props.context || {}, x.canUseDOM);
472
- }
473
- render() {
474
- return /* @__PURE__ */ y.createElement(ge.Provider, { value: this.helmetData.value }, this.props.children);
475
- }
476
- }, T(x, "canUseDOM", me), x), C = (e, t) => {
477
- const r = document.head || document.querySelector(
478
- "head"
479
- /* HEAD */
480
- ), n = r.querySelectorAll(`${e}[${v}]`), a = [].slice.call(n), s = [];
481
- let o;
482
- return t && t.length && t.forEach((c) => {
483
- const i = document.createElement(e);
484
- for (const l in c)
485
- if (Object.prototype.hasOwnProperty.call(c, l))
486
- if (l === "innerHTML")
487
- i.innerHTML = c.innerHTML;
488
- else if (l === "cssText")
489
- i.styleSheet ? i.styleSheet.cssText = c.cssText : i.appendChild(document.createTextNode(c.cssText));
490
- else {
491
- const f = l, d = typeof c[f] > "u" ? "" : c[f];
492
- i.setAttribute(l, d);
493
- }
494
- i.setAttribute(v, "true"), a.some((l, f) => (o = f, i.isEqualNode(l))) ? a.splice(o, 1) : s.push(i);
495
- }), a.forEach((c) => {
496
- var i;
497
- return (i = c.parentNode) == null ? void 0 : i.removeChild(c);
498
- }), s.forEach((c) => r.appendChild(c)), {
499
- oldTags: a,
500
- newTags: s
501
- };
502
- }, W = (e, t) => {
503
- const r = document.getElementsByTagName(e)[0];
504
- if (!r)
505
- return;
506
- const n = r.getAttribute(v), a = n ? n.split(",") : [], s = [...a], o = Object.keys(t);
507
- for (const c of o) {
508
- const i = t[c] || "";
509
- r.getAttribute(c) !== i && r.setAttribute(c, i), a.indexOf(c) === -1 && a.push(c);
510
- const l = s.indexOf(c);
511
- l !== -1 && s.splice(l, 1);
512
- }
513
- for (let c = s.length - 1; c >= 0; c -= 1)
514
- r.removeAttribute(s[c]);
515
- a.length === s.length ? r.removeAttribute(v) : r.getAttribute(v) !== o.join(",") && r.setAttribute(v, o.join(","));
516
- }, tt = (e, t) => {
517
- typeof e < "u" && document.title !== e && (document.title = de(e)), W("title", t);
518
- }, ae = (e, t) => {
519
- const {
520
- baseTag: r,
521
- bodyAttributes: n,
522
- htmlAttributes: a,
523
- linkTags: s,
524
- metaTags: o,
525
- noscriptTags: c,
526
- onChangeClientState: i,
527
- scriptTags: l,
528
- styleTags: f,
529
- title: d,
530
- titleAttributes: h
531
- } = e;
532
- W("body", n), W("html", a), tt(d, h);
533
- const p = {
534
- baseTag: C("base", r),
535
- linkTags: C("link", s),
536
- metaTags: C("meta", o),
537
- noscriptTags: C("noscript", c),
538
- scriptTags: C("script", l),
539
- styleTags: C("style", f)
540
- }, b = {}, E = {};
541
- Object.keys(p).forEach((m) => {
542
- const { newTags: I, oldTags: be } = p[m];
543
- I.length && (b[m] = I), be.length && (E[m] = p[m].oldTags);
544
- }), t && t(), i(e, b, E);
545
- }, k = null, rt = (e) => {
546
- k && cancelAnimationFrame(k), e.defer ? k = requestAnimationFrame(() => {
547
- ae(e, () => {
548
- k = null;
549
- });
550
- }) : (ae(e), k = null);
551
- }, nt = rt, oe = class extends Y {
552
- constructor() {
553
- super(...arguments);
554
- T(this, "rendered", !1);
555
- }
556
- shouldComponentUpdate(t) {
557
- return !Re(t, this.props);
558
- }
559
- componentDidUpdate() {
560
- this.emitChange();
561
- }
562
- componentWillUnmount() {
563
- const { helmetInstances: t } = this.props.context;
564
- t.remove(this), this.emitChange();
565
- }
566
- emitChange() {
567
- const { helmetInstances: t, setHelmet: r } = this.props.context;
568
- let n = null;
569
- const a = Ke(
570
- t.get().map((s) => {
571
- const o = { ...s.props };
572
- return delete o.context, o;
573
- })
574
- );
575
- et.canUseDOM ? nt(a) : K && (n = K(a)), r(n);
576
- }
577
- // componentWillMount will be deprecated
578
- // for SSR, initialize on first render
579
- // constructor is also unsafe in StrictMode
580
- init() {
581
- if (this.rendered)
582
- return;
583
- this.rendered = !0;
584
- const { helmetInstances: t } = this.props.context;
585
- t.add(this), this.emitChange();
586
- }
587
- render() {
588
- return this.init(), null;
589
- }
590
- }, q, xt = (q = class extends Y {
591
- shouldComponentUpdate(e) {
592
- return !Me(se(this.props, "helmetData"), se(e, "helmetData"));
593
- }
594
- mapNestedChildrenToProps(e, t) {
595
- if (!t)
596
- return null;
597
- switch (e.type) {
598
- case "script":
599
- case "noscript":
600
- return {
601
- innerHTML: t
602
- };
603
- case "style":
604
- return {
605
- cssText: t
606
- };
607
- default:
608
- throw new Error(
609
- `<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`
610
- );
611
- }
612
- }
613
- flattenArrayTypeChildren(e, t, r, n) {
614
- return {
615
- ...t,
616
- [e.type]: [
617
- ...t[e.type] || [],
618
- {
619
- ...r,
620
- ...this.mapNestedChildrenToProps(e, n)
621
- }
622
- ]
623
- };
624
- }
625
- mapObjectTypeChildren(e, t, r, n) {
626
- switch (e.type) {
627
- case "title":
628
- return {
629
- ...t,
630
- [e.type]: n,
631
- titleAttributes: { ...r }
632
- };
633
- case "body":
634
- return {
635
- ...t,
636
- bodyAttributes: { ...r }
637
- };
638
- case "html":
639
- return {
640
- ...t,
641
- htmlAttributes: { ...r }
642
- };
643
- default:
644
- return {
645
- ...t,
646
- [e.type]: { ...r }
647
- };
648
- }
649
- }
650
- mapArrayTypeChildrenToProps(e, t) {
651
- let r = { ...t };
652
- return Object.keys(e).forEach((n) => {
653
- r = {
654
- ...r,
655
- [n]: e[n]
656
- };
657
- }), r;
658
- }
659
- warnOnInvalidChildren(e, t) {
660
- return te(
661
- ne.some((r) => e.type === r),
662
- typeof e.type == "function" ? "You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information." : `Only elements types ${ne.join(
663
- ", "
664
- )} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`
665
- ), te(
666
- !t || typeof t == "string" || Array.isArray(t) && !t.some((r) => typeof r != "string"),
667
- `Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`
668
- ), !0;
669
- }
670
- mapChildrenToProps(e, t) {
671
- let r = {};
672
- return y.Children.forEach(e, (n) => {
673
- if (!n || !n.props)
674
- return;
675
- const { children: a, ...s } = n.props, o = Object.keys(s).reduce((i, l) => (i[Le[l] || l] = s[l], i), {});
676
- let { type: c } = n;
677
- switch (typeof c == "symbol" ? c = c.toString() : this.warnOnInvalidChildren(n, a), c) {
678
- case "Symbol(react.fragment)":
679
- t = this.mapChildrenToProps(a, t);
680
- break;
681
- case "link":
682
- case "meta":
683
- case "noscript":
684
- case "script":
685
- case "style":
686
- r = this.flattenArrayTypeChildren(
687
- n,
688
- r,
689
- o,
690
- a
691
- );
692
- break;
693
- default:
694
- t = this.mapObjectTypeChildren(n, t, o, a);
695
- break;
696
- }
697
- }), this.mapArrayTypeChildrenToProps(r, t);
698
- }
699
- render() {
700
- const { children: e, ...t } = this.props;
701
- let r = { ...t }, { helmetData: n } = t;
702
- if (e && (r = this.mapChildrenToProps(e, r)), n && !(n instanceof B)) {
703
- const a = n;
704
- n = new B(a.context, !0), delete r.helmetData;
705
- }
706
- return n ? /* @__PURE__ */ y.createElement(oe, { ...r, context: n.value }) : /* @__PURE__ */ y.createElement(ge.Consumer, null, (a) => /* @__PURE__ */ y.createElement(oe, { ...r, context: a }));
707
- }
708
- }, T(q, "defaultProps", {
709
- defer: !0,
710
- encodeSpecialCharacters: !0,
711
- prioritizeSeoTags: !1
712
- }), q);
713
- const st = (e) => {
714
- const t = le(), r = ve(), n = typeof e.to == "string" ? e.to : e.to.hash, a = (s) => {
715
- var o;
716
- (o = e.onClick) == null || o.call(e, s), !(!(n != null && n.startsWith("#")) || n !== t.hash) && (s.preventDefault(), r(n));
717
- };
718
- return /* @__PURE__ */ u.jsx(Ae, { ...e, onClick: a });
719
- }, at = {
720
- green: "bg-green-400 dark:bg-green-800",
721
- blue: "bg-sky-400 dark:bg-sky-800",
722
- yellow: "bg-yellow-400 dark:bg-yellow-800",
723
- red: "bg-red-400 dark:bg-red-800",
724
- purple: "bg-purple-400 dark:bg-purple-600",
725
- indigo: "bg-indigo-400 dark:bg-indigo-600",
726
- gray: "bg-gray-400 dark:bg-gray-600",
727
- outline: "border border-border rounded-md text-foreground"
728
- }, ot = {
729
- green: "text-green-500 dark:text-green-600",
730
- blue: "text-sky-400 dark:text-sky-600",
731
- yellow: "text-yellow-400 dark:text-yellow-600",
732
- red: "text-red-400 dark:text-red-600",
733
- purple: "text-purple-400 dark:text-purple-600",
734
- indigo: "text-indigo-400 dark:text-indigo-600",
735
- gray: "text-gray-400 dark:text-gray-600",
736
- outline: ""
737
- }, F = ({
738
- color: e,
739
- label: t,
740
- className: r,
741
- invert: n
742
- }) => /* @__PURE__ */ u.jsx(
743
- "span",
744
- {
745
- className: S(
746
- "flex items-center duration-200 transition-opacity text-center uppercase text-[0.65rem] font-bold rounded text-background dark:text-zinc-50 h-full",
747
- e === "outline" ? "px-3" : "mt-0.5 px-1",
748
- n ? ot[e] : at[e],
749
- r
750
- ),
751
- children: t
752
- }
753
- ), it = ({
754
- category: e,
755
- onRequestClose: t
756
- }) => {
757
- var b, E;
758
- const r = je(e), [n, a] = J(!1), s = e.collapsible ?? !0, o = e.collapsed ?? !0, c = !!(!s || !o || r), [i, l] = J(c), f = we(((b = e.link) == null ? void 0 : b.id) ?? "");
759
- ie(() => {
760
- r && l(!0);
761
- }, [r]);
762
- const d = s && /* @__PURE__ */ u.jsx(
763
- "button",
764
- {
765
- type: "button",
766
- onClick: (m) => {
767
- m.preventDefault(), l((I) => !I), a(!0);
768
- },
769
- children: /* @__PURE__ */ u.jsx(
770
- ke,
771
- {
772
- size: 16,
773
- className: S(
774
- n && "transition",
775
- "shrink-0 group-data-[state=open]:rotate-90"
776
- )
777
- }
778
- )
779
- }
780
- ), h = e.icon && /* @__PURE__ */ u.jsx(
781
- e.icon,
782
- {
783
- size: 16,
784
- className: S("align-[-0.125em] ", f && "text-primary")
785
- }
786
- ), p = j({
787
- className: [
788
- "text-start font-medium",
789
- s || typeof e.link < "u" ? "cursor-pointer" : "cursor-default hover:bg-transparent"
790
- ]
791
- });
792
- return /* @__PURE__ */ u.jsxs(
793
- M.Root,
794
- {
795
- className: "flex flex-col",
796
- defaultOpen: c,
797
- open: i,
798
- onOpenChange: () => l(!0),
799
- children: [
800
- /* @__PURE__ */ u.jsx(M.Trigger, { className: "group", asChild: !0, disabled: !s, children: ((E = e.link) == null ? void 0 : E.type) === "doc" ? /* @__PURE__ */ u.jsxs(
801
- U,
802
- {
803
- to: ce(e.link.id),
804
- className: p,
805
- onClick: () => {
806
- a(!0), f && !i && l(!0);
807
- },
808
- children: [
809
- h,
810
- /* @__PURE__ */ u.jsxs(
811
- "div",
812
- {
813
- className: S(
814
- "flex items-center gap-2 justify-between w-full",
815
- f ? "text-primary" : "text-foreground/80"
816
- ),
817
- children: [
818
- /* @__PURE__ */ u.jsx("div", { className: "truncate", children: e.label }),
819
- d
820
- ]
821
- }
822
- )
823
- ]
824
- }
825
- ) : /* @__PURE__ */ u.jsxs("div", { onClick: () => a(!0), className: p, children: [
826
- h,
827
- /* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-between w-full", children: [
828
- /* @__PURE__ */ u.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
829
- d
830
- ] })
831
- ] }) }),
832
- /* @__PURE__ */ u.jsx(
833
- M.Content,
834
- {
835
- className: S(
836
- // CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
837
- n && "CollapsibleContent",
838
- e.items.length === 0 && "hidden",
839
- "ms-6 my-1"
840
- ),
841
- children: /* @__PURE__ */ u.jsx("ul", { className: "relative after:absolute after:-left-[--padding-nav-item] after:translate-x-[1.5px] after:top-0 after:bottom-0 after:w-px after:bg-border", children: e.items.map((m) => /* @__PURE__ */ u.jsx(
842
- lt,
843
- {
844
- onRequestClose: t,
845
- item: m
846
- },
847
- ("id" in m ? m.id : "") + ("href" in m ? m.href : "") + m.label
848
- )) })
849
- }
850
- )
851
- ]
852
- }
853
- );
854
- }, j = Oe(
855
- "flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent",
856
- {
857
- variants: {
858
- isActive: {
859
- true: "text-primary font-medium",
860
- false: "text-foreground/80"
861
- },
862
- isMuted: {
863
- true: "text-foreground/30",
864
- false: ""
865
- }
866
- },
867
- defaultVariants: {
868
- isActive: !1
869
- }
870
- }
871
- ), ye = "data-anchor", lt = ({
872
- item: e,
873
- onRequestClose: t
874
- }) => {
875
- var a, s;
876
- const { activeAnchor: r } = Z(), [n] = Ee();
877
- switch (e.type) {
878
- case "category":
879
- return /* @__PURE__ */ u.jsx(it, { category: e, onRequestClose: t });
880
- case "doc":
881
- return /* @__PURE__ */ u.jsxs(
882
- U,
883
- {
884
- className: ({ isActive: o }) => j({ isActive: o }),
885
- to: ce(e.id),
886
- onClick: t,
887
- end: !0,
888
- children: [
889
- e.icon && /* @__PURE__ */ u.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
890
- e.badge ? /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
891
- /* @__PURE__ */ u.jsx("span", { className: "truncate flex-1", title: e.label, children: e.label }),
892
- /* @__PURE__ */ u.jsx(F, { ...e.badge })
893
- ] }) : e.label
894
- ]
895
- }
896
- );
897
- case "link":
898
- return e.href.startsWith("#") ? /* @__PURE__ */ u.jsx(
899
- st,
900
- {
901
- to: { hash: e.href, search: n.toString() },
902
- [ye]: e.href.slice(1),
903
- className: j({
904
- isActive: e.href.slice(1) === r,
905
- className: ((a = e.badge) == null ? void 0 : a.placement) !== "start" && "justify-between"
906
- }),
907
- onClick: t,
908
- children: e.badge ? /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
909
- /* @__PURE__ */ u.jsx("span", { className: "truncate", title: e.label, children: e.label }),
910
- /* @__PURE__ */ u.jsx(F, { ...e.badge })
911
- ] }) : /* @__PURE__ */ u.jsx("span", { className: "break-all", children: e.label })
912
- }
913
- ) : e.href.startsWith("http") ? /* @__PURE__ */ u.jsxs(
914
- "a",
915
- {
916
- className: j(),
917
- href: e.href,
918
- target: "_blank",
919
- rel: "noopener noreferrer",
920
- onClick: t,
921
- children: [
922
- /* @__PURE__ */ u.jsx("span", { className: "whitespace-normal", children: e.label }),
923
- /* @__PURE__ */ u.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ u.jsx(Se, { className: "inline -translate-y-0.5", size: 12 }) })
924
- ]
925
- }
926
- ) : /* @__PURE__ */ u.jsx(
927
- U,
928
- {
929
- className: j({
930
- isActive: e.href.split("#")[1] === r,
931
- className: ((s = e.badge) == null ? void 0 : s.placement) !== "start" && "justify-between"
932
- }),
933
- to: e.href,
934
- children: e.badge ? /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
935
- /* @__PURE__ */ u.jsx("span", { className: "truncate", title: e.label, children: e.label }),
936
- /* @__PURE__ */ u.jsx(F, { ...e.badge })
937
- ] }) : /* @__PURE__ */ u.jsx("span", { className: "break-all", children: e.label })
938
- }
939
- );
940
- }
941
- }, ct = (e, t = { block: "center" }) => {
942
- if (!e) return;
943
- const r = e.getBoundingClientRect();
944
- r.top >= 0 && r.left >= 0 && r.bottom <= (window.innerHeight || document.documentElement.clientHeight) && r.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
945
- }, ve = () => {
946
- const { setActiveAnchor: e } = Z();
947
- return Ce(
948
- (r) => {
949
- const n = r.replace(/^#/, ""), a = n.split("/").at(0), s = document.getElementById(decodeURIComponent(n)), o = document.querySelector(
950
- `[${ye}="${a}"]`
951
- );
952
- return s ? (s.scrollIntoView(), ct(o), requestIdleCallback(() => e(a)), !0) : !1;
953
- },
954
- [e]
955
- );
956
- }, Ct = () => {
957
- const e = le(), { setActiveAnchor: t } = Z(), r = ve();
958
- ie(() => {
959
- if (e.hash && !r(e.hash)) {
960
- const n = new MutationObserver((a, s) => {
961
- r(e.hash) && s.disconnect();
962
- });
963
- return n.observe(document.body, { childList: !0, subtree: !0 }), () => n.disconnect();
964
- }
965
- }, [e.hash, r, t]);
966
- };
967
- export {
968
- st as A,
969
- xt as H,
970
- Tt as M,
971
- lt as S,
972
- et as a,
973
- Ct as b,
974
- ct as s,
975
- Ie as u
976
- };
977
- //# sourceMappingURL=useScrollToAnchor-DKyrbZoy.js.map