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