zudoku 0.3.0-dev.23 → 0.3.0-dev.26

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 (149) hide show
  1. package/dist/app/demo.d.ts +2 -0
  2. package/dist/app/demo.js +23 -0
  3. package/dist/app/demo.js.map +1 -0
  4. package/dist/app/main.d.ts +2 -1
  5. package/dist/app/main.js +29 -10
  6. package/dist/app/main.js.map +1 -1
  7. package/dist/app/standalone.d.ts +2 -0
  8. package/dist/app/standalone.js +28 -0
  9. package/dist/app/standalone.js.map +1 -0
  10. package/dist/config/config.d.ts +1 -0
  11. package/dist/lib/authentication/Callback.js +1 -1
  12. package/dist/lib/authentication/Callback.js.map +1 -1
  13. package/dist/lib/authentication/providers/openid.d.ts +1 -1
  14. package/dist/lib/components/DevPortal.d.ts +1 -1
  15. package/dist/lib/components/DevPortal.js +2 -2
  16. package/dist/lib/components/DevPortal.js.map +1 -1
  17. package/dist/lib/components/Error.d.ts +1 -0
  18. package/dist/lib/components/Error.js +10 -0
  19. package/dist/lib/components/Error.js.map +1 -0
  20. package/dist/lib/components/Layout.js +2 -2
  21. package/dist/lib/components/Layout.js.map +1 -1
  22. package/dist/lib/components/Router.js +2 -1
  23. package/dist/lib/components/Router.js.map +1 -1
  24. package/dist/lib/components/TopNavigation.d.ts +1 -1
  25. package/dist/lib/components/TopNavigation.js +4 -0
  26. package/dist/lib/components/TopNavigation.js.map +1 -1
  27. package/dist/lib/components/index.d.ts +10 -5
  28. package/dist/lib/components/index.js +8 -5
  29. package/dist/lib/components/index.js.map +1 -1
  30. package/dist/lib/plugins/markdown/MdxPage.js +2 -2
  31. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  32. package/dist/lib/plugins/markdown/Toc.js +1 -1
  33. package/dist/lib/plugins/markdown/Toc.js.map +1 -1
  34. package/dist/lib/plugins/markdown/generateRoutes.d.ts +1 -1
  35. package/dist/lib/plugins/markdown/generateRoutes.js +1 -1
  36. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
  37. package/dist/lib/plugins/openapi/Route.js +1 -1
  38. package/dist/lib/plugins/openapi/Route.js.map +1 -1
  39. package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
  40. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
  41. package/dist/lib/plugins/openapi/index.js +1 -1
  42. package/dist/lib/plugins/openapi/index.js.map +1 -1
  43. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +1 -1
  44. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
  45. package/dist/lib/plugins/openapi/playground/createUrl.d.ts +1 -1
  46. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js +3 -0
  47. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +1 -1
  48. package/dist/lib/ui/Callout.js +1 -1
  49. package/dist/lib/ui/Callout.js.map +1 -1
  50. package/dist/lib/util/MdxComponents.js.map +1 -1
  51. package/dist/lib/util/logInit.d.ts +1 -0
  52. package/dist/lib/util/logInit.js +9 -0
  53. package/dist/lib/util/logInit.js.map +1 -0
  54. package/dist/vite/config.d.ts +5 -1
  55. package/dist/vite/config.js +16 -9
  56. package/dist/vite/config.js.map +1 -1
  57. package/dist/vite/plugin-api-keys.js +2 -2
  58. package/dist/vite/plugin-api-keys.js.map +1 -1
  59. package/dist/vite/plugin-api.js +1 -1
  60. package/dist/vite/plugin-api.js.map +1 -1
  61. package/dist/vite/plugin-auth.js +2 -2
  62. package/dist/vite/plugin-auth.js.map +1 -1
  63. package/dist/vite/plugin-component.js +1 -1
  64. package/dist/vite/plugin-component.js.map +1 -1
  65. package/dist/vite/plugin-docs.js +7 -6
  66. package/dist/vite/plugin-docs.js.map +1 -1
  67. package/dist/vite/plugin-html.js +1 -9
  68. package/dist/vite/plugin-html.js.map +1 -1
  69. package/dist/vite/plugin-mdx.d.ts +3 -1
  70. package/dist/vite/plugin-mdx.js +4 -4
  71. package/dist/vite/plugin-mdx.js.map +1 -1
  72. package/dist/vite/plugin-openapi-worker.js +1 -1
  73. package/dist/vite/plugin-openapi-worker.js.map +1 -1
  74. package/dist/vite/plugin-redirect.js +4 -1
  75. package/dist/vite/plugin-redirect.js.map +1 -1
  76. package/dist/vite/plugin.js +1 -1
  77. package/dist/vite/plugin.js.map +1 -1
  78. package/lib/{AnchorLink-DIUlXlf0.js → AnchorLink-BtVKbEwm.js} +183 -183
  79. package/lib/{DevPortalProvider-gzyAGqHT.js → DevPortalProvider--xZTs0RJ.js} +2 -2
  80. package/lib/{Markdown-BjA7peYW.js → Markdown-oJFqm0uk.js} +3 -3
  81. package/lib/{MdxComponents-W-fE1ISO.js → MdxComponents-CsU8yR42.js} +2 -2
  82. package/lib/{MdxPage-DQ7lZBzE.js → MdxPage-BV_9ncEk.js} +21 -21
  83. package/lib/{OperationList-DuIBqFNA.js → OperationList-C9t7wPj8.js} +9 -9
  84. package/lib/{Route-B98Y2MdH.js → Route-CHqr53jb.js} +2 -2
  85. package/lib/{Select-DczD5e29.js → Select-CNmXi4JU.js} +4 -4
  86. package/lib/{Spinner-CSoij67T.js → Spinner-By5opWs5.js} +3 -3
  87. package/lib/{hook-CBXxHulF.js → hook-kVJ4gpk5.js} +1 -1
  88. package/lib/{index-CKvOcM7w.js → index-CUIxJAeE.js} +169 -169
  89. package/lib/{index-C7O9D7f6.js → index-Cr3hgaqt.js} +2 -2
  90. package/lib/{index-Cg6lXS1z.js → index-CySUl0uj.js} +3 -3
  91. package/lib/{index-ClDDiRmC.js → index-fXFJf9Ua.js} +13 -13
  92. package/lib/{router-DibNxKUP.js → jsx-runtime-D7DwziLW.js} +2843 -2843
  93. package/lib/{util-CaVongBq.js → util-DnDPBx_j.js} +1 -1
  94. package/lib/zudoku.auth-openid.js +2 -2
  95. package/lib/zudoku.components.js +142 -141
  96. package/lib/zudoku.openapi-worker.js +3 -1
  97. package/lib/zudoku.plugin-api-keys.js +6 -6
  98. package/lib/zudoku.plugin-markdown.js +5 -5
  99. package/lib/zudoku.plugin-openapi.js +2 -2
  100. package/lib/zudoku.plugin-redirect.js +2 -2
  101. package/package.json +3 -1
  102. package/src/app/demo-cdn.html +14 -0
  103. package/src/app/demo.html +14 -0
  104. package/src/app/demo.tsx +35 -0
  105. package/src/app/main.css +74 -0
  106. package/src/app/main.tsx +40 -9
  107. package/src/app/standalone.html +16 -0
  108. package/src/app/standalone.tsx +42 -0
  109. package/src/lib/authentication/Callback.tsx +1 -1
  110. package/src/lib/authentication/providers/openid.tsx +1 -1
  111. package/src/lib/components/DevPortal.tsx +2 -2
  112. package/src/lib/components/Error.tsx +15 -0
  113. package/src/lib/components/Layout.tsx +1 -2
  114. package/src/lib/components/Router.tsx +2 -7
  115. package/src/lib/components/TopNavigation.tsx +5 -0
  116. package/src/lib/components/index.ts +8 -5
  117. package/src/lib/plugins/markdown/MdxPage.tsx +2 -2
  118. package/src/lib/plugins/markdown/Toc.tsx +1 -1
  119. package/src/lib/plugins/markdown/generateRoutes.tsx +1 -1
  120. package/src/lib/plugins/openapi/Route.tsx +1 -1
  121. package/src/lib/plugins/openapi/SimpleSelect.tsx +1 -1
  122. package/src/lib/plugins/openapi/index.tsx +1 -1
  123. package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
  124. package/src/lib/plugins/openapi/playground/QueryParams.tsx +1 -1
  125. package/src/lib/plugins/openapi/playground/createUrl.ts +1 -1
  126. package/src/lib/plugins/openapi/worker/createSharedWorkerClient.ts +4 -0
  127. package/src/lib/ui/Callout.tsx +2 -2
  128. package/src/lib/util/MdxComponents.tsx +0 -1
  129. package/src/lib/util/logInit.ts +9 -0
  130. package/dist/app/App.d.ts +0 -2
  131. package/dist/app/App.js +0 -32
  132. package/dist/app/App.js.map +0 -1
  133. package/dist/lib/components/Link.d.ts +0 -1
  134. package/dist/lib/components/Link.js +0 -2
  135. package/dist/lib/components/Link.js.map +0 -1
  136. package/dist/lib/core/helmet.d.ts +0 -4
  137. package/dist/lib/core/helmet.js +0 -5
  138. package/dist/lib/core/helmet.js.map +0 -1
  139. package/dist/lib/core/icons.d.ts +0 -1
  140. package/dist/lib/core/icons.js +0 -2
  141. package/dist/lib/core/icons.js.map +0 -1
  142. package/dist/lib/core/router.d.ts +0 -1
  143. package/dist/lib/core/router.js +0 -2
  144. package/dist/lib/core/router.js.map +0 -1
  145. package/src/app/App.tsx +0 -44
  146. package/src/lib/components/Link.tsx +0 -1
  147. package/src/lib/core/helmet.ts +0 -5
  148. package/src/lib/core/icons.tsx +0 -1
  149. package/src/lib/core/router.tsx +0 -1
@@ -1,13 +1,13 @@
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);
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
4
  import d, { Component as L } from "react";
5
5
  import { g as F } from "./_commonjsHelpers-BkfeUUK-.js";
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) {
6
+ import { j as se } from "./jsx-runtime-D7DwziLW.js";
7
+ import { L as oe } from "./index-CUIxJAeE.js";
8
+ import { u as ie } from "./index-fXFJf9Ua.js";
9
+ const k = {}, X = d.createContext(k);
10
+ function ae(e) {
11
11
  const t = d.useContext(X);
12
12
  return d.useMemo(
13
13
  function() {
@@ -16,15 +16,15 @@ function le(e) {
16
16
  [t, e]
17
17
  );
18
18
  }
19
- function Ne(e) {
19
+ function ze(e) {
20
20
  let t;
21
- return e.disableParentContext ? t = typeof e.components == "function" ? e.components(M) : e.components || M : t = le(e.components), d.createElement(
21
+ return e.disableParentContext ? t = typeof e.components == "function" ? e.components(k) : e.components || k : t = ae(e.components), d.createElement(
22
22
  X.Provider,
23
23
  { value: t },
24
24
  e.children
25
25
  );
26
26
  }
27
- var ce = typeof Element < "u", ue = typeof Map == "function", fe = typeof Set == "function", pe = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
27
+ var le = typeof Element < "u", ce = typeof Map == "function", ue = typeof Set == "function", fe = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
28
28
  function x(e, t) {
29
29
  if (e === t) return !0;
30
30
  if (e && t && typeof e == "object" && typeof t == "object") {
@@ -37,7 +37,7 @@ function x(e, t) {
37
37
  return !0;
38
38
  }
39
39
  var o;
40
- if (ue && e instanceof Map && t instanceof Map) {
40
+ if (ce && e instanceof Map && t instanceof Map) {
41
41
  if (e.size !== t.size) return !1;
42
42
  for (o = e.entries(); !(n = o.next()).done; )
43
43
  if (!t.has(n.value[0])) return !1;
@@ -45,13 +45,13 @@ function x(e, t) {
45
45
  if (!x(n.value[1], t.get(n.value[0]))) return !1;
46
46
  return !0;
47
47
  }
48
- if (fe && e instanceof Set && t instanceof Set) {
48
+ if (ue && e instanceof Set && t instanceof Set) {
49
49
  if (e.size !== t.size) return !1;
50
50
  for (o = e.entries(); !(n = o.next()).done; )
51
51
  if (!t.has(n.value[0])) return !1;
52
52
  return !0;
53
53
  }
54
- if (pe && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
54
+ if (fe && ArrayBuffer.isView(e) && ArrayBuffer.isView(t)) {
55
55
  if (r = e.length, r != t.length) return !1;
56
56
  for (n = r; n-- !== 0; )
57
57
  if (e[n] !== t[n]) return !1;
@@ -63,7 +63,7 @@ function x(e, t) {
63
63
  if (s = Object.keys(e), r = s.length, r !== Object.keys(t).length) return !1;
64
64
  for (n = r; n-- !== 0; )
65
65
  if (!Object.prototype.hasOwnProperty.call(t, s[n])) return !1;
66
- if (ce && e instanceof Element) return !1;
66
+ if (le && e instanceof Element) return !1;
67
67
  for (n = r; n-- !== 0; )
68
68
  if (!((s[n] === "_owner" || s[n] === "__v" || s[n] === "__o") && e.$$typeof) && !x(e[s[n]], t[s[n]]))
69
69
  return !1;
@@ -71,7 +71,7 @@ function x(e, t) {
71
71
  }
72
72
  return e !== e && t !== t;
73
73
  }
74
- var me = function(t, r) {
74
+ var pe = function(t, r) {
75
75
  try {
76
76
  return x(t, r);
77
77
  } catch (n) {
@@ -80,29 +80,29 @@ var me = function(t, r) {
80
80
  throw n;
81
81
  }
82
82
  };
83
- const de = /* @__PURE__ */ F(me);
84
- var he = function(e, t, r, n, s, o, c, i) {
83
+ const me = /* @__PURE__ */ F(pe);
84
+ var de = function(e, t, r, n, s, o, c, i) {
85
85
  if (process.env.NODE_ENV !== "production" && t === void 0)
86
86
  throw new Error("invariant requires an error message argument");
87
87
  if (!e) {
88
- var a;
88
+ var l;
89
89
  if (t === void 0)
90
- a = new Error(
90
+ l = new Error(
91
91
  "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
92
92
  );
93
93
  else {
94
- var l = [r, n, s, o, c, i], u = 0;
95
- a = new Error(
94
+ var a = [r, n, s, o, c, i], u = 0;
95
+ l = new Error(
96
96
  t.replace(/%s/g, function() {
97
- return l[u++];
97
+ return a[u++];
98
98
  })
99
- ), a.name = "Invariant Violation";
99
+ ), l.name = "Invariant Violation";
100
100
  }
101
- throw a.framesToPop = 1, a;
101
+ throw l.framesToPop = 1, l;
102
102
  }
103
- }, ye = he;
104
- const z = /* @__PURE__ */ F(ye);
105
- var Te = function(t, r, n, s) {
103
+ }, he = de;
104
+ const z = /* @__PURE__ */ F(he);
105
+ var ye = function(t, r, n, s) {
106
106
  var o = n ? n.call(s, t, r) : void 0;
107
107
  if (o !== void 0)
108
108
  return !!o;
@@ -113,9 +113,9 @@ var Te = function(t, r, n, s) {
113
113
  var c = Object.keys(t), i = Object.keys(r);
114
114
  if (c.length !== i.length)
115
115
  return !1;
116
- for (var a = Object.prototype.hasOwnProperty.bind(r), l = 0; l < c.length; l++) {
117
- var u = c[l];
118
- if (!a(u))
116
+ for (var l = Object.prototype.hasOwnProperty.bind(r), a = 0; a < c.length; a++) {
117
+ var u = c[a];
118
+ if (!l(u))
119
119
  return !1;
120
120
  var f = t[u], h = r[u];
121
121
  if (o = n ? n.call(s, f, h, u) : void 0, o === !1 || o === void 0 && f !== h)
@@ -123,8 +123,8 @@ var Te = function(t, r, n, s) {
123
123
  }
124
124
  return !0;
125
125
  };
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 || {}), $ = {
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 = {
128
128
  link: { rel: ["amphtml", "canonical", "alternate"] },
129
129
  script: { type: ["application/ld+json"] },
130
130
  meta: {
@@ -155,7 +155,7 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
155
155
  "http-equiv": "httpEquiv",
156
156
  itemprop: "itemProp",
157
157
  tabindex: "tabIndex"
158
- }, ve = Object.entries(U).reduce(
158
+ }, ge = Object.entries(U).reduce(
159
159
  (e, [t, r]) => (e[r] = t, e),
160
160
  {}
161
161
  ), y = "data-rh", C = {
@@ -172,7 +172,7 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
172
172
  return n[t];
173
173
  }
174
174
  return null;
175
- }, Ae = (e) => {
175
+ }, ve = (e) => {
176
176
  let t = E(
177
177
  e,
178
178
  "title"
@@ -183,8 +183,8 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
183
183
  return r.replace(/%s/g, () => t);
184
184
  const n = E(e, C.DEFAULT_TITLE);
185
185
  return t || n || void 0;
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) => {
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) => {
188
188
  if (!r.length) {
189
189
  const s = Object.keys(n);
190
190
  for (let o = 0; o < s.length; o += 1) {
@@ -194,50 +194,50 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
194
194
  }
195
195
  }
196
196
  return r;
197
- }, []), be = (e) => console && typeof console.warn == "function" && console.warn(e), b = (e, t, r) => {
197
+ }, []), Ee = (e) => console && typeof console.warn == "function" && console.warn(e), b = (e, t, r) => {
198
198
  const n = {};
199
- return r.filter((s) => Array.isArray(s[e]) ? !0 : (typeof s[e] < "u" && be(
199
+ return r.filter((s) => Array.isArray(s[e]) ? !0 : (typeof s[e] < "u" && Ee(
200
200
  `Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`
201
201
  ), !1)).map((s) => s[e]).reverse().reduce((s, o) => {
202
202
  const c = {};
203
- o.filter((a) => {
204
- let l;
205
- const u = Object.keys(a);
203
+ o.filter((l) => {
204
+ let a;
205
+ const u = Object.keys(l);
206
206
  for (let h = 0; h < u.length; h += 1) {
207
207
  const p = u[h], g = p.toLowerCase();
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
+ 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);
209
209
  }
210
- if (!l || !a[l])
210
+ if (!a || !l[a])
211
211
  return !1;
212
- const f = a[l].toLowerCase();
213
- return n[l] || (n[l] = {}), c[l] || (c[l] = {}), n[l][f] ? !1 : (c[l][f] = !0, !0);
214
- }).reverse().forEach((a) => s.push(a));
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);
214
+ }).reverse().forEach((l) => s.push(l));
215
215
  const i = Object.keys(c);
216
- for (let a = 0; a < i.length; a += 1) {
217
- const l = i[a], u = {
218
- ...n[l],
219
- ...c[l]
216
+ for (let l = 0; l < i.length; l += 1) {
217
+ const a = i[l], u = {
218
+ ...n[a],
219
+ ...c[a]
220
220
  };
221
- n[l] = u;
221
+ n[a] = u;
222
222
  }
223
223
  return s;
224
224
  }, []).reverse();
225
- }, Oe = (e, t) => {
225
+ }, be = (e, t) => {
226
226
  if (Array.isArray(e) && e.length) {
227
227
  for (let r = 0; r < e.length; r += 1)
228
228
  if (e[r][t])
229
229
  return !0;
230
230
  }
231
231
  return !1;
232
- }, Se = (e) => ({
233
- baseTag: Ee([
232
+ }, Oe = (e) => ({
233
+ baseTag: Ce([
234
234
  "href"
235
235
  /* HREF */
236
236
  ], e),
237
- bodyAttributes: I("bodyAttributes", e),
237
+ bodyAttributes: $("bodyAttributes", e),
238
238
  defer: E(e, C.DEFER),
239
239
  encode: E(e, C.ENCODE_SPECIAL_CHARACTERS),
240
- htmlAttributes: I("htmlAttributes", e),
240
+ htmlAttributes: $("htmlAttributes", e),
241
241
  linkTags: b(
242
242
  "link",
243
243
  [
@@ -263,7 +263,7 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
263
263
  "innerHTML"
264
264
  /* INNER_HTML */
265
265
  ], e),
266
- onChangeClientState: Ce(e),
266
+ onChangeClientState: Ae(e),
267
267
  scriptTags: b(
268
268
  "script",
269
269
  [
@@ -277,46 +277,46 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
277
277
  "cssText"
278
278
  /* CSS_TEXT */
279
279
  ], e),
280
- title: Ae(e),
281
- titleAttributes: I("titleAttributes", e),
282
- prioritizeSeoTags: Oe(e, C.PRIORITIZE_SEO_TAGS)
283
- }), Z = (e) => Array.isArray(e) ? e.join("") : e, we = (e, t) => {
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) => {
284
284
  const r = Object.keys(e);
285
285
  for (let n = 0; n < r.length; n += 1)
286
286
  if (t[r[n]] && t[r[n]].includes(e[r[n]]))
287
287
  return !0;
288
288
  return !1;
289
- }, H = (e, t) => Array.isArray(e) ? e.reduce(
290
- (r, n) => (we(n, t) ? r.priority.push(n) : r.default.push(n), r),
289
+ }, D = (e, t) => Array.isArray(e) ? e.reduce(
290
+ (r, n) => (Se(n, t) ? r.priority.push(n) : r.default.push(n), r),
291
291
  { priority: [], default: [] }
292
292
  ) : { default: e, priority: [] }, V = (e, t) => ({
293
293
  ...e,
294
294
  [t]: void 0
295
- }), xe = [
295
+ }), we = [
296
296
  "noscript",
297
297
  "script",
298
298
  "style"
299
299
  /* STYLE */
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
+ ], 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) => {
301
301
  const n = typeof e[r] < "u" ? `${r}="${e[r]}"` : `${r}`;
302
302
  return t ? `${t} ${n}` : n;
303
- }, ""), Pe = (e, t, r, n) => {
303
+ }, ""), xe = (e, t, r, n) => {
304
304
  const s = G(r), o = Z(t);
305
- return s ? `<${e} ${y}="true" ${s}>${k(
305
+ return s ? `<${e} ${y}="true" ${s}>${H(
306
306
  o,
307
307
  n
308
- )}</${e}>` : `<${e} ${y}="true">${k(
308
+ )}</${e}>` : `<${e} ${y}="true">${H(
309
309
  o,
310
310
  n
311
311
  )}</${e}>`;
312
- }, $e = (e, t, r = !0) => t.reduce((n, s) => {
312
+ }, Pe = (e, t, r = !0) => t.reduce((n, s) => {
313
313
  const o = s, c = Object.keys(o).filter(
314
- (l) => !(l === "innerHTML" || l === "cssText")
315
- ).reduce((l, u) => {
316
- const f = typeof o[u] > "u" ? u : `${u}="${k(o[u], r)}"`;
317
- return l ? `${l} ${f}` : f;
318
- }, ""), i = o.innerHTML || o.cssText || "", a = xe.indexOf(e) === -1;
319
- return `${n}<${e} ${y}="true" ${c}${a ? "/>" : `>${i}</${e}>`}`;
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
320
  }, ""), J = (e, t = {}) => Object.keys(e).reduce((r, n) => {
321
321
  const s = U[n];
322
322
  return r[s || n] = e[n], r;
@@ -334,8 +334,8 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
334
334
  return Object.keys(r).forEach((o) => {
335
335
  const i = U[o] || o;
336
336
  if (i === "innerHTML" || i === "cssText") {
337
- const a = r.innerHTML || r.cssText;
338
- s.dangerouslySetInnerHTML = { __html: a };
337
+ const l = r.innerHTML || r.cssText;
338
+ s.dangerouslySetInnerHTML = { __html: l };
339
339
  } else
340
340
  s[i] = r[o];
341
341
  }), d.createElement(e, s);
@@ -344,7 +344,7 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
344
344
  case "title":
345
345
  return {
346
346
  toComponent: () => Ie(e, t.title, t.titleAttributes),
347
- toString: () => Pe(e, t.title, t.titleAttributes, r)
347
+ toString: () => xe(e, t.title, t.titleAttributes, r)
348
348
  };
349
349
  case "bodyAttributes":
350
350
  case "htmlAttributes":
@@ -355,11 +355,11 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
355
355
  default:
356
356
  return {
357
357
  toComponent: () => P(e, t),
358
- toString: () => $e(e, t, r)
358
+ toString: () => Pe(e, t, r)
359
359
  };
360
360
  }
361
- }, He = ({ metaTags: e, linkTags: t, scriptTags: r, encode: n }) => {
362
- const s = H(e, $.meta), o = H(t, $.link), c = H(r, $.script);
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);
363
363
  return {
364
364
  priorityMethods: {
365
365
  toComponent: () => [
@@ -389,15 +389,15 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
389
389
  noscriptTags: o,
390
390
  styleTags: c,
391
391
  title: i = "",
392
- titleAttributes: a,
393
- prioritizeSeoTags: l
392
+ titleAttributes: l,
393
+ prioritizeSeoTags: a
394
394
  } = e;
395
395
  let { linkTags: u, metaTags: f, scriptTags: h } = e, p = {
396
396
  toComponent: () => {
397
397
  },
398
398
  toString: () => ""
399
399
  };
400
- return l && ({ priorityMethods: p, linkTags: u, metaTags: f, scriptTags: h } = He(e)), {
400
+ return a && ({ priorityMethods: p, linkTags: u, metaTags: f, scriptTags: h } = $e(e)), {
401
401
  priority: p,
402
402
  base: m("base", t, n),
403
403
  bodyAttributes: m("bodyAttributes", r, n),
@@ -407,7 +407,7 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
407
407
  noscript: m("noscript", o, n),
408
408
  script: m("script", h, n),
409
409
  style: m("style", c, n),
410
- title: m("title", { title: i, titleAttributes: a }, n)
410
+ title: m("title", { title: i, titleAttributes: l }, n)
411
411
  };
412
412
  }, _ = De, w = [], Q = !!(typeof window < "u" && window.document && window.document.createElement), R = class {
413
413
  constructor(e, t) {
@@ -443,7 +443,7 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
443
443
  titleAttributes: {}
444
444
  }));
445
445
  }
446
- }, Me = {}, ee = d.createContext(Me), v, te = (v = class extends L {
446
+ }, Me = {}, ee = d.createContext(Me), v, ke = (v = class extends L {
447
447
  constructor(r) {
448
448
  super(r);
449
449
  T(this, "helmetData");
@@ -459,21 +459,21 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
459
459
  ), n = r.querySelectorAll(`${e}[${y}]`), s = [].slice.call(n), o = [];
460
460
  let c;
461
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))
465
- if (l === "innerHTML")
466
- a.innerHTML = i.innerHTML;
467
- else if (l === "cssText")
468
- a.styleSheet ? a.styleSheet.cssText = i.cssText : a.appendChild(document.createTextNode(i.cssText));
462
+ 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));
469
469
  else {
470
- const u = l, f = typeof i[u] > "u" ? "" : i[u];
471
- a.setAttribute(l, f);
470
+ const u = a, f = typeof i[u] > "u" ? "" : i[u];
471
+ l.setAttribute(a, f);
472
472
  }
473
- a.setAttribute(y, "true"), s.some((l, u) => (c = u, a.isEqualNode(l))) ? s.splice(c, 1) : o.push(a);
473
+ l.setAttribute(y, "true"), s.some((a, u) => (c = u, l.isEqualNode(a))) ? s.splice(c, 1) : o.push(l);
474
474
  }), s.forEach((i) => {
475
- var a;
476
- return (a = i.parentNode) == null ? void 0 : a.removeChild(i);
475
+ var l;
476
+ return (l = i.parentNode) == null ? void 0 : l.removeChild(i);
477
477
  }), o.forEach((i) => r.appendChild(i)), {
478
478
  oldTags: s,
479
479
  newTags: o
@@ -484,15 +484,15 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
484
484
  return;
485
485
  const n = r.getAttribute(y), s = n ? n.split(",") : [], o = [...s], c = Object.keys(t);
486
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);
490
- l !== -1 && o.splice(l, 1);
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);
491
491
  }
492
492
  for (let i = o.length - 1; i >= 0; i -= 1)
493
493
  r.removeAttribute(o[i]);
494
494
  s.length === o.length ? r.removeAttribute(y) : r.getAttribute(y) !== c.join(",") && r.setAttribute(y, c.join(","));
495
- }, ke = (e, t) => {
495
+ }, He = (e, t) => {
496
496
  typeof e < "u" && document.title !== e && (document.title = Z(e)), j("title", t);
497
497
  }, Y = (e, t) => {
498
498
  const {
@@ -502,25 +502,25 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
502
502
  linkTags: o,
503
503
  metaTags: c,
504
504
  noscriptTags: i,
505
- onChangeClientState: a,
506
- scriptTags: l,
505
+ onChangeClientState: l,
506
+ scriptTags: a,
507
507
  styleTags: u,
508
508
  title: f,
509
509
  titleAttributes: h
510
510
  } = e;
511
- j("body", n), j("html", s), ke(f, h);
511
+ j("body", n), j("html", s), He(f, h);
512
512
  const p = {
513
513
  baseTag: A("base", r),
514
514
  linkTags: A("link", o),
515
515
  metaTags: A("meta", c),
516
516
  noscriptTags: A("noscript", i),
517
- scriptTags: A("script", l),
517
+ scriptTags: A("script", a),
518
518
  styleTags: A("style", u)
519
519
  }, g = {}, q = {};
520
520
  Object.keys(p).forEach((S) => {
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);
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
524
  }, O = null, _e = (e) => {
525
525
  O && cancelAnimationFrame(O), e.defer ? O = requestAnimationFrame(() => {
526
526
  Y(e, () => {
@@ -533,7 +533,7 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
533
533
  T(this, "rendered", !1);
534
534
  }
535
535
  shouldComponentUpdate(t) {
536
- return !ge(t, this.props);
536
+ return !Te(t, this.props);
537
537
  }
538
538
  componentDidUpdate() {
539
539
  this.emitChange();
@@ -545,13 +545,13 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
545
545
  emitChange() {
546
546
  const { helmetInstances: t, setHelmet: r } = this.props.context;
547
547
  let n = null;
548
- const s = Se(
548
+ const s = Oe(
549
549
  t.get().map((o) => {
550
550
  const c = { ...o.props };
551
551
  return delete c.context, c;
552
552
  })
553
553
  );
554
- te.canUseDOM ? Re(s) : _ && (n = _(s)), r(n);
554
+ ke.canUseDOM ? Re(s) : _ && (n = _(s)), r(n);
555
555
  }
556
556
  // componentWillMount will be deprecated
557
557
  // for SSR, initialize on first render
@@ -566,140 +566,140 @@ var W = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
566
566
  render() {
567
567
  return this.init(), null;
568
568
  }
569
- }, D, je = (D = class extends L {
570
- shouldComponentUpdate(t) {
571
- return !de(V(this.props, "helmetData"), V(t, "helmetData"));
569
+ }, M, Ne = (M = class extends L {
570
+ shouldComponentUpdate(e) {
571
+ return !me(V(this.props, "helmetData"), V(e, "helmetData"));
572
572
  }
573
- mapNestedChildrenToProps(t, r) {
574
- if (!r)
573
+ mapNestedChildrenToProps(e, t) {
574
+ if (!t)
575
575
  return null;
576
- switch (t.type) {
576
+ switch (e.type) {
577
577
  case "script":
578
578
  case "noscript":
579
579
  return {
580
- innerHTML: r
580
+ innerHTML: t
581
581
  };
582
582
  case "style":
583
583
  return {
584
- cssText: r
584
+ cssText: t
585
585
  };
586
586
  default:
587
587
  throw new Error(
588
- `<${t.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`
588
+ `<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`
589
589
  );
590
590
  }
591
591
  }
592
- flattenArrayTypeChildren(t, r, n, s) {
592
+ flattenArrayTypeChildren(e, t, r, n) {
593
593
  return {
594
- ...r,
595
- [t.type]: [
596
- ...r[t.type] || [],
594
+ ...t,
595
+ [e.type]: [
596
+ ...t[e.type] || [],
597
597
  {
598
- ...n,
599
- ...this.mapNestedChildrenToProps(t, s)
598
+ ...r,
599
+ ...this.mapNestedChildrenToProps(e, n)
600
600
  }
601
601
  ]
602
602
  };
603
603
  }
604
- mapObjectTypeChildren(t, r, n, s) {
605
- switch (t.type) {
604
+ mapObjectTypeChildren(e, t, r, n) {
605
+ switch (e.type) {
606
606
  case "title":
607
607
  return {
608
- ...r,
609
- [t.type]: s,
610
- titleAttributes: { ...n }
608
+ ...t,
609
+ [e.type]: n,
610
+ titleAttributes: { ...r }
611
611
  };
612
612
  case "body":
613
613
  return {
614
- ...r,
615
- bodyAttributes: { ...n }
614
+ ...t,
615
+ bodyAttributes: { ...r }
616
616
  };
617
617
  case "html":
618
618
  return {
619
- ...r,
620
- htmlAttributes: { ...n }
619
+ ...t,
620
+ htmlAttributes: { ...r }
621
621
  };
622
622
  default:
623
623
  return {
624
- ...r,
625
- [t.type]: { ...n }
624
+ ...t,
625
+ [e.type]: { ...r }
626
626
  };
627
627
  }
628
628
  }
629
- mapArrayTypeChildrenToProps(t, r) {
630
- let n = { ...r };
631
- return Object.keys(t).forEach((s) => {
632
- n = {
633
- ...n,
634
- [s]: t[s]
629
+ mapArrayTypeChildrenToProps(e, t) {
630
+ let r = { ...t };
631
+ return Object.keys(e).forEach((n) => {
632
+ r = {
633
+ ...r,
634
+ [n]: e[n]
635
635
  };
636
- }), n;
636
+ }), r;
637
637
  }
638
- warnOnInvalidChildren(t, r) {
638
+ warnOnInvalidChildren(e, t) {
639
639
  return z(
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(
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(
642
642
  ", "
643
- )} are allowed. Helmet does not support rendering <${t.type}> elements. Refer to our API for more information.`
643
+ )} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`
644
644
  ), z(
645
- !r || typeof r == "string" || Array.isArray(r) && !r.some((n) => typeof n != "string"),
646
- `Helmet expects a string as a child of <${t.type}>. Did you forget to wrap your children in braces? ( <${t.type}>{\`\`}</${t.type}> ) Refer to our API for more information.`
645
+ !t || typeof t == "string" || Array.isArray(t) && !t.some((r) => typeof r != "string"),
646
+ `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
647
  ), !0;
648
648
  }
649
- mapChildrenToProps(t, r) {
650
- let n = {};
651
- return d.Children.forEach(t, (s) => {
652
- if (!s || !s.props)
649
+ mapChildrenToProps(e, t) {
650
+ let r = {};
651
+ return d.Children.forEach(e, (n) => {
652
+ if (!n || !n.props)
653
653
  return;
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) {
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) {
657
657
  case "Symbol(react.fragment)":
658
- r = this.mapChildrenToProps(o, r);
658
+ t = this.mapChildrenToProps(s, t);
659
659
  break;
660
660
  case "link":
661
661
  case "meta":
662
662
  case "noscript":
663
663
  case "script":
664
664
  case "style":
665
- n = this.flattenArrayTypeChildren(
666
- s,
665
+ r = this.flattenArrayTypeChildren(
667
666
  n,
668
- i,
669
- o
667
+ r,
668
+ c,
669
+ s
670
670
  );
671
671
  break;
672
672
  default:
673
- r = this.mapObjectTypeChildren(s, r, i, o);
673
+ t = this.mapObjectTypeChildren(n, t, c, s);
674
674
  break;
675
675
  }
676
- }), this.mapArrayTypeChildrenToProps(n, r);
676
+ }), this.mapArrayTypeChildrenToProps(r, t);
677
677
  }
678
678
  render() {
679
- const { children: t, ...r } = this.props;
680
- let n = { ...r }, { helmetData: s } = r;
681
- if (t && (n = this.mapChildrenToProps(t, n)), s && !(s instanceof R)) {
682
- const o = s;
683
- s = new R(o.context, !0), delete n.helmetData;
679
+ const { children: e, ...t } = this.props;
680
+ let r = { ...t }, { helmetData: n } = t;
681
+ if (e && (r = this.mapChildrenToProps(e, r)), n && !(n instanceof R)) {
682
+ const s = n;
683
+ n = new R(s.context, !0), delete r.helmetData;
684
684
  }
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
+ return n ? /* @__PURE__ */ d.createElement(B, { ...r, context: n.value }) : /* @__PURE__ */ d.createElement(ee.Consumer, null, (s) => /* @__PURE__ */ d.createElement(B, { ...r, context: s }));
686
686
  }
687
- }, T(D, "defaultProps", {
687
+ }, T(M, "defaultProps", {
688
688
  defer: !0,
689
689
  encodeSpecialCharacters: !0,
690
690
  prioritizeSeoTags: !1
691
- }), D);
692
- const Ye = je, Be = te, Xe = (e) => {
693
- const t = ae(), r = typeof e.to == "string" ? e.to : e.to.hash, n = (s) => {
691
+ }), M);
692
+ const Ve = (e) => {
693
+ const t = ie(), r = typeof e.to == "string" ? e.to : e.to.hash, n = (s) => {
694
694
  var o;
695
695
  !(r != null && r.startsWith("#")) || r !== t.hash || (s.preventDefault(), (o = document.getElementById(r.slice(1))) == null || o.scrollIntoView());
696
696
  };
697
- return /* @__PURE__ */ oe.jsx(ie, { onClick: n, ...e });
697
+ return /* @__PURE__ */ se.jsx(oe, { onClick: n, ...e });
698
698
  };
699
699
  export {
700
- Xe as A,
701
- Ye as H,
702
- Ne as M,
703
- Be as a,
704
- le as u
700
+ Ve as A,
701
+ Ne as H,
702
+ ze as M,
703
+ ke as a,
704
+ ae as u
705
705
  };