zudoku 0.3.0-dev.21 → 0.3.0-dev.23

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 (71) hide show
  1. package/dist/config/config.d.ts +1 -1
  2. package/dist/lib/authentication/authentication.d.ts +1 -1
  3. package/dist/lib/plugins/api-keys/index.js +1 -0
  4. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  5. package/dist/lib/plugins/markdown/generateRoutes.js +1 -1
  6. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
  7. package/dist/lib/plugins/openapi/OperationList.js +1 -1
  8. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  9. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +1 -1
  10. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
  11. package/dist/lib/plugins/openapi/Route.d.ts +6 -0
  12. package/dist/lib/plugins/openapi/Route.js +8 -0
  13. package/dist/lib/plugins/openapi/Route.js.map +1 -0
  14. package/dist/lib/plugins/openapi/context.d.ts +5 -0
  15. package/dist/lib/plugins/openapi/context.js +11 -0
  16. package/dist/lib/plugins/openapi/context.js.map +1 -0
  17. package/dist/lib/plugins/openapi/index.d.ts +1 -19
  18. package/dist/lib/plugins/openapi/index.js +17 -18
  19. package/dist/lib/plugins/openapi/index.js.map +1 -1
  20. package/dist/lib/plugins/openapi/interfaces.d.ts +15 -0
  21. package/dist/lib/plugins/openapi/interfaces.js +2 -0
  22. package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
  23. package/dist/vite/config.js +5 -1
  24. package/dist/vite/config.js.map +1 -1
  25. package/dist/vite/plugin-api-keys.js +3 -4
  26. package/dist/vite/plugin-api-keys.js.map +1 -1
  27. package/dist/vite/plugin-api.js +3 -7
  28. package/dist/vite/plugin-api.js.map +1 -1
  29. package/dist/vite/plugin-auth.js +2 -3
  30. package/dist/vite/plugin-auth.js.map +1 -1
  31. package/dist/vite/plugin-config.d.ts +0 -1
  32. package/dist/vite/plugin-config.js +11 -6
  33. package/dist/vite/plugin-config.js.map +1 -1
  34. package/dist/vite/plugin-redirect.js +2 -5
  35. package/dist/vite/plugin-redirect.js.map +1 -1
  36. package/lib/{util-voKLTRDG.js → AnchorLink-DIUlXlf0.js} +149 -184
  37. package/lib/DevPortalProvider-gzyAGqHT.js +1080 -0
  38. package/lib/{Markdown-5LmPZyLV.js → Markdown-BjA7peYW.js} +3 -3
  39. package/lib/{MdxComponents-DYD_QPVF.js → MdxComponents-W-fE1ISO.js} +130 -129
  40. package/lib/MdxPage-DQ7lZBzE.js +216 -0
  41. package/lib/OperationList-DuIBqFNA.js +5545 -0
  42. package/lib/Route-B98Y2MdH.js +13 -0
  43. package/lib/{Select-DR3PiqjV.js → Select-DczD5e29.js} +24 -22
  44. package/lib/{Spinner-DjQ2eBxC.js → Spinner-CSoij67T.js} +3 -3
  45. package/lib/cn-DpqTslo9.js +2341 -0
  46. package/lib/context-_fYfJFgk.js +13 -0
  47. package/lib/{hook-FCY9-FHO.js → hook-CBXxHulF.js} +1 -1
  48. package/lib/{index-By9bEW57.js → index-C7O9D7f6.js} +15 -15
  49. package/lib/index-CKvOcM7w.js +712 -0
  50. package/lib/index-Cg6lXS1z.js +709 -0
  51. package/lib/index-ClDDiRmC.js +463 -0
  52. package/lib/router-DibNxKUP.js +3008 -0
  53. package/lib/util-CaVongBq.js +40 -0
  54. package/lib/zudoku.auth-openid.js +7 -6
  55. package/lib/zudoku.components.js +73 -69
  56. package/lib/zudoku.plugin-api-keys.js +26 -23
  57. package/lib/zudoku.plugin-markdown.js +33 -237
  58. package/lib/zudoku.plugin-openapi.js +5 -6238
  59. package/lib/zudoku.plugin-redirect.js +7 -6
  60. package/package.json +1 -1
  61. package/src/lib/authentication/authentication.ts +1 -1
  62. package/src/lib/plugins/api-keys/index.tsx +1 -0
  63. package/src/lib/plugins/markdown/generateRoutes.tsx +2 -2
  64. package/src/lib/plugins/openapi/OperationList.tsx +1 -1
  65. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +1 -1
  66. package/src/lib/plugins/openapi/Route.tsx +21 -0
  67. package/src/lib/plugins/openapi/context.tsx +16 -0
  68. package/src/lib/plugins/openapi/index.tsx +19 -46
  69. package/src/lib/plugins/openapi/interfaces.ts +9 -0
  70. package/lib/DevPortalProvider-CRKuwoXc.js +0 -4123
  71. package/lib/index-PyGcnQFX.js +0 -3462
@@ -1,13 +1,14 @@
1
- var oe = Object.defineProperty;
2
- var ie = (e, t, r) => t in e ? oe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var T = (e, t, r) => ie(e, typeof t != "symbol" ? t + "" : t, r);
1
+ var ne = Object.defineProperty;
2
+ var se = (e, t, r) => t in e ? ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var T = (e, t, r) => se(e, typeof t != "symbol" ? t + "" : t, r);
4
4
  import d, { Component as L } from "react";
5
5
  import { g as F } from "./_commonjsHelpers-BkfeUUK-.js";
6
- import { u as ae, j as le, m as ce } from "./index-PyGcnQFX.js";
7
- import { L as ue } from "./DevPortalProvider-CRKuwoXc.js";
8
- const M = {}, W = d.createContext(M);
9
- function fe(e) {
10
- const t = d.useContext(W);
6
+ import { j as oe } from "./router-DibNxKUP.js";
7
+ import { L as ie } from "./index-CKvOcM7w.js";
8
+ import { u as ae } from "./index-ClDDiRmC.js";
9
+ const M = {}, X = d.createContext(M);
10
+ function le(e) {
11
+ const t = d.useContext(X);
11
12
  return d.useMemo(
12
13
  function() {
13
14
  return typeof e == "function" ? e(t) : { ...t, ...e };
@@ -15,15 +16,15 @@ function fe(e) {
15
16
  [t, e]
16
17
  );
17
18
  }
18
- function Ye(e) {
19
+ function Ne(e) {
19
20
  let t;
20
- return e.disableParentContext ? t = typeof e.components == "function" ? e.components(M) : e.components || M : t = fe(e.components), d.createElement(
21
- W.Provider,
21
+ return e.disableParentContext ? t = typeof e.components == "function" ? e.components(M) : e.components || M : t = le(e.components), d.createElement(
22
+ X.Provider,
22
23
  { value: t },
23
24
  e.children
24
25
  );
25
26
  }
26
- var pe = typeof Element < "u", me = typeof Map == "function", de = typeof Set == "function", he = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
27
+ var ce = typeof Element < "u", ue = typeof Map == "function", fe = typeof Set == "function", pe = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
27
28
  function x(e, t) {
28
29
  if (e === t) return !0;
29
30
  if (e && t && typeof e == "object" && typeof t == "object") {
@@ -36,7 +37,7 @@ function x(e, t) {
36
37
  return !0;
37
38
  }
38
39
  var o;
39
- if (me && e instanceof Map && t instanceof Map) {
40
+ if (ue && e instanceof Map && t instanceof Map) {
40
41
  if (e.size !== t.size) return !1;
41
42
  for (o = e.entries(); !(n = o.next()).done; )
42
43
  if (!t.has(n.value[0])) return !1;
@@ -44,13 +45,13 @@ function x(e, t) {
44
45
  if (!x(n.value[1], t.get(n.value[0]))) return !1;
45
46
  return !0;
46
47
  }
47
- if (de && e instanceof Set && t instanceof Set) {
48
+ if (fe && e instanceof Set && t instanceof Set) {
48
49
  if (e.size !== t.size) return !1;
49
50
  for (o = e.entries(); !(n = o.next()).done; )
50
51
  if (!t.has(n.value[0])) return !1;
51
52
  return !0;
52
53
  }
53
- if (he && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
54
+ if (pe && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
54
55
  if (r = e.length, r != t.length) return !1;
55
56
  for (n = r; n-- !== 0; )
56
57
  if (e[n] !== t[n]) return !1;
@@ -62,7 +63,7 @@ function x(e, t) {
62
63
  if (s = Object.keys(e), r = s.length, r !== Object.keys(t).length) return !1;
63
64
  for (n = r; n-- !== 0; )
64
65
  if (!Object.prototype.hasOwnProperty.call(t, s[n])) return !1;
65
- if (pe && e instanceof Element) return !1;
66
+ if (ce && e instanceof Element) return !1;
66
67
  for (n = r; n-- !== 0; )
67
68
  if (!((s[n] === "_owner" || s[n] === "__v" || s[n] === "__o") && e.$$typeof) && !x(e[s[n]], t[s[n]]))
68
69
  return !1;
@@ -70,7 +71,7 @@ function x(e, t) {
70
71
  }
71
72
  return e !== e && t !== t;
72
73
  }
73
- var ye = function(t, r) {
74
+ var me = function(t, r) {
74
75
  try {
75
76
  return x(t, r);
76
77
  } catch (n) {
@@ -79,29 +80,29 @@ var ye = function(t, r) {
79
80
  throw n;
80
81
  }
81
82
  };
82
- const Te = /* @__PURE__ */ F(ye);
83
- var ge = function(e, t, r, n, s, o, c, a) {
83
+ const de = /* @__PURE__ */ F(me);
84
+ var he = function(e, t, r, n, s, o, c, i) {
84
85
  if (process.env.NODE_ENV !== "production" && t === void 0)
85
86
  throw new Error("invariant requires an error message argument");
86
87
  if (!e) {
87
- var i;
88
+ var a;
88
89
  if (t === void 0)
89
- i = new Error(
90
+ a = new Error(
90
91
  "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
91
92
  );
92
93
  else {
93
- var l = [r, n, s, o, c, a], u = 0;
94
- i = new Error(
94
+ var l = [r, n, s, o, c, i], u = 0;
95
+ a = new Error(
95
96
  t.replace(/%s/g, function() {
96
97
  return l[u++];
97
98
  })
98
- ), i.name = "Invariant Violation";
99
+ ), a.name = "Invariant Violation";
99
100
  }
100
- throw i.framesToPop = 1, i;
101
+ throw a.framesToPop = 1, a;
101
102
  }
102
- }, ve = ge;
103
- const z = /* @__PURE__ */ F(ve);
104
- var Ae = function(t, r, n, s) {
103
+ }, ye = he;
104
+ const z = /* @__PURE__ */ F(ye);
105
+ var Te = function(t, r, n, s) {
105
106
  var o = n ? n.call(s, t, r) : void 0;
106
107
  if (o !== void 0)
107
108
  return !!o;
@@ -109,12 +110,12 @@ var Ae = function(t, r, n, s) {
109
110
  return !0;
110
111
  if (typeof t != "object" || !t || typeof r != "object" || !r)
111
112
  return !1;
112
- var c = Object.keys(t), a = Object.keys(r);
113
- if (c.length !== a.length)
113
+ var c = Object.keys(t), i = Object.keys(r);
114
+ if (c.length !== i.length)
114
115
  return !1;
115
- for (var i = Object.prototype.hasOwnProperty.bind(r), l = 0; l < c.length; l++) {
116
+ for (var a = Object.prototype.hasOwnProperty.bind(r), l = 0; l < c.length; l++) {
116
117
  var u = c[l];
117
- if (!i(u))
118
+ if (!a(u))
118
119
  return !1;
119
120
  var f = t[u], h = r[u];
120
121
  if (o = n ? n.call(s, f, h, u) : void 0, o === !1 || o === void 0 && f !== h)
@@ -122,8 +123,8 @@ var Ae = function(t, r, n, s) {
122
123
  }
123
124
  return !0;
124
125
  };
125
- const Ce = /* @__PURE__ */ F(Ae);
126
- var Z = /* @__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))(Z || {}), $ = {
126
+ const ge = /* @__PURE__ */ F(Te);
127
+ var W = /* @__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))(W || {}), $ = {
127
128
  link: { rel: ["amphtml", "canonical", "alternate"] },
128
129
  script: { type: ["application/ld+json"] },
129
130
  meta: {
@@ -145,7 +146,7 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
145
146
  "twitter:site"
146
147
  ]
147
148
  }
148
- }, V = Object.values(Z), U = {
149
+ }, N = Object.values(W), U = {
149
150
  accesskey: "accessKey",
150
151
  charset: "charSet",
151
152
  class: "className",
@@ -154,7 +155,7 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
154
155
  "http-equiv": "httpEquiv",
155
156
  itemprop: "itemProp",
156
157
  tabindex: "tabIndex"
157
- }, Ee = Object.entries(U).reduce(
158
+ }, ve = Object.entries(U).reduce(
158
159
  (e, [t, r]) => (e[r] = t, e),
159
160
  {}
160
161
  ), y = "data-rh", C = {
@@ -171,7 +172,7 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
171
172
  return n[t];
172
173
  }
173
174
  return null;
174
- }, be = (e) => {
175
+ }, Ae = (e) => {
175
176
  let t = E(
176
177
  e,
177
178
  "title"
@@ -182,38 +183,38 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
182
183
  return r.replace(/%s/g, () => t);
183
184
  const n = E(e, C.DEFAULT_TITLE);
184
185
  return t || n || void 0;
185
- }, Oe = (e) => E(e, C.ON_CHANGE_CLIENT_STATE) || (() => {
186
- }), I = (e, t) => t.filter((r) => typeof r[e] < "u").map((r) => r[e]).reduce((r, n) => ({ ...r, ...n }), {}), Se = (e, t) => t.filter((r) => typeof r.base < "u").map((r) => r.base).reverse().reduce((r, n) => {
186
+ }, Ce = (e) => E(e, C.ON_CHANGE_CLIENT_STATE) || (() => {
187
+ }), I = (e, t) => t.filter((r) => typeof r[e] < "u").map((r) => r[e]).reduce((r, n) => ({ ...r, ...n }), {}), Ee = (e, t) => t.filter((r) => typeof r.base < "u").map((r) => r.base).reverse().reduce((r, n) => {
187
188
  if (!r.length) {
188
189
  const s = Object.keys(n);
189
190
  for (let o = 0; o < s.length; o += 1) {
190
- const a = s[o].toLowerCase();
191
- if (e.indexOf(a) !== -1 && n[a])
191
+ const i = s[o].toLowerCase();
192
+ if (e.indexOf(i) !== -1 && n[i])
192
193
  return r.concat(n);
193
194
  }
194
195
  }
195
196
  return r;
196
- }, []), we = (e) => console && typeof console.warn == "function" && console.warn(e), b = (e, t, r) => {
197
+ }, []), be = (e) => console && typeof console.warn == "function" && console.warn(e), b = (e, t, r) => {
197
198
  const n = {};
198
- return r.filter((s) => Array.isArray(s[e]) ? !0 : (typeof s[e] < "u" && we(
199
+ return r.filter((s) => Array.isArray(s[e]) ? !0 : (typeof s[e] < "u" && be(
199
200
  `Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`
200
201
  ), !1)).map((s) => s[e]).reverse().reduce((s, o) => {
201
202
  const c = {};
202
- o.filter((i) => {
203
+ o.filter((a) => {
203
204
  let l;
204
- const u = Object.keys(i);
205
+ const u = Object.keys(a);
205
206
  for (let h = 0; h < u.length; h += 1) {
206
207
  const p = u[h], g = p.toLowerCase();
207
- t.indexOf(g) !== -1 && !(l === "rel" && i[l].toLowerCase() === "canonical") && !(g === "rel" && i[g].toLowerCase() === "stylesheet") && (l = g), t.indexOf(p) !== -1 && (p === "innerHTML" || p === "cssText" || p === "itemprop") && (l = p);
208
+ t.indexOf(g) !== -1 && !(l === "rel" && a[l].toLowerCase() === "canonical") && !(g === "rel" && a[g].toLowerCase() === "stylesheet") && (l = g), t.indexOf(p) !== -1 && (p === "innerHTML" || p === "cssText" || p === "itemprop") && (l = p);
208
209
  }
209
- if (!l || !i[l])
210
+ if (!l || !a[l])
210
211
  return !1;
211
- const f = i[l].toLowerCase();
212
+ const f = a[l].toLowerCase();
212
213
  return n[l] || (n[l] = {}), c[l] || (c[l] = {}), n[l][f] ? !1 : (c[l][f] = !0, !0);
213
- }).reverse().forEach((i) => s.push(i));
214
- const a = Object.keys(c);
215
- for (let i = 0; i < a.length; i += 1) {
216
- const l = a[i], u = {
214
+ }).reverse().forEach((a) => s.push(a));
215
+ const i = Object.keys(c);
216
+ for (let a = 0; a < i.length; a += 1) {
217
+ const l = i[a], u = {
217
218
  ...n[l],
218
219
  ...c[l]
219
220
  };
@@ -221,15 +222,15 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
221
222
  }
222
223
  return s;
223
224
  }, []).reverse();
224
- }, xe = (e, t) => {
225
+ }, Oe = (e, t) => {
225
226
  if (Array.isArray(e) && e.length) {
226
227
  for (let r = 0; r < e.length; r += 1)
227
228
  if (e[r][t])
228
229
  return !0;
229
230
  }
230
231
  return !1;
231
- }, Pe = (e) => ({
232
- baseTag: Se([
232
+ }, Se = (e) => ({
233
+ baseTag: Ee([
233
234
  "href"
234
235
  /* HREF */
235
236
  ], e),
@@ -262,7 +263,7 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
262
263
  "innerHTML"
263
264
  /* INNER_HTML */
264
265
  ], e),
265
- onChangeClientState: Oe(e),
266
+ onChangeClientState: Ce(e),
266
267
  scriptTags: b(
267
268
  "script",
268
269
  [
@@ -276,31 +277,31 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
276
277
  "cssText"
277
278
  /* CSS_TEXT */
278
279
  ], e),
279
- title: be(e),
280
+ title: Ae(e),
280
281
  titleAttributes: I("titleAttributes", e),
281
- prioritizeSeoTags: xe(e, C.PRIORITIZE_SEO_TAGS)
282
- }), G = (e) => Array.isArray(e) ? e.join("") : e, $e = (e, t) => {
282
+ prioritizeSeoTags: Oe(e, C.PRIORITIZE_SEO_TAGS)
283
+ }), Z = (e) => Array.isArray(e) ? e.join("") : e, we = (e, t) => {
283
284
  const r = Object.keys(e);
284
285
  for (let n = 0; n < r.length; n += 1)
285
286
  if (t[r[n]] && t[r[n]].includes(e[r[n]]))
286
287
  return !0;
287
288
  return !1;
288
289
  }, H = (e, t) => Array.isArray(e) ? e.reduce(
289
- (r, n) => ($e(n, t) ? r.priority.push(n) : r.default.push(n), r),
290
+ (r, n) => (we(n, t) ? r.priority.push(n) : r.default.push(n), r),
290
291
  { priority: [], default: [] }
291
- ) : { default: e, priority: [] }, B = (e, t) => ({
292
+ ) : { default: e, priority: [] }, V = (e, t) => ({
292
293
  ...e,
293
294
  [t]: void 0
294
- }), Ie = [
295
+ }), xe = [
295
296
  "noscript",
296
297
  "script",
297
298
  "style"
298
299
  /* STYLE */
299
- ], k = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;"), J = (e) => Object.keys(e).reduce((t, r) => {
300
+ ], k = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;"), G = (e) => Object.keys(e).reduce((t, r) => {
300
301
  const n = typeof e[r] < "u" ? `${r}="${e[r]}"` : `${r}`;
301
302
  return t ? `${t} ${n}` : n;
302
- }, ""), He = (e, t, r, n) => {
303
- const s = J(r), o = G(t);
303
+ }, ""), Pe = (e, t, r, n) => {
304
+ const s = G(r), o = Z(t);
304
305
  return s ? `<${e} ${y}="true" ${s}>${k(
305
306
  o,
306
307
  n
@@ -308,22 +309,22 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
308
309
  o,
309
310
  n
310
311
  )}</${e}>`;
311
- }, De = (e, t, r = !0) => t.reduce((n, s) => {
312
+ }, $e = (e, t, r = !0) => t.reduce((n, s) => {
312
313
  const o = s, c = Object.keys(o).filter(
313
314
  (l) => !(l === "innerHTML" || l === "cssText")
314
315
  ).reduce((l, u) => {
315
316
  const f = typeof o[u] > "u" ? u : `${u}="${k(o[u], r)}"`;
316
317
  return l ? `${l} ${f}` : f;
317
- }, ""), a = o.innerHTML || o.cssText || "", i = Ie.indexOf(e) === -1;
318
- return `${n}<${e} ${y}="true" ${c}${i ? "/>" : `>${a}</${e}>`}`;
319
- }, ""), Q = (e, t = {}) => Object.keys(e).reduce((r, n) => {
318
+ }, ""), i = o.innerHTML || o.cssText || "", a = xe.indexOf(e) === -1;
319
+ return `${n}<${e} ${y}="true" ${c}${a ? "/>" : `>${i}</${e}>`}`;
320
+ }, ""), J = (e, t = {}) => Object.keys(e).reduce((r, n) => {
320
321
  const s = U[n];
321
322
  return r[s || n] = e[n], r;
322
- }, t), Me = (e, t, r) => {
323
+ }, t), Ie = (e, t, r) => {
323
324
  const n = {
324
325
  key: t,
325
326
  [y]: !0
326
- }, s = Q(r, n);
327
+ }, s = J(r, n);
327
328
  return [d.createElement("title", s, t)];
328
329
  }, P = (e, t) => t.map((r, n) => {
329
330
  const s = {
@@ -331,33 +332,33 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
331
332
  [y]: !0
332
333
  };
333
334
  return Object.keys(r).forEach((o) => {
334
- const a = U[o] || o;
335
- if (a === "innerHTML" || a === "cssText") {
336
- const i = r.innerHTML || r.cssText;
337
- s.dangerouslySetInnerHTML = { __html: i };
335
+ const i = U[o] || o;
336
+ if (i === "innerHTML" || i === "cssText") {
337
+ const a = r.innerHTML || r.cssText;
338
+ s.dangerouslySetInnerHTML = { __html: a };
338
339
  } else
339
- s[a] = r[o];
340
+ s[i] = r[o];
340
341
  }), d.createElement(e, s);
341
342
  }), m = (e, t, r = !0) => {
342
343
  switch (e) {
343
344
  case "title":
344
345
  return {
345
- toComponent: () => Me(e, t.title, t.titleAttributes),
346
- toString: () => He(e, t.title, t.titleAttributes, r)
346
+ toComponent: () => Ie(e, t.title, t.titleAttributes),
347
+ toString: () => Pe(e, t.title, t.titleAttributes, r)
347
348
  };
348
349
  case "bodyAttributes":
349
350
  case "htmlAttributes":
350
351
  return {
351
- toComponent: () => Q(t),
352
- toString: () => J(t)
352
+ toComponent: () => J(t),
353
+ toString: () => G(t)
353
354
  };
354
355
  default:
355
356
  return {
356
357
  toComponent: () => P(e, t),
357
- toString: () => De(e, t, r)
358
+ toString: () => $e(e, t, r)
358
359
  };
359
360
  }
360
- }, ke = ({ metaTags: e, linkTags: t, scriptTags: r, encode: n }) => {
361
+ }, He = ({ metaTags: e, linkTags: t, scriptTags: r, encode: n }) => {
361
362
  const s = H(e, $.meta), o = H(t, $.link), c = H(r, $.script);
362
363
  return {
363
364
  priorityMethods: {
@@ -379,7 +380,7 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
379
380
  linkTags: o.default,
380
381
  scriptTags: c.default
381
382
  };
382
- }, _e = (e) => {
383
+ }, De = (e) => {
383
384
  const {
384
385
  baseTag: t,
385
386
  bodyAttributes: r,
@@ -387,8 +388,8 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
387
388
  htmlAttributes: s,
388
389
  noscriptTags: o,
389
390
  styleTags: c,
390
- title: a = "",
391
- titleAttributes: i,
391
+ title: i = "",
392
+ titleAttributes: a,
392
393
  prioritizeSeoTags: l
393
394
  } = e;
394
395
  let { linkTags: u, metaTags: f, scriptTags: h } = e, p = {
@@ -396,7 +397,7 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
396
397
  },
397
398
  toString: () => ""
398
399
  };
399
- return l && ({ priorityMethods: p, linkTags: u, metaTags: f, scriptTags: h } = ke(e)), {
400
+ return l && ({ priorityMethods: p, linkTags: u, metaTags: f, scriptTags: h } = He(e)), {
400
401
  priority: p,
401
402
  base: m("base", t, n),
402
403
  bodyAttributes: m("bodyAttributes", r, n),
@@ -406,12 +407,12 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
406
407
  noscript: m("noscript", o, n),
407
408
  script: m("script", h, n),
408
409
  style: m("style", c, n),
409
- title: m("title", { title: a, titleAttributes: i }, n)
410
+ title: m("title", { title: i, titleAttributes: a }, n)
410
411
  };
411
- }, _ = _e, w = [], ee = !!(typeof window < "u" && window.document && window.document.createElement), j = class {
412
+ }, _ = De, w = [], Q = !!(typeof window < "u" && window.document && window.document.createElement), R = class {
412
413
  constructor(e, t) {
413
414
  T(this, "instances", []);
414
- T(this, "canUseDOM", ee);
415
+ T(this, "canUseDOM", Q);
415
416
  T(this, "context");
416
417
  T(this, "value", {
417
418
  setHelmet: (e) => {
@@ -442,57 +443,57 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
442
443
  titleAttributes: {}
443
444
  }));
444
445
  }
445
- }, je = {}, te = d.createContext(je), v, re = (v = class extends L {
446
+ }, Me = {}, ee = d.createContext(Me), v, te = (v = class extends L {
446
447
  constructor(r) {
447
448
  super(r);
448
449
  T(this, "helmetData");
449
- this.helmetData = new j(this.props.context || {}, v.canUseDOM);
450
+ this.helmetData = new R(this.props.context || {}, v.canUseDOM);
450
451
  }
451
452
  render() {
452
- return /* @__PURE__ */ d.createElement(te.Provider, { value: this.helmetData.value }, this.props.children);
453
+ return /* @__PURE__ */ d.createElement(ee.Provider, { value: this.helmetData.value }, this.props.children);
453
454
  }
454
- }, T(v, "canUseDOM", ee), v), A = (e, t) => {
455
+ }, T(v, "canUseDOM", Q), v), A = (e, t) => {
455
456
  const r = document.head || document.querySelector(
456
457
  "head"
457
458
  /* HEAD */
458
459
  ), n = r.querySelectorAll(`${e}[${y}]`), s = [].slice.call(n), o = [];
459
460
  let c;
460
- return t && t.length && t.forEach((a) => {
461
- const i = document.createElement(e);
462
- for (const l in a)
463
- if (Object.prototype.hasOwnProperty.call(a, l))
461
+ return t && t.length && t.forEach((i) => {
462
+ const a = document.createElement(e);
463
+ for (const l in i)
464
+ if (Object.prototype.hasOwnProperty.call(i, l))
464
465
  if (l === "innerHTML")
465
- i.innerHTML = a.innerHTML;
466
+ a.innerHTML = i.innerHTML;
466
467
  else if (l === "cssText")
467
- i.styleSheet ? i.styleSheet.cssText = a.cssText : i.appendChild(document.createTextNode(a.cssText));
468
+ a.styleSheet ? a.styleSheet.cssText = i.cssText : a.appendChild(document.createTextNode(i.cssText));
468
469
  else {
469
- const u = l, f = typeof a[u] > "u" ? "" : a[u];
470
- i.setAttribute(l, f);
470
+ const u = l, f = typeof i[u] > "u" ? "" : i[u];
471
+ a.setAttribute(l, f);
471
472
  }
472
- i.setAttribute(y, "true"), s.some((l, u) => (c = u, i.isEqualNode(l))) ? s.splice(c, 1) : o.push(i);
473
- }), s.forEach((a) => {
474
- var i;
475
- return (i = a.parentNode) == null ? void 0 : i.removeChild(a);
476
- }), o.forEach((a) => r.appendChild(a)), {
473
+ a.setAttribute(y, "true"), s.some((l, u) => (c = u, a.isEqualNode(l))) ? s.splice(c, 1) : o.push(a);
474
+ }), s.forEach((i) => {
475
+ var a;
476
+ return (a = i.parentNode) == null ? void 0 : a.removeChild(i);
477
+ }), o.forEach((i) => r.appendChild(i)), {
477
478
  oldTags: s,
478
479
  newTags: o
479
480
  };
480
- }, R = (e, t) => {
481
+ }, j = (e, t) => {
481
482
  const r = document.getElementsByTagName(e)[0];
482
483
  if (!r)
483
484
  return;
484
485
  const n = r.getAttribute(y), s = n ? n.split(",") : [], o = [...s], c = Object.keys(t);
485
- for (const a of c) {
486
- const i = t[a] || "";
487
- r.getAttribute(a) !== i && r.setAttribute(a, i), s.indexOf(a) === -1 && s.push(a);
488
- const l = o.indexOf(a);
486
+ for (const i of c) {
487
+ const a = t[i] || "";
488
+ r.getAttribute(i) !== a && r.setAttribute(i, a), s.indexOf(i) === -1 && s.push(i);
489
+ const l = o.indexOf(i);
489
490
  l !== -1 && o.splice(l, 1);
490
491
  }
491
- for (let a = o.length - 1; a >= 0; a -= 1)
492
- r.removeAttribute(o[a]);
492
+ for (let i = o.length - 1; i >= 0; i -= 1)
493
+ r.removeAttribute(o[i]);
493
494
  s.length === o.length ? r.removeAttribute(y) : r.getAttribute(y) !== c.join(",") && r.setAttribute(y, c.join(","));
494
- }, Re = (e, t) => {
495
- typeof e < "u" && document.title !== e && (document.title = G(e)), R("title", t);
495
+ }, ke = (e, t) => {
496
+ typeof e < "u" && document.title !== e && (document.title = Z(e)), j("title", t);
496
497
  }, Y = (e, t) => {
497
498
  const {
498
499
  baseTag: r,
@@ -500,39 +501,39 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
500
501
  htmlAttributes: s,
501
502
  linkTags: o,
502
503
  metaTags: c,
503
- noscriptTags: a,
504
- onChangeClientState: i,
504
+ noscriptTags: i,
505
+ onChangeClientState: a,
505
506
  scriptTags: l,
506
507
  styleTags: u,
507
508
  title: f,
508
509
  titleAttributes: h
509
510
  } = e;
510
- R("body", n), R("html", s), Re(f, h);
511
+ j("body", n), j("html", s), ke(f, h);
511
512
  const p = {
512
513
  baseTag: A("base", r),
513
514
  linkTags: A("link", o),
514
515
  metaTags: A("meta", c),
515
- noscriptTags: A("noscript", a),
516
+ noscriptTags: A("noscript", i),
516
517
  scriptTags: A("script", l),
517
518
  styleTags: A("style", u)
518
- }, g = {}, N = {};
519
+ }, g = {}, q = {};
519
520
  Object.keys(p).forEach((S) => {
520
- const { newTags: K, oldTags: se } = p[S];
521
- K.length && (g[S] = K), se.length && (N[S] = p[S].oldTags);
522
- }), t && t(), i(e, g, N);
523
- }, O = null, Le = (e) => {
521
+ const { newTags: K, oldTags: re } = p[S];
522
+ K.length && (g[S] = K), re.length && (q[S] = p[S].oldTags);
523
+ }), t && t(), a(e, g, q);
524
+ }, O = null, _e = (e) => {
524
525
  O && cancelAnimationFrame(O), e.defer ? O = requestAnimationFrame(() => {
525
526
  Y(e, () => {
526
527
  O = null;
527
528
  });
528
529
  }) : (Y(e), O = null);
529
- }, Fe = Le, X = class extends L {
530
+ }, Re = _e, B = class extends L {
530
531
  constructor() {
531
532
  super(...arguments);
532
533
  T(this, "rendered", !1);
533
534
  }
534
535
  shouldComponentUpdate(t) {
535
- return !Ce(t, this.props);
536
+ return !ge(t, this.props);
536
537
  }
537
538
  componentDidUpdate() {
538
539
  this.emitChange();
@@ -544,13 +545,13 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
544
545
  emitChange() {
545
546
  const { helmetInstances: t, setHelmet: r } = this.props.context;
546
547
  let n = null;
547
- const s = Pe(
548
+ const s = Se(
548
549
  t.get().map((o) => {
549
550
  const c = { ...o.props };
550
551
  return delete c.context, c;
551
552
  })
552
553
  );
553
- re.canUseDOM ? Fe(s) : _ && (n = _(s)), r(n);
554
+ te.canUseDOM ? Re(s) : _ && (n = _(s)), r(n);
554
555
  }
555
556
  // componentWillMount will be deprecated
556
557
  // for SSR, initialize on first render
@@ -565,9 +566,9 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
565
566
  render() {
566
567
  return this.init(), null;
567
568
  }
568
- }, D, Ue = (D = class extends L {
569
+ }, D, je = (D = class extends L {
569
570
  shouldComponentUpdate(t) {
570
- return !Te(B(this.props, "helmetData"), B(t, "helmetData"));
571
+ return !de(V(this.props, "helmetData"), V(t, "helmetData"));
571
572
  }
572
573
  mapNestedChildrenToProps(t, r) {
573
574
  if (!r)
@@ -636,8 +637,8 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
636
637
  }
637
638
  warnOnInvalidChildren(t, r) {
638
639
  return z(
639
- V.some((n) => t.type === n),
640
- typeof t.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 ${V.join(
640
+ N.some((n) => t.type === n),
641
+ typeof t.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 ${N.join(
641
642
  ", "
642
643
  )} are allowed. Helmet does not support rendering <${t.type}> elements. Refer to our API for more information.`
643
644
  ), z(
@@ -650,9 +651,9 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
650
651
  return d.Children.forEach(t, (s) => {
651
652
  if (!s || !s.props)
652
653
  return;
653
- const { children: o, ...c } = s.props, a = Object.keys(c).reduce((l, u) => (l[Ee[u] || u] = c[u], l), {});
654
- let { type: i } = s;
655
- switch (typeof i == "symbol" ? i = i.toString() : this.warnOnInvalidChildren(s, o), i) {
654
+ const { children: o, ...c } = s.props, i = Object.keys(c).reduce((l, u) => (l[ve[u] || u] = c[u], l), {});
655
+ let { type: a } = s;
656
+ switch (typeof a == "symbol" ? a = a.toString() : this.warnOnInvalidChildren(s, o), a) {
656
657
  case "Symbol(react.fragment)":
657
658
  r = this.mapChildrenToProps(o, r);
658
659
  break;
@@ -664,12 +665,12 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
664
665
  n = this.flattenArrayTypeChildren(
665
666
  s,
666
667
  n,
667
- a,
668
+ i,
668
669
  o
669
670
  );
670
671
  break;
671
672
  default:
672
- r = this.mapObjectTypeChildren(s, r, a, o);
673
+ r = this.mapObjectTypeChildren(s, r, i, o);
673
674
  break;
674
675
  }
675
676
  }), this.mapArrayTypeChildrenToProps(n, r);
@@ -677,64 +678,28 @@ var Z = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
677
678
  render() {
678
679
  const { children: t, ...r } = this.props;
679
680
  let n = { ...r }, { helmetData: s } = r;
680
- if (t && (n = this.mapChildrenToProps(t, n)), s && !(s instanceof j)) {
681
+ if (t && (n = this.mapChildrenToProps(t, n)), s && !(s instanceof R)) {
681
682
  const o = s;
682
- s = new j(o.context, !0), delete n.helmetData;
683
+ s = new R(o.context, !0), delete n.helmetData;
683
684
  }
684
- return s ? /* @__PURE__ */ d.createElement(X, { ...n, context: s.value }) : /* @__PURE__ */ d.createElement(te.Consumer, null, (o) => /* @__PURE__ */ d.createElement(X, { ...n, context: o }));
685
+ return s ? /* @__PURE__ */ d.createElement(B, { ...n, context: s.value }) : /* @__PURE__ */ d.createElement(ee.Consumer, null, (o) => /* @__PURE__ */ d.createElement(B, { ...n, context: o }));
685
686
  }
686
687
  }, T(D, "defaultProps", {
687
688
  defer: !0,
688
689
  encodeSpecialCharacters: !0,
689
690
  prioritizeSeoTags: !1
690
691
  }), D);
691
- const We = Ue, Ze = re, qe = (...e) => {
692
- const t = e.filter((r) => !!r).map((r) => r.replace(/(^\/+|\/+$)/g, "")).join("/");
693
- return t ? `/${t}` : "";
694
- }, Ge = (e) => {
692
+ const Ye = je, Be = te, Xe = (e) => {
695
693
  const t = ae(), r = typeof e.to == "string" ? e.to : e.to.hash, n = (s) => {
696
694
  var o;
697
695
  !(r != null && r.startsWith("#")) || r !== t.hash || (s.preventDefault(), (o = document.getElementById(r.slice(1))) == null || o.scrollIntoView());
698
696
  };
699
- return /* @__PURE__ */ le.jsx(ue, { onClick: n, ...e });
700
- }, q = (e, t, r, n = []) => {
701
- const s = ne(e) ? qe(r, e.path) : r, o = t(e, s, n);
702
- if (o !== void 0) return o;
703
- if ("children" in e && e.children) {
704
- const c = [...n, e];
705
- for (const a of e.children) {
706
- const i = q(
707
- a,
708
- t,
709
- s,
710
- c
711
- );
712
- if (i !== void 0) return i;
713
- }
714
- }
715
- }, Je = (e, t) => {
716
- if (e.categories)
717
- for (const r of e.categories) {
718
- const n = q(r, t, e.path);
719
- if (n !== void 0) return n;
720
- }
721
- }, ne = (e) => "path" in e, Qe = (e) => "href" in e, et = (e, t, r) => !!q(
722
- e,
723
- (n, s) => {
724
- if (ne(n) && ce(s, t))
725
- return !0;
726
- },
727
- r
728
- );
697
+ return /* @__PURE__ */ oe.jsx(ie, { onClick: n, ...e });
698
+ };
729
699
  export {
730
- Ge as A,
731
- We as H,
732
- Ye as M,
733
- Qe as a,
734
- Ze as b,
735
- et as c,
736
- ne as i,
737
- qe as j,
738
- Je as t,
739
- fe as u
700
+ Xe as A,
701
+ Ye as H,
702
+ Ne as M,
703
+ Be as a,
704
+ le as u
740
705
  };