zudoku 0.0.0-fa903e7 → 0.0.0-fc5c03b
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.
- package/client.d.ts +7 -0
- package/dist/app/entry.client.d.ts +1 -0
- package/dist/app/entry.client.js +13 -0
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +1 -0
- package/dist/app/entry.server.js +1 -0
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.js +2 -1
- package/dist/app/main.js.map +1 -1
- package/dist/app/sentry.d.ts +3 -0
- package/dist/app/sentry.js +19 -0
- package/dist/app/sentry.js.map +1 -0
- package/dist/app/tailwind.d.ts +2 -1
- package/dist/app/tailwind.js +64 -52
- package/dist/app/tailwind.js.map +1 -1
- package/dist/cli/cli.js +0 -2
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/common/outdated.js +2 -1
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/config/common.d.ts +8 -0
- package/dist/config/common.js +2 -0
- package/dist/config/common.js.map +1 -0
- package/dist/config/config.d.ts +3 -2
- package/dist/config/loader.d.ts +20 -0
- package/dist/config/loader.js +154 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/validators/InputSidebarSchema.d.ts +14 -13
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/common.d.ts +4911 -0
- package/dist/config/validators/common.js +276 -0
- package/dist/config/validators/common.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +1 -0
- package/dist/config/validators/icon-types.js +2 -0
- package/dist/config/validators/icon-types.js.map +1 -0
- package/dist/config/validators/validate.d.ts +760 -524
- package/dist/config/validators/validate.js +9 -234
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/authentication/providers/openid.js +7 -2
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +4 -4
- package/dist/lib/components/Heading.js +1 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Layout.js +3 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Markdown.js +1 -1
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +1 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/ReactMarkdown.d.ts +29 -0
- package/dist/lib/components/ReactMarkdown.js +182 -0
- package/dist/lib/components/ReactMarkdown.js.map +1 -0
- package/dist/lib/components/Search.d.ts +3 -1
- package/dist/lib/components/Search.js +3 -3
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/SyntaxHighlight.js +0 -4
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +1 -1
- package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
- package/dist/lib/components/navigation/Sidebar.js +2 -2
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
- package/dist/lib/components/navigation/SidebarCategory.js +3 -4
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +2 -4
- package/dist/lib/components/navigation/SidebarItem.js +5 -10
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +1 -1
- package/dist/lib/oas/graphql/index.js +4 -1
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +6 -0
- package/dist/lib/plugins/api-catalog/Catalog.js +29 -0
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -0
- package/dist/lib/plugins/api-catalog/index.d.ts +23 -0
- package/dist/lib/plugins/api-catalog/index.js +15 -0
- package/dist/lib/plugins/api-catalog/index.js.map +1 -0
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +2 -2
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +2 -1
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/markdown/resolver.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +47 -2
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +2 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/redirect/index.d.ts +1 -1
- package/dist/lib/ui/Button.d.ts +1 -1
- package/dist/lib/ui/Command.d.ts +1 -1
- package/dist/lib/util/MdxComponents.d.ts +2 -3
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/vite/build.js +15 -3
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +6 -4
- package/dist/vite/config.js +42 -15
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +4 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/dev-server.js +12 -3
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/output.d.ts +1 -1
- package/dist/vite/output.js +25 -16
- package/dist/vite/output.js.map +1 -1
- package/dist/vite/plugin-api.js +44 -1
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-component.js +1 -0
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +1 -2
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.js +20 -0
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-mdx.js +48 -1
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/{plugin-custom-css.d.ts → plugin-theme-css.d.ts} +2 -2
- package/dist/vite/{plugin-custom-css.js → plugin-theme-css.js} +10 -3
- package/dist/vite/plugin-theme-css.js.map +1 -0
- package/dist/vite/plugin.d.ts +1 -2
- package/dist/vite/plugin.js +2 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.d.ts +2 -1
- package/dist/vite/prerender.js +2 -2
- package/dist/vite/prerender.js.map +1 -1
- package/dist/vite/sitemap.d.ts +1 -1
- package/dist/zuplo/env.d.ts +6 -0
- package/dist/zuplo/env.js +9 -0
- package/dist/zuplo/env.js.map +1 -0
- package/dist/zuplo/with-zuplo.d.ts +2 -2
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/AnchorLink-BR0MvI7n.js +35 -0
- package/lib/AnchorLink-BR0MvI7n.js.map +1 -0
- package/lib/{Markdown-ievDDhFT.js → Markdown-CRsmPPfY.js} +13084 -13096
- package/lib/Markdown-CRsmPPfY.js.map +1 -0
- package/lib/{MdxPage-B2FpJ9KC.js → MdxPage-Wp8QU0-q.js} +85 -80
- package/lib/MdxPage-Wp8QU0-q.js.map +1 -0
- package/lib/{OperationList-BkNQEsNs.js → OperationList-u8xHU9-b.js} +982 -969
- package/lib/{OperationList-BkNQEsNs.js.map → OperationList-u8xHU9-b.js.map} +1 -1
- package/lib/{SlotletProvider-DyomlzGx.js → SlotletProvider-BgvYIPQe.js} +2 -2
- package/lib/{SlotletProvider-DyomlzGx.js.map → SlotletProvider-BgvYIPQe.js.map} +1 -1
- package/lib/{SyntaxHighlight-DkLOsjHS.js → SyntaxHighlight-C31iouiO.js} +1 -3
- package/lib/{SyntaxHighlight-DkLOsjHS.js.map → SyntaxHighlight-C31iouiO.js.map} +1 -1
- package/lib/assets/{worker-BHClFO3A.js → worker-C_2va8B8.js} +435 -432
- package/lib/assets/{worker-BHClFO3A.js.map → worker-C_2va8B8.js.map} +1 -1
- package/lib/{createServer-CpJlUPtn.js → createServer-BCAHdrpE.js} +5 -2
- package/lib/{createServer-CpJlUPtn.js.map → createServer-BCAHdrpE.js.map} +1 -1
- package/lib/{index-C7SaIME0.js → index-CmdLGbbk.js} +7 -5
- package/lib/index-CmdLGbbk.js.map +1 -0
- package/lib/{AnchorLink-CDlhr8gL.js → index.esm-Bm8pj-bc.js} +223 -254
- package/lib/index.esm-Bm8pj-bc.js.map +1 -0
- package/lib/ui/Drawer.js +79 -79
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/zudoku.auth-openid.js +42 -37
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +386 -367
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +121 -0
- package/lib/zudoku.plugin-api-catalog.js.map +1 -0
- package/lib/zudoku.plugin-api-keys.js +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/package.json +19 -6
- package/src/app/entry.client.tsx +15 -0
- package/src/app/entry.server.tsx +1 -0
- package/src/app/main.tsx +5 -1
- package/src/app/sentry.ts +24 -0
- package/src/app/tailwind.ts +67 -52
- package/src/lib/authentication/providers/openid.tsx +7 -2
- package/src/lib/components/Heading.tsx +13 -13
- package/src/lib/components/Layout.tsx +8 -3
- package/src/lib/components/Markdown.tsx +1 -1
- package/src/lib/components/MobileTopNavigation.tsx +18 -18
- package/src/lib/components/ReactMarkdown.license.txt +21 -0
- package/src/lib/components/ReactMarkdown.tsx +264 -0
- package/src/lib/components/Search.tsx +3 -3
- package/src/lib/components/SyntaxHighlight.tsx +0 -4
- package/src/lib/components/TopNavigation.tsx +1 -1
- package/src/lib/components/navigation/Sidebar.tsx +18 -8
- package/src/lib/components/navigation/SidebarCategory.tsx +10 -9
- package/src/lib/components/navigation/SidebarItem.tsx +10 -13
- package/src/lib/components/navigation/SidebarWrapper.tsx +1 -1
- package/src/lib/core/ZudokuContext.ts +1 -1
- package/src/lib/oas/graphql/index.ts +4 -1
- package/src/lib/plugins/api-catalog/Catalog.tsx +124 -0
- package/src/lib/plugins/api-catalog/index.tsx +50 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +2 -0
- package/src/lib/plugins/markdown/index.tsx +2 -1
- package/src/lib/plugins/markdown/resolver.ts +2 -4
- package/src/lib/plugins/openapi/OperationList.tsx +64 -3
- package/src/lib/plugins/openapi/graphql/gql.ts +2 -2
- package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -0
- package/src/lib/plugins/redirect/index.tsx +1 -1
- package/src/lib/util/MdxComponents.tsx +2 -5
- package/dist/vite/plugin-custom-css.js.map +0 -1
- package/lib/AnchorLink-CDlhr8gL.js.map +0 -1
- package/lib/Markdown-ievDDhFT.js.map +0 -1
- package/lib/MdxPage-B2FpJ9KC.js.map +0 -1
- package/lib/index-C7SaIME0.js.map +0 -1
- package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
- package/lib/prism-markup-templating-DZrrEs0A.js.map +0 -1
- package/lib/prism-php.min-o7FpoMP_.js +0 -11
- package/lib/prism-php.min-o7FpoMP_.js.map +0 -1
|
@@ -1,30 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import { g as
|
|
6
|
-
|
|
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
|
|
40
|
-
if (
|
|
18
|
+
var i;
|
|
19
|
+
if (ne && e instanceof Map && t instanceof Map) {
|
|
41
20
|
if (e.size !== t.size) return !1;
|
|
42
|
-
for (
|
|
21
|
+
for (i = e.entries(); !(n = i.next()).done; )
|
|
43
22
|
if (!t.has(n.value[0])) return !1;
|
|
44
|
-
for (
|
|
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 (
|
|
27
|
+
if (se && e instanceof Set && t instanceof Set) {
|
|
49
28
|
if (e.size !== t.size) return !1;
|
|
50
|
-
for (
|
|
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 (
|
|
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 (
|
|
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
|
|
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
|
|
84
|
-
var
|
|
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
|
|
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
|
|
76
|
+
return o[u++];
|
|
98
77
|
})
|
|
99
78
|
), l.name = "Invariant Violation";
|
|
100
79
|
}
|
|
101
80
|
throw l.framesToPop = 1, l;
|
|
102
81
|
}
|
|
103
|
-
},
|
|
104
|
-
const
|
|
105
|
-
var
|
|
106
|
-
var
|
|
107
|
-
if (
|
|
108
|
-
return !!
|
|
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),
|
|
114
|
-
if (c.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),
|
|
117
|
-
var u = c[
|
|
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],
|
|
121
|
-
if (
|
|
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
|
|
127
|
-
var
|
|
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
|
-
},
|
|
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
|
-
},
|
|
137
|
+
}, pe = Object.entries(F).reduce(
|
|
159
138
|
(e, [t, r]) => (e[r] = t, e),
|
|
160
139
|
{}
|
|
161
|
-
),
|
|
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
|
-
},
|
|
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
|
-
},
|
|
176
|
-
let t =
|
|
154
|
+
}, de = (e) => {
|
|
155
|
+
let t = b(
|
|
177
156
|
e,
|
|
178
157
|
"title"
|
|
179
158
|
/* TITLE */
|
|
180
159
|
);
|
|
181
|
-
const r =
|
|
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 =
|
|
163
|
+
const n = b(e, E.DEFAULT_TITLE);
|
|
185
164
|
return t || n || void 0;
|
|
186
|
-
},
|
|
187
|
-
}),
|
|
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
|
|
191
|
-
const
|
|
192
|
-
if (e.indexOf(
|
|
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
|
-
}, []),
|
|
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" &&
|
|
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,
|
|
180
|
+
), !1)).map((s) => s[e]).reverse().reduce((s, i) => {
|
|
202
181
|
const c = {};
|
|
203
|
-
|
|
204
|
-
let
|
|
182
|
+
i.filter((l) => {
|
|
183
|
+
let o;
|
|
205
184
|
const u = Object.keys(l);
|
|
206
|
-
for (let
|
|
207
|
-
const p = u[
|
|
208
|
-
t.indexOf(g) !== -1 && !(
|
|
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 (!
|
|
189
|
+
if (!o || !l[o])
|
|
211
190
|
return !1;
|
|
212
|
-
const f = l[
|
|
213
|
-
return n[
|
|
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
|
|
216
|
-
for (let l = 0; l <
|
|
217
|
-
const
|
|
218
|
-
...n[
|
|
219
|
-
...c[
|
|
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[
|
|
200
|
+
n[o] = u;
|
|
222
201
|
}
|
|
223
202
|
return s;
|
|
224
203
|
}, []).reverse();
|
|
225
|
-
},
|
|
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
|
-
},
|
|
233
|
-
baseTag:
|
|
211
|
+
}, ge = (e) => ({
|
|
212
|
+
baseTag: he([
|
|
234
213
|
"href"
|
|
235
214
|
/* HREF */
|
|
236
215
|
], e),
|
|
237
|
-
bodyAttributes:
|
|
238
|
-
defer:
|
|
239
|
-
encode:
|
|
240
|
-
htmlAttributes:
|
|
241
|
-
linkTags:
|
|
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:
|
|
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:
|
|
241
|
+
noscriptTags: O("noscript", [
|
|
263
242
|
"innerHTML"
|
|
264
243
|
/* INNER_HTML */
|
|
265
244
|
], e),
|
|
266
|
-
onChangeClientState:
|
|
267
|
-
scriptTags:
|
|
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:
|
|
255
|
+
styleTags: O("style", [
|
|
277
256
|
"cssText"
|
|
278
257
|
/* CSS_TEXT */
|
|
279
258
|
], e),
|
|
280
|
-
title:
|
|
281
|
-
titleAttributes:
|
|
282
|
-
prioritizeSeoTags:
|
|
283
|
-
}), Z = (e) => Array.isArray(e) ? e.join("") : e,
|
|
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
|
-
},
|
|
290
|
-
(r, n) => (
|
|
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: [] },
|
|
271
|
+
) : { default: e, priority: [] }, N = (e, t) => ({
|
|
293
272
|
...e,
|
|
294
273
|
[t]: void 0
|
|
295
|
-
}),
|
|
274
|
+
}), Ae = [
|
|
296
275
|
"noscript",
|
|
297
276
|
"script",
|
|
298
277
|
"style"
|
|
299
278
|
/* STYLE */
|
|
300
|
-
],
|
|
279
|
+
], D = (e, t = !0) => t === !1 ? String(e) : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), 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
|
-
}, ""),
|
|
304
|
-
const s = G(r),
|
|
305
|
-
return s ? `<${e} ${
|
|
306
|
-
|
|
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} ${
|
|
309
|
-
|
|
287
|
+
)}</${e}>` : `<${e} ${h}="true">${D(
|
|
288
|
+
i,
|
|
310
289
|
n
|
|
311
290
|
)}</${e}>`;
|
|
312
|
-
},
|
|
313
|
-
const
|
|
314
|
-
(
|
|
315
|
-
).reduce((
|
|
316
|
-
const f = typeof
|
|
317
|
-
return
|
|
318
|
-
}, ""),
|
|
319
|
-
return `${n}<${e} ${
|
|
320
|
-
}, ""),
|
|
321
|
-
const s =
|
|
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),
|
|
302
|
+
}, t), Oe = (e, t, r) => {
|
|
324
303
|
const n = {
|
|
325
304
|
key: t,
|
|
326
|
-
[
|
|
327
|
-
}, s =
|
|
328
|
-
return [
|
|
329
|
-
},
|
|
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
|
-
[
|
|
311
|
+
[h]: !0
|
|
333
312
|
};
|
|
334
|
-
return Object.keys(r).forEach((
|
|
335
|
-
const
|
|
336
|
-
if (
|
|
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[
|
|
341
|
-
}),
|
|
342
|
-
}),
|
|
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: () =>
|
|
347
|
-
toString: () =>
|
|
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: () =>
|
|
331
|
+
toComponent: () => W(t),
|
|
353
332
|
toString: () => G(t)
|
|
354
333
|
};
|
|
355
334
|
default:
|
|
356
335
|
return {
|
|
357
|
-
toComponent: () =>
|
|
358
|
-
toString: () =>
|
|
336
|
+
toComponent: () => $(e, t),
|
|
337
|
+
toString: () => be(e, t, r)
|
|
359
338
|
};
|
|
360
339
|
}
|
|
361
|
-
},
|
|
362
|
-
const s =
|
|
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
|
-
|
|
367
|
-
|
|
368
|
-
|
|
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
|
-
`${
|
|
351
|
+
`${d("meta", s.priority, n)} ${d(
|
|
373
352
|
"link",
|
|
374
|
-
|
|
353
|
+
i.priority,
|
|
375
354
|
n
|
|
376
|
-
)} ${
|
|
355
|
+
)} ${d("script", c.priority, n)}`
|
|
377
356
|
)
|
|
378
357
|
},
|
|
379
358
|
metaTags: s.default,
|
|
380
|
-
linkTags:
|
|
359
|
+
linkTags: i.default,
|
|
381
360
|
scriptTags: c.default
|
|
382
361
|
};
|
|
383
|
-
},
|
|
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:
|
|
368
|
+
noscriptTags: i,
|
|
390
369
|
styleTags: c,
|
|
391
|
-
title:
|
|
370
|
+
title: a = "",
|
|
392
371
|
titleAttributes: l,
|
|
393
|
-
prioritizeSeoTags:
|
|
372
|
+
prioritizeSeoTags: o
|
|
394
373
|
} = e;
|
|
395
|
-
let { linkTags: u, metaTags: f, scriptTags:
|
|
374
|
+
let { linkTags: u, metaTags: f, scriptTags: m } = e, p = {
|
|
396
375
|
toComponent: () => {
|
|
397
376
|
},
|
|
398
377
|
toString: () => ""
|
|
399
378
|
};
|
|
400
|
-
return
|
|
379
|
+
return o && ({ priorityMethods: p, linkTags: u, metaTags: f, scriptTags: m } = Ce(e)), {
|
|
401
380
|
priority: p,
|
|
402
|
-
base:
|
|
403
|
-
bodyAttributes:
|
|
404
|
-
htmlAttributes:
|
|
405
|
-
link:
|
|
406
|
-
meta:
|
|
407
|
-
noscript:
|
|
408
|
-
script:
|
|
409
|
-
style:
|
|
410
|
-
title:
|
|
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
|
-
},
|
|
391
|
+
}, M = Se, w = [], J = !!(typeof window < "u" && window.document && window.document.createElement), k = class {
|
|
413
392
|
constructor(e, t) {
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
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
|
-
},
|
|
425
|
+
}, we = {}, Q = T.createContext(we), v, xe = (v = class extends j {
|
|
447
426
|
constructor(r) {
|
|
448
427
|
super(r);
|
|
449
|
-
|
|
450
|
-
this.helmetData = new
|
|
428
|
+
y(this, "helmetData");
|
|
429
|
+
this.helmetData = new k(this.props.context || {}, v.canUseDOM);
|
|
451
430
|
}
|
|
452
431
|
render() {
|
|
453
|
-
return /* @__PURE__ */
|
|
432
|
+
return /* @__PURE__ */ T.createElement(Q.Provider, { value: this.helmetData.value }, this.props.children);
|
|
454
433
|
}
|
|
455
|
-
},
|
|
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}[${
|
|
438
|
+
), n = r.querySelectorAll(`${e}[${h}]`), s = [].slice.call(n), i = [];
|
|
460
439
|
let c;
|
|
461
|
-
return t && t.length && t.forEach((
|
|
440
|
+
return t && t.length && t.forEach((a) => {
|
|
462
441
|
const l = document.createElement(e);
|
|
463
|
-
for (const
|
|
464
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
465
|
-
if (
|
|
466
|
-
l.innerHTML =
|
|
467
|
-
else if (
|
|
468
|
-
l.styleSheet ? l.styleSheet.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 =
|
|
471
|
-
l.setAttribute(
|
|
449
|
+
const u = o, f = typeof a[u] > "u" ? "" : a[u];
|
|
450
|
+
l.setAttribute(o, f);
|
|
472
451
|
}
|
|
473
|
-
l.setAttribute(
|
|
474
|
-
}), s.forEach((
|
|
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 =
|
|
477
|
-
}),
|
|
455
|
+
return (l = a.parentNode) == null ? void 0 : l.removeChild(a);
|
|
456
|
+
}), i.forEach((a) => r.appendChild(a)), {
|
|
478
457
|
oldTags: s,
|
|
479
|
-
newTags:
|
|
458
|
+
newTags: i
|
|
480
459
|
};
|
|
481
|
-
},
|
|
460
|
+
}, R = (e, t) => {
|
|
482
461
|
const r = document.getElementsByTagName(e)[0];
|
|
483
462
|
if (!r)
|
|
484
463
|
return;
|
|
485
|
-
const n = r.getAttribute(
|
|
486
|
-
for (const
|
|
487
|
-
const l = t[
|
|
488
|
-
r.getAttribute(
|
|
489
|
-
const
|
|
490
|
-
|
|
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
|
|
493
|
-
r.removeAttribute(
|
|
494
|
-
s.length ===
|
|
495
|
-
},
|
|
496
|
-
typeof e < "u" && document.title !== e && (document.title = Z(e)),
|
|
497
|
-
},
|
|
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:
|
|
481
|
+
linkTags: i,
|
|
503
482
|
metaTags: c,
|
|
504
|
-
noscriptTags:
|
|
483
|
+
noscriptTags: a,
|
|
505
484
|
onChangeClientState: l,
|
|
506
|
-
scriptTags:
|
|
485
|
+
scriptTags: o,
|
|
507
486
|
styleTags: u,
|
|
508
487
|
title: f,
|
|
509
|
-
titleAttributes:
|
|
488
|
+
titleAttributes: m
|
|
510
489
|
} = e;
|
|
511
|
-
|
|
490
|
+
R("body", n), R("html", s), $e(f, m);
|
|
512
491
|
const p = {
|
|
513
492
|
baseTag: A("base", r),
|
|
514
|
-
linkTags: A("link",
|
|
493
|
+
linkTags: A("link", i),
|
|
515
494
|
metaTags: A("meta", c),
|
|
516
|
-
noscriptTags: A("noscript",
|
|
517
|
-
scriptTags: A("script",
|
|
495
|
+
noscriptTags: A("noscript", a),
|
|
496
|
+
scriptTags: A("script", o),
|
|
518
497
|
styleTags: A("style", u)
|
|
519
|
-
}, g = {},
|
|
498
|
+
}, g = {}, U = {};
|
|
520
499
|
Object.keys(p).forEach((S) => {
|
|
521
|
-
const { newTags:
|
|
522
|
-
|
|
523
|
-
}), t && t(), l(e, g,
|
|
524
|
-
},
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
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
|
-
}) : (
|
|
530
|
-
},
|
|
508
|
+
}) : (V(e), C = null);
|
|
509
|
+
}, Ie = Pe, Y = class extends j {
|
|
531
510
|
constructor() {
|
|
532
511
|
super(...arguments);
|
|
533
|
-
|
|
512
|
+
y(this, "rendered", !1);
|
|
534
513
|
}
|
|
535
514
|
shouldComponentUpdate(t) {
|
|
536
|
-
return !
|
|
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 =
|
|
549
|
-
t.get().map((
|
|
550
|
-
const c = { ...
|
|
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
|
-
|
|
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
|
-
},
|
|
548
|
+
}, _, Me = (_ = class extends j {
|
|
570
549
|
shouldComponentUpdate(e) {
|
|
571
|
-
return !
|
|
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
|
|
640
|
-
|
|
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 ${
|
|
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
|
-
),
|
|
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
|
|
630
|
+
return T.Children.forEach(e, (n) => {
|
|
652
631
|
if (!n || !n.props)
|
|
653
632
|
return;
|
|
654
|
-
const { children: s, ...
|
|
655
|
-
let { type:
|
|
656
|
-
switch (typeof
|
|
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
|
|
660
|
+
if (e && (r = this.mapChildrenToProps(e, r)), n && !(n instanceof k)) {
|
|
682
661
|
const s = n;
|
|
683
|
-
n = new
|
|
662
|
+
n = new k(s.context, !0), delete r.helmetData;
|
|
684
663
|
}
|
|
685
|
-
return n ? /* @__PURE__ */
|
|
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
|
-
},
|
|
666
|
+
}, y(_, "defaultProps", {
|
|
688
667
|
defer: !0,
|
|
689
668
|
encodeSpecialCharacters: !0,
|
|
690
669
|
prioritizeSeoTags: !1
|
|
691
|
-
}),
|
|
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
|
-
|
|
701
|
-
|
|
702
|
-
ze as M,
|
|
703
|
-
ke as a,
|
|
704
|
-
ae as u
|
|
672
|
+
Me as H,
|
|
673
|
+
xe as a
|
|
705
674
|
};
|
|
706
|
-
//# sourceMappingURL=
|
|
675
|
+
//# sourceMappingURL=index.esm-Bm8pj-bc.js.map
|