zudoku 0.18.5 → 0.18.7

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 (86) hide show
  1. package/dist/app/entry.client.d.ts +1 -0
  2. package/dist/app/entry.client.js +8 -0
  3. package/dist/app/entry.client.js.map +1 -1
  4. package/dist/app/entry.server.d.ts +1 -0
  5. package/dist/app/entry.server.js +1 -0
  6. package/dist/app/entry.server.js.map +1 -1
  7. package/dist/lib/components/Layout.js +3 -2
  8. package/dist/lib/components/Layout.js.map +1 -1
  9. package/dist/lib/components/MobileTopNavigation.js +1 -1
  10. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  11. package/dist/lib/components/Search.d.ts +3 -1
  12. package/dist/lib/components/Search.js +3 -3
  13. package/dist/lib/components/Search.js.map +1 -1
  14. package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
  15. package/dist/lib/components/navigation/Sidebar.js +2 -2
  16. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  17. package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -1
  18. package/dist/lib/components/navigation/SidebarCategory.js +2 -2
  19. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  20. package/dist/lib/components/navigation/SidebarItem.d.ts +2 -2
  21. package/dist/lib/components/navigation/SidebarItem.js +5 -5
  22. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  23. package/dist/lib/oas/graphql/index.js +4 -0
  24. package/dist/lib/oas/graphql/index.js.map +1 -1
  25. package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
  26. package/dist/lib/plugins/markdown/MdxPage.js +2 -2
  27. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  28. package/dist/lib/plugins/markdown/index.d.ts +1 -0
  29. package/dist/lib/plugins/markdown/index.js.map +1 -1
  30. package/dist/lib/plugins/openapi/OperationList.js +44 -1
  31. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  32. package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
  33. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  34. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  35. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +2 -0
  36. package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
  37. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  38. package/dist/vite/build.js +7 -1
  39. package/dist/vite/build.js.map +1 -1
  40. package/dist/vite/config.js +10 -0
  41. package/dist/vite/config.js.map +1 -1
  42. package/dist/vite/dev-server.js +7 -0
  43. package/dist/vite/dev-server.js.map +1 -1
  44. package/dist/vite/output.js +31 -16
  45. package/dist/vite/output.js.map +1 -1
  46. package/dist/vite/plugin-mdx.js +48 -1
  47. package/dist/vite/plugin-mdx.js.map +1 -1
  48. package/lib/AnchorLink-BR0MvI7n.js +35 -0
  49. package/lib/AnchorLink-BR0MvI7n.js.map +1 -0
  50. package/lib/{MdxPage-B2FpJ9KC.js → MdxPage-HjFSZJQk.js} +85 -80
  51. package/lib/MdxPage-HjFSZJQk.js.map +1 -0
  52. package/lib/{OperationList-BkNQEsNs.js → OperationList-DzE32oyS.js} +971 -961
  53. package/lib/{OperationList-BkNQEsNs.js.map → OperationList-DzE32oyS.js.map} +1 -1
  54. package/lib/assets/{worker-BHClFO3A.js → worker-CyxLedqF.js} +435 -431
  55. package/lib/assets/{worker-BHClFO3A.js.map → worker-CyxLedqF.js.map} +1 -1
  56. package/lib/{createServer-CpJlUPtn.js → createServer-DTiCfoql.js} +5 -1
  57. package/lib/{createServer-CpJlUPtn.js.map → createServer-DTiCfoql.js.map} +1 -1
  58. package/lib/{index-C7SaIME0.js → index-NNCc1BSK.js} +5 -4
  59. package/lib/{index-C7SaIME0.js.map → index-NNCc1BSK.js.map} +1 -1
  60. package/lib/{AnchorLink-CDlhr8gL.js → index.esm-Bm8pj-bc.js} +223 -254
  61. package/lib/index.esm-Bm8pj-bc.js.map +1 -0
  62. package/lib/ui/Drawer.js +79 -79
  63. package/lib/ui/Drawer.js.map +1 -1
  64. package/lib/zudoku.components.js +445 -414
  65. package/lib/zudoku.components.js.map +1 -1
  66. package/lib/zudoku.openapi-worker.js +1 -1
  67. package/lib/zudoku.plugin-markdown.js +1 -1
  68. package/lib/zudoku.plugin-markdown.js.map +1 -1
  69. package/lib/zudoku.plugin-openapi.js +1 -1
  70. package/package.json +4 -3
  71. package/src/app/entry.client.tsx +9 -0
  72. package/src/app/entry.server.tsx +1 -0
  73. package/src/lib/components/Layout.tsx +8 -3
  74. package/src/lib/components/MobileTopNavigation.tsx +18 -18
  75. package/src/lib/components/Search.tsx +3 -3
  76. package/src/lib/components/navigation/Sidebar.tsx +18 -8
  77. package/src/lib/components/navigation/SidebarCategory.tsx +3 -0
  78. package/src/lib/components/navigation/SidebarItem.tsx +12 -2
  79. package/src/lib/oas/graphql/index.ts +4 -0
  80. package/src/lib/plugins/markdown/MdxPage.tsx +2 -0
  81. package/src/lib/plugins/markdown/index.tsx +1 -0
  82. package/src/lib/plugins/openapi/OperationList.tsx +62 -2
  83. package/src/lib/plugins/openapi/graphql/gql.ts +2 -2
  84. package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
  85. package/lib/AnchorLink-CDlhr8gL.js.map +0 -1
  86. package/lib/MdxPage-B2FpJ9KC.js.map +0 -1
@@ -1,30 +1,9 @@
1
- var re = Object.defineProperty;
2
- var ne = (e, t, r) => t in e ? re(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var T = (e, t, r) => ne(e, typeof t != "symbol" ? t + "" : t, r);
4
- import d, { Component as L } from "react";
5
- import { g as F } from "./_commonjsHelpers-BkfeUUK-.js";
6
- import { j as se } from "./jsx-runtime-B6kdoens.js";
7
- import { L as oe } from "./index-Yn8c3UWE.js";
8
- import { u as ie } from "./index-Czzd9rjU.js";
9
- const k = {}, X = d.createContext(k);
10
- function ae(e) {
11
- const t = d.useContext(X);
12
- return d.useMemo(
13
- function() {
14
- return typeof e == "function" ? e(t) : { ...t, ...e };
15
- },
16
- [t, e]
17
- );
18
- }
19
- function ze(e) {
20
- let t;
21
- return e.disableParentContext ? t = typeof e.components == "function" ? e.components(k) : e.components || k : t = ae(e.components), d.createElement(
22
- X.Provider,
23
- { value: t },
24
- e.children
25
- );
26
- }
27
- var le = typeof Element < "u", ce = typeof Map == "function", ue = typeof Set == "function", fe = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
1
+ var ee = Object.defineProperty;
2
+ var te = (e, t, r) => t in e ? ee(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var y = (e, t, r) => te(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import T, { Component as j } from "react";
5
+ import { g as L } from "./_commonjsHelpers-BkfeUUK-.js";
6
+ var re = typeof Element < "u", ne = typeof Map == "function", se = typeof Set == "function", ie = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
28
7
  function x(e, t) {
29
8
  if (e === t) return !0;
30
9
  if (e && t && typeof e == "object" && typeof t == "object") {
@@ -36,22 +15,22 @@ function x(e, t) {
36
15
  if (!x(e[n], t[n])) return !1;
37
16
  return !0;
38
17
  }
39
- var o;
40
- if (ce && e instanceof Map && t instanceof Map) {
18
+ var i;
19
+ if (ne && e instanceof Map && t instanceof Map) {
41
20
  if (e.size !== t.size) return !1;
42
- for (o = e.entries(); !(n = o.next()).done; )
21
+ for (i = e.entries(); !(n = i.next()).done; )
43
22
  if (!t.has(n.value[0])) return !1;
44
- for (o = e.entries(); !(n = o.next()).done; )
23
+ for (i = e.entries(); !(n = i.next()).done; )
45
24
  if (!x(n.value[1], t.get(n.value[0]))) return !1;
46
25
  return !0;
47
26
  }
48
- if (ue && e instanceof Set && t instanceof Set) {
27
+ if (se && e instanceof Set && t instanceof Set) {
49
28
  if (e.size !== t.size) return !1;
50
- for (o = e.entries(); !(n = o.next()).done; )
29
+ for (i = e.entries(); !(n = i.next()).done; )
51
30
  if (!t.has(n.value[0])) return !1;
52
31
  return !0;
53
32
  }
54
- if (fe && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
33
+ if (ie && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
55
34
  if (r = e.length, r != t.length) return !1;
56
35
  for (n = r; n-- !== 0; )
57
36
  if (e[n] !== t[n]) return !1;
@@ -63,7 +42,7 @@ function x(e, t) {
63
42
  if (s = Object.keys(e), r = s.length, r !== Object.keys(t).length) return !1;
64
43
  for (n = r; n-- !== 0; )
65
44
  if (!Object.prototype.hasOwnProperty.call(t, s[n])) return !1;
66
- if (le && e instanceof Element) return !1;
45
+ if (re && e instanceof Element) return !1;
67
46
  for (n = r; n-- !== 0; )
68
47
  if (!((s[n] === "_owner" || s[n] === "__v" || s[n] === "__o") && e.$$typeof) && !x(e[s[n]], t[s[n]]))
69
48
  return !1;
@@ -71,7 +50,7 @@ function x(e, t) {
71
50
  }
72
51
  return e !== e && t !== t;
73
52
  }
74
- var pe = function(t, r) {
53
+ var ae = function(t, r) {
75
54
  try {
76
55
  return x(t, r);
77
56
  } catch (n) {
@@ -80,8 +59,8 @@ var pe = function(t, r) {
80
59
  throw n;
81
60
  }
82
61
  };
83
- const me = /* @__PURE__ */ F(pe);
84
- var de = function(e, t, r, n, s, o, c, i) {
62
+ const oe = /* @__PURE__ */ L(ae);
63
+ var le = function(e, t, r, n, s, i, c, a) {
85
64
  if (process.env.NODE_ENV !== "production" && t === void 0)
86
65
  throw new Error("invariant requires an error message argument");
87
66
  if (!e) {
@@ -91,40 +70,40 @@ var de = function(e, t, r, n, s, o, c, i) {
91
70
  "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
92
71
  );
93
72
  else {
94
- var a = [r, n, s, o, c, i], u = 0;
73
+ var o = [r, n, s, i, c, a], u = 0;
95
74
  l = new Error(
96
75
  t.replace(/%s/g, function() {
97
- return a[u++];
76
+ return o[u++];
98
77
  })
99
78
  ), l.name = "Invariant Violation";
100
79
  }
101
80
  throw l.framesToPop = 1, l;
102
81
  }
103
- }, he = de;
104
- const z = /* @__PURE__ */ F(he);
105
- var ye = function(t, r, n, s) {
106
- var o = n ? n.call(s, t, r) : void 0;
107
- if (o !== void 0)
108
- return !!o;
82
+ }, ce = le;
83
+ const K = /* @__PURE__ */ L(ce);
84
+ var ue = function(t, r, n, s) {
85
+ var i = n ? n.call(s, t, r) : void 0;
86
+ if (i !== void 0)
87
+ return !!i;
109
88
  if (t === r)
110
89
  return !0;
111
90
  if (typeof t != "object" || !t || typeof r != "object" || !r)
112
91
  return !1;
113
- var c = Object.keys(t), i = Object.keys(r);
114
- if (c.length !== i.length)
92
+ var c = Object.keys(t), a = Object.keys(r);
93
+ if (c.length !== a.length)
115
94
  return !1;
116
- for (var l = Object.prototype.hasOwnProperty.bind(r), a = 0; a < c.length; a++) {
117
- var u = c[a];
95
+ for (var l = Object.prototype.hasOwnProperty.bind(r), o = 0; o < c.length; o++) {
96
+ var u = c[o];
118
97
  if (!l(u))
119
98
  return !1;
120
- var f = t[u], h = r[u];
121
- if (o = n ? n.call(s, f, h, u) : void 0, o === !1 || o === void 0 && f !== h)
99
+ var f = t[u], m = r[u];
100
+ if (i = n ? n.call(s, f, m, u) : void 0, i === !1 || i === void 0 && f !== m)
122
101
  return !1;
123
102
  }
124
103
  return !0;
125
104
  };
126
- const Te = /* @__PURE__ */ F(ye);
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 || {}), I = {
105
+ const fe = /* @__PURE__ */ L(ue);
106
+ var B = /* @__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))(B || {}), P = {
128
107
  link: { rel: ["amphtml", "canonical", "alternate"] },
129
108
  script: { type: ["application/ld+json"] },
130
109
  meta: {
@@ -146,7 +125,7 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
146
125
  "twitter:site"
147
126
  ]
148
127
  }
149
- }, N = Object.values(W), U = {
128
+ }, z = Object.values(B), F = {
150
129
  accesskey: "accessKey",
151
130
  charset: "charSet",
152
131
  class: "className",
@@ -155,90 +134,90 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
155
134
  "http-equiv": "httpEquiv",
156
135
  itemprop: "itemProp",
157
136
  tabindex: "tabIndex"
158
- }, ge = Object.entries(U).reduce(
137
+ }, pe = Object.entries(F).reduce(
159
138
  (e, [t, r]) => (e[r] = t, e),
160
139
  {}
161
- ), y = "data-rh", C = {
140
+ ), h = "data-rh", E = {
162
141
  DEFAULT_TITLE: "defaultTitle",
163
142
  DEFER: "defer",
164
143
  ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",
165
144
  ON_CHANGE_CLIENT_STATE: "onChangeClientState",
166
145
  TITLE_TEMPLATE: "titleTemplate",
167
146
  PRIORITIZE_SEO_TAGS: "prioritizeSeoTags"
168
- }, E = (e, t) => {
147
+ }, b = (e, t) => {
169
148
  for (let r = e.length - 1; r >= 0; r -= 1) {
170
149
  const n = e[r];
171
150
  if (Object.prototype.hasOwnProperty.call(n, t))
172
151
  return n[t];
173
152
  }
174
153
  return null;
175
- }, ve = (e) => {
176
- let t = E(
154
+ }, de = (e) => {
155
+ let t = b(
177
156
  e,
178
157
  "title"
179
158
  /* TITLE */
180
159
  );
181
- const r = E(e, C.TITLE_TEMPLATE);
160
+ const r = b(e, E.TITLE_TEMPLATE);
182
161
  if (Array.isArray(t) && (t = t.join("")), r && t)
183
162
  return r.replace(/%s/g, () => t);
184
- const n = E(e, C.DEFAULT_TITLE);
163
+ const n = b(e, E.DEFAULT_TITLE);
185
164
  return t || n || void 0;
186
- }, Ae = (e) => E(e, C.ON_CHANGE_CLIENT_STATE) || (() => {
187
- }), $ = (e, t) => t.filter((r) => typeof r[e] < "u").map((r) => r[e]).reduce((r, n) => ({ ...r, ...n }), {}), Ce = (e, t) => t.filter((r) => typeof r.base < "u").map((r) => r.base).reverse().reduce((r, n) => {
165
+ }, me = (e) => b(e, E.ON_CHANGE_CLIENT_STATE) || (() => {
166
+ }), I = (e, t) => t.filter((r) => typeof r[e] < "u").map((r) => r[e]).reduce((r, n) => ({ ...r, ...n }), {}), he = (e, t) => t.filter((r) => typeof r.base < "u").map((r) => r.base).reverse().reduce((r, n) => {
188
167
  if (!r.length) {
189
168
  const s = Object.keys(n);
190
- for (let o = 0; o < s.length; o += 1) {
191
- const i = s[o].toLowerCase();
192
- if (e.indexOf(i) !== -1 && n[i])
169
+ for (let i = 0; i < s.length; i += 1) {
170
+ const a = s[i].toLowerCase();
171
+ if (e.indexOf(a) !== -1 && n[a])
193
172
  return r.concat(n);
194
173
  }
195
174
  }
196
175
  return r;
197
- }, []), Ee = (e) => console && typeof console.warn == "function" && console.warn(e), b = (e, t, r) => {
176
+ }, []), ye = (e) => console && typeof console.warn == "function" && console.warn(e), O = (e, t, r) => {
198
177
  const n = {};
199
- return r.filter((s) => Array.isArray(s[e]) ? !0 : (typeof s[e] < "u" && Ee(
178
+ return r.filter((s) => Array.isArray(s[e]) ? !0 : (typeof s[e] < "u" && ye(
200
179
  `Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`
201
- ), !1)).map((s) => s[e]).reverse().reduce((s, o) => {
180
+ ), !1)).map((s) => s[e]).reverse().reduce((s, i) => {
202
181
  const c = {};
203
- o.filter((l) => {
204
- let a;
182
+ i.filter((l) => {
183
+ let o;
205
184
  const u = Object.keys(l);
206
- for (let h = 0; h < u.length; h += 1) {
207
- const p = u[h], g = p.toLowerCase();
208
- t.indexOf(g) !== -1 && !(a === "rel" && l[a].toLowerCase() === "canonical") && !(g === "rel" && l[g].toLowerCase() === "stylesheet") && (a = g), t.indexOf(p) !== -1 && (p === "innerHTML" || p === "cssText" || p === "itemprop") && (a = p);
185
+ for (let m = 0; m < u.length; m += 1) {
186
+ const p = u[m], g = p.toLowerCase();
187
+ t.indexOf(g) !== -1 && !(o === "rel" && l[o].toLowerCase() === "canonical") && !(g === "rel" && l[g].toLowerCase() === "stylesheet") && (o = g), t.indexOf(p) !== -1 && (p === "innerHTML" || p === "cssText" || p === "itemprop") && (o = p);
209
188
  }
210
- if (!a || !l[a])
189
+ if (!o || !l[o])
211
190
  return !1;
212
- const f = l[a].toLowerCase();
213
- return n[a] || (n[a] = {}), c[a] || (c[a] = {}), n[a][f] ? !1 : (c[a][f] = !0, !0);
191
+ const f = l[o].toLowerCase();
192
+ return n[o] || (n[o] = {}), c[o] || (c[o] = {}), n[o][f] ? !1 : (c[o][f] = !0, !0);
214
193
  }).reverse().forEach((l) => s.push(l));
215
- const i = Object.keys(c);
216
- for (let l = 0; l < i.length; l += 1) {
217
- const a = i[l], u = {
218
- ...n[a],
219
- ...c[a]
194
+ const a = Object.keys(c);
195
+ for (let l = 0; l < a.length; l += 1) {
196
+ const o = a[l], u = {
197
+ ...n[o],
198
+ ...c[o]
220
199
  };
221
- n[a] = u;
200
+ n[o] = u;
222
201
  }
223
202
  return s;
224
203
  }, []).reverse();
225
- }, be = (e, t) => {
204
+ }, Te = (e, t) => {
226
205
  if (Array.isArray(e) && e.length) {
227
206
  for (let r = 0; r < e.length; r += 1)
228
207
  if (e[r][t])
229
208
  return !0;
230
209
  }
231
210
  return !1;
232
- }, Oe = (e) => ({
233
- baseTag: Ce([
211
+ }, ge = (e) => ({
212
+ baseTag: he([
234
213
  "href"
235
214
  /* HREF */
236
215
  ], e),
237
- bodyAttributes: $("bodyAttributes", e),
238
- defer: E(e, C.DEFER),
239
- encode: E(e, C.ENCODE_SPECIAL_CHARACTERS),
240
- htmlAttributes: $("htmlAttributes", e),
241
- linkTags: b(
216
+ bodyAttributes: I("bodyAttributes", e),
217
+ defer: b(e, E.DEFER),
218
+ encode: b(e, E.ENCODE_SPECIAL_CHARACTERS),
219
+ htmlAttributes: I("htmlAttributes", e),
220
+ linkTags: O(
242
221
  "link",
243
222
  [
244
223
  "rel",
@@ -247,7 +226,7 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
247
226
  ],
248
227
  e
249
228
  ),
250
- metaTags: b(
229
+ metaTags: O(
251
230
  "meta",
252
231
  [
253
232
  "name",
@@ -259,12 +238,12 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
259
238
  ],
260
239
  e
261
240
  ),
262
- noscriptTags: b("noscript", [
241
+ noscriptTags: O("noscript", [
263
242
  "innerHTML"
264
243
  /* INNER_HTML */
265
244
  ], e),
266
- onChangeClientState: Ae(e),
267
- scriptTags: b(
245
+ onChangeClientState: me(e),
246
+ scriptTags: O(
268
247
  "script",
269
248
  [
270
249
  "src",
@@ -273,148 +252,148 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
273
252
  ],
274
253
  e
275
254
  ),
276
- styleTags: b("style", [
255
+ styleTags: O("style", [
277
256
  "cssText"
278
257
  /* CSS_TEXT */
279
258
  ], e),
280
- title: ve(e),
281
- titleAttributes: $("titleAttributes", e),
282
- prioritizeSeoTags: be(e, C.PRIORITIZE_SEO_TAGS)
283
- }), Z = (e) => Array.isArray(e) ? e.join("") : e, Se = (e, t) => {
259
+ title: de(e),
260
+ titleAttributes: I("titleAttributes", e),
261
+ prioritizeSeoTags: Te(e, E.PRIORITIZE_SEO_TAGS)
262
+ }), Z = (e) => Array.isArray(e) ? e.join("") : e, ve = (e, t) => {
284
263
  const r = Object.keys(e);
285
264
  for (let n = 0; n < r.length; n += 1)
286
265
  if (t[r[n]] && t[r[n]].includes(e[r[n]]))
287
266
  return !0;
288
267
  return !1;
289
- }, D = (e, t) => Array.isArray(e) ? e.reduce(
290
- (r, n) => (Se(n, t) ? r.priority.push(n) : r.default.push(n), r),
268
+ }, H = (e, t) => Array.isArray(e) ? e.reduce(
269
+ (r, n) => (ve(n, t) ? r.priority.push(n) : r.default.push(n), r),
291
270
  { priority: [], default: [] }
292
- ) : { default: e, priority: [] }, V = (e, t) => ({
271
+ ) : { default: e, priority: [] }, N = (e, t) => ({
293
272
  ...e,
294
273
  [t]: void 0
295
- }), we = [
274
+ }), Ae = [
296
275
  "noscript",
297
276
  "script",
298
277
  "style"
299
278
  /* STYLE */
300
- ], H = (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) => {
279
+ ], D = (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) => {
301
280
  const n = typeof e[r] < "u" ? `${r}="${e[r]}"` : `${r}`;
302
281
  return t ? `${t} ${n}` : n;
303
- }, ""), xe = (e, t, r, n) => {
304
- const s = G(r), o = Z(t);
305
- return s ? `<${e} ${y}="true" ${s}>${H(
306
- o,
282
+ }, ""), Ee = (e, t, r, n) => {
283
+ const s = G(r), i = Z(t);
284
+ return s ? `<${e} ${h}="true" ${s}>${D(
285
+ i,
307
286
  n
308
- )}</${e}>` : `<${e} ${y}="true">${H(
309
- o,
287
+ )}</${e}>` : `<${e} ${h}="true">${D(
288
+ i,
310
289
  n
311
290
  )}</${e}>`;
312
- }, Pe = (e, t, r = !0) => t.reduce((n, s) => {
313
- const o = s, c = Object.keys(o).filter(
314
- (a) => !(a === "innerHTML" || a === "cssText")
315
- ).reduce((a, u) => {
316
- const f = typeof o[u] > "u" ? u : `${u}="${H(o[u], r)}"`;
317
- return a ? `${a} ${f}` : f;
318
- }, ""), i = o.innerHTML || o.cssText || "", l = we.indexOf(e) === -1;
319
- return `${n}<${e} ${y}="true" ${c}${l ? "/>" : `>${i}</${e}>`}`;
320
- }, ""), J = (e, t = {}) => Object.keys(e).reduce((r, n) => {
321
- const s = U[n];
291
+ }, be = (e, t, r = !0) => t.reduce((n, s) => {
292
+ const i = s, c = Object.keys(i).filter(
293
+ (o) => !(o === "innerHTML" || o === "cssText")
294
+ ).reduce((o, u) => {
295
+ const f = typeof i[u] > "u" ? u : `${u}="${D(i[u], r)}"`;
296
+ return o ? `${o} ${f}` : f;
297
+ }, ""), a = i.innerHTML || i.cssText || "", l = Ae.indexOf(e) === -1;
298
+ return `${n}<${e} ${h}="true" ${c}${l ? "/>" : `>${a}</${e}>`}`;
299
+ }, ""), W = (e, t = {}) => Object.keys(e).reduce((r, n) => {
300
+ const s = F[n];
322
301
  return r[s || n] = e[n], r;
323
- }, t), Ie = (e, t, r) => {
302
+ }, t), Oe = (e, t, r) => {
324
303
  const n = {
325
304
  key: t,
326
- [y]: !0
327
- }, s = J(r, n);
328
- return [d.createElement("title", s, t)];
329
- }, P = (e, t) => t.map((r, n) => {
305
+ [h]: !0
306
+ }, s = W(r, n);
307
+ return [T.createElement("title", s, t)];
308
+ }, $ = (e, t) => t.map((r, n) => {
330
309
  const s = {
331
310
  key: n,
332
- [y]: !0
311
+ [h]: !0
333
312
  };
334
- return Object.keys(r).forEach((o) => {
335
- const i = U[o] || o;
336
- if (i === "innerHTML" || i === "cssText") {
313
+ return Object.keys(r).forEach((i) => {
314
+ const a = F[i] || i;
315
+ if (a === "innerHTML" || a === "cssText") {
337
316
  const l = r.innerHTML || r.cssText;
338
317
  s.dangerouslySetInnerHTML = { __html: l };
339
318
  } else
340
- s[i] = r[o];
341
- }), d.createElement(e, s);
342
- }), m = (e, t, r = !0) => {
319
+ s[a] = r[i];
320
+ }), T.createElement(e, s);
321
+ }), d = (e, t, r = !0) => {
343
322
  switch (e) {
344
323
  case "title":
345
324
  return {
346
- toComponent: () => Ie(e, t.title, t.titleAttributes),
347
- toString: () => xe(e, t.title, t.titleAttributes, r)
325
+ toComponent: () => Oe(e, t.title, t.titleAttributes),
326
+ toString: () => Ee(e, t.title, t.titleAttributes, r)
348
327
  };
349
328
  case "bodyAttributes":
350
329
  case "htmlAttributes":
351
330
  return {
352
- toComponent: () => J(t),
331
+ toComponent: () => W(t),
353
332
  toString: () => G(t)
354
333
  };
355
334
  default:
356
335
  return {
357
- toComponent: () => P(e, t),
358
- toString: () => Pe(e, t, r)
336
+ toComponent: () => $(e, t),
337
+ toString: () => be(e, t, r)
359
338
  };
360
339
  }
361
- }, $e = ({ metaTags: e, linkTags: t, scriptTags: r, encode: n }) => {
362
- const s = D(e, I.meta), o = D(t, I.link), c = D(r, I.script);
340
+ }, Ce = ({ metaTags: e, linkTags: t, scriptTags: r, encode: n }) => {
341
+ const s = H(e, P.meta), i = H(t, P.link), c = H(r, P.script);
363
342
  return {
364
343
  priorityMethods: {
365
344
  toComponent: () => [
366
- ...P("meta", s.priority),
367
- ...P("link", o.priority),
368
- ...P("script", c.priority)
345
+ ...$("meta", s.priority),
346
+ ...$("link", i.priority),
347
+ ...$("script", c.priority)
369
348
  ],
370
349
  toString: () => (
371
350
  // generate all the tags as strings and concatenate them
372
- `${m("meta", s.priority, n)} ${m(
351
+ `${d("meta", s.priority, n)} ${d(
373
352
  "link",
374
- o.priority,
353
+ i.priority,
375
354
  n
376
- )} ${m("script", c.priority, n)}`
355
+ )} ${d("script", c.priority, n)}`
377
356
  )
378
357
  },
379
358
  metaTags: s.default,
380
- linkTags: o.default,
359
+ linkTags: i.default,
381
360
  scriptTags: c.default
382
361
  };
383
- }, De = (e) => {
362
+ }, Se = (e) => {
384
363
  const {
385
364
  baseTag: t,
386
365
  bodyAttributes: r,
387
366
  encode: n = !0,
388
367
  htmlAttributes: s,
389
- noscriptTags: o,
368
+ noscriptTags: i,
390
369
  styleTags: c,
391
- title: i = "",
370
+ title: a = "",
392
371
  titleAttributes: l,
393
- prioritizeSeoTags: a
372
+ prioritizeSeoTags: o
394
373
  } = e;
395
- let { linkTags: u, metaTags: f, scriptTags: h } = e, p = {
374
+ let { linkTags: u, metaTags: f, scriptTags: m } = e, p = {
396
375
  toComponent: () => {
397
376
  },
398
377
  toString: () => ""
399
378
  };
400
- return a && ({ priorityMethods: p, linkTags: u, metaTags: f, scriptTags: h } = $e(e)), {
379
+ return o && ({ priorityMethods: p, linkTags: u, metaTags: f, scriptTags: m } = Ce(e)), {
401
380
  priority: p,
402
- base: m("base", t, n),
403
- bodyAttributes: m("bodyAttributes", r, n),
404
- htmlAttributes: m("htmlAttributes", s, n),
405
- link: m("link", u, n),
406
- meta: m("meta", f, n),
407
- noscript: m("noscript", o, n),
408
- script: m("script", h, n),
409
- style: m("style", c, n),
410
- title: m("title", { title: i, titleAttributes: l }, n)
381
+ base: d("base", t, n),
382
+ bodyAttributes: d("bodyAttributes", r, n),
383
+ htmlAttributes: d("htmlAttributes", s, n),
384
+ link: d("link", u, n),
385
+ meta: d("meta", f, n),
386
+ noscript: d("noscript", i, n),
387
+ script: d("script", m, n),
388
+ style: d("style", c, n),
389
+ title: d("title", { title: a, titleAttributes: l }, n)
411
390
  };
412
- }, _ = De, w = [], Q = !!(typeof window < "u" && window.document && window.document.createElement), R = class {
391
+ }, M = Se, w = [], J = !!(typeof window < "u" && window.document && window.document.createElement), k = class {
413
392
  constructor(e, t) {
414
- T(this, "instances", []);
415
- T(this, "canUseDOM", Q);
416
- T(this, "context");
417
- T(this, "value", {
393
+ y(this, "instances", []);
394
+ y(this, "canUseDOM", J);
395
+ y(this, "context");
396
+ y(this, "value", {
418
397
  setHelmet: (e) => {
419
398
  this.context.helmet = e;
420
399
  },
@@ -429,7 +408,7 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
429
408
  }
430
409
  }
431
410
  });
432
- this.context = e, this.canUseDOM = t || !1, t || (e.helmet = _({
411
+ this.context = e, this.canUseDOM = t || !1, t || (e.helmet = M({
433
412
  baseTag: [],
434
413
  bodyAttributes: {},
435
414
  encodeSpecialCharacters: !0,
@@ -443,97 +422,97 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
443
422
  titleAttributes: {}
444
423
  }));
445
424
  }
446
- }, Me = {}, ee = d.createContext(Me), v, ke = (v = class extends L {
425
+ }, we = {}, Q = T.createContext(we), v, xe = (v = class extends j {
447
426
  constructor(r) {
448
427
  super(r);
449
- T(this, "helmetData");
450
- this.helmetData = new R(this.props.context || {}, v.canUseDOM);
428
+ y(this, "helmetData");
429
+ this.helmetData = new k(this.props.context || {}, v.canUseDOM);
451
430
  }
452
431
  render() {
453
- return /* @__PURE__ */ d.createElement(ee.Provider, { value: this.helmetData.value }, this.props.children);
432
+ return /* @__PURE__ */ T.createElement(Q.Provider, { value: this.helmetData.value }, this.props.children);
454
433
  }
455
- }, T(v, "canUseDOM", Q), v), A = (e, t) => {
434
+ }, y(v, "canUseDOM", J), v), A = (e, t) => {
456
435
  const r = document.head || document.querySelector(
457
436
  "head"
458
437
  /* HEAD */
459
- ), n = r.querySelectorAll(`${e}[${y}]`), s = [].slice.call(n), o = [];
438
+ ), n = r.querySelectorAll(`${e}[${h}]`), s = [].slice.call(n), i = [];
460
439
  let c;
461
- return t && t.length && t.forEach((i) => {
440
+ return t && t.length && t.forEach((a) => {
462
441
  const l = document.createElement(e);
463
- for (const a in i)
464
- if (Object.prototype.hasOwnProperty.call(i, a))
465
- if (a === "innerHTML")
466
- l.innerHTML = i.innerHTML;
467
- else if (a === "cssText")
468
- l.styleSheet ? l.styleSheet.cssText = i.cssText : l.appendChild(document.createTextNode(i.cssText));
442
+ for (const o in a)
443
+ if (Object.prototype.hasOwnProperty.call(a, o))
444
+ if (o === "innerHTML")
445
+ l.innerHTML = a.innerHTML;
446
+ else if (o === "cssText")
447
+ l.styleSheet ? l.styleSheet.cssText = a.cssText : l.appendChild(document.createTextNode(a.cssText));
469
448
  else {
470
- const u = a, f = typeof i[u] > "u" ? "" : i[u];
471
- l.setAttribute(a, f);
449
+ const u = o, f = typeof a[u] > "u" ? "" : a[u];
450
+ l.setAttribute(o, f);
472
451
  }
473
- l.setAttribute(y, "true"), s.some((a, u) => (c = u, l.isEqualNode(a))) ? s.splice(c, 1) : o.push(l);
474
- }), s.forEach((i) => {
452
+ l.setAttribute(h, "true"), s.some((o, u) => (c = u, l.isEqualNode(o))) ? s.splice(c, 1) : i.push(l);
453
+ }), s.forEach((a) => {
475
454
  var l;
476
- return (l = i.parentNode) == null ? void 0 : l.removeChild(i);
477
- }), o.forEach((i) => r.appendChild(i)), {
455
+ return (l = a.parentNode) == null ? void 0 : l.removeChild(a);
456
+ }), i.forEach((a) => r.appendChild(a)), {
478
457
  oldTags: s,
479
- newTags: o
458
+ newTags: i
480
459
  };
481
- }, j = (e, t) => {
460
+ }, R = (e, t) => {
482
461
  const r = document.getElementsByTagName(e)[0];
483
462
  if (!r)
484
463
  return;
485
- const n = r.getAttribute(y), s = n ? n.split(",") : [], o = [...s], c = Object.keys(t);
486
- for (const i of c) {
487
- const l = t[i] || "";
488
- r.getAttribute(i) !== l && r.setAttribute(i, l), s.indexOf(i) === -1 && s.push(i);
489
- const a = o.indexOf(i);
490
- a !== -1 && o.splice(a, 1);
464
+ const n = r.getAttribute(h), s = n ? n.split(",") : [], i = [...s], c = Object.keys(t);
465
+ for (const a of c) {
466
+ const l = t[a] || "";
467
+ r.getAttribute(a) !== l && r.setAttribute(a, l), s.indexOf(a) === -1 && s.push(a);
468
+ const o = i.indexOf(a);
469
+ o !== -1 && i.splice(o, 1);
491
470
  }
492
- for (let i = o.length - 1; i >= 0; i -= 1)
493
- r.removeAttribute(o[i]);
494
- s.length === o.length ? r.removeAttribute(y) : r.getAttribute(y) !== c.join(",") && r.setAttribute(y, c.join(","));
495
- }, He = (e, t) => {
496
- typeof e < "u" && document.title !== e && (document.title = Z(e)), j("title", t);
497
- }, Y = (e, t) => {
471
+ for (let a = i.length - 1; a >= 0; a -= 1)
472
+ r.removeAttribute(i[a]);
473
+ s.length === i.length ? r.removeAttribute(h) : r.getAttribute(h) !== c.join(",") && r.setAttribute(h, c.join(","));
474
+ }, $e = (e, t) => {
475
+ typeof e < "u" && document.title !== e && (document.title = Z(e)), R("title", t);
476
+ }, V = (e, t) => {
498
477
  const {
499
478
  baseTag: r,
500
479
  bodyAttributes: n,
501
480
  htmlAttributes: s,
502
- linkTags: o,
481
+ linkTags: i,
503
482
  metaTags: c,
504
- noscriptTags: i,
483
+ noscriptTags: a,
505
484
  onChangeClientState: l,
506
- scriptTags: a,
485
+ scriptTags: o,
507
486
  styleTags: u,
508
487
  title: f,
509
- titleAttributes: h
488
+ titleAttributes: m
510
489
  } = e;
511
- j("body", n), j("html", s), He(f, h);
490
+ R("body", n), R("html", s), $e(f, m);
512
491
  const p = {
513
492
  baseTag: A("base", r),
514
- linkTags: A("link", o),
493
+ linkTags: A("link", i),
515
494
  metaTags: A("meta", c),
516
- noscriptTags: A("noscript", i),
517
- scriptTags: A("script", a),
495
+ noscriptTags: A("noscript", a),
496
+ scriptTags: A("script", o),
518
497
  styleTags: A("style", u)
519
- }, g = {}, q = {};
498
+ }, g = {}, U = {};
520
499
  Object.keys(p).forEach((S) => {
521
- const { newTags: K, oldTags: te } = p[S];
522
- K.length && (g[S] = K), te.length && (q[S] = p[S].oldTags);
523
- }), t && t(), l(e, g, q);
524
- }, O = null, _e = (e) => {
525
- O && cancelAnimationFrame(O), e.defer ? O = requestAnimationFrame(() => {
526
- Y(e, () => {
527
- O = null;
500
+ const { newTags: q, oldTags: X } = p[S];
501
+ q.length && (g[S] = q), X.length && (U[S] = p[S].oldTags);
502
+ }), t && t(), l(e, g, U);
503
+ }, C = null, Pe = (e) => {
504
+ C && cancelAnimationFrame(C), e.defer ? C = requestAnimationFrame(() => {
505
+ V(e, () => {
506
+ C = null;
528
507
  });
529
- }) : (Y(e), O = null);
530
- }, Re = _e, B = class extends L {
508
+ }) : (V(e), C = null);
509
+ }, Ie = Pe, Y = class extends j {
531
510
  constructor() {
532
511
  super(...arguments);
533
- T(this, "rendered", !1);
512
+ y(this, "rendered", !1);
534
513
  }
535
514
  shouldComponentUpdate(t) {
536
- return !Te(t, this.props);
515
+ return !fe(t, this.props);
537
516
  }
538
517
  componentDidUpdate() {
539
518
  this.emitChange();
@@ -545,13 +524,13 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
545
524
  emitChange() {
546
525
  const { helmetInstances: t, setHelmet: r } = this.props.context;
547
526
  let n = null;
548
- const s = Oe(
549
- t.get().map((o) => {
550
- const c = { ...o.props };
527
+ const s = ge(
528
+ t.get().map((i) => {
529
+ const c = { ...i.props };
551
530
  return delete c.context, c;
552
531
  })
553
532
  );
554
- ke.canUseDOM ? Re(s) : _ && (n = _(s)), r(n);
533
+ xe.canUseDOM ? Ie(s) : M && (n = M(s)), r(n);
555
534
  }
556
535
  // componentWillMount will be deprecated
557
536
  // for SSR, initialize on first render
@@ -566,9 +545,9 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
566
545
  render() {
567
546
  return this.init(), null;
568
547
  }
569
- }, M, Ne = (M = class extends L {
548
+ }, _, Me = (_ = class extends j {
570
549
  shouldComponentUpdate(e) {
571
- return !me(V(this.props, "helmetData"), V(e, "helmetData"));
550
+ return !oe(N(this.props, "helmetData"), N(e, "helmetData"));
572
551
  }
573
552
  mapNestedChildrenToProps(e, t) {
574
553
  if (!t)
@@ -636,24 +615,24 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
636
615
  }), r;
637
616
  }
638
617
  warnOnInvalidChildren(e, t) {
639
- return z(
640
- N.some((r) => e.type === r),
641
- 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 ${N.join(
618
+ return K(
619
+ z.some((r) => e.type === r),
620
+ 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 ${z.join(
642
621
  ", "
643
622
  )} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`
644
- ), z(
623
+ ), K(
645
624
  !t || typeof t == "string" || Array.isArray(t) && !t.some((r) => typeof r != "string"),
646
625
  `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.`
647
626
  ), !0;
648
627
  }
649
628
  mapChildrenToProps(e, t) {
650
629
  let r = {};
651
- return d.Children.forEach(e, (n) => {
630
+ return T.Children.forEach(e, (n) => {
652
631
  if (!n || !n.props)
653
632
  return;
654
- const { children: s, ...o } = n.props, c = Object.keys(o).reduce((l, a) => (l[ge[a] || a] = o[a], l), {});
655
- let { type: i } = n;
656
- switch (typeof i == "symbol" ? i = i.toString() : this.warnOnInvalidChildren(n, s), i) {
633
+ const { children: s, ...i } = n.props, c = Object.keys(i).reduce((l, o) => (l[pe[o] || o] = i[o], l), {});
634
+ let { type: a } = n;
635
+ switch (typeof a == "symbol" ? a = a.toString() : this.warnOnInvalidChildren(n, s), a) {
657
636
  case "Symbol(react.fragment)":
658
637
  t = this.mapChildrenToProps(s, t);
659
638
  break;
@@ -678,29 +657,19 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
678
657
  render() {
679
658
  const { children: e, ...t } = this.props;
680
659
  let r = { ...t }, { helmetData: n } = t;
681
- if (e && (r = this.mapChildrenToProps(e, r)), n && !(n instanceof R)) {
660
+ if (e && (r = this.mapChildrenToProps(e, r)), n && !(n instanceof k)) {
682
661
  const s = n;
683
- n = new R(s.context, !0), delete r.helmetData;
662
+ n = new k(s.context, !0), delete r.helmetData;
684
663
  }
685
- return n ? /* @__PURE__ */ d.createElement(B, { ...r, context: n.value }) : /* @__PURE__ */ d.createElement(ee.Consumer, null, (s) => /* @__PURE__ */ d.createElement(B, { ...r, context: s }));
664
+ return n ? /* @__PURE__ */ T.createElement(Y, { ...r, context: n.value }) : /* @__PURE__ */ T.createElement(Q.Consumer, null, (s) => /* @__PURE__ */ T.createElement(Y, { ...r, context: s }));
686
665
  }
687
- }, T(M, "defaultProps", {
666
+ }, y(_, "defaultProps", {
688
667
  defer: !0,
689
668
  encodeSpecialCharacters: !0,
690
669
  prioritizeSeoTags: !1
691
- }), M);
692
- const Ve = (e) => {
693
- const t = ie(), r = typeof e.to == "string" ? e.to : e.to.hash, n = (s) => {
694
- var o;
695
- !(r != null && r.startsWith("#")) || r !== t.hash || (s.preventDefault(), (o = document.getElementById(r.slice(1))) == null || o.scrollIntoView());
696
- };
697
- return /* @__PURE__ */ se.jsx(oe, { onClick: n, ...e });
698
- };
670
+ }), _);
699
671
  export {
700
- Ve as A,
701
- Ne as H,
702
- ze as M,
703
- ke as a,
704
- ae as u
672
+ Me as H,
673
+ xe as a
705
674
  };
706
- //# sourceMappingURL=AnchorLink-CDlhr8gL.js.map
675
+ //# sourceMappingURL=index.esm-Bm8pj-bc.js.map